📜 ⬆️ ⬇️

Apollo 11 source code published on Github



On July 20, 2009, in honor of the 40th anniversary of the landing on the moon, printouts with the source code of the Apollo Guidance Computer (AGC) onboard control computer (AGC) were digitized and uploaded on the Internet . Seven years have passed - and now this unique sample of computer history has received a second life. Today, the source code for AGC in assembler is published on Github in full, open for searching, comments, forks, etc.

In the code, you can find the challenges that have become famous errors with codes 1201 and 1202 , which are so disturbed by Neil Armstrong, and much more.

On Github, the Apollo-11 repository quickly took off to the 1st place in the list of the most popular repositories for the day (there is no doubt that in the weekly rating it will have 1st place already tomorrow). There really is something to see. It is especially interesting to read some procedure names ( BURN_BABY_BURN - MASTER_IGNITION_ROUTINE.s ) and comments in the original code.
')
CAF CODE500 # ASTRONAUT: PLEASE CRANK THE TC BANKCALL # SILLY THING AROUND CADR GOPERF1 TCF GOTOP00H # TERMINATE TCF P63SPOT3 # PROCEED SEE IF HE'S LYING TC BANKCALL # ENTER INITIALIZE LANDING RADAR CADR SETPOS1 TC POSTJUMP # OFF TO SEE THE WIZARD ... CADR BURNBABY 

The program has a "temporary" code, as in many modern programs.

 TC BANKCALL # TEMPORARY, I HOPE HOPE HOPE CADR STOPRATE # TEMPORARY, I HOPE HOPE HOPE TC DOWNFLAG # PERMIT X-AXIS OVERRIDE 

And here is the 1969 version of the popular comment "This should never happen."

 CA A # SHOULD NEVER HIT THIS LOCATION 

The first ticket has already been created in the repository on Github - a discussion of the “bug” that needs to be fixed in the program.

Developer SilverWingedSeraph writes: "One user had a rather serious problem with cryogenic mixing in oxygen tanks with the appearance of a fault message." To reproduce an error in the program, repeat the following sequence of actions:

  1. Build a service module.
  2. Fly to the lunar orbit.
  3. In near-moon orbit, start mixing in oxygen tanks.

“If the module has a wiring problem, then the error can be reproduced. Be careful, because the situation can be dangerous for a tester who is trying to reproduce a mistake, ”says a developer on Github who is not without a sense of humor.

Of course, he means the famous accident with the equipment of the Apollo-13 service module, after which the module had to be urgently returned to Earth with the help of extraordinary maneuvers.

In general, only one physical copy of printouts of the lunar module program has been preserved so far. A printed book is kept at the Museum of the Massachusetts Institute of Technology.

The program code was written by Don Isles and his colleagues. Personally, Isles is the author of about 2000 lines of code that were responsible for landing the lunar module.

The Apollo control commands can be run in the emulator (this is just a computer simulator, without the spacecraft itself).


Apollo spacecraft computer emulator


Instructions to the Apollo emulator

The Apollo Command Module (CM) and Lunar Module (LM) computers automatically landed on the lunar surface. The computer controlled the engines and servos in real time.


Apollo spacecraft control computer


Display on-board control computer

Management was carried out by the Apollo Guidance Computer (AGC). The on-board computer was equipped with a real-time OS with multithreading support, it controlled all the systems, receiving signals from radars, telescopes, gyroscopes and accelerometers.

In the book " Digital Apollo " it is well described how the program prioritized and distributed processor time.



Technical specifications of the Apollo spacecraft control computer
The time standards of AGC operation were set by a quartz resonator with a frequency of 2.048 MHz. The computer's memory consisted of 2048 words of rewritable RAM and 36 K words of ROM with a linear sample on repeatedly stitched cores. The read / write cycle of RAM and ROM took 11.72 μs. The word length was 16 bits: 15 data bits and 1 parity bit. The 16-bit processor word format included 14 data bits, an overflow bit and a sign bit.

See also:
Apollo Guidance Computer Programming Guide

Source: https://habr.com/ru/post/395973/


All Articles