A2osX/ProDOS.203/ProDOS.S.IRQ.txt

69 lines
1.7 KiB
Plaintext
Raw Normal View History

2019-04-29 20:36:58 +00:00
NEW
AUTO 3,1
* object code = mli_3
*
* this routine handles interrupts and is coded to reach 'lreset' precisely at
* address $FFCB (ROM rts opcode) for rom switching to function.
2019-09-15 15:13:48 +00:00
lanirq pha $2D9B-2DFF moved to $FF9B-FFFF
2019-09-10 20:53:18 +00:00
lda accsav
sta oldacc
2019-09-10 15:46:56 +00:00
pla
2019-09-10 20:53:18 +00:00
sta accsav
2019-09-13 15:39:37 +00:00
pla get status register from stack
pha and put it back.
and #$10 is it a break or interrupt?
bne H2DC2 branch if break.
lda $D000 get ram bankid (LC1 = $D8, LC2=$EE)
eor #$D8 is the system active? ($D8)
beq sysactv branch if it is
2019-09-10 15:46:56 +00:00
lda #$FF
sysactv sta bankid
2019-09-10 20:53:18 +00:00
sta afbank
2019-09-13 15:39:37 +00:00
lda /aftirq setup return address
2019-09-10 15:46:56 +00:00
pha
2019-09-10 20:53:18 +00:00
lda #aftirq
2019-09-10 15:46:56 +00:00
pha
2019-09-13 15:39:37 +00:00
lda #$04 status reg with interrupt flag set
2019-09-10 15:46:56 +00:00
pha
2019-09-13 15:39:37 +00:00
H2DC2 lda /romirq setup ROM re-entry
2019-09-10 15:46:56 +00:00
pha
2019-09-10 20:53:18 +00:00
lda #romirq
2019-09-10 15:46:56 +00:00
pha
2019-09-15 15:13:48 +00:00
gorom sta RROMBNK2 hits ROM rts at $FFCB
2019-04-29 20:36:58 +00:00
* 'lreset' address must = $FFCB for rom switch i/o to work
2019-09-15 15:13:48 +00:00
lreset lda rreset+1
2019-09-10 15:46:56 +00:00
pha
2019-09-10 20:53:18 +00:00
lda rreset
2019-09-10 15:46:56 +00:00
pha
2019-09-10 20:53:18 +00:00
jmp gorom
2019-09-15 15:13:48 +00:00
rreset .DA resetv-1 rts to resetv
fix45 sta p8areg A register savearea
2019-09-10 20:53:18 +00:00
lda oldacc
sta accsav
2019-09-13 20:48:05 +00:00
lda RRAMWRAMBNK1 read/write RAM bank 1
2019-09-12 06:39:47 +00:00
lda RRAMWRAMBNK1
2019-09-10 20:53:18 +00:00
lda afbank
jmp irqxit0
2019-09-15 15:13:48 +00:00
stypfx sty newpfxptr fix appletalk PFI bug
2019-09-13 20:48:05 +00:00
sty preflag prefix flag
2019-09-10 15:46:56 +00:00
rts
2019-09-15 15:13:48 +00:00
stapfx sta newpfxptr
2019-09-10 20:53:18 +00:00
sta preflag
2019-09-10 15:46:56 +00:00
rts
2019-04-29 20:36:58 +00:00
* these 3 vectors hard-coded into processor
2019-09-13 20:48:05 +00:00
.DA nmivect nmi handler
.DA lreset reset handler
2019-09-15 15:13:48 +00:00
irqv .DA lanirq irq handler
2019-04-29 20:36:58 +00:00
* end of obj mli_3
*--------------------------------------
MAN
SAVE usr/src/prodos.203/prodos.s.irq
LOAD usr/src/prodos.203/prodos.s
2019-04-29 20:36:58 +00:00
ASM