Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 which will list all the interrupt numbers which can be used in conjunction with the int instruction?

like image 825
Richard JP Le Guen Avatar asked Jul 24 '26 01:07

Richard JP Le Guen


2 Answers

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
like image 52
xanatos Avatar answered Jul 25 '26 14:07

xanatos


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.

like image 25
dreyercito Avatar answered Jul 25 '26 15:07

dreyercito



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!