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
This commit is contained in:
2024-05-27 15:16:07 +02:00
parent eac71f137e
commit 536f6b2320
11 changed files with 285 additions and 111 deletions
+17 -2
View File
@@ -2,10 +2,25 @@
Syscall handlers are prefixed by 'sys_'
Syscalls can be called using interrupt 0x80
The EAX register should countain a syscall number
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()
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