Hacker News new | ask | show | jobs
by not2b 42 days ago
It was the preferred lab computer in the mid to late 1970s and into the 80s. I got my first job because I knew PDP-11 assembly language, and worked with both DEC's operating systems for them (RT-11 and RSX-11) and later Unix (the lab I worked with had some machines running Version 6, though Version 7 was the first that I used seriously. It had a very clean and symmetric instruction set that used the program counter as if it were another general purpose register. I had an LSI-11 board (the single-board version of the machine) with 4K 16-bit words of core memory and a paper tape punch with a tiny loader in ROM to read in the tape and peek and poke memory, and I'd sometimes initialize the core memory to a known state by running the one-instruction program

mov -(pc), -(pc) or 014747 in octal. It would fill all of memory with 014747.

3 comments

014747 makes me smile <3

I built the PDP-11/70 emulator that controls the nuclear reactors in Ontario. That was 20 years ago and I'm probably still the youngest person who can read PDP-11 assembly (and the raw octal)

There's a decent chance you're younger than me, but I can still read it. Coincidentally about 20 years ago I got asked to fix a bug in some PDP11 code that ran on real hardware because it was tripping up an emulated system. Nothing wrong with the emulator as such, it was just a logic bug in the program that they no longer wanted to work around.

I made the fateful mistake of saying "Sure, sounds fun, how hard could it possibly be...?"

Not pdp-11 but once I was tasked with fixing a c program the offshore team had failed to fix for over a year. I basically took a month off (at my desk) after I fixed it the first day. They were happy, I was a legend at that company!
Love your handle

The FPGA emulator we made had to pass the xxdp test suite which was provided to me on punched tape and microfiche. The emulator had a specific test for FDIV overflow which even tested the accuracy of the partial result. None of the software emulators I tested did this. I emailed Gordon Bell who introduced me to Bob Supnkk, and we found the original flowcharts for it so I could replicate the divider logic precisely. Imagine a nuclear reactor dependent on this lol.

> It had a very clean and symmetric instruction set

Indeed. Motorola's 68000 CPU took so much inspiration from the PDP-11's ISA, it was almost a spiritual successor. The 68000's 8/16-bit little brother, the 6809, widely considered the most powerful 8-bit CPU ever - was also heavily inspired by the PDP-11.

Somes lines in PDP-11 assembly from 2.11BSD:

  mov r1,-(sp)
  mov $1024.,-(sp)
  mov $outbuf,-(sp)
  mov fout,-(sp)
  jsr pc,_write
  add $6,sp
  mov (sp)+,r1
  tst r0
  bpl 2f
  jmp wrterr
Ha! The instruction that copies itself. I posted also posted it, 6 years ago. https://news.ycombinator.com/item?id=24820583