*BSD News Article 86018


Return to BSD News archive

#! rnews 1350 bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.idt.net!mr.net!news-feed.inet.tele.dk!sn.no!nntp-oslo.UNINETT.no!nntp-trd.UNINETT.no!news.global-one.no!ns2.image.dk!usenet
From: Jan Henrik Radl <gateway@image.dk>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Simple question
Date: Wed, 01 Jan 1997 20:48:53 +0100
Organization: private
Lines: 29
Message-ID: <32CABFA5.41C67EA6@image.dk>
NNTP-Posting-Host: globip103.image.dk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.1.5-RELEASE i386)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:33462

I have a slight litle problem. I wrote a program that should write data
to a i/o port (eg. 300)
it looks like this 

        .global _outb
        .align  2
_outb:  movl    4(%esp),%edx
        nop
        movl    8(%esp),%eax
        outb    %al,%dx
        nop
        ret

        .global _inb
        .align  2
_inb:   movl    4(%esp),%edx
        subl    %eax,%eax
        nop
        inb     %dx,%al
        ret

When I call either off these subrutines I get core dumped BUSERROR!

Why this it's the right data in eax,edx and so on. The program is run by
root.

Any sugestions are appresiated.
Regards 
Jan Henrik