~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to rtl/win32/wdllprt0.as

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// DLL Startup code for WIN32 port of Free Pascal
2
 
// Written by P.Ozerski 16.10.1998
3
 
     .text
4
 
     .globl _mainCRTStartup
5
 
_mainCRTStartup:
6
 
     movb $1,U_SYSTEM_ISCONSOLE
7
 
     jmp .LDLL_Entry
8
 
     .globl _WinMainCRTStartup
9
 
_WinMainCRTStartup:
10
 
     movb $0,U_SYSTEM_ISCONSOLE
11
 
.LDLL_Entry:
12
 
     pushl    %ebp
13
 
     movl     %esp,%ebp
14
 
     pushl    %ebx
15
 
     pushl    %esi
16
 
     pushl    %edi
17
 
     movl     8(%ebp),%edi
18
 
     movl     %edi,U_SYSTEM_HINSTANCE
19
 
     movl     12(%ebp),%edi
20
 
     movl     %edi,U_SYSTEM_DLLREASON
21
 
     movl     16(%ebp),%edi
22
 
     movl     %edi,U_SYSTEM_DLLPARAM
23
 
     call     _FPC_DLL_Entry
24
 
     popl     %edi
25
 
     popl     %esi
26
 
     popl     %ebx
27
 
     popl     %ebp
28
 
     ret      $12
29
 
     
30
 
     .globl asm_exit
31
 
asm_exit:     
32
 
    pushl  %eax
33
 
        call   exitprocess
34
 
        
35
 
.text
36
 
.globl  exitprocess
37
 
exitprocess:
38
 
        jmp     *.L10
39
 
        .balign 4,144
40
 
        
41
 
.text
42
 
        .balign 4,144
43
 
 
44
 
.section .idata$2
45
 
        .rva    .L7
46
 
        .long   0,0
47
 
        .rva    .L6
48
 
        .rva    .L8
49
 
 
50
 
.section .idata$4
51
 
.L7:
52
 
        .rva    .L9
53
 
        .long   0
54
 
 
55
 
.section .idata$5
56
 
.L8:
57
 
        
58
 
 
59
 
.section .idata$5
60
 
.L10:
61
 
        .rva    .L9
62
 
        .long   0
63
 
 
64
 
.section .idata$6
65
 
.L9:
66
 
        .short  0
67
 
        .ascii  "ExitProcess\000"
68
 
        .balign 2,0
69
 
 
70
 
.section .idata$7
71
 
.L6:
72
 
        .ascii  "kernel32.dll\000"
73
 
     
74
 
     
75
 
//
76
 
// $Log: wdllprt0.as,v $
77
 
// Revision 1.4  2002/12/04 21:36:44  carl
78
 
//   * libraries would no longer compile because of my profiling fix
79
 
//
80
 
// Revision 1.3  2002/07/28 20:43:51  florian
81
 
//   * several fixes for linux/powerpc
82
 
//   * several fixes to MT
83
 
//
84
 
//
 
1
// DLL Startup code for WIN32 port of Free Pascal
 
2
// Written by P.Ozerski 16.10.1998
 
3
     .text
 
4
     .globl _mainCRTStartup
 
5
_mainCRTStartup:
 
6
     movb $1,U_SYSTEM_ISCONSOLE
 
7
     jmp .LDLL_Entry
 
8
     .globl _WinMainCRTStartup
 
9
_WinMainCRTStartup:
 
10
     movb $0,U_SYSTEM_ISCONSOLE
 
11
.LDLL_Entry:
 
12
     pushl    %ebp
 
13
     movl     %esp,%ebp
 
14
     pushl    %ebx
 
15
     pushl    %esi
 
16
     pushl    %edi
 
17
     movl     8(%ebp),%edi
 
18
     movl     %edi,SysInstance
 
19
     movl     12(%ebp),%edi
 
20
     movl     %edi,U_SYSTEM_DLLREASON
 
21
     movl     16(%ebp),%edi
 
22
     movl     %edi,U_SYSTEM_DLLPARAM
 
23
     movl     %esp,__stkptr
 
24
     call     _FPC_DLL_Entry
 
25
     popl     %edi
 
26
     popl     %esi
 
27
     popl     %ebx
 
28
     popl     %ebp
 
29
     ret      $12
 
30
 
 
31
     .globl asm_exit
 
32
asm_exit:
 
33
    pushl  %eax
 
34
        call   exitprocess
 
35
 
 
36
.text
 
37
.globl  exitprocess
 
38
exitprocess:
 
39
        jmp     *.L10
 
40
        .balign 4,144
 
41
 
 
42
.text
 
43
        .balign 4,144
 
44
 
 
45
.section .idata$2
 
46
        .rva    .L7
 
47
        .long   0,0
 
48
        .rva    .L6
 
49
        .rva    .L8
 
50
 
 
51
.section .idata$4
 
52
.L7:
 
53
        .rva    .L9
 
54
        .long   0
 
55
 
 
56
.section .idata$5
 
57
.L8:
 
58
 
 
59
 
 
60
.section .idata$5
 
61
.L10:
 
62
        .rva    .L9
 
63
        .long   0
 
64
 
 
65
.section .idata$6
 
66
.L9:
 
67
        .short  0
 
68
        .ascii  "ExitProcess\000"
 
69
        .balign 2,0
 
70
 
 
71
.section .idata$7
 
72
.L6:
 
73
        .ascii  "kernel32.dll\000"
 
74
 
 
75
.bss
 
76
    .comm   __stkptr,4