What Is the Apollo 11 Repository? A Complete Guide to the Original AGC Source Code
The Apollo 11 repository is a public archive of the original Apollo Guidance Computer (AGC) assembly source code that guided the 1969 lunar mission, containing the complete flight software, build tools, and documentation needed to compile and simulate the historic system.
The Apollo 11 repository hosted at chrislgarry/Apollo-11 preserves the exact software that ran on the Apollo Guidance Computer during humanity's first lunar landing. This open-source archive contains the complete AGC assembly language source files from the Comanche 055 software version—the specific build used by the Apollo 11 Command Module—along with modern tooling that allows developers to assemble and emulate the code that navigated Neil Armstrong and Buzz Aldrin to the Moon.
What the Apollo 11 Repository Contains
Core AGC Source Code (Comanche 055)
At the heart of the repository lies the AGC assembly language source code, organized under the Comanche055/ directory. These .agc files implement the flight software for the AGC's 15-bit word architecture, grouped into logical modules handling navigation, guidance, attitude control, and display management.
The entry point for the system is Comanche055/MAIN.agc, which initializes the executive and sequences through mission phases. Critical system tables reside in Comanche055/RESTART_TABLES.agc, defining entry points for program restarts during different flight stages, while Comanche055/INTERRUPT_LEAD_INS.agc configures the interrupt vectors required for real-time event handling.
Build and Simulation Tooling
Modern developers can rebuild the historic binaries using the Virtual AGC toolchain. The repository includes a package.json file that defines npm scripts to invoke the yaAGC assembler and simulator, bridging the gap between 1969 assembly code and contemporary development workflows.
Documentation and Licensing
Human-readable documentation lives in README.md and CONTRIBUTING.md, providing build instructions and contribution guidelines. The entire codebase is released under the BSD-3-Clause license as specified in LICENSE.md, permitting modification and redistribution for educational and research purposes.
Key Components of the Flight Software
Navigation and Guidance Modules
The Comanche055/POWERED_FLIGHT_SUBROUTINES.agc file contains the core guidance algorithms that computed thrust vectors and velocity changes (Δ-V) during trans-lunar injection and Earth re-entry. For attitude control, Comanche055/RCS‑CSM_DIGITAL_AUTOPILOT.agc implements the Reaction Control System logic that stabilized the Command/Service Module using small thruster firings based on inertial measurement unit data.
System Infrastructure
Comanche055/RESTART_TABLES.agc serves as the mission-critical checkpoint system, storing restart vectors that would recover the computer's state after a power transient or program alarm—essential for the infamous 1201 and 1202 alarms during lunar descent. The Comanche055/INTERRUPT_LEAD_INS.agc module sets up the priority-driven interrupt structure that allowed the AGC to handle keyboard input from astronauts while simultaneously executing guidance calculations.
Display and Telemetry
Human interface logic resides in Comanche055/DISPLAY_INTERFACE_ROUTINES.agc, which formats internal data for the DSKY (Display/Keyboard) unit—the calculator-style interface used by astronauts to input commands and read status registers. For ground communication, Comanche055/DOWN-TELEMETRY_PROGRAM.agc packages spacecraft telemetry into radio downlink frames for transmission to Mission Control.
How to Assemble and Run the Apollo 11 Code
You can compile the original assembly source into executable binaries using the Virtual AGC toolchain included in the repository.
First, install the dependencies and assemble the main program:
# Install the virtual AGC tools
npm install
# Assemble the main entry point into a 15-bit binary image
npx yaagc Comanche055/MAIN.agc -o build/MAIN.bin
This command processes MAIN.agc and generates build/MAIN.bin, matching the memory layout expected by the original AGC hardware.
To run the compiled code in the emulator:
# Launch the Virtual AGC simulator with the assembled binary
npx vAGC -b build/MAIN.bin
The simulator opens a terminal representation of the DSKY interface, allowing you to interact with the program using the same verb/noun codes employed during the actual mission.
For debugging specific subsystems, you can inspect restart tables with symbolic dumping:
# Display the restart table addresses in human-readable form
npx yaagc Comanche055/RESTART_TABLES.agc -d
The -d flag reveals the symbolic addresses of critical routines like LDESENT (lunar descent entry), useful for understanding how the system recovered from mid-program restarts.
Summary
- The Apollo 11 repository is a complete archive of the Comanche 055 flight software that operated the Apollo 11 Command Module's Guidance Computer.
- It contains AGC assembly source files (
.agc) organized into navigation, control, display, and telemetry modules underComanche055/. - Virtual AGC tooling via
package.jsonenables modern assembly and simulation usingyaAGCandvAGC. - The code is released under the BSD-3-Clause license, allowing educational use and modification.
- Key files include
MAIN.agc(entry point),RESTART_TABLES.agc(recovery vectors), andRCS‑CSM_DIGITAL_AUTOPILOT.agc(attitude control).
Frequently Asked Questions
What programming language is used in the Apollo 11 repository?
The repository contains AGC assembly language files with the .agc extension. This is a low-level symbolic language specific to the Apollo Guidance Computer's 15-bit word architecture, featuring unique conventions like "erasable memory" addressing and interpreted "waitlist" instructions for multitasking.
Can I run the Apollo 11 code on my computer?
Yes. The repository includes a package.json that configures the Virtual AGC emulator. After running npm install, you can assemble the source with npx yaagc and execute it using npx vAGC, which simulates the original DSKY interface and AGC hardware behavior on modern operating systems.
Is the Apollo 11 repository open source?
Yes. According to the LICENSE.md file, the code is released under the BSD-3-Clause license. This permissive license allows you to freely use, modify, and redistribute the source code, provided that the original copyright notice and license terms are preserved.
What is the difference between Comanche 055 and Luminary?
Comanche 055 (found in Comanche055/) is the software version for the Apollo 11 Command Module, while Luminary is the separate software version designed for the Lunar Module. The Apollo 11 repository specifically contains the Command Module code; the Lunar Module software resides in a companion repository and uses different memory bank layouts specific to the LM's guidance requirements.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →