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.

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

Page 908

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

Page 909

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

Page 910

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

Page 911

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

Page 912

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

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