mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-16 18:30:26 +00:00
Kernel 0.9.1 : KERNEL, bugfix in task swithcer
This commit is contained in:
parent
38f75321b9
commit
4ad03e1391
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -385,7 +385,7 @@ S.PS.RC .EQ 13
|
||||
S.PS.ARGC .EQ 14
|
||||
S.PS.hARGS .EQ 15
|
||||
|
||||
S.PS.STATS .EQ 16
|
||||
* .EQ 16
|
||||
|
||||
S.PS.A .EQ 17
|
||||
S.PS.X .EQ 18
|
||||
|
@ -7,7 +7,7 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
K.ENV.SIZE .EQ 256
|
||||
K.FLT.MAX .EQ 4
|
||||
K.EVT.MAX .EQ 8
|
||||
K.EVT.MAX .EQ 4
|
||||
K.DEV.MAX .EQ 32
|
||||
K.PS.MAX .EQ 32
|
||||
*--------------------------------------
|
||||
@ -113,8 +113,9 @@ K.Buf256 .EQ $0C00 Main
|
||||
*--------------------------------------
|
||||
PS.Table.PID .EQ $0D00 K.PS.MAX
|
||||
PS.Table.hMem .EQ $0D20 K.PS.MAX
|
||||
PS.Table.Stat .EQ $0D40 K.PS.MAX
|
||||
*--------------------------------------
|
||||
Evt.Table .EQ $0D40 K.EVT.MAX*S.EVT.SIZE=8*8=64b
|
||||
Evt.Table .EQ $0D60 K.EVT.MAX*S.EVT.SIZE=4*8=32b
|
||||
*--------------------------------------
|
||||
Flt.Table .EQ $0D80 K.FLT.MAX*S.FLT.SIZE=4*32=128b
|
||||
*--------------------------------------
|
||||
|
@ -4,9 +4,9 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
CORE.Run lda CORE.PSCount
|
||||
sta CORE.Counter
|
||||
bne .1 SHOULD NEVER HAPPEN!!!
|
||||
* bne .1 SHOULD NEVER HAPPEN!!!
|
||||
|
||||
jmp CORE.Events
|
||||
* jmp CORE.Events
|
||||
|
||||
.1 ldx CORE.Counter
|
||||
lda PS.Table.PID-1,x
|
||||
@ -40,9 +40,7 @@ CORE.Run lda CORE.PSCount
|
||||
sta (pPS)
|
||||
|
||||
jsr CORE.Resume Restore PC....and JMP to
|
||||
dec IRQ.InKernel
|
||||
bcc .7
|
||||
bcs .5
|
||||
bra .41
|
||||
|
||||
.3 bit #S.PS.F.INIT
|
||||
beq .4
|
||||
@ -56,7 +54,7 @@ CORE.Run lda CORE.PSCount
|
||||
|
||||
jsr CORE.pCodeJmp Call INIT/RUN function
|
||||
dec IRQ.InKernel
|
||||
bcc .7 INIT/RUN/RESUME said CS=QUIT?
|
||||
.41 bcc .7 INIT/RUN/RESUME said CS=QUIT?
|
||||
|
||||
.5 tax save RC
|
||||
ldy #S.PS.PPID Notify Parent Process for exit code...
|
||||
@ -458,12 +456,7 @@ CORE.PSLeave ldy #S.PS.ZP+ZPBIN.SIZE-1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.Switch php
|
||||
sec
|
||||
.HS 2C BIT ABS
|
||||
*--------------------------------------
|
||||
CORE.Sleep php
|
||||
clc
|
||||
|
||||
sei
|
||||
cld
|
||||
@ -593,7 +586,7 @@ CORE.Tick10t .BS 1
|
||||
CORE.Counter .BS 1
|
||||
CORE.PSCount .DA #0
|
||||
CORE.LastPSID .DA #0
|
||||
CORE.S.PS0 .BS S.PS.STATS+1
|
||||
CORE.S.PS0 .BS S.PS.hStdErr+1
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.CORE
|
||||
|
@ -538,10 +538,10 @@ PS0Init ldx #S.DEV*2 NUL,SYS
|
||||
ldy #S.PS.hStdIn
|
||||
sta (pPs),y
|
||||
sta CORE.S.PS0+S.PS.hStdIn
|
||||
ldy #S.PS.hStdOut
|
||||
iny #S.PS.hStdOut
|
||||
sta (pPs),y
|
||||
sta CORE.S.PS0+S.PS.hStdOut
|
||||
ldy #S.PS.hStdErr
|
||||
iny #S.PS.hStdErr
|
||||
sta (pPs),y
|
||||
sta CORE.S.PS0+S.PS.hStdErr
|
||||
|
||||
|
@ -21,7 +21,8 @@ K.IrqHAuxLC cld
|
||||
pla
|
||||
pha
|
||||
and #$10 BRK?
|
||||
bne K.IrqHAuxLC.6
|
||||
bne *
|
||||
* bne K.IrqHAuxLC.6
|
||||
|
||||
stx K.IrqHAuxLC.5+1
|
||||
sty K.IrqHAuxLC.4+1
|
||||
@ -83,9 +84,9 @@ K.IrqHAuxLC.3 pla
|
||||
lda $103,x get IRQ pushed P
|
||||
sta $101,x down 2 bytes
|
||||
|
||||
lda #CORE.Switch make a RTI like "jsr CORE.Sleep"
|
||||
lda #CORE.Sleep make a RTI like "jsr CORE.Sleep"
|
||||
sta $102,x
|
||||
lda /CORE.Switch with RTS=PC IRQ-1
|
||||
lda /CORE.Sleep with RTS=PC IRQ-1
|
||||
sta $103,x
|
||||
|
||||
K.IrqHAuxLC.4 ldy #$ff Self Modified
|
||||
@ -140,10 +141,10 @@ K.IrqH.Switch inc IRQ.Tick
|
||||
eor SYS.BASL0+37
|
||||
sta SYS.BASL0+37
|
||||
|
||||
ldy #S.PS.STATS
|
||||
lda (pPs),y
|
||||
inc
|
||||
sta (pPs),y
|
||||
* ldy #S.PS.STATS
|
||||
* lda (pPs),y
|
||||
* inc
|
||||
* sta (pPs),y
|
||||
bvc *
|
||||
|
||||
.8 clc exit with V flag set
|
||||
|
Loading…
x
Reference in New Issue
Block a user