The k project

Syscalls

Description

System calls provide a way to execute kernel routines from userland, so they can get ressources like memory, I/O accesses… Their implementation always consists in two parts:

A unique syscall gate, 0x80, is used for all the syscalls. The dispatch is done in the kernel through a table depending on a identifier. The syscall identifier is passed as a parameter. The parameter passing method is Linux-like (registers).

Syscalls parameters are given in %ebx through %edx, %eax is the syscall number.

Notes

Syscall ids are defined in include/k/kstd.h. You must follow those values!