~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/emx/prt1.as

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

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