Files
kern/docs/syscalls.txt
T
Tom-on 536f6b2320 Began work on proper terminal I/O
- Chenged Puts() syscall to Write()
- Improved syscalls.h
- added a new header in terminal/terminal.h
- moved gfxMode into screen/gfxmode.h
2024-05-27 15:16:07 +02:00

27 lines
669 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
Here's a list of syscalls: (and their numbers)
Syscall(0) : Sleep()
Args: EBX - Number of miliseconds to sleep for
Syscall(1) : Write()
Args: EBX - File descriptor
ECX - Buffer to write
EDX - Length
Returns: Status
Syscall(2) : Read() #TBD
Syscall(3) : Malloc()
Args: EBX - Amount of bytes to malloc
Returns: Address of allocated memory
Syscall(4) : Free()
Args: EBX - Pointer to free