Source Code

These source code files are an attempted reconstruction of Sundance revision 306, 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
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. 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.

014220,000002:                                                                                                  ## Copyright:   Public domain.
014221,000003:                                                                                                  ## Filename:    IMU_PERFORMANCE_TESTS_4.agc
014222,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
014223,000005:                                                                                                  ##              as closely as possible with available information. Sundance
014224,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
014225,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
014226,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
014227,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
014228,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
014229,000011:                                                                                                  ##              or the Sundance GSOPs.
014230,000012:                                                                                                  ## Assembler:   yaYUL
014231,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014232,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014233,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
014234,000016: 
014235,000017: 
014236,000018: 
014237,000019:                                                                                                  #  PROGRAM-IMU PERFORMANCE TESTS 4
014238,000020:                                                                                                  #  DATE-NOV 15, 1966
014239,000021:                                                                                                  #  BY-GEORGE SCHMIDT IL7-146 EXT 1126
014240,000022:                                                                                                  #  MOD NO-ZERO
014241,000023: 
014242,000024:                                                                                                  #  FUNCTIONAL DESCRIPTION
014243,000025: 
014244,000026:                                                                                                  #  THIS SECTION CONSISTS OF THE FILTER FOR THE GYRO DRIFT TESTS. NO COMPASS
014245,000027:                                                                                                  #  IS DONE IN LEM. FOR A DESCRIPTION OF THE FILTER SEE E-1973. THIS
014246,000028:                                                                                                  #  SECTION IS ENTERED FROM IMU 2. IT RETURNS THERE AT END OF TEST.
014247,000029: 
014248,000030:                                                                                                  #  EARTHR,OGC ZERO,ERTHRVSE
014249,000031: 
014250,000032:                                                                                                  #  NORMAL EXIT
014251,000033: 
014252,000034:                                                                                                  #  LENGTHOT GOES TO ZERO-RETURN TO IMU PERF TESTS 2 CONTROL
014253,000035: 
014254,000036:                                                                                                  #  ALARMS
014255,000037: 
014256,000038:                                                                                                  #  1600  OVERFLOW IN DRIFT TEST
014257,000039:                                                                                                  #  1601  BAD IMU MODING IN ANY ROUTINE THAT USES IMUSTALL
014258,000040:                                                                                                  #  OUTPUT
014259,000041: 
014260,000042:                                                                                                  #  FLASHING DISPLAY OF RESULTS - CONTROLLED IN IMU PERF TESTS 2
014261,000043: 
014262,000044:                                                                                                  #  DEBRIS
014263,000045: 
014264,000046:                                                                                                  #  ALL CENTRALS - ALL OF EBANK XSM
014265,000047: 
014266,000048: 33,2000                                           BANK     33                                    
014267,000049: 37,2000                                           SETLOC   IMU4                                  
014268,000050: 37,2000                                           BANK                                           
014269,000051: 37,2477                                           COUNT*   $$/P07                                
014270,000052: 
014271,000053: 37,2477  E5,1642                                  EBANK=   XSM                                   
014272,000054: 
014273,000055: 37,2477           00004        ESTIMS             INHINT                                         
014274,000056: 37,2500           31572                           CAE      1SECXT                                
014275,000057: 37,2501           05243                           TC       TWIDDLE                               
014276,000058: 37,2502  E5,1642                                  EBANK=   XSM                                   
014277,000059: 37,2502           02535                           ADRES    ALLOOP                                
014278,000060: 37,2503           35030                           CAF      ZERO                                  #  ZERO THE PIPAS
014279,000061: 37,2504           54037                           TS       PIPAX                                 
014280,000062: 37,2505           54040                           TS       PIPAY                                 
014281,000063: 37,2506           54041                           TS       PIPAZ                                 
014282,000064: 37,2507           00003                           RELINT                                         
014283,000065: 37,2510           33061                           CA       77DECML                               
014284,000066: 37,2511           55571                           TS       ZERONDX                               
014285,000067: 37,2512           33062                           CA       ALXXXZ                                
014286,000068: 37,2513           02364                           TC       ZEROING                               
014287,000069: 37,2514           06014                           TC       INTPRET                               
014288,000070: 37,2515           77735                           SLOAD                                          
014289,000071: 37,2516           37043                                    SCHZEROS                              
014290,000072: 37,2517           25477                           STOVL    GCOMPSW    -1                         
014291,000073: 37,2520           37054                                    INTVAL     +2                         
014292,000074: 37,2521           26445                           STOVL    ALX1S                                 
014293,000075: 37,2522           37043                                    SCHZEROS                              
014294,000076: 37,2523           01212                           STORE    DELVX                                 
014295,000077: 37,2524           01472                           STORE    GCOMP                                 
014296,000078: 37,2525           77735                           SLOAD                                          
014297,000079: 37,2526           02441                                    TORQNDX                               
014298,000080: 37,2527           50076                           DCOMP    BMN                                   
014299,000081: 37,2530           76533                                    VERTSKIP                              
014300,000082: 37,2531           77624                           CALL                                           
014301,000083: 37,2532           76376                                    ERTHRVSE                              
014302,000084: 37,2533           77776        VERTSKIP           EXIT                                           
014303,000085: 37,2534           03030                           TC       SLEEPIE    +1                         
014304,000086: 
014305,000087: 37,2535           11530        ALLOOP             CCS      ALTIM                                 
014306,000088: 37,2536           30000                           CA       A                                     #  SHOULD NEVER HIT THIS LOCATION
014307,000089: 37,2537           55531                           TS       ALTIMS                                
014308,000090: 37,2540           40000                           CS       A                                     
014309,000091: 37,2541           55530                           TS       ALTIM                                 
014310,000092: 37,2542           45026                           CS       ONE                                   
014311,000093: 37,2543           61562                           AD       GEOCOMPS                              
014312,000094: 37,2544           00006                           EXTEND                                         
014313,000095: 37,2545           12551                           BZF      +4                                    
014314,000096: 37,2546           31412                           CA       LENGTHOT                              
014315,000097: 37,2547           00006                           EXTEND                                         
014316,000098: 37,2550           62555                           BZMF     +5                                    
014317,000099: 37,2551           31572                           CAE      1SECXT                                
014318,000100: 37,2552           05243                           TC       TWIDDLE                               
014319,000101: 37,2553  E5,1642                                  EBANK=   XSM                                   
014320,000102: 37,2553           02535                           ADRES    ALLOOP                                
014321,000103: 37,2554           35030                           CAF      ZERO                                  
014322,000104: 37,2555           56037                           XCH      PIPAX                                 
014323,000105: 37,2556           55211                           TS       DELVX                                 
014324,000106: 37,2557           35030                           CAF      ZERO                                  
014325,000107: 37,2560           56040                           XCH      PIPAY                                 
014326,000108: 37,2561           55213                           TS       DELVY                                 
014327,000109: 37,2562           35030                           CAF      ZERO                                  
014328,000110: 37,2563           56041                           XCH      PIPAZ                                 
014329,000111: 37,2564           55215                           TS       DELVZ                                 
014330,000112: 37,2565           35011        SPECSTS            CAF      PRIO20                                
014331,000113: 37,2566           05155                           TC       FINDVAC                               
014332,000114: 37,2567  E5,1642                                  EBANK=   XSM                                   
014333,000115: 37,2567           02572 76065                     2CADR    ALFLT                                 #  START THE JOB
014334,000116: 
014335,000117: 37,2571           05331                           TC       TASKOVER                              
014336,000118: 
014337,000119: 37,2572           11562        ALFLT              CCS      GEOCOMPS                              
014338,000120: 37,2573           02575                           TC       +2                                    
014339,000121: 37,2574           02577                           TC       NORMLOP                               
014340,000122: 37,2575           04655                           TC       BANKCALL                              
014341,000123: 37,2576           15277                           CADR     1/PIPA                                
014342,000124: 37,2577           06014        NORMLOP            TC       INTPRET                               
014343,000125: 37,2600           77745                           DLOAD                                          
014344,000126: 37,2601           37052                                    INTVAL                                
014345,000127: 37,2602           24051                           STOVL    S1                                    
014346,000128: 37,2603           01212                                    DELVX                                 
014347,000129: 37,2604           76505                           VXM      VSL1                                  
014348,000130: 37,2605           02643                                    XSM                                   
014349,000131: 37,2606           57545                           DLOAD    DCOMP                                 
014350,000132: 37,2607           00160                                    MPAC       +3                         
014351,000133: 37,2610           16523                           STODL    DPIPAY                                
014352,000134: 37,2611           00162                                    MPAC       +5                         
014353,000135: 37,2612           02527                           STORE    DPIPAZ                                
014354,000136: 
014355,000137: 37,2613           76001                           SETPD    AXT,1                                 
014356,000138: 37,2614           00001                                    0                                     
014357,000139: 37,2615           00010                                    8D                                    
014358,000140: 37,2616           57535                           SLOAD    DCOMP                                 
014359,000141: 37,2617           02563                                    GEOCOMPS                              
014360,000142: 37,2620           77640                           BMN                                            
014361,000143: 37,2621           76765                                    PERFERAS                              
014362,000144: 37,2622           50135        ALCGKK             SLOAD    BMN                                   
014363,000145: 37,2623           02532                                    ALTIMS                                
014364,000146: 37,2624           76637                                    ALFLT3                                
014365,000147: 37,2625           72174        ALKCG              AXT,2    LXA,1                                 #  LOADS SLOPES AND TIME CONSTANTS AT RQST
014366,000148: 37,2626           00014                                    12D                                   
014367,000149: 37,2627           02444                                    ALX1S                                 
014368,000150: 37,2630           62143        ALKCG2             DLOAD*   INCR,1                                
014369,000151: 37,2631           02243                                    ALFDK      +144D,1                    
014370,000152: 37,2632           77775                           DEC      -2         B-14                       
014371,000153: 37,2633           12545                           STORE    ALDK       +10D,2                     
014372,000154: 37,2634           66104                           TIX,2    SXA,1                                 
014373,000155: 37,2635           76630                                    ALKCG2                                
014374,000156: 37,2636           02444                                    ALX1S                                 
014375,000157: 
014376,000158: 37,2637           77770        ALFLT3             AXT,1                                          
014377,000159: 37,2640           00010                                    8D                                    
014378,000160: 37,2641           41343        DELMLP             DLOAD*   DMP                                   
014379,000161: 37,2642           02533                                    DPIPAY     +8D,1                      
014380,000162: 37,2643           37064                                    PIPASC                                
014381,000163: 37,2644           43661                           SLR      BDSU*                                 
014382,000164: 37,2645           21212                                    9D                                    
014383,000165: 37,2646           02501                                    INTY       +8D,1                      
014384,000166: 37,2647           06501                           STORE    INTY       +8D,1                      
014385,000167: 37,2650           40725                           PDDL     DMP*                                  
014386,000168: 37,2651           37066                                    VELSC                                 
014387,000169: 37,2652           02521                                    VLAUN      +8D,1                      
014388,000170: 37,2653           77732                           SL2R                                           
014389,000171: 37,2654           45425                           DSU      STADR                                 
014390,000172: 37,2655           71216                           STORE    DELM       +8D,1                      
014391,000173: 37,2656           06563                           STORE    DELM       +10D,1                     
014392,000174: 37,2657           77100                           TIX,1    AXT,2                                 
014393,000175: 37,2660           76641                                    DELMLP                                
014394,000176: 37,2661           00004                                    4                                     
014395,000177: 37,2662           56743        ALILP              DLOAD*   DMPR*                                 
014396,000178: 37,2663           75324                                    ALK        +4,2                       
014397,000179: 37,2664           75240                                    ALDK       +4,2                       
014398,000180: 37,2665           12453                           STORE    ALK        +4,2                       
014399,000181: 37,2666           77104                           TIX,2    AXT,2                                 
014400,000182: 37,2667           76662                                    ALILP                                 
014401,000183: 37,2670           00010                                    8D                                    
014402,000184: 37,2671           66140        ALKLP              LXC,1    SXA,1                                 
014403,000185: 37,2672           02445                                    CMPX1                                 
014404,000186: 37,2673           02445                                    CMPX1                                 
014405,000187: 37,2674           56743                           DLOAD*   DMPR*                                 
014406,000188: 37,2675           02450                                    ALK        +1,1                       
014407,000189: 37,2676           75216                                    DELM       +8D,2                      
014408,000190: 37,2677           77613                           DAD*                                           
014409,000191: 37,2700           75276                                    INTY       +8D,2                      
014410,000192: 37,2701           12501                           STORE    INTY       +8D,2                      
014411,000193: 37,2702           42743                           DLOAD*   DAD*                                  
014412,000194: 37,2703           75314                                    ALK        +12D,2                     
014413,000195: 37,2704           75230                                    ALDK       +12D,2                     
014414,000196: 37,2705           12463                           STORE    ALK        +12D,2                     
014415,000197: 37,2706           42673                           DMPR*    DAD*                                  
014416,000198: 37,2707           75216                                    DELM       +8D,2                      
014417,000199: 37,2710           75266                                    INTY       +16D,2                     
014418,000200: 37,2711           12511                           STORE    INTY       +16D,2                     
014419,000201: 37,2712           40743                           DLOAD*   DMP*                                  
014420,000202: 37,2713           37071                                    ALSK       +1,1                       
014421,000203: 37,2714           75216                                    DELM       +8D,2                      
014422,000204: 37,2715           42772                           SL1R     DAD*                                  
014423,000205: 37,2716           75256                                    VLAUN      +8D,2                      
014424,000206: 37,2717           12521                           STORE    VLAUN      +8D,2                      
014425,000207: 37,2720           76104                           TIX,2    AXT,1                                 
014426,000208: 37,2721           76671                                    ALKLP                                 
014427,000209: 37,2722           00010                                    8D                                    
014428,000210: 
014429,000211: 37,2723           64743        LOOSE              DLOAD*   PDDL*                                 
014430,000212: 37,2724           02523                                    ACCWD      +8D,1                      
014431,000213: 37,2725           02521                                    VLAUN      +8D,1                      
014432,000214: 37,2726           55523                           PDDL*    VDEF                                  
014433,000215: 37,2727           02531                                    POSNV      +8D,1                      
014434,000216: 37,2730           76521                           MXV      VSL1                                  
014435,000217: 37,2731           02001                                    TRANSM1                               
014436,000218: 37,2732           77745                           DLOAD                                          
014437,000219: 37,2733           00155                                    MPAC                                  
014438,000220: 37,2734           06531                           STORE    POSNV      +8D,1                      
014439,000221: 37,2735           77745                           DLOAD                                          
014440,000222: 37,2736           00160                                    MPAC       +3                         
014441,000223: 37,2737           06521                           STORE    VLAUN      +8D,1                      
014442,000224: 37,2740           77745                           DLOAD                                          
014443,000225: 37,2741           00162                                    MPAC       +5                         
014444,000226: 37,2742           06523                           STORE    ACCWD      +8D,1                      
014445,000227: 37,2743           77700                           TIX,1                                          
014446,000228: 37,2744           76723                                    LOOSE                                 
014447,000229: 
014448,000230: 37,2745           76174                           AXT,2    AXT,1                                 #  EVALUATE SINES AND COSINES
014449,000231: 37,2746           00006                                    6                                     
014450,000232: 37,2747           00002                                    2                                     
014451,000233: 37,2750           57343        BOOP               DLOAD*   DMPR                                  
014452,000234: 37,2751           02503                                    ANGX       +2,1                       
014453,000235: 37,2752           37074                                    GEORGEJ                               
014454,000236: 37,2753           77722                           SR2R                                           
014455,000237: 37,2754           73406                           PUSH     SIN                                   
014456,000238: 37,2755           56072                           SL3R     XAD,1                                 
014457,000239: 37,2756           00046                                    X1                                    
014458,000240: 37,2757           10021                           STORE    16D,2                                 
014459,000241: 37,2760           77745                           DLOAD                                          
014460,000242: 37,2761           77746                           COS                                            
014461,000243: 37,2762           10027                           STORE    22D,2                                 #  COSINES
014462,000244: 37,2763           77704                           TIX,2                                          
014463,000245: 37,2764           76750                                    BOOP                                  
014464,000246: 
014465,000247: 37,2765           77776        PERFERAS           EXIT                                           
014466,000248: 37,2766           35066                           CA       EBANK7                                
014467,000249: 37,2767           54003                           TS       EBANK                                 
014468,000250: 37,2770  E7,1400                                  EBANK=   ATIGINC                               
014469,000251: 37,2770           01400                           TC       ATIGINC                               #  GOTO ERASABLE TO CALCULATE ONLY TO RETN
014470,000252: 
014471,000253:                                                                                                  #                             CAUTION
014472,000254: 
014473,000255:                                                                                                  #  THE ERASABLE PROGRAM THAT DOES THE CALCULATIONS MUST BE LOADED
014474,000256:                                                                                                  #  BEFORE ANY ATTEMPT IS MADE TO RUN THE IMU PERFORMANCE TEST
014475,000257: 
014476,000258: 37,2771  E5,1400                                  EBANK=   AZIMUTH                               
014477,000259: 37,2771           11412                           CCS      LENGTHOT                              
014478,000260: 37,2772           03027                           TC       SLEEPIE                               
014479,000261: 37,2773           11440                           CCS      TORQNDX                               
014480,000262: 37,2774           12776                           TCF      +2                                    
014481,000263: 37,2775           03000                           TC       SETUPER1                              
014482,000264: 37,2776           30032                           CA       CDUX                                  
014483,000265: 37,2777           55414                           TS       LOSVEC     +1                         #  FOR TROUBLESHOOTING VD POSNS 2$4
014484,000266: 
014485,000267: 37,3000           06014        SETUPER1           TC       INTPRET                               
014486,000268: 37,3001           65345                           DLOAD    PDDL                                  #  ANGLES FROM DRIFT TEST ONLY
014487,000269: 37,3002           02473                                    ANGZ                                  
014488,000270: 37,3003           02477                                    ANGY                                  
014489,000271: 37,3004           55525                           PDDL     VDEF                                  
014490,000272: 37,3005           02501                                    ANGX                                  
014491,000273: 37,3006           74276                           VCOMP    VXSC                                  
014492,000274: 37,3007           37074                                    GEORGEJ                               
014493,000275: 37,3010           74521                           MXV      VSR1                                  
014494,000276: 37,3011           02643                                    XSM                                   
014495,000277: 37,3012           02740                           STORE    OGC                                   
014496,000278: 37,3013           77776                           EXIT                                           
014497,000279: 
014498,000280: 37,3014           32472                           CA       OGCPL                                 
014499,000281: 37,3015           04655                           TC       BANKCALL                              
014500,000282: 37,3016           17234                           CADR     IMUPULSE                              
014501,000283: 37,3017           02312                           TC       IMUSLLLG                              
014502,000284: 37,3020           11440        GEOSTRT4           CCS      TORQNDX                               #  ONLY POSITIVE IF IN VERTICAL DRIFT TEST
014503,000285: 37,3021           02260                           TC       VALMIS                                
014504,000286: 37,3022           06014                           TC       INTPRET                               
014505,000287: 37,3023           77624                           CALL                                           
014506,000288: 37,3024           76376                                    ERTHRVSE                              
014507,000289: 37,3025           77776                           EXIT                                           
014508,000290: 37,3026           02114                           TC       TORQUE                                
014509,000291: 
014510,000292: 37,3027           55412        SLEEPIE            TS       LENGTHOT                              #  TEST NOT OVER-DECREMENT LENGTHOT
014511,000293: 37,3030           11440                           CCS      TORQNDX                               #  ARE WE DOING VERTDRIFT
014512,000294: 37,3031           02444                           TC       EARTHR*                               
014513,000295: 37,3032           05225                           TC       ENDOFJOB                              
014514,000296: 
014515,000297: 37,3033           05651        SOMEERRR           TC       ALARM                                 
014516,000298: 37,3034           01600                           OCT      1600                                  
014517,000299: 37,3035           02265                           TC       ENDTEST1                              
014518,000300: 37,3036           05651        SOMERR2            TC       ALARM                                 
014519,000301: 37,3037           01601                           OCT      1601                                  
014520,000302: 37,3040           02265                           TC       ENDTEST1                              
014521,000303: 
014522,000304: 37,3041           06200        DEC585             OCT      06200                                 #  3200 B+14  ORDER IS IMPORTANT
014523,000305: 37,3042           00000 00000  SCHZEROS           2DEC     .00000000                             
014524,000306: 37,3044           00000 00000                     2DEC     .00000000                             
014525,000307: 
014526,000308: 37,3046           00000                           OCT      00000                                 
014527,000309: 37,3047           00000        ONEDPP             OCT      00000                                 #  ORDER IS IMPORTANT
014528,000310: 37,3050           00001                           OCT      00001                                 
014529,000311: 
014530,000312: 37,3051           00004        INTVAL             OCT      4                                     
014531,000313: 37,3052           00002                           OCT      2                                     
014532,000314: 37,3053           00220                           DEC      144        B-14                       
014533,000315: 37,3054           77776                           DEC      -1         B-14                       
014534,000316: 37,3055           35730 00035  SOUPLY             2DEC     .93505870                             #  INITIAL GAINS FOR PIP OUTPUTS
014535,000317: 
014536,000318: 37,3057           10317 17550                     2DEC     .26266423                             #  INITIAL GAINS/4 FOR ERECTION ANGLES
014537,000319: 
014538,000320: 37,3061           00115        77DECML            DEC      77         B-14                       
014539,000321: 37,3062           01443        ALXXXZ             GENADR   ALX1S      -1                         
014540,000322: 37,3063           04133 02265  PIPASC             2DEC     .13055869                             
014541,000323: 
014542,000324: 37,3065           57223 66451  VELSC              2DEC     -.52223476                            #  512/980.402
014543,000325: 
014544,000326: 37,3067           05427 12577  ALSK               2DEC     .17329931                             #  SSWAY VEL GAIN X 980.402/4096
014545,000327: 
014546,000328: 37,3071           77567 44202                     2DEC     -.00835370                            #  SSWAY ACCEL GAIN X 980.402/4096
014547,000329: 
014548,000330: 37,3073           24276 14066  GEORGEJ            2DEC     .63661977                             
014549,000331: 
014550,000332: 37,3075           23073 11773  GEORGEK            2DEC     .59737013                             
014551,000333: 

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