top | item 3888638

Apollo program source code

433 points| rjshade | 14 years ago |ibiblio.org

57 comments

order

exDM69|14 years ago

Fun fact: the actual programs in the spacecraft were stored in core rope memory, an ancient memory technology made by (literally) weaving a fabric/rope, where the bits were physical rings of ferrite material.

http://en.wikipedia.org/wiki/Core_rope_memory

GnarfGnarf|14 years ago

"Core" memory is resistant to cosmic rays. The state of a core bit will not change when bombarded by radiation in Outer Space. Can't say the same of solid state memory.

I worked on core memory computers in the 60's. You had 16K, tape drives (no disks) and FORTRAN. What a gas!

strangetimes|14 years ago

"Some programmers nicknamed the finished product LOL memory, for Little Old Lady memory."

LOL.

angersock|14 years ago

C'mon, Notch, even Apollo supported interrupts:

http://www.ibiblio.org/apollo/hrst/archive/1678.pdf

"It is first appropriate to briefly describe the Apollo Guidance Computer (AGC). This processor is a general purpose, sequential, digital machine. Its word length is 16 bits including parity. The random access memory consists of 2048 words of destructive, read-write memory, called erasable, and 36,864 words of non- destructive read-only memory called fixed memory. The memor’y cycle time (MCT) is slightly less than 12 microseconds, with two MCI’s required to execute an add and four MCTs to execute a multiply. As is typical of real-time control computers, this machine has a set of special input-output channels with which it controls the spacecraft and observes the state of its environment. The interrupt structure consists of ten program interrupts with associated priorities, which are used for program control transfers. In addition, twenty-six counter interrupts with associated priorities allow for input-output servicing. The instruction set consists of forty-two regular instructions and nine involuntary instructions. Figure 1 indicates the number and diversity of systems with which the AGC interacts"

EDIT: Apparently, as of six or so hours ago, Notch has implemented cutting-edge 1970s technology ( http://dcpu.com/highnerd/dcpu16_1_3.txt ). :)

andrewcooke|14 years ago

hmmm. so the "bugger words" at the end of, for example, http://www.ibiblio.org/apollo/listings/Colossus249/MAIN.agc.... are checksums - see http://books.google.cl/books?id=3fKzL0HfJp4C&pg=PA232...

anyone know the etymology? is it just a shortened form of "debugger"? is "bugger" not common slang in american english? or is this a joke?

Nate75Sanders|14 years ago

Bugger is not common slang in American English. You can find people who will argue about that, but they don't get out much.

charlieok|14 years ago

I'm pretty sure it's a reference to Ender's Game. Also, the fact that Ender's Game was published in 1985 is of no import whatsoever.

viggity|14 years ago

It isn't short for debugger. A computer "bug" originated when a small moth (aka bug) was caught in a physical relay on the Mark II. http://en.wikipedia.org/wiki/Software_bug#Etymology

"Debugging" came from the action of trying to find where the bug is at in a program (or, in the original case, the machine)

jscheel|14 years ago

Now that the shuttle program has ended, it would be nice to get the supposedly perfect code produced by the On-board Shuttle Group as well. I wonder if a FOIA request has been made.

rbrtrbrt|14 years ago

Anyone have an idea why there's sourcecode for (apparently) a pinball machine in there?

http://www.ibiblio.org/apollo/listings/Luminary099/PINBALL_G...

It's in the code repository for multiple Apollo's

th0ma5|14 years ago

If you read the code, it seems to suggest this is just the (fun) name of the lit display driving code.

mladenkovacevic|14 years ago

I believe pinball was the name of their keyboard and display program (not an actual pinball machine)

skore|14 years ago

Just in time for being ported to DCPU-16.

ptrckryn|14 years ago

A very interesting book, written by Frank O'Brien and published by Springer, The Apollo Guidance Computer: Architecture and Operation, is definitely worth the read. Fun fact: The unit weighed 70lbs (32kg).

The AGC has spawned a pretty active cult of hardware hackers that have built the AGC from scratch - including the core memory.

stuff4ben|14 years ago

looking through some of those documents a couple things stand out to me: 1) learn your maths people if you want to do rocket science stuff 2) the amount and detail of the documentation they wrote back then is unreal 3) the simple webapps I write for big bucks at local megacorp pale in comparison to those programs that frickin landed people on the moon!

GnarfGnarf|14 years ago

With the power of open source, "many eyes make all bugs shallow".

Wouldn't be a hoot if someone ran this through a simulator, and discovered a bug that had eluded NASA?

jerf|14 years ago

I'd need a lot of convincing it wasn't rather a bug in the simulator. An attainable amount of convincing, but it would be my first thought.

Retric|14 years ago

I would not take an even bet that there is any meaningful bugs in that code that NASA was not already aware of.

mykhal|14 years ago

.. what about voyager program? you could then actually test the live system )

glenntzke|14 years ago

Who's going to implement this in-browser in javascript?

pkmays|14 years ago

I bet a lot of folks under the Iron Curtain would have loved to have had access to these documents back in the day.

Michiel|14 years ago

Maybe they had... or maybe the NASA/MIT code is based on code originally obtained from behind the iron curtain.

alexbell|14 years ago

If this stuff interests you, I highly recommend David Mindell's Digital Apollo.

rurounijones|14 years ago

so who is going to be the first to convert this all to DCPU?