The software that landed Apollo 11 on the moon is now free online

Skye Jacobs

Posts: 2,029   +59
Staff
The takeaway: The code that guided Neil Armstrong and Buzz Aldrin to the lunar surface has been released in digital form for public access. Nearly six decades after the Apollo 11 mission, the original flight software is now freely available on GitHub.

The repository, posted by NASA's Chris Garry and designated as public domain, contains two distinct programs: Comanche055, used onboard Apollo's Command Module, and Luminary099, used in the Lunar Module.

Both programs were written for the Apollo Guidance Computer (AGC), a machine whose specifications now read like relics – 3,840 bytes of RAM and 69,120 bytes of storage, executing roughly 85,000 instructions per second. Those limits defined what had to be one of the most efficient pieces of software ever assembled.

Digitization of the code was made possible through collaboration between Virtual AGC, a preservation project devoted to Apollo computing, and the MIT Museum, which holds the original paper listings. Scanned and proofread line by line, the files are now accessible online – pages of assembly language that powered humanity's first successful journey to the Moon.

Inside Comanche055 are glimpses of how that software handled life-or-death situations with startling simplicity. One file, ALARM_AND_ABORT.agc, spells out the logic for tracking and responding to critical errors. Comments in the code describe its role: logging alarm conditions, activating the warning light when necessary, and deciding whether a fault requires aborting the mission.

Another frequently cited chunk illustrates the mathematical core of Apollo guidance – roughly 30 lines of assembly code calculating navigation trajectories, the computational essence of celestial mechanics distilled for the AGC's limited memory.

Engineers and enthusiasts today can do more than browse the code. Using the Virtual AGC toolset – available for Linux, macOS, Windows XP through 7, and even FreeBSD – the programs can be compiled and run in simulation, recreating how the onboard computers functioned half a century ago. The Virtual AGC repository contains instructions, context, and documentation for both the Command and Lunar Module systems, serving as a software museum for Apollo.

What makes the publication remarkable is how it connects the minimalist computing of 1969 with the far more complex lunar mission now underway. While Artemis II used laser communication to beam ultra-high-definition footage back to Earth and spacecraft systems many orders of magnitude more powerful, Apollo's code represents an opposite design philosophy – precision achieved through radical constraint.

The contrast illustrates how mission technology has evolved: from handwritten machine instructions that had to fit into a few kilobytes of memory to modern spacecraft where software spans millions of lines of code.

In terms of physical design, the AGC itself was about the size of a modern desktop gaming tower – roughly 24.25 by 12.43 by 5.97 inches – and weighed just over 70 pounds. Pilots interacted with it through a pair of DSKY controller units in the Command Module and one in the Lunar Module, each weighing about 18 pounds. It was, by necessity, a compact and rugged machine, built to survive vibration, radiation, and vacuum.

The release of this historic software is an invitation for engineers and coders to revisit the ingenuity that powered Apollo's guidance systems – a reminder that even with limitations that seem impossible today, the original team managed to build code that changed the course of human history.

Permalink to story:

 
So generous. Surely there are hundreds of billions, if not trillions of people in need of such software
 
And yet after 50 years it seems like we are unable to land in one shot without making additional "safety assessment" trips with the Artemis program like if this was our first rodeo up there, indirectly validating the rumors and doubts of ever landing in the moon back then to begin with.
 
Last edited:
And yet after 50 years it seems like we are unable to land in one shot without making additional "safety assessment" trips with the Artemis program like if this was our first rodeo up there, indirectly validating the rumors and doubts of ever landing in the moon back then to begin with.
If you haven't noticed NASA absolutely loves wasting money. They blow past deadlines, past budgets, etc. Why do something in 1-2 years when you can stretch it out to a decade or more and get a ton more funding, all in the name of safety and caution?

Nearly sixty years ago we could land on the moon in one go, but now we need (at least) three trips. First we send the empty capsule on a trip around the moon, I mean why not, it's the taxpayers money so who cares. Then we send a manned capsule but don't land on the moon, no that would be too easy. Now supposedly on the third try they will actually land. That is if we can get past endless delays and problems NASA always seems to have. Funny how that works, isn't it?
 
Remember the song with the words....space station in a basement....well there was no moon landing, more evidence than ever before, even the current mission was faked.. 1000%
 
If you haven't noticed NASA absolutely loves wasting money. They blow past deadlines, past budgets, etc. Why do something in 1-2 years when you can stretch it out to a decade or more and get a ton more funding, all in the name of safety and caution?

Nearly sixty years ago we could land on the moon in one go, but now we need (at least) three trips. First we send the empty capsule on a trip around the moon, I mean why not, it's the taxpayers money so who cares. Then we send a manned capsule but don't land on the moon, no that would be too easy. Now supposedly on the third try they will actually land. That is if we can get past endless delays and problems NASA always seems to have. Funny how that works, isn't it?
That's my point, supposedly we landed in the moon over 50 years ago, the astronauts came back home and lived longer than most people their age, it's not like they died weeks later by risk of exposure....so I ask NASA why the unnecessary extra precautions...did we even landed in the moon back then?...that's the only question that remains.
 
...supposedly we landed in the moon over 50 years ago, the astronauts came back home and lived longer than most people their age, it's not like they died weeks later by risk of exposure....so I ask NASA why the unnecessary extra precautions...did we even landed in the moon back then?...that's the only question that remains.
I won't respond to the contemptible suggestion of faked moon landings, but re: your point about the longevity of Apollo astronauts, your entire premise is faulty. Firstly, these astronauts were specifically chosen to be some of the healthiest people on the planet. And as highly successful, motivated individuals, they tended to spend their post-Apollo lives in better diet and exercise.

