bios printer
Syntax
#include '<'bios.h'>'
unsigned _bios_printer(unsigned cmd, unsigned printer, unsigned data);
Description
The bios printer routine uses INT 0x17 to perform printer output services for parallel
printers. The printer argument species the a
ected printer, where 0 is LPT1, 1 is LPT2,
and so on. The cmd argument can be any of the following manifest constants:
_PRINTER_INIT
Reset and initialize the specified printer port
_PRINTER_STATUS
Return the status of the specied printer port
_PRINTER_WRITE
Print the data argument to the specied printer port
Return Value
The bios printer function returns the value in the AX register after the BIOS interrupt.
The high-order byte (AH) of the return value indicates the printer status after the operation,
as dened below:
Bit Meaning if True
0 Printer timed out
1 Not used
2 Not used
3 I/O error
4 Printer selected
5 Out of paper
6 Acknowledge
7 Printer not busy
Alphabetical List 27
Portability
not ANSI, not POSIX
Example
while (*c)
_bios_printer(_PRINTER_WRITE, *c++, 0);