First pass at message syscalls

This commit is contained in:
Justin C. Miller
2019-02-07 18:19:22 -08:00
parent 8e85ae5318
commit aca442ee87
5 changed files with 141 additions and 8 deletions

View File

@@ -9,6 +9,11 @@ _start:
mov rax, 1 ; DEBUG syscall
int 0xee
cmp r12, 1
je .dosend
jne .doreceive
.preloop:
mov r11, 0 ; counter
mov rbx, 20 ; sleep timeout
@@ -31,3 +36,15 @@ _start:
mov r11, 0
jmp .loop
.dosend:
mov rax, 6 ; SEND syscall
mov rdi, 2 ; target is pid 2
int 0xee
jmp .preloop
.doreceive:
mov rax, 7 ; RECEIVE syscall
mov rdi, 1 ; source is pid 2
int 0xee
jmp .preloop