From: Alan Cox Date: Wed, 11 Mar 2015 11:27:18 +0000 (+0000) Subject: zx128: Fix fork() copier X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=52f3ad826c8176b8c70b4fcaf4401b149fc54362;p=FUZIX.git zx128: Fix fork() copier We now get to the login prompt, but logging in ends rather badly. --- diff --git a/Kernel/platform-zx128/tricks.s b/Kernel/platform-zx128/tricks.s index 1e4143a8..415774af 100644 --- a/Kernel/platform-zx128/tricks.s +++ b/Kernel/platform-zx128/tricks.s @@ -272,11 +272,10 @@ _dofork: ; Copy done - ld hl, (U_DATA__U_PAGE) ; parent memory - ld a, l + ld a, (U_DATA__U_PAGE) ; parent memory or #0x18 ; get the right ROMs ld bc, #0x7ffd - out (c), a ; Switch context to parent + out (c), a ; Switch context to parent in 0xC000+ ; We are going to copy the uarea into the parents uarea stash ; we must not touch the parent uarea after this point, any @@ -287,7 +286,7 @@ _dofork: ldir ; - ; And back into the child + ; And back into the kernel ; ld bc, #0x7ffd ld a, (current_map) @@ -340,8 +339,8 @@ _dofork: bankfork: or #0x18 ; ROM bits for the bank ld b, #0x3C ; 40 x 256 minus 4 sets for the uarea stash/irqs -bankfork_1: ld hl, #0xC000 ; base of memory to fork (vectors included) +bankfork_1: push bc ; Save our counter and also child offset push hl ld bc, #0x7ffd