Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images are 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 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

017832,000002:                                                                                                  ## Copyright:   Public domain.
017833,000003:                                                                                                  ## Filename:    KALCMANU_STEERING.agc
017834,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.  
017835,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
017836,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
017837,000007:                                                                                                  ## Assembler:   yaYUL
017838,000008:                                                                                                  ## Contact:     Onno Hommes <ohommes@alumni.cmu.edu>
017839,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
017840,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
017841,000011:                                                                                                  ## Mod history: 2010-06-01 OH   Adapted from corresponding Colossus 249 file.
017842,000012:                                                                                                  ##              2010-12-04 JL   Remove Colossus 249 header comments. Change 
017843,000013:                                                                                                  ##                              to double-hash page numbers.
017844,000014:                                                                                                  ##              2011-01-27 JL   Minor fixes.
017845,000015:                                                                                                  ##              2016-08-14 RSB  Added SBANKs for addressing discrepancies.
017846,000016:                                                                                                  ##              2016-12-30 RSB  Proofed comment text using octopus/ProoferComments,
017847,000017:                                                                                                  ##                              and corrected errors found.
017848,000018:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
017849,000019:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
017850,000020: 

Page 405

017852,000022:                                                                                                  #  GENERATION OF STEERING COMMANDS FOR DIGITAL AUTOPILOT FREE FALL MANEUVERS
017853,000023: 
017854,000024:                                                                                                  #  NEW COMMANDS WILL BE GENERATED EVERY ONE SECOND DURING THE MANEUVER
017855,000025: 
017856,000026: 15,2000                                           BANK     15                                    
017857,000027: 
017858,000028: 22,2000                                           SETLOC   KALCMON1                              
017859,000029: 22,2000                                           BANK                                           
017860,000030: 
017861,000031: 22,3027  E6,1661                                  EBANK=   BCDU                                  
017862,000032: 
017863,000033: 22,3027                                           COUNT    22/KALC                               
017864,000034: 
017865,000035: 22,3027           41332        NEWDELHI           CS       HOLDFLAG                              #  SEE IF MANEUVER HAS BEEN INTERRUPTED
017866,000036: 22,3030           00006                           EXTEND                                         #  BY ASTRONAUT
017867,000037: 22,3031           62725                           BZMF     NOGO       -2                         #  IF SO, TERMINATE KALCMANU
017868,000038: 22,3032           06006        NEWANGL            TC       INTPRET                               
017869,000039: 22,3033           75160                           AXC,1    AXC,2                                 
017870,000040: 22,3034           03320                                    MIS                                   #  COMPUTE THE NEW MATRIX FROM S/C TO
017871,000041: 22,3035           03425                                    DEL                                   #  STABLE MEMBER AXES
017872,000042: 22,3036           77624                           CALL                                           
017873,000043: 22,3037           44304                                    MXM3                                  
017874,000044: 22,3040           45575                           VLOAD    STADR                                 
017875,000045: 22,3041           50442                           STOVL    MIS        +12D                       #  CALCULATE NEW DESIRED CDU ANGLES
017876,000046: 22,3042           77626                           STADR                                          
017877,000047: 22,3043           50450                           STOVL    MIS        +6D                        
017878,000048: 22,3044           77626                           STADR                                          
017879,000049: 22,3045           74456                           STORE    MIS                                   
017880,000050: 22,3046           45160                           AXC,1    CALL                                  
017881,000051: 22,3047           03320                                    MIS                                   
017882,000052: 22,3050           44655                                    DCMTOCDU                              #  PICK UP THE NEW CDU ANGLES FROM MATRIX
017883,000053: 22,3051           77634                           RTB                                            
017884,000054: 22,3052           45547                                    V1STO2S                               
017885,000055: 22,3053           03267                           STORE    NCDU                                  #  NEW CDU ANGLES
017886,000056: 22,3054           77414                           BONCLR   EXIT                                  
017887,000057: 22,3055           01215                                    CALCMAN2                              
017888,000058: 22,3056           45142                                    MANUSTAT                              #  TO START MANEUVER
017889,000059: 22,3057           34711                           CAF      TWO                                   #           +0 OTHERWISE
017890,000060: 22,3060           55664        INCRDCDU           TS       KSPNDX                                
017891,000061: 22,3061           60000                           DOUBLE                                         
017892,000062: 22,3062           55665                           TS       KDPNDX                                
017893,000063: 22,3063           51664                           INDEX    KSPNDX                                
017894,000064: 22,3064           31666                           CA       NCDU                                  #  NEW DESIRED CDU ANGLES
017895,000065: 22,3065           00006                           EXTEND                                         
017896,000066: 22,3066           51664                           INDEX    KSPNDX                                
017897,000067: 22,3067           21661                           MSU      BCDU                                  #  INITIAL S/C ANGLE OR PREVIOUS DESIRED
017898,000068: 22,3070           00006                           EXTEND                                         #  CDU ANGLES
017899,000069: 22,3071           73141                           MP       DT/TAU                                
017900,000070: 22,3072           51665                           INDEX    KDPNDX                                
017901,000071: 22,3073           53576                           DXCH     DELCDUX                               #  ANGLE INCREMENTS TO BE ADDED TO

