LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-29-2004, 03:09 PM   #1
irfanhab
Member
 
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, 03:38 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 10-29-2004, 05:38 PM   #3
jinksys
Member
 
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 linuxassembly.org to find out more about linux assembly.
 
Old 10-31-2004, 01:28 AM   #4
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Original Poster
Rep: Reputation: 34
thank you very much

linuxassembly.com is a very useful resource
 
  


Reply


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 07:59 PM
Nasm essoft478 Linux - Software 2 09-13-2004 05:33 PM
masm question ody1 Programming 4 06-16-2004 04:34 PM
Looking for a MASM equivelant... ooagentbender Programming 2 02-07-2004 01:14 AM
MASM in Linux nikhiljosh Linux - General 0 09-18-2002 11:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:25 PM.

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