cii.s 354 B

123456789101112131415161718192021222324252627282930313233
  1. .define .cii
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. .sect .text
  8. !r3 will save return addres
  9. .cii:
  10. movd tos, r3
  11. cmpqd 4, tos
  12. bne 3f
  13. movd tos, r0
  14. cmpqd 1, r0
  15. beq 1f
  16. cmpqd 2, r0
  17. beq 2f
  18. cmpqd 4, r0
  19. beq 4f
  20. 3:
  21. movd EILLINS, tos
  22. jsr @.trp
  23. 4:
  24. movd r3, tos
  25. ret 0
  26. 1:
  27. movxbd 0(sp), 0(sp)
  28. br 4b
  29. 2:
  30. movxwd 0(sp), 0(sp)
  31. br 4b