
What Have We Learned from the PDP-11? - davecheney
https://dave.cheney.net/2017/12/04/what-have-we-learned-from-the-pdp-11
======
simulate
We had a terminal to a PDP-11 70 in our middle school library in 1977 when I
was 12. The terminal printed on green and white striped paper and no one at
our school knew how to operate it until a friend and I began to play with it.
I hand-typed games from this book:
[https://www.atariarchives.org/basicgames/showpage.php?page=c...](https://www.atariarchives.org/basicgames/showpage.php?page=cover-
digital)

which eventually led to me writing my own programs.

The actual PDP 11 was located at a local college. After learning a bit more
about the architecture, we two twelve-year-olds called the administrator and
asked for root privileges. Sadly, he said, "No." :-)

~~~
flyinghamster
My high school got a PDP-11/34 when I was a sophomore (class of '82), and
offered a one-week intro that summer to all interested students. I was hooked,
and wound up taking programming courses in junior and senior years (BASIC as a
junior, COBOL as a senior). We were running RSTS/E, with BASIC-PLUS and
WATBOL. WATFOR was also available, but none of my courses used it.

TECO scared me away; all I ever learned was how to load and run VTEDIT, if I
were lucky enough to get one of the few VT100s. Unfortunately, most of the
terminals were Visual 200s which frequently broke down and only emulated VT52.

Noting my interest, my dad went out and bought an Apple II+, and mostly by
keying in program listings I taught myself 6502 assembler. A Heathkit H-11 (an
LSI-11 system in kit form) would have really rocked, but I had a lot of fun
with the Apple just the same.

------
panic
_One can write a string copy routine using two instructions, assuming that the
source and destination are already in registers._

    
    
        loop:   MOVB (src)+, (dst)+
                BNE loop
    

Suddenly the C idiom

    
    
        while (*dst++ = *src++);
    

makes a lot more sense!

~~~
hazeii
Adding fun with PDP-11 autoincrement:-

    
    
       MOV (PC)+,(PC)+
    

What does that do? It's a single-instruction program that replicates itself
throughout memory.

~~~
cesarb
Suddenly Core War
([https://en.wikipedia.org/wiki/Core_War](https://en.wikipedia.org/wiki/Core_War))
makes a lot more sense.

------
oldgradstudent
The Technion in Israel still teaches PDP-11 assembly language in its computer
organization course -- using an simulator, of course.

It's a nice, simple, orthogonal instruction set. The textbooks are available.
Why change? Here's the syllabus of the latest incarnation:
[https://webcourse.cs.technion.ac.il/234118/Spring2017/syllab...](https://webcourse.cs.technion.ac.il/234118/Spring2017/syllabus.html)

------
dboreham
His book "Computer Engineering" is an interesting read. I noticed someone
posted a scan PDF : [http://bitsavers.trailing-edge.com/pdf/dec/_Books/Bell-
Compu...](http://bitsavers.trailing-edge.com/pdf/dec/_Books/Bell-
ComputerEngineering.pdf)

I have a copy of the book. And a PDP-11. Well, most of one, in a closet.

~~~
gravypod
I'm an early career software engineer and I hope that one day I can retire
with one of those machines in my basement.

~~~
dboreham
A big issue is the hard drives which used materials that don't stand up long-
term (urethane foam for example).

You could use an FPGA to build an emulated RL-05 I suppose but where's the fun
in that.

~~~
hazeii
The bus is sufficiently slow you can emulate the hardware with an MCU.

I'm using a slightly different approach with my PDP-11's, which is to use a
custom device driver using DRV-11 parallel interfaces connected to a PC at the
other end.

------
Animats
_4096 word memory contained 16 million cores_

No, no. 4096*16 = 65536 bits.

16 million cores would be 2 megabytes. An IBM mainframe of the early 1970s
might have that much storage, and the cost would be about $1 million. IBM
figured out how to weave core memory on a power loom, which gave them a big
cost advantage for a while.

~~~
Taniwha
Yes - we bought 1.5 megabyte of core for our Burroughs 6700 in the late 70s,
we paid NZ$1M for ours (in those days ~US$1.25M, before the Muldoon NZ$ crash
of the mid 80s)

------
digi_owl
It seems that all successful computer designs, large or small, have one thing
in common. the presence of a expansion system that allow the computer to take
on different tasks for different users.

UNIBUS, S100, ISA, AppleII expansion slots, etc etc etc.

~~~
dbcurtis
The Apple II was particularly elegant, in that it allowed the driver code to
be in a ROM on the I/O board. Plug-n-play???? pfffft, sorry MSFT. When you
plugged in an Apple II peripheral card, the driver was installed. Full stop.

Since the very beginning, I've considered that omission to be USB's great
failing. There is no reason, given the technology of the time, that a driver
standard built around a platform-neutral byte code could not have been done.
The byte could could have been transpiled to any arch/os at driver init time,
or on first USB device mount event, or some such. Glaringly missed
opportunity, but nobody asked me.

~~~
tzs
Something kind of like that was done for x86 with NCR's SCSI host adapters.
NCR provided a traditional driver for each supported OS (DOS, Windows, OS/2,
Novell Netware, SCO Unix) but that driver didn't know anything about the
actual SCSI host adapter hardware. I'll call this the "generic driver".

The host adapter ROM contained a driver for the specific hardware on that
card, written in a way that did not make any assumptions about the operating
system. (Actually, there were two drivers in the ROM. A 16-bit driver for DOS
and Windows 3.x and a 32-bit driver for the others). I'll call the drivers
from ROM the "hardware drivers".

The generic driver would find the ROM. The ROM had a header that contained
information about the hardware driver. That included pointers to various entry
points in the hardware driver, including an init routine. The generic driver
would call the init routine, and one of the things it gave the init routine
was a table of entry points in the generic driver that the hardware driver
could use to do things like allocate and free memory, register interrupt
handlers, set up DMA operations, and things like that.

My recollection is that the 16-bit hardware drivers were position-independent
code that could be run out of the ROM directly, or copied to RAM where it
might run faster. The 32-bit code was not position independent, so the generic
driver had to copy it to memory and the fix it up, which it could do because
the 32-bit driver in ROM was essentially the .o output of the C compiler used
to build it so had everything needed in order to move it around.

Once the hardware driver was initialized and running, the interface between it
and the generic driver for actually doing SCSI commands was based on a draft
version of the SCSI CAM specification. We [1] were on the CAM committee, and
proposed including our ROM-based hardware driver approach as part of the
standard, but most other committee members didn't think being able to swap
host adapters without having to change OS drivers was useful enough.

[1] "We" == the consulting company that designed and implemented the
aforementioned stuff for NCR. I was the lead architect and lead programmer for
the project.

------
timonoko
I had PDP-11 for my personal use in the Finnish Army in 1978. It was quite
useless and I learned nothing:
[https://www.flickr.com/photos/timonoko/27931368650/in/album-...](https://www.flickr.com/photos/timonoko/27931368650/in/album-72057594100241331/)

~~~
larsbrinkhoff
I don't see it.

~~~
timonoko
I was just like the pictures with pretty colors and buttons. My personal Nova
was much uglier:
[https://www.flickr.com/photos/timonoko/102552851/in/album-72...](https://www.flickr.com/photos/timonoko/102552851/in/album-72057594100241331/)

------
peterburkimsher
My dad started on a PDP-8 at my granddad's workplace (a newspaper).

He later wrote his PhD thesis on an Epson HX-20 and backed it up to PDP-11
magnetic tape.

When I was 16, we went to a computer museum to try to get his old backup off,
but their PDP-11's Winchester hard drive was broken, so we couldn't boot it to
load up something to read the tape.

Lesson to learn: copy your old backups forward when storage formats change.

------
cyberferret
Wow - one of my first jobs in computing was changing the backup disks (huge
things - bigger than an LP record) on an old Vax PDP-8 and PDP-11 system in my
boss's parents business.

Mounting and dismounting those things was one of the factors that made me
swear I would get more into the software side of these new fandangled
'computer' thingies rather than hardware... :)

------
tasty_freeze
You can easily see the influence of the PDP-11 on the 68000 architecture and
instruction set.

~~~
mark-r
I programmed assembly for both the PDP-11 and the 68000, and a couple of
others. The 68000 was by far my favorite.

------
flyinghamster
Overall, a very good article, though I'd pick this nit: separate I/O
instructions survive in 8086 and AMD64 as well, at the very least.

Never having done ARM assembly language programming, does ARM have I/O
instructions, or is it strictly memory-mapped?

~~~
firethief
Those are descendants of the 8080 he mentions as one of the two exceptions.

------
thechao
For those of you recalling fond memories of PDP days, just remember the poor
wretches still using these devices. Thankfully, this is no longer me.

------
fuzzfactor
>through the lens of our own 20/20 hindsight

Here's another quote from the article that seems to be a constant feature over
the decades:

>PDP is an acronym for “Programmed Data Processor”, as at the time, computers
had a reputation of being large, complicated, and expensive machines, and
DEC’s venture capitalists would not support them if they built a “computer”

Looks like some VC's have always been more impressed by the slide deck and
presentation than the actual potential of the business concept or individuals
developing the technology.

That's something worth learning as well.

Anyway, anybody want a used VAX 4000-200? Available for pick up in Houston
this week.

If so, post PM info here along with what you would like to do with it.

I'll check this thread in a few days to see if there is any interest.

Also, an HP1000 in a full rolling rack the size of a refrigerator.

------
OliverJones
Blast from past! Too much time spent on that 11/70's front panel switches.

One thing I believe Bell missed in "what we learned." Of course, maybe it's
hindsight. The regular instruction set in the '11 and the VAX was fertile
ground for all sorts of innovation in compilers and optimization technology.
Without those innovations it would have been harder for the gnarly-instruction
processors (386 line, I'm looking at you) to gain users.

------
baking
Regarding the UNIBUS, this needs a picture of the wire-wrapped backplane of a
PDP-8 (especially the denser later versions with the flip-chips.) The front
looks neat and tidy, but opening the back is still a part of my nightmares.

~~~
hsnewman
I got a PDP-8 emulator with a really cool blinking lights display here:
[http://obsolescence.wixsite.com/obsolescence/pidp-8](http://obsolescence.wixsite.com/obsolescence/pidp-8)
my friends think I'm a geek.

------
leed25d
I began programming as a career in 1974 after graduating from college. At the
time, and well into the 90s, the PDP-11/VAX was my favorite minicomputer.

