mirror of
https://github.com/A2osX/A2osX.git
synced 2024-09-10 07:54:37 +00:00
Kernel 0.9.1 : KERNEL, Preemtive mode, Code cleaning....step by step....#2
This commit is contained in:
parent
fa3273bebb
commit
a260cfe2eb
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -239,49 +239,15 @@ GO.EXIT.JMP jmp $FFFF Self Modified
|
|||||||
GP.IrqH cld
|
GP.IrqH cld
|
||||||
|
|
||||||
bit IRQ.SkipA2osX After A2osX IRQ.H ?
|
bit IRQ.SkipA2osX After A2osX IRQ.H ?
|
||||||
|
bmi GP.IrqH.Exit
|
||||||
|
|
||||||
stz IRQ.SkipA2osX reset flag
|
sta SETALTZP switch to aux LC
|
||||||
|
|
||||||
GP.IrqH.BPL bpl GP.IrqH.DEV SELF MODIFIED
|
|
||||||
sec
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
GP.IrqH.TCLOCK ldy IRQ.VBL.n0
|
|
||||||
|
|
||||||
lda $c080,y
|
|
||||||
and #$20
|
|
||||||
beq GP.IrqH.DEV
|
|
||||||
|
|
||||||
lda $c080,y
|
|
||||||
lda $c088,y
|
|
||||||
|
|
||||||
inc IRQ.Tick
|
|
||||||
clc
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
GP.IrqH.VBL jsr IRQ.VBL.MSM SERVEMOUSE
|
|
||||||
bcs GP.IrqH.DEV Not From Mouse
|
|
||||||
|
|
||||||
ldx IRQ.VBL.0n
|
|
||||||
lda MOUSESTSx,x
|
|
||||||
and #MOUSESTSx.INTVBL IRQ was caused by VBL ?
|
|
||||||
beq GP.IrqH.DEV
|
|
||||||
|
|
||||||
ldx IRQ.VBL.MRM+2 $Cn
|
|
||||||
ldy IRQ.VBL.n0
|
|
||||||
jsr IRQ.VBL.MRM READMOUSE
|
|
||||||
|
|
||||||
inc IRQ.Tick
|
|
||||||
clc
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
GP.IrqH.DEV sta SETALTZP switch to aux LC
|
|
||||||
tsx
|
tsx
|
||||||
stx A2osX.SaveSM
|
stx A2osX.SaveSM
|
||||||
ldx A2osX.SaveSX
|
ldx A2osX.SaveSX
|
||||||
txs
|
txs
|
||||||
|
|
||||||
jsr K.IrqH.DEV
|
GP.IrqH.JSR jsr K.IrqH.DEV SELF MODIFIED
|
||||||
|
|
||||||
tsx go back to Main
|
tsx go back to Main
|
||||||
stx A2osX.SaveSX
|
stx A2osX.SaveSX
|
||||||
@ -290,8 +256,13 @@ GP.IrqH.DEV sta SETALTZP switch to aux LC
|
|||||||
sta CLRALTZP
|
sta CLRALTZP
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
GP.IrqH.Exit stz IRQ.SkipA2osX reset flag
|
||||||
|
sec
|
||||||
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IRQ.SkipA2osX .BS 1
|
IRQ.SkipA2osX .BS 1
|
||||||
|
*--------------------------------------
|
||||||
IRQ.Tick .BS 1
|
IRQ.Tick .BS 1
|
||||||
IRQ.InKernel .BS 1
|
IRQ.InKernel .BS 1
|
||||||
IRQ.IntNum .BS 1
|
IRQ.IntNum .BS 1
|
||||||
@ -315,8 +286,8 @@ GP.CodeEnd .BS $BEE0-*
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DA #6 60hz
|
.DA #6 60hz
|
||||||
.BS 7
|
.BS 7
|
||||||
.DA #0 ChRoot Disabled
|
.DA #0 ChRoot/Preemptive Disabled
|
||||||
.BS 7 All Slots marked as "Free"
|
.HS 00000000000000 All Slots marked as "Free"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.GP
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.GP
|
||||||
|
@ -573,7 +573,7 @@ IrqMgrInit >LDYAI MSG.IRQ
|
|||||||
php
|
php
|
||||||
sei
|
sei
|
||||||
>LDYA $FFFE
|
>LDYA $FFFE
|
||||||
>STYA K.IRQ.OldFFFE
|
>STYA IRQ.OldFFFE
|
||||||
>LDYAI K.IrqHAuxLC
|
>LDYAI K.IrqHAuxLC
|
||||||
>STYA $FFFE
|
>STYA $FFFE
|
||||||
|
|
||||||
@ -594,11 +594,9 @@ IrqMgrInit >LDYAI MSG.IRQ
|
|||||||
lda #"C"
|
lda #"C"
|
||||||
sta SYS.BASL0+38
|
sta SYS.BASL0+38
|
||||||
|
|
||||||
lda #GP.IrqH.TCLOCK-GP.IrqH.BPL-2
|
|
||||||
sta GP.IrqH.BPL+1
|
|
||||||
|
|
||||||
>LDYAI K.IrqH.TCLOCK
|
>LDYAI K.IrqH.TCLOCK
|
||||||
>STYA K.IrqHAuxLC.JSR+1
|
>STYA K.IrqHAuxLC.JSR+1
|
||||||
|
>STYA GP.IrqH.JSR+1
|
||||||
|
|
||||||
>LDYAI MSG.IRQ.CLOCK
|
>LDYAI MSG.IRQ.CLOCK
|
||||||
>SYSCALL PrintF.YA
|
>SYSCALL PrintF.YA
|
||||||
@ -612,11 +610,9 @@ IrqMgrInit >LDYAI MSG.IRQ
|
|||||||
lda #"V"
|
lda #"V"
|
||||||
sta SYS.BASL0+38
|
sta SYS.BASL0+38
|
||||||
|
|
||||||
lda #GP.IrqH.VBL-GP.IrqH.BPL-2
|
|
||||||
sta GP.IrqH.BPL+1
|
|
||||||
|
|
||||||
>LDYAI K.IrqH.VBL
|
>LDYAI K.IrqH.VBL
|
||||||
>STYA K.IrqHAuxLC.JSR+1
|
>STYA K.IrqHAuxLC.JSR+1
|
||||||
|
>STYA GP.IrqH.JSR+1
|
||||||
|
|
||||||
>LDYAI MSG.IRQ.VBL
|
>LDYAI MSG.IRQ.VBL
|
||||||
>SYSCALL PrintF.YA
|
>SYSCALL PrintF.YA
|
||||||
|
@ -104,7 +104,7 @@ K.IrqHAuxLC.6 lda #$ff Self Modified
|
|||||||
bcc K.IrqHAuxLC.8
|
bcc K.IrqHAuxLC.8
|
||||||
|
|
||||||
dec IRQ.SkipA2osX Make regular ProDOS IRQ manager skip A2osX
|
dec IRQ.SkipA2osX Make regular ProDOS IRQ manager skip A2osX
|
||||||
jmp (K.IRQ.OldFFFE) Not handled, pass to ProDOS
|
jmp (IRQ.OldFFFE) Not handled, pass to ProDOS
|
||||||
K.IrqHAuxLC.8 rti
|
K.IrqHAuxLC.8 rti
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Called by :
|
* Called by :
|
||||||
@ -177,35 +177,35 @@ K.IrqH.DEV >LDYAI Dev.Table
|
|||||||
|
|
||||||
ldx DevMgr.Count
|
ldx DevMgr.Count
|
||||||
|
|
||||||
.4 ldy #S.DEV.S
|
.1 ldy #S.DEV.S
|
||||||
lda ($fe),y
|
lda ($fe),y
|
||||||
and #S.DEV.S.IRQ
|
and #S.DEV.S.IRQ
|
||||||
beq .6
|
beq .2
|
||||||
|
|
||||||
phx
|
phx
|
||||||
jsr K.IrqHJMP
|
ldx #DEVMGR.IRQ
|
||||||
|
jsr .88
|
||||||
plx
|
plx
|
||||||
bcc .8 CC, IRQ cleared by device
|
bcc .8 CC, IRQ cleared by device
|
||||||
|
|
||||||
.6 lda $fe
|
.2 lda $fe
|
||||||
clc
|
clc
|
||||||
adc #S.DEV
|
adc #S.DEV
|
||||||
sta $fe
|
sta $fe
|
||||||
bcc .7
|
bcc .3
|
||||||
inc $ff
|
inc $ff
|
||||||
|
|
||||||
.7 dex
|
.3 dex
|
||||||
bne .4
|
bne .1
|
||||||
|
|
||||||
sec
|
sec
|
||||||
|
|
||||||
.8 clv clear V (no task switching)
|
.8 clv clear V (no task switching)
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.IRQ.OldFFFE .BS 2
|
.88 jmp ($fe)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.IrqHJMP ldx #DEVMGR.IRQ
|
IRQ.OldFFFE .BS 2
|
||||||
jmp ($fe)
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
||||||
|
Loading…
Reference in New Issue
Block a user