Original Apollo 11 Guidance Computer source code for command and lunar modules

github.com

114 points by noteness 8 hours ago


buredoranna - 2 minutes ago

https://github.com/chrislgarry/Apollo-11/blob/master/Comanch...

I feel like "BEWARE"... is now what we would likely call "load-bearing"

  COMPTGO  EXTEND             # USED TO COMPUTE TTOGO
           QXCH     PHSPRDT6  # ** GROUP 6 TEMPORARY USED .. BEWARE **

(edit: formatting)
starkparker - 8 hours ago

Happy 10-year anniversary to this repo being shared on HN.

Most significant discussion: https://news.ycombinator.com/item?id=12048945, 652 points, 145 comments on July 7, 2016

All previous submissions: https://news.ycombinator.com/from?site=github.com/chrislgarr...

wim - 3 hours ago

This is such an interesting peek into the engineering of these sort of systems with very constrained resources at the time. Like any random file you open contains little pragmatic design decisions like this

https://github.com/chrislgarry/Apollo-11/blob/master/Comanch...

# THE POSITION OF THE MOON IS STORED IN THE COMPUTER IN THE FORM OF # A NINTH DEGREE POLYNOMIAL APPROXIMATION WHICH IS VALID OVER A 15 # DAY INTERVAL BEGINNING SHORTLY BEFORE LAUNCH. THEREFORE THE TIME # INPUT BY THE USER SHOULD FALL WITHIN THIS 15 DAY INTERVAL.

Better be back home in 15 days! ;)

BinaryRage - 4 hours ago

For an terrific AGC deep dive, I can’t recommend Marc’s restoration videos enough. The work they did was incredible:

https://youtube.com/playlist?list=PL-_93BVApb59FWrLZfdlisi_x...

mellosouls - 6 hours ago

More here (linked in the repo):

Original scans (featuring Margaret Hamilton!)

https://28gpc.csb.app/

The Virtual AGC Project Spaceborne Computer Systems

https://www.ibiblio.org/apollo/

The purpose of this project is to provide the original flight software and emulations of the onboard guidance computers flown in historical spacecraft, so that the flight software can be run on computers commonly available to the public today. The particular emphasis is on the Apollo Guidance Computer (AGC) flown in lunar missions in the 1960's and 1970's.

Wikipedia on the hardware:

https://en.wikipedia.org/wiki/Apollo_Guidance_Computer

netsharc - 6 hours ago

Clicking around the code, it mentions a page with images... even more clicking around got me to this page/image: https://www.ibiblio.org/apollo/Block1.html#DSKY / https://www.ibiblio.org/apollo/Block1ControlPanelDSKY.jpg

Damn, a control panel to input values, probably straight to the CPU. I guess the astronauts didn't have to learn assembly, but imagine a programmer having to recite all the raw code (I guess the commands (verbs) are numeric as well) to debug something, all the way at the moon.

mittermayr - 5 hours ago

Well, I have no idea how complete this is, but perhaps a neat Christmas-time-project for anyone with seemingly unlimited tokens to take this and let it build up a simulator, using the real code to drive simulated machinery.

soferio - 3 hours ago

For a superb video explaining what the AGC did and what WENT WRONG during the moon landing including the error codes:l, see: https://youtu.be/B1J2RMorJXM?si=Ad1UYojAtee2ktr3

corvad - 8 hours ago

Really cool to see this digitized and archived, it's such an important piece of history and really one of the earliest digital ic bases computers.

prabhanjana_c - 8 hours ago

Great to see the AGC assembly code and knowing that Apollo 11 is coded purely in assembly. Not sure if it has any compiler. Also found https://github.com/virtualagc/virtualagc while searching for compiler.

fjfaase - 6 hours ago

Strange that no one took the effort to fix yaYUL to read the YUL format, but instead of adapting the transcription of the source to match the 'quirks' of yaYUL.

ck2 - an hour ago

I think I read somewhere around here the code could be run today on something as low powered as the chip that runs the USB charger for an iphone

So yeah I'd like to see that lol

- 7 hours ago
[deleted]
alex1138 - 2 hours ago

Orion on Artemis has a bunch of really cool stuff like redundant computers but it's certainly jarring to go from Verbs and Nouns of Apollo to seeing them tapping on screens with a GUI

luciana1u - 3 hours ago

the code that landed humans on the moon has 72k stars on github and your startup's monorepo still can't pass CI on the first try

miohtama - 7 hours ago

In 1969, they had not invented lowercase yet.

- 7 hours ago
[deleted]
- 7 hours ago
[deleted]
valentynkit - an hour ago

[dead]

chronogate_op - an hour ago

[flagged]

guesswho_ - 7 hours ago

[dead]

Anonasty - 6 hours ago

Ok, someone evaluate it with Fable and vibecode it better. Remember "make no mistake".