diff --git a/A2OSX.BOOT.po b/A2OSX.BOOT.po index 17a31f41..9c83b9b9 100644 Binary files a/A2OSX.BOOT.po and b/A2OSX.BOOT.po differ diff --git a/A2OSX.SRC.po b/A2OSX.SRC.po index 63bb8620..ade9ec96 100644 Binary files a/A2OSX.SRC.po and b/A2OSX.SRC.po differ diff --git a/README.md b/README.md index 85fe3d23..b79bb4ea 100644 --- a/README.md +++ b/README.md @@ -99,16 +99,19 @@ note : '$VAR' does NOT expand Variable | PS | Working | | 0.8 | | MD | Working | | 0.8 | | LS | Working | -A : Do Not Print . & .. | 0.8 | -| | | -L : long listing with size/date... | 0.8 | +| | | -L : long listing with size/date... | | | | | -R : Recurse subdirectories | | -| RM | Working | -C : Continue On Error | | +| RM | Working | -C : Continue On Error | 0.8 | | | | -R : Recurse subdirectories | | -| CP | In Progress | -C : Continue On Error | | +| CP | In Progress | -C : Continue On Error | 0.8 | | | | -R : Recurse subdirectories | | | | | -Y : Dont't Prompt For Override | | -| MV | In Progress | -C : Continue On Error | | +| MV | In Progress | -C : Continue On Error | 0.8 | | | | -R : Recurse subdirectories | | | | | -Y : Dont't Prompt For Override | | +| CAT | In Progress | -A : Show All non printable caracters | 0.8 | +| | | -N : Number all output lines | | +| | | -S : Suppress repeated empty output lines | | | ARP | Working | dump ARP cache, setup a static ARP entry | 0.8 | | PING | Working | | 0.8 | | DNSINFO | Working | dump DNS cache, setup a static DNS entry | | 0.8 | diff --git a/SYS/KERNEL.S.PS.txt b/SYS/KERNEL.S.PS.txt index 1dc7574c..042e6f0e 100644 --- a/SYS/KERNEL.S.PS.txt +++ b/SYS/KERNEL.S.PS.txt @@ -4,16 +4,16 @@ NEW INC 1 AUTO 6 .LIST OFF -*-------------------------------------- -* K.ExecProcessNewEnvYA -* K.ExecProcessYA (Blocking Parent PID) -* K.CreateProcessNewEnvYA -* K.CreateProcessYA (Non Blocking) -* in : +*/-------------------------------------- +* #ExecProcessNewEnvYA +* #ExecProcessYA (Blocking Parent PID) +* #CreateProcessNewEnvYA +* #CreateProcessYA (Non Blocking) +* ##In: * Y,A = PTR To Cmd Line -* out : +* ##Out: * A = Child PSID -*-------------------------------------- +*\-------------------------------------- K.ExecProcessNewEnvYA ldx #S.PS.F.ENV+S.PS.F.HOLD .HS 2C bit abs @@ -61,13 +61,13 @@ K.CreateProcess.Flags .BS 1 K.CreateProcess.hCmdLine .BS 1 K.CreateProcess.CmdLine .BS 2 K.CreateProcess.CPSID .BS 1 -*-------------------------------------- -* K.GetPSByIDA -* In : -* A = PID -* Out : -* Y,A = PTR to TSKSLOT -*-------------------------------------- +*/-------------------------------------- +* #GetPSByIDA +* ##In : +* A = PID +* ##Out : +* Y,A = PTR to TSKSLOT +*\-------------------------------------- K.GetPSByIDA sta K.GetPSByIDA.PS >LDYAI TskMgr.Table @@ -106,7 +106,14 @@ K.GetPSByIDA sta K.GetPSByIDA.PS rts *-------------------------------------- K.GetPSByIDA.PS .BS 1 -*-------------------------------------- +*/-------------------------------------- +* #Sleep +* Make current process suspend until next RUN +* ##In : +* (none) +* ##Out : +* (none) +*\-------------------------------------- K.Sleep pla get PC LO sec sbc pCode diff --git a/SYS/KERNEL.S.TSK.txt b/SYS/KERNEL.S.TSK.txt index 21ef427d..420d911e 100644 --- a/SYS/KERNEL.S.TSK.txt +++ b/SYS/KERNEL.S.TSK.txt @@ -11,11 +11,12 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0 >STYA pPs lda TSKMGR.SIZE - dec skip PS 0 sta TSKMGR.COUNT - beq .8 no process.... -.1 lda (pPs) get S.PS.F +.1 dec TSKMGR.COUNT skip PS 0 + beq .8 + + lda (pPs) get S.PS.F bit #S.PS.F.INUSE In use ? beq .7 @@ -35,60 +36,75 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0 lda (pPS) bit #S.PS.F.INIT - beq .20 + bne .30 - and #$FF^S.PS.F.INIT unmark as INIT + bit #S.PS.F.SLEEP Is this PS sleeping? + beq .3 no, call TSKMGR.RUN + + jsr TASK.PSWakeUp + bra .4 + +.30 and #$FF^S.PS.F.INIT unmark as INIT sta (pPS) ldx #TSKMGR.INIT - bra .31 - -.20 bit #S.PS.F.SLEEP Is this PS sleeping? - beq .3 no, call TSKMGR.RUN - - and #$FF^S.PS.F.SLEEP unmark as SLEEP - sta (pPS) - - ldy #S.PS.PC - lda (pPs),y - sec Advance PC by one as it was saved by a JSR - adc pCode - sta .21+1 - iny - lda (pPs),y - adc pCode+1 - sta .21+2 - -.21 jsr $FFFF - bra .4 - + .HS 2C BIT abs .3 ldx #TSKMGR.RUN .31 jsr pCodeJmp Call INIT/RUN function .4 bcc .7 INIT/RUN said CS=QUIT? + + pha save RC + ldy #S.PS.PPID Notify Parent Process for exit code... + lda (pPs),y + jsr K.GetPSByIDA will set ZPQuickPtr1 if success + bcs .5 parent is dead.....skipping... - ldx #TSKMGR.QUIT yes, quit this process + lda (ZPQuickPtr1) Parent PS is HOLD? + and #S.PS.F.HOLD + beq .5 no... + + pla yes, probably waiting for this PS to terminate.... + ldy #S.PS.RC + sta (ZPQuickPtr1),y + + .HS B0 BCS +.5 pla + +.6 ldx #TSKMGR.QUIT yes, quit this process jsr pCodeJmp Call QUIT function ldy #S.PS.PID lda (pPs),y jsr PS.FreeA - bcs * .7 lda pPs clc adc #S.PS sta pPs - bcc .71 + bcc .1 inc pPs+1 + bcs .1 Always -.71 dec TSKMGR.COUNT - bne .1 - .8 clc rts *-------------------------------------- +TASK.PSWakeUp and #$FF^S.PS.F.SLEEP unmark as SLEEP + sta (pPS) + + ldy #S.PS.PC + lda (pPs),y + sec Advance PC by one as it was saved by a JSR + adc pCode setup by PS.Select + sta .1+1 + iny + lda (pPs),y + adc pCode+1 + sta .1+2 + +.1 jmp $FFFF +*-------------------------------------- * TSK.DispatchEvents * IN: * OUT: diff --git a/_Docs/KERNEL.md b/_Docs/KERNEL.md index 653fe470..e6f4bece 100644 --- a/_Docs/KERNEL.md +++ b/_Docs/KERNEL.md @@ -361,6 +361,37 @@ Return information about a file + Y,A = ZPMemMgrSPtr = PTR to S.MEM + X unmodified +#ExecProcessNewEnvYA + +#ExecProcessYA (Blocking Parent PID) + +#CreateProcessNewEnvYA + +#CreateProcessYA (Non Blocking) + +##In: + + Y,A = PTR To Cmd Line + +##Out: + + A = Child PSID + +#GetPSByIDA + +##In : ++ A = PID + +##Out : ++ Y,A = PTR to TSKSLOT + +#Sleep +Make current process suspend until next RUN + +##In : ++ (none) + +##Out : ++ (none) + #NewPStrYA Create a new copy of PSTR