Changes

Jump to: navigation, search

Syscalls

195 bytes added, 09:26, 26 September 2014
Syscall Mechanism
* The syscall number is placed in eax.
* Arguments Integer and pointer arguments are placed in edi, esi, edx, ecx with spill over to the stack(refer to ABI documentation).
* Return value is in eax.
* The syscall is invoked with <code>int 0x80</code>
* The syscall number is placed in rax.
* Arguments Integer and pointer arguments are placed in rdi, rsi, rdx, rcx, r8d, r9d with spill over to the stack(refer to ABI documentation).
* Return value is in rax.
* The syscall is invoked with <code>syscall</code>
* The syscall number is placed in r8.
* Arguments Integer and pointer arguments are placed in r0-r7with spill over to the stack (refer to Procedure Call and ABI documentation).
* Return value is in r0.
* The syscall is invoked with <code>svc 0</code>

Navigation menu