| 1 | # Overview # |
| 2 | |
| 3 | This directory contains a V5 UNIX system image for use with the PDP-11 |
| 4 | simulator included in SIMH. The image was taken from a PDP-11/45 with an RK05 |
| 5 | disk (2.4 MB). |
| 6 | |
| 7 | V5 UNIX was the first version licensed widely outside AT&T, largely due to |
| 8 | [Thompson and Ritchie's CACM |
| 9 | paper](https://www.bell-labs.com/usr/dmr/www/cacm.html) that had recently |
| 10 | introduced UNIX to the world. |
| 11 | |
| 12 | Version 5 still only targeted PDP-11s, but expanded to include those models |
| 13 | with an 18-bit physical address space, compared to the 16-bit address space of |
| 14 | previous models. This allowed up to 256 kB of RAM and greatly increased the |
| 15 | capabilities of the system, needed as UNIX reached "above 50" installations at |
| 16 | the time of this release. |
| 17 | |
| 18 | This is the second release of UNIX written in C, a language still in flux that |
| 19 | had only existed for a couple years. The system is self-hosting using the |
| 20 | included compiler but there are many differences from modern C visible in the |
| 21 | on-disk source code. |
| 22 | |
| 23 | Old enough to predate the Bourne shell from Steve Bourne, V5 UNIX ships with |
| 24 | the Thompson shell written by Ken Thompson. This was the first UNIX shell, |
| 25 | mainly a command interpreter rather than the interpreted language that most |
| 26 | UNIX shells became. Intentionally minimal, commands like `if` and `goto` are |
| 27 | implemented as separate executables rather than as built-in shell commands. This |
| 28 | shell was replaced by the Bourne shell in V7 UNIX and by the C shell in 2BSD, |
| 29 | leading to its rapid decline in popularity. |
| 30 | |
| 31 | Several now common commands were first introduced in this release, including |
| 32 | `dd`, `pwd`, and `wump` (Hunt the Wumpus). At this stage it's starting to |
| 33 | *feel* like a UNIX system. |
| 34 | |
| 35 | Then there's the editor, `ed`. A UNIX classic, it's a little like using `vi` |
| 36 | with your eyes shut. If you've never used it before, check out my [guide to |
| 37 | ed](https://subgeniuskitty.com/development/pdp-11/guide-to-ed-text-editor). |
| 38 | |
| 39 | |
| 40 | # Status # |
| 41 | |
| 42 | Fully tested on SIMH 3.9-0. |
| 43 | |
| 44 | |
| 45 | # Instructions # |
| 46 | |
| 47 | |
| 48 | ## Power On ## |
| 49 | |
| 50 | To power up a simulated PDP-11/45 and run this V5 UNIX disk image, simply |
| 51 | un-gzip the disk image file and start up SIMH with the provided configuration |
| 52 | file. |
| 53 | |
| 54 | % gunzip unix_v5_rk.dsk.gz |
| 55 | % pdp11 simh.conf |
| 56 | |
| 57 | PDP-11 simulator V3.9-0 |
| 58 | Disabling XQ |
| 59 | . |
| 60 | .Type kernel filename at the '@' prompt. |
| 61 | .For example: @unix. |
| 62 | .UNIX username is 'root'. |
| 63 | .No password. |
| 64 | . |
| 65 | @ |
| 66 | |
| 67 | The `@` prompt is from the bootloader, to whom we must pass a file to continue |
| 68 | the boot process. Our kernel is a file named `unix`, so type that here followed |
| 69 | by `ENTER`. |
| 70 | |
| 71 | @unix |
| 72 | |
| 73 | ;login: |
| 74 | |
| 75 | The system has now booted up and you may login as `root` (no password). |
| 76 | |
| 77 | ;login: root |
| 78 | # |
| 79 | |
| 80 | That's it! V5 UNIX is up and you're logged in. |
| 81 | |
| 82 | |
| 83 | ## Power Off ## |
| 84 | |
| 85 | To power off, assuming you are logged in as `root` and the system is otherwise |
| 86 | inactive, use the `sync` command to flush any buffers to disk and then type |
| 87 | `Ctrl-e` to halt the simulation and `quit` to exit SIMH. |
| 88 | |
| 89 | # sync; sync |
| 90 | # <Ctrl-e> |
| 91 | Simulation stopped, PC: 001726 (MOV (SP)+,177776) |
| 92 | sim> quit |
| 93 | Goodbye |
| 94 | |
| 95 | Note that you can also press `Ctrl-e` at any time and SIMH will halt the PDP-11 |
| 96 | simulation and drop to the `sim>` prompt where you can exit. However, doing |
| 97 | this is likely to corrupt a disk as it is equivalent to yanking the power cord |
| 98 | from the wall. To resume from the `sim>` prompt, simply type `go` and execution |
| 99 | will resume from where it left off.. |
| 100 | |
| 101 | |
| 102 | ## Transfer Files ## |
| 103 | |
| 104 | Output to the line printer or input/output via the paper tape are one option. |
| 105 | The relevant options to enable that hardware in SIMH are commented out in |
| 106 | `simh.conf`. |
| 107 | |
| 108 | When offline, it is possible to mount the disk image and interact with it |
| 109 | directly. For example, use |
| 110 | <https://git.subgeniuskitty.com/pdp11-unix-fusefs/.git>. |