delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/07/05:02:13

Date: Sun, 7 Feb 1999 11:59:12 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: nebo <nebo AT linetap DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: PCI printing
In-Reply-To: <36BA4BB7.7940@linetap.com>
Message-ID: <Pine.SUN.3.91.990207115852.15342V-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 4 Feb 1999, nebo wrote:

> 	with a PCI Board, and this code no longer works.  subfunction	
> 	00h prints no problem but when a different port is selected,
> 	LPT2, etc, it hangs until my printer is On-line, and then it
> 	attempts to print(for an average 1 page document this takes
> 	about 2 minuutes of my computer sitting there doing nothing).

I don't understand.  The code you posted uses function 2, but the
above text talks about function 0.  Which one of them hangs until the
printer is ready?  If it's function 0, then I don't see anything wrong
with that, since function 0 actually prints a character, and so it
must wait until the printer is ready.

>   __dpmi_regs r;
>   r.h.ah = 2;
>   r.h.dh = port;
>   __dpmi_int(0X17, &r);

My references indicate that you should set r.x.dx to 2.  Maybe the
garbage in the high 8 bits of DX has something to do with this?

>   if( (r.h.ah&0X08) != 0 ) return TRUE;
>   return FALSE;

I don't understand why do you only test the 3rd bit of the status.
Can you explain?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019