urt: crti: Exit instead of an infinite loop
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -6,10 +6,16 @@
|
||||
* Author: Chloe M.
|
||||
*/
|
||||
|
||||
#include <ptapi/syscall.h>
|
||||
|
||||
.text
|
||||
.globl _start
|
||||
_start:
|
||||
xor %rbp, %rbp /* Terminate callstack */
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user