Hacker News new | past | comments | ask | show | jobs | submit login
PDP-11 Booting (trmm.net)
221 points by rdpintqogeogsaa on Dec 11, 2021 | hide | past | favorite | 69 comments



One of my first summer intern jobs was recreating the boot deck for a PDP 8. The first card in the deck had become damaged and there was no backup. We had an old assembler listing of the boot program but no assembler. I did not know PDP assembly but knew 6502, Z80 and 370. I had done all my Z80 writing machine code directly as I had no assembler there either. So I read the PDP docs and hand assembled the first card. It was a relief when I found that the first instruction on the second card lined up as did the next several and the last instruction on the second card. We were pretty sure we had the right deck. I powered on the PDP, keyed the boot sequence, hit run and the deck loaded. The ready light came on and I loaded the next deck, the copy deck program. It loaded successfully as well and I reloaded the boot deck in to the card reader. Pressing the start button was a moment of suspense but when the card punch started clacking out a duplicate deck I was able to breathe a sigh of relief.

We had talked at lunch that day about making a special boot deck whose sole purpose would be to punch a replacement standard boot deck, but it seemed too ambitious for something rarely needed.

Asking a few years later, the boot deck had lasted until the machine had been retired. The backup deck had never been used


I’m amazed the PDP docs didn’t have the corresponding octal included in the assembly listing!


The PDP docs only had the instruction set. The boot deck that was being used would have been a custom "site" deck that in addition to booting the computer also provided information about the peripheral configuration. The program listing we had was the assembler for the site deck. We had no idea how the assembly program was assembled in to a card deck because we couldn't do it ourselves without some boot working boot deck and we didn't have an assembler or any compilers anyway. We presumed that the deck had been produced on another PDP-8 at the time our PDP-8 was installed.


Were these normal punched cards? surely you could duplicate the deck on any card punch?


The problem was that the first card was damaged, it was "eaten" by the card reader and about the left third of it was completely missing.


PDP 11/34 had a bootrom and an octal keyboard, which is kind of cheating.

I grew up using the older PDP 11/45 where you had to key in (using binary toggles) a boot program. Or, the way I did it, manually enter write address and byte count to the RK05 disk controller (memory mapped I/O) then writing a "01" Go command to RK05's command register and watch the RK05 disk activity light flicker briefly. Voila, RT11 was loaded. (This worked because on the PDP 11/45 DMA transfers from disk to memory worked also in CPU Halt mode.)


Boot ROMs for the early PDP-11s could be pretty nifty in their own right though. This is the first version of I believe the RX01 floppy disk boot code. 32 sixteen-bit words: https://www.cca.org/blog/20120222-Diode-Matrix.shtml User-editable!

By the time of the PDP-11/34 things were much more integrated though. Mask IC ROMs. The front panel/interactive serial debugger were actually controlled by an Intel 8008 microprocessor. You needed a computer just to boot the computer even then.


Binary toggle switches? Luxury. In my day we didn’t have binary toggle switches. We had to quickly touch raw wire leads to each other in the right sequence, flawlessly, every time. And we were damn grateful of it.


I couldn't find any good videos of toggling in a bootloader on a real PDP-11, but here is one on a PiDP-11 emulator: https://www.youtube.com/watch?v=31vrju0BMQc


well this is disappointing..."binary toggles" had me picturing a single 3-way toggle switch where you manually entered ones and zeroes.


That is exactly what is going on but you don't need 3 way toggle.

Down is 0 and up is 1, you load all of the values in like a shift register but in parallel, then write/act upon them.


Yes the data bits were 2-way toggles, but one important switch was a 3-way toggle: the Examine (press down) and Deposit (press up) switch.


On the 11/70, Deposit was the only switch that toggled up (other than the light test switch). That is a nice safety feature so you don't accidentally toggle Continue or other action switches.


Right...but surely you see how that's different from what I described.


If your -45 had core memory, the bootloader could be toggled in one then left in place for subsequent reboots after power off.


We had a PDP 11/4 with core memory that ran a TruDrill CNC PCB drill. The bootloader was in ROM and if the core memory became corrupt you had to reload it with the same paper tape reader that read the G-code.


My first computer job was programming a PDP-11 which ran a Casio emulator. Our PDP-11 was mounted very low beneath a floppy drive cabinet, and each morning the elderly programmer would lie on the dusty floor to toggle in the boot sequence which then loaded from paper tape. When that became my job, I somehow figured that if the toggles were left at the first address, then hitting the start key would allow the core memory to take over. Everyone was convinced that I was a computer genius.


DMA transfers should work on all PDP-11 that kept memory on the same bus as I/O (most of them, iirc, I think separate side bus for memory happened with VAX Q-Bus models?)


I had to do this a couple of times for our 11/40 (also running RT11) - the was a printed cheat sheet of the OCD (octal codded decimal) you had to toggle in then hit the load to advance to the next location.


If you want to play the original Adventure without the PDP-11 (though not nearly as authentic), I ported it to the web here: https://grack.com/demos/adventure/


Looks amazing! I've been thinking of porting The Proving Grounds BBS originally written for the Apple II to the web. Are you happy you ported Adventure?


Extremely happy. It was a fun project, though I had to cheat my way to finish it myself. I should probably look into extracting the terminal part of this project as I really enjoy the feeling of interacting on this pseudo CRT.


Thank you! Very awesome work.


Nicely done with the CRT look.


Thanks! You can see the VT220 I modelled it off here: https://github.com/mmastrac/adventure/blob/master/com.grack....

I'm not really a front-end person so I just hacked on gradients until I could make it look just right.


I added a 6Mb hard disk drive to my H11. This required building an interface card, and writing the device driver for it.

I used as a model the device driver for the floppy drive. I was rather amazed at how it worked - it was loading instructions into memory as it was executing the previous instruction just loaded. The instructions were also simultaneously handling two independent values in the upper and lower bytes. A marvel of compactness.


Here is a PDP-11 booting UNix v6: https://www.youtube.com/watch?v=9wFJL9inunQ


Lot of folks who have only used Linux would be stumped if they see "cd: not found"


I am confused, where did "cd" come from and why did it replace "chdir"?


cd arrived in the v7 Bourne shell, v6's shell was by Ken Thompson (it's just the name of the system call that cd calls)


heh - always sync twice - almost 40 years later my fingers still do that sometimes when I'm thinking .... (I used to port Unix for a living, early ports were always a tad unstable after that first prompt)


My eyesight is getting worse but is that person typing nude?


Certainly not!

He's wearing a watch.


I can see trouser pockets! either that or they're wearing a holster in the nude - which is a whole other ballgame entirely.


Did you really have to use "ballgame"?


That thing needs some serious retrobrighting.


IIRC the VT-100 was naturally more yellow-brown than beige.


Brand-new they were pretty white (and gray)


Wow, why is this video unlisted?


The LSI-11 and 11/23 jumped to 173000 at startup, so (re)booting them was just hit halt on the front panel and then enter '173000G' in ODT (the built-in octal debugger). If necessary, it would only take a minute or two to type in a bootstrap somewhere in RAM and execute (my boss at the time could do that faster across the toggle keys on the front panel of his larger PDP-11 than I could type it in).

I coded several bootstraps for PDP-11/23's, managed to get 4 different devices (DX,DY 8" disks, MX 5.25" and MZ 3.5" disks) complete with CLI into 256 words (2x256 byte OTP ROMs). Careful coding time, since one had to send the listing off to someone who could burn the ROMs and post them back.


> my boss at the time could do that faster across the toggle keys on the front panel of his larger PDP-11 than I could type it in

This is exactly what I waned to hear after watching the video of toggling posted below. I thought to myself there must have been people who could have done that in two seconds, but then I kind of doubted it because I didn't know how much rebooting was really done.


Yeah, I had an LSI-11/23 when I was a student, with dual 8 inch drives and a Fujitsu drive (not an Eagle, it was 160Mb if I remember). This was all cobbled together equipment, but lots of fun trying to get it to work.

My bootstrap code loaded the first block from a floppy which had the boot code on it. The result was much easier to type, and I ended up with that boot code as a script so my much more powerful Amiga I was using as a terminal emulator could replay the boot code to start the machine.

Happy days!


My favorite PDP-11 / LSI-11 instruction was 014747 octal: mov -(pc), -(pc). It would fill all of memory with copies of itself.

I actually had a use for that, to get a board that had core memory to a known state.


That ASR-33 Teletype comes in handy if your PDP-11 doesn't have a boot ROM: toggle the first stage bootloader into the panel, load your tape into the reader, and let 'er rip.


At a summer job in 1973, we used carved wood sticks to quickly set the toggle switches for the bootloader.


As in, you had a series of sticks, each with one word somehow carved in, and pressed each one against the switches, entered it, and grabbed the next stick? If so, that is amazing.


Yes, you described it very well. As I recall, at least two words were carved on each stick, maybe four.


Hah! I’m old enough for 8-bit “home computers” but missed this sort of thing by a few years. That’s lovely to imagine. Thanks for confirming!


Off-topic: with a bunch of vintage ‘booting a computer’ stuff lately on HN and in my YT recommendations, I keep remembering what I once read about an old trick for ‘faster booting’: on bootup, the computer displayed a static screenshot taken before the shutdown (or rather to-disk suspension, apparently)—and while the user themselves tried to remember what they were doing the day before, the machine actually loaded programs into the memory. Only after that the cursor started blinking. Since after turning on the power the user received fast(er) feedback which kept them occupied, they perceived the bootup as much quicker than it actually was.

Only, I don't remember what computer that was—probably paid more attention to the UX-design side at the time. If anyone knows, I'd be grateful for the reference, so I could finally file this properly among my pile of tech trivia.


Modern macOS does this with the login screen. You see it, you start typing your password, but your keystrokes just don't register until several seconds later when it has actually fully waken up.


You may be thinking of the Canon Cat. This feature is mentioned in passing here:

https://method.ac/writing/work_journal/method-draw-loading.h...


TIL Raskin actually got to kinda implement his ideas of a text-driven interface—of which Macintosh was pretty much the opposite (coincidentally it's said that Mac's interface was largely redesigned after Raskin left the project).

> Instead of using a traditional command line interface or menu system, the Cat makes use of its special keyboard, with commands being activated by holding down a "Use Front" key and pressing another key.

Afaik the original concept called for entire commands being typed in while holding the special key—which suggests that Raskin didn't have much consideration for touch typing—a bizarre attitude for a text-based interface.


> entire commands being typed in while holding the special key

It worked for the Cat because the special keys were just below the space bar and could be held down with the thumb while typing.


i remember that on windows 95 (and maybe later) the login wav sound that played for 2s seemed to actually blocked everything else.

simply disabling the login sound made the sign-in-to-desktop significantly faster.



Only, I don't remember what computer that was

Didn't the iPhone developer guidelines call for this to be done by individual apps at one point, in lieu of splash screens?


More or less. The "startup screen" would basically be a screenshot of the "empty" state of the first screen of the app, so, for example, if you had an email app, you'd load a screen which had an empty list where the list of emails would appear and an empty bar at the top where your buttons to compose a new message and such would go, but with the buttons unlabeled - these empty UI elements reduced the odds that your user would try to interact with them yet. Ideally, when the app finished starting up and the screen was replaced with the actual UI with labeled buttons and a populated list, there'd be no visual discrepancy otherwise and it'd look like your app started instantly but then just took a moment to load your emails.

This became less practical as the iPhone started getting multiple models with different screen sizes.


I am old enough to remember those days; got a summer job when I was in college at a lab that had lots of PDP-11s in, I think, 1980. Some of them didn't have boot ROMs and you had to toggle in the bootstrap program from the front panel every time (only about a dozen instructions).


I remember booting RT-11 on a DEC PDP/11 clone (LSI-11). You would turn it on (along with the Lear Siegler ADM-3A [or equivalent] terminal), and since it did not come with a hard-disk by default, you would insert the (8") boot floppy, and type 177170L at the (ROM) monitor prompt. The octal address was followed by a "L" which immediately caused the monitor to jump to the boot loader (also in ROM). After about five minutes, RT-11 would be up and running (just as shown on the terminal in the fine article).


my godfather had an H-8 and you had to bootstrap it via the keypad as well

kind of a charming way to learn, at a very very young age, how booting worked

all to play colossal cave


I worked at The Computer Museum in Boston (RIP) in the '90s. We had an old computer whose boot program was a 2D array of toggle switches. In other words, it was a small physical-write, electrical-read memory. I'm guessing it was about 16 switches wide by 30 switches high.


Someone needs to write a Y2K patch...



This is so cool. I want to see posts like this for other old school minicomputers and mainframes!


Every once in awhile https://www.reddit.com/r/vintagecomputing/ has some good stuff.



Memories! One of the things I had to do in my first ever job was swap the backup discs in a Vax PDP-11 that ran a big pharmaceutical inventory system. All that time waiting for those huge discs to dismount and re-mount...


If you were lucky enough to have real core then you may not have had to toggle in bootstrap after powering on ...


You can play ADVENT under the BSD-games package.

Also, there's a good ZMachine port (several of them). Look out for advent.z5.




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

Search: