My Kernel v0.1.0
Collaboration diagram for Syscalls - x86:

x86 ABI

For convenience, our kernel's ABI is the same as Linux's:

Arguments

The arguments are passed in the following order:

‍eax, ebx, ecx, edx, esi, edi, ebp

The first argument (eax) is always the number of the syscall to call.

Return value

The return value is always stored inside the eax register.