sys_read/open/close
This commit is contained in:
+6
-2
@@ -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 | | |
|
||||
Reference in New Issue
Block a user