Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

018572,000002:                                                                                                  ## Copyright:   Public domain.
018573,000003:                                                                                                  ## Filename:    KALCMANU_STEERING.agc
018574,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
018575,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM) 
018576,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for 
018577,000007:                                                                                                  ##              Apollo 15-17.
018578,000008:                                                                                                  ## Assembler:   yaYUL
018579,000009:                                                                                                  ## Contact:     Sergio Navarro <sergionavarrog@gmail.com>
018580,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
018581,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
018582,000012:                                                                                                  ## Mod history: 2009-08-19 SN   Adapted from corresponding Comanche 055 file.
018583,000013:                                                                                                  ##              2009-09-04 JL   Fix typos.
018584,000014:                                                                                                  ##              2010-01-31 JL   Fixed build errors.
018585,000015:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
018586,000016:                                                                                                  ##              2017-02-05 RSB  Proofed comment text by diff'ing vs Comanche 55
018587,000017:                                                                                                  ##                              and corrected errors found.
018588,000018: 

Page 418

018590,000020: 
018591,000021:                                                                                                  #  GENERATION OF STEERING COMMANDS FOR DIGITAL AUTOPILOT FREE FALL MANEUVERS
018592,000022: 
018593,000023:                                                                                                  #  NEW COMMANDS WILL BE GENERATED EVERY ONE SECOND DURING THE MANEUVER
018594,000024: 
018595,000025: 22,2000                                           SETLOC   KALCMON1                              
018596,000026: 22,2000                                           BANK                                           
018597,000027: 
018598,000028: 22,3037  E6,1661                                  EBANK=   BCDU                                  
018599,000029: 
018600,000030: 22,3037                                           COUNT*   $$/KALC                               
018601,000031: 22,3037           34767        NEWDELHI           CAF      R67BIT                                
018602,000032: 22,3040           70104                           MASK     FLAGWRD8                              
018603,000033: 22,3041           00006                           EXTEND                                         
018604,000034: 22,3042           13047                           BZF      NEWANGL    -3                         #  NON-R67 SEQUENCE
018605,000035: 
018606,000036: 22,3043           34764                           CAF      TRACKBIT                              
018607,000037: 22,3044           70075                           MASK     FLAGWRD1                              
018608,000038: 22,3045           00006                           EXTEND                                         #  CHECK TRACKFLAG
018609,000039: 22,3046           13161                           BZF      MYSTEND                               #  IF OFF DO MYSTEND
018610,000040: 
018611,000041: 22,3047           41340                 -3        CS       HOLDFLAG                              
018612,000042: 22,3050           00006                           EXTEND                                         #  CHECK HOLDFLAG
018613,000043: 22,3051           62720                           BZMF     NOGOM2                                #  IF POS, DO STOPRATE
018614,000044: 
018615,000045: 22,3052           06006        NEWANGL            TC       INTPRET                               
018616,000046: 22,3053           75160                 +1        AXC,1    AXC,2                                 
018617,000047: 22,3054           03320                                    MIS                                   #  COMPUTE THE NEW MATRIX FROM S/C TO
018618,000048: 22,3055           03425                                    DEL                                   #  STABLE MEMBER AXES
018619,000049: 22,3056           77624                           CALL                                           
018620,000050: 22,3057           44304                                    MXM3                                  
018621,000051: 22,3060           45575                           VLOAD    STADR                                 
018622,000052: 22,3061           50442                           STOVL    MIS        +12D                       #  CALCULATE NEW DESIRED CDU ANGLES
018623,000053: 22,3062           77626                           STADR                                          
018624,000054: 22,3063           50450                           STOVL    MIS        +6D                        
018625,000055: 22,3064           77626                           STADR                                          
018626,000056: 22,3065           74456                           STORE    MIS                                   
018627,000057: 22,3066           45160                           AXC,1    CALL                                  
018628,000058: 22,3067           03320                                    MIS                                   
018629,000059: 22,3070           44647                                    DCMTOCDU                              #  PICK UP THE NEW CDU ANGLES FROM MATRIX
018630,000060: 22,3071           77634                           RTB                                            
018631,000061: 22,3072           45644                                    V1STO2S                               
018632,000062: 22,3073           03267        NWNGL17D           STORE    NCDU                                  #  NEW CDU ANGLES (TAG IS USED BY EDIT)
018633,000063: 22,3074           77414                           BONCLR   EXIT                                  
018634,000064: 22,3075           01215                                    CALCMAN2                              
018635,000065: 22,3076           40064                                    MANUSTAT                              #  TO START MANEUVER
018636,000066: 22,3077           34767                 -1        CAF      TWO                                   #           +0 OTHERWISE
018637,000067: 22,3100           55664        INCRDCDU           TS       KSPNDX                                
018638,000068: 22,3101           60000                           DOUBLE                                         
018639,000069: 22,3102           55665                           TS       KDPNDX                                
018640,000070: 22,3103           51664                           INDEX    KSPNDX                                

Page 419

018642,000072: 22,3104           31666                           CA       NCDU                                  #  NEW DESIRED CDU ANGLES
018643,000073: 22,3105           00006                           EXTEND                                         
018644,000074: 22,3106           51664                           INDEX    KSPNDX                                
018645,000075: 22,3107           21661                           MSU      BCDU                                  #  INITIAL S/C ANGLE OR PREVIOUS DESIRED
018646,000076: 22,3110           00006                           EXTEND                                         #  CDU ANGLES
018647,000077: 22,3111           73013                           MP       QUADROT                               
018648,000078: 22,3112           51665                           INDEX    KDPNDX                                
018649,000079: 22,3113           53576                           DXCH     DELCDUX                               #  ANGLE INCREMENTS TO BE ADDED TO
018650,000080: 22,3114           51664                           INDEX    KSPNDX                                #  DCDU EVERY TENTH SEC
018651,000081: 22,3115           31666                           CA       NCDU                                  #  BY LEM DAP
018652,000082: 22,3116           51664                           INDEX    KSPNDX                                
018653,000083: 22,3117           57661                           XCH      BCDU                                  
018654,000084: 22,3120           51665                           INDEX    KDPNDX                                
018655,000085: 22,3121           55646                           TS       CDUXD                                 
018656,000086: 22,3122           11664                           CCS      KSPNDX                                
018657,000087: 22,3123           13100                           TCF      INCRDCDU                              #  LOOP FOR THREE AXES
018658,000088: 
018659,000089: 22,3124           00003                           RELINT                                         
018660,000090: 
018661,000091:                                                                                                  #  COMPARE PRESENT TIME WITH TIME TO TERMINATE MANEUVER
018662,000092: 
018663,000093: 22,3125           03135        TMANUCHK           TC       TIMECHK                               
018664,000094: 22,3126           04655                           TC       POSTJUMP                              
018665,000095: 22,3127           40143                           CADR     CONTMANU                              
018666,000096: 
018667,000097: 22,3130           34770                           CAF      ONE                                   
018668,000098: 22,3131           05233        MANUSTAL           TC       WAITLIST                              
018669,000099: 22,3132  E6,1661                                  EBANK=   BCDU                                  
018670,000100: 22,3132           02303 20066                     2CADR    MANUSTOP                              
018671,000101: 
018672,000102: 22,3134           15205                           TCF      ENDOFJOB                              
018673,000103: 
018674,000104: 
018675,000105: 22,3135           00006        TIMECHK            EXTEND                                         
018676,000106: 22,3136           40025                           DCS      TIME2                                 
018677,000107: 22,3137           53673                           DXCH     TTEMP                                 
018678,000108: 22,3140           00006                           EXTEND                                         
018679,000109: 22,3141           31717                           DCA      TM                                    
018680,000110: 22,3142           21673                           DAS      TTEMP                                 
018681,000111: 22,3143           11672                           CCS      TTEMP                                 
018682,000112: 22,3144           00002                           TC       Q                                     
018683,000113: 22,3145           13147                           TCF      +2                                    
018684,000114: 22,3146           13157                           TCF      2NDRETRN                              
018685,000115: 22,3147           11673                           CCS      TTEMP      +1                         
018686,000116: 22,3150           00002                           TC       Q                                     
018687,000117: 22,3151           13153                           TCF      MANUOFF                               
018688,000118: 22,3152           40000                           COM                                            
018689,000119: 22,3153           65016        MANUOFF            AD       1SEC                                  
018690,000120: 22,3154           00006                           EXTEND                                         
018691,000121: 22,3155           63157                           BZMF     2NDRETRN                              
018692,000122: 22,3156           24002                           INCR     Q                                     

Page 420

018694,000124: 22,3157           24002        2NDRETRN           INCR     Q                                     
018695,000125: 22,3160           16706                           TCF      Q+1                                   
018696,000126: 22,3161           04655        MYSTEND            TC       POSTJUMP                              
018697,000127: 22,3162           74416                           CADR     FIXDB                                 
018698,000128: 
018699,000129: 20,2000                                           SETLOC   MANUSTUF                              
018700,000130: 20,2000                                           BANK                                           
018701,000131: 
018702,000132: 20,2064                                           COUNT*   $$/KALC                               
018703,000133: 20,2064           77776        MANUSTAT           EXIT                                           #  INITIALIZATION ROUTINE FOR AUTO
018704,000134: 20,2065           34767                           CAF      R67BIT                                #                      MANEUVERS
018705,000135: 20,2066           70104                           MASK     FLAGWRD8                              
018706,000136: 20,2067           00006                           EXTEND                                         
018707,000137: 20,2070           12075                           BZF      +5                                    
018708,000138: 20,2071           00006                           EXTEND                                         #  R67 RUNNING
018709,000139: 20,2072           34750                           DCA      DPOSMAX                               
018710,000140: 20,2073           53717                           DXCH     TM                                    
018711,000141: 20,2074           12104                           TCF      TMDON                                 
018712,000142: 20,2075           00006                           EXTEND                                         #  NON-R67 PROGRAM
018713,000143: 20,2076           30025                           DCA      TIME2                                 
018714,000144: 20,2077           21717                           DAS      TM                                    #  TM+T0    MANEUVER COMPLETION TIME
018715,000145: 20,2100           45016                           CS       1SEC                                  
018716,000146: 20,2101           54001                           TS       L                                     
018717,000147: 20,2102           44772                           CS       ZERO                                  
018718,000148: 20,2103           21717                           DAS      TM                                    #  (TM+T0)-1
018719,000149: 20,2104           00004        TMDON              INHINT                                         
018720,000150: 20,2105           44770                           CS       ONE                                   #  ENABLE AUTOPILOT TO PERFORM
018721,000151: 20,2106           55340                           TS       HOLDFLAG                              #  AUTOMATIC MANEUVERS
018722,000152: 20,2107           40774                           CS       RATEINDX                              #  SEE IF MANEUVERING AT HIGH RATE
018723,000153: 20,2110           66211                           AD       SIX                                   
018724,000154: 20,2111           00006                           EXTEND                                         
018725,000155: 20,2112           62114                           BZMF     HIGHGAIN                              
018726,000156: 20,2113           12117                           TCF      +4                                    
018727,000157: 20,2114           41501        HIGHGAIN           CS       RCSFLAGS                              #  IF SO, SET HIGH RATE FLAG (BIT 15 OF
018728,000158: 20,2115           74752                           MASK     BIT15                                 #  RCSFLAGS)
018729,000159: 20,2116           27501                           ADS      RCSFLAGS                              
018730,000160: 20,2117           00006                           EXTEND                                         
018731,000161: 20,2120           31711                           DCA      BRATE                                 #  X-AXIS MANEUVER RATE
018732,000162: 20,2121           53526                           DXCH     WBODY                                 
018733,000163: 20,2122           00006                           EXTEND                                         
018734,000164: 20,2123           31713                           DCA      BRATE      +2                         #  Y-AXIS MANEUVER RATE
018735,000165: 20,2124           53530                           DXCH     WBODY1                                
018736,000166: 20,2125           00006                           EXTEND                                         
018737,000167: 20,2126           31715                           DCA      BRATE      +4                         #  Z-AXIS MANEUVER RATE
018738,000168: 20,2127           53532                           DXCH     WBODY2                                
018739,000169: 20,2130           31675                           CA       BIASTEMP   +1                         #  INSERT ATTITUDE ERROR BIASES
018740,000170: 20,2131           55564                           TS       BIAS                                  #  INTO AUTOPILOT
018741,000171: 20,2132           31677                           CA       BIASTEMP   +3                         
018742,000172: 20,2133           55565                           TS       BIAS1                                 
018743,000173: 20,2134           31701                           CA       BIASTEMP   +5                         

