Implement exit syscall

This commit is contained in:
Justin C. Miller
2019-03-14 22:28:21 -07:00
parent f7558e3d18
commit be007c6278
5 changed files with 27 additions and 2 deletions

View File

@@ -20,6 +20,9 @@ _start:
mov rax, 1 ; DEBUG syscall
syscall ; int 0xee
cmp r13, 0
je .doexit
cmp r12, 1
je .dosend
jne .doreceive
@@ -59,3 +62,7 @@ _start:
mov rdi, 1 ; source is pid 2
syscall ; int 0xee
jmp .preloop
.doexit
mov rax, 9 ; EXIT syscall
syscall