Files
PluralTechnology/service/urt/arch/amd64/crt/crti.S
T
2026-07-15 21:21:18 +00:00

22 lines
520 B
ArmAsm

/*
* Copyright (c) 2026, Chloe M.
* Provided under the BSD-3 clause.
*
* Description: C-runtime entry
* Author: Chloe M.
*/
#include <ptapi/syscall.h>
.text
.globl _start
_start:
xor %rbp, %rbp /* Terminate callstack */
call Main /* Enter program main */
push %rax /* Push the status code */
mov $SYS_EXIT, %rax /* Prepare the exit */
pop %rdi /* Pop the status code */
int $0x2E /* To the reaper queue we go */
ud2