Wednesday, August 05, 2009

Just give me a simple CPU and a few I/O ports

Back when I started programming computers came with circuit diagrams and listings of their firmware. The early machines I used like the Sharp MZ-80K, the BBC Micro Model B, the Apple ][ and so on had limited instruction sets and an 'operating system' that was simple enough to comprehend if you understood assembly language. In fact, you really wanted to understand assembly language to get the most out of these machines.

Later I started doing embedded programming. I wrote a TCP/IP stack that ran on an embedded processor inside a network adapter card. Again it was possible to understand everything that was happening in that piece of hardware.

But along the way Moore's Law overtook me. The unending doubling in speed and capacity of machines means that my ability to understand the operation of the computers around me (including my phone) has long since been surpassed. There is simply too much going on.

And it's a personal tragedy. As computers have increased in complexity my enjoyment of them has plummeted. Since I can no longer understand the computer I am forced to spend my days in the lonely struggle against an implacable and yet deterministic foe: another man's APIs.

The worse thing about APIs is that you know that someone else created them, so your struggle to get the computer to do something is futile. This is made worse by closed source software where you are forced to rely on documentation.

Of course, back in my rose tinted past someone else had made the machine and the BIOS, but they'd been good enough to tell you exactly how it worked and it was small enough to comprehend.

I was reminded of all this reading the description of the Apollo Guidance Computer. The AGC had the equivalent of just over 67Kb of operating system in ROM and just over 4kb of RAM. And that was enough to put 12 men on the moon.

Even more interesting is how individuals were able to write the software for it: "Don was responsible for the LM P60's (Lunar Descent), while I was responsible for the LM P40's (which were) all other LM powered flight". Two men were able to write all that code and understand its operation.

12 men went to the moon using an understandable computer, and I sit before an unfathomable machine.

Luckily, there are fun bits of hardware still around. My next projects are going to use the Arduino.



Blogger Martin's Blog said...

I completely sympathize with this point of view.

Although the Arduino is a good start, I found I liked it even more after I threw away the IDE.

You'll probably enjoy figuring it all out for yourself, but here are a few notes I wrote about my experiences:

10:05 AM  
Blogger Legooolas said...

You might want to check out XMOS for their dev kits and chips too -- Eclipse with C, asm and a C-derivative with support for wiggling pins and parallelism.

Has a lot more oomph than the Arduino, but is still pretty easy to understand. Not quite as easy to whack on a board yourself, but there are dev kits for $99 to play with one.

[Disclaimer: I work for them, so am biased :)]

12:24 PM  
Blogger Maht said...

I do miss the BBC's 1mhz bus, even though I still have mine on the shelf!

Even the missing of A/Ds on a modern pc annoy

Anyway if you want some fun get an AVR & a dev card, they are top fun, 8 bit some flash & some ram. A bit more cash gets you a Spartan FPGA that runs at video processing speed.

It is the PC platform that is weak with IO.

If you want an OS you can comprehend try Plan9 or Inferno, the latter runs as a user app on win/lin/osx. Plan9 was the first 32bit kernel I could read and understand & I'm certainly no hotshot.

Hacking the C source of Inferno is fun, I'm even lucky enough to get paid to do it!

12:49 PM  
Blogger spiritusdomus said...

I purchased a BOARDUINO(arduino clone) from adafruit and put the thing together myself. IT was fun.

1:23 PM  
OpenID Stephen.Harrison said...

The Arduino is a great device, I hope you have as much fun with it as I've had with the 2 I have. One of mine is permanently employed at my day job as a build indicator

I've started playing with the the .net micro framework which whilst I appreciate you don't like the api side of things still looks great, uses the really good VS2008 IDE and they are in the process of open sourcing it.

I recently purchased a Meridian/P to play with and have started a little blog about working with .net microframe as well as some other general dot net stuff.

2:08 PM  
Blogger Clint Laskowski said...

John, do you follow this blog: ? It's a blast from the past. You can also, of course, find simulators for the Apple ][ and other boards. Who remembers the KIM-1? My system was the Ohio Scientific C24P. Oh, how I long for PEEK and POKE graphics :-)

3:05 PM  
Blogger Sandro Magi said...

I think you overestimate how well the Apollo code was understood. Take a look at this LtU thread where they describe how two bugs in the Apollo code fortuitously cancelled each other out during the actual mission, instead of crashing the lander. FYI, the Apollo 11 source code is also available on Google Code, and it's linked from that thread.

Software has always had bugs, and I suspect, always will. Only employing formal methods, the least of which are type systems, will drastically reduce the occurrence of bugs.

6:28 PM  
Blogger Augusto said...

Just got my arduino in the mail today. I haven't been this excited about hardware for a while.

9:47 PM  

Post a Comment

Links to this post:

Create a Link

<< Home