Information Technology Reference
In-Depth Information
The parallel interface can be accessed either by direct reads to and writes from the I/O
memory addresses or from a program which uses the BIOS printer interrupt. This interrupt
allows a program either to get the status of the printer or to write a character to it. Table 16.2
outlines the interrupt calls.
Table 16.1 Signal definitions
Signal
In/out
Description
Out
Indicates that valid data is on the data lines (active low)
STROBE
Out
Instructs the printer to insert a line feed for every carriage return
(active low)
AUTO
FEED
Out
Indicates to the printer that it is selected (active low)
SELECT
INPUT
INIT
Out
Resets the printer
In
Indicate that the last character was received (active low)
ACK
BUSY
In
Indicates that the printer is busy and thus cannot accept data
In
Out of paper
OUT
OF
PAPER
SELECT
In
Indicates that the printer is on line and connected
In
Indicates that an error exists (active low)
ERROR
Table 16.2 BIOS printer interrupt
Description
Input registers
Output registers
Initialise printer
port
AH = 01h
DX = printer number (00h-02h)
AH = printer status
bit 7: not busy
bit 6: acknowledge
bit 5: out of paper
bit 4: selected
bit 3: I/O error
bit 2: unused
bit 1: unused
bit 0: timeout
Write character
to printer
AH = 00h
AL = character to write
DX = printer number (00h-02h)
AH = printer status
Get printer
status
AH = 02h
DX = printer number (00h-02h)
AH = printer status
 
Search WWH ::




Custom Search