diff options
Diffstat (limited to 'src/proc.asm')
| -rw-r--r-- | src/proc.asm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/proc.asm b/src/proc.asm index cd79160..c22d40d 100644 --- a/src/proc.asm +++ b/src/proc.asm @@ -226,7 +226,9 @@ ProcCreate:: ld [hl+], a ; PROC_STDIN = console ld [hl+], a ; PROC_STDOUT = console ld a, $FF - ld [hl], a ; PROC_PROG = none + ld [hl+], a ; PROC_PROG = none + ld a, ROOT_INO + ld [hl], a ; PROC_CWD = root ; build the initial stack frame in the task's RAM bank ld a, [wTmpEntry] @@ -458,7 +460,10 @@ sys_fork:: ld [hl+], a ; child STDOUT = parent STDOUT inc de ld a, [de] - ld [hl], a ; child PROC_PROG = parent PROC_PROG + ld [hl+], a ; child PROC_PROG = parent PROC_PROG + inc de + ld a, [de] + ld [hl], a ; child PROC_CWD = parent PROC_CWD ; ---- return to the parent with child pid ---- ld a, [wForkUserSP] |
