Subversion Repositories Kolibri OS

Rev

Rev 1693 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1693 serge 1
 
2
3
 
4
5
 
6
__start:
7
           movl  $68, %eax
8
           movl  $12, %ebx
9
           lea  __size_of_stack_reserve__, %ecx
10
           addl  $4095, %ecx       #load stack size
11
           andl  $-4096, %ecx      #align to page granularity
12
           int   $0x40             #and allocate
13
           testl %eax, %eax
14
           jz    1f
15
16
 
17
           movl %eax, %fs:4
18
           movl %ecx, %fs:8        #save stack base - low limit
19
                                   #save stack top  - high limit
20
           movl %ecx, %esp         #reload stack
1906 serge 21
22
 
23
24
 
25
           movl %esp, %ebx
26
           movl $-1, %ecx
27
           int $0x40
28
29
 
30
           movl %eax, %fs:0        #save pid
31
32
 
33
           movl $32, %ecx
34
           xorl %eax, %eax
35
           notl %eax
36
37
 
38
           stosl
39
40
 
41
           jmp  ___crt_startup
42
1:
1693 serge 43
           int3                    #trap to debugger
44
45
 
46