prt0.as 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #
  2. # $Id$
  3. # This file is part of the Free Pascal run time library.
  4. # Copyright (c) 1996-98 by Michael Van Canneyt
  5. # member of the Free Pascal development team.
  6. #
  7. # See the file COPYING.FPC, included in this distribution,
  8. # for details about the copyright.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY;without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. #**********************************************************************}
  15. #
  16. # Linux a.out startup code for Free Pascal
  17. #
  18. .file "prt0.as"
  19. .text
  20. .globl __entry
  21. __entry:
  22. movl 8(%esp),%eax /* Move the environment pointer */
  23. movl 4(%esp),%ebx /* Move the argument pointer */
  24. movl (%esp),%ecx /* Move the argument counter */
  25. movl %eax,U_SYSLINUX_ENVP
  26. movl %ebx,U_SYSLINUX_ARGV
  27. movl %ecx,U_SYSLINUX_ARGC
  28. call PASCALMAIN
  29. .globl _haltproc
  30. .type _haltproc,@function
  31. _haltproc:
  32. movl $1,%eax /* exit call */
  33. xorl %ebx,%ebx
  34. movw U_SYSLINUX_EXITCODE,%bx
  35. int $0x80
  36. jmp _haltproc
  37. .data
  38. .align 4
  39. .globl ___brk_addr
  40. .type ___brk_addr,@object
  41. .size ___brk_addr,4
  42. ___brk_addr:
  43. .long 0