implemented BRK handling routine (not yet connected to IRQ)

This commit is contained in:
FeralChild64 committed 2019-08-06 20:54:27 +02:00
1 parent 44ca73be40
commit 03bc8b8e78
17 files changed
+51 -29

No files matched your search

+7 -5
View File
@@ -1,3 +1,4 @@
irq_handler:
;; The IRQ is a commonly messed with thing on the C64,
;; so we need to handle entry points that are commonly
@@ -7,17 +8,18 @@ irq_handler:
;; $EA81 - https://www.lemon64.com/forum/viewtopic.php?t=2112&sid=6ea01982b26da69783120a7923ca46fb
;; Also the $0314 vector is widely used (e.g., https://www.lemon64.com/forum/viewtopic.php?t=2112&sid=6ea01982b26da69783120a7923ca46fb)
;; Save registers
;; Sequence according to Compute's Mapping the 64 p73
;; Save registers, sequence according to Compute's Mapping the Commodore 64, page 73
pha
txa
pha
tya
pha
;; Call interrupt routine
;; (but only if initialised)
;; Call interrupt routine (only if initialised)
lda CINV
ora CINV+1
beq default_irq_handler
bne +
jmp (CINV)
*
;; Vector not initialized - call default interrupt routine
jmp default_irq_handler