mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
- Chenged Puts() syscall to Write() - Improved syscalls.h - added a new header in terminal/terminal.h - moved gfxMode into screen/gfxmode.h
27 lines
669 B
Plaintext
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
|
|
|