Date: Wed, 21 Jul 1999 13:18:16 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Timmy cc: djgpp AT delorie DOT com Subject: Re: Parallel port HELP! In-Reply-To: <379576FA.A3747558@gnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 21 Jul 1999, Timmy wrote: > How do I program the parallel port? I need access to every > IN and OUT line. AFAIK, this can only be done through I/O ports with inp() and outp() library functions. The base address of the LPT1 printer is stored at 0040:0008h in the BIOS data area (that's linear address 0x408 in _dos_ds, in DJGPP parlance). There are 3 registers at that base address, and you need to use them to control the port, get status and send data. I suggest to get a good reference about direct programming of PC peripherals. DJ Delorie's site incldues several good book titles (under Bookstore). > Will I have to dive into *interrupts*? I don't think yo'll need interrupts, but if you need them, the printer port can be programmed to generate an interrupt when data arrives and is acknowledged by the destination.