home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
clipper
/
rettig
/
source
/
isprint.asm
< prev
next >
Wrap
Assembly Source File
|
1990-10-21
|
1KB
|
41 lines
; Filename: ISPRINT.ASM
; Program.: Clipper Extended Library
; Authors.: Tom Rettig and Brian Russell, modified by Leonard Zerman
; Date....: November 1, 1985
; Notice..: Placed in the public domain by Tom Rettig Associates.
; Notes...: Works for parallel printers only.
;
;
; ISPRINTER() ::= True if the printer is online and ready
;
;------------------------------------------------------------------------------
; ISPRINTER()
; Syntax: ISPRINTER()
; Return: Logical true if the printer is online and ready, otherwise false
INCLUDE EXTENDA.INC
CLpublic <ISPRINTER>
CLfunc log ISPRINTER
CLcode
PUSH AX
PUSH DX
MOV AH,2H ; printer status function
MOV DX,0H ; which printer to check
INT 17H ; read printer status
XOR BX,BX ; false
CMP AH,90H ; not busy or selected (90h = 10010000)
JNE RET_ISPRINTER ; return false if other than above
MOV BX,1 ; true
RET_ISPRINTER:
POP DX
POP AX
CLret BX
;-----------------------------------------------------------------------------
END