A toy operating system written in C.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
freywaros/src/user/syscall.asm

61 lines
587 B

bits 64
global read
read:
mov rax, 0
syscall
ret
global write
write:
mov rax, 1
syscall
ret
global getcwd
getcwd:
mov rax, 2
syscall
ret
global chdir
chdir:
mov rax, 3
syscall
ret
global spawn
spawn:
mov rax, 4
syscall
ret
global waitpid
waitpid:
mov rax, 5
syscall
ret
global open
open:
mov rax, 6
syscall
ret
global close
close:
mov rax, 7
syscall
ret
global truncate
truncate:
mov rax, 8
syscall
ret
global exit
exit:
mov rax, 60
syscall
; never returns