mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
97 lines
1.8 KiB
Plaintext
97 lines
1.8 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.SRC
|
||
NEW
|
||
INC 1
|
||
AUTO 6
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
* 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
|
||
*--------------------------------------
|
||
K.IrqHandlerAuxLC
|
||
sta K.IrqMgr.A
|
||
pla
|
||
pha
|
||
and #$10 BRK?
|
||
beq .10
|
||
|
||
lda K.IrqMgr.A
|
||
.82 jmp (K.IrqMgrOldFFFE)
|
||
|
||
.10 stx K.IrqMgr.X
|
||
sty K.IrqMgr.Y
|
||
lda $fe
|
||
pha
|
||
lda $ff
|
||
pha
|
||
lda RDREADAUX
|
||
pha
|
||
sta CLRREADAUX Make sure we can access DevMgr.Table
|
||
|
||
jsr K.IrqHandler
|
||
|
||
pla Must keep Carry
|
||
bpl .81
|
||
sta SETREADAUX
|
||
.81 pla
|
||
sta $ff
|
||
pla
|
||
sta $fe
|
||
ldy K.IrqMgr.Y
|
||
ldx K.IrqMgr.X
|
||
lda K.IrqMgr.A
|
||
bcs .82
|
||
rti
|
||
*--------------------------------------
|
||
K.IrqMgrOldFFFE .BS 2
|
||
K.IrqMgr.A .BS 1
|
||
K.IrqMgr.X .BS 1
|
||
K.IrqMgr.Y .BS 1
|
||
*--------------------------------------
|
||
* Called by ProDOS IRQ Manager (GP)
|
||
*--------------------------------------
|
||
K.IrqHandler >LDYAI DevMgr.Table
|
||
>STYA $fe
|
||
|
||
ldx DevMgr.Count
|
||
|
||
.1 lda ($fe) End Of Table ?
|
||
sec
|
||
beq .8
|
||
|
||
ldy #S.DEV.F
|
||
lda ($fe),y
|
||
and #S.DEV.F.IRQ
|
||
beq .2
|
||
|
||
phx
|
||
jsr K.IrqHandlerJMP
|
||
plx
|
||
bcc .8 CC, IRQ cleared by device
|
||
|
||
.2 lda $fe CS,
|
||
adc #S.DEV-1
|
||
sta $fe
|
||
bcc .3
|
||
inc $ff
|
||
.3 dex
|
||
bne .1
|
||
|
||
sec
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
K.IrqHandlerJMP ldx #DEVMGR.READ
|
||
jmp ($fe)
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE SYS/KERNEL.S.IRQ
|
||
LOAD SYS/KERNEL.S
|
||
ASM
|