In Their Own Words: Don Eyles on Apollo 14
"Trouble came about three hours before Apollo 14 was due to start the lunar descent. Ground control noticed a signal that the abort button in the LM cockpit appeared to have been pressed. In the cockpit were the mission commander, Alan Shepard, and his copilot, Edgar Mitchell. Shepard had become America's first astronaut when he was hurled into space on a Redstone rocket in May, 1961. His success emboldened President Kennedy to announce the Apollo Project — but Shepard had been sidelined ever since, not even allowed to fly a jet by himself, because of a problem affecting his inner ear. Ground control asked the astronauts to tap on the panel near the abort button. The indication went away, but returned a little later. Evidently there was a stray piece of metal floating around inside the switch.
The abort button was there in case something went badly wrong during the landing. With one push the astronauts could command a quick return to a safe orbit. At this point in the mission the spurious signal had no effect, but if it happened during the descent then the LM would scoot back up to lunar orbit before anyone could do anything about it. Shepard and Mitchell would be safe, but the mission would be ruined.
It was about 1:00 AM when Bruce McCoy came to tell me about the problem. I was in my office a few steps away from the room where we monitored the mission. I had programmed most of the lunar landing software in the LM's guidance computer, including the code that monitored the abort button. The problem was mine to solve. I had to defeat my own code — make it insensitive to the signal it was supposed to be monitoring. McCoy and I walked to a nearby office where there was a listing of the exact software that was in the LM's computer.
I saw immediately that the only way to disable the monitor was to set an indication that an abort was already in progress. That seemed crazy at first, but I realized that it was done at the right time the actual effect would be minimal. The engine would still light up on time for the lunar descent. That was the germ of the idea. It took a couple of simulated landings in our hybrid simulator to iron out the wrinkles. It was a team effort. The result was a procedure requiring 61 keystrokes on the DSKY and a couple of manual steps. We hung on every syllable as the details were read up to the spacecraft. Every keystroke had to be perfect because we were reaching deep into the computer's memory.
And so Apollo 14 touched down gently in the Fra Mauro Highlands, which Apollo 13 had left unexplored. Many people feared that a second unsuccessful mission would have meant the end the Apollo Project. Alan Shepard became the fifth man to walk on the Moon. For him it was a story of two procedures. The surgical procedure that had solved his ear problem, and the procedure we developed for the faulty abort switch.
Several years later a book came out that had me at home, sleeping, when the problem came up. I pulled on a bathrobe and was rushed to MIT in an Air Force car. Pure fiction! Would you be asleep if your software was about to guide a landing on the Moon?"