sys_read/open/close

This commit is contained in:
2026-05-06 13:29:35 +02:00
parent 63e9a761a3
commit c061da4d81
8 changed files with 94 additions and 37 deletions
+6 -2
View File
@@ -41,8 +41,12 @@ The recommended hardware to run PepperOS is the following:
## III. Syscall table
The syscall interface in the Pepper kernel uses the System V ABI convention for argument order.
It vaguely mimics Unix-like systems.
Name | Number (%rax) | arg0 (%rdi) | arg1 (%rsi) | arg2 (%rdx) |
|---|---|---|---|---|
| sys_write | 1 | unsigned int fd | const char* buf | size_t count | |
| sys_exit | 60 | int error_code | | | |
| sys_read | 0 | unsigned int fd | char* buf | size_t count |
| sys_write | 1 | unsigned int fd | const char* buf | size_t count |
| sys_open | 2 | const char* filename | int flags | |
| sys_close | 3 | unsigned int fd | | |
| sys_exit | 60 | int error_code | | |