NASM interrupt x86 reference?
I can't seem to find a good reference for NASM x86 interrupts on a Linux system. For example, what is int 0x60
and how is it different from int 0x80
?
Is there a manual somewhere 开发者_如何学Cwhich will list all the interrupt numbers which can be used in conjunction with the int instruction?
Linux only uses int 0x80
(or sysenter
or syscall
), with a call number in EAX. Check unistd_32.h
, and see
- What are the calling conventions for UNIX & Linux system calls (and user-space functions) on i386 and x86-64
- What happens if you use the 32-bit int 0x80 Linux ABI in 64-bit code?
For 16-bit x86, there's a long history of different interrupt numbers for different groups of interfaces, often with a call number in just AH.
There is the Ralph Brown's... It's soo many years...
- http://www.ctyme.com/rbrown.htm
Instead of looking for a grain of sand in the desert, you could ask directions to Wiki:
BIOS
- http://en.wikipedia.org/wiki/INT_10H
- http://en.wikipedia.org/wiki/INT_13H
- http://en.wikipedia.org/wiki/BIOS_interrupt_call
DOS
- http://en.wikipedia.org/wiki/MS-DOS_API
You can use any number from 1 to 255. Those are software generated interrupts
But the meaning/behaviour of it will pretty much depend on the operating system you are running it on! Or more exactly on the registered routine in the IDT that will handle that interrupt.
精彩评论