urt: crti: Exit instead of an infinite loop

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
2026-07-15 21:21:18 +00:00
parent d4390c6a1b
commit 49c657154f
+8 -2
View File
@@ -6,10 +6,16 @@
* Author: Chloe M. * Author: Chloe M.
*/ */
#include <ptapi/syscall.h>
.text .text
.globl _start .globl _start
_start: _start:
xor %rbp, %rbp /* Terminate callstack */ xor %rbp, %rbp /* Terminate callstack */
call Main /* Enter program main */ call Main /* Enter program main */
1: pause
jmp 1b 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