mirror of https://github.com/A2osX/A2osX.git
Kernel 0.94
This commit is contained in:
parent
c305aee13e
commit
c288baded3
Binary file not shown.
|
@ -94,7 +94,7 @@ K.Fork jsr PS.CreateChild A=PID,Child S.PS at PS.NewPSPtr,PS.Load.hMem
|
|||
sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.hCS
|
||||
lda (pPS),y
|
||||
lda (ZPPtr1),y
|
||||
sta (PS.NewPSPtr),y
|
||||
jsr MEM.GetMemByID
|
||||
jsr Mem.IncRefCnt
|
||||
|
@ -111,7 +111,7 @@ K.Fork jsr PS.CreateChild A=PID,Child S.PS at PS.NewPSPtr,PS.Load.hMem
|
|||
sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.hDS
|
||||
lda (pPS),y
|
||||
lda (ZPPtr1),y
|
||||
jsr MEM.Dup
|
||||
bcs .9
|
||||
|
||||
|
@ -126,7 +126,7 @@ K.Fork jsr PS.CreateChild A=PID,Child S.PS at PS.NewPSPtr,PS.Load.hMem
|
|||
sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.hSS
|
||||
lda (pPS),y
|
||||
lda (ZPPtr1),y
|
||||
jsr MEM.Dup
|
||||
bcs .9
|
||||
|
||||
|
@ -141,14 +141,14 @@ K.Fork jsr PS.CreateChild A=PID,Child S.PS at PS.NewPSPtr,PS.Load.hMem
|
|||
sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.hARGV
|
||||
lda (pPS),y
|
||||
lda (ZPPtr1),y
|
||||
jsr MEM.Dup
|
||||
bcs .9
|
||||
|
||||
ldy #S.PS.hARGV
|
||||
sta (PS.NewPSPtr),y
|
||||
dey
|
||||
lda (pPS),y S.PS.ARGC
|
||||
lda (ZPPtr1),y S.PS.ARGC
|
||||
sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.ARGC
|
||||
|
@ -162,7 +162,7 @@ K.Fork jsr PS.CreateChild A=PID,Child S.PS at PS.NewPSPtr,PS.Load.hMem
|
|||
sta (PS.NewPSPtr),y Forked PS will get A=PSID=0
|
||||
iny
|
||||
|
||||
.1 lda (pPS),y
|
||||
.1 lda (ZPPtr1),y
|
||||
sta (PS.NewPSPtr),y
|
||||
iny
|
||||
cpy #S.PS.hSession
|
||||
|
@ -170,7 +170,7 @@ K.Fork jsr PS.CreateChild A=PID,Child S.PS at PS.NewPSPtr,PS.Load.hMem
|
|||
|
||||
ldy #S.PS.ZP.LOCAL
|
||||
|
||||
.2 lda (pPS),y
|
||||
.2 lda (ZPPtr1),y
|
||||
sta (PS.NewPSPtr),y
|
||||
iny
|
||||
cpy #S.PS
|
||||
|
@ -234,20 +234,24 @@ PS.CreateChild ldx #0
|
|||
lda CORE.LastPSID
|
||||
ldy #S.PS.PID
|
||||
sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.PPID
|
||||
lda #S.PS.F.NOHUP
|
||||
and PS.Flags
|
||||
beq .5 set PPID = 0
|
||||
bit PS.Flags
|
||||
beq .5
|
||||
|
||||
iny #S.PS.PID
|
||||
lda (pPS),y
|
||||
lda PS.Table.hPS Select PS0
|
||||
jsr K.GetMemPtr
|
||||
bra .6
|
||||
|
||||
.5 >LDYA pPs
|
||||
|
||||
.6 >STYA ZPPtr1 = Parent process
|
||||
ldy #S.PS.PID
|
||||
lda (ZPPtr1),y
|
||||
dey #S.PS.PPID
|
||||
sta (PS.NewPSPtr),y
|
||||
|
||||
.5 sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.hCWD copy hPREFIX...
|
||||
lda (pPS),y
|
||||
ldy #S.PS.hCWD copy hPREFIX...
|
||||
lda (ZPPtr1),y
|
||||
jsr K.GetMemPtr
|
||||
|
||||
jsr K.StrDup
|
||||
|
@ -260,7 +264,7 @@ PS.CreateChild ldx #0
|
|||
sta (PS.NewPSPtr),y
|
||||
|
||||
ldy #S.PS.hENV
|
||||
lda (pPS),y
|
||||
lda (ZPPtr1),y
|
||||
|
||||
jsr MEM.DupX dup hENV from parent PS
|
||||
bcs .9
|
||||
|
@ -270,14 +274,14 @@ PS.CreateChild ldx #0
|
|||
|
||||
ldy #S.PS.hStdIn
|
||||
|
||||
.7 lda (pPS),y
|
||||
.7 lda (ZPPtr1),y
|
||||
sta (PS.NewPSPtr),y
|
||||
iny
|
||||
cpy #S.PS.hStdErr+1
|
||||
bne .7
|
||||
|
||||
ldy #S.PS.hSession
|
||||
lda (pPS),y
|
||||
lda (ZPPtr1),y
|
||||
sta (PS.NewPSPtr),y
|
||||
|
||||
* tax
|
||||
|
@ -288,12 +292,11 @@ PS.CreateChild ldx #0
|
|||
lda #S.PS.F.HOLD
|
||||
bit PS.Flags
|
||||
beq .8
|
||||
|
||||
ora (pPS)
|
||||
sta (pPS) HOLD parent PS
|
||||
ora (ZPPtr1)
|
||||
sta (ZPPtr1) HOLD parent PS
|
||||
lda CORE.LastPSID
|
||||
ldy #S.PS.CPID
|
||||
sta (pPS),y
|
||||
sta (ZPPtr1),y
|
||||
.8
|
||||
* lda #S.PS.S.INIT
|
||||
* ldy #S.PS.S
|
||||
|
|
Loading…
Reference in New Issue