Page 406

017903,000073: 22,3074           51664                           INDEX    KSPNDX                                #  DCDU EVERY TENTH SEC
017904,000074: 22,3075           31666                           CA       NCDU                                  #  BY LEM DAP
017905,000075: 22,3076           51664                           INDEX    KSPNDX                                
017906,000076: 22,3077           57661                           XCH      BCDU                                  
017907,000077: 22,3100           51665                           INDEX    KDPNDX                                
017908,000078: 22,3101           55646                           TS       CDUXD                                 
017909,000079: 22,3102           11664                           CCS      KSPNDX                                
017910,000080: 22,3103           13060                           TCF      INCRDCDU                              #  LOOP FOR THREE AXES
017911,000081: 
017912,000082: 22,3104           00003                           RELINT                                         
017913,000083:                                                                                                  #  COMPARE PRESENT TIME WITH TIME TO TERMINATE MANEUVER
017914,000084: 
017915,000085: 22,3105           03115        TMANUCHK           TC       TIMECHK                               
017916,000086: 22,3106           13206                           TCF      CONTMANU                              
017917,000087: 22,3107           34712                           CAF      ONE                                   
017918,000088: 22,3110           05140        MANUSTAL           TC       WAITLIST                              
017919,000089: 22,3111  E6,1661                                  EBANK=   BCDU                                  
017920,000090: 22,3111           03232 44106                     2CADR    MANUSTOP                              
017921,000091: 22,3113           00003                           RELINT                                         
017922,000092: 22,3114           15112                           TCF      ENDOFJOB                              
017923,000093: 
017924,000094: 
017925,000095: 22,3115           00006        TIMECHK            EXTEND                                         
017926,000096: 22,3116           40025                           DCS      TIME2                                 
017927,000097: 22,3117           53673                           DXCH     TTEMP                                 
017928,000098: 22,3120           00006                           EXTEND                                         
017929,000099: 22,3121           31717                           DCA      TM                                    
017930,000100: 22,3122           21673                           DAS      TTEMP                                 
017931,000101: 22,3123           11672                           CCS      TTEMP                                 
017932,000102: 22,3124           00002                           TC       Q                                     
017933,000103: 22,3125           13127                           TCF      +2                                    
017934,000104: 22,3126           13137                           TCF      2NDRETRN                              
017935,000105: 22,3127           11673                           CCS      TTEMP      +1                         
017936,000106: 22,3130           00002                           TC       Q                                     
017937,000107: 22,3131           13133                           TCF      MANUOFF                               
017938,000108: 22,3132           40000                           COM                                            
017939,000109: 22,3133           63205        MANUOFF            AD       ONESEC     +1                         
017940,000110: 22,3134           00006                           EXTEND                                         
017941,000111: 22,3135           63137                           BZMF     2NDRETRN                              
017942,000112: 22,3136           24002                           INCR     Q                                     
017943,000113: 22,3137           24002        2NDRETRN           INCR     Q                                     
017944,000114: 22,3140           00002                           TC       Q                                     
017945,000115: 22,3141           03146        DT/TAU             DEC      .1                                    
017946,000116: 
017947,000117: 22,3142           77776        MANUSTAT           EXIT                                           #  INITIALIZATION ROUTINE
017948,000118: 22,3143           00006                           EXTEND                                         #  FOR AUTOMATIC MANEUVERS
017949,000119: 22,3144           30025                           DCA      TIME2                                 
017950,000120: 22,3145           21717                           DAS      TM                                    #  TM+T0    MANEUVER COMPLETION TIME
017951,000121: 22,3146           00006                           EXTEND                                         

Page 407

