home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / pascal / 4842 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.1 KB

  1. Path: sparky!uunet!cs.utexas.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!actrix!Arnaud.Wylie
  2. Newsgroups: comp.lang.pascal
  3. Subject: Re: Printer Polling
  4. Message-ID: <1992Aug12.081730.16244@actrix.gen.nz>
  5. From: Arnaud.Wylie@bbs.actrix.gen.nz
  6. Date: Wed, 12 Aug 1992 08:17:30 GMT
  7. Sender: Arnaud.Wylie@actrix.gen.nz (Arnaud Wylie)
  8. References: <1992Aug10.203903.11756@msuinfo.cl.msu.edu> <15720@star.cs.vu.nl>
  9. Organization: Actrix Information Exchange
  10. Lines: 50
  11.  
  12. In article <15720@star.cs.vu.nl> sbakker@cs.vu.nl (Bakker S) writes:
  13. > lemek@frith.msu.edu (John P. Lemek) writes:
  14. > >Does anyone know how to poll a printer to see if it is active and has paper 
  15. > >in it?  I'm using an HP Deskjet and TP6.  I thought about trying to write
  16. > >to it and then checking the IOresult function, but if I do something like
  17. > >write(lst,'');  then I don't get the desired result.  If I do something like:
  18. > >writeln(lst,'');  then my paper position gets messed up which I can't have
  19. > >for my project.
  20.  
  21. Here's the info for directly accessing the PC parallel printer ports.
  22. Sorry if I'm posting info that's already contained in a FAQ file.
  23.  
  24.  
  25. Parallel Port Pinouts:
  26.  
  27. NAME    DIR     PORT    BIT  PIN
  28.  
  29. D0      OUTPUT  DATA    0    2
  30. D1      OUTPUT  DATA    1    3
  31. D2      OUTPUT  DATA    2    4
  32. D3      OUTPUT  DATA    3    5
  33. D4      OUTPUT  DATA    4    6
  34. D5      OUTPUT  DATA    5    7
  35. D6      OUTPUT  DATA    6    8
  36. D7      OUTPUT  DATA    7    9
  37. STROBE  OUTPUT  CONTROL 0    1    Inverting
  38. BUSY    INPUT   STATUS  7    11   Inverting
  39. AUTO LF OUTPUT  CONTROL 1    14   Inverting
  40. INIT    OUTPUT  CONTROL 2    16   
  41. SELECT  OUTPUT  CONTROL 3    17   Inverting
  42. ERROR   INPUT   STATUS  3    15
  43. SEL'D   INPUT   STATUS  4    13
  44. PAPER   INPUT   STATUS  5    12
  45. ACK     INPUT   STATUS  6    10
  46.  
  47. The location of LPT1: is kept at [$0040:$0008]
  48.  "       "    " LPT2: "    "   " [$0040:$000A]
  49.  
  50. The data register is followed by the status and then the control registers in
  51. I/O space.
  52.  
  53. Cheers, Arnaud...
  54.  
  55. -- 
  56. UseNet:  Arnaud.Wylie@bbs.actrix.gen.nz |  "This statement is false"
  57. FidoNet:              3:771/170         |  Phone 0064 4 3823-237
  58.