wcygprt0.as 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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,operatingsystem_isconsole
  8. jmp _start
  9. .globl _WinMainCRTStartup
  10. _WinMainCRTStartup:
  11. movb $0,operatingsystem_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. movl %esp,__stkptr
  23. call _FPC_EXE_Entry
  24. ret
  25. .globl asm_exit
  26. asm_exit:
  27. pushl %eax
  28. call exitprocess
  29. .text
  30. .globl exitprocess
  31. exitprocess:
  32. jmp *.L10
  33. .balign 4,144
  34. .text
  35. .balign 4,144
  36. .section .idata$2
  37. .rva .L7
  38. .long 0,0
  39. .rva .L6
  40. .rva .L8
  41. .section .idata$4
  42. .L7:
  43. .rva .L9
  44. .long 0
  45. .section .idata$5
  46. .L8:
  47. .section .idata$5
  48. .L10:
  49. .rva .L9
  50. .long 0
  51. .section .idata$6
  52. .L9:
  53. .short 0
  54. .ascii "ExitProcess\000"
  55. .balign 2,0
  56. .section .idata$7
  57. .L6:
  58. .ascii "kernel32.dll\000"
  59. .bss
  60. .comm __stkptr,4