2023-05-29 00:32:54 -07:00
|
|
|
.text
|
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
call main
|
|
|
|
call _exit
|
|
|
|
|
|
|
|
_exit:
|
2023-06-07 00:04:53 -07:00
|
|
|
// EXIT syscall.
|
2023-05-29 00:32:54 -07:00
|
|
|
mov $1, %rdi
|
2023-06-20 13:43:12 -07:00
|
|
|
// Return code as a "struct" on the stack.
|
|
|
|
push %rax
|
|
|
|
mov %rsp, %rsi
|
2023-05-29 00:32:54 -07:00
|
|
|
syscall
|