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

37 lines
355 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 exit
exit:
mov rax, 60
syscall
; never returns