Source Code

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

The starting point was the source code of Comanche 45 (itself previously accurately reconstructed). Comanche 45 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 45 and 45/2. The now-reconstructed Comanche 45/2 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 tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 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 44. Here's a guide to the Apollo documentation referenced in those annotations:
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.

050996,000002:                                                                                                  ## Copyright:   Public domain.
050997,000003:                                                                                                  ## Filename:    FIXED-FIXED_CONSTANT_POOL.agc
050998,000004:                                                                                                  ## Purpose:     A section of Manche45 revision 2.
050999,000005:                                                                                                  ##              It is part of the reconstructed source code for the
051000,000006:                                                                                                  ##              final, flown release of the flight software for the Command
051001,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
051002,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
051003,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
051004,000010:                                                                                                  ##              exactly match those specified for Manche 45/2 in NASA drawing
051005,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
051006,000012:                                                                                                  ##              reconstruction is correct.
051007,000013:                                                                                                  ## Assembler:   yaYUL
051008,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
051009,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051010,000016:                                                                                                  ## Mod history: 2020-12-24 MAS  Created from Comanche 45.
051011,000017: 

Page 1200

051013,000019:    4776                                           BLOCK    02                                    
051014,000020:    4776                                           COUNT    02/FCONS                              
051015,000021: 
051016,000022:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
051017,000023: 
051018,000024:    4776           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
051019,000025:    4777           37777        POSMAX             OCT      37777                                 
051020,000026: 
051021,000027:    5000     5000               LIMITS             =        NEG1/2                                
051022,000028: 
051023,000029:    5000           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
051024,000030:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
051025,000031: 
051026,000032:                                                                                                  #  BIT TABLE                                     
051027,000033: 
051028,000034:    5001           40000        BIT15              OCT      40000                                 
051029,000035:    5002           20000        BIT14              OCT      20000                                 
051030,000036:    5003           10000        BIT13              OCT      10000                                 
051031,000037:    5004           04000        BIT12              OCT      04000                                 
051032,000038:    5005           02000        BIT11              OCT      02000                                 
051033,000039:    5006           01000        BIT10              OCT      01000                                 
051034,000040:    5007           00400        BIT9               OCT      00400                                 
051035,000041:    5010           00200        BIT8               OCT      00200                                 
051036,000042:    5011           00100        BIT7               OCT      00100                                 
051037,000043:    5012           00040        BIT6               OCT      00040                                 
051038,000044:    5013           00020        BIT5               OCT      00020                                 
051039,000045:    5014           00010        BIT4               OCT      00010                                 
051040,000046:    5015           00004        BIT3               OCT      00004                                 
051041,000047:    5016           00002        BIT2               OCT      00002                                 
051042,000048:    5017           00001        BIT1               OCT      00001                                 
051043,000049: 
051044,000050:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
051045,000051:    5020           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
051046,000052:    5021           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
051047,000053:                                                                                                  #  BIT1          OCT     00001
051048,000054:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
051049,000055:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
051050,000056:                                                                                                  #  R3D1          OCT     4               PINBALL
051051,000057:    5022           00005        FIVE               OCT      5                                     
051052,000058:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
051053,000059:    5023           00007        SEVEN              OCT      7                                     
051054,000060:                                                                                                  #  BIT4          OCT     00010
051055,000061:                                                                                                  #  R2D1          OCT     11              PINBALL
051056,000062:    5024     4334               OCT11              =        R2D1                                  #  P20S
051057,000063:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
051058,000064:    5024           00013        ELEVEN             DEC      11         B-14                       
051059,000065:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
051060,000066:    5025           00015        OCT15              OCT      15                                    
051061,000067:                                                                                                  #  R1D1          OCT     16              PINBALL

Page 1201

