Source Code

These source code files are a reconstruction of Sundance, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

005344,000002:                                                                                                  ## Copyright:   Public domain.
005345,000003:                                                                                                  ## Filename:    INTERRUPT_LEAD_INS.agc
005346,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
005347,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
005348,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
005349,000007:                                                                                                  ##              No original listings of this program are available;
005350,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
005351,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
005352,000010:                                                                                                  ## Assembler:   yaYUL
005353,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
005354,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
005355,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
005356,000014: 
005357,000015:                                                                                                  ## Sundance 292
005358,000016: 
005359,000017:    4000                                           SETLOC   4000                                  
005360,000018: 
005361,000019:    4000                                           COUNT*   $$/RUPTS                              #  FIX-FIX LEAD INS
005362,000020:    4000           00004                           INHINT                                         #  GO
005363,000021:    4001           34054                           CAF      GOBB                                  
005364,000022:    4002           56006                           XCH      BBANK                                 
005365,000023:    4003           12445                           TCF      GOPROG                                
005366,000024: 
005367,000025:    4004           52011                           DXCH     ARUPT                                 #  T6RUPT
005368,000026:    4005           00006                           EXTEND                                         
005369,000027:    4006           35750                           DCA      T6ADR                                 
005370,000028:    4007           52006                           DTCB                                           
005371,000029: 
005372,000030:    4010           52011                           DXCH     ARUPT                                 #  T5RUPT - AUTOPILOT
005373,000031:    4011           40030                           CS       TIME5                                 
005374,000032:    4012           65044                           AD       .5SEC                                 
005375,000033:    4013           14065                           TCF      T5RUPT                                
005376,000034: 
005377,000035:    4014           52011                           DXCH     ARUPT                                 #  T3RUPT
005378,000036:    4015           34056                           CAF      T3RPTBB                               
005379,000037:    4016           56006                           XCH      BBANK                                 
005380,000038:    4017           13212                           TCF      T3RUPT                                
005381,000039: 
005382,000040:    4020           52011                           DXCH     ARUPT                                 #  T4RUPT
005383,000041:    4021           34063                           CAF      T4RPTBB                               
005384,000042:    4022           56006                           XCH      BBANK                                 
005385,000043:    4023           12000                           TCF      T4RUPT                                
005386,000044: 
005387,000045:    4024           52011                           DXCH     ARUPT                                 #  KEYRUPT1
005388,000046:    4025           34057                           CAF      KEYRPTBB                              
005389,000047:    4026           56006                           XCH      BBANK                                 
005390,000048:    4027           13104                           TCF      KEYRUPT1                              
005391,000049: 
005392,000050:    4030           52011                           DXCH     ARUPT                                 #  KEYRUPT2
005393,000051:    4031           34060                           CAF      MKRUPTBB                              
005394,000052:    4032           56006                           XCH      BBANK                                 
005395,000053:    4033           12357                           TCF      MARKRUPT                              
005396,000054: 
005397,000055:    4034           52011                           DXCH     ARUPT                                 #  UPRUPT
005398,000056:    4035           34057                           CAF      UPRPTBB                               
005399,000057:    4036           56006                           XCH      BBANK                                 
005400,000058:    4037           13127                           TCF      UPRUPT                                
005401,000059: 
005402,000060:    4040           52011                           DXCH     ARUPT                                 #  DOWNRUPT
005403,000061:    4041           34061                           CAF      DWNRPTBB                              
005404,000062:    4042           56006                           XCH      BBANK                                 
005405,000063:    4043           13146                           TCF      DODOWNTM                              
005406,000064: 
005407,000065:    4044           52011                           DXCH     ARUPT                                 #  RADAR RUPT
005408,000066:    4045           34062                           CAF      RDRPTBB                               
005409,000067:    4046           56006                           XCH      BBANK                                 
005410,000068:    4047           13122                           TCF      RADAREAD                              
005411,000069: 
005412,000070:    4050           52011                           DXCH     ARUPT                                 #  RUPT10 IS USED ONLY BY LANDING GUIDANCE
005413,000071:    4051           34064                           CA       RUPT10BB                              
005414,000072:    4052           56006                           XCH      BBANK                                 
005415,000073:    4053           12000                           TCF      PITFALL                               
005416,000074: 
005417,000075: 
005418,000076:    4054  E3,1400                                  EBANK=   LST1                                  #  RESTART USES E0, E3
005419,000077:    4054           12003        GOBB               BBCON    GOPROG                                
005420,000078: 
005421,000079:    4055     0025                                  EBANK=   TIME1                                 
005422,000080:    4055           04000        T6RPTBB            BBCON    RESUME                                #  ***FIX LATER***
005423,000081: 
005424,000082:    4056  E3,1400                                  EBANK=   LST1                                  
005425,000083:    4056           02003        T3RPTBB            BBCON    T3RUPT                                
005426,000084: 
005427,000085:    4057     0073                                  EBANK=   KEYTEMP1                              
005428,000086:    4057           10000        KEYRPTBB           BBCON    KEYRUPT1                              
005429,000087: 
005430,000088:    4060  E7,1404                                  EBANK=   AOTAZ                                 
005431,000089:    4060           16007        MKRUPTBB           BBCON    MARKRUPT                              
005432,000090: 
005433,000091:    4061     4057               UPRPTBB            =        KEYRPTBB                              
005434,000092: 
005435,000093:    4061     0340                                  EBANK=   DNTMBUFF                              
005436,000094:    4061           12000        DWNRPTBB           BBCON    DODOWNTM                              
005437,000095: 
005438,000096:    4062     1101                                  EBANK=   RADMODES                              
005439,000097:    4062           52002        RDRPTBB            BBCON    RADAREAD                              
005440,000098: 
005441,000099:    4063  E6,1412                                  EBANK=   M11                                   
005442,000100:    4063           14006        T4RPTBB            BBCON    T4RUPT                                
005443,000101: 
005444,000102:    4064  E7,1656                                  EBANK=   ELVIRA                                
005445,000103:    4064           42007        RUPT10BB           BBCON    PITFALL                               
005446,000104: 
005447,000105:    4065           00006        T5RUPT             EXTEND                                         
005448,000106:    4066           65334                           BZMF     NOQBRSM                               
005449,000107:    4067           00006                           EXTEND                                         
005450,000108:    4070           31277                           DCA      T5ADR                                 
005451,000109:    4071           52006                           DTCB                                           

End of include-file INTERRUPT_LEAD_INS.agc.  Parent file is MAIN.agc