wcygprt0.as 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //Startup code for WIN32 port of Free Pascal
  2. //Written by P.Ozerski 1998
  3. // modified by Pierre Muller
  4. .text
  5. .globl _mainCRTStartup
  6. _mainCRTStartup:
  7. movb $1,U_SYSTEM_ISCONSOLE
  8. jmp _start
  9. .globl _WinMainCRTStartup
  10. _WinMainCRTStartup:
  11. movb $0,U_SYSTEM_ISCONSOLE
  12. _start:
  13. subl $0x8,%esp
  14. andl $0xfffffff0,%esp
  15. push $_cmain
  16. call _cygwin_crt0
  17. .globl _cmain
  18. _cmain:
  19. subl $0x8,%esp
  20. andl $0xfffffff0,%esp
  21. call ___main
  22. call _FPC_EXE_Entry
  23. ret
  24. .globl asm_exit
  25. asm_exit:
  26. pushl %eax
  27. call exitprocess
  28. .text
  29. .globl exitprocess
  30. exitprocess:
  31. jmp *.L10
  32. .balign 4,144
  33. .text
  34. .balign 4,144
  35. .section .idata$2
  36. .rva .L7
  37. .long 0,0
  38. .rva .L6
  39. .rva .L8
  40. .section .idata$4
  41. .L7:
  42. .rva .L9
  43. .long 0
  44. .section .idata$5
  45. .L8:
  46. .section .idata$5
  47. .L10:
  48. .rva .L9
  49. .long 0
  50. .section .idata$6
  51. .L9:
  52. .short 0
  53. .ascii "ExitProcess\000"
  54. .balign 2,0
  55. .section .idata$7
  56. .L6:
  57. .ascii "kernel32.dll\000"
  58. // $Log$
  59. // Revision 1.1 2004-11-04 17:15:01 peter
  60. // * wcygprt is now used for cygwin (libc) linking, initc contains only cerrno
  61. //
  62. // Revision 1.4 2002/11/30 18:17:35 carl
  63. // + profiling support
  64. //
  65. // Revision 1.3 2002/07/28 20:43:51 florian
  66. // * several fixes for linux/powerpc
  67. // * several fixes to MT
  68. //
  69. //