toaruos/loader/crtbegin.s
2011-04-18 15:09:44 -05:00

20 lines
430 B
ArmAsm

; ToAruOS User CRT0
BITS 32
global _start
_start: ; Global entry point
pop eax ; Our stack is slightly off
extern main ;
call main ; call C main function
mov ebx, eax ; return value from main
mov eax, 0x0 ; sys_exit
int 0x7F ; syscall
_wait: ; wait until we've been deschuled
hlt
jmp _wait
; vim:syntax=nasm
; vim:noexpandtab
; vim:tabstop=4
; vim:shiftwidth=4