[net.micro.pc] Printer status in MSDOS 2.X

bobm@hp-pcd.UUCP (10/17/86)

The "Not Ready" error occurs because the PRN driver is returing an error code
to DOS on a status call - you're right, that's not such a hot design. What
you need to do to work around the problem is take over int 24H - the Fatal
error abort address. When this routine is called (by DOS on a device error),
the low half of register DI contains the driver error code (2 for Not Ready,
9 for out of paper), BP:SI points to the device driver header, and bit 7 of
AH is 1 if the error was a non-disk (block) error. You need to look at this 
bit, and the device name (BP:SI+0AH) to determine if the error was from the
printer or another device. If it was from the printer, you can immediately 
set AL = 0 and IRET, This will return to DOS and tell it to ignore the error.
If it was *not* a printer error, you should jump to the old int 24H vector
(Don't use a call - this stuff is stack-dependent), which will do the
standard "Abort, Retry, Ignore" prompting. See the DOS Tech Ref Manual for
more info.

Bob May
hplabs!hp-pcd!bobm