mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-12 04:29:31 +00:00
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
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
ldy #S.PS.hCS
|
ldy #S.PS.hCS
|
||||||
lda (pPS),y
|
lda (ZPPtr1),y
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
jsr MEM.GetMemByID
|
jsr MEM.GetMemByID
|
||||||
jsr Mem.IncRefCnt
|
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
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
ldy #S.PS.hDS
|
ldy #S.PS.hDS
|
||||||
lda (pPS),y
|
lda (ZPPtr1),y
|
||||||
jsr MEM.Dup
|
jsr MEM.Dup
|
||||||
bcs .9
|
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
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
ldy #S.PS.hSS
|
ldy #S.PS.hSS
|
||||||
lda (pPS),y
|
lda (ZPPtr1),y
|
||||||
jsr MEM.Dup
|
jsr MEM.Dup
|
||||||
bcs .9
|
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
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
ldy #S.PS.hARGV
|
ldy #S.PS.hARGV
|
||||||
lda (pPS),y
|
lda (ZPPtr1),y
|
||||||
jsr MEM.Dup
|
jsr MEM.Dup
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
ldy #S.PS.hARGV
|
ldy #S.PS.hARGV
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
dey
|
dey
|
||||||
lda (pPS),y S.PS.ARGC
|
lda (ZPPtr1),y S.PS.ARGC
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
ldy #S.PS.ARGC
|
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
|
sta (PS.NewPSPtr),y Forked PS will get A=PSID=0
|
||||||
iny
|
iny
|
||||||
|
|
||||||
.1 lda (pPS),y
|
.1 lda (ZPPtr1),y
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
iny
|
iny
|
||||||
cpy #S.PS.hSession
|
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
|
ldy #S.PS.ZP.LOCAL
|
||||||
|
|
||||||
.2 lda (pPS),y
|
.2 lda (ZPPtr1),y
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
iny
|
iny
|
||||||
cpy #S.PS
|
cpy #S.PS
|
||||||
|
@ -234,20 +234,24 @@ PS.CreateChild ldx #0
|
||||||
lda CORE.LastPSID
|
lda CORE.LastPSID
|
||||||
ldy #S.PS.PID
|
ldy #S.PS.PID
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
ldy #S.PS.PPID
|
|
||||||
lda #S.PS.F.NOHUP
|
lda #S.PS.F.NOHUP
|
||||||
and PS.Flags
|
bit PS.Flags
|
||||||
beq .5 set PPID = 0
|
beq .5
|
||||||
|
|
||||||
iny #S.PS.PID
|
lda PS.Table.hPS Select PS0
|
||||||
lda (pPS),y
|
jsr K.GetMemPtr
|
||||||
|
bra .6
|
||||||
|
|
||||||
|
.5 >LDYA pPs
|
||||||
|
|
||||||
|
.6 >STYA ZPPtr1 = Parent process
|
||||||
|
ldy #S.PS.PID
|
||||||
|
lda (ZPPtr1),y
|
||||||
dey #S.PS.PPID
|
dey #S.PS.PPID
|
||||||
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
.5 sta (PS.NewPSPtr),y
|
ldy #S.PS.hCWD copy hPREFIX...
|
||||||
|
lda (ZPPtr1),y
|
||||||
ldy #S.PS.hCWD copy hPREFIX...
|
|
||||||
lda (pPS),y
|
|
||||||
jsr K.GetMemPtr
|
jsr K.GetMemPtr
|
||||||
|
|
||||||
jsr K.StrDup
|
jsr K.StrDup
|
||||||
|
@ -260,7 +264,7 @@ PS.CreateChild ldx #0
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
ldy #S.PS.hENV
|
ldy #S.PS.hENV
|
||||||
lda (pPS),y
|
lda (ZPPtr1),y
|
||||||
|
|
||||||
jsr MEM.DupX dup hENV from parent PS
|
jsr MEM.DupX dup hENV from parent PS
|
||||||
bcs .9
|
bcs .9
|
||||||
|
@ -270,14 +274,14 @@ PS.CreateChild ldx #0
|
||||||
|
|
||||||
ldy #S.PS.hStdIn
|
ldy #S.PS.hStdIn
|
||||||
|
|
||||||
.7 lda (pPS),y
|
.7 lda (ZPPtr1),y
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
iny
|
iny
|
||||||
cpy #S.PS.hStdErr+1
|
cpy #S.PS.hStdErr+1
|
||||||
bne .7
|
bne .7
|
||||||
|
|
||||||
ldy #S.PS.hSession
|
ldy #S.PS.hSession
|
||||||
lda (pPS),y
|
lda (ZPPtr1),y
|
||||||
sta (PS.NewPSPtr),y
|
sta (PS.NewPSPtr),y
|
||||||
|
|
||||||
* tax
|
* tax
|
||||||
|
@ -288,12 +292,11 @@ PS.CreateChild ldx #0
|
||||||
lda #S.PS.F.HOLD
|
lda #S.PS.F.HOLD
|
||||||
bit PS.Flags
|
bit PS.Flags
|
||||||
beq .8
|
beq .8
|
||||||
|
ora (ZPPtr1)
|
||||||
ora (pPS)
|
sta (ZPPtr1) HOLD parent PS
|
||||||
sta (pPS) HOLD parent PS
|
|
||||||
lda CORE.LastPSID
|
lda CORE.LastPSID
|
||||||
ldy #S.PS.CPID
|
ldy #S.PS.CPID
|
||||||
sta (pPS),y
|
sta (ZPPtr1),y
|
||||||
.8
|
.8
|
||||||
* lda #S.PS.S.INIT
|
* lda #S.PS.S.INIT
|
||||||
* ldy #S.PS.S
|
* ldy #S.PS.S
|
||||||
|
|
Loading…
Reference in New Issue
Block a user