Subject: Re: Printer port access
To: Carson, Jon A. <JACarson@addcoinc.com>
From: Jared D. McNeill <jmcneill@invisible.yi.org>
List: port-i386
Date: 01/31/2001 16:50:47
On Wed, 31 Jan 2001, Carson, Jon A. wrote:
> Hi,
>
> I would like to write directly to the printer port without having to write a
> device driver.
>
> Is there an equivalent to  inportb( port ), outportb( port, data ) ?  Is
> there a FAQ I can read, or perhaps someone with this knowledge can clue me
> in :)

You will need to include machine/sysarch.h and machine/pio.h

On i386, first call 'i386_iopl(3);', then you can use inb(port) and
outb(port, data). When you're done, call 'i386_iopl(0);'. Don't forget to
link the binary against libi386.

Hope this helps,
Jared