Tvùrce webu je i pro tebe! Postav tøeba web. Bez grafika. Bez kodéra. Hned.
wz

<< Back

cesky: , English:

LPT

Parallel ports LPT


LPTSet - initialize printer

INPUT:
BL = LPT port index (0..2)

OUTPUT:
CY = invalid LPT port or operation error

NOTES: Sends 08h and 0Ch bytes to printer control port.


LPTSend - send byte to LPT port

INPUT:
AL = byte to send
BL = LPT port index (0..2)

OUTPUT:
CY = invalid LPT port or operation error (time-out, no paper)


LPTState - get LPT port state

INPUT:
BL = LPT port index (0..2)

OUTPUT: AH = printer status
- bit 0: 1=time-out error
- bit 3: 1=I/O error
- bit 4: 1=printer selected
- bit 5: 1=out of paper
- bit 6: 1=acknowledgement from printer
- bit 7: 1=printer not busy, 0=printer busy
CY = invalid COM port or operation error


LPTPort - get address of LPT port

INPUT:
BL = LPT port index (0..2)

OUTPUT:
AX = addres of LPT port (378h=LPT1,278h=LPT2,3b0h=LPT3,0=none)
CY = invalid LPT port (AX = 0)


LPTCheck - check LPT port

INPUT:
BL = LPT port index (0..2)

OUTPUT:
CY = invalid LPT port


LPTGetNum - get number of LPT ports

OUTPUT:
AL = number of LPT ports


LPTWrite - write data to LPT port

INPUT:
BL = LPT port index (0..2)
CX = number of bytes
DI = source buffer

OUTPUT:
CY = invalid LPT port or operation error (CX > 0)
CX = remaining bytes (or CX = 0 if no error NC)


Source code LPT.ASM

<< Back