mov ax, 0106h ;Get Printer Device
int 2Fh ;Multiplex Interrupt
jnc queue_empty ;carry clear means print queue is empty
mov [DevHeader], si
mov [DevHeader+2], ds ;ds:si points to print device header
Get Printer Device (Interrupt 2Fh Function 0106h) returns the address of the device header for the current printer.
This function has no parameters.
If the queue is empty, the carry flag is clear and the AX register contains zero. Otherwise, the carry flag is set, the DS:SI registers point to a DEVICEHEADER structure corresponding to the printer device header, and AX contains 0008h (ERROR_QUEUE_FULL).