Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality 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 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

042468,000002:                                                                                                  ## Copyright:   Public domain.
042469,000003:                                                                                                  ## Filename:    TVCMASSPROP.agc
042470,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
042471,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
042472,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
042473,000007:                                                                                                  ## Assembler:   yaYUL
042474,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042475,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
042476,000010:                                                                                                  ## Pages:       951-955
042477,000011:                                                                                                  ## Mod history: 2009-05-13 RSB  Adapted from the Colossus249/ file of the
042478,000012:                                                                                                  ##                              same name, using Comanche055 page images.
042479,000013:                                                                                                  ##              2016-12-21 RSB  Proofed comment text using octopus/ProoferComments
042480,000014:                                                                                                  ##                              and corrected the errors found.
042481,000015:                                                                                                  ##              2017-01-20 RSB  Fixed comment-text errors noted while diff'ing
042482,000016:                                                                                                  ##                              vs Colossus 249.
042483,000017:                                                                                                  ##
042484,000018:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
042485,000019:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
042486,000020:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
042487,000021:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
042488,000022:                                                                                                  ## consequent reduction in image quality as well) are available online at
042489,000023:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
042490,000024:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
042491,000025:                                                                                                  ## (much) higher-quality images which Paul actually created.
042492,000026:                                                                                                  ##
042493,000027:                                                                                                  ## Notations on the hardcopy document read, in part:
042494,000028:                                                                                                  ##
042495,000029:                                                                                                  ##      Assemble revision 055 of AGC program Comanche by NASA
042496,000030:                                                                                                  ##      2021113-051.  10:28 APR. 1, 1969  
042497,000031:                                                                                                  ##
042498,000032:                                                                                                  ##      This AGC program shall also be referred to as
042499,000033:                                                                                                  ##                      Colossus 2A
042500,000034: 

Page 951

042502,000036:                                                                                                  #  PROGRAM NAME....MASSPROP
042503,000037:                                                                                                  #  LOG SECTION....TVCMASSPROP            PROGRAMMER...MELANSON (ENGEL, SCHLUNDT)
042504,000038: 
042505,000039:                                                                                                  #  FUNCTIONAL DESCRIPTION:
042506,000040: 
042507,000041:                                                                                                  #        MASSPROP OPERATES IN TWO MODES: (1) IF LEM MASS OR CONFIGURATION ARE UPDATED (MASSPROP DOES NOT TEST
042508,000042:                                                                                                  #        FOR THIS) THE ENTIRE PROGRAM MUST BE RUN THROUGH, BREAKPOINT VALUES AND DERIVATIVES OF THE OUTPUTS WITH
042509,000043:                                                                                                  #        RESPECT TO CSM MASS BEING CALCULATED PRIOR TO CALCULATION OF THE OUTPUTS.  (2) OTHERWISE, THE OUTPUTS CAN BE
042510,000044:                                                                                                  #        CALCULATED USING PREVIOUSLY COMPUTED BREAKPOINT VALUES AND DERIVATIVES.
042511,000045: 
042512,000046:                                                                                                  #  CALLING SEQUENCES
042513,000047: 
042514,000048:                                                                                                  #        IF LEM MASS OR CONFIGURATION HAS BEEN UPDATED, TRANSFER TO MASSPROP, OTHERWISE TRANSFER TO FIXCW.
042515,000049:                                                                                                  #                L       TC      BANKCALL OR IBNKCALL
042516,000050:                                                                                                  #                L+1     CADR    MASSPROP
042517,000051:                                                                                                  #                        OR
042518,000052:                                                                                                  #                L+1     CADR    FIXCW
042519,000053:                                                                                                  #                L+2     RETURNS VIA Q
042520,000054: 
042521,000055:                                                                                                  #  CALLED   IN PARTICULAR BY DONOUN47 (JOB) AND TVCEXECUTIVE (TASK)
042522,000056: 
042523,000057:                                                                                                  #  JOBS OR TASKS INITIATED - NONE
042524,000058: 
042525,000059:                                                                                                  #  SUBROUTINES CALLED - NONE
042526,000060: 
042527,000061:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
042528,000062: 
042529,000063:                                                                                                  #        LEMMASS MUST CONTAIN LEM MASS SCALED AT B+16 IN KILOGRAMS
042530,000064:                                                                                                  #        CSMMASS MUST CONTAIN CSM MASS SCALED AT B+16 IN KILOGRAMS
042531,000065:                                                                                                  #        DAPDATR1 MUST BE SET TO INDICATE VEHICLE CONFIGURATION.
042532,000066:                                                                                                  #                BITS (15,14,13)  =  ( 0 , 0 , 1 )       LEM OFF
042533,000067:                                                                                                  #                                    ( 0 , 1 , 0 )       LEM ON (ASCNT,DSCNT)
042534,000068:                                                                                                  #                                    ( 1 , 1 , 0 )       LEM ON (ASCNT ONLY)
042535,000069: 
042536,000070:                                                                                                  #  ALARMS - NONE
042537,000071: 
042538,000072:                                                                                                  #  EXIT -   TC   Q
042539,000073: 
042540,000074:                                                                                                  #  OUTPUTS:
042541,000075: 
042542,000076:                                                                                                  #        (1)     IXX, SINGLE PRECISION SCALED AT B+20 IN KG-M SQ.
042543,000077:                                                                                                  #        (2)     IAVG, SINGLE PRECISION SCALED AT B+20 IN KG-M SQ.
042544,000078:                                                                                                  #        (3)     IAVG/TLX, SINGLE PRECISION, SCALED AT B+2 SEC-SQD
042545,000079:                                                                                                  #        
042546,000080:                                                                                                  #        THEY ARE STORED IN CONSECUTIVE REGISTERS IXX0, IXX1, IXX2
042547,000081:                                                                                                  #        CONVERSION FACTOR:  (SLUG-FTSQ) = 0.737562 (KG-MSQ)