Finally, you misunderstand utterly the risks involved. Assuming the astronauts survive the dangers of the mission itself, the radiation exposure is essentially a long-term version of Russian roulette ... if you avoid the slightly elevated cancer risks, there's no reason to expect a shortened lifespan.
 
Last edited:
And yet after 50 years it seems like we are unable to land in one shot without making additional "safety assessment" trips with the Artemis program like if this was our first rodeo up there, indirectly validating the rumors and doubts of ever landing in the moon back then to begin with.

Simple answers:

1: As a reminder, Apollo had a number of uncrewed flights to test the CSM, and it was the second manned flight that performed a moon orbital mission. And they needed two additional flights before attempting the first moon landing. If anything, Artemis is being *more* aggressive, since they're skipping the planned dress rehearsal after Artemis 3 validates the lander.

2: NASA hasn't had an orbiter/lander/heavy rocket since the end of Apollo, so new ones need to be developed, without any of the original expertise, meaning they've essentially had to start from scratch. Worse since priorities keep changing with each administration, and NASA is receiving less budget (proportionally) then they did via Apollo.
 
The computers onboard the command module and the LEM did not contain software as we think of it today. The computers "software" was hardwired using "rope core memory", the software was literally weaved together with wire and magnetic rings. While lots of the computational work done on the mainframes at Mission Control and that data sent to the spacecraft for each program (step of the mission) they were on, the computers were quite capable for the time.
 
Remember the song with the words....space station in a basement....well there was no moon landing, more evidence than ever before, even the current mission was faked.. 1000%
Is the Earth also flat, the JFK 'magic bullet theory' is real and bullets can stop and change directions in flight, go through three bones and emerge undamaged and Elvis never died? Your moon landing fakery 'evidence' has been thoroughly debunked and disproven over and over!! The moon is made of cheese...?
 
Simple answers:

1: As a reminder, Apollo had a number of uncrewed flights to test the CSM, and it was the second manned flight that performed a moon orbital mission. And they needed two additional flights before attempting the first moon landing. If anything, Artemis is being *more* aggressive, since they're skipping the planned dress rehearsal after Artemis 3 validates the lander.

2: NASA hasn't had an orbiter/lander/heavy rocket since the end of Apollo, so new ones need to be developed, without any of the original expertise, meaning they've essentially had to start from scratch. Worse since priorities keep changing with each administration, and NASA is receiving less budget (proportionally) then they did via Apollo.
So you are saying NASA didn't learn anything from the first time they landed in the moon and they had to start from scratch....mmmm....that sounds either very naive or NASA is very inefficient.....at the end of the day they want us to be excited for something that supposedly was accomplished over 50 years ago with the technological capabilities of a basic calculator.
 
So you are saying NASA didn't learn anything from the first time they landed in the moon and they had to start from scratch....mmmm....that sounds either very naive or NASA is very inefficient.....at the end of the day they want us to be excited for something that supposedly was accomplished over 50 years ago with the technological capabilities of a basic calculator.
No organization spends significant amount of time and resources on knowledge retention, because that costs money.

I also note that while NASA put out the specifications for the CSM/LM, they were made by PRIVATE companies, who have long since lost their expertise. North American Aviation is long since gone (absorbed by Boeing), and Grumman has likewise been absorbed by Northrup. Once again: Expertise long since gone.

I also note how comically simple it is to prove we landed on the moon: All the landing sites are on the earth facing side and are easily observable with ground-based observatories (and no, consumer telescopes simply don't have the resolution, though if they did you could easily verify the landing sites). The laser rangefinder left behind on the moons surface by Apollo 12 is still there and still provides useful data on the moons slow pull away from earths gravity, Apollo 13s explosion was tracked by numerous independent ground observatories, and when China sent its own probes around the moon about a decade ago they verified the ASLEP packages left behind are still broadcasting on the frequencies they should be. And the list goes on for all the so-called "evidence" we didn't land. So either give actual "evidence" (which we'll happily explain why its wrong), or stop doing the "well we obviously didn't do it" without giving any openings to refute the argument.
 
If you haven't noticed NASA absolutely loves wasting money. They blow past deadlines, past budgets, etc. Why do something in 1-2 years when you can stretch it out to a decade or more and get a ton more funding, all in the name of safety and caution?

Nearly sixty years ago we could land on the moon in one go, but now we need (at least) three trips. First we send the empty capsule on a trip around the moon, I mean why not, it's the taxpayers money so who cares. Then we send a manned capsule but don't land on the moon, no that would be too easy. Now supposedly on the third try they will actually land. That is if we can get past endless delays and problems NASA always seems to have. Funny how that works, isn't it?

You might have a different attitude on the process and steps they take "all in the name of safety and caution" when it's your work/decisions that are responsible for human lives.
 
Is the Earth also flat, the JFK 'magic bullet theory' is real and bullets can stop and change directions in flight, go through three bones and emerge undamaged and Elvis never died? Your moon landing fakery 'evidence' has been thoroughly debunked and disproven over and over!! The moon is made of cheese...?
fairy-tale world, there where you can believe what you want... unfortunately not real world...which is different, have you been to NASA, have you met BuzA, have you sat in the module .. any of these..?
 
Back