www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/23/13:43:53

Date: Tue, 23 Oct 2001 19:37:01 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Igor Bujna <igor DOT bujna AT maxi-tip DOT cz>
Message-Id: <7263-Tue23Oct2001193700+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <3BD545A8.4070501@maxi-tip.cz> (message from Igor Bujna on Tue,
23 Oct 2001 12:25:44 +0200)
Subject: Re: Problem with outb and inb
References: <3BD545A8 DOT 4070501 AT maxi-tip DOT cz>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Tue, 23 Oct 2001 12:25:44 +0200
> From: Igor Bujna <igor DOT bujna AT maxi-tip DOT cz>
> 
> But if i have this program:
> main(){
> outportw(0x378,56);       
> outportw(0x378,10);}
> from printer i get nothing.
> What i doing wrong.

First, use outportb, not outportw: the LPTn ports are byte-wide.

And second, you need to second byte only when the ACK line is high and
the BUSY line is low, meaning that the printer processed the previous
byte and is ready for the next byte.  The ACK line is mapped into bit
6 of the port 0x379, and the BUSY line is mapped into bit 7 of the
same port.

- Raw text -


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