051063,000069:    5026           00017        LOW4               OCT      17                                    
051064,000070:                                                                                                  #  BIT5          OCT     00020
051065,000071:                                                                                                  #  ND1           OCT     21              PINBALL
051066,000072:                                                                                                  #  VD1           OCT     23              PINBALL
051067,000073:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
051068,000074:                                                                                                  #  MD1           OCT     25              PINBALL
051069,000075:    5027           00030        BITS4&5            OCT      30                                    
051070,000076:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
051071,000077:    5030           00032        CALLCODE           OCT      00032                                 
051072,000078:                                                                                                  #  LOW5          OCT     37              PINBALL
051073,000079:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
051074,000080:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
051075,000081:    5031           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
051076,000082:    5032           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
051077,000083:                                                                                                  #  BIT6          OCT     00040
051078,000084:    5033           00050        OCT50              OCT      50                                    
051079,000085:    5034           00055        DEC45              DEC      45         B-14                       
051080,000086:    5035           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
051081,000087:    5036           00062        .5SEC              DEC      50         B-14                       
051082,000088:                                                                                                  #  BIT7          OCT     00100
051083,000089: 
051084,000090:    5037     5011               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
051085,000091:                                                                                                  #  (LAST 4K OF ROPE)
051086,000092:    5037           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
051087,000093:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
051088,000094:                                                                                                  #  (FIRST 8K OF ACM)
051089,000095:    5040           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
051090,000096:                                                                                                  #  (LAST 8K OF ACM)
051091,000097:    5041           00144        1SEC               DEC      100        B-14                       
051092,000098:                                                                                                  #  LOW7          OCT     177             INTERPRETER
051093,000099:                                                                                                  #  BIT8          OCT     00200
051094,000100:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
051095,000101:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
051096,000102:    5042           00310        2SECS              DEC      200        B-14                       
051097,000103:                                                                                                  #  LOW8          OCT     377             PINBALL
051098,000104:                                                                                                  #  BIT9          OCT     00400
051099,000105:    5043           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
051100,000106:    5044           00454        3SECS              DEC      300        B-14                       
051101,000107:    5045           00620        4SECS              DEC      400        B-14                       
051102,000108:    5046           00777        LOW9               OCT      777                                   
051103,000109:                                                                                                  #  BIT10         OCT     01000
051104,000110:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
051105,000111:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
051106,000112:    5047           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
051107,000113:    5050           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
051108,000114:    5051           01400        OCT1400            OCT      01400                                 
051109,000115:    5052           01426        V06N22             VN       0622                                  
051110,000116:                                                                                                  #  MID5          OCT     1740            PINBALL
051111,000117:    5053           01776        BITS2-10           OCT      1776                                  
051112,000118:    5054           01777        LOW10              OCT      1777                                  

Page 1202

051114,000120:                                                                                                  #  BIT11         OCT     02000
051115,000121:                                                                                                  #  2K+3          OCT     2003            PINBALL
051116,000122:    5055           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
051117,000123:    5056           02400        EBANK5             OCT      02400                                 
051118,000124:    5057           03000        PRIO3              OCT      03000                                 
051119,000125:    5060           03400        EBANK7             OCT      03400                                 
051120,000126:                                                                                                  #  LOW11         OCT     3777            PINBALL
051121,000127:                                                                                                  #  BIT12         OCT     04000
051122,000128:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
051123,000129:    5061           05000        PRIO5              OCT      05000                                 
051124,000130:    5062           06000        PRIO6              OCT      06000                                 
051125,000131:    5063           07000        PRIO7              OCT      07000                                 
051126,000132: 
051127,000133:                                                                                                  #  BIT13         OCT     10000
051128,000134:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
051129,000135:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
051130,000136:    5064           11000        PRIO11             OCT      11000                                 
051131,000137:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
051132,000138:    5065           13000        PRIO13             OCT      13000                                 
051133,000139:    5066           14000        PRIO14             OCT      14000                                 
051134,000140:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
051135,000141:    5067           15000        PRIO15             OCT      15000                                 
051136,000142:    5070           16000        PRIO16             OCT      16000                                 
051137,000143:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
051138,000144:    5071           17000        PRIO17             OCT      17000                                 
051139,000145:    5072           17770        OCT17770           OCT      17770                                 
051140,000146:                                                                                                  #  BIT14         OCT     20000
051141,000147:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
051142,000148:    5073           21000        PRIO21             OCT      21000                                 
051143,000149:    7657                                           BLOCK    03                                    
051144,000150:    7657                                           COUNT    03/FCONS                              
051145,000151: 
051146,000152:    7657           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
051147,000153:    7660           23000        PRIO23             OCT      23000                                 
051148,000154:    7661           24000        PRIO24             OCT      24000                                 
051149,000155:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
051150,000156:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
051151,000157:    7662           25000        PRIO25             OCT      25000                                 
051152,000158:    7663           26000        PRIO26             OCT      26000                                 
051153,000159:    7664           27000        PRIO27             OCT      27000                                 
051154,000160:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
051155,000161:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
051156,000162:    7665           31000        PRIO31             OCT      31000                                 
051157,000163:    7666           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
051158,000164:    7667           32000        PRIO32             OCT      32000                                 
051159,000165:    7670           33000        PRIO33             OCT      33000                                 
051160,000166:    7671           34000        PRIO34             OCT      34000                                 
051161,000167:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              
051162,000168:    7672           35000        PRIO35             OCT      35000                                 
051163,000169:    7673           36000        PRIO36             OCT      36000                                 

Page 1203

