mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-11 10:29:46 +00:00
Kernel version 0.9 : Saved few bytes in PS management
This commit is contained in:
parent
d297b4ad66
commit
71a7ca455f
@ -350,7 +350,9 @@ K.FreeMemA phy
|
|||||||
bit RRAMWRAMBNK2
|
bit RRAMWRAMBNK2
|
||||||
bit RRAMWRAMBNK2
|
bit RRAMWRAMBNK2
|
||||||
|
|
||||||
jsr PS.Select0
|
>LDYAI TskMgr.Table Delect PS0 for proper In/out devices
|
||||||
|
>STYA pPs
|
||||||
|
|
||||||
jsr DevMgr.SYS.Control
|
jsr DevMgr.SYS.Control
|
||||||
|
|
||||||
pla Get PC and sub 2 for calling address
|
pla Get PC and sub 2 for calling address
|
||||||
|
@ -308,35 +308,19 @@ PS.FreeA.PsY lda (ZPPtr1),y
|
|||||||
beq PS.FreeA.RTS
|
beq PS.FreeA.RTS
|
||||||
jmp K.FreeMemA
|
jmp K.FreeMemA
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* PS.SelectA
|
|
||||||
* In : A=PSID
|
|
||||||
*--------------------------------------
|
|
||||||
PS.Select0 lda #0
|
|
||||||
PS.SelectA jsr K.GetPSByIDA
|
|
||||||
bcs *
|
|
||||||
>STYA pPs
|
|
||||||
|
|
||||||
PS.Select ldy #S.PS.hCS
|
PS.Select ldy #S.PS.hCS
|
||||||
lda (pPs),y
|
lda (pPs),y
|
||||||
beq .1 PS=0 (kernel) has no CS/DS
|
|
||||||
|
|
||||||
jsr K.GetMemPtrA
|
jsr K.GetMemPtrA
|
||||||
>STYA pCode
|
>STYA pCode
|
||||||
|
|
||||||
ldy #S.PS.hDS
|
ldy #S.PS.hDS
|
||||||
lda (pPs),y
|
lda (pPs),y
|
||||||
beq .1
|
beq .8
|
||||||
|
|
||||||
jsr K.GetMemPtrA
|
jsr K.GetMemPtrA
|
||||||
>STYA pData
|
>STYA pData
|
||||||
|
|
||||||
.1 ldy #S.PS.hStdOut
|
|
||||||
lda (pPs),y
|
|
||||||
beq .8
|
|
||||||
|
|
||||||
jsr K.GetDevByIDA
|
|
||||||
>STYA pDev
|
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -17,7 +17,8 @@ K.KernelRun jsr TSK.TskMgrRun
|
|||||||
jsr TSK.DispatchEvents
|
jsr TSK.DispatchEvents
|
||||||
bcc .4 CC=All Events Dispatched
|
bcc .4 CC=All Events Dispatched
|
||||||
|
|
||||||
jsr PS.Select0
|
>LDYAI TskMgr.Table Select PS0
|
||||||
|
>STYA pPs
|
||||||
|
|
||||||
lda #EvtMgr.Table
|
lda #EvtMgr.Table
|
||||||
sta pEvent
|
sta pEvent
|
||||||
|
@ -40,7 +40,7 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0
|
|||||||
bit #S.PS.F.SLEEP Is this PS sleeping?
|
bit #S.PS.F.SLEEP Is this PS sleeping?
|
||||||
beq .3 no, call TSKMGR.RUN
|
beq .3 no, call TSKMGR.RUN
|
||||||
|
|
||||||
jsr TASK.PSWakeUp
|
jsr TSK.PSWakeUp
|
||||||
bra .4
|
bra .4
|
||||||
|
|
||||||
.30 and #$FF^S.PS.F.INIT unmark as INIT
|
.30 and #$FF^S.PS.F.INIT unmark as INIT
|
||||||
@ -61,11 +61,14 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0
|
|||||||
bcs .5 parent is dead.....skipping...
|
bcs .5 parent is dead.....skipping...
|
||||||
|
|
||||||
lda (ZPPtr1) Parent PS is HOLD?
|
lda (ZPPtr1) Parent PS is HOLD?
|
||||||
and #S.PS.F.HOLD
|
bit #S.PS.F.HOLD
|
||||||
beq .5 no...
|
beq .5 no...
|
||||||
|
|
||||||
pla yes, probably waiting for this PS to terminate....
|
eor #S.PS.F.HOLD yes, release hold...
|
||||||
ldy #S.PS.RC
|
sta (ZPPtr1)
|
||||||
|
|
||||||
|
pla ...probably waiting for this PS to terminate....
|
||||||
|
ldy #S.PS.RC give it RC
|
||||||
sta (ZPPtr1),y
|
sta (ZPPtr1),y
|
||||||
|
|
||||||
.HS B0 BCS
|
.HS B0 BCS
|
||||||
@ -89,7 +92,7 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0
|
|||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
TASK.PSWakeUp and #$FF^S.PS.F.SLEEP unmark as SLEEP
|
TSK.PSWakeUp and #$FF^S.PS.F.SLEEP unmark as SLEEP
|
||||||
sta (pPS)
|
sta (pPS)
|
||||||
|
|
||||||
ldy #S.PS.PC
|
ldy #S.PS.PC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user