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.

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

Page 951

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

Page 952

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

Page 953

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

Page 954

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

Page 955

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

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