jserv / Unix V1
Programming Languages
Welcome to the 1st Edition UNIX repository. Here you will find the kernel source code and userland binaries which will allow you to run 1e UNIX on a PDP-11 simulator.
Build Instructions
Unless otherwise noted, file and directory names refer to this repository.
-
Download the source code for the SIMH simulator from here: http://simh.trailing-edge.com/ Or try the development repository. Make sure that you download version 3.8-0 or later.
-
Unpack SIMH somewhere. Make the
BIN/
directory in SIMH at the top level. Domake pdp11
to make the pdp11 simulator in theBIN/
directory. Copy theBIN/pdp11
executable into thetools/
directory. -
Return to the 1st Edition top-level directory. Do a
make
. This will do several things. It will buildtools/mkfs
,tools/ml
andtools/apout/apout
. These tools are required to build the filesystems for 1e UNIX, and the kernel. It will create kernel sources with some necessary patches, assemble the kernel and build a bootable SIMH memory image which is installed into the images directory. Finally, the make will build therf0.dsk
,rk0.dsk
andtape
images and install these in theimages
directory. You can also do amake clean
to clean out theimages/
andbuild/
directories. Amake distclean
will clean out theimages/
,build/
andtools/
directories.
Running 1st Edition UNIX
- Run
tools/pdp11 simh.cfg
, and you should see this:
PDP-11 simulator V4.0-0 Beta git commit id: a7d0b0e3
Disabling XQ
RF: buffering file in memory
TC0: 16b format, buffering file in memory
Listening on port 5555
You will receive a login:
prompt:
-
Type in root followed by . You should receive a
#
prompt. -
Type in an
ls -l
command. You should see something like this:
total 6
43 sdrwr- 2 root 620 Jan 1 00:00:00 bin
42 sdrwr- 2 root 250 Jan 1 00:00:00 dev
104 sdrwr- 2 root 110 Jan 1 00:00:00 etc
114 sdrwr- 2 root 50 Jan 1 00:00:00 tmp
41 sdrwr- 7 root 70 Jan 1 00:00:00 usr
-
To change directories, use chdir, e.g.
chdir /usr
. The only editor installed ised
. You can find an ed tutorial innotes/edtut.txt
. -
To log in multiple times, telnet to localhost port 5555. The system is configured to allow 8 remote logins.
-
To shut the system down, press
Ctrl-E
to stop the simulator, andq
to quit. You do not need to sync the system before shutdown.
Documentation
The manuals for 1st Edition UNIX are available here: https://www.bell-labs.com/usr/dmr/www/1stEdman.html, http://www.bitsavers.org/pdf/bellLabs/unix/UNIX_ProgrammersManual_Nov71.pdf, and http://man.cat-v.org/unix-1st/.
Some documentation of the internals of the 1st Edition UNIX are available here: http://www.bitsavers.org/pdf/bellLabs/unix/PreliminaryUnixImplementationDocument_Jun72.pdf
Details of the PDP-11/20 architecture and its peripherals can be found at: http://www.bitsavers.org/pdf/dec/pdp11/handbooks/PDP1120_Handbook_1972.pdf, and http://www.bitsavers.org/pdf/dec/pdp11/handbooks/PDP11_PeripheralsHbk_1972.pdf.
The C compiler from 2nd Edition UNIX is also installed and works, but the language is a very early dialect of C. The closest reference to the language at this point in time is this, but it is probably 2 years too late: https://www.bell-labs.com/usr/dmr/www/cman74.pdf
The userland binaries come from a period somewhere between the 1st and 2nd Edition of UNIX. You may find the 2e manuals useful too: http://www.bitsavers.org/pdf/bellLabs/unix/Unix_2nd_Edition_Manual_Jun72.pdf.
Repository Layout
-
pages/
- OCR'd pages from the PreliminaryUnixImplementation document
-
rebuilt/
- kernel source rebuilt from the OCR'd pages, as asm files
-
patches/
- patches to rebuilt/ files to get kernel to run
-
fs/
- userland binaries and files, used to make rf0.dsk and rk0.dsk
-
src/
- source code for userland: there is not much available
-
tools/
- tools and scripts to build the kernel and filesystem
-
build/
- build area: patched kernel files, patched filesystems
-
images/
- final disk and tape images to be used by the SIMH simulator
-
notes/
- notes on the work done to get 1e UNIX to run again