Page 952

042549,000083: 
042550,000084:                                                                                                  #  OUTPUTS ARE CALCULATED AS FOLLOWS:
042551,000085: 
042552,000086:                                                                                                  #        (1)     IF LEM DOCKED, LEMMASS IS FIRST ELIMINATED AS A PARAMETER
042553,000087: 
042554,000088:                                                                                                  #                VARST0 = INTVALUE0 + LEMMASS(SLOPEVAL0)         IXX             BREAKPOINT VALUE
042555,000089:                                                                                                  #                VARST1 = INTVALUE1 + LEMMASS(SLOPEVAL1)         IAVG            BREAKPOINT VALUE
042556,000090:                                                                                                  #                VARST2 = INTVALUE2 + LEMMASS(SLOPEVAL2)         IAVG/TLX        BREAKPOINT VALUE
042557,000091: 
042558,000092:                                                                                                  #                VARST3 = INTVALUE3 + LEMMASS(SLOPEVAL3)         IAVG/TLX        SLOPE FOR CSMMASS > 33956 LBS (SPS > 10000 LBS)
042559,000093:                                                                                                  #                VARST4 = INTVALUE4 + LEMMASS(SLOPEVAL4)         IAVG            SLOPE FOR CSMMASS > 33956 LBS (SPS > 10000 LBS)
042560,000094: 
042561,000095:                                                                                                  #                VARST5 = INTVALUE5 + LEMMASS(SLOPEVAL5)         IXX             SLOPE FOR ALL VALUES OF CSMMASS
042562,000096: 
042563,000097:                                                                                                  #                VARST6 = INTVALUE6 + LEMMASS(SLOPEVAL6)         IAVG            SLOPE FOR CSMMASS < 33956 LBS (SPS < 10000 LBS)
042564,000098:                                                                                                  #                VARST7 = INTVALUE7 + LEMMASS(SLOPEVAL7)         IAVG/TLX        SLOPE FOR CSMMASS < 33956 LBS (SPS < 10000 LBS)
042565,000099: 
042566,000100:                                                                                                  #                VARST8 = INTVALUE8 + LEMMASS(SLOPEVAL8)         IAVG            DECREMENT TO BRKPT VALUE WHEN LEM DSCNT STAGE OFF
042567,000101:                                                                                                  #                VARST9 = INTVALUE9 + LEMMASS(SLOPEVAL9)         IAVG/TLX        DECREMENT TO BRKPT VALUE WHEN LEM DSCNT STAGE OFF
042568,000102: 
042569,000103:                                                                                                  #        (2)     IF LEM NOT DOCKED
042570,000104: 
042571,000105:                                                                                                  #                VARST0 = NOLEMVAL0      WHERE THE MEANING AND SCALING OF VARST0
042572,000106:                                                                                                  #                   .          .         TO VARST9 ARE THE SAME AS GIVEN ABOVE
042573,000107:                                                                                                  #                   .          .
042574,000108:                                                                                                  #                   .          .         NOTE... FOR THIS CASE, VARST8,9 HAVE NO
042575,000109:                                                                                                  #                VARST9 = NOLEMVAL9      MEANING (THEY ARE COMPUTED BUT NOT USED)
042576,000110: 
042577,000111:                                                                                                  #        (3)     THE FINAL OUTPUT CALCULATIONS ARE THEN DONE
042578,000112: 
042579,000113:                                                                                                  #                IXX0 = VARST0 + (CSMMASS + NEGBPW)VARST5                IXX
042580,000114: 
042581,000115:                                                                                                  #                IXX1 = VARST1 + (CSMMASS + NEGBPW)VARST(4 OR 6)         IAVG
042582,000116: 
042583,000117:                                                                                                  #                IXX2 = VARST2 + (CSMMASS + NEGBPW)VARST(3 OR 7)         IAVG/TLX
042584,000118: 
042585,000119:                                                                                                  #        THE DATA USED CAME FROM CSM/LM SPACECRAFT OPERATIONAL DATA BOOK.
042586,000120:                                                                                                  #                VOL. 3, NASA DOCUMENT SNA-8-D-027 (MARCH 1968)
042587,000121: 
042588,000122:                                                                                                  #        PERTINENT MASS DATA:            CSM WEIGHT      (FULL)  64100 LBS
042589,000123:                                                                                                  #                                                        (EMPTY) 23956 LBS
042590,000124:                                                                                                  #                                        LEM WEIGHT      (FULL)  32000 LBS
042591,000125:                                                                                                  #                                                        (EMPTY) 14116 LBS
042592,000126: 
042593,000127:                                                                                                  #        (WEIGHTS ARE FROM AMENDMENT #1 (APRIL 24, 1968) TO ABOVE DATA BOOK)

