Specifications
Advanced Topics
4-11
MOV AH,0CDh ; AMPRO command
MOV AL,0Bh ; AMPRO function
MOV BX,nn ; Use "00" for output only,
; "01" for input.
INT 13h
The parallel port's four control lines (-STROBE, -AUTOFD, -INIT, and -SEL IN) can be used as
general purpose output lines. Similarly, the five status lines (-ERROR, SEL OUT, PAPER EMPTY,
-ACK, and BUSY) can be used as general purpose input lines.
The four control lines can also be used as inputs. They are driven by open collectors with 10K ohm
pullups. When they "turned off" they will "float," and can be used as inputs. To use a control line
as an input line, write to its corresponding bit in the control register. Write a "1" if the line is
shown as "active high" in Table 4-7, write a "0" if it is shown as "active low."
The parallel port can provide up to 12 outputs plus 5 inputs, or up to 17 inputs, as shown in
Table 4-6.
Signals Number
Available
Type
Data 8 lines Read/Write
Control 4 lines Read/Write
Status 5 lines Read Only
Table 4-6. Parallel Port Signal Usage
Bit 4 in the parallel port control register (see Table 4-7) can be used to enable interrupts. If this bit
is high (logic 1), then a rising edge on the -ACK (IRQ) status line will produce an interrupt. Note
that the interrupt controller must also be enabled to allow this interrupt to take effect.
Bit 5 in the parallel port control register (see Table 4-7) is the parallel output enable. It can be used
to change directions of the parallel port directly, without going through the ROM-BIOS call
described in Section 4.4.2.. To use it, the parallel port must be put into input mode as described in
Section 4.4.2.