toaruos/loader/crtbegin.s

20 lines
430 B
ArmAsm
Raw Normal View History

2011-04-19 00:09:44 +04:00
; ToAruOS User CRT0
BITS 32
global _start
2011-04-19 00:09:44 +04:00
_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
2011-04-19 00:09:44 +04:00
mov eax, 0x0 ; sys_exit
int 0x7F ; syscall
_wait: ; wait until we've been deschuled
hlt
jmp _wait
2011-04-19 00:09:44 +04:00
; vim:syntax=nasm
; vim:noexpandtab
; vim:tabstop=4
; vim:shiftwidth=4