Bare Metal Programming - Booting From the Switches

preview_player
Показать описание


Primary Equipment (Amazon Affiliate Links):

0:00 Start
5:28 Assembly Language
7:58 Hex Code
10:00 Binary
Рекомендации по теме
Комментарии
Автор

First time Ive ever understood how these old computers were programmed using a handful of switches on the front of the box. This was always a mystery to me.

farmerdave
Автор

I used to do this around 1977 on my home-built computer, wooden case etc, an MPU, 256 byte ROM monitor, 1K RAM and several dozen TTL chips, all hand wired myself over many hours with a hot soldering iron.

I was 13.

I had no fancy assembler, I just learned the instruction set in my head directly in hex. Small programs you put right in there from the top of my head. More complex ones I wrote the hex on sheets of paper and manually calculated the jumps and keyed it in.

I learned an awful lot, and I've enjoyed a lifelong career from it.

I remembered about half of the hex opcodes in the video example, 45 years later!

nezbrun
Автор

The bootloaders were often quite clever. For example one of the ones for the pdp11 to boot from tape, basically consisted of enabling the tape drive (advancing to block 0), reading the next block, and an infinite loop (branch to self). Five or so instructions if memory serves. Since at reset the DMA address is 0, where the bootloader also resided (again if memory serves), reading the block would overwrite the bootloader with the block from the tape, and when the block was in memory the branch to self was overwritten from the tape and the CPU would continue running what is now the stage 2 bootloader at the head of the tape, which would then proceed to boot the operating system.

janbrittenson
Автор

I spent many nights in the computer lab writing pal 8 assembly language on the PDP 8e at Mohawk College in Hamilton. Entering the boot sequence never worked on the first try. I always remember the excitement when the DEC tape drive finally spun and the teletype printed an asteric to let you know the boot program loaded. That was computing!

larryh
Автор

Thanks for the tour down memory lane. The IMSAI 8080 was my first computer. A couple of notes: 1. The conversion of assembly language to hex bytes was done by hand. 2. The conversion from hex to binary is not necessary. Each hex byte has two hex digits. The left digit goes into the left four switches and the right digit to the right four switches. There are only 16 values to memorize 0x0 -> 0000 through 0xF -> 1111. After doing this conversion a hundred times, you could do it in your sleep. 😂

lesliefranklin
Автор

I love how, decades later, the only difference is that we automated just about every step along the way, and then set to work to make "writing a series of logical steps" as painless as possible. All while still, on some level, shoving bytes into registers.

rayk
Автор

As someone that only used computers from the 80s onward, these switch interfaces were always a bit of a mystery.
Turns out it's basically a simple display and primitive keyboard, and even has an "enter" key for each new line of code. Makes sense!

felixt
Автор

When I joined the US Air Force in the early 80s, I worked on the F106A/B Delta Dart aircraft. It was an interceptor designed to take out Soviet Bombers should they attack the US from across the Arctic Ocean.

It had an onboard computer that communicated with a ground-based control system (called SAGE for "Semi-Automatic Ground Environment") that would direct the interceptor to where the bombers were. It had a disk drive with a tall stack of large platters, and it had to be booted by hand.

The computer flew virtually the entire mission. The SAGE datalink ("Time Division Data Link" -- TDDL -- to be more precise) would direct the aircraft to the bombers, locate the targets, fire the missiles, disengage, then return the aircraft to base. The pilot was simply there to take off, land, and take over if the automation didn't work. Weapons included radar and infrared-guided missiles and a rocket with a nuclear payload (the latter wasn't guided as close counts when it comes to horseshoes, grenades, and atomic bombs).

To launch the aircraft, we'd power up the aircraft, pop the forward right access panel, and enter boot instructions one at a time into the computer. There was a bank of eight switches (I think that's right) and a button. We'd enter the hex command via the switches and then press the button to load it. We'd do that several times until the computer took over and finished booting up.

