2015-12-10 18:53:30 +00:00
|
|
|
|
PR#3
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-03-15 16:44:15 +00:00
|
|
|
|
LOMEM $A00
|
2015-12-10 18:53:30 +00:00
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* 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
|
2017-03-13 07:07:07 +00:00
|
|
|
|
bra *
|
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
|
|
|
|
|
|
2017-01-25 16:18:35 +00:00
|
|
|
|
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
|
2017-02-06 17:04:03 +00:00
|
|
|
|
K.IrkMgr.VBL .BS 1
|
|
|
|
|
K.IrkMgr.VBLINT .BS 1
|
2017-01-25 16:18:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-06-02 15:14:42 +00:00
|
|
|
|
* Called by :
|
|
|
|
|
* Kernel IrqHandlerAuxLC
|
|
|
|
|
* ProDOS IRQ Manager (GP)
|
2017-01-25 16:18:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-02-06 17:04:03 +00:00
|
|
|
|
K.IrqHandler lda K.IrkMgr.VBL
|
2017-02-07 07:27:27 +00:00
|
|
|
|
beq .10 0, totally disabled....
|
2017-03-02 22:14:04 +00:00
|
|
|
|
|
2017-02-07 07:27:27 +00:00
|
|
|
|
jsr K.IrqMgrVBL.MSM SERVEMOUSE
|
2017-03-02 22:14:04 +00:00
|
|
|
|
bcs .10 Not From Mouse
|
|
|
|
|
|
|
|
|
|
ldx K.IrqMgrVBL.0n
|
|
|
|
|
lda $778,x
|
|
|
|
|
and #$08 IRQ was caused by VBL ?
|
|
|
|
|
beq .10
|
2017-02-06 17:04:03 +00:00
|
|
|
|
|
2017-02-07 07:27:27 +00:00
|
|
|
|
ldx K.IrqMgrVBL.MRM+2 $Cn
|
|
|
|
|
ldy K.IrqMgrVBL.n0
|
|
|
|
|
jsr K.IrqMgrVBL.MRM READMOUSE
|
|
|
|
|
|
2017-02-06 17:04:03 +00:00
|
|
|
|
inc K.IrkMgr.VBLINT
|
2017-02-07 07:27:27 +00:00
|
|
|
|
|
2017-06-02 15:14:42 +00:00
|
|
|
|
lda SYS.BASL0+37
|
|
|
|
|
eor #'V'
|
|
|
|
|
sta SYS.BASL0+37 Confirm VBL signal valid for EvtMgr
|
2017-02-07 07:27:27 +00:00
|
|
|
|
|
2017-02-06 17:04:03 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.10 >LDYAI DevMgr.Table
|
|
|
|
|
>STYA $fe
|
|
|
|
|
|
2017-01-25 16:18:35 +00:00
|
|
|
|
ldx DevMgr.Count
|
|
|
|
|
|
2017-06-02 15:14:42 +00:00
|
|
|
|
.4 ldy #S.DEV.S
|
2015-12-10 18:53:30 +00:00
|
|
|
|
lda ($fe),y
|
2017-02-02 17:30:07 +00:00
|
|
|
|
and #S.DEV.S.IRQ
|
2017-06-02 15:14:42 +00:00
|
|
|
|
beq .6
|
2017-02-02 17:30:07 +00:00
|
|
|
|
|
2017-01-25 16:18:35 +00:00
|
|
|
|
phx
|
2016-09-21 15:20:37 +00:00
|
|
|
|
jsr K.IrqHandlerJMP
|
2017-01-25 16:18:35 +00:00
|
|
|
|
plx
|
2015-12-10 18:53:30 +00:00
|
|
|
|
bcc .8 CC, IRQ cleared by device
|
|
|
|
|
|
2017-06-02 15:14:42 +00:00
|
|
|
|
.6 lda $fe
|
2017-02-02 17:30:07 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #S.DEV
|
2015-12-10 18:53:30 +00:00
|
|
|
|
sta $fe
|
2017-06-02 15:14:42 +00:00
|
|
|
|
bcc .7
|
2015-12-10 18:53:30 +00:00
|
|
|
|
inc $ff
|
2017-02-02 17:30:07 +00:00
|
|
|
|
|
2017-06-02 15:14:42 +00:00
|
|
|
|
.7 dex
|
|
|
|
|
bne .4
|
2017-01-25 16:18:35 +00:00
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2017-02-07 07:27:27 +00:00
|
|
|
|
K.IrqMgrVBL.n0 .BS 1
|
2017-03-02 22:14:04 +00:00
|
|
|
|
K.IrqMgrVBL.0n .BS 1
|
2017-02-07 07:27:27 +00:00
|
|
|
|
K.IrqMgrVBL.MSM jmp $0000
|
|
|
|
|
K.IrqMgrVBL.MRM jmp $0000
|
2017-02-06 17:04:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-03-15 16:44:15 +00:00
|
|
|
|
K.IrqHandlerJMP ldx #DEVMGR.IRQ
|
|
|
|
|
jmp ($fe)
|
2015-12-10 18:53:30 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
|
|
|
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
2015-12-10 18:53:30 +00:00
|
|
|
|
ASM
|