Houston, we have code!

Apollo 11 went to the moon and back guided by a computer with 0.08% of the processing power of an iPhone 5s ... now you can read the code that drove the mission and try the simulator

apollo 11 on moon

Did you know that the computer that coordinated the Apollo 11 mission that landed on the moon, the Apollo Guidance Computer, had about 0.08 percent of the processing power of an iPhone 5s? That it had just 2K of RAM and ran at 1.024MHz and its external signaling ran at 512Khz ? That it had only four 16-bit registers and 32KB of storage? Despite having so little power, the AGC guided the Apollo 11 mission across more than 221,000 miles of space to land on the moon then brought them back again. Amazing.

And check out the AGC's user interface:

786px apollo dsky interface.svg Wikimedia

The Apollo DSKY interface

You think today's apps have a poor user experience?! Wikipedia explains:

The user interface to the AGC was the DSKY, standing for display and keyboard and usually pronounced dis-key. It had an array of indicator lights, numeric displays and a calculator-style keyboard. Commands were entered numerically, as two-digit numbers: Verb, and Noun. Verb described the type of action to be performed and Noun specified which data was affected by the action specified by the Verb command.

If you're feeling nostalgic for such gear or have a desire to experience the true horror of a user interface somewhat less friendly than a cornered rat, you can play with the Virtual Apollo Guidance Computer, created by Ron Burkey, which emulates the system at an almost fanatical level of detail. 

And to amplify the amazing, the code that the AGC ran was uploaded to GitHub last Thursday by the aforementioned Ron Burkey, so we can pour through it and the comments left by the original programmers, and marvel at what NASA programmers were able to achieve in the 1960s with what were, by any measure, limited resources.

The comments in the code are illuminating and often amusing, for example the MASTER IGNITION ROUTINE is tagged with “BURN, BABY, BURN”, a reference to a syndicated radio show disk jockey from the 1950’s and 60’s named Magnificent Montague, and there's even a quote from Shakespeare.

How much code was there? Printed out it was almost as tall as Margaret Hamilton, NASA's director and supervisor of software programming for Apollo and Skylab.

margaret hamilton nasa

Margaret Hamilton, NASA's director and supervisor of software programming for Apollo and Skylab

Quartz has an excellent (as always) write-up of the genesis of the online version and the wags online have started submitting code changes to the GitHub version. Over on Reddit the quips are piling up; someone suggested that the AGC was “The earliest version of PowerShell” while another noted that “That's enough to fly to the moon, land, and return. But 3 GHz and 16 GiB RAM somehow aren't enough for a smoothly animated jumping kitten. ******* webdevs.”).

The Apollo 11 AGC code is a fascinating part of computer history. Next time you find yourself grumbling about processor speed and lack of memory, remember what NASA programmers were able to achieve with 2K of RAM and a 1.024MHz processor. To quote Monty Python: “… you try and tell the young people today that... and they won't believe ya’.

Comments? Thoughts? Email me your guidance or comment below then follow me on Twitter and Facebook.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.
Related:
Must read: Hidden Cause of Slow Internet and how to fix it
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.