fix dependency check logic cause config always disabled
[lunaix-os.git] / lunaix-os / usr / libc / arch / i386 / crt0.S
1 #define __ASM__
2 #include <lunaix/syscallid.h>
3
4 .section .data
5     .global environ
6     environ:
7         .long 0
8
9 .section .text
10     .global _start
11     _start:      
12         xorl %ebp, %ebp
13         movl %esp, %eax
14         andl $-16, %esp
15         
16         leal 4(%eax), %ebx
17         pushl %ebx
18         pushl (%eax)
19
20         fninit
21
22         xorl %eax, %eax
23         call main
24         
25     1:
26         movl %eax, %ebx
27         movl $__NR__lxsys_exit, %eax
28         int $33
29
30         ud2 // should not reach