Reorganized sys functions

This commit is contained in:
2025-02-06 13:46:37 +01:00
parent 170931cf5d
commit 9dcd43be46
15 changed files with 110 additions and 120 deletions

View File

@ -1,39 +0,0 @@
exit(status Int) {
syscall(0x2000001, status)
}
fork() -> Int {
return syscall(0x2000002)
}
read(fd Int, address Pointer, length Int) -> Int {
return syscall(0x2000003, fd, address, length)
}
write(fd Int, address Pointer, length Int) -> Int {
return syscall(0x2000004, fd, address, length)
}
open(file Pointer, flags Int, mode Int) -> Int {
return syscall(0x2000005, file, flags, mode)
}
close(fd Int) -> Int {
return syscall(0x2000006, fd)
}
mmap(address Int, length Int, protection Int, flags Int) -> Pointer {
return syscall(0x20000C5, address, length, protection, flags)
}
munmap(address Pointer, length Int) -> Int {
return syscall(0x2000049, address, length)
}
execve(path Pointer, argv Pointer, envp Pointer) -> Int {
return syscall(0x200003B, path, argv, envp)
}
waitid(type Int, id Int, info Pointer, options Int) -> Int {
return syscall(0x20000AD, type, id, info, options)
}