16 lines
278 B
NASM
16 lines
278 B
NASM
%include "src/constants.asm"
|
|
|
|
section .text
|
|
global exit
|
|
|
|
;----- exit(exit_code) -----;
|
|
; Exits the program with given exit code
|
|
; Return value: N/A
|
|
; Used registers:
|
|
; rax* syscall
|
|
; rdi (arg) code to exit the program with
|
|
exit:
|
|
sub rsp, SIZE_QWORD
|
|
mov rax, NR_exit
|
|
syscall
|