🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #13639

BIOS printer error handling

#13639
From: thomas.w.beattie
Date: Fri, 25 Jan 1991 21:44
31 lines
1738 bytes
Posting for a co-worker, please reply to her directly at:
gris@hoqaa.att.com  or  att!hoqaa!gris.
---
Tom Beattie
att!hoqaa!twb
t.w.beattie@att.com
----------------------------------------------------------------------

I am having problems with the error codes returned by BIOS interrupt  0x17,
the parallel printer services. My code is actually in Microsoft C version 6:

   status = _bios_printer( _PRINTER_STATUS, port_num, 0 );
   if ( status & 0x29 != 0 )
      return( FAILURE );
   status = _bios_printer( _PRINTER_WRITE, port_num, byte_out );
   if ( status & 0x29 ) 
        return( FAILURE );
(The _bios_printer function uses Int 0x17 and returns the results from the 
AX register. The result 0x29 means that bits 0, 3, and 5 were set:
timeout, I/O error, and out-of-paper, respectively.)

The problem is that certain printer/PC combinations return the error status,
although there is no error (ie, printer on, paper loaded, etc).
Some other printer/PC combinations return no error when no paper is loaded.
Most printer/PC combinations always work as expected, so I think that
I am using the function correctly. The problems occur when printing graphics,
but not when printing text characters.

Does anyone know why this problem occurs, how to predict when it will arise,
and how to deal with it?
Technical Details
Message-ID: <1991Jan25.214452.9679@cbnewsh.att.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!cbnewsh!twb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!cbnewsh!twb
From: twb@cbnewsh.att.com (thomas.w.beattie)
Newsgroups: comp.sys.ibm.pc,comp.lang.c
Subject: BIOS printer error handling
Message-ID: <1991Jan25.214452.9679@cbnewsh.att.com>
Date: 25 Jan 91 21:44:52 GMT
Sender: twb@cbnewsh.att.com (thomas.w.beattie)
Distribution: usa
Organization: AT&T Bell Laboratories
Lines: 31