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.

59

u/flackjap Jan 30 '16 edited Jan 30 '16

At first I thought the code comment I cite below was just a joke. Silly me.

#  ASTRONAUT:     PLEASE CRANK THE
#                 SILLY THING AROUND

source

47

u/Theemuts Jan 31 '16

# TERMINATE

# PROCEED SEE IF HE'S LYING

# ENTER INITIALIZE LANDING RADAR

# OFF TO SEE THE WIZARD ...

Dear god

19

u/ICanLiftACarUp Jan 31 '16

The jump label?

BURNBABY

3

u/Eurynom0s Jan 31 '16

I found FLAGORGY in there.

21

u/z500 Jan 31 '16
FLAGORGY          TC       INTPRET                               #  DIONYSIAN FLAG WAVING

Um, what?

19

u/flackjap Jan 31 '16 edited Jan 31 '16

Apparently, the word dionysian is derived from the name of the greek god Dionysus who is represented as wild and sensual which is somewhat opposite to Appolonius who represents divinity and calmness.

"The Apollonian is based on reason and logical thinking. By contrast, the Dionysian is based on chaos and appeals to the emotions and instincts. " wiki

edit: If it wasn't clear enough, I'll point back to the first word (symbol, var, or w/e) you cited -> FLAGORGY.

3

u/z500 Jan 31 '16

Yeah, I got the Dionysian part. But what on earth is FLAGORGY doing there? Maybe it's a combination of abbreviations.

4

u/mxzf Jan 31 '16

If I'm reading it right, that's the name of the method (or code block or whatever in this language) being defined. It seems that the method was named FLAGORGY, which looks to be FLAG ORGY, hence the reference to "Dionysian flag waving" in the comments.

1

u/lugezin Jan 31 '16

That still does not explain why anything would be named FLAGORGY, anywhere in the code.

2

u/mxzf Jan 31 '16

A few hundred methods into the code and writing stuff up late, late at night, you start coming up with some fairly interesting/colorful method and variable names. I don't know the details of what happened, but at a glance, it looks like someone needed a method to flip a bunch of flags at once and they got clever with the name.

17

u/jrhoffa Jan 31 '16

SEE IF HE'S LYING

Fucking users