Files
kern/docs/syscalls.txt
T

20 lines
988 B
Plaintext

=== System Calls ===
Syscall handlers are prefixed by 'sys_'
Syscalls can be called using interrupt 0x80
The EAX register should countain a syscall number on calling and it will contain a return value (if applicable) after calling
--- Syscall Table ---
| NR | SYSC NAME | RETURN (EAX) | ARG0 (EBX) | ARG1 (ECX) | ARG2 (EDX) |
| 00 | reserved | - | - | - | - |
| 01 | sleep | - | uint ms | - | - |
| 02 | read | int count | int fd | char* buf | uint count |
| 03 | write | int count | int fd | char* buf | uint count |
| 04 | open | int fd | char* path | int oflag | - |
| 05 | close | int status | int fd | - | - |
| 06 | malloc | void* buf | int count | - | - |
| 07 | free | - | void* buf | - | - |
| 08 | seek | #TBD | | | |