Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
VeriPrint
◄Example► ◄Back► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
;* VeriPrint - Checks if LPT1 (PRN) is available.
;*
;* Shows: BIOS Interrupt - 17h (Parallel Port Printer Driver)
;*
;* Params: None
;*
;* Return: Short integer, 1 for yes or 0 for no
VeriPrint PROC
mov ah, 2 ; Check printer status for
sub dx, dx ; parallel printer (port 0)
int 17h
xchg dx, ax ; Put 0 (for error) in AX
test dh, 00101001b ; Are any error bits on?
jne exit ; Yes? Leave 0
test dh, 10010000b ; Are both operation bits on?
jz exit ; No? Leave 0
inc ax ; Yes? Return 1
exit: ret
VeriPrint ENDP
-♦-