Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 1996 14:39:44 -0500 (EST)
From:      Sujal Patel <smpatel@wam.umd.edu>
To:        Scott Whittle <scott@patton.com>
Cc:        hackers@freebsd.org
Subject:   Re: Request examples of using outb() in inb()in program.
Message-ID:  <Pine.BSF.3.91.960115143559.2940B-100000@sl-001.sl.cybercomm.net>
In-Reply-To: <199601151554.KAA23095@emma.patton.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Jan 1996, Scott Whittle wrote:

> I recently saw a thread on I/O at the port level using outb() and inb().
> Would someone post (or email) some source showing the use of each.
> 
> I wrote a small program, which complied fine, but when I ran it (as root)
> it puked big time.  I'm not into the frustration thing, so I figure I'd ask
> those who know. :)

You need to open /dev/io before you access the ports (O_RDONLY is rnough 
to read and write any port).  You can also use the KDENABIO ioctl on  
/dev/console (probably the preferred way, but /dev/io is easier :)


Sujal




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960115143559.2940B-100000>