Source Code

These source-code files are part of a reconstructed copy of Comanche 44, the initial release (though not the final mission release) of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Subsequent releases were Comanche 45 and Comanche 45/2 (the flown release on Apollo 10). The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 44, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 51. Here's a guide to the Apollo documentation referenced in those annotations:
In most cases, only the titles (rather than the full texts) of PCRs are known. In addition to the explanatory annotations, there is also a step-by-step commentary about the reconstruction process.

Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

042031,000002:                                                                                                  ## Copyright:   Public domain.
042032,000003:                                                                                                  ## Filename:    TVCMASSPROP.agc
042033,000004:                                                                                                  ## Purpose:     A section of Comanche revision 044.
042034,000005:                                                                                                  ##              It is part of the reconstructed source code for the
042035,000006:                                                                                                  ##              original release of the flight software for the Command
042036,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
042037,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
042038,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
042039,000010:                                                                                                  ##              exactly match those specified for Comanche 44 in NASA drawing
042040,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
042041,000012:                                                                                                  ##              reconstruction is correct.
042042,000013:                                                                                                  ## Assembler:   yaYUL
042043,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042044,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042045,000016:                                                                                                  ## Mod history: 2020-12-03 MAS  Created from Comanche 51.
042046,000017: 

Page 951

042048,000019:                                                                                                  #  PROGRAM NAME....MASSPROP
042049,000020:                                                                                                  #  LOG SECTION....TVCMASSPROP            PROGRAMMER...MELANSON (ENGEL, SCHLUNDT)
042050,000021: 
042051,000022:                                                                                                  #  FUNCTIONAL DESCRIPTION:
042052,000023: 
042053,000024:                                                                                                  #        MASSPROP OPERATES IN TWO MODES: (1) IF LEM MASS OR CONFIGURATION ARE UPDATED (MASSPROP DOES NOT TEST
042054,000025:                                                                                                  #        FOR THIS) THE ENTIRE PROGRAM MUST BE RUN THROUGH, BREAKPOINT VALUES AND DERIVATIVES OF THE OUTPUTS WITH
042055,000026:                                                                                                  #        RESPECT TO CSM MASS BEING CALCULATED PRIOR TO CALCULATION OF THE OUTPUTS.  (2) OTHERWISE, THE OUTPUTS CAN BE
042056,000027:                                                                                                  #        CALCULATED USING PREVIOUSLY COMPUTED BREAKPOINT VALUES AND DERIVATIVES.
042057,000028: 
042058,000029:                                                                                                  #  CALLING SEQUENCES
042059,000030: 
042060,000031:                                                                                                  #        IF LEM MASS OR CONFIGURATION HAS BEEN UPDATED, TRANSFER TO MASSPROP, OTHERWISE TRANSFER TO FIXCW.
042061,000032:                                                                                                  #                L       TC      BANKCALL OR IBNKCALL
042062,000033:                                                                                                  #                L+1     CADR    MASSPROP
042063,000034:                                                                                                  #                        OR
042064,000035:                                                                                                  #                L+1     CADR    FIXCW
042065,000036:                                                                                                  #                L+2     RETURNS VIA Q
042066,000037: 
042067,000038:                                                                                                  #  CALLED   IN PARTICULAR BY DONOUN47 (JOB) AND TVCEXECUTIVE (TASK)
042068,000039: 
042069,000040:                                                                                                  #  JOBS OR TASKS INITIATED - NONE
042070,000041: 
042071,000042:                                                                                                  #  SUBROUTINES CALLED - NONE
042072,000043: 
042073,000044:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
042074,000045: 
042075,000046:                                                                                                  #        LEMMASS MUST CONTAIN LEM MASS SCALED AT B+16 IN KILOGRAMS
042076,000047:                                                                                                  #        CSMMASS MUST CONTAIN CSM MASS SCALED AT B+16 IN KILOGRAMS
042077,000048:                                                                                                  #        DAPDATR1 MUST BE SET TO INDICATE VEHICLE CONFIGURATION.
042078,000049:                                                                                                  #                BITS (15,14,13)  =  ( 0 , 0 , 1 )       LEM OFF
042079,000050:                                                                                                  #                                    ( 0 , 1 , 0 )       LEM ON (ASCNT,DSCNT)
042080,000051:                                                                                                  #                                    ( 1 , 1 , 0 )       LEM ON (ASCNT ONLY)
042081,000052: 
042082,000053:                                                                                                  #  ALARMS - NONE
042083,000054: 
042084,000055:                                                                                                  #  EXIT -   TC   Q
042085,000056: 
042086,000057:                                                                                                  #  OUTPUTS:
042087,000058: 
042088,000059:                                                                                                  #        (1)     IXX, SINGLE PRECISION SCALED AT B+20 IN KG-M SQ.
042089,000060:                                                                                                  #        (2)     IAVG, SINGLE PRECISION SCALED AT B+20 IN KG-M SQ.
042090,000061:                                                                                                  #        (3)     IAVG/TLX, SINGLE PRECISION, SCALED AT B+2 SEC-SQD
042091,000062:                                                                                                  #        
042092,000063:                                                                                                  #        THEY ARE STORED IN CONSECUTIVE REGISTERS IXX0, IXX1, IXX2
042093,000064:                                                                                                  #        CONVERSION FACTOR:  (SLUG-FTSQ) = 0.737562 (KG-MSQ)

