rtt.s 388 B

1234567891011121314151617181920212223242526
  1. .define Rtt
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine performs the return from trap.
  8. Rtt:
  9. ldy #0
  10. jsr Ret ! restore old stackpointer and localbase
  11. jsr Pop ! remove trapnumber
  12. jsr Pop
  13. sta hol0+1
  14. stx hol0 ! restore linenumber
  15. jsr Pop
  16. sta hol0+5
  17. stx hol0+4 ! restore filename pointer
  18. lda #0
  19. ldx #RETURN
  20. jsr Sdi ! restore return area
  21. rts