The Computer That Landed on the Moon Almost Refused To
Three minutes from touchdown the lunar module's computer threw a 1202 alarm. Margaret Hamilton's code shrugged it off and kept landing.
Three minutes before Apollo 11 was to touch down on the Moon on July 20, 1969, a yellow caution light went on in the lunar module and the on-board computer printed the code 1202 for Buzz Aldrin to read aloud to mission control in Houston. A few seconds later, 1201. Steve Bales, a 26-year-old guidance officer in Houston, had to decide in real time whether to call an abort. He called "GO."
The alarms meant the computer had been handed more work than it could finish in one cycle — "executive overflow." The cause was the rendezvous radar. Aldrin had left it switched on during the descent in case the crew needed to abort and rejoin the orbiting command module. A subtle phase mismatch between two 800-hertz power supplies made the radar appear to twitch wildly, and each twitch flooded the Apollo Guidance Computer with interrupt requests. The hardware had 2,048 words of RAM and a 2-megahertz clock; it had no headroom to spare.
What saved the landing was software written under Margaret Hamilton at the MIT Instrumentation Laboratory. Hamilton's team had built the executive program around priority scheduling. When tasks queued up faster than the computer could finish them, the system threw the low-priority ones overboard and kept the high-priority ones — descent guidance, throttle, attitude control — running. The 1201 and 1202 alarms were the operating system announcing that it was doing exactly that. Five separate alarms fired between altitude 30,000 feet and touchdown; the computer never lost the lock on landing.
Hamilton coined the phrase "software engineering" while she was building the Apollo system, partly to make her colleagues take her work as seriously as the hardware engineers took theirs. She was awarded the Presidential Medal of Freedom for it in 2016.
Make Recess yours.
Sign in to save the ones you loved, never see the same thing twice, and tell us what you want more of.