Page 952

042095,000066: 
042096,000067:                                                                                                  #  OUTPUTS ARE CALCULATED AS FOLLOWS:
042097,000068: 
042098,000069:                                                                                                  #        (1)     IF LEM DOCKED, LEMMASS IS FIRST ELIMINATED AS A PARAMETER
042099,000070: 
042100,000071:                                                                                                  #                VARST0 = INTVALUE0 + LEMMASS(SLOPEVAL0)         IXX             BREAKPOINT VALUE
042101,000072:                                                                                                  #                VARST1 = INTVALUE1 + LEMMASS(SLOPEVAL1)         IAVG            BREAKPOINT VALUE
042102,000073:                                                                                                  #                VARST2 = INTVALUE2 + LEMMASS(SLOPEVAL2)         IAVG/TLX        BREAKPOINT VALUE
042103,000074: 
042104,000075:                                                                                                  #                VARST3 = INTVALUE3 + LEMMASS(SLOPEVAL3)         IAVG/TLX        SLOPE FOR CSMMASS > 33956 LBS (SPS > 10000 LBS)
042105,000076:                                                                                                  #                VARST4 = INTVALUE4 + LEMMASS(SLOPEVAL4)         IAVG            SLOPE FOR CSMMASS > 33956 LBS (SPS > 10000 LBS)
042106,000077: 
042107,000078:                                                                                                  #                VARST5 = INTVALUE5 + LEMMASS(SLOPEVAL5)         IXX             SLOPE FOR ALL VALUES OF CSMMASS
042108,000079: 
042109,000080:                                                                                                  #                VARST6 = INTVALUE6 + LEMMASS(SLOPEVAL6)         IAVG            SLOPE FOR CSMMASS < 33956 LBS (SPS < 10000 LBS)
042110,000081:                                                                                                  #                VARST7 = INTVALUE7 + LEMMASS(SLOPEVAL7)         IAVG/TLX        SLOPE FOR CSMMASS < 33956 LBS (SPS < 10000 LBS)
042111,000082: 
042112,000083:                                                                                                  #                VARST8 = INTVALUE8 + LEMMASS(SLOPEVAL8)         IAVG            DECREMENT TO BRKPT VALUE WHEN LEM DSCNT STAGE OFF
042113,000084:                                                                                                  #                VARST9 = INTVALUE9 + LEMMASS(SLOPEVAL9)         IAVG/TLX        DECREMENT TO BRKPT VALUE WHEN LEM DSCNT STAGE OFF
042114,000085: 
042115,000086:                                                                                                  #        (2)     IF LEM NOT DOCKED
042116,000087: 
042117,000088:                                                                                                  #                VARST0 = NOLEMVAL0      WHERE THE MEANING AND SCALING OF VARST0
042118,000089:                                                                                                  #                   .          .         TO VARST9 ARE THE SAME AS GIVEN ABOVE
042119,000090:                                                                                                  #                   .          .
042120,000091:                                                                                                  #                   .          .         NOTE... FOR THIS CASE, VARST8,9 HAVE NO
042121,000092:                                                                                                  #                VARST9 = NOLEMVAL9      MEANING (THEY ARE COMPUTED BUT NOT USED)
042122,000093: 
042123,000094:                                                                                                  #        (3)     THE FINAL OUTPUT CALCULATIONS ARE THEN DONE
042124,000095: 
042125,000096:                                                                                                  #                IXX0 = VARST0 + (CSMMASS + NEGBPW)VARST5                IXX
042126,000097: 
042127,000098:                                                                                                  #                IXX1 = VARST1 + (CSMMASS + NEGBPW)VARST(4 OR 6)         IAVG
042128,000099: 
042129,000100:                                                                                                  #                IXX2 = VARST2 + (CSMMASS + NEGBPW)VARST(3 OR 7)         IAVG/TLX
042130,000101: 
042131,000102:                                                                                                  #        THE DATA USED CAME FROM CSM/LM SPACECRAFT OPERATIONAL DATA BOOK.
042132,000103:                                                                                                  #                VOL. 3, NASA DOCUMENT SNA-8-D-027 (MARCH 1968)
042133,000104: 
042134,000105:                                                                                                  #        PERTINENT MASS DATA:            CSM WEIGHT      (FULL)  64100 LBS
042135,000106:                                                                                                  #                                                        (EMPTY) 23956 LBS
042136,000107:                                                                                                  #                                        LEM WEIGHT      (FULL)  32000 LBS
042137,000108:                                                                                                  #                                                        (EMPTY) 14116 LBS
042138,000109: 
042139,000110:                                                                                                  #        (WEIGHTS ARE FROM AMENDMENT #1 (APRIL 24, 1968) TO ABOVE DATA BOOK)

