syscalls needed for doom (tell/eof/draw_fb) + minor fixes, compiler shut up etc
This commit is contained in:
+1
-9
@@ -41,12 +41,4 @@ 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_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 | | |
|
||||
It vaguely mimics Unix-like systems. You will find it in [SYSCALLS.md](SYSCALLS.md).
|
||||
@@ -19,6 +19,8 @@ Of course, all of the freestanding headers are available:
|
||||
|
||||
Also available is the `<syscall.h>` header that gives access to low-level system call interface, notably the `syscallX` function family, X being the amount of arguments to use.
|
||||
|
||||
(TODO: put the other headers here once libc is more complete)
|
||||
|
||||
## 1. Write the source code
|
||||
|
||||
PepperOS is able to run programs written in x86 assembly, and C programs.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Pepper kernel system call table
|
||||
|
||||
The following table contains all of the system calls supported by PepperOS, as well as their arguments. The explanation for what every system call does is available as a comment above each function in corresponding files in the `src/syscall` folder.
|
||||
|
||||
Name | Number (%rax) | arg0 (%rdi) | arg1 (%rsi) | arg2 (%rdx) |
|
||||
|---|---|---|---|---|
|
||||
| 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