We'd also used the switches and buttons during diagnostics and testing to enter instructions as needed into memory. Read out consisted of a bank of eight lights.

rthompson
Автор

I have been using computers my whole life. And although I knew how this worked already - this short video is the single best explanation of how a program is written in a language a human can understand and converted into bits the computer can understand that I have ever seen. Well done.

SPGWhistler
Автор

Awesome. Thanks so much for this. Being a veteran in the field for about 40 years, I never understood how these worked. And now I do.

And then to think Paul Allen handcoded the loader for their first basic on papertape WHILE in the plane to showcase their Basic.

dvroegop
Автор

I recall from reading one of the books on Gates and Allen that they spent a flight to New Mexico hand assembling the paper tape loader so they could demonstrate the first version of Basic for Altair 8800 to Ed Roberts. No complier -- just the instruction set.
Seems they had forgotten to do this prior to getting on the plane.

paulscarlett
Автор

I started out on a Science of Cambridge MK14 which I got for my birthday in 1978. You literally programmed it in machine code - like "C4, 01...." and it had no persistent memory - only RAM - and a teeny tiny LED display. But I learned so much from it, that within 3-4 years I was working on DEC based machines and some of those - like the PDP-11/70 and the ones you show here - had exactly this kind of console for entering in bootstrap or diagnostic routines (though, once booted from a hard drive or tape they were a lot more sophiticated).

alanmusicman
Автор

OMG I actually understood every word of the Assembly Language section, and it time-warped me back 40 years

jagmarc
Автор

This brings back memories from over 40 years ago when I worked at a commercial computer center with a PDP-11/70. I remember always having a mini reference card in shirt pocket, though after a while I just memorized the bootstrap address and the assembler binary codes. Hard drives were the size of washing machines and used heavy 10-platten Nashua disk packs. Ah yes, those were the good old days.

PeterHonig.
Автор

Great video. Brings back memories of my 8080, my first computer.
I assume you did the hex to binary conversion as a teaching tool.
Back in the day, us real bitsmiths keyed into the front panel in hex.
That's why the switches are colored in groups of four, one group equals one hex digit.
Though the Altair grouped in threes as the 8080 used octal notation, I don't know anyone who worked in octal.
Keep these coming!

mikescott
Автор

Thanks, Dave! My dad had an Altair and always talked fondly about it, but by the time I was old enough to understand computers in any meaningful capacity, it was basically non-functional. Glad to see how that kind of interface actually functioned in real life.

DrakeNS
Автор

Love the graphic with the hand pointing; really helpful for following along

jamesbromley
Автор

Boy did that bring back 45 year old memories. When I got out of college I went to work doing field testing for bell labs. Our master system was a PDP11 with a 1 meg hard drive. This was connected to 3270 type terminals and remote test systems. The test systems consisted of an intel 8008 cpu and 16 banks of 64k memory. The real time os supported 32 "concurrent" tasks. Each memory bank had a copy of the os in low memory and some part of the application in the remaining memory. To run a particular part of the app. Your program would jump to the bank routine in lower memory, look up which bank to use then force a bank switch invisible to the cpu, then jump up to routine. To get the pdp11 up and running we had to manually key in the boot loader to boot off the one megabyte hard disk. Fun days programming in pdp11 and Intel 8008 assembler. Later I was thrilled to program in C and other high level languages

jimpad
Автор

Thank you! Light falls on a dark corner and is dark no more. My entry to computing began with Basic and magnetic tape... So I marvel at the patience and persistence of those who came before and struggled with punched cards and paper tape. As for those who programmed memory addresses directly with switches - I bow before you!

SteepSix
Автор

I spent lots of time 35 years ago entering boot loaders this way on PDP11s! They used Octal - ie groups of three bits giving values between 0-7 and the switches were colour coded in groups of three - so it’s pretty easy to get your head around translating from the assembler output in octal and flipping the groups of three switches to enter the addresses and data

Richardincancale