Subversion Repositories Kolibri OS

Rev

Rev 4973 | Go to most recent revision | Details | Compare with Previous | 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
5098 clevermous 10
EXTRN ___memsize
4973 right-hear 11
start:
12
public ___menuet__app_header
13
public ___menuet__memsize
14
section '.A' code readable executable
15
___menuet__app_header:
16
 db 'MENUET01'
17
 dd 0x01
18
if CATCH_NULL_CALL
19
 dd do_start
20
else
21
 dd ___crt1_startup
22
end if
23
; dd _edata
24
 dd 0
25
___menuet__memsize:
5098 clevermous 26
 dd ___memsize
4973 right-hear 27
 dd app_stack
28
 dd ___menuet__app_param_area
29
 dd ___menuet__app_path_area
30
 
31
if CATCH_NULL_CALL
32
do_start:
33
	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
39
end if
40
 
41
if CATCH_NULL_CALL
42
EXTRN ___libc_null_call
43
 
44
_libc_null_call:
45
    push eax
46
    push ebx
47
    push ecx
48
    push edx
49
    push esi
50
    push edi
51
    push ebp
52
    call ___libc_null_call
53
    mov eax,-1
54
    int 0x40
55
end if
56
 
57
section '.bss' readable writeable
5098 clevermous 58
;rd 0x20000
59
rb 0x10000
4973 right-hear 60
app_stack: