2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
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
|
|
|
|
|
*--------------------------------------
|
2017-10-27 14:56:46 +00:00
|
|
|
|
K.IrqHAuxLC sta .12+1
|
2015-12-10 18:53:30 +00:00
|
|
|
|
pla
|
|
|
|
|
pha
|
|
|
|
|
and #$10 BRK?
|
2017-10-11 15:37:41 +00:00
|
|
|
|
bne .2
|
2015-12-10 18:53:30 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
stx .11+1
|
|
|
|
|
sty .10+1
|
2015-12-10 18:53:30 +00:00
|
|
|
|
lda $fe
|
|
|
|
|
pha
|
|
|
|
|
lda $ff
|
|
|
|
|
pha
|
|
|
|
|
lda RDREADAUX
|
|
|
|
|
pha
|
2017-10-27 06:36:46 +00:00
|
|
|
|
sta CLRREADAUX Make sure we can access Dev.Table
|
2015-12-10 18:53:30 +00:00
|
|
|
|
|
2017-10-27 14:56:46 +00:00
|
|
|
|
jsr K.IrqH
|
2017-01-25 16:18:35 +00:00
|
|
|
|
|
|
|
|
|
pla Must keep Carry
|
2017-10-11 15:37:41 +00:00
|
|
|
|
bpl .1
|
2017-01-25 16:18:35 +00:00
|
|
|
|
sta SETREADAUX
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
.1 pla
|
2017-01-25 16:18:35 +00:00
|
|
|
|
sta $ff
|
|
|
|
|
pla
|
|
|
|
|
sta $fe
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
.10 ldy #$ff Self Modified
|
|
|
|
|
.11 ldx #$ff Self Modified
|
|
|
|
|
.12 lda #$ff Self Modified
|
|
|
|
|
bcs .8
|
2017-01-25 16:18:35 +00:00
|
|
|
|
rti
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2017-11-23 16:51:52 +00:00
|
|
|
|
.2 pla pull P
|
2017-10-24 15:44:12 +00:00
|
|
|
|
bra *
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2017-10-18 15:32:56 +00:00
|
|
|
|
.8 jmp (IRQ.OldFFFE)
|
2017-01-25 16:18:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-06-02 15:14:42 +00:00
|
|
|
|
* Called by :
|
2017-10-27 14:56:46 +00:00
|
|
|
|
* - Kernel K.IrqHAuxLC
|
|
|
|
|
* - ProDOS IRQ Manager (GP)
|
2017-01-25 16:18:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-05 21:23:21 +00:00
|
|
|
|
K.IrqH jmp K.IrqH.DEV Modified by INIT
|
2017-10-11 15:37:41 +00:00
|
|
|
|
*--------------------------------------
|
2017-10-27 14:56:46 +00:00
|
|
|
|
K.IrqH.TCLOCK ldy IRQ.VBL.n0
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
lda $c080,y
|
|
|
|
|
and #$20
|
2017-10-27 14:56:46 +00:00
|
|
|
|
beq K.IrqH.DEV
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
lda $c080,y
|
|
|
|
|
lda $c088,y
|
2017-09-21 15:29:45 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
inc CORE.IRQTick
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-11-23 16:51:52 +00:00
|
|
|
|
K.IrqH.VBL jsr IRQ.VBL.MSM SERVEMOUSE
|
|
|
|
|
bcs K.IrqH.DEV Not From Mouse
|
2017-03-02 22:14:04 +00:00
|
|
|
|
|
2017-10-27 14:56:46 +00:00
|
|
|
|
ldx IRQ.VBL.0n
|
2017-03-02 22:14:04 +00:00
|
|
|
|
lda $778,x
|
|
|
|
|
and #$08 IRQ was caused by VBL ?
|
2017-10-27 14:56:46 +00:00
|
|
|
|
beq K.IrqH.DEV
|
2017-02-06 17:04:03 +00:00
|
|
|
|
|
2017-11-23 16:51:52 +00:00
|
|
|
|
ldx IRQ.VBL.MRM+2 $Cn
|
2017-10-27 14:56:46 +00:00
|
|
|
|
ldy IRQ.VBL.n0
|
2017-11-23 16:51:52 +00:00
|
|
|
|
jsr IRQ.VBL.MRM READMOUSE
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
inc CORE.IRQTick
|
2017-02-07 07:27:27 +00:00
|
|
|
|
|
2017-02-06 17:04:03 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2017-09-21 15:29:45 +00:00
|
|
|
|
*--------------------------------------
|
2017-10-27 14:56:46 +00:00
|
|
|
|
K.IrqH.DEV >LDYAI Dev.Table
|
2017-02-06 17:04:03 +00:00
|
|
|
|
>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
|
2017-10-27 14:56:46 +00:00
|
|
|
|
jsr K.IrqHJMP
|
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-10-18 15:32:56 +00:00
|
|
|
|
IRQ.IntNum .BS 1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
IRQ.OldFFFE .BS 2
|
|
|
|
|
*--------------------------------------
|
2017-10-27 14:56:46 +00:00
|
|
|
|
IRQ.VBL.n0 .BS 1
|
|
|
|
|
IRQ.VBL.0n .BS 1
|
|
|
|
|
IRQ.VBL.MSM jmp $0000
|
|
|
|
|
IRQ.VBL.MRM jmp $0000
|
2017-02-06 17:04:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-10-27 14:56:46 +00:00
|
|
|
|
K.IrqHJMP ldx #DEVMGR.IRQ
|
2017-03-15 16:44:15 +00:00
|
|
|
|
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
|