head_m2.e 997 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. ;
  3. ; (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. ; See the copyright notice in the ACK home directory, in the file "Copyright".
  5. ;
  6. ;
  7. ; Module: Modula-2 runtime startoff
  8. ; Author: Ceriel J.H. Jacobs
  9. ; Version: $Header$
  10. ;
  11. mes 2,EM_WSIZE,EM_PSIZE
  12. exa handler
  13. exa environ
  14. exa argv
  15. exa argc
  16. exa MainLB
  17. exa bkillbss
  18. exp $catch
  19. exp $init
  20. inp $trap_handler
  21. bkillbss
  22. bss EM_PSIZE,0,0
  23. exp $_m_a_i_n
  24. pro $_m_a_i_n, 0
  25. lor 0
  26. lae MainLB
  27. sti EM_PSIZE
  28. lal EM_WSIZE+EM_PSIZE
  29. loi EM_PSIZE
  30. lae environ ; save environment pointer
  31. sti EM_PSIZE
  32. lal EM_WSIZE
  33. loi EM_PSIZE
  34. lae argv ; save argument pointer
  35. sti EM_PSIZE
  36. lol 0
  37. ste argc ; save argument count
  38. lpi $trap_handler
  39. sig
  40. asp EM_PSIZE
  41. cal $init
  42. cal $__M2M_
  43. cal $halt
  44. loc 0 ; should not get here
  45. ret EM_WSIZE
  46. end
  47. pro $trap_handler,0
  48. lpi $trap_handler
  49. sig
  50. lol 0 ; trap number
  51. lae handler
  52. loi EM_PSIZE
  53. lpi $catch
  54. lae handler
  55. sti EM_PSIZE
  56. cai
  57. asp EM_PSIZE+EM_WSIZE
  58. rtt
  59. end 0