Page 421

018745,000175: 20,2135           55566                           TS       BIAS2                                 
018746,000176: 20,2136           30025                           CA       TIME1                                 
018747,000177: 20,2137           65016                           AD       1SEC                                  
018748,000178: 20,2140           57671                           XCH      NEXTIME                               
018749,000179: 20,2141           04655                           TC       POSTJUMP                              
018750,000180: 20,2142           45077                           CADR     INCRDCDU   -1                         
018751,000181: 
018752,000182: 20,2143           00004        CONTMANU           INHINT                                         #  CONTINUE WITH UPDATE PROCESS
018753,000183: 20,2144           40025                           CS       TIME1                                 
018754,000184: 20,2145           61671                           AD       NEXTIME                               
018755,000185: 20,2146           10000                           CCS      A                                     
018756,000186: 20,2147           64770                           AD       ONE                                   
018757,000187: 20,2150           12153                           TCF      MANUCALL                              
018758,000188: 20,2151           64752                           AD       NEGMAX                                
018759,000189: 20,2152           40000                           COM                                            
018760,000190: 20,2153           05223        MANUCALL           TC       TWIDDLE                               
018761,000191: 20,2154           02161                           ADRES    UPDTCALL                              
018762,000192: 20,2155           00003                           RELINT                                         
018763,000193: 20,2156           35016                           CAF      1SEC                                  #  INCREMENT TIME FOR NEXT UPDATE
018764,000194: 20,2157           27671                           ADS      NEXTIME                               
018765,000195: 20,2160           15205                           TCF      ENDOFJOB                              
018766,000196: 
018767,000197: 20,2161           34767        UPDTCALL           CAF      R67BIT                                
018768,000198: 20,2162           70104                           MASK     FLAGWRD8                              
018769,000199: 20,2163           00006                           EXTEND                                         
018770,000200: 20,2164           12171                           BZF      +5                                    
018771,000201: 
018772,000202: 20,2165           11774                           CCS      R61CNTR                               
018773,000203: 20,2166           12170                           TCF      +2                                    
018774,000204: 20,2167           12176                           TCF      DOREMIS                               
018775,000205: 20,2170           55774                           TS       R61CNTR                               
018776,000206: 
018777,000207: 20,2171           37650                           CAF      PRIO26                                
018778,000208: 20,2172           05135                           TC       FINDVAC                               #  OF STEERING COMMANDS
018779,000209: 20,2173  E6,1661                                  EBANK=   BCDU                                  
018780,000210: 20,2173           03037 44066                     2CADR    NEWDELHI                              
018781,000211: 
018782,000212: 20,2175           05314                           TC       TASKOVER                              
018783,000213: 
018784,000214: 20,2176           37650        DOREMIS            CAF      PRIO26                                
018785,000215: 20,2177           05135                           TC       FINDVAC                               
018786,000216: 20,2200  E6,1661                                  EBANK=   BCDU                                  
018787,000217: 20,2200           02374 74066                     2CADR    R67RSTRT                              #  MAKE SURE MIS DOES DEGRADE
018788,000218: 
018789,000219: 20,2202           05314                           TC       TASKOVER                              
018790,000220: 

Page 422

