head_cc.e 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #
  2. #include "em_abs.h"
  3. /*
  4. * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
  5. *
  6. * This product is part of the Amsterdam Compiler Kit.
  7. *
  8. * Permission to use, sell, duplicate or disclose this software must be
  9. * obtained in writing. Requests for such permissions may be sent to
  10. *
  11. * Dr. Andrew S. Tanenbaum
  12. * Wiskundig Seminarium
  13. * Vrije Universiteit
  14. * Postbox 7161
  15. * 1007 MC Amsterdam
  16. * The Netherlands
  17. *
  18. */
  19. /* Author: E.G. Keizer */
  20. mes 2,EM_WSIZE,EM_PSIZE
  21. exa environ
  22. exa _penvp
  23. environ
  24. bss EM_PSIZE,0,0
  25. _penvp
  26. bss EM_PSIZE,0,0
  27. exp $_m_a_i_n
  28. pro $_m_a_i_n,0
  29. #if EM_WSIZE==1
  30. ldc 1336 ; EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
  31. #else
  32. loc 1336
  33. #endif
  34. sim ; ignored
  35. lal EM_WSIZE+EM_PSIZE
  36. loi EM_PSIZE
  37. lae environ
  38. sti EM_PSIZE
  39. lae environ
  40. loi EM_PSIZE
  41. lae _penvp
  42. sti EM_PSIZE
  43. #if __unix && ! (__em22 || __em24 || __em44)
  44. lpi $_ctch_
  45. sig
  46. asp EM_PSIZE
  47. #endif
  48. lal EM_WSIZE+EM_PSIZE
  49. loi EM_PSIZE
  50. lal EM_WSIZE
  51. loi EM_PSIZE
  52. lal 0
  53. loi EM_WSIZE
  54. cal $main
  55. asp EM_WSIZE+EM_PSIZE+EM_PSIZE
  56. lfr EM_WSIZE
  57. cal $exit
  58. end
  59. #if __unix && ! (__em22 || __em24 || __em44)
  60. exp $_ctch_
  61. pro $_ctch_,0
  62. lol 0
  63. loc EIDIVZ
  64. beq *1
  65. lol 0
  66. loc EFDIVZ
  67. beq *1
  68. lol 0
  69. trp
  70. bra *3
  71. 1
  72. loc 8
  73. cal $getpid
  74. lfr EM_WSIZE
  75. cal $kill
  76. asp 2*EM_WSIZE
  77. 3
  78. lpi $_ctch_
  79. sig
  80. asp EM_PSIZE
  81. rtt
  82. end 0
  83. #endif