How theprimeagen/apollo-11 works
Purpose and Scope
This is an archival source repository for the Apollo 11 Apollo Guidance Computer (AGC), preserving transcribed assembly listings rather than delivering a single executable application. It contains two independently assembled flight programs: Command Module Comanche 055 and Lunar Module Luminary 099. Compilation is delegated to the external Virtual AGC/yaYUL toolchain.
Primary Assembly Entry Points
Each AGC program is rooted at its MAIN.agc include/assembly entry, which composes named source decks into a complete fixed-memory program:
• Comanche055/MAIN.agc
• Luminary099/MAIN.agc
• Comanche055/README.md
• Luminary099/README.md
The two trees are architectural peers, not variants built from shared local libraries. Their separation reflects different spacecraft responsibilities and hardware interfaces.
Command Module Flight Software
Comanche provides Command and Service Module guidance, navigation, display, control, and reentry behavior. Its major execution/control substrate is the AGC executive, interrupts, restart machinery, and deferred work queue:
• Comanche055/EXECUTIVE.agc
• Comanche055/INTERRUPT_LEAD_INS.agc
• Comanche055/WAITLIST.agc
Mission operations flow from DSKY verb/noun input through program sequences and guidance/control routines. Representative program families cover targeting, maneuvers, powered flight, CSM autopilot, and entry:
• Comanche055/P20-P25.agc
• Comanche055/P30-P37.agc
• Comanche055/CM_ENTRY_DIGITAL_AUTOPILOT.agc
Lunar Module Flight Software
Luminary is the Lunar Module counterpart, with landing, ascent, radar, throttle, and LM attitude-control responsibilities. It uses the same broad AGC execution model but implements LM-specific guidance and actuators:
• Luminary099/MAIN.agc
• Luminary099/THE_LUNAR_LANDING.agc
• Luminary099/ASCENT_GUIDANCE.agc
The landing pipeline combines radar-related inputs, lunar guidance equations, throttle control, and vehicle-control routines:
• Luminary099/RADAR_LEADIN_ROUTINES.agc
• Luminary099/LUNAR_LANDING_GUIDANCE_EQUATIONS.agc
• Luminary099/THROTTLE_CONTROL_ROUTINES.agc
Shared AGC Functional Boundaries
Both program trees organize source by traditional AGC subsystems: erasable-memory assignments and constants; navigation state estimation and IMU processing; mission program sequences; DSKY display/input; telemetry; and hardware I/O. Key boundaries include:
• Memory/data definitions: Comanche055/ERASABLE_ASSIGNMENTS.agc, Luminary099/FIXED_FIXED_CONSTANT_POOL.agc
• Navigation and state updates: Comanche055/MEASUREMENT_INCORPORATION.agc, Luminary099/KALMAN_FILTER.agc
• Crew interface: Comanche055/DISPLAY_INTERFACE_ROUTINES.agc, Luminary099/PINBALL_NOUN_TABLES.agc
• External telemetry/radio interfaces: Comanche055/DOWN-TELEMETRY_PROGRAM.agc, Luminary099/S-BAND_ANTENNA_FOR_LM.agc
Supporting Experimental Programs
Several independent Go modules are terminal/graphics/simulation experiments around Apollo-themed interfaces; they are not part of assembling either historical AGC image. Their own executable entry points are separate:
• exec-tui/main.go with simulation/UI layers in exec-tui/sim/engine.go and exec-tui/ui/ui.go
• dsky-lab/main.go with dsky-lab/dsky/dsky.go
• lander-lab/main.go with lander-lab/lander/lander.go
These use Go module runtimes (go.mod per lab). The repository also has Lua/Markdown scenario artifacts, such as alarm_recovery.lua, but no internal production service, database, or deployment infrastructure.
External Dependencies and Governance
The authoritative external integration boundary is source assembly via Virtual AGC’s yaYUL assembler and comparison against MIT Museum/Virtual AGC source scans. GitHub workflows provide only repository maintenance automation:
• .github/workflows/label.yml
• .github/workflows/markdownlint.yml
• CONTRIBUTING.md
Translations under Translations/ localize documentation only and do not alter program source or assembly behavior.
Main entry points: Luminary099/MAIN.agc Luminary assembly root · P20-P25.agc Mission programs · EXECUTIVE.agc Executive and deferred work · Comanche055/MAIN.agc Comanche assembly root
Components 21
Command Module — Comanche 055
CSM flight-program source decks.
- Comanche assembly root · Includes Comanche source decks into one fixed-memory program.
Comanche055/MAIN.agc - Executive and deferred work
Comanche055/EXECUTIVE.agc - Interrupt lead-ins
Comanche055/INTERRUPT_LEAD_INS.agc - Waitlist queue
Comanche055/WAITLIST.agc - Mission programs · Targeting, maneuver, and powered-flight program families.
Comanche055/P20-P25.agc - Entry digital autopilot
Comanche055/CM_ENTRY_DIGITAL_AUTOPILOT.agc - DSKY display interface
Comanche055/DISPLAY_INTERFACE_ROUTINES.agc - Measurement incorporation
Comanche055/MEASUREMENT_INCORPORATION.agc - Down telemetry
Comanche055/DOWN-TELEMETRY_PROGRAM.agc
Lunar Module — Luminary 099
LM flight-program source decks.
- Luminary assembly root · Includes Luminary source decks into one fixed-memory program.
Luminary099/MAIN.agc - Lunar landing program
Luminary099/THE_LUNAR_LANDING.agc - Radar lead-ins
Luminary099/RADAR_LEADIN_ROUTINES.agc - Landing guidance equations
Luminary099/LUNAR_LANDING_GUIDANCE_EQUATIONS.agc - Throttle control
Luminary099/THROTTLE_CONTROL_ROUTINES.agc - Ascent guidance
Luminary099/ASCENT_GUIDANCE.agc - Kalman filter
Luminary099/KALMAN_FILTER.agc
Independent Go Labs
Experimental executables outside AGC assembly.
- Executive TUI experiment · Terminal simulation and UI experiment.
exec-tui/main.go - DSKY lab · Standalone DSKY interface experiment.
dsky-lab/main.go - Lander lab · Standalone lander simulation experiment.
lander-lab/main.go
External Boundary
- Virtual AGC yaYUL · Build tool for both historical AGC images.
- Museum and Virtual AGC scans · Authoritative comparison source.
Connections 18
- Comanche assembly root → Executive and deferred work: includes
- Executive and deferred work → Interrupt lead-ins: dispatches
- Executive and deferred work → Waitlist queue: schedules
- Waitlist queue → Mission programs: runs deferred programs
- DSKY display interface → Mission programs: crew input selects
- Mission programs → Measurement incorporation: uses
- Mission programs → Entry digital autopilot: transitions to
- Measurement incorporation → Down telemetry: reports state
- Luminary assembly root → Lunar landing program: includes
- Luminary assembly root → Ascent guidance: includes
- Lunar landing program → Radar lead-ins: consumes inputs
- Radar lead-ins → Landing guidance equations: supplies measurements
- Kalman filter → Landing guidance equations: provides state
- Landing guidance equations → Throttle control: commands
- Comanche assembly root → Virtual AGC yaYUL: assembled by
- Luminary assembly root → Virtual AGC yaYUL: assembled by
- Museum and Virtual AGC scans → Comanche assembly root: compared against
- Museum and Virtual AGC scans → Luminary assembly root: compared against