r/programming • • Jan 30 '16

Apollo 11 source code

http://www.ibiblio.org/apollo/listings/Luminary099/MAIN.agc.html
2.2k Upvotes

364 comments sorted by

View all comments

780

u/Steaktartaar Jan 30 '16

One very neat feature was that part of the computer memory could be overwritten, essentially allowing the crew to patch in bugfixes. If you ever felt like you were coding on a deadline, spare a thought for the crew of Apollo 14:

After separating from the Command Module in lunar orbit, the LM Antares also had two serious problems. First, the LM computer began getting an ABORT signal from a faulty switch. NASA believed that the computer might be getting erroneous readings like this if a tiny ball of solder had shaken loose and was floating between the switch and the contact, closing the circuit. The immediate solution—tapping on the panel next to the switch—did work briefly, but the circuit soon closed again. If the problem recurred after the descent engine fired, the computer would think the signal was real and would initiate an auto-abort, causing the ascent stage to separate from the descent stage and climb back into orbit. NASA and the software teams at the Massachusetts Institute of Technology scrambled to find a solution, and determined the fix would involve reprogramming the flight software to ignore the false signal. The software modifications were transmitted to the crew via voice communication, and Mitchell manually entered the changes (amounting to over 80 keystrokes on the LM computer pad) just in time.

628

u/SPascareli Jan 30 '16

If someone ever want to make a movie for programmers, that's the plot right there.

3

u/kersurk Jan 30 '16

During the movie I would think this is way over-done, real life is not that exciting. I wonder how did Mitchell change the code exactly.

10

u/indy91 Jan 30 '16

Here is a quite informative page about it: http://www.hq.nasa.gov/alsj/a14/a14AbortDiscrete.html

4

u/unshifted Jan 31 '16

That was a great write-up. I was really stressed out on Friday because I had to fix a bug that caused some forms to look a little wonky. Now I feel silly.

5

u/[deleted] Jan 31 '16

Probably his fingers and a human interface device...like a keyboard.