Take a Look at the Source Code That Landed Man on the Moon

The source code for the guidance computer behind the Apollo 11 moon landing has been posted online -- and it looks like the programmers behind it had a healthy sense of humor.

Chris Wiltz

July 15, 2016

3 Min Read
Take a Look at the Source Code That Landed Man on the Moon

It only took about 2 MB of code to get us to the moon.

Chris Garry, a former NASA intern, has uploaded the full source code for the Apollo 11 flight computer to GitHub, a popular site where programmers share code and tips, and it's proven to be a nice slice of nostalgia in more ways than one.

The software for NASA's Apollo Guidance Computer (AGC), which was installed on Apollo command modules and lunar modules, was developed in the 1960s at MIT. At the time nothing for what NASA was trying to do existed so the team from MIT had to code the entire thing from scratch. To do so they created their own version of Assembly language as well as a method for storing computer programs called “core rope memory”, which at the time offered greater storage capacity.

The Apollo Guidance Computer
(Image source: Grabert at German Wikipedia [Public domain], via Wikimedia Commons)

How much code was there? It was as tall as an adult woman as illustrated by this picture released by MIT of Margaret Hamilton, director of Apollo Flight Computer Programming at MIT's Draper Laboratory.

(Image source: MIT/Public Domain)

Back in 2003 MIT scanned the physical pages of the AGC code and made them available. But Gary Neff, an airline pilot from Colorado saw how unreadable some of the pages were and decided to reconstruct the code himself. It popped up in a few other places, like on a Google blog from 2009, but Neff's work mostly languished in Internet obscurity until Garry found it and uploaded it to GitHub, where it has found new life among programmers poring over the code and suggesting ways to improve and change it.

Looking over the code and how, frankly, obtuse it is might fill some with a wave of nostalgia and have others thanking their higher power of choice that we're living in the age of Python.

And it looks like the original programmers felt the tedium of their task as well. Users scanning over the source code have found the coding comments peppered with jokes, asides, and even references to popular songs, Shakespeare, and cultural events of the time.

Take this bit of code from the ignition program (aptly labeled BURN_BABY_BURN) that talks about how the program's name was inspired by the 1965 Watts Riots in Los Angeles:

(Image source: GitHub)

Another file, PINBALL_GAME_BUTTONS_AND_LIGHTS, apparently for the system's keyboard display, contains a quote from Shakespeare's Henry VI, seemingly to poke fun at the display system, which used numbered codes to represent noun and verb commands.

(Image source: GitHub)

You can see the full AGC source code over on GitHub.

Coders -- Do you enjoy adding amusing comments? Any more nice jokes or references you found in the AGC code? Any changes you would make? Let us know in the comments!  


Chris Wiltz is the Managing Editor of Design News

Sign up for the Design News Daily newsletter.

You May Also Like