Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!kth!sunic!slyrf!dkuug!daimi!poj From: poj@daimi.dk (Per Olsvig Jensen) Newsgroups: comp.sys.ibm.pc Subject: Re: Determining if a printer is available Message-ID: <2137@daimi.dk> Date: 30 Mar 89 09:46:08 GMT References: <2165@pembina.UUCP> <7730@pyr.gatech.EDU> <42@datcon.UUCP> Reply-To: poj@daimi.dk (Per Olsvig Jensen) Organization: DAIMI: Computer Science Department, Aarhus University, Denmark Lines: 42 In article <42@datcon.UUCP> sar@datcon.co.uk (Simon A Reap) writes: >In article <7730@pyr.gatech.EDU> curci@stat.fsu.edu (Ray Curci (scri)) writes: >>In article <2165@pembina.UUCP> lake@alberta.UUCP (Robert Lake) writes: >>>I am trying to determine if a line printer is attached to my PC. I am >> : >> Additionally, I believe there are also some >>BIOS services that will give you the same information including information >>about some of the control signals (whether your printer is on-line, out-of-paper, etc,.) > >But beware: as far as I can see, even hacking as assembler, there's no >way to differentiate between an on-line paper-full printer all ready to >roll out your pearls, and a printer that's just powered OFF :-) (sure >saves paper that way!) BTW, we're talking standard PC here (and a >million and one clones) and yer actual Epson FX80. The BIOS calls give >identical results for the two printer states, the printer status >registers are the same - what else can I try? >-- >Enjoy, >yerluvinunclesimon Opinions are mine - my cat has her own ideas >Reach me at sar@datcon.co.uk, or ...!mcvax!ukc!pyrltd!datcon!sar On my vanilla IBM AT with DOS 3.21 with a IBM Proprinter the printer status registers differ in the two different printer states mentioned above. Here's the list of different states that I've found empirically on my AT and on a XT ( they differ only slightly on the status bit 7 (not busy)) : No bits set means printer not ready bit 4 set (selected) means printer ready bit 4 and 7 set (selected, not busy) means printer ready bit 3 and 5 set (I/O err, out of paper) means printer out of paper bit 4 and 5 set (select, out of paper) means no printer at all bit 4, 5, 7 set (select, out of paper, not busy) no printer at all bit 3 and 7 set (I/O err, not busy) means printer is turned off bit 0, 5, 7 set (timeout, out of paper, not busy) printer is printing BTW, is also seems to vary between the two machine when the last status (printer is printing) is set. I'll be happy to hear about other combinations of printer status bits. -Regards Per Olsvig Jensen DAIMI - Department of Computer Science, Aarhus University, Denmark