mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 16:31:07 +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
|
||||
|
||||
bit IRQ.SkipA2osX After A2osX IRQ.H ?
|
||||
bmi GP.IrqH.Exit
|
||||
|
||||
stz IRQ.SkipA2osX reset flag
|
||||
|
||||
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
|
||||
sta SETALTZP switch to aux LC
|
||||
tsx
|
||||
stx A2osX.SaveSM
|
||||
ldx A2osX.SaveSX
|
||||
txs
|
||||
|
||||
jsr K.IrqH.DEV
|
||||
|
||||
GP.IrqH.JSR jsr K.IrqH.DEV SELF MODIFIED
|
||||
|
||||
tsx go back to Main
|
||||
stx A2osX.SaveSX
|
||||
@ -289,9 +255,14 @@ GP.IrqH.DEV sta SETALTZP switch to aux LC
|
||||
txs
|
||||
sta CLRALTZP
|
||||
|
||||
rts
|
||||
|
||||
GP.IrqH.Exit stz IRQ.SkipA2osX reset flag
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
IRQ.SkipA2osX .BS 1
|
||||
*--------------------------------------
|
||||
IRQ.Tick .BS 1
|
||||
IRQ.InKernel .BS 1
|
||||
IRQ.IntNum .BS 1
|
||||
@ -315,8 +286,8 @@ GP.CodeEnd .BS $BEE0-*
|
||||
*--------------------------------------
|
||||
.DA #6 60hz
|
||||
.BS 7
|
||||
.DA #0 ChRoot Disabled
|
||||
.BS 7 All Slots marked as "Free"
|
||||
.DA #0 ChRoot/Preemptive Disabled
|
||||
.HS 00000000000000 All Slots marked as "Free"
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.GP
|
||||
|
@ -573,7 +573,7 @@ IrqMgrInit >LDYAI MSG.IRQ
|
||||
php
|
||||
sei
|
||||
>LDYA $FFFE
|
||||
>STYA K.IRQ.OldFFFE
|
||||
>STYA IRQ.OldFFFE
|
||||
>LDYAI K.IrqHAuxLC
|
||||
>STYA $FFFE
|
||||
|
||||
@ -594,11 +594,9 @@ IrqMgrInit >LDYAI MSG.IRQ
|
||||
lda #"C"
|
||||
sta SYS.BASL0+38
|
||||
|
||||
lda #GP.IrqH.TCLOCK-GP.IrqH.BPL-2
|
||||
sta GP.IrqH.BPL+1
|
||||
|
||||
>LDYAI K.IrqH.TCLOCK
|
||||
>STYA K.IrqHAuxLC.JSR+1
|
||||
>STYA GP.IrqH.JSR+1
|
||||
|
||||
>LDYAI MSG.IRQ.CLOCK
|
||||
>SYSCALL PrintF.YA
|
||||
@ -612,12 +610,10 @@ IrqMgrInit >LDYAI MSG.IRQ
|
||||
lda #"V"
|
||||
sta SYS.BASL0+38
|
||||
|
||||
lda #GP.IrqH.VBL-GP.IrqH.BPL-2
|
||||
sta GP.IrqH.BPL+1
|
||||
|
||||
>LDYAI K.IrqH.VBL
|
||||
>STYA K.IrqHAuxLC.JSR+1
|
||||
|
||||
>STYA GP.IrqH.JSR+1
|
||||
|
||||
>LDYAI MSG.IRQ.VBL
|
||||
>SYSCALL PrintF.YA
|
||||
|
||||
|
@ -104,7 +104,7 @@ K.IrqHAuxLC.6 lda #$ff Self Modified
|
||||
bcc K.IrqHAuxLC.8
|
||||
|
||||
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
|
||||
*--------------------------------------
|
||||
* Called by :
|
||||
@ -177,35 +177,35 @@ K.IrqH.DEV >LDYAI Dev.Table
|
||||
|
||||
ldx DevMgr.Count
|
||||
|
||||
.4 ldy #S.DEV.S
|
||||
.1 ldy #S.DEV.S
|
||||
lda ($fe),y
|
||||
and #S.DEV.S.IRQ
|
||||
beq .6
|
||||
beq .2
|
||||
|
||||
phx
|
||||
jsr K.IrqHJMP
|
||||
ldx #DEVMGR.IRQ
|
||||
jsr .88
|
||||
plx
|
||||
bcc .8 CC, IRQ cleared by device
|
||||
|
||||
.6 lda $fe
|
||||
.2 lda $fe
|
||||
clc
|
||||
adc #S.DEV
|
||||
sta $fe
|
||||
bcc .7
|
||||
bcc .3
|
||||
inc $ff
|
||||
|
||||
.7 dex
|
||||
bne .4
|
||||
.3 dex
|
||||
bne .1
|
||||
|
||||
sec
|
||||
|
||||
.8 clv clear V (no task switching)
|
||||
rts
|
||||
*--------------------------------------
|
||||
K.IRQ.OldFFFE .BS 2
|
||||
.88 jmp ($fe)
|
||||
*--------------------------------------
|
||||
K.IrqHJMP ldx #DEVMGR.IRQ
|
||||
jmp ($fe)
|
||||
IRQ.OldFFFE .BS 2
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
||||
|
Loading…
Reference in New Issue
Block a user