wdllprt0.as 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. call _FPC_DLL_Entry
  24. popl %edi
  25. popl %esi
  26. popl %ebx
  27. popl %ebp
  28. ret $12
  29. .globl asm_exit
  30. asm_exit:
  31. pushl %eax
  32. call exitprocess
  33. .text
  34. .globl exitprocess
  35. exitprocess:
  36. jmp *.L10
  37. .balign 4,144
  38. .text
  39. .balign 4,144
  40. .section .idata$2
  41. .rva .L7
  42. .long 0,0
  43. .rva .L6
  44. .rva .L8
  45. .section .idata$4
  46. .L7:
  47. .rva .L9
  48. .long 0
  49. .section .idata$5
  50. .L8:
  51. .section .idata$5
  52. .L10:
  53. .rva .L9
  54. .long 0
  55. .section .idata$6
  56. .L9:
  57. .short 0
  58. .ascii "ExitProcess\000"
  59. .balign 2,0
  60. .section .idata$7
  61. .L6:
  62. .ascii "kernel32.dll\000"
  63. //
  64. // Revision 1.4 2002/12/04 21:36:44 carl
  65. // * libraries would no longer compile because of my profiling fix
  66. //
  67. // Revision 1.3 2002/07/28 20:43:51 florian
  68. // * several fixes for linux/powerpc
  69. // * several fixes to MT
  70. //
  71. //