Crusty Programmer Story 1

If you read my About page, you’ll know that I’m a crusty old programmer (COP). I may be 48 years young (as of January 2008), but I’m 144 years old in programmer-years. A year of intense programming ages you at 3x normal. (I suppose that, more accurately, I’m 15+33*3=114, since I didn’t start writing software until I was 15 🙂 ).

Needless to say, over the course of this many years I’ve see a lot of stuff happen.

As do other COPs, I like to amaze people with “back in the old day” stories. When a bunch of us COPs get together, this becomes a competition of sorts where winning is achieved by describing the most absolutely arcane, unbelievable, thing that we had to deal with in our youth. I generally do pretty well in these contests.

No, I did not cut gears for Babbage’s Difference Engine nor did I swap tubes on the Eniac. My history only goes back to Univac 1108s and IBM 360s in the mid 70s. I did punch card decks and stream paper tape. I do remember going to libraries and seeing books on both digital and analog computers (whatever happened to these?). I also remember reading about wiring “programming panels” on older computers.

Most of my crusty programmer stories come from the early days of microcomputers (as they used to be called back then). My first micro was an Intel 8008-based system. The machine was called the Scelbi 8H. I would love to buy one of these now, but they all seem to be in museums.

I experienced the arrival of CP/M and the Z-100 based Intel 8080 systems. I used the first Altairs and envied the folks with the cool IMSAI machines (much prettier front panels). I programmed these as well as the first Apple II (using UCSD Pascal).

One a scale of 1-10, programming a computer via its front-panel switches is worth about 7 crusty old programmer points. Whenever I meet a whippersnapper that brags about working on a PDP-8, I counter that they were totally spoiled. Let me explain.

On the PDP-8 (and all computers of which I’m aware of, save one), the front panel had lots of switches:

(borrowed, without permission, from Wikipedia)

To write data to memory, you could set the main bank of switches to an address (only 12-bits) and press the “ADDR LOAD” button. Then you could set the switches to the data you wanted to write and press the “DEP” button. This would write the data in the previously loaded address and would then increment the address by one. You could write successive words of memory by setting the switches to the desired value and pressing “DEP”. The PDP-8 front panel worked by performing a “memory write” bus cycle.

Performing this task was way more complicated on the Scelbi 8H. Consider it’s front panel:

Scelbi 8H front panel

(also from Wikipedia)

It’s only got 8 data switches and three pushbuttons. The three buttons are labeled “Int”, “Run” and “Step.”  The most important of these was Step. Run simply started your program and Int stopped (interrupted it). Step was where all the programming action took place. On the Scelbi 8H, this button “jammed” an instruction (whatever was on the switches) into the CPU. I don’t know whether this was dictated by the CPU design or simply an abomination invented by Nat Wadsworth (the father of the Scelbi). Presumably, implementing the front panel this way was easier than having it perform a full memory write cycle. However, it made panel-based programming torturous. This is what you had to do:

  1. Set the data switches for the binary equivalent of the LHI instruction (octal 056). LHI is the “Load H register immediate” instruction. In the 8008, The H and L registers are the “address” to be used for subsequent memory operations. Press Step. Now the CPU is waiting for the second byte of the LHI instruction: the byte to be stored into the H register.
  2. Set the switches to the high byte of the memory address to where you want to store a byte. Press Step. Now you’ve got the H register loaded!
  3. Set the switches for the binary equivalent of the LLI instruction (066). Press Step.
  4. Set the switches to the low byte of the memory address to where you want to store a byte. Press Step. Now you’ve got your HL register pair set!
  5. Set the switches for the binary equivalent of the LMI instruction (076). This is the “Load memory immediate instruction”. Press Step. Now the CPU is waiting for your data byte.
  6. Set the switches to the byte value that you want to store to memory. Press Step.  You’re done!

If you wanted to store a second byte, things were a little easier. You could simply execute the INL (increment L) instruction and then repeat steps 5 and 6. I don’t remember if INL automatically “carried” to the H register. I suspect you had to know you were crossing a “page” boundary and had to manually increment H, too.

Yes, we were real men back in 1975. Programming was painful and we liked it that way. No pansy-ass compilers for us, no sir. Of course, we were lucky if we could write 128 bytes of machine code a day. Today, heck, an empty program generates 1000 times that much code.

PS: A big “shout out” to Ron Hosek and Jeff Augenstein. These two guys hired me back in 1975, when I was just 15 years old. They let me write software for the Scelbi 8H and, later, for the Altair. They were truly among the first of the computer entrepreneurs and I learned a lot working with them. I’ve lost touch with them over the years, but I hope that they are happy, healthy and smug for having so much foresight.