Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux system call table or cheatsheet for Assembly [closed]

Does anyone know where to find a summary table or cheatsheet for the Linux system call in Assembly? I am invoking Linux system calls through the int 0x80 instruction and I need a quick reference to determine which register contains which value from time to time.

like image 506
smwikipedia Avatar asked Sep 01 '10 04:09

smwikipedia


People also ask

How are system calls made in Linux when programming in assembly code?

Linux System CallsPut the system call number in the EAX register. Store the arguments to the system call in the registers EBX, ECX, etc. Call the relevant interrupt (80h). The result is usually returned in the EAX register.

What is syscall table in Linux?

System call table is an array of function pointers. It is defined in kernel space as variable sys_call_table and it contains pointers to functions which implement system calls. Index of each function pointer in the array is the system call number for that syscall.

What does int 80h do in assembly?

INT is the assembly mnemonic for "interrupt". The code after it specifies the interrupt code. (80h/0x80 or 128 in decimal is the Unix System Call interrupt) When running in Real Mode (16-bit on a 32-bit chip), interrupts are handled by the BIOS.


2 Answers

The system calls can also be found in /usr/include/asm/unistd.h, which will point you to unistd32.h or unistd64.h

like image 177
automaton Avatar answered Oct 26 '22 07:10

automaton


Here's an archive of a really good online reference with links to documentation and kernel source code.

like image 44
Dean Harding Avatar answered Oct 26 '22 09:10

Dean Harding