From: joy merwin monteiro <joy.merwin@gmail.com>
To: Frank Kotler <fbkotler@comcast.net>
Cc: linux-assembly@vger.kernel.org
Subject: Re: Segfault on ioperm
Date: Fri, 21 Jan 2005 18:13:09 +0530 [thread overview]
Message-ID: <4b0d6e0d050121044310b6a9c6@mail.gmail.com> (raw)
In-Reply-To: <41EFFB12.64D2C558@comcast.net>
On Thu, 20 Jan 2005 13:40:18 -0500, Frank Kotler <fbkotler@comcast.net> wrote:
> joy merwin monteiro wrote:
> >
> > Hi,
> >
> > I had been here before, I can't figure out why the code isnt working.
>
> Seems like everybody's got a different idea what's wrong...
> I might as well throw in my wild guess, too :)
>
> > global _start
> >
> > port equ 378h
> > stat equ port+1
> > ctrl equ port+2
> >
> > section .text
> > _start:
> >
> > mov eax,101
> > mov ebx,port
> > mov ecx,3
>
> This is the number of ports you're enabling, right?
>
> > mov edx,port
>
> And this should be the "turn-on" value... I imagine you want
> "3" here, too, for "in" and "out" permissions...
No idea, Just used the code available on http://www.janw.easynet.be/eng.html
as a reference. it works fine, so......
>
> > int 80h
>
> Check the returned value here, as Richard says, if signed,
> bail out.
>
> > mov dx,port
> > mov al,0xff
> > out 378h,al <----- segfault here
>
> "out dx, al", as Jan suggests...
However, Jan's musice speaker on the site above uses
"out 43h,al"
Corrected that :-(
>
> > mov eax,1
> > int 0x80
> >
> > Any help/ pointers?
>
> Odd that it should work on a different distro... If you
> suspect ld, grab newer binutils... Different permissions
> setup would be more likely, I would think... But check that
> return value - it should tell the tale. (assume you know
> that -ERRNO is in eax, not -1 and ERRNO in errno, as man 2
> says...)
Thanks for the pointers.....
Joy.M.Monteiro
>
> Best,
> Frank
>
--
people always turn away,
from the eyes of a stranger...
Afraid to know
what lies behind the stare.......
--QueensRyche
next prev parent reply other threads:[~2005-01-21 12:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 13:52 Segfault on ioperm joy merwin monteiro
2005-01-20 14:58 ` Richard Cooper
2005-01-20 15:26 ` Jan Wagemakers
2005-01-20 18:15 ` joy merwin monteiro
2005-01-20 18:40 ` Frank Kotler
2005-01-21 12:43 ` joy merwin monteiro [this message]
2005-01-21 14:29 ` Frank Kotler
2005-01-23 8:35 ` Jan Wagemakers
2005-01-23 8:17 ` Jan Wagemakers
2005-01-24 3:28 ` joy merwin monteiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b0d6e0d050121044310b6a9c6@mail.gmail.com \
--to=joy.merwin@gmail.com \
--cc=fbkotler@comcast.net \
--cc=joy_mm@ieee.org \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.