1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/ prt1.s (emx+fpk) -- Made from crt2.s and dos.s,
/ Copyright (c) 1990-1999-2000 by Eberhard Mattes.
/ Changed for Free Pascal in 1997 Daniel Mantione.
/ This code is _not_ under the Library GNU Public
/ License, because the original is not. See copying.emx
/ for details. You should have received it with this
/ product, write the author if you haven't.
.globl __entry1
.globl _environ
.globl _envc
.globl _argv
.globl _argc
.text
__entry1:
popl %esi
cld
xorl %ebp, %ebp
leal (%esp), %edi /* argv[] */
movl %edi,_environ
call L_ptr_tbl
movl %ecx,_envc
movl %edi,_argv
call L_ptr_tbl
movl %ecx,_argc
jmp *%esi
L_ptr_tbl:
xorl %eax, %eax
movl $-1, %ecx
1: incl %ecx
scasl
jne 1b
ret
/ In executables created with emxbind, the call to _dos_init will
/ be fixed up at load time to _emx_init of emx.dll. Under DOS,
/ this dummy is called instead as there is no fixup. This module
/ must be linked statically to avoid having two fixups for the
/ same location.
.globl __dos_init
.globl __dos_syscall
__dos_init:
ret $4
.align 2, 0x90
__dos_syscall:
int $0x21
ret
.data
.comm _environ, 4
.comm _envc, 4
.comm _argv, 4
.comm _argc, 4
|