2019-10-16 06:09:13 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* this routine handles interrupts and is coded to reach 'lreset' precisely at
|
|
|
|
|
* address $FFCB (ROM rts opcode) for rom switching to function.
|
|
|
|
|
* $2D9B-2DFF moved to $FF9B-FFFF
|
|
|
|
|
*--------------------------------------
|
2019-10-19 18:35:30 +00:00
|
|
|
|
OLDROM.IRQV
|
2019-10-18 19:57:38 +00:00
|
|
|
|
* pha
|
|
|
|
|
* lda accsav
|
|
|
|
|
* sta oldacc
|
|
|
|
|
* pla
|
|
|
|
|
* sta accsav
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
2019-10-19 18:35:30 +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
|
|
|
|
|
|
|
|
|
|
* lda #$FF
|
|
|
|
|
|
|
|
|
|
*sysactv sta bankid
|
|
|
|
|
* sta afbank
|
|
|
|
|
* lda /aftirq setup return address
|
|
|
|
|
* pha
|
|
|
|
|
* lda #aftirq
|
|
|
|
|
* pha
|
|
|
|
|
* lda #$04 status reg with interrupt flag set
|
|
|
|
|
* pha
|
|
|
|
|
|
|
|
|
|
*H2DC2 lda /romirq setup ROM re-entry
|
|
|
|
|
* pha
|
|
|
|
|
* lda #romirq
|
|
|
|
|
* pha
|
|
|
|
|
|
|
|
|
|
.LIST ON
|
|
|
|
|
IRQ.FREE1 .EQ $ffc8-*
|
|
|
|
|
.LIST OFF
|
|
|
|
|
|
|
|
|
|
.BS IRQ.FREE1
|
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
gorom sta RROMBNK2 hits ROM rts at $FFCB
|
|
|
|
|
|
|
|
|
|
* 'lreset' address must = $FFCB for rom switch i/o to work
|
|
|
|
|
|
2019-10-19 18:35:30 +00:00
|
|
|
|
lreset lda /resetv-1
|
2019-10-16 06:09:13 +00:00
|
|
|
|
pha
|
2019-10-19 18:35:30 +00:00
|
|
|
|
lda #resetv-1
|
2019-10-16 06:09:13 +00:00
|
|
|
|
pha
|
|
|
|
|
jmp gorom
|
|
|
|
|
|
2019-10-19 18:35:30 +00:00
|
|
|
|
*rreset .DA resetv-1 rts to resetv
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
2019-10-19 18:35:30 +00:00
|
|
|
|
*fix45 sta p8areg A register savearea
|
2019-10-18 19:57:38 +00:00
|
|
|
|
* lda oldacc
|
|
|
|
|
* sta accsav
|
2019-10-19 18:35:30 +00:00
|
|
|
|
* lda RRAMWRAMBNK1 read/write RAM bank 1
|
|
|
|
|
* lda RRAMWRAMBNK1
|
|
|
|
|
* lda afbank
|
|
|
|
|
* jmp irqxit0
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
|
|
|
|
stypfx sty newpfxptr fix appletalk PFI bug
|
|
|
|
|
sty preflag prefix flag
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
stapfx sta newpfxptr
|
|
|
|
|
sta preflag
|
|
|
|
|
rts
|
2019-10-19 18:35:30 +00:00
|
|
|
|
|
|
|
|
|
.LIST ON
|
|
|
|
|
IRQ.FREE2 .EQ $fffa-*
|
|
|
|
|
.LIST OFF
|
|
|
|
|
|
|
|
|
|
.BS IRQ.FREE2
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
|
|
|
|
.DA nmivect nmi handler
|
|
|
|
|
.DA lreset reset handler
|
2019-10-19 18:35:30 +00:00
|
|
|
|
irqv .DA * PATCHED with ROM vector by LDR
|
|
|
|
|
.LIST OFF
|
2019-10-16 06:09:13 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE USR/SRC/PRODOS.FX/PRODOS.S.IRQ
|
|
|
|
|
LOAD USR/SRC/PRODOS.FX/PRODOS.S
|
|
|
|
|
ASM
|