logoalt Hacker News

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

167 pointsby notenesstoday at 5:18 AM51 commentsview on HN

Comments

wimtoday at 10:25 AM

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! ;)

show 4 replies
starkparkertoday at 5:42 AM

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...

show 1 reply
buredorannatoday at 1:38 PM

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

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

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

(edit: formatting)
BinaryRagetoday at 9:35 AM

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...

show 3 replies
mellosoulstoday at 7:35 AM

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

netsharctoday at 7:41 AM

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.

show 2 replies
stmwtoday at 5:25 PM

Previously posted by me here - https://news.ycombinator.com/item?id=46182669 - but didn't get any interest, not complaiing, good that it got noticed this time.

theseriousbrotoday at 7:35 PM

A truly great historical artifact of human space adventure

laszlojamftoday at 2:06 PM

As other commenters have pointed out, some of the comments in there are pretty scary. I guess the astronauts didn't have to read the code:

`TC WHIMPER -1 # YES. DONT DO POODOO. DO BAILOUT.`

soferiotoday at 10:15 AM

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

corvadtoday at 5:43 AM

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.

show 1 reply
limaoscarjuliettoday at 2:24 PM

To see the code in action (and learn many good things about Apollo computer) please watch this: https://www.youtube.com/watch?v=B1J2RMorJXM&pp=ygUPYXBvbGxvI...

prabhanjana_ctoday at 6:07 AM

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.

show 3 replies
mittermayrtoday at 8:28 AM

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.

show 1 reply
luciana1utoday at 10:42 AM

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

show 1 reply
caruasdotoday at 5:58 PM

The contribution of the 1969 assembly language is appreciated.

fjfaasetoday at 8:03 AM

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.

miohtamatoday at 6:41 AM

In 1969, they had not invented lowercase yet.

show 1 reply
ck2today at 12:42 PM

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

show 1 reply
flippyheadtoday at 4:30 PM

I swear, every few years something like this or exactly this seems to come up on HN

alex1138today at 11:25 AM

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

tonyhart7today at 3:08 PM

looks like its not hard to read assembly code

valentynkittoday at 12:20 PM

[dead]

chronogate_optoday at 12:34 PM

[flagged]

guesswho_today at 6:29 AM

[dead]

Anonastytoday at 7:19 AM

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

show 1 reply