2015-12-10 18:53:30 +00:00
|
|
|
|
PR#3
|
|
|
|
|
PREFIX /A2OSX.SRC
|
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2016-03-13 21:47:19 +00:00
|
|
|
|
S.BrkHandlerAuxLC
|
|
|
|
|
bra *
|
2015-12-10 18:53:30 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* called directly by IRQ Vector $FFFE in AuxLC
|
|
|
|
|
* Must keep:
|
|
|
|
|
* A,X,Y
|
|
|
|
|
* SETREADAUX
|
|
|
|
|
* if we are here, Aux ZP/Stack already On
|
|
|
|
|
* Exit with RTI
|
|
|
|
|
* if A2osX Drivers cannot clear IRQ,
|
|
|
|
|
* must call regular System Handler
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.IrqHandlerAuxLC
|
|
|
|
|
sta K.IrqMgr.A
|
2015-12-10 18:53:30 +00:00
|
|
|
|
pla
|
|
|
|
|
pha
|
|
|
|
|
and #$10 BRK?
|
|
|
|
|
beq .10
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.IrqMgr.A
|
|
|
|
|
.82 jmp (K.IrqMgrOldFFFE)
|
2015-12-10 18:53:30 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.10 stx K.IrqMgr.X
|
|
|
|
|
sty K.IrqMgr.Y
|
2015-12-10 18:53:30 +00:00
|
|
|
|
lda $fe
|
|
|
|
|
pha
|
|
|
|
|
lda $ff
|
|
|
|
|
pha
|
|
|
|
|
lda RDREADAUX
|
|
|
|
|
pha
|
|
|
|
|
sta CLRREADAUX Make sure we can access DevMgr.Table
|
|
|
|
|
|
|
|
|
|
>LDYAI DevMgr.Table
|
|
|
|
|
>STYA $fe
|
|
|
|
|
|
|
|
|
|
.1 lda ($fe) End Of Table ?
|
|
|
|
|
sec
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
ldy #S.DEV.F
|
|
|
|
|
lda ($fe),y
|
|
|
|
|
and #S.DEV.F.IRQ
|
|
|
|
|
beq .2
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.IrqHandlerJMP
|
2015-12-10 18:53:30 +00:00
|
|
|
|
bcc .8 CC, IRQ cleared by device
|
|
|
|
|
|
|
|
|
|
.2 lda $fe CS,
|
2016-10-03 15:59:36 +00:00
|
|
|
|
adc #S.DEV-1
|
2015-12-10 18:53:30 +00:00
|
|
|
|
sta $fe
|
|
|
|
|
bcc .1
|
|
|
|
|
inc $ff
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.8 pla Must keep Carry
|
|
|
|
|
bpl .81
|
|
|
|
|
sta SETREADAUX
|
|
|
|
|
.81 pla
|
|
|
|
|
sta $ff
|
|
|
|
|
pla
|
|
|
|
|
sta $fe
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy K.IrqMgr.Y
|
|
|
|
|
ldx K.IrqMgr.X
|
|
|
|
|
lda K.IrqMgr.A
|
2015-12-10 18:53:30 +00:00
|
|
|
|
bcs .82
|
|
|
|
|
rti
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.IrqHandlerJMP ldx #DEVMGR.IRQ
|
2015-12-10 18:53:30 +00:00
|
|
|
|
jmp ($fe)
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.IrqMgrOldFFFE .BS 2
|
|
|
|
|
K.IrqMgr.A .BS 1
|
|
|
|
|
K.IrqMgr.X .BS 1
|
|
|
|
|
K.IrqMgr.Y .BS 1
|
2015-12-10 18:53:30 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE SYS/KERNEL.S.IRQ
|
|
|
|
|
LOAD SYS/KERNEL.S
|
|
|
|
|
ASM
|