Rev 5098 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5098 | Rev 5131 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | public ___menuet__memsize |
13 | public ___menuet__memsize |
14 | section '.A' code readable executable |
14 | section '.A' code readable executable |
15 | ___menuet__app_header: |
15 | ___menuet__app_header: |
16 | db 'MENUET01' |
16 | db 'MENUET01' |
17 | dd 0x01 |
17 | dd 0x01 |
18 | if CATCH_NULL_CALL |
- | |
19 | dd do_start |
18 | dd do_start |
20 | else |
- | |
21 | dd ___crt1_startup |
- | |
22 | end if |
- | |
23 | ; dd _edata |
19 | ; dd _edata |
24 | dd 0 |
20 | dd 0 |
25 | ___menuet__memsize: |
21 | ___menuet__memsize: |
26 | dd ___memsize |
22 | dd ___memsize |
27 | dd app_stack |
23 | dd app_stack |
28 | dd ___menuet__app_param_area |
24 | dd ___menuet__app_param_area |
29 | dd ___menuet__app_path_area |
25 | dd ___menuet__app_path_area |
Line 30... | Line -... | ||
30 | - | ||
31 | if CATCH_NULL_CALL |
26 | |
- | 27 | do_start: |
|
- | 28 | push 68 |
|
- | 29 | pop eax |
|
- | 30 | push 11 |
|
- | 31 | pop ebx |
|
- | 32 | push eax |
|
- | 33 | int 0x40 |
|
- | 34 | pop eax |
|
- | 35 | inc ebx |
|
- | 36 | mov ecx, 0x100000 |
|
- | 37 | int 0x40 |
|
- | 38 | lea esp, [eax+ecx] |
|
32 | do_start: |
39 | if CATCH_NULL_CALL |
33 | mov byte [0], 0xE9 |
40 | mov byte [0], 0xE9 |
34 | mov dword [1], _libc_null_call-5 |
- | |
35 | call ___crt1_startup |
- | |
36 | ; Handle exit if __crt1_startup returns (shouldn't happen) |
- | |
37 | mov eax,-1 |
- | |
38 | int 0x40 |
41 | mov dword [1], _libc_null_call-5 |
- | 42 | end if |
|
Line 39... | Line 43... | ||
39 | end if |
43 | jmp ___crt1_startup |
40 | 44 | ||
Line 41... | Line 45... | ||
41 | if CATCH_NULL_CALL |
45 | if CATCH_NULL_CALL |
Line 53... | Line 57... | ||
53 | mov eax,-1 |
57 | mov eax,-1 |
54 | int 0x40 |
58 | int 0x40 |
55 | end if |
59 | end if |
Line 56... | Line 60... | ||
56 | 60 | ||
57 | section '.bss' readable writeable |
- | |
58 | ;rd 0x20000 |
61 | section '.bss' readable writeable |
59 | rb 0x10000 |
62 | rb 0x100 |