123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- / 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
- xorl %ebp, %ebp
- leal (%esp), %edi
- movl %edi,_environ
- call L_ptr_tbl
- mov %ecx,_envc
- mov %edi,_argv
- call L_ptr_tbl
- mov %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
|