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
|
||||
|
||||
jsr PS.Select0
|
||||
>LDYAI TskMgr.Table Delect PS0 for proper In/out devices
|
||||
>STYA pPs
|
||||
|
||||
jsr DevMgr.SYS.Control
|
||||
|
||||
pla Get PC and sub 2 for calling address
|
||||
|
@ -308,35 +308,19 @@ PS.FreeA.PsY lda (ZPPtr1),y
|
||||
beq PS.FreeA.RTS
|
||||
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
|
||||
lda (pPs),y
|
||||
beq .1 PS=0 (kernel) has no CS/DS
|
||||
|
||||
jsr K.GetMemPtrA
|
||||
>STYA pCode
|
||||
|
||||
ldy #S.PS.hDS
|
||||
lda (pPs),y
|
||||
beq .1
|
||||
beq .8
|
||||
|
||||
jsr K.GetMemPtrA
|
||||
>STYA pData
|
||||
|
||||
.1 ldy #S.PS.hStdOut
|
||||
lda (pPs),y
|
||||
beq .8
|
||||
|
||||
jsr K.GetDevByIDA
|
||||
>STYA pDev
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -17,7 +17,8 @@ K.KernelRun jsr TSK.TskMgrRun
|
||||
jsr TSK.DispatchEvents
|
||||
bcc .4 CC=All Events Dispatched
|
||||
|
||||
jsr PS.Select0
|
||||
>LDYAI TskMgr.Table Select PS0
|
||||
>STYA pPs
|
||||
|
||||
lda #EvtMgr.Table
|
||||
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?
|
||||
beq .3 no, call TSKMGR.RUN
|
||||
|
||||
jsr TASK.PSWakeUp
|
||||
jsr TSK.PSWakeUp
|
||||
bra .4
|
||||
|
||||
.30 and #$FF^S.PS.F.INIT unmark as INIT
|
||||
@ -60,12 +60,15 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0
|
||||
jsr K.GetPSByIDA will set ZPPtr1 if success
|
||||
bcs .5 parent is dead.....skipping...
|
||||
|
||||
lda (ZPPtr1) Parent PS is HOLD?
|
||||
and #S.PS.F.HOLD
|
||||
lda (ZPPtr1) Parent PS is HOLD?
|
||||
bit #S.PS.F.HOLD
|
||||
beq .5 no...
|
||||
|
||||
pla yes, probably waiting for this PS to terminate....
|
||||
ldy #S.PS.RC
|
||||
eor #S.PS.F.HOLD yes, release hold...
|
||||
sta (ZPPtr1)
|
||||
|
||||
pla ...probably waiting for this PS to terminate....
|
||||
ldy #S.PS.RC give it RC
|
||||
sta (ZPPtr1),y
|
||||
|
||||
.HS B0 BCS
|
||||
@ -89,7 +92,7 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0
|
||||
.8 clc
|
||||
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)
|
||||
|
||||
ldy #S.PS.PC
|
||||
|
Loading…
x
Reference in New Issue
Block a user