Files
pepperOS/user/libc/crt0.S
T
2026-05-08 12:38:16 +02:00

18 lines
301 B
ArmAsm

bits 64
global _start
extern main
section .text
; Begin the program with main() function
_start:
call main
; Exit the program by exit() syscall
.exit:
mov rdi, rax ; put the value of "return X;" (rax) as arg1 (error_code)
mov rax, 60 ; sys_exit
int 0x80
.loop:
jmp .loop