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.

039553,000002:                                                                                                  ## Copyright:   Public domain.
039554,000003:                                                                                                  ## Filename:    TVCMASSPROP.agc
039555,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
039556,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
039557,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
039558,000007:                                                                                                  ## Assembler:   yaYUL
039559,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
039560,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
039561,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
039562,000011:                                                                                                  ## Mod history: 2011-03-06 JL   Adapted from corresponding Colossus 249 file.
039563,000012:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
039564,000013:                                                                                                  ##                              and fixed errors found.
039565,000014: 

Page 908

039567,000016:                                                                                                  #  PROGRAM NAME....MASSPROP
039568,000017:                                                                                                  #  LOG SECTION....TVCMASSPROP      PROGRAMMER...MELANSON (ENGEL , SCHLUNDT)
039569,000018: 
039570,000019: 
039571,000020:                                                                                                  #  FUNCTIONAL DESCRIPTION:
039572,000021: 
039573,000022:                                                                                                  #       MASSPROP OPERATES IN TWO MODES:(1)IF LEM MASS OR CONFIGURATION ARE UPDATED (MASSPROP DOES NOT TEST
039574,000023:                                                                                                  #  FOR THIS) THE ENTIRE PROGRAM MUST BE RUN THROUGH, BREAKPOINT VALUES AND DERIVATIVES OF THE OUTPUTS WITH
039575,000024:                                                                                                  #  RESPECT TO CSM MASS BEING CALCULATED PRIOR TO CALCULATION OF THE OUTPUTS. (2)OTHERWISE, THE OUTPUTS CAN BE
039576,000025:                                                                                                  #  CALCULATED USING PREVIOUSLY COMPUTED BREAKPOINT VALUES AND DERIVATIVES.
039577,000026: 
039578,000027:                                                                                                  #  CALLING SEQUENCES
039579,000028: 
039580,000029:                                                                                                  #     IF LEM MASS OR CONFIGURATION HAS BEEN UPDATED, TRANSFER TO MASSPROP, OTHERWISE TRANSFER TO FIXCW.
039581,000030:                                                                                                  #           L      TC     BANKCALL OR IBNKCALL
039582,000031:                                                                                                  #           L+1    CADR   MASSPROP
039583,000032:                                                                                                  #                     OR
039584,000033:                                                                                                  #           L+1    CADR   FIXCW
039585,000034: 
039586,000035:                                                                                                  #           L+2    RETURNS VIA Q
039587,000036: 
039588,000037:                                                                                                  #  CALLED   IN PARTICULAR BY DONOUN47 (JOB) AND TVCEXECUTIVE (TASK)
039589,000038: 
039590,000039:                                                                                                  #  JOBS OR TASKS INITIATED - NONE
039591,000040: 
039592,000041:                                                                                                  #  SUBROUTINES CALLED - NONE
039593,000042: 
039594,000043:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
039595,000044: 
039596,000045:                                                                                                  #       LEMMASS MUST CONTAIN LEM MASS SCALED AT B+16 IN KILOGRAMS
039597,000046:                                                                                                  #       CSMMASS MUST CONTAIN CSM MASS SCALED AT B+16 IN KILOGRAMS
039598,000047: 
039599,000048:                                                                                                  #       DAPDATR1 MUST BE SET TO INDICATE VEHICLE CONFIGURATION.
039600,000049:                                                                                                  #                BITS (15,14,13)  =  ( 0 , 0 , 1 )     LEM OFF
039601,000050:                                                                                                  #                                    ( 0 , 1 , 0 )     LEM ON (ASCNT,DSCNT)
039602,000051:                                                                                                  #                                    ( 1 , 1 , 0 )     LEM ON (ASCNT ONLY)
039603,000052: 
039604,000053: 
039605,000054:                                                                                                  #  ALARMS - NONE
039606,000055: 
039607,000056:                                                                                                  #  EXIT -   TC     Q
039608,000057: 
039609,000058:                                                                                                  #  OUTPUTS:
039610,000059: 
039611,000060:                                                                                                  #       (1)IXX, SINGLE PRECISION SCALED AT B+20 IN KG-M SQ.
039612,000061:                                                                                                  #       (2)IAVG, SINGLE PRECISION SCALED AT B+20 IN KG-M SQ.
039613,000062:                                                                                                  #       (3)IAVG/TLX, SINGLE PRECISION, SCALED AT B+2 SEC-SQD
039614,000063:                                                                                                  #       THEY ARE STORED IN CONSECUTIVE REGISTERS IXX0, IXX1, IXX2
039615,000064: 
039616,000065:                                                                                                  #       CONVERSION FACTOR :  (SLUG-FTSQ) = 0.737562 (KG-MSQ)

Page 909

039618,000067:                                                                                                  #  OUTPUTS ARE CALCULATED AS FOLLOWS:
039619,000068: 
039620,000069:                                                                                                  #   (1) IF LEM DOCKED, LEMMASS IS FIRST ELIMINATED AS A PARAMETER
039621,000070: 
039622,000071:                                                                                                  #       VARST0 = INTVALUE0 + LEMMASS(SLOPEVAL0)       IXX       BREAKPOINT VALUE
039623,000072:                                                                                                  #       VARST1 = INTVALUE1 + LEMMASS(SLOPEVAL1)       IAVG      BREAKPOINT VALUE
039624,000073:                                                                                                  #       VARST2 = INTVALUE2 + LEMMASS(SLOPEVAL2)       IAVG/TLX  BREAKPOINT VALUE
039625,000074: 
039626,000075:                                                                                                  #       VARST3 = INTVALUE3 + LEMMASS(SLOPEVAL3)       IAVG/TLX  SLOPE  FOR CSMMASS > 33956 LBS  ( SPS > 10000 LBS)
039627,000076:                                                                                                  #       VARST4 = INTVALUE4 + LEMMASS(SLOPEVAL4)       IAVG      SLOPE  FOR CSMMASS > 33956 LBS  ( SPS > 10000 LBS)
039628,000077: 
039629,000078:                                                                                                  #       VARST5 = INTVALUE5 + LEMMASS(SLOPEVAL5)       IXX       SLOPE  FOR ALL VALUES OF CSMMASS
039630,000079: 
039631,000080:                                                                                                  #       VARST6 = INTVALUE6 + LEMMASS(SLOPEVAL6)       IAVG      SLOPE  FOR CSMMASS < 33956 LBS ( SPS < 10000 LBS)
039632,000081:                                                                                                  #       VARST7 = INTVALUE7 + LEMMASS(SLOPEVAL7)       IAVG/TLX  SLOPE  FOR CSMMASS < 33956 LBS ( SPS < 10000 LBS)
039633,000082: 
039634,000083:                                                                                                  #       VARST8 = INTVALUE8 + LEMMASS(SLOPEVAL8)       IAVG      DECREMENT  TO BRKPT VALUE WHEN LEM DSCNT STAGE OFF
039635,000084:                                                                                                  #       VARST9 = INTVALUE9 + LEMMASS(SLOPEVAL9)       IAVG/TLX  DECREMENT  TO BRKPT VALUE WHEN LEM DSCNT STAGE OFF
039636,000085: 
039637,000086: 
039638,000087:                                                                                                  #   (2) IF LEM NOT DOCKED
039639,000088: 
039640,000089:                                                                                                  #       VARST0 = NOLEMVAL0    WHERE THE MEANING AND SCALING OF VARST0
039641,000090:                                                                                                  #          .          .       TO VARST9 ARE THE SAME AS GIVEN ABOVE
039642,000091:                                                                                                  #          .          .
039643,000092:                                                                                                  #          .          .       NOTE... FOR THIS CASE, VARST8,9 HAVE NO
039644,000093:                                                                                                  #       VARST9 = NOLEMVAL9    MEANING (THEY ARE COMPUTED BUT NOT USED)
039645,000094: 
039646,000095: 
039647,000096:                                                                                                  #   (3) THE FINAL OUTPUT CALCULATIONS ARE THEN DONE
039648,000097: 
039649,000098:                                                                                                  #       IXX0 =  VARST0 + (CSMMASS + NEGBPW)VARST5            IXX
039650,000099: 
039651,000100:                                                                                                  #       IXX1 =  VARST1 + (CSMMASS + NEGBPW)VARST(4 OR 6)     IAVG
039652,000101: 
039653,000102:                                                                                                  #       IXX2 =  VARST2 + (CSMMASS + NEGBPW)VARST(3 OR 7)     IAVG/TLX
039654,000103: 
039655,000104:                                                                                                  #  THE DATA USED CAME FROM CSM/LM SPACECRAFT OPERATIONAL DATA BOOK.
039656,000105:                                                                                                  #       VOL. 3, NASA DOCUMENT SNA-8-D-027 (MARCH 1968)
039657,000106: 
039658,000107:                                                                                                  #  PERTINENT MASS DATA :           CSM WEIGHT  (FULL)  64100 LBS
039659,000108:                                                                                                  #                                              (EMPTY) 23956 LBS
039660,000109:                                                                                                  #                                  LEM WEIGHT  (FULL)  32000 LBS
039661,000110:                                                                                                  #                                              (EMPTY) 14116 LBS
039662,000111: 
039663,000112:                                                                                                  #  (WEIGHTS ARE FROM AMENDMENT #1 (APRIL 24,1968) TO ABOVE DATA BOOK)
039664,000113: 

Page 910

039666,000115: 25,3766                                           BANK     25                                    
039667,000116: 05,2000                                           SETLOC   DAPMASS                               
039668,000117: 05,2000                                           BANK                                           
039669,000118: 05,3176  E6,1742                                  EBANK=   BZERO                                 
039670,000119: 05,3176                                           COUNT*   $$/MASP                               
039671,000120: 
039672,000121: 05,3176           34334        MASSPROP           CAF      NINE                                  #  MASSPROP USES TVC/RCS INTERUPT TEMPS
039673,000122: 05,3177           55506                           TS       PHI333                                #  SET UP TEN PASSES
039674,000123: 
039675,000124: 05,3200           31466        LEMTEST            CAE      DAPDATR1                              #  DETERMINE LEM STATUS
039676,000125: 05,3201           74676                           MASK     BIT13                                 
039677,000126: 05,3202           00006                           EXTEND                                         
039678,000127: 05,3203           13207                           BZF      LEMYES                                
039679,000128: 
039680,000129: 05,3204           51506        LEMNO              INDEX    PHI333                                #  LEM NOT ATTACHED
039681,000130: 05,3205           33273                           CAF      NOLEMVAL                              
039682,000131: 05,3206           13217                           TCF      STOINST                               
039683,000132: 
039684,000133: 05,3207           31473        LEMYES             CAE      LEMMASS                               #  LEM IS ATTACHED
039685,000134: 05,3210           60000                           DOUBLE                                         
039686,000135: 05,3211           00006                           EXTEND                                         
039687,000136: 05,3212           51506                           INDEX    PHI333                                
039688,000137: 05,3213           73315                           MP       SLOPEVAL                              
039689,000138: 05,3214           20001                           DDOUBL                                         
039690,000139: 05,3215           51506                           INDEX    PHI333                                
039691,000140: 05,3216           63303                           AD       INTVALUE                              
039692,000141: 
039693,000142: 05,3217           51506        STOINST            INDEX    PHI333                                #  STORAGE INST BEGIN HERE
039694,000143: 05,3220           55511                           TS       VARST0                                
039695,000144: 05,3221           11506                           CCS      PHI333                                #  ARE ALL TEN PASSES COMPLETED
039696,000145: 05,3222           13177                           TCF      MASSPROP   +1                         #  NO - GO DECREMENT PHI333
039697,000146: 
039698,000147: 05,3223           11466        DXTEST             CCS      DAPDATR1                              #  IF NEG, BIT15 IS 1, LEM DSCNT STAGE OFF
039699,000148: 05,3224           13232                           TCF      FIXCW                                 
039700,000149: 05,3225           13232                           TCF      FIXCW                                 
039701,000150: 05,3226           53522                           DXCH     VARST0     +8D                        
039702,000151: 05,3227           21513                           DAS      VARST0     +1                         
039703,000152: 05,3230           33330                           CA       DXITFIX                               
039704,000153: 05,3231           27520                           ADS      VARST0     +7                         
039705,000154: 
039706,000155: 05,3232           34711        FIXCW              CAF      BIT2                                  #  COMPUTATION PHASE BEGINS HERE.  SET UP
039707,000156: 05,3233           55506                           TS       PHI333                                #  THREE PASSES
039708,000157: 05,3234           55507                           TS       PSI333                                
039709,000158: 
039710,000159: 05,3235           31474                           CAE      CSMMASS                               #  GET DELTA CSM WEIGHT - SIGN DETERMINES
039711,000160: 05,3236           63327                           AD       NEGBPW                                #  SLOPE LOCATIONS.
039712,000161: 05,3237           60000                           DOUBLE                                         
039713,000162: 05,3240           55510                           TS       TEMP333                               

Page 911

039715,000164: 05,3241           00006                           EXTEND                                         
039716,000165: 05,3242           63245                           BZMF     PEGGY                                 #  DETERMINE CORRECT SLOPE
039717,000166: 05,3243           37715                           CAF      NEG2                                  
039718,000167: 05,3244           55506                           TS       PHI333                                
039719,000168: 
039720,000169: 05,3245           51506        PEGGY              INDEX    PHI333                                #  ALL IS READY - CALCULATE OUTPUTS NOW
039721,000170: 05,3246           31516                           CAE      VARST5                                #  GET SLOPE
039722,000171: 05,3247           00006                           EXTEND                                         
039723,000172: 05,3250           71510                           MP       TEMP333                               #  MULT BY DELTA CSM WEIGHT
039724,000173: 05,3251           60000                           DOUBLE                                         
039725,000174: 05,3252           51507                           INDEX    PSI333                                
039726,000175: 05,3253           61511                           AD       VARST0                                #  ADD BREAKPOINT VALUE
039727,000176: 05,3254           51507                           INDEX    PSI333                                
039728,000177: 05,3255           55470                           TS       IXX                                   #  ****** OUTPUTS (IXX0, IXX1, IXX2) ******
039729,000178: 
039730,000179: 
039731,000180: 05,3256           11507                           CCS      PSI333                                #  BOOKKEEPING  - MASSPROP FINISHED OR NOT
039732,000181: 05,3257           13267                           TCF      BOKKEP2                               #  NO - GO TAKE CARE OF INDEXING REGISTERS
039733,000182: 
039734,000183: 05,3260           31466                           CAE      DAPDATR1                              #  UPDATE WEIGHT/G
039735,000184: 05,3261           74675                           MASK     BIT14                                 
039736,000185: 05,3262           10000                           CCS      A                                     
039737,000186: 05,3263           31473                           CA       LEMMASS                               
039738,000187: 05,3264           61474                           AD       CSMMASS                               
039739,000188: 05,3265           55475                           TS       WEIGHT/G                              #  SCALED AT B+16 IN KILOGRAMS
039740,000189: 05,3266           00002        ENDMASSP           TC       Q                                     
039741,000190: 
039742,000191: 05,3267           55507        BOKKEP2            TS       PSI333                                #  REDUCE PSI BY ONE
039743,000192: 05,3270           00006                           EXTEND                                         
039744,000193: 05,3271           27506                           DIM      PHI333                                
039745,000194: 05,3272           13245                           TCF      PEGGY                                 
039746,000195: 

Page 912

039748,000197: 05,3273           00616        NOLEMVAL           DEC      25445.     B-20                       
039749,000198: 05,3274           02526                           DEC      87450.     B-20                       
039750,000199: 05,3275           02352                           DEC      .30715     B-2                        
039751,000200: 05,3276           01471                           DEC      1.22877    E-5        B+12            
039752,000201: 05,3277           00634                           DEC      1.6096     B-6                        
039753,000202: 05,3300           00612                           DEC      1.54       B-6                        
039754,000203: 05,3301           03706                           DEC      7.77177    B-6                        
039755,000204: 05,3302           04425                           DEC      3.46458    E-5        B+12            
039756,000205: 
039757,000206: 05,3303           00644        INTVALUE           DEC      26850      B-20                       
039758,000207: 05,3304           03710                           DEC      127518     B-20                       
039759,000208: 05,3305           04246                           DEC      .54059     B-2                        
039760,000209: 05,3306           02011                           DEC      .153964    E-4        B+12            
039761,000210: 05,3307           77501                           DEC      -.742923   B-6                        
039762,000211: 05,3310           00612                           DEC      1.5398     B-6                        
039763,000212: 05,3311           04656                           DEC      9.68       B-6                        
039764,000213: 05,3312           10372                           DEC      .647625    E-4        B+12            
039765,000214: 05,3313           77126                           DEC      -27228.    B-20                       
039766,000215: 05,3314           76261                           DEC      -.206476   B-2                        
039767,000216: 
039768,000217: 05,3315           00767        SLOPEVAL           DEC      1.96307    B-6                        
039769,000218: 05,3316           15624                           DEC      27.5774    B-6                        
039770,000219: 05,3317           03054                           DEC      2.3548     E-5        B+12            
039771,000220: 05,3320           04532                           DEC      2.1777     E-9        B+26            
039772,000221: 05,3321           10433                           DEC      1.044      E-3        B+8             
039773,000222: 05,3322           00000                           DEC      0          B-14                       
039774,000223: 05,3323           22070                           DEC      2.21068    E-3        B+8             
039775,000224: 05,3324           03204                           DEC      1.5166     E-9        B+26            
039776,000225: 05,3325           77266                           DEC      -1.284     B-6                        
039777,000226: 05,3326           02476                           DEC      2.         E-5        B+12            
039778,000227: 
039779,000228: 05,3327           70364        NEGBPW             DEC      -15402.17  B-16                       
039780,000229: 05,3330           75420        DXITFIX            DEC*     -1.88275   E-5        B+12*           

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