Subject: Trying to restore 1972 UNIX

From: Warren Toomey <[email-masked]>
Date: Tue, 29 Apr 2008 13:11:51 +1000

Hi Dennis,
	There's a move afoot to take the assembly-code version of the UNIX
kernel, available in PDF at http://www.bitsavers.org/pdf/bellLabs/unix/PreliminaryUnixImplementationDocument_Jun72.pdf, convert it into machine-readable form,
and from there try to assemble the source, build suitable disk and tape
images, and bring the system back up on a PDP-11 emulator.

I'm pretty sure that we are going to run into some serious obstacles. Would
you be interested in assisting now and then with answers to some questions?

Right now we have these files in machine-readable form:

382 l-rwr-  1 512   12488 Apr 30 02:18:16 u0.s
384 l-rwr-  1 512   18316 Apr 30 02:18:16 u2.s
387 l-rwr-  1 512    9439 Apr 30 02:18:16 u5.s
395 l-rwr-  1 512    9826 Apr 30 02:18:16 u6.s
398 l-rwr-  1 512   16292 Apr 30 02:18:16 u7.s
404 l-rwr-  1 512   10780 Apr 30 02:18:16 u9.s
420 s-rwr-  1 512    1421 Apr 30 02:54:01 ux.s

Tim Newsham <[email-masked]>, who is leading the effort, is trying to
assemble the files using the 1972 assembler binary from your s2 tape
(using my Apout emulator to run it). The problem is that it appears that
as already has the symbols for `mount' and `open' defined, so we get
multiply-defined symbol errors. The 2nd Ed manual for as says "Names for
system calls are predefined".

While there are details for booting the system in the 2nd Ed manual, there
are no instructions for rebuilding the kernel. Can you shed some light on
the process?

Many thanks in advance for any memories, suggestions etc.

Cheers,
	Warren

---

From: [email-masked]
Date: Thu, 1 May 2008 00:55:35 -0400

> you be interested in assisting now and then with answers to some questions?

I can give them a try.

About the assembler, I am pretty sure that it's substantially
the same as that on the 5th edition tape, so it's likely
that a modified version, without the syscall definitions,
could be produced.

I have dug up another listing of the PDP-11 assembly languge
version, which seems to about contemporary with the
one you have.  The files mostly bear a copyright date
of 1972, but like other printouts from the time,
the datestamps only give month and day, not year.
They are generally from May.  It is post 11/45,
and has segmentation and floating-point support.

Incidentally, it doesn't use any of the system call  names
as such; 'read' is at sysread: and so on.

About assembling it, I'm pretty sure we just did
'as u?.s' and the a.out was ready.  This was before
make, after all.

  Dennis

---

From: Warren Toomey <[email-masked]>
Date: Sat, 3 May 2008 13:41:14 +1000

Dennis, just a quick note that the "assembly UNIX" team have been
able to cold boot the system to create an RF filesystem, then warm boot
to a login prompt, then run usermode commands:

PDP-11 simulator V3.7-3
Disabling CR
Disabling XQ
RF: buffering file in memory
TC0: 16b format, buffering file in memory
sim> go

:login: root
root
# ls -l
total    6
 43 sdrwr-  2 bin     620 Jan  1 00:00:00 bin
 42 sdrwr-  2 sys     250 Jan  1 00:00:00 dev
 44 sdrwr-  2 bin     110 Jan  1 00:00:00 etc
 46 sdrwrw  2 sys      30 Jan  1 00:00:00 tmp
 45 sdrwr-  2 sys      20 Jan  1 00:00:00 usr
# chdir bin
# ls -l 
total  215
 48 sxrwr-  1 bin      16 Jan  1 00:00:00 :
 49 sxrwr-  1 bin    2310 Jan  1 00:00:00 ar
 50 lxrwr-  1 bin    7582 Jan  1 00:00:00 as
	. . .
104 sxrwr-  1 bin     238 Jan  1 00:00:00 un
105 sxrwr-  1 bin     644 Jan  1 00:00:00 wc
106 sxrwr-  1 bin     560 Jan  1 00:00:00 who
107 sxrwr-  1 bin     524 Jan  1 00:00:00 write
# who
root    tty8 Jan  1 00:00:11
#  

We have also worked out that this a 1st Edition UNIX system, as it
can only deal with 0405 a.out files and not 0407. So it must come
from 1971 and 1972.

Cheers,
	Warren