017953,000123: 22,3147           43205                           DCS      ONESEC                                
017954,000124: 22,3150           21717                           DAS      TM                                    #  (TM+T0)-1
017955,000125: 22,3151           00004                           INHINT                                         
017956,000126: 22,3152           44712                           CS       ONE                                   #  ENABLE AUTOPILOT TO PERFORM
017957,000127: 22,3153           55332                           TS       HOLDFLAG                              #  AUTOMATIC MANEUVERS
017958,000128: 22,3154           41130                           CS       RATEINDX                              #  SEE IF MANEUVERING AT HIGH RATE
017959,000129: 22,3155           66211                           AD       SIX                                   
017960,000130: 22,3156           00006                           EXTEND                                         
017961,000131: 22,3157           63161                           BZMF     HIGHGAIN                              
017962,000132: 22,3160           13164                           TCF      +4                                    
017963,000133: 22,3161           41501        HIGHGAIN           CS       RCSFLAGS                              #  IF SO, SET HIGH RATE FLAG (BIT 15 OF
017964,000134: 22,3162           74674                           MASK     BIT15                                 #  RCSFLAGS)
017965,000135: 22,3163           27501                           ADS      RCSFLAGS                              
017966,000136: 22,3164           53711                           DXCH     BRATE                                 #  X-AXIS MANEUVER RATE
017967,000137: 22,3165           53526                           DXCH     WBODY                                 
017968,000138: 22,3166           53713                           DXCH     BRATE      +2                         #  Y-AXIS MANEUVER RATE
017969,000139: 22,3167           53530                           DXCH     WBODY1                                
017970,000140: 22,3170           53715                           DXCH     BRATE      +4                         #  Z-AXIS MANEUVER RATE
017971,000141: 22,3171           53532                           DXCH     WBODY2                                
017972,000142: 22,3172           31675                           CA       BIASTEMP   +1                         #  INSERT ATTITUDE ERROR BIASES
017973,000143: 22,3173           55564                           TS       BIAS                                  #  INTO AUTOPILOT
017974,000144: 22,3174           31677                           CA       BIASTEMP   +3                         
017975,000145: 22,3175           55565                           TS       BIAS1                                 
017976,000146: 22,3176           31701                           CA       BIASTEMP   +5                         
017977,000147: 22,3177           55566                           TS       BIAS2                                 
017978,000148: 22,3200           30025                           CA       TIME1                                 
017979,000149: 22,3201           63205                           AD       ONESEC     +1                         
017980,000150: 22,3202           57671                           XCH      NEXTIME                               
017981,000151: 22,3203           13057                           TCF      INCRDCDU   -1                         
017982,000152: 
017983,000153: 22,3204           00000        ONESEC             DEC      0          B-14                       
017984,000154: 22,3205           00144                           DEC      100        B-14                       
017985,000155: 
017986,000156: 22,3206           00004        CONTMANU           INHINT                                         #  CONTINUE WITH UPDATE PROCESS
017987,000157: 22,3207           40025                           CS       TIME1                                 
017988,000158: 22,3210           61671                           AD       NEXTIME                               
017989,000159: 22,3211           10000                           CCS      A                                     
017990,000160: 22,3212           64712                           AD       ONE                                   
017991,000161: 22,3213           13216                           TCF      MANUCALL                              
017992,000162: 22,3214           64674                           AD       NEGMAX                                
017993,000163: 22,3215           40000                           COM                                            
017994,000164: 22,3216           05140        MANUCALL           TC       WAITLIST                              
017995,000165: 22,3217  E6,1661                                  EBANK=   BCDU                                  
017996,000166: 22,3217           03225 44106                     2CADR    UPDTCALL                              
017997,000167: 22,3221           00003                           RELINT                                         
017998,000168: 22,3222           33205                           CAF      ONESEC     +1                         #  INCREMENT TIME FOR NEXT UPDATE
017999,000169: 22,3223           27671                           ADS      NEXTIME                               
018000,000170: 22,3224           15112                           TCF      ENDOFJOB                              
018001,000171: 

Page 408

018003,000173: 22,3225           37663        UPDTCALL           CAF      PRIO26                                #  CALL FOR UPDATE
018004,000174: 22,3226           05042                           TC       FINDVAC                               #  OF STEERING COMMANDS
018005,000175: 22,3227  E6,1661                                  EBANK=   BCDU                                  
018006,000176: 22,3227           03027 44106                     2CADR    NEWDELHI                              
018007,000177: 22,3231           05213                           TC       TASKOVER                              
018008,000178: 