051165,000171:    7674           37000        PRIO37             OCT      37000                                 
051166,000172:    7675           37401        63/64+1            OCT      37401                                 
051167,000173:                                                                                                  #  MID7          OCT     37600           PINBALL
051168,000174:    7676           37766        OCT37766           OCT      37766                                 
051169,000175:    7677           37774        OCT37774           OCT      37774                                 
051170,000176:    7700           37776        OCT37776           OCT      37776                                 
051171,000177:                                                                                                  #  DPOSMAX       OCT     37777
051172,000178:                                                                                                  #  BIT15         OCT     40000
051173,000179:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
051174,000180:    7701           40014        DLOADCOD           OCT      40014                                 
051175,000181:    7702           40015        DLOAD*             OCT      40015                                 
051176,000182:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
051177,000183:    7703           40040        BIT15+6            OCT      40040                                 
051178,000184:    7704           40200        OCT40200           OCT      40200                                 
051179,000185:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
051180,000186:                                                                                                  #                OCT     50037           T4RUPT  RELTAB +9D
051181,000187:                                                                                                  #                OCT     54000           T4RUPT  RELTAB +10D
051182,000188:    7705           57777        -BIT14             OCT      57777                                 
051183,000189:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
051184,000190:    7706           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
051185,000191:    7707           70000        13,14,15           OCT      70000                                 
051186,000192:    7710           73777        -1/8               OCT      73777                                 
051187,000193:    7711           74000        HIGH4              OCT      74000                                 
051188,000194:    7712           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
051189,000195:                                                                                                  #  HI5           OCT     76000           PINBALL
051190,000196:    7713           77700        HIGH9              OCT      77700                                 
051191,000197:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
051192,000198:                                                                                                  #  -OCT10        OCT     -10                                      (OCT 77767)
051193,000199:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
051194,000200:    7714           77774        NEG3               DEC      -3         B-14                       
051195,000201:    7715           77775        NEG2               OCT      77775                                 
051196,000202:    7716           77776        NEGONE             DEC      -1         B-14                       
051197,000203: 

Page 1204

051199,000205: 
051200,000206:                                                                                                  #  DEFINED BY EQUALS
051201,000207: 
051202,000208:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
051203,000209:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
051204,000210: 
051205,000211:    7717     7716               MINUS1             =        NEG1                                  
051206,000212:    7717     7716               NEG1               =        NEGONE                                
051207,000213:    7717     5017               ONE                =        BIT1                                  
051208,000214:    7717     5016               TWO                =        BIT2                                  
051209,000215:    7717     6214               THREE              =        OCTAL3                                
051210,000216:    7717     6214               LOW2               =        THREE                                 
051211,000217:    7717     5015               FOUR               =        BIT3                                  
051212,000218:    7717     6211               SIX                =        REVCNT                                
051213,000219:    7717     5023               LOW3               =        SEVEN                                 
051214,000220:    7717     5014               EIGHT              =        BIT4                                  
051215,000221:    7717     4334               NINE               =        R2D1                                  
051216,000222:    7717     4377               TEN                =        BINCON                                
051217,000223:    7717     5024               NOUTCON            =        ELEVEN                                
051218,000224:    7717     4374               OCT23              =        VD1                                   
051219,000225:    7717     4376               OCT25              =        MD1                                   
051220,000226:    7717     5006               PRIO1              =        BIT10                                 
051221,000227:    7717     5051               EBANK3             =        OCT1400                               
051222,000228:    7717     5005               PRIO2              =        BIT11                                 
051223,000229:    7717     5037               OCT120             =        SUPER101                              
051224,000230:    7717     5040               OCT140             =        SUPER110                              
051225,000231:    7717     5005               2K                 =        BIT11                                 
051226,000232:    7717     5005               EBANK4             =        BIT11                                 
051227,000233:    7717     5004               PRIO4              =        BIT12                                 
051228,000234:    7717     5057               EBANK6             =        PRIO3                                 
051229,000235:    7717     5003               QUARTER            =        BIT13                                 
051230,000236:    7717     5003               PRIO10             =        BIT13                                 
051231,000237:    7717     7632               OCT10001           =        CCSL                                  
051232,000238:    7717     5002               POS1/2             =        HALF                                  
051233,000239:    7717     5002               PRIO20             =        BIT14                                 
051234,000240:    7717     5002               HALF               =        BIT14                                 
051235,000241:    7717     4371               PRIO30             =        CHRPRIO                               
051236,000242:    7717     4371               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
051237,000243:    7717     6440               OCT30002           =        TLOAD      +1                         
051238,000244:    7717     7671               B12T14             =        PRIO34                                
051239,000245:    7717     5001               NEGMAX             =        BIT15                                 
051240,000246:    7717     5001               VLOADCOD           =        BIT15                                 
051241,000247:    7717     6056               VLOAD*             =        OCT40001                              
051242,000248:    7717     4105               OCT60000           =        RELTAB11                              
051243,000249:    7717     4364               BANKMASK           =        HI5                                   
051244,000250: 

End of include-file FIXED-FIXED_CONSTANT_POOL.agc.  Parent file is MAIN.agc