Article View: alt.msdos.programmer
Article #979Re: Programming the printer port to read in data.
From: Doug Stevens
Date: Wed, 22 May 1991 23:33
Date: Wed, 22 May 1991 23:33
34 lines
1552 bytes
1552 bytes
It seems that it is not generally known that each printer port contains three registers (some cheapo printer cards only implement two). The register at offset 0 from the I/O location of the printer is write-only, for data (there is a diagnostic read-back, which is the same as what was written if the card is working properly). The register at offset 1 contains: Bit Fxn --- --- 7 Busy (~read) 6 Ack (read) 5 Out of paper (read) 4 Printer selected (read) 3 Error 2 IRQ occurred (read) 1-0 Reserved (read) The register at offset 2 contains: Bit Fxn --- --- 7-5 Reserved 4 Enable IRQ 3 Select printer (~read, ~write) 2 Init printer (read, ~write) 1 Auto LF (~read, ~write) 0 Strobe (~read, ~write) I think that it is at offset 2 that you must write all 1's to the port before you can use it to read. There may be typo's here -- caveat emptor!
Technical Details
Message-ID:
<1991May22.233318.11680@tvnews.tv.tek.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!ogicse!zephyr.ens.tek.com!tvnews!dougsReferences:
<1991May21.202043.24725@magnus.acs.ohio-state.edu> <1991May22.104513.22169@msuinfo.cl.msu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!ogicse!zephyr.ens.tek.com!tvnews!dougs From: dougs@tvnews.tv.tek.com (Doug Stevens) Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer Subject: Re: Programming the printer port to read in data. Message-ID: <1991May22.233318.11680@tvnews.tv.tek.com> Date: 22 May 91 23:33:18 GMT Article-I.D.: tvnews.1991May22.233318.11680 References: <1991May21.202043.24725@magnus.acs.ohio-state.edu> <1991May22.104513.22169@msuinfo.cl.msu.edu> Distribution: usa Organization: Tektronix TV Measurement Systems, Beaverton, OR Lines: 34