4 ms·
You can chain handlers by simply rewriting the interrupt vector. Something like this (for a sequence of two handlers): handler1 ; ... lda #
by boomlinde 8mo ago
You can chain handlers by simply rewriting the interrupt vector. Something like this (for a sequence of two handlers):
handler1
; ...
lda #<handler2
sta $fffe
lda #>handler2
sta $ffff
lda #line2
sta $d012
rti
handler2
; ...
lda #<handler1
sta $fffe
lda #>handler1
sta $ffff
lda #line1
sta $d012
rti
To my intuition it seems it would be quicker, though slightly larger.
I've only skimmed through the article so maybe there's a reason the author considered this and opted not to. Running out of memory maybe?
- classichasclass 8mo agoNitpick: I think he still has the Kernal banked in, so he'll need to use the soft vector at $0314. But that is exactly how I've done chained raster splits otherwise. It's really the most straightforward approach.
- neonz80 8mo agoIf you put both handlers in the same 256 byte page you can get away with only updating the low byte of the address.