[TUHS] Whence 1st Edition Unix Kernel Assembly?
newsham at lava.net
Tue Apr 29 02:52:16 AEST 2008
> The date on the first page of the memo (PDF) is September 1972. That puts
> the memo after 2nd Edition (June 1972) and 3rd Edition (Feb 1973).
The cover sheet says sept 14, 1972, an invitation to a talk on the
internals of unix. The next page, titled "Preliminary Release of
UNIX Implementation Documentation", is dated 6/20/72. The actual
unix sources contain a header and a footer and the footer states
"Issue D Date 3/17/72". So the sources are probably from much
earlier in the year.
I was reading through a lot of the 1e manuals that are online (on dmr's
page). Much of what is said there lines up with the sources. For example,
it mentions that core files are 8kbyte of memory plus a few more bytes for
process state. The kernel sources write out this amount of memory on core
dump. The notes from dmr mention that the machine is a PDP-11/20 with
24kbyte of memory and the memory layout in u0 reserves 16kbyte for kernel
memory and 8kbyte for user memory.
One possible deviation is that the tty0(IV) man page says there are six
devices, but the u0 srcs sets ntty to 8+1 (I'm assuming the +1 is for
the console tty).
DMR's comments hints that they will be omving to the PDP-11/45 soon after
"By this time we knew about the upcoming PDP-11/45, and had visited
Digital in Maynard to talk about it; in particular, we had the specs
for the floating-point instructions it supported. So the system
described here included a simulator for the instructions (fptrap(III))."
But it appears the kernel code we have is still just for a 24kbyte
machine (I'm assuming they would have gotten more memory when they
got a new machine?).
Anyway, I'm far from an expert on old PDP's or old UNIX's, but my
gut feeling so far is that this is pretty close to what is described
in the 1ed manuals that are online.
> I'm assuming that some of you are keen to see it running. It's going to
> take a lot of work, especially on the debugging side. The existing 1972
> binaries are already executable using my Apout emulator, so that will
> help in two ways: we can run the old assembler, and we can tell if a bug
> was in a userland binary and not in the kernel.
Ahh! I wasn't aware of that! Excellent. I would definitely like to
play with it some. So far I've been using the 7e assembler to
validate that the code is in compilable condition to help weed out
typos. The only gotcha I came across so far was that the system calls
arent defined by the assembler (so I whipped up a corresponding sys.s
based on u1.s). Building the real kernel with the real 1e assembler
will give me a lot more confidence that the assembler phase isn't
causing any problems.
> If I get a chance, I should try to compare the 1e and 2e manuals, to
> outline the kernel API differences, as this might help us to determine
> which binaries we have that will run on the PDF kernel.
That would be excellent.
More information about the TUHS