Page 953

042595,000129: 
042596,000130: 25,3774                                           BANK     25                                    
042597,000131: 05,2000                                           SETLOC   DAPMASS                               
042598,000132: 05,2000                                           BANK                                           
042599,000133: 05,3366  E6,1702                                  EBANK=   BZERO                                 
042600,000134: 05,3366                                           COUNT*   $$/MASP                               
042601,000135: 
042602,000136: 05,3366           34334        MASSPROP           CAF      NINE                                  #  MASSPROP USES TVC/RCS INTERUPT TEMPS
042603,000137: 05,3367           55506                           TS       PHI333                                #  SET UP TEN PASSES
042604,000138: 
042605,000139: 05,3370           31466        LEMTEST            CAE      DAPDATR1                              #  DETERMINE LEM STATUS
042606,000140: 05,3371           75003                           MASK     BIT13                                 
042607,000141: 05,3372           00006                           EXTEND                                         
042608,000142: 05,3373           13377                           BZF      LEMYES                                
042609,000143: 
042610,000144: 05,3374           51506        LEMNO              INDEX    PHI333                                #  LEM NOT ATTACHED
042611,000145: 05,3375           33463                           CAF      NOLEMVAL                              
042612,000146: 05,3376           13407                           TCF      STOINST                               
042613,000147: 
042614,000148: 05,3377           31473        LEMYES             CAE      LEMMASS                               #  LEM IS ATTACHED
042615,000149: 05,3400           60000                           DOUBLE                                         
042616,000150: 05,3401           00006                           EXTEND                                         
042617,000151: 05,3402           51506                           INDEX    PHI333                                
042618,000152: 05,3403           73505                           MP       SLOPEVAL                              
042619,000153: 05,3404           20001                           DDOUBL                                         
042620,000154: 05,3405           51506                           INDEX    PHI333                                
042621,000155: 05,3406           63473                           AD       INTVALUE                              
042622,000156: 
042623,000157: 05,3407           51506        STOINST            INDEX    PHI333                                #  STORAGE INST BEGIN HERE
042624,000158: 05,3410           55511                           TS       VARST0                                
042625,000159: 05,3411           11506                           CCS      PHI333                                #  ARE ALL TEN PASSES COMPLETED
042626,000160: 05,3412           13367                           TCF      MASSPROP   +1                         #  NO - GO DECREMENT PHI333
042627,000161: 
042628,000162: 05,3413           11466        DXTEST             CCS      DAPDATR1                              #  IF NEG, BIT15 IS 1, LEM DSCNT STAGE OFF
042629,000163: 05,3414           13422                           TCF      FIXCW                                 
042630,000164: 05,3415           13422                           TCF      FIXCW                                 
042631,000165: 05,3416           53522                           DXCH     VARST0     +8D                        
042632,000166: 05,3417           21513                           DAS      VARST0     +1                         
042633,000167: 05,3420           33520                           CA       DXITFIX                               
042634,000168: 05,3421           27520                           ADS      VARST0     +7                         
042635,000169: 
042636,000170: 05,3422           35016        FIXCW              CAF      BIT2                                  #  COMPUTATION PHASE BEGINS HERE. SET UP
042637,000171: 05,3423           55506                           TS       PHI333                                #  THREE PASSES
042638,000172: 05,3424           55507                           TS       PSI333                                
042639,000173: 
042640,000174: 05,3425           31474                           CAE      CSMMASS                               #  GET DELTA CSM WEIGHT - SIGN DETERMINES
042641,000175: 05,3426           63517                           AD       NEGBPW                                #  SLOPE LOCATIONS.
042642,000176: 05,3427           60000                           DOUBLE                                         
042643,000177: 05,3430           55510                           TS       TEMP333                               

Page 954

042645,000179: 05,3431           00006                           EXTEND                                         
042646,000180: 05,3432           63435                           BZMF     PEGGY                                 #  DETERMINE CORRECT SLOPE
042647,000181: 05,3433           37715                           CAF      NEG2                                  
042648,000182: 05,3434           55506                           TS       PHI333                                
042649,000183: 
042650,000184: 05,3435           51506        PEGGY              INDEX    PHI333                                #  ALL IS READY - CALCULATE OUTPUTS NOW
042651,000185: 05,3436           31516                           CAE      VARST5                                #  GET SLOPE
042652,000186: 05,3437           00006                           EXTEND                                         
042653,000187: 05,3440           71510                           MP       TEMP333                               #  MULT BY DELTA CSM WEIGHT
042654,000188: 05,3441           60000                           DOUBLE                                         
042655,000189: 05,3442           51507                           INDEX    PSI333                                
042656,000190: 05,3443           61511                           AD       VARST0                                #  ADD BREAKPOINT VALUE
042657,000191: 05,3444           51507                           INDEX    PSI333                                
042658,000192: 05,3445           55470                           TS       IXX                                   #  ****** OUTPUTS (IXX0, IXX1, IXX2) ******
042659,000193: 
042660,000194: 05,3446           11507                           CCS      PSI333                                #  BOOKKEEPING - MASSPROP FINISHED OR NOT
042661,000195: 05,3447           13457                           TCF      BOKKEP2                               #  NO - GO TAKE CARE OF INDEXING REGISTERS
042662,000196: 
042663,000197: 05,3450           31466                           CAE      DAPDATR1                              #  UPDATE WEIGHT/G
042664,000198: 05,3451           75002                           MASK     BIT14                                 
042665,000199: 05,3452           10000                           CCS      A                                     
042666,000200: 05,3453           31473                           CA       LEMMASS                               
042667,000201: 05,3454           61474                           AD       CSMMASS                               
042668,000202: 05,3455           55475                           TS       WEIGHT/G                              #  SCALED AT B+16 IN KILOGRAMS
042669,000203: 05,3456           00002        ENDMASSP           TC       Q                                     
042670,000204: 
042671,000205: 05,3457           55507        BOKKEP2            TS       PSI333                                #  REDUCE PSI BY ONE
042672,000206: 05,3460           00006                           EXTEND                                         
042673,000207: 05,3461           27506                           DIM      PHI333                                
042674,000208: 05,3462           13435                           TCF      PEGGY                                 
042675,000209: 

Page 955

042677,000211: 05,3463           00616        NOLEMVAL           DEC      25445      B-20                       
042678,000212: 05,3464           02526                           DEC      87450      B-20                       
042679,000213: 05,3465           02352                           DEC      .30715     B-2                        
042680,000214: 05,3466           01471                           DEC      1.22877    E-5        B+12            
042681,000215: 05,3467           00634                           DEC      1.6096     B-6                        
042682,000216: 05,3470           00612                           DEC      1.54       B-6                        
042683,000217: 05,3471           03706                           DEC      7.77177    B-6                        
042684,000218: 05,3472           04425                           DEC      3.46458    E-5        B+12            
042685,000219: 
042686,000220: 05,3473           00644        INTVALUE           DEC      26850      B-20                       
042687,000221: 05,3474           03710                           DEC      127518     B-20                       
042688,000222: 05,3475           04246                           DEC      .54059     B-2                        
042689,000223: 05,3476           02011                           DEC      .153964    E-4        B+12            
042690,000224: 05,3477           77501                           DEC      -.742923   B-6                        
042691,000225: 05,3500           00612                           DEC      1.5398     B-6                        
042692,000226: 05,3501           04656                           DEC      9.68       B-6                        
042693,000227: 05,3502           10372                           DEC      .647625    E-4        B+12            
042694,000228: 05,3503           77126                           DEC      -27228     B-20                       
042695,000229: 05,3504           76261                           DEC      -.206476   B-2                        
042696,000230: 
042697,000231: 05,3505           00767        SLOPEVAL           DEC      1.96307    B-6                        
042698,000232: 05,3506           15624                           DEC      27.5774    B-6                        
042699,000233: 05,3507           03054                           DEC      2.3548     E-5        B+12            
042700,000234: 05,3510           04532                           DEC      2.1777     E-9        B+26            
042701,000235: 05,3511           10433                           DEC      1.044      E-3        B+8             
042702,000236: 05,3512           00000                           DEC      0          B-14                       
042703,000237: 05,3513           22070                           DEC      2.21068    E-3        B+8             
042704,000238: 05,3514           03204                           DEC      1.5166     E-9        B+26            
042705,000239: 05,3515           77266                           DEC      -1.284     B-6                        
042706,000240: 05,3516           02476                           DEC      2          E-5        B+12            
042707,000241: 
042708,000242: 05,3517           70364        NEGBPW             DEC      -15402.17  B-16                       
042709,000243: 05,3520           75420        DXITFIX            DEC*     -1.88275   E-5        B+12*           
042710,000244: 

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