home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
STEVEUT.ZIP
/
PRNSTATS.DOC
< prev
next >
Wrap
Text File
|
1984-05-20
|
2KB
|
35 lines
PRNSTATS.BAS
PRNSTATS.BAS is a BASICA program to dynamically examine the status of
the line printer through port 957. The particular program I wrote just
continues polling the port until is finds a change at which time it
updates the screen with the new status.
However, it was written with the purpose of calling this routine just
before requesting some printer function within the driver program. If
bits 1, 2, 3 and 5 are set low (0) then the printer is ready to perform
some function. Otherwise some fault has occurred with it. I selected
the message "Intervention required." However, to determine what is wrong
with is examine each bit position in the array PSB (program status
byte): If bit 1 is high (1) then the printer is currently busy. If the
second bit is high (1) then it probably has no electrical energy supply.
If bit 3 is set then it is out of forms. If Bit 4 is low (0) then the
printer is not on line (depress button on printer); if bit 5 is high
then a print fault occurred (no power or off line). Bits 6 and 7 have
no meaning assigned yet, and are always high (1); a time out fault
occured if the printer returns status bit 8 low (0), otherwise it will
be high.
This program should be more informative in the application that having
BASIC terminate execution, or is better than playing with the on error
command and guessing which err will be returned.
If problems contact me: 201 Delaware Avenue
Kingston, New York 12401
Currently working on a similar program for Disk usage, if you have one
completed similar to this, please let me know.