Date: Tue, 23 Oct 2001 19:37:01 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Igor Bujna 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 Precedence: bulk > Date: Tue, 23 Oct 2001 12:25:44 +0200 > From: Igor Bujna > > 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.