This repository has been archived on 2023-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
homepage/content/projects/noxos/docs/sysabi.md

2.9 KiB

title summary date
Sysabi The noxos `Application Binary Interface`. 2023-03-14T21:00:40+01:00

Syscalls

Syscalls are a way for programms to communicate with the kernel.

To perform a syscall, you need to populate the following registers:

Register Value
rax The syscalls ID
rdi Argument 1
rsi Argument 2
rbx Argument 3
rcx Argument 4

The following calls should be included to some degree in NoxOS 1.0.

Categories

Files

ID Name Description Arg1 Arg2 Arg3 Arg4 Result Status
0x0101 nx_fopen path len fd N/A
0x0102 nx_fclose fd success N/A
0x0103 nx_fread fd offset mem n num_bytes N/A
0x0104 nx_fwrite fd offset mem n num_bytes N/A
0x0105 nx_fdelete fd success N/A
0x0106 nx_flist fd mem needed_mem N/A
0x0107 nx_finfo fd attr mem len N/A

Memory

Category ID Name Description Arg1 Arg2 Arg3 Arg4 Result Status

Processes

Category ID Name Description Arg1 Arg2 Arg3 Arg4 Result Status

Runtime / Dynamic Linker

Category ID Name Description Arg1 Arg2 Arg3 Arg4 Result Status

Compatibility & Safety

Category ID Name Description Arg1 Arg2 Arg3 Arg4 Result Status

Kernel

The kernel syscalls can only be called from the kernels main process [link to processing article needed]. If another process calls them, they will just return without doing anything.

Category ID Name Description Arg1 Arg2 Arg3 Arg4 Result Status