Death by interrupts - ugh

3 posts / 0 new
Last post
Offline
Last seen: 6 years 1 month ago
Joined: Sep 21 2014 - 01:03
Posts: 74
Death by interrupts - ugh

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

Offline
Last seen: 2 years 7 months ago
Joined: Aug 11 2015 - 20:13
Posts: 228
Re: Death by interrupts - ugh

This might help.

Try reading this

https://technocoma.blogspot.com.au/2017/08/super-simple-super-serial-sample-source.html

Offline
Last seen: 2 years 7 months ago
Joined: Aug 11 2015 - 20:13
Posts: 228
Re: Death by interrupts - ugh

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

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

Log in or register to post comments