您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

47 行
807B

  1. ; irq-hook-skeleton.asm
  2. ; C64 IRQ hook skeleton. Educational template only.
  3. ; Installs handler at $C100 and changes border color briefly.
  4. ; Assemble/load with install at $C000. Run SYS 49152.
  5. * = $c000
  6. oldirq: .word 0
  7. install:
  8. sei
  9. lda $0314
  10. sta oldirq
  11. lda $0315
  12. sta oldirq+1
  13. lda #<irq
  14. sta $0314
  15. lda #>irq
  16. sta $0315
  17. cli
  18. rts
  19. restore:
  20. sei
  21. lda oldirq
  22. sta $0314
  23. lda oldirq+1
  24. sta $0315
  25. cli
  26. rts
  27. * = $c100
  28. irq:
  29. pha
  30. txa
  31. pha
  32. tya
  33. pha
  34. inc $d020 ; visible heartbeat; keep handler short
  35. pla
  36. tay
  37. pla
  38. tax
  39. pla
  40. jmp (oldirq) ; chain to original IRQ handler

Powered by TurnKey Linux.