Kernel version 0.8 : BUGFIX! return code not sent properly to Parent Process at CS.EXIT

This commit is contained in:
Rémy GIBERT 2016-10-31 22:38:53 +01:00
parent 92d8b2fec4
commit b724cb4c24
6 changed files with 109 additions and 52 deletions

Binary file not shown.

Binary file not shown.

View File

@ -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 |

View File

@ -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

View File

@ -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:

View File

@ -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