Date: Sun, 7 Feb 1999 11:59:12 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: nebo cc: djgpp AT delorie DOT com Subject: Re: PCI printing In-Reply-To: <36BA4BB7.7940@linetap.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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?