Do we use only 80H in assembly programming to request a service to linux kernel?
what is the utility of other interrupt numbers in linux?
I am transitioning from windows to linux.
int3
(the debug breakpoint) and int 80h
(old system call) are the two software interrupts commonly used on linux. Hardware interrupts are used by device drivers, but those probably don't concern you.
That said, on 32 bit systems the kernel provides code mapped into each process that can be invoked to perform a system call and it will use the most appropriate mechanism automatically (syscall
, sysenter
or int 80h
). Since all 64 bit systems support the syscall
instruction, that's the one normally used in long mode. Note that 64 bit system call numbers differ from 32 bit.
Finally, you don't typically use system calls from assembly on linux. You either use the c library or avoid system calls entirely because they are slow and one of the main uses of assembly is for speed. There are exceptions of course, such as security-related code or compiler/language development.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With