Live data from Hacker News

Source code for the Apollo 11 Guidance Computer

ibiblio.org

41–50 of 71 posts

Re: Source code for the Apollo 11 Guidance Computer

#41
post #34

Do the famous 1201 and 1202 error codes make an appearance here? My assembly skills aren't good enough to find them, I'm afraid.

They do! They're in EXECUTIVE.agc (search for OCT 1201 and OCT 1202).

Those error codes mean "No VAC Areas" and "No Core Sets", respectively. Core sets were the basic task control blocks, including each task's entry point, priority, flags, some memory for temporary variables, and a few other things. VAC (Vector Accumulator) areas were a bit more interesting. Most of the real guidance code was not actually written in AGC assembly because it was so primitive and limiting. So, they created the "Interpreter" (INTERPRETER.agc) that's essentially a little virtual machine, that had its own assembly language (complete with mathematical and vector operations). Interpreted tasks needed more than the 7 words of temporary variables provided by the core sets, so they also allocated these VAC areas for more storage.

Those error codes showed up on Apollo 11 because of a weird electrical power phasing bug, essentially causing the radar to generate thousands of "interrupts" (actually cycle stealing operations) every second. With all of this additional work, the AGC didn't have enough time to finish its low priority tasks. And since those tasks hadn't exited by the time they were expected to, when the executive attempted to kick off new tasks, it found that no core sets or VAC areas were available, and sounded those program alarms.

Re: Source code for the Apollo 11 Guidance Computer

#42

There are some pretty great comments in here: ALARM_AND_ABORT.agc - http://www.ibiblio.org/apollo/listings/Comanche055/ALARM_AND... TC WHIMPER -1 # YES. DON'T DO POODOO. DO BAILOUT. From the Guidance Computer Data Cards - http://www.ibiblio.org/apollo/CMC_data_cards_15_Fabrizio_Ber... "POODOO abort, does software restart (ENEMA) and "GO TO POOH" (flashing Verb 37) unless "AVERAGE G" is running then only software rest…

P68 Landing Confirmation section of coding asks the astronaut to load V06N43 (verb/noun) with a great comment of " Astronaut: Now look where you ended up"

Re: Source code for the Apollo 11 Guidance Computer

#44

It's of cause fun to have this code to look at, but is it really useful? I don't mean it in a condescending way, but is this actually someone at, say SpaceX, looks at and goes: "Oh so that's how they did that"?

It's useful in the same way that a historical text is useful -- to see where we came from.

Re: Source code for the Apollo 11 Guidance Computer

#45
post #37

Earlier quoted context omitted.

>Turns out space folks are great at sharing knowledge! I've read that one of the problems a new moon-or-beyond space program would have is that we are so far removed from the Apollo program that all institutional knowledge that was gained is gone because most of the engineers on those projects have passed away.

On the other hand, how much of that institutional knowledge is still useful? Certainly some of it is, but I think experience with the F1-B shows that new knowledge, like 3-D printing, means that parts of the old knowledge aren't needed.

I am a mechanical designer by profession and just want to point out that even I who use a 3D printer on a daily basis can't think of any other manufacturing method it has made completely obsolete. It is more like just another tool in my tool belt that adds another way to make something. As with any tool it has it's advantages and it's drawbacks and will only make sense to use it in certain scenarios.

Re: Source code for the Apollo 11 Guidance Computer

#46
post #11
post #8

http://www.ibiblio.org/apollo/listings/Comanche055/PINBALL_G... >Filename: PINBALL_GAME_BUTTONS_AND_LIGHTS.agc Can someone explain what this is? I doubt they had an actual game of pinball in their guidance computer.

Seems to have been part of the user interface https://en.wikipedia.org/wiki/Apollo_Guidance_Computer#Softw... A set of interrupt-driven user interface routines called Pinball provided keyboard and display services for the jobs and tasks running on the AGC. A rich set of user-accessible routines were provided to let the operator (astronaut) display the contents of various memory locations in octal or decimal in groups…

IIRC, pinball was also used for uplinks from the ground to the computer. From what I understand, such uplink commands simply consisted of a series of button presses to send to the computer, sent faster and more reliably than the astronauts could press the buttons themselves.

Re: Source code for the Apollo 11 Guidance Computer

#47
Project Apollo features a near-full implementation of the control panels in the Command Module and Lunar Module, and an increasingly accurate simulation of the internal systems (e.g. electrical distribution, fuel cells). Also the Virtual AGC software is supported, which allows you to run precisely the same on-board guidance software as used by the real Apollo Guidance Computer

http://nassp.sourceforge.net/wiki/Main_Page

Re: Source code for the Apollo 11 Guidance Computer

#49

It's of cause fun to have this code to look at, but is it really useful? I don't mean it in a condescending way, but is this actually someone at, say SpaceX, looks at and goes: "Oh so that's how they did that"?

It's achingly beautiful to the pocket protector set (me!).

This source code, for example, contains the very first Kalman filter ever used - Kalman was invited over to Moffett field to give talks about his paper, which led to his theory was used in LM code. But I think everyone is very aware of the state of the art at the time, and things have advanced a lot since then. It is impressive to see them cramming that into such a limited processor. But, 'whatever' as to that aspect of it. This is a historical artifact of an amazing feat based on cutting edge research in mathematics/control theory.

Re: Source code for the Apollo 11 Guidance Computer

#50

Earlier quoted context omitted.

That's great - I actually came here to say "this is cool in an abstract way but what the fuck am I looking at? I'd love to learn a little bit more about the system". Turns out space folks are great at sharing knowledge! By the way, last night I read the radio transcript from the time Neil and Buzz exited the lunar module: http://www.hq.nasa.gov/alsj/a11/a11.step.html (that site has loads of other Apollo transcripts t…

>Turns out space folks are great at sharing knowledge! I've read that one of the problems a new moon-or-beyond space program would have is that we are so far removed from the Apollo program that all institutional knowledge that was gained is gone because most of the engineers on those projects have passed away.

I don't know about that [1].

'NASA engineer here. I think it's actually kind of ludicrous to claim that we have somehow "lost" the technology of the Apollo program.'

1: https://news.ycombinator.com/item?id=7304980

Post reply on HN