delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/31/22:15:31

From: Andrew Cottrell <andnews AT ihug DOT com DOT oz DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Stuck with buffered I/O when using biosprint with Windows 2000
Date: Sat, 01 Feb 2003 14:14:25 +1100
Organization: ECLiPSE
Lines: 20
Message-ID: <pnem3v871rgmqu3hmmeb35s3evc6up7go1@4ax.com>
References: <3af4482 DOT 0301301034 DOT 3e40636f AT posting DOT google DOT com>
NNTP-Posting-Host: p481-tnt8.syd.ihug.com.au
Mime-Version: 1.0
X-Trace: lust.ihug.co.nz 1044069268 11665 203.173.148.227 (1 Feb 2003 03:14:28 GMT)
X-Complaints-To: abuse AT ihug DOT co DOT nz
NNTP-Posting-Date: Sat, 1 Feb 2003 03:14:28 +0000 (UTC)
X-Newsreader: Forte Agent 1.92/32.572
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>I want to use the low level "biosprint()" control of the printer port
>with Windows 2000. It looks like calling the function with command 0
>to write data results in a buffered transfer. The only ways I have
>discovered to actually move it to the port are: (1)Exit from the
>Command window altogether, or (2)Execute a port reset (command 1). I
>obviously don't want to do (1), because I have further interaction
>with the port in mind after the write. If I try approach (2) and
>excecute a port reset after every data transfer, one or more
>additional strobes with unwanted data are also sent out and are
>unexpectedly captured by my external hardware. Is there a way to flush
>this port buffer, and not mess up my intended data stream? Or should I
>be using some other form of low level I/O to the printer port?
Use the low level I/O function outb() etc and directly write to the
ports. You can do this with DJGPP. I have not tried it on the parallel
port, but all of the serial comms libraries work on Windows 9x,NT,2K
and XP. The all directly access the UART hardware registers so I do
not see any problems directly access the parallel port hardware
registers.

Andrew

- Raw text -


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