Ten lines of code saved Apollo 14 from an accidental abort
Hours before Apollo 14's lunar module was scheduled to touch down in 1971, a loose solder ball caused a mechanical abort switch to short-circuit intermittently. If the descent engine fired with that switch closed, the guidance computer would automatically abort the landing. MIT programmer Don Eyles scrambled to write a ten-line patch. Astronaut Edgar Mitchell keyed the instructions into the computer, tricking it into believing an abort was already underway so it ignored the faulty sensor.
The Ghost Signal on the Instrument Panel
In February 1971, Apollo 14 astronauts Alan Shepard and Edgar Mitchell separated their Lunar Module, Antares, from the Command Module Kitty Hawk in lunar orbit. They were preparing for Powered Descent Initiation, the critical rocket burn designed to slow the spacecraft and drop it toward the Fra Mauro highlands. As they ran through their pre-burn checklists, an anomalous indicator light blinked on inside the cockpit: the abort light. Mission Control in Houston immediately checked telemetry data and confirmed that the guidance computer was receiving an abort command.
Neither astronaut had touched the switch. Mitchell tapped the instrument panel beside the abort button with the back of a flashlight, and the signal vanished. Moments later, it returned. Engineers quickly deduced that a tiny bead of loose solder had broken free inside the hermetically sealed mechanical switch. Drifting in zero gravity, this microscopic piece of conductive metal was floating between the electrical contacts, intermittently bridging them and closing the circuit without human intervention.
The timing could hardly have been worse. The mission rules were unambiguous: if the computer detected an abort signal while the descent engine was firing, it would instantly trigger an automated abort sequence. The computer would separate the descent stage, fire the ascent engine, and fling the astronauts back into orbit, ending the mission and discarding the landing vehicle before Mitchell and Shepard had even begun their descent.
The Apollo Guidance Computer, designed at the MIT Instrumentation Laboratory, was engineered to handle high-stress emergencies faster than human reflexes allowed. During powered descent, the computer executed a landing program called Program 63. If an explosion, guidance failure, or loss of attitude occurred close to the lunar surface, every fraction of a second mattered. The abort monitoring routine was programmed to sample the abort discrete bit dozens of times every second.
If that bit showed a value of one—indicating a closed switch—the operating system would immediately drop Program 63 and launch Program 70, the automated abort software. Program 70 commanded the descent engine to full throttle, fired pyrotechnic charges to sever the descent stage from the ascent stage, ignited the ascent engine, and established a trajectory to carry the crew safely back into orbit. It was a life-saving mechanism in an actual catastrophe, but with a floating solder ball, it was a hair-trigger trap.
The crew could not simply ignore the switch or disconnect it mechanically. The wiring was bundled deeply inside sealed bulkhead panels, and cutting wires in flight was impossible. Worse, the descent engine burn was scheduled to begin in less than two hours. If ground controllers could not find a way to silence the false signal, flight directors would have no choice but to wave off the landing attempt entirely.
The MIT Scramble
Mission Control reached out to the MIT Instrumentation Laboratory in Cambridge, Massachusetts, where programmer Don Eyles was asleep at home. Eyles, in his mid-twenties, had written major portions of the Lunar Module's descent and abort software. Rushed to the lab's facilities, he gathered with colleagues to analyze the computer's internal architecture and look for an operational loophole.
The guidance computer's primary code was physically woven into core rope memory—copper wires threaded through magnetic cores in a factory, representing permanent, unchangeable read-only programming. There was no way to recompile the landing program or rewrite lines of executable code in read-only storage. Any modification had to be made to the erasable memory, a tiny working scratchpad of magnetic-core RAM that held only about two thousand words.
Eyles knew the internal logic of the abort sequence intimately. Program 70 did not launch blind; it checked several internal memory flags to track its own execution state. The computer’s executive software relied on a specific flagword in erasable memory to record whether an abort was already in progress. Eyles realized that if they could manually modify the contents of that erasable memory address, they could exploit the computer's own internal safeguards against it.
Tricking the Guidance Computer
The logic of Eyles's patch was counterintuitive: trick the computer into believing that an abort had already occurred. If the guidance system believed it was already managing an abort, the background monitoring routine would conclude that its job was done and stop checking the abort switch bit. This would prevent the system from ever launching Program 70 anew.
The patch required setting the abort flag in erasable memory right before the descent engine fired. However, because the computer thought an abort was underway, it would normally stop accepting landing guidance commands. Eyles’s sequence bypassed this by having the astronauts initiate the descent burn in Program 63, then manually enter memory-modification commands through the computer keyboard to set the abort flag while the engine was running.
This software workaround carried significant operational risk. By blinding the computer to the abort switch, the astronauts lost the ability to use the push-button abort feature. If a real catastrophe struck during descent, Mitchell would have to manually execute a multi-step sequence on the keyboard and fly the ascent engine manually. With the landing attempt on the line, Shepard and Mitchell accepted the risk.
Entering the Keystrokes by Hand
With less than forty minutes before engine ignition, Mission Control began reading the patch up to the spacecraft over the radio. The computer interface was the DSKY—the Display and Keyboard—a numeric keypad with digital readouts. Astronauts communicated with the computer using paired Verb and Noun codes that specified memory addresses and values.
Mitchell listened carefully to the instructions read by capsule communicator Fred Haise. Working with pencil and paper, Mitchell copied down the octal strings, verified them against Haise's readback, and methodically keyed them into the DSKY. Using Verb 21 (write into erasable memory) and Noun 01 (specify memory address), he loaded the new instructions directly into the working registers.
The final sequence had to be executed during the burn itself. After Mitchell confirmed the pre-ignition entries, Antares rotated into position over the lunar farside and fired its descent engine. At the designated second, Mitchell leaned forward and punched in the final keystrokes. Telemetry in Houston showed that the abort flag engaged and the monitor routine went quiet. The solder ball continued to short-circuit, but the computer simply ignored it.
Descent and the Final Obstacle
Although the software patch operated flawlessly, Apollo 14 was not out of danger. As Antares dropped toward the lunar surface, the landing radar failed to lock onto the terrain at the designated altitude of 30,000 feet. Without altitude and velocity data from the radar, the guidance computer could not compute proper braking maneuvers, and mission rules mandated an immediate abort if lock was not established before 10,000 feet.
Mitchell cycled the landing radar’s circuit breaker open and closed inside the cabin. At approximately 18,000 feet, the radar suddenly acquired lock and began feeding ranging data into the computer. Shepard took manual control of the vehicle during the final approach phase, steering the module clear of rough terrain and guiding Antares to a smooth touchdown on the Fra Mauro formation.
The mission successfully carried out its science objectives, but the landing remained one of the closest calls in the Apollo program. The workaround devised by Don Eyles became a celebrated demonstration of real-time software engineering, proving that human ingenuity and flexible memory architecture could salvage a complex spaceflight mission from a millimeter-sized mechanical flaw.
Key takeaways
•An intermittent short circuit in Apollo 14's abort switch was traced to a microscopic bead of loose solder floating inside the sealed switch casing.
•Because the Apollo Guidance Computer's primary code was permanently woven into read-only core rope memory, the fix had to be entered directly into erasable RAM.
•MIT programmer Don Eyles designed a workaround that set the computer's internal abort flag, tricking the machine into believing an abort was already underway so it ignored the faulty sensor.
•Astronaut Edgar Mitchell keyed the instructions directly into the computer's DSKY interface just minutes before and during the descent engine burn.