Mail Archives: djgpp/2003/01/31/22:15:31
>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 -