From owner-freebsd-questions Wed May 31 10:47:27 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ngo.org.uk (ngo.org.uk [193.62.43.28]) by hub.freebsd.org (Postfix) with ESMTP id 51B3337BE54 for ; Wed, 31 May 2000 10:47:24 -0700 (PDT) (envelope-from mac@ngo.org.uk) Received: (from mac@localhost) by ngo.org.uk (8.9.3/8.9.3) id SAA19114 for freebsd-questions@freebsd.org; Wed, 31 May 2000 18:47:36 +0100 (BST) From: Mac Message-Id: <200005311747.SAA19114@ngo.org.uk> Subject: Writing a value to an IO (mem mapped) port To: freebsd-questions@freebsd.org Date: Wed, 31 May 2000 18:47:35 +0100 (BST) X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, Basically, I have a simple IO card installed in my PC and I control it by writing to a (fixed I/O) port. Under QBASIC I'd use:- OUT(&H181,0) and under Visual C I use something like:- _outp(0x181,0) However under FreeBSD, although the function seems to exist to do this in /usr/include/machine/cpufunc.h, I get Bus Errors every time I try. fred.c looks like this:- #include #include main() { outb(0x181,0) } And compiles OKay. I'm assuming I'm missing something fairly fundamental here. I've done all my testing whilst logged in as 'root' on a 3.2-RELEASE box. (without the actusl card installed just yet). Any ideas? (The core dump shows the Bus Error (signal 10) as occuring in outbv() ) Mac To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message