home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / USCX / STEVEUT.ZIP / PRNSTATS.DOC < prev    next >
Text File  |  1984-05-20  |  2KB  |  35 lines

  1.  
  2.                                   PRNSTATS.BAS
  3.  
  4. PRNSTATS.BAS  is  a  BASICA program to dynamically examine the status of
  5. the line printer through port 957.  The particular program I wrote  just
  6. continues  polling  the  port  until  is finds a change at which time it
  7. updates the screen with the new status.
  8.  
  9. However, it was written with the purpose of calling  this  routine  just
  10. before  requesting  some printer function within the driver program.  If
  11. bits 1, 2, 3 and 5 are set low (0) then the printer is ready to  perform
  12. some  function.   Otherwise some fault has occurred with it.  I selected
  13. the message "Intervention required." However, to determine what is wrong
  14. with  is  examine  each  bit  position  in the array PSB (program status
  15. byte):  If bit 1 is high (1) then the printer is currently busy.  If the
  16. second bit is high (1) then it probably has no electrical energy supply.
  17. If bit 3 is set then it is out of forms.  If Bit 4 is low (0)  then  the
  18. printer  is  not  on line (depress button on printer);  if bit 5 is high
  19. then a print fault occurred (no power or off line).  Bits 6 and  7  have
  20. no  meaning  assigned  yet,  and  are always high (1);  a time out fault
  21. occured if the printer returns status bit 8 low (0), otherwise  it  will
  22. be high.
  23.  
  24. This  program  should be more informative in the application that having
  25. BASIC terminate execution, or is better than playing with the  on  error
  26. command and guessing which err will be returned.
  27.  
  28. If problems contact me:  201 Delaware Avenue
  29.                          Kingston, New York 12401
  30.  
  31. Currently  working  on a similar program for Disk usage, if you have one
  32. completed similar to this, please let me know.
  33.  
  34.  
  35.