BBS: Inland Empire Archive
Date: 03-28-92 (16:46) Number: 187
From: BOB PERKINS Refer#: 136
To: MIKE PHILLIPS Recvd: NO
Subj: Re: Printer Checks via In Conf: (2) Quik_Bas
MP> Hey, can you use interrupts to check the printer status in QuickBASIC
MP> 4.5? I saw this little jewel in the C Echo. Seems like I remember
MP> interrupts from the QBNews (gotta look in my folder). Anyone have code?
I'm not sure if you can use DOS' IOCTL on a printer. I'm
interested in seeing if someone else can post code to do
so. In the meantime, perhaps the code below will get you
going. DX is loaded with the printer port you wish to
DIM regs AS RegType
regs.ax = &H200
regs.dx = &H0
CALL INTERRUPT(&H17, regs, regs)
t% = (regs.ax \ 256) AND 255
IF t% AND 64 THEN
PRINT "Printer didn't respond."
PRINT "Printer responded."
IF t% AND 128 THEN
PRINT "Printer is not busy."
PRINT "Printer is busy."
IF t% AND 32 THEN
PRINT "Printer is out of paper."
PRINT "Printer is loaded with paper."
--- Msg V4.5
* Origin: Reciprocity Failure (1:124/4115.236)