Added getpid system call

This commit is contained in:
Justin C. Miller
2019-02-07 17:52:57 -08:00
parent 8c32471e0d
commit 8e85ae5318
4 changed files with 36 additions and 17 deletions

View File

@@ -1,11 +1,19 @@
global _start
_start:
xor rbp, rbp ; Sentinel rbp
mov rax, 5 ; GETPID syscall
int 0xee
mov r12, rax ; save pid to r12
mov rax, 1 ; DEBUG syscall
int 0xee
mov r11, 0 ; counter
mov rbx, 20 ; sleep timeout
.loop:
mov rax, 1 ; DEBUG syscall
mov rax, 2 ; MESSAGE syscall
;mov rax, 0 ; NOOP syscall
;syscall
int 0xee