LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   nasm vs. masm (https://www.linuxquestions.org/questions/programming-9/nasm-vs-masm-248839/)

irfanhab 10-29-2004 02:09 PM

nasm vs. masm
 
Hi all,


I've been using MASM (macro assembler ) on windows lately. and I was wondering:

according to my book it says that interrupt 21h (DOs services) you can do various things like access hard drive, print character, input character and so on, however will the same stuff work in Linux, with nasm, or any other assembler.
Is there any interrupt documentaiton for linux

INT 16h, (Keyboard services) can be used to do various stuff with the keyboard, can you use the same interrupt and do the same stuff on linux?

Tinkster 10-29-2004 02:38 PM

If you look again you'll find that those are SOFT
interrupts, hooks that ancient DOS (and maybe
an emulation layer in Windows) will offer. For Linux
you'll need to use system calls, but I've never
used an assembler in Linux so can't offer more
advice here ...



Cheers,
Tink

jinksys 10-29-2004 04:38 PM

Since linux applications are shielded from the actual hardware by the kernel,
(for security reasons), you cant directly issue an hardware interrupt.
The kernel does, however, provide int 0x80 which you use to issue a syscall
into the kernel. You can go to linuxassembly.org to find out more about linux assembly.

irfanhab 10-31-2004 01:28 AM

thank you very much

linuxassembly.com is a very useful resource


All times are GMT -5. The time now is 01:28 AM.