Kernel 0.9.1 : KERNEL, Preemtive mode, Code cleaning....step by step....

This commit is contained in:
Rémy GIBERT 2018-04-27 15:43:40 +02:00
parent b974fded06
commit fa3273bebb
6 changed files with 14 additions and 37 deletions

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ AUTO 4,1
*--------------------------------------
A2osX.MAIN.S .EQ A2osX.AUX-A2osX.MAIN
A2osX.AUX.S .EQ A2osX.GP-A2osX.AUX
A2osX.GP.S .EQ A2osX.D1-A2osX.GP
A2osX.GP.S .EQ GP.CodeEnd-GP.CodeStart
A2osX.D1.S .EQ A2osX.D2-A2osX.D1
A2osX.D2.S .EQ A2osX.E0-A2osX.D2
A2osX.E0.S .EQ A2osX.E0.E-A2osX.E0
@ -17,6 +17,9 @@ A2osX.E0.S .EQ A2osX.E0.E-A2osX.E0
.FIN
.DO A2osX.AUX.S>$C00
* ERROR:AUX too big
.FIN
.DO A2osX.GP.S>$1E0
* ERROR:GP too big
.FIN
.DO A2osX.D1.S>$1000
* ERROR:BNK1 too big

View File

@ -8,7 +8,7 @@ AUTO 4,1
* X = SYSfnc.Index
* Y,A = free for Inline param
*--------------------------------------
jmp GP.SysCall
GP.CodeStart jmp GP.SysCall
*--------------------------------------
* LIBCALL (AUXLC to AUXLC)
* Used by user
@ -281,34 +281,9 @@ GP.IrqH.DEV sta SETALTZP switch to aux LC
ldx A2osX.SaveSX
txs
>LDYAI Dev.Table
>STYA $fe
ldx DevMgr.Count
jsr K.IrqH.DEV
.4 ldy #S.DEV.S
lda ($fe),y
and #S.DEV.S.IRQ
beq .6
phx
jsr GP.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 tsx go back to Main
tsx go back to Main
stx A2osX.SaveSX
ldx A2osX.SaveSM
txs
@ -316,9 +291,6 @@ GP.IrqH.DEV sta SETALTZP switch to aux LC
rts
*--------------------------------------
GP.IrqHJMP ldx #DEVMGR.IRQ
jmp ($fe)
*--------------------------------------
IRQ.SkipA2osX .BS 1
IRQ.Tick .BS 1
IRQ.InKernel .BS 1
@ -333,7 +305,7 @@ IRQ.VBL.MRM jmp $0000
*--------------------------------------
*BrkHandler bra *
*--------------------------------------
.BS $BEE0-*
GP.CodeEnd .BS $BEE0-*
*--------------------------------------
* $BEE0->$BEEF : Public Variables
*--------------------------------------

View File

@ -126,8 +126,8 @@ 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 ?
lda MOUSESTSx,x
and #MOUSESTSx.INTVBL IRQ was caused by VBL ?
beq K.IrqH.DEV
ldx IRQ.VBL.MRM+2 $Cn

View File

@ -399,16 +399,18 @@ K.GetPSList.YA >STYA ZPPtr1
lda CORE.InKernelStat
sta (ZPPtr1),y
iny
.1 lda PS.Table.PID,x
beq .2
lda PS.Table.hMem,x
iny
sta (ZPPtr1),y
iny
lda PS.Table.Stat,x
iny
sta (ZPPtr1),y
iny
.2 inx
cpx CORE.PSCount