Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-29-2004, 02:09 PM   #1
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
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?
Old 10-29-2004, 02:38 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
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 ...

Old 10-29-2004, 04:38 PM   #3
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 419

Rep: Reputation: 35
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 to find out more about linux assembly.
Old 10-31-2004, 01:28 AM   #4
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Original Poster
Rep: Reputation: 34
thank you very much is a very useful resource


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comiping MASM programs with NASM skie_knite007 Programming 1 06-16-2005 06:59 PM
Nasm essoft478 Linux - Software 2 09-13-2004 04:33 PM
masm question ody1 Programming 4 06-16-2004 03:34 PM
Looking for a MASM equivelant... ooagentbender Programming 2 02-07-2004 12:14 AM
MASM in Linux nikhiljosh Linux - General 0 09-18-2002 10:06 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration