[zion] POC for defining syscalls using macros

This commit is contained in:
Drew Galbraith 2023-06-20 13:43:12 -07:00
parent 4fef54084f
commit 5fc7296b20
5 changed files with 36 additions and 32 deletions

View file

@ -8,6 +8,7 @@ _start:
_exit:
// EXIT syscall.
mov $1, %rdi
// Return code as a param.
mov %rax, %rsi
// Return code as a "struct" on the stack.
push %rax
mov %rsp, %rsi
syscall