018792,000222:                                                                                                  #  ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
018793,000223: 
018794,000224: 10,2000                                           SETLOC   KALCMON3                              
018795,000225: 10,2000                                           BANK                                           
018796,000226: 
018797,000227: 10,2303                                           COUNT*   $$/KALC                               
018798,000228: 10,2303           04474        MANUSTOP           TC       STOPYZ                                
018799,000229: 10,2304           04714                           TC       IBNKCALL                              
018800,000230: 10,2305           45165                           CADR     LOADYZ                                
018801,000231: 
018802,000232: 10,2306           31307        ENDROLL            CA       CPHI                                  
018803,000233: 10,2307           55646                           TS       CDUXD                                 #  SET CDUXD TO THE COMMANDED OUTER GIMBAL
018804,000234: 10,2310           04463                           TC       STOPRATE                              
018805,000235: 10,2311           35053        ENDMANU            CAF      PRIO14                                
018806,000236: 10,2312           05135                           TC       FINDVAC                               
018807,000237: 10,2313  E6,1774                                  EBANK=   R61CNTR                               
018808,000238: 10,2313           02141 56066                     2CADR    ENDMANUV                              
018809,000239: 
018810,000240: 10,2315           05314                           TC       TASKOVER                              
018811,000241: 
018812,000242:    4000                                           SETLOC   STOPRAT                               
018813,000243:    4000                                           BANK                                           
018814,000244:    4463                                           COUNT*   $$/KALC                               
018815,000245:    4463           34772        STOPRATE           CAF      ZERO                                  
018816,000246:    4464           55575                           TS       DELCDUX                               
018817,000247:    4465           55576                           TS       DELCDUX    +1                         #  ZERO ROLL INCREMENTAL ANGLES
018818,000248:    4466           55525                           TS       WBODY                                 #  RATE
018819,000249:    4467           55526                           TS       WBODY      +1                         
018820,000250:    4470           55564                           TS       BIAS                                  #  BIAS
018821,000251: 
018822,000252:    4471           44752                           CS       BIT15                                 #  MAKE SURE HIGH RATE FLAG (BIT 15 OF
018823,000253:    4472           71501                           MASK     RCSFLAGS                              #  RCSFLAGS) IS RESET.
018824,000254:    4473           55501                           TS       RCSFLAGS                              
018825,000255: 
018826,000256:    4474           34772        STOPYZ             CAF      ZERO                                  
018827,000257:    4475           55577                           TS       DELCDUY                               #  ZERO PITCH, YAW
018828,000258:    4476           55600                           TS       DELCDUY    +1                         #  INCREMENTAL ANGLES
018829,000259:    4477           55601                           TS       DELCDUZ                               
018830,000260:    4500           55602                           TS       DELCDUZ    +1                         
018831,000261:    4501           55527                           TS       WBODY1                                #  RATES
018832,000262:    4502           55530                           TS       WBODY1     +1                         
018833,000263:    4503           55531                           TS       WBODY2                                
018834,000264:    4504           55532                           TS       WBODY2     +1                         
018835,000265:    4505           55565                           TS       BIAS1                                 #  BIASES
018836,000266:    4506           55566                           TS       BIAS2                                 
018837,000267:    4507           00002                           TC       Q                                     
018838,000268: 
018839,000269: 20,2000                                           SETLOC   MANUSTUF                              
018840,000270: 20,2000                                           BANK                                           
018841,000271: 

Page 423

018843,000273: 20,2203                                           COUNT*   $$/KALC                               
018844,000274: 20,2203           30032        ZEROEROR           CA       CDUX                                  #  PICK UP CDU ANGLES AND STORE IN
018845,000275: 20,2204           55646                           TS       CDUXD                                 #  CDU DESIRED
018846,000276: 20,2205           30033                           CA       CDUY                                  
018847,000277: 20,2206           55650                           TS       CDUYD                                 
018848,000278: 20,2207           30034                           CA       CDUZ                                  
018849,000279: 20,2210           55652                           TS       CDUZD                                 
018850,000280: 20,2211           00002                           TC       Q                                     
018851,000281: 
018852,000282: 22,2000                                           SETLOC   KALCMON1                              
018853,000283: 22,2000                                           BANK                                           
018854,000284: 
018855,000285: 22,3163                                           COUNT*   $$/KALC                               
018856,000286: 22,3163           31307        LOADCDUD           CA       CPHI                                  #  STORE TERMINAL ANGLES INTO
018857,000287: 22,3164           55646                           TS       CDUXD                                 #  COMMAND ANGLES
018858,000288: 22,3165           31310        LOADYZ             CA       CTHETA                                
018859,000289: 22,3166           55650                           TS       CDUYD                                 
018860,000290: 22,3167           31311                           CA       CPSI                                  
018861,000291: 22,3170           55652                           TS       CDUZD                                 
018862,000292: 22,3171           00002                           TC       Q                                     

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