From owner-freebsd-hackers Mon Jan 15 11:40:27 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA02930 for hackers-outgoing; Mon, 15 Jan 1996 11:40:27 -0800 (PST) Received: from sl-001.sl.cybercomm.net (sl-001.sl.cybercomm.net [199.171.196.129]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA02922 for ; Mon, 15 Jan 1996 11:40:16 -0800 (PST) Received: from sl-001.sl.cybercomm.net (localhost [127.0.0.1]) by sl-001.sl.cybercomm.net (8.6.12/8.6.12) with SMTP id OAA03040; Mon, 15 Jan 1996 14:39:44 -0500 Date: Mon, 15 Jan 1996 14:39:44 -0500 (EST) From: Sujal Patel X-Sender: smpatel@sl-001.sl.cybercomm.net To: Scott Whittle cc: hackers@freebsd.org Subject: Re: Request examples of using outb() in inb()in program. In-Reply-To: <199601151554.KAA23095@emma.patton.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org Precedence: bulk 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