Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | CATCH_NULL_CALL = 0 |
2 | |||
3 | format MS COFF |
||
4 | section '.text' code readable executable |
||
5 | public start |
||
6 | ;EXTRN _edata |
||
7 | EXTRN ___menuet__app_param_area |
||
8 | EXTRN ___menuet__app_path_area |
||
9 | EXTRN ___crt1_startup |
||
10 | start: |
||
11 | public ___menuet__app_header |
||
12 | public ___menuet__memsize |
||
13 | section '.A' code readable executable |
||
14 | ___menuet__app_header: |
||
15 | db 'MENUET01' |
||
16 | dd 0x01 |
||
17 | if CATCH_NULL_CALL |
||
18 | dd do_start |
||
19 | else |
||
20 | dd ___crt1_startup |
||
21 | end if |
||
22 | ; dd _edata |
||
23 | dd 0 |
||
24 | ___menuet__memsize: |
||
25 | dd 0x400000 |
||
26 | dd app_stack |
||
27 | dd ___menuet__app_param_area |
||
28 | dd ___menuet__app_path_area |
||
29 | |||
30 | if CATCH_NULL_CALL |
||
31 | do_start: |
||
32 | mov byte [0], 0xE9 |
||
33 | mov dword [1], _libc_null_call-5 |
||
34 | call ___crt1_startup |
||
35 | ; Handle exit if __crt1_startup returns (shouldn't happen) |
||
36 | mov eax,-1 |
||
37 | int 0x40 |
||
38 | end if |
||
39 | |||
40 | if CATCH_NULL_CALL |
||
41 | EXTRN ___libc_null_call |
||
42 | |||
43 | _libc_null_call: |
||
44 | push eax |
||
45 | push ebx |
||
46 | push ecx |
||
47 | push edx |
||
48 | push esi |
||
49 | push edi |
||
50 | push ebp |
||
51 | call ___libc_null_call |
||
52 | mov eax,-1 |
||
53 | int 0x40 |
||
54 | end if |
||
55 | |||
56 | section '.bss' readable writeable |
||
57 | rd 0x20000 |
||
58 | app_stack: |