I've programmed assembler under MS-DOS for a while, but now I took the
step to Linux. But, when I'm trying to call the BIOS interrupt (int
$0x10) i get the message "Segmentation fault".
I have tried to changed the ah,al values...but the same error anyway. So
what's wrong?
Here's the source (I know I don't specify byte, word or long for mov):
asm("mov $0x13,%ax \n\t"
"int $0x10");
It's the int command, because I have tried to remove it and then the
program executes without errors...
Thanks for your help
tom
--
Thomas Larsson Linux Registered User #97775
tomla...@swipnet.se Using Linux & Windows 98
http://home.swipnet.se/tomlarsson
BIOS interrupts are not accessible under Linux.
BTW Linux put your processor in protected mode and use all interrupts
reserved by intel in their intel defined way. Hardware interrupts are
redirected somewhere else. The only API interrupt that I know of under Linux
is 0x80, see my recent post about an example hello world program in assembler
for Linux. But the documented way to access the OS api is by calling
corresponding functions in libc and that's what I'd use.
-- Jean-Marc, who wonder why IBM have used reserved interrupts since he first
read the datasheet for the 8086...
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Using int 10h is a DOS specific thing. In Linux, interrupt vector 10h
may point to totally different routines. See the man pages for graphics
handling and the HOWTO docs for information about how you access video
in Linux (man -k svga, for example).
AriL
--
Humans may send email (if absolutely necessary) to the
obvious non-spam address.