Update:I've modified a few specifics in this piece thanks to input from Apollo Lunar Surface Journal contributor Paul Fjeld. Thanks, Paul!
Last week was the forty-sixth anniversary of the Apollo 11 moon landing—the first of the six crewed landings on our nearest celestial neighbor. In the years between 1969 and 1972, 12 human beings walked on the surface of the moon: Neil Armstrong, Buzz Aldrin, Pete Conrad, Al Bean, Alan Shepard, Ed Mitchell, Dave Scott, Jim Irwin, John Young, Charlie Duke, Jack Schmitt, and Gene Cernan. Each Apollo landing by necessity leapfrogged the previous by some notable amount, because even as Apollo 11 was preparing to lift off it was obvious that the money wasn’t coming and Project Apollo might be the only chance to visit the moon—perhaps for a long, long time.
Even though Apollo 10’s "dress rehearsal" had taken NASA through all but the final phase of the lunar landing two months before, there were still a large number of unknowns in play when Neil Armstrong and Buzz Aldrin separated Eagle from Columbia, leaving Michael Collins to watch his crewmates descend to the lunar surface—perhaps to stay there forever.
And as it turned out, the first landing on the moon almost did encounter disaster. Shortly after Eagle entered one of the most complicated stages of the descent, the guidance computer began throwing off alarms—very serious alarms, of a type no one in mission control or on the spacecraft was immediately familiar with. Back at MOCR2 in Houston, the burden to determine whether or not the alarms were benign—and therefore the decision to determine whether to abort the landing, blow the Eagle in half, and make an emergency burn to try to make it back up to Columbia—fell on the shoulders of two people: guidance controller Steve Bales and backroom guidance specialist Jack Garman.
It’s an accepted axiom that the Apollo missions flew to the moon on a computer variously described as "less powerful than a pocket calculator" or "less powerful than a digital watch" or other similarly deprecatory statements, but that’s a half-truth. While shockingly primitive at first glance to modern eyes, the Apollo Guidance Computer was a capstone of engineering achievement in the context of the 1960s; further, the software that ran on it was almost miraculously sophisticated by the standards of the day. The executive system—written in part by software geniuses like Hal Laning at MIT—pioneered many of the ideas behind real-time computing, and many of the principles first put into effect in the various revisions of the Apollo Guidance Computer’s software are still used in real-time systems today.
The Apollo Guidance Computer really isn’t a general purpose computer at all. It had no need to address a complicated set of peripherals through some kind of hardware abstraction layer; it had no need to parse English-style commands; it had no high-level programming language to interpret. As explained by Woods in the Apollo Guidance Computer can be best understood as a sophisticated embedded controller, built and wedded to the hardware of its host vehicle. The AGC in the Command Module was built to control the Apollo spacecraft as it flew toward the moon, keeping track of where it was and where it was going (in the form of its state vector relative to one of several different points of reference, which changed as the mission progressed).