Monday, October 31, 2011

The Demon Machine

Over the weekend I was reunited with the first two computers I spent extensive time programming. The Sharp MZ-80K (released in 1979) and the BBC Micro Model B (released in 1982).

Here's the BBC Micro:

with the top off you can spot that I've added my own headphone socket at the back and that this machine was upgraded with the speech synthesis module.

And I had the ROM slots maxed out with Basic II, Caretaker, and Acornsoft LISP.

And here's the Sharp MZ-80K:

Both work fine, but I was struck by my reaction to the machines. I wanted to boot them up and get programming. A little voice in each machine was speaking to me about all the unchartered lands of programs that could be written in just kilobytes of RAM. Of all the possibilities, tucked away in the Acorn MOS and the Sharp's memory.

It's the same little voice that still drives me on to write just another line of code, to perfect just another little routine. Just the other night I was dragging myself at midnight but unable to turn in until I'd got the proportional font working on this homebrew display I'm working on:

Truly, that inner voice is demonic. The seductive world inside a computer (so well captured in 1982's Tron) draws you in with just one more possibility, just a little more time. The demon voice asks that you keep going when physical strength is gone, when you know that tomorrow will come and tiredness will ruin your day. But right now, right then, the power of the machine, the power over the machine, matters more than anything.

And yet the computer is a harsh mistress. If it fails to do what you want it's because you failed. It is merely deterministic; you didn't correctly tell it what to do. As Maurice Wilkes poignantly puts it of the early days of computing:
As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.
The human/machine relationship is abusive. The computer tempts you with its power and possibility, then punishes you with your own failings, your own inept attempts at programming it, your own lack of knowledge. And yet you love it.

As ever Richard Feynman can be relied upon to capture the disease of computing:
“Well, Mr. Frankel, who started this program, began to suffer from the computer disease that anybody who works with computers now knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is you *play* with them. They are so wonderful. You have these switches - if it's an even number you do this, if it's an odd number you do that - and pretty soon you can do more and more elaborate things if you are clever enough, on one machine.

After a while the whole system broke down. Frankel wasn't paying any attention; he wasn't supervising anybody. The system was going very, very slowly - while he was sitting in a room figuring out how to make one tabulator automatically print arc-tangent X, and then it would start and it would print columns and then bitsi, bitsi, bitsi, and calculate the arc-tangent automatically by integrating as it went along and make a whole table in one operation.

Absolutely useless. We *had* tables of arc-tangents. But if you've ever worked with computers, you understand the disease - the *delight* in being able to see how much you can do. But he got the disease for the first time, the poor fellow who invented the thing.”
And so dear BBC Micro and Sharp MZ-80K you shall remain powered off (or at least that's what I'll tell everyone and I'll secretly fire up that LISP ROM when no one's looking and just write a little program, just one.)

Henry Kissinger has famously said that power is better than sex. Well, clearly he isn't a programmer!

PS Does anyone have a copy of the manual for the Caretaker ROM? Purely, for completeness; clearly I'm not going to actually need it :-)


RBerenguel said...

When I got to the main point in your post I thought "hah! Like Feynman said!". And then you quote Feynman :) Everyone who has been biten by the programming bug knows the feeling. Start and never end, and repeat the cycle endlessly.


GregJ said...

I know this feeling well. It is definitely an addiction. Strangely, though, people will pay you to engage in it! The other night a catchy phrase occurred to me: After midnight, I collapsed into bed exhausted but happy, having successfully sought and achieved Computational Consummation.

KBR said...

Ah shit. I found an old TI computer that's older than I am and my first reaction was, "I need to get the RF modulator so I can hook this thing up to a TV and get hackin'".

I wouldn't have any idea where to even start, but I know I'd get sucked in.

Yeah, that evil little silver box lives in the storage unit now.

Michael Gruen said...

Wow... so TRUE ! :-) I still have my Zilog Z-80 from 1982, with wires all hanging out from a phone dialer... and a notebook with tens of pages of handwritten assembly code... Ha ha almost 30 years later now... and seriously, the play aspect to this day requires deliberate self-control... thanks for the article.

Dan Sutton said...

Yes! Yes! That's right! Ah... this takes me back to the good old days, when everyone programmed in machine code and lived in the forest... and nobody lived anywhere else...

Mark Agius said...

Plug in to the mains, turn on 'beep' and you can start using it,
unlike modern computers that take ages to turn on.
I'm sure BBC micros can crash, but I can't remember mine ever crashing.
The only computer that knows how to spell the word colour.

Richard Langner said...

My business still runs on a BBC micro!

Way back in the 80s I wrote an accounting program (in a 16k ROM), and I still use it today to make a living as an accountant.

There is still nothing like it that runs on a PC.

I wrote the program in 6502 assembler, and it assembled into sideways RAM, which occupies the same address space as the BASIC ROM.

The program finished up as a relational database, with data compression (and decompression on-the-fly) and I used my own version of virtual memory to assemble the code which was in 13 parts as it would not all fit into ram at the same time.

The BBC's RS485 connects nicely with the RS232 on the PC so I can publish the results in MS Word.

The good old days!

John Graham-Cumming said...


That's a wonderful story. Do you have a web site write up of what you are doing? I'd love to see pictures of your set up. Sounds brilliant.


J2C2 said...

I still have the punched cards for an eternal calender program run on the Illiac IV in Urbana Illinois - The creator of "Hal" in "2001 A Space Odyssey"