Page 409

018010,000180:                                                                                                  #  ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
018011,000181: 
018012,000182: 22,3232           03256        MANUSTOP           TC       STOPYZ                                
018013,000183: 22,3233           03303                           TC       LOADYZ                                
018014,000184: 
018015,000185: 22,3234           31155        ENDROLL            CA       CPHI                                  
018016,000186: 22,3235           55646                           TS       CDUXD                                 #  SET CDUXD TO THE COMMANDED OUTER GIMBAL
018017,000187: 22,3236           03245                           TC       STOPRATE                              
018018,000188: 22,3237           31327        ENDMANU            CA       ATTPRIO                               #  RESTORE USERS PRIORITY
018019,000189: 22,3240           54063                           TS       NEWPRIO                               
018020,000190: 
018021,000191: 22,3241           34714                           CA       ZERO                                  #  ZERO ATTCADR
018022,000192: 22,3242           53326                           DXCH     ATTCADR                               
018023,000193: 
018024,000194: 22,3243           05053                           TC       SPVAC                                 #  RETURN TO USER OF GOMANUR
018025,000195: 
018026,000196: 22,3244           05213                           TC       TASKOVER                              
018027,000197: 
018028,000198: 22,3245           34714        STOPRATE           CAF      ZERO                                  
018029,000199: 22,3246           55575                           TS       DELCDUX                               
018030,000200: 22,3247           55576                           TS       DELCDUX    +1                         #  ZERO ROLL INCREMENTAL ANGLES
018031,000201: 22,3250           55525                           TS       WBODY                                 #  RATE
018032,000202: 22,3251           55526                           TS       WBODY      +1                         
018033,000203: 22,3252           55564                           TS       BIAS                                  #  BIAS
018034,000204: 
018035,000205: 22,3253           44674                           CS       BIT15                                 #  MAKE SURE HIGH RATE FLAG (BIT 15 OF
018036,000206: 22,3254           71501                           MASK     RCSFLAGS                              #  RCSFLAGS) IS RESET.
018037,000207: 22,3255           55501                           TS       RCSFLAGS                              
018038,000208: 
018039,000209: 22,3256           34714        STOPYZ             CAF      ZERO                                  
018040,000210: 22,3257           55577                           TS       DELCDUY                               #  ZERO PITCH, YAW
018041,000211: 22,3260           55600                           TS       DELCDUY    +1                         #  INCREMENTAL ANGLES
018042,000212: 22,3261           55601                           TS       DELCDUZ                               
018043,000213: 22,3262           55602                           TS       DELCDUZ    +1                         
018044,000214: 22,3263           55527                           TS       WBODY1                                #  RATES
018045,000215: 22,3264           55530                           TS       WBODY1     +1                         
018046,000216: 22,3265           55531                           TS       WBODY2                                
018047,000217: 22,3266           55532                           TS       WBODY2     +1                         
018048,000218: 22,3267           55565                           TS       BIAS1                                 #  BIASES
018049,000219: 22,3270           55566                           TS       BIAS2                                 
018050,000220: 22,3271           00002                           TC       Q                                     
018051,000221: 
018052,000222: 22,3272           30032        ZEROEROR           CA       CDUX                                  #  PICK UP CDU ANGLES AND STORE IN
018053,000223: 22,3273           55646                           TS       CDUXD                                 #  CDU DESIRED
018054,000224: 22,3274           30033                           CA       CDUY                                  
018055,000225: 22,3275           55650                           TS       CDUYD                                 
018056,000226: 22,3276           30034                           CA       CDUZ                                  
018057,000227: 22,3277           55652                           TS       CDUZD                                 
018058,000228: 22,3300           00002                           TC       Q                                     
018059,000229: 

Page 410

018061,000231: 22,3301           31155        LOADCDUD           CA       CPHI                                  #  STORE TERMINAL ANGLES INTO
018062,000232: 22,3302           55646                           TS       CDUXD                                 #  COMMAND ANGLES
018063,000233: 22,3303           31156        LOADYZ             CA       CTHETA                                
018064,000234: 22,3304           55650                           TS       CDUYD                                 
018065,000235: 22,3305           31157                           CA       CPSI                                  
018066,000236: 22,3306           55652                           TS       CDUZD                                 
018067,000237: 22,3307           00002                           TC       Q                                     

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