trp.s 700 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .define .trp.z
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! changed into output routine to print errornumber
  8. .trp.z:
  9. ! exx
  10. pop bc
  11. pop hl !error number
  12. push hl
  13. ld de,15
  14. sbc hl,de
  15. jp p,1f ! error no >= 16?
  16. pop hl
  17. push hl ! save error no on stack
  18. push bc
  19. push ix
  20. push hl ! test bit "error no" of ignmask
  21. ld hl,(ignmask)
  22. ex (sp),hl
  23. push hl
  24. ld hl,2
  25. call .inn
  26. pop hl
  27. pop ix
  28. pop bc
  29. ld a,h
  30. or l
  31. jr z,2f ! if bit <> 0 error
  32. 1:
  33. pop hl
  34. push iy
  35. push de
  36. ld iy,1f+6
  37. call outdec
  38. ld iy,13
  39. push iy
  40. ld iy,1f
  41. push iy
  42. ld iy,2
  43. push iy
  44. call WRITE
  45. pop iy
  46. pop iy
  47. pop iy
  48. pop de
  49. pop iy
  50. push de
  51. jp EXIT
  52. 2:
  53. pop hl
  54. push bc
  55. ! exx
  56. ret
  57. 1: .asciz 'error xxxxx\r\n'