From: Paul Riley
Always darkest before the dawn.
Well, we'll see.
I found _that_ one; process 1 managed to exec() init, do a fork(), and then
the child process exec()'d the shell - then that apparently died, and the code
in init falls through into:
termall();
execl(init, minus, 0);
when the single-user shell exits, so then init restarted; rinse, repeat.
So a _lot_ of the code in mch.s seemed to be working correctly; system calls
(2 exec()'s, and a fork()) worked, processing switching worked, device
interrupts (for the disk and console tty) seemed to be working.. Not sure
what's left!
So I looked at mch.s again, to see what else _was_ there, and I noticed a
place where I used R0 as a temp - with the MFPS/MTPS thing to get to the PS,
instructions like:
BIS #340, PS
need to change to:
MFPS R0
BIS #340, R0
MTPS R0
and R0 was being used to hold an arg (in pword:), and was being bashed.
So I fixed it, and now the shell starts OK, but attempting to do any command
(e.g. "echo foo"), things hang (the shell doesn't fork). If I type the
interrupt character, the shell exits, and init restarts.
Oh well, hopefully this one won't be too painful to work out. The system's
mostly working, which I think will really help.
Noel