Hacker News new | past | comments | ask | show | jobs | submit login
The PDP-7 Where Unix Began (bsdimp.blogspot.com)
107 points by stargrave 12 days ago | hide | past | web | favorite | 20 comments





> By porting Unix to the PDP-11 in 1970, the group ensured Unix would live on into the future.

I have a question about that. Why would they do this?

What was so valuable in these few lines of (mostly proprietary) code, that you would make the effort to port instead of just writing from scratch on the new machine?

If you take a look at what came later, a lot of much more substantial software packages were made by a single bedroom coder in his spare time.

Why port? It couldn't be to save effort? (At least the conceptual level of things would remain the same if you start from scratch.)


The first PDP-11 Unix was written in assembly, and was thus a from-scratch rewrite of PDP-7 Unix (also in assembly, for a very different machine). The rewrite into an early version of C came later, done initially for the same reasons you'd prefer C to assembly in, say embedded systems (maintainability) -- and the idea of using the C code as the basis for a port came a few years after that.

See https://en.wikipedia.org/wiki/History_of_Unix


They ported because there was a user base that liked the commends and environment and wanted to keep using it. It was a rewrite from scratch to the same design spec.

About 1970 the first minicomputers were being applied to operations, administration and maintenance functions in the Bell System. The PDP-7 was too expensive and the PDP-8 was too limited to compete favorably with others. The PDP-11 was applied widely and if the Unix OS was to be used by the development groups instead of the DEC operating systems, it had to be ported.

The port wasn't motivated by the development groups. It was sold to management as a word processing / typesetting system.

I vividly remember my first encounter with Unix, in an ACM journal archive at the local university library as a teenager in the late '70s, utterly astonished to find lower-case computer commands and prompts.


True, the development groups weren't too keen on Unix. They wanted to choose the minicomputer and operating system from those commercially available and get on with developing applications without the risks and effort of using an unproven operating system. But Research always wanted to demonstrate that they were contributing to the company, so eventually Unix had to be adopted.

Use by development groups for Western Electric products was different from the in-house Unix systems run by the Bell Labs data center that were used as time shared systems for email, general computing, and document production using nroff and memo macros. Moving away from all upper case made line printers less efficient, but about that time laser phototypesetting became available.


The main thing at the time was that mixed-case Teletypes were becoming common.

Their goal was to develop a cross-platform OS - so porting was kind of the whole point. Making code and systems portable between architectures was a research topic they wanted to prove out and learn from.

Note CRTs where a luxury item in the early 1970s. A 5x7x64 character generator requires 2240 bits uncompressed. Perhaps get closer to 1K if you had some run length compression. In my 1975 MIT digital lab the 1K memory chips where kept locked up because they were the most expensive chips at that time. By 1977 a lab I worked in bought a CRT terminal for each student because character ROMs had dropped in price.

The characters are not actually stored as rasters though. There are up,down,left,right,intensify and end signals that control the beam and the logic and no more than 30 pulses per character. In fact, I took photos of the "ROM" earlier this year: https://imgur.com/a/QnFFkg6

By 1985 the prices must have really dropped because the character encoder on my Apple ][e clone was actually an eprom that contained multiple copies of the bitmaps.

It had extra address lines that weren't even used.

Same thing for the keyboard encoder, IIRC.


We used to replace the character generator ROMs in Z19 terminals with our own that had two-pixel-wide verticals. It made all the difference.

https://bsdimp.blogspot.com/2019/10/video-footage-of-first-p... has some further speculation... Footage of the PDP-7 that ken would later use to create Unix.

> V0 Unix could run on only one of the PDP-7s.

Wow, I wonder how the history of UNIX would have panned out if that machine hadn't happened to land at Bell Labs.


I can’t really speculate on that, but I can say the PDP series is a dream to program. The instruction set is simple and orthogonal, and you can hold an accurate model of the whole machine in your head that tells you exactly, step by step, what will happen when your program is executed. I don’t know if any other contemporary machines also had these properties, but I do think it makes it an ideal research machine for creating a new programming environment (and that’s really what UNIX was initially). That makes me think it was very likely either the PDP or a similar machine would end up at Bell Labs for people to develop on.

I think I learned -7 or -8 assembly in my comp org class. It had about 8 instructions and you had to make your own division instruction, and I think multiplication.

Then we moved onto a bit of 680x0. Yeah, that was different.

A simulator for it was pretty easy to write, switches and all.


I learned on a PDP-11, but we had 8’s available, too. They felt very similar. I think the 11 had maybe 15-ish instructions?

Edit: just checked, and the 11 has about 70 instructions. I think MACRO-11 might abstract over many of them, making it look like it has fewer instructions. The instructions group nicely into a few families, which makes things really easy.


There isn’t a single pdp series: there are 18 bit machines (pdp8) 36 bit machines (pdp10) 16 bit machines (pdp11) with very different instruction sets

Amazing that the Unix of that day ran on an 8KB (not MB, not GB), 8KB machine with just 1MB (not GB, not TB), much-slower than today's SSD's, disk.

Compare that to Linux, its most popular descendant Unix of today...

Today's Linux requires a tad more memory and disk than that... just a tad... <g>


Note that wasn't the Unix we think of when we talk about Unix. It was written in assembly code. C didn't properly exist yet.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: