Files
klibc/src/core.asm
2025-07-05 02:28:59 +02:00

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