Death by interrupts - ugh

2 replies [Last post]
Offline
Joined: Sep 21 2014
Posts: 74

Apple II interrupts, its like the solar eclipse, strangely, you want to stare at it but you know you'll go blind for doing so. Its like whatever OS you booted with is going to destroy any jump vectors in memory so whats it all about? Finding yourself having to read prodos manuals for MLI code for IRQ installation!! This is terrible.... Im finding little tidbits of info, but it assumes different run strategies were used so that DOS doesnt destroy interrupts. This is how i do it on a commodore below for NMI or IRQ

sei ;Disable interrupts just in case
lda # < IRQ ;get low byte of our new IRQ code
sta irqvector ;store it in the irqvector
lda # > IRQ ;get the high byte of our new NMI code
sta irqvector+1 ;store it in the irqvector + 1
cli ;re-enable IRQ

IRQ:
sei ; the usual processor status storage routine
pha
txa
pha
tya
pha ; processor state now stored to stack

;DO STUFF EXAMPLE
lda #$35
sta $0730 ; print 5 in the middle of the screen

pla
tay
pla
tax
pla
rti

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Aug 12 2015
Posts: 144
Re: Death by interrupts - ugh
Offline
Joined: Aug 12 2015
Posts: 144
Re: Death by interrupts - ugh

Or for complete run down on interrupts.
Try reading this.

http://6502.org/tutorials/interrupts.html