head_em.s 848 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #include "em_abs.h"
  2. #include "syscall.h"
  3. ! $Id$
  4. .sect .text; .sect .rom; .sect .data; .sect .bss
  5. .sect .text
  6. .define hol0
  7. .define .reghp
  8. .define .limhp
  9. .define .trppc
  10. .define .trpim
  11. .define EXIT,WRITE,BRK
  12. ! run time startoff
  13. .data2 0
  14. bispsw $0100 ! set FU(0100)
  15. movl 4(sp),r0
  16. clrl -4(r0)
  17. movl sp,r0
  18. movl (r0)+,r1
  19. movl r0,r2
  20. 1:
  21. tstl (r0)+
  22. bneq 1b
  23. cmpl r0,(r2)
  24. blssu 2f
  25. tstl -(r0)
  26. 2:
  27. pushl r0
  28. pushl r2
  29. pushl r1
  30. calls $3,__m_a_i_n
  31. EXIT:
  32. movl $Im2,ap
  33. movl r0,6(ap)
  34. chmk (ap)+
  35. halt
  36. DEFINE(WRITE)
  37. chmk $SYS_write
  38. bcs 1f
  39. ret
  40. 1:
  41. jmp cerror
  42. DEFINE(BRK)
  43. cmpl 4(ap),$endbss
  44. bgeq 1f
  45. movl $endbss,4(ap)
  46. 1:
  47. chmk $17
  48. bcs 1f
  49. movl 4(ap),.limhp
  50. clrl r0
  51. ret
  52. 1:
  53. jmp cerror
  54. .sect .data
  55. Im2:
  56. .data2 1
  57. .data4 1
  58. .data4 0
  59. .data2 0
  60. .reghp:
  61. .data4 __end
  62. .limhp:
  63. .data4 __end
  64. hol0:
  65. .space 8
  66. .trppc:
  67. .space 4
  68. .trpim:
  69. .data4 0