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