Page 953

042141,000112: 
042142,000113: 25,3774                                           BANK     25                                    
042143,000114: 05,2000                                           SETLOC   DAPMASS                               
042144,000115: 05,2000                                           BANK                                           
042145,000116: 05,3366  E6,1702                                  EBANK=   BZERO                                 
042146,000117: 05,3366                                           COUNT*   $$/MASP                               
042147,000118: 
042148,000119: 05,3366           34334        MASSPROP           CAF      NINE                                  #  MASSPROP USES TVC/RCS INTERUPT TEMPS
042149,000120: 05,3367           55506                           TS       PHI333                                #  SET UP TEN PASSES
042150,000121: 
042151,000122: 05,3370           31466        LEMTEST            CAE      DAPDATR1                              #  DETERMINE LEM STATUS
042152,000123: 05,3371           75003                           MASK     BIT13                                 
042153,000124: 05,3372           00006                           EXTEND                                         
042154,000125: 05,3373           13377                           BZF      LEMYES                                
042155,000126: 
042156,000127: 05,3374           51506        LEMNO              INDEX    PHI333                                #  LEM NOT ATTACHED
042157,000128: 05,3375           33463                           CAF      NOLEMVAL                              
042158,000129: 05,3376           13407                           TCF      STOINST                               
042159,000130: 
042160,000131: 05,3377           31473        LEMYES             CAE      LEMMASS                               #  LEM IS ATTACHED
042161,000132: 05,3400           60000                           DOUBLE                                         
042162,000133: 05,3401           00006                           EXTEND                                         
042163,000134: 05,3402           51506                           INDEX    PHI333                                
042164,000135: 05,3403           73505                           MP       SLOPEVAL                              
042165,000136: 05,3404           20001                           DDOUBL                                         
042166,000137: 05,3405           51506                           INDEX    PHI333                                
042167,000138: 05,3406           63473                           AD       INTVALUE                              
042168,000139: 
042169,000140: 05,3407           51506        STOINST            INDEX    PHI333                                #  STORAGE INST BEGIN HERE
042170,000141: 05,3410           55511                           TS       VARST0                                
042171,000142: 05,3411           11506                           CCS      PHI333                                #  ARE ALL TEN PASSES COMPLETED
042172,000143: 05,3412           13367                           TCF      MASSPROP   +1                         #  NO - GO DECREMENT PHI333
042173,000144: 
042174,000145: 05,3413           11466        DXTEST             CCS      DAPDATR1                              #  IF NEG, BIT15 IS 1, LEM DSCNT STAGE OFF
042175,000146: 05,3414           13422                           TCF      FIXCW                                 
042176,000147: 05,3415           13422                           TCF      FIXCW                                 
042177,000148: 05,3416           53522                           DXCH     VARST0     +8D                        
042178,000149: 05,3417           21513                           DAS      VARST0     +1                         
042179,000150: 05,3420           33520                           CA       DXITFIX                               
042180,000151: 05,3421           27520                           ADS      VARST0     +7                         
042181,000152: 
042182,000153: 05,3422           35016        FIXCW              CAF      BIT2                                  #  COMPUTATION PHASE BEGINS HERE. SET UP
042183,000154: 05,3423           55506                           TS       PHI333                                #  THREE PASSES
042184,000155: 05,3424           55507                           TS       PSI333                                
042185,000156: 
042186,000157: 05,3425           31474                           CAE      CSMMASS                               #  GET DELTA CSM WEIGHT - SIGN DETERMINES
042187,000158: 05,3426           63517                           AD       NEGBPW                                #  SLOPE LOCATIONS.
042188,000159: 05,3427           60000                           DOUBLE                                         
042189,000160: 05,3430           55510                           TS       TEMP333                               

Page 954

042191,000162: 05,3431           00006                           EXTEND                                         
042192,000163: 05,3432           63435                           BZMF     PEGGY                                 #  DETERMINE CORRECT SLOPE
042193,000164: 05,3433           37715                           CAF      NEG2                                  
042194,000165: 05,3434           55506                           TS       PHI333                                
042195,000166: 
042196,000167: 05,3435           51506        PEGGY              INDEX    PHI333                                #  ALL IS READY - CALCULATE OUTPUTS NOW
042197,000168: 05,3436           31516                           CAE      VARST5                                #  GET SLOPE
042198,000169: 05,3437           00006                           EXTEND                                         
042199,000170: 05,3440           71510                           MP       TEMP333                               #  MULT BY DELTA CSM WEIGHT
042200,000171: 05,3441           60000                           DOUBLE                                         
042201,000172: 05,3442           51507                           INDEX    PSI333                                
042202,000173: 05,3443           61511                           AD       VARST0                                #  ADD BREAKPOINT VALUE
042203,000174: 05,3444           51507                           INDEX    PSI333                                
042204,000175: 05,3445           55470                           TS       IXX                                   #  ****** OUTPUTS (IXX0, IXX1, IXX2) ******
042205,000176: 
042206,000177: 05,3446           11507                           CCS      PSI333                                #  BOOKKEEPING - MASSPROP FINISHED OR NOT
042207,000178: 05,3447           13457                           TCF      BOKKEP2                               #  NO - GO TAKE CARE OF INDEXING REGISTERS
042208,000179: 
042209,000180: 05,3450           31466                           CAE      DAPDATR1                              #  UPDATE WEIGHT/G
042210,000181: 05,3451           75002                           MASK     BIT14                                 
042211,000182: 05,3452           10000                           CCS      A                                     
042212,000183: 05,3453           31473                           CA       LEMMASS                               
042213,000184: 05,3454           61474                           AD       CSMMASS                               
042214,000185: 05,3455           55475                           TS       WEIGHT/G                              #  SCALED AT B+16 IN KILOGRAMS
042215,000186: 05,3456           00002        ENDMASSP           TC       Q                                     
042216,000187: 
042217,000188: 05,3457           55507        BOKKEP2            TS       PSI333                                #  REDUCE PSI BY ONE
042218,000189: 05,3460           00006                           EXTEND                                         
042219,000190: 05,3461           27506                           DIM      PHI333                                
042220,000191: 05,3462           13435                           TCF      PEGGY                                 
042221,000192: 

Page 955

042223,000194: 05,3463           00616        NOLEMVAL           DEC      25445      B-20                       
042224,000195: 05,3464           02526                           DEC      87450      B-20                       
042225,000196: 05,3465           02352                           DEC      .30715     B-2                        
042226,000197: 05,3466           01471                           DEC      1.22877    E-5        B+12            
042227,000198: 05,3467           00634                           DEC      1.6096     B-6                        
042228,000199: 05,3470           00612                           DEC      1.54       B-6                        
042229,000200: 05,3471           03706                           DEC      7.77177    B-6                        
042230,000201: 05,3472           04425                           DEC      3.46458    E-5        B+12            
042231,000202: 
042232,000203: 05,3473           00644        INTVALUE           DEC      26850      B-20                       
042233,000204: 05,3474           03710                           DEC      127518     B-20                       
042234,000205: 05,3475           04246                           DEC      .54059     B-2                        
042235,000206: 05,3476           02011                           DEC      .153964    E-4        B+12            
042236,000207: 05,3477           77501                           DEC      -.742923   B-6                        
042237,000208: 05,3500           00612                           DEC      1.5398     B-6                        
042238,000209: 05,3501           04656                           DEC      9.68       B-6                        
042239,000210: 05,3502           10372                           DEC      .647625    E-4        B+12            
042240,000211: 05,3503           77126                           DEC      -27228     B-20                       
042241,000212: 05,3504           76261                           DEC      -.206476   B-2                        
042242,000213: 
042243,000214: 05,3505           00767        SLOPEVAL           DEC      1.96307    B-6                        
042244,000215: 05,3506           15624                           DEC      27.5774    B-6                        
042245,000216: 05,3507           03054                           DEC      2.3548     E-5        B+12            
042246,000217: 05,3510           04532                           DEC      2.1777     E-9        B+26            
042247,000218: 05,3511           10433                           DEC      1.044      E-3        B+8             
042248,000219: 05,3512           00000                           DEC      0          B-14                       
042249,000220: 05,3513           22070                           DEC      2.21068    E-3        B+8             
042250,000221: 05,3514           03204                           DEC      1.5166     E-9        B+26            
042251,000222: 05,3515           77266                           DEC      -1.284     B-6                        
042252,000223: 05,3516           02476                           DEC      2          E-5        B+12            
042253,000224: 
042254,000225: 05,3517           70364        NEGBPW             DEC      -15402.17  B-16                       
042255,000226: 05,3520           75420        DXITFIX            DEC*     -1.88275   E-5        B+12*           
042256,000227: 

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