From owner-freebsd-hackers Mon Jan 15 18:38:45 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA03405 for hackers-outgoing; Mon, 15 Jan 1996 18:38:45 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id SAA03288 for ; Mon, 15 Jan 1996 18:35:32 -0800 (PST) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id NAA27039; Tue, 16 Jan 1996 13:08:49 +1030 From: Michael Smith Message-Id: <199601160238.NAA27039@genesis.atrad.adelaide.edu.au> Subject: Re: Request examples of using outb() in inb()in program. To: scott@patton.com (Scott Whittle) Date: Tue, 16 Jan 1996 13:08:49 +1030 (CST) Cc: hackers@FreeBSD.org In-Reply-To: <199601151554.KAA23095@emma.patton.com> from "Scott Whittle" at Jan 15, 96 10:54:30 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org Precedence: bulk Scott Whittle stands accused of saying: > > 'Lo all - > 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. :) How about you send us your source so we can pick over it? Here's an example : open("/dev/io",O_RDONLY,0); i = inb(0x300); /* fiddle with port 0x300 */ outb(0x300,i+1); > Scott Whittle email: scott@patton.com -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] "Who does BSD?" "We do Chucky, we do." [[