About
Articles Related
Definition
- Put the system call number in the EAX register.
- Put the arguments:
- if =< 6, in order in the following register: EBX, ECX, EDX, ESI, EDI, and EBP
- If >6, the memory location of the first argument is stored in the EBX register.
- Call the relevant interrupt (0x80).
- The result if any is returned in the EAX register.
Implementation
Example
Exit
; ''1'' = ''sys_exit''
mov eax,1
; call kernel
int 0x80
List
Linux
X86 System call tables:
Signature and function definition:
wiki/Unistd.h - list the system call but the id number is not the same that in the call tables.
- Code:
- Generic architecture: https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/unistd.h
Doc:
Doc Linux :