From 275f24eaa4250b7c42898c85b391047f74e559a0 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 10 Feb 2019 16:02:28 +0000 Subject: [PATCH] v8080: fix up the fork copier Leave some debug in for now. With this in place we get a shell prompt - then task switch and die fork() is really slow. For 8080 we definitely need some smarter logic here to only copy 0->brk and sp->top and clean up as needed in brk(). --- Kernel/platform-v8080/README | 10 ++++----- Kernel/platform-v8080/tricks.s | 37 ++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/Kernel/platform-v8080/README b/Kernel/platform-v8080/README index 45f76828..7e248d49 100644 --- a/Kernel/platform-v8080/README +++ b/Kernel/platform-v8080/README @@ -1,11 +1,9 @@ Some initial development code for 8080 support -This is not finished (the block copiers for forking, udata and usermem all -need writing). - -Still need to hook up the kernel helpers for RST calls or it'll blow up on -boot pretty spectacularly! - +Bugs: +tty behaves oddly once it hits shell (newline doesn't work stuff^J seems to, and +shell shows [junk] not found in child - but that could be arg copying bugs) +could be some kind of uput bug ? Also to deal with - The C compiler bombs on the adventure game builds diff --git a/Kernel/platform-v8080/tricks.s b/Kernel/platform-v8080/tricks.s index 175e702a..bf9250ae 100644 --- a/Kernel/platform-v8080/tricks.s +++ b/Kernel/platform-v8080/tricks.s @@ -20,65 +20,68 @@ outer: inner: ! We do 8 bytes per loop and 254 loops per inner loop, so ! 24 inner loops per run copies the needed space and a tiny shade - ! over + ! over (which in this case is fine as it's udata which we will + ! copy from common to common so do nothing to) mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h mov a,b - out 23 + out 21 mov d,m mov a,c - out 23 + out 21 mov m,d inx h dcr e jnz inner + mvi a,'@' + out 1 pop d dcr d jnz outer -- 2.34.1