prt1.as 637 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. / prt1.s (emx+fpk) -- Made from crt2.s,
  2. / Copyright (c) 1990-1996 by Eberhard Mattes.
  3. / Portions Copyright (c) 1997 by Dani‰l Mantione
  4. .globl __entry1
  5. .globl _environ
  6. .globl _envc
  7. .globl _argv
  8. .globl _argc
  9. .text
  10. __entry1:
  11. popl %esi
  12. xorl %ebp, %ebp
  13. leal (%esp), %edi
  14. movl %edi,_environ
  15. call L_ptr_tbl
  16. mov %ecx,_envc
  17. mov %edi,_argv
  18. call L_ptr_tbl
  19. mov %ecx,_argc
  20. jmp *%esi
  21. L_ptr_tbl:
  22. xorl %eax, %eax
  23. movl $-1, %ecx
  24. 1: incl %ecx
  25. scasl
  26. jne 1b
  27. ret
  28. .data
  29. .comm _environ, 4
  30. .comm _envc, 4
  31. .comm _argv, 4
  32. .comm _argc, 4