adapted to Kick Assembler, some documentation update
This commit is contained in:
1 parent
ae23dbae7b
commit
de27124b4f
198 files changed
+4181
-3976
No files matched your search
@@ -1,38 +1,38 @@
|
||||
|
||||
irq_handler:
|
||||
;; The IRQ is a commonly messed with thing on the C64,
|
||||
;; so we need to handle entry points that are commonly
|
||||
;; relied upon, including:
|
||||
;; $EA31 - Standard IRQ routine
|
||||
;; $EA61 - Check keyboard, but don't update timer? https://github.com/cc65/cc65/issues/324
|
||||
;; $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)
|
||||
// The IRQ is a commonly messed with thing on the C64,
|
||||
// so we need to handle entry points that are commonly
|
||||
// relied upon, including:
|
||||
// $EA31 - Standard IRQ routine
|
||||
// $EA61 - Check keyboard, but don't update timer? https://github.com/cc65/cc65/issues/324
|
||||
// $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 Commodore 64, page 73
|
||||
// Save registers, sequence according to Compute's Mapping the Commodore 64, page 73
|
||||
pha
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
|
||||
;; Check if caused by BRK
|
||||
// Check if caused by BRK
|
||||
tsx
|
||||
lda $0104, x ; get the pre-interrupt processor state
|
||||
lda $0104, x // get the pre-interrupt processor state
|
||||
and #$10
|
||||
bne irq_handler_brk
|
||||
|
||||
;; Not caused by BRK - call interrupt routine (only if initialised)
|
||||
// Not caused by BRK - call interrupt routine (only if initialised)
|
||||
lda CINV
|
||||
ora CINV+1
|
||||
beq +
|
||||
beq !+
|
||||
jmp (CINV)
|
||||
*
|
||||
;; Vector not initialized - call default interrupt routine
|
||||
!:
|
||||
// Vector not initialized - call default interrupt routine
|
||||
jmp default_irq_handler
|
||||
|
||||
irq_handler_brk:
|
||||
|
||||
;; Store BRK adddress, to be displayed
|
||||
// Store BRK adddress, to be displayed
|
||||
sec
|
||||
lda $0105, x
|
||||
sbc #$02
|
||||
@@ -41,6 +41,6 @@ irq_handler_brk:
|
||||
sbc #$00
|
||||
sta CMP0+1
|
||||
|
||||
;; Interrupt caused by BRK
|
||||
// Interrupt caused by BRK
|
||||
jmp (CBINV)
|
||||
|
||||
Reference in new issue
Block a user