mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-14 13:29:02 +00:00
147 lines
2.7 KiB
Plaintext
147 lines
2.7 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BUILD
|
||
LOMEM $A00
|
||
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
|
||
*--------------------------------------
|
||
K.IrqHAuxLC sta .12+1
|
||
pla
|
||
pha
|
||
and #$10 BRK?
|
||
bne .2
|
||
|
||
stx .11+1
|
||
sty .10+1
|
||
lda $fe
|
||
pha
|
||
lda $ff
|
||
pha
|
||
lda RDREADAUX
|
||
pha
|
||
sta CLRREADAUX Make sure we can access Dev.Table
|
||
|
||
jsr K.IrqH
|
||
|
||
pla Must keep Carry
|
||
bpl .1
|
||
sta SETREADAUX
|
||
|
||
.1 pla
|
||
sta $ff
|
||
pla
|
||
sta $fe
|
||
|
||
.10 ldy #$ff Self Modified
|
||
.11 ldx #$ff Self Modified
|
||
.12 lda #$ff Self Modified
|
||
bcs .8
|
||
rti
|
||
|
||
.2
|
||
pla pull P
|
||
bra *
|
||
|
||
lda .12+1
|
||
|
||
.8 jmp (IRQ.OldFFFE)
|
||
*--------------------------------------
|
||
* Called by :
|
||
* - Kernel K.IrqHAuxLC
|
||
* - ProDOS IRQ Manager (GP)
|
||
*--------------------------------------
|
||
K.IrqH jmp K.IrqH.DEV Modified by INIT
|
||
*--------------------------------------
|
||
K.IrqH.TCLOCK ldy IRQ.VBL.n0
|
||
|
||
lda $c080,y
|
||
and #$20
|
||
beq K.IrqH.DEV
|
||
|
||
lda $c080,y
|
||
lda $c088,y
|
||
|
||
inc CORE.IRQTick
|
||
|
||
lda SYS.BASL0+37
|
||
eor #$80
|
||
sta SYS.BASL0+37
|
||
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
K.IrqH.VBL jsr IRQ.VBL.MSM SERVEMOUSE
|
||
bcs K.IrqH.DEV Not From Mouse
|
||
|
||
ldx IRQ.VBL.0n
|
||
lda $778,x
|
||
and #$08 IRQ was caused by VBL ?
|
||
beq K.IrqH.DEV
|
||
|
||
ldx IRQ.VBL.MRM+2 $Cn
|
||
ldy IRQ.VBL.n0
|
||
jsr IRQ.VBL.MRM READMOUSE
|
||
|
||
inc CORE.IRQTick
|
||
|
||
lda SYS.BASL0+37
|
||
eor #$80
|
||
sta SYS.BASL0+37
|
||
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
K.IrqH.DEV >LDYAI Dev.Table
|
||
>STYA $fe
|
||
|
||
ldx DevMgr.Count
|
||
|
||
.4 ldy #S.DEV.S
|
||
lda ($fe),y
|
||
and #S.DEV.S.IRQ
|
||
beq .6
|
||
|
||
phx
|
||
jsr K.IrqHJMP
|
||
plx
|
||
bcc .8 CC, IRQ cleared by device
|
||
|
||
.6 lda $fe
|
||
clc
|
||
adc #S.DEV
|
||
sta $fe
|
||
bcc .7
|
||
inc $ff
|
||
|
||
.7 dex
|
||
bne .4
|
||
|
||
sec
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
IRQ.IntNum .BS 1
|
||
*--------------------------------------
|
||
IRQ.OldFFFE .BS 2
|
||
*--------------------------------------
|
||
IRQ.VBL.n0 .BS 1
|
||
IRQ.VBL.0n .BS 1
|
||
IRQ.VBL.MSM jmp $0000
|
||
IRQ.VBL.MRM jmp $0000
|
||
*--------------------------------------
|
||
K.IrqHJMP ldx #DEVMGR.IRQ
|
||
jmp ($fe)
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
||
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
||
ASM
|