Source Code

These source-code files are part of a reconstructed copy of Comanche 67, the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 12.

They have been adapted from sources files for Comanche 55, and updated via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-1081, 2003972-1091, 2003972-1111, 2003972-1121, 2003972-1131, and 2003972-1141.

Since only binary dumps (rather than listings) of Comanche 67 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

049821,000002:                                                                                                  ## Copyright:   Public domain.
049822,000003:                                                                                                  ## Filename:    FIXED-FIXED_CONSTANT_POOL.agc
049823,000004:                                                                                                  ## Purpose:     A section of Comanche revision 067.
049824,000005:                                                                                                  ##              It is part of the reconstructed source code for the flight
049825,000006:                                                                                                  ##              software for the Command Module's (CM) Apollo Guidance Computer
049826,000007:                                                                                                  ##              (AGC) for Apollo 12. No original listings of this program are
049827,000008:                                                                                                  ##              available; instead, this file was created via dissassembly of
049828,000009:                                                                                                  ##              dumps of Comanche 067 core rope modules and comparison with
049829,000010:                                                                                                  ##              other AGC programs.
049830,000011:                                                                                                  ## Assembler:   yaYUL
049831,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
049832,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
049833,000014:                                                                                                  ## Mod history: 2023-08-16 MAS  Created from Comanche 055.
049834,000015: 
049835,000016:    5012                                           BLOCK    02                                    
049836,000017:    5012                                           COUNT    02/FCONS                              
049837,000018: 
049838,000019:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
049839,000020: 
049840,000021:    5012           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
049841,000022:    5013           37777        POSMAX             OCT      37777                                 
049842,000023: 
049843,000024:    5014     5014               LIMITS             =        NEG1/2                                
049844,000025: 
049845,000026:    5014           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
049846,000027:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
049847,000028: 
049848,000029:                                                                                                  #  BIT TABLE                                     
049849,000030: 
049850,000031:    5015           40000        BIT15              OCT      40000                                 
049851,000032:    5016           20000        BIT14              OCT      20000                                 
049852,000033:    5017           10000        BIT13              OCT      10000                                 
049853,000034:    5020           04000        BIT12              OCT      04000                                 
049854,000035:    5021           02000        BIT11              OCT      02000                                 
049855,000036:    5022           01000        BIT10              OCT      01000                                 
049856,000037:    5023           00400        BIT9               OCT      00400                                 
049857,000038:    5024           00200        BIT8               OCT      00200                                 
049858,000039:    5025           00100        BIT7               OCT      00100                                 
049859,000040:    5026           00040        BIT6               OCT      00040                                 
049860,000041:    5027           00020        BIT5               OCT      00020                                 
049861,000042:    5030           00010        BIT4               OCT      00010                                 
049862,000043:    5031           00004        BIT3               OCT      00004                                 
049863,000044:    5032           00002        BIT2               OCT      00002                                 
049864,000045:    5033           00001        BIT1               OCT      00001                                 
049865,000046: 
049866,000047:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
049867,000048:    5034           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
049868,000049:    5035           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
049869,000050:                                                                                                  #  BIT1          OCT     00001
049870,000051:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
049871,000052:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
049872,000053:                                                                                                  #  R3D1          OCT     4               PINBALL
049873,000054:    5036           00005        FIVE               OCT      5                                     
049874,000055:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
049875,000056:    5037           00007        SEVEN              OCT      7                                     
049876,000057:                                                                                                  #  BIT4          OCT     00010
049877,000058:                                                                                                  #  R2D1          OCT     11              PINBALL
049878,000059:    5040     4334               OCT11              =        R2D1                                  #  P20S
049879,000060:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
049880,000061:    5040           00013        ELEVEN             DEC      11         B-14                       
049881,000062:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
049882,000063:    5041           00015        OCT15              OCT      15                                    
049883,000064:                                                                                                  #  R1D1          OCT     16              PINBALL
049884,000065:    5042           00017        LOW4               OCT      17                                    
049885,000066:                                                                                                  #  BIT5          OCT     00020
049886,000067:                                                                                                  #  ND1           OCT     21              PINBALL
049887,000068:                                                                                                  #  VD1           OCT     23              PINBALL
049888,000069:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
049889,000070:                                                                                                  #  MD1           OCT     25              PINBALL
049890,000071:    5043           00030        BITS4&5            OCT      30                                    
049891,000072:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
049892,000073:    5044           00032        CALLCODE           OCT      00032                                 
049893,000074:                                                                                                  #  LOW5          OCT     37              PINBALL
049894,000075:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
049895,000076:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
049896,000077:    5045           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
049897,000078:    5046           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
049898,000079:                                                                                                  #  BIT6          OCT     00040
049899,000080:    5047           00050        OCT50              OCT      50                                    
049900,000081:    5050           00055        DEC45              DEC      45         B-14                       
049901,000082:    5051           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
049902,000083:    5052           00062        .5SEC              DEC      50         B-14                       
049903,000084:                                                                                                  #  BIT7          OCT     00100
049904,000085: 
049905,000086:    5053     5025               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
049906,000087:                                                                                                  #  (LAST 4K OF ROPE)
049907,000088:    5053           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
049908,000089:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
049909,000090:                                                                                                  #  (FIRST 8K OF ACM)
049910,000091:    5054           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
049911,000092:                                                                                                  #  (LAST 8K OF ACM)
049912,000093:    5055           00144        1SEC               DEC      100        B-14                       
049913,000094:                                                                                                  #  LOW7          OCT     177             INTERPRETER
049914,000095:                                                                                                  #  BIT8          OCT     00200
049915,000096:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
049916,000097:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
049917,000098:    5056           00310        2SECS              DEC      200        B-14                       
049918,000099:                                                                                                  #  LOW8          OCT     377             PINBALL
049919,000100:                                                                                                  #  BIT9          OCT     00400
049920,000101:    5057           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
049921,000102:    5060           00454        3SECS              DEC      300        B-14                       
049922,000103:    5061           00620        4SECS              DEC      400        B-14                       
049923,000104:    5062           00777        LOW9               OCT      777                                   
049924,000105:                                                                                                  #  BIT10         OCT     01000
049925,000106:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
049926,000107:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
049927,000108:    5063           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
049928,000109:    5064           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
049929,000110:    5065           01400        OCT1400            OCT      01400                                 
049930,000111:    5066           01426        V06N22             VN       0622                                  
049931,000112:                                                                                                  #  MID5          OCT     1740            PINBALL
049932,000113:    5067           01776        BITS2-10           OCT      1776                                  
049933,000114:    5070           01777        LOW10              OCT      1777                                  
049934,000115:                                                                                                  #  BIT11         OCT     02000
049935,000116:                                                                                                  #  2K+3          OCT     2003            PINBALL
049936,000117:    5071           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
049937,000118:    5072           02400        EBANK5             OCT      02400                                 
049938,000119:    5073           03000        PRIO3              OCT      03000                                 
049939,000120:    5074           03400        EBANK7             OCT      03400                                 
049940,000121:                                                                                                  #  LOW11         OCT     3777            PINBALL
049941,000122:                                                                                                  #  BIT12         OCT     04000
049942,000123:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
049943,000124:    5075           05000        PRIO5              OCT      05000                                 
049944,000125:    5076           06000        PRIO6              OCT      06000                                 
049945,000126:    5077           07000        PRIO7              OCT      07000                                 
049946,000127: 
049947,000128:                                                                                                  #  BIT13         OCT     10000
049948,000129:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
049949,000130:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
049950,000131:    5100           11000        PRIO11             OCT      11000                                 
049951,000132:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
049952,000133:    5101           13000        PRIO13             OCT      13000                                 
049953,000134:    5102           14000        PRIO14             OCT      14000                                 
049954,000135:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
049955,000136:    5103           15000        PRIO15             OCT      15000                                 
049956,000137:    5104           16000        PRIO16             OCT      16000                                 
049957,000138:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
049958,000139:    5105           17000        PRIO17             OCT      17000                                 
049959,000140:    5106           17770        OCT17770           OCT      17770                                 
049960,000141:                                                                                                  #  BIT14         OCT     20000
049961,000142:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
049962,000143:    5107           21000        PRIO21             OCT      21000                                 
049963,000144:    7657                                           BLOCK    03                                    
049964,000145:    7657                                           COUNT    03/FCONS                              
049965,000146: 
049966,000147:    7657           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
049967,000148:    7660           23000        PRIO23             OCT      23000                                 
049968,000149:    7661           24000        PRIO24             OCT      24000                                 
049969,000150:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
049970,000151:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
049971,000152:    7662           25000        PRIO25             OCT      25000                                 
049972,000153:    7663           26000        PRIO26             OCT      26000                                 
049973,000154:    7664           27000        PRIO27             OCT      27000                                 
049974,000155:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
049975,000156:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
049976,000157:    7665           31000        PRIO31             OCT      31000                                 
049977,000158:    7666           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
049978,000159:    7667           32000        PRIO32             OCT      32000                                 
049979,000160:    7670           33000        PRIO33             OCT      33000                                 
049980,000161:    7671           34000        PRIO34             OCT      34000                                 
049981,000162:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              
049982,000163:    7672           35000        PRIO35             OCT      35000                                 
049983,000164:    7673           36000        PRIO36             OCT      36000                                 
049984,000165:    7674           37000        PRIO37             OCT      37000                                 
049985,000166:    7675           37401        63/64+1            OCT      37401                                 
049986,000167:                                                                                                  #  MID7          OCT     37600           PINBALL
049987,000168:    7676           37766        OCT37766           OCT      37766                                 
049988,000169:    7677           37774        OCT37774           OCT      37774                                 
049989,000170:    7700           37776        OCT37776           OCT      37776                                 
049990,000171:                                                                                                  #  DPOSMAX       OCT     37777
049991,000172:                                                                                                  #  BIT15         OCT     40000
049992,000173:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
049993,000174:    7701           40014        DLOADCOD           OCT      40014                                 
049994,000175:    7702           40015        DLOAD*             OCT      40015                                 
049995,000176:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
049996,000177:    7703           40040        BIT15+6            OCT      40040                                 
049997,000178:    7704           40200        OCT40200           OCT      40200                                 
049998,000179:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
049999,000180:                                                                                                  #                OCT     50037           T4RUPT  RELTAB +9D
050000,000181:                                                                                                  #                OCT     54000           T4RUPT  RELTAB +10D
050001,000182:    7705           57777        -BIT14             OCT      57777                                 
050002,000183:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
050003,000184:    7706           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
050004,000185:    7707           70000        13,14,15           OCT      70000                                 
050005,000186:    7710           73777        -1/8               OCT      73777                                 
050006,000187:    7711           74000        HIGH4              OCT      74000                                 
050007,000188:    7712           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
050008,000189:                                                                                                  #  HI5           OCT     76000           PINBALL
050009,000190:    7713           77700        HIGH9              OCT      77700                                 
050010,000191:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
050011,000192:                                                                                                  #  -OCT10        OCT     -10                                      (OCT 77767)
050012,000193:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
050013,000194:    7714           77774        NEG3               DEC      -3         B-14                       
050014,000195:    7715           77775        NEG2               OCT      77775                                 
050015,000196:    7716           77776        NEGONE             DEC      -1         B-14                       
050016,000197: 
050017,000198: 
050018,000199:                                                                                                  #  DEFINED BY EQUALS
050019,000200: 
050020,000201:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
050021,000202:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
050022,000203: 
050023,000204:    7717     7716               MINUS1             =        NEG1                                  
050024,000205:    7717     7716               NEG1               =        NEGONE                                
050025,000206:    7717     5033               ONE                =        BIT1                                  
050026,000207:    7717     5032               TWO                =        BIT2                                  
050027,000208:    7717     6214               THREE              =        OCTAL3                                
050028,000209:    7717     6214               LOW2               =        THREE                                 
050029,000210:    7717     5031               FOUR               =        BIT3                                  
050030,000211:    7717     6211               SIX                =        REVCNT                                
050031,000212:    7717     5037               LOW3               =        SEVEN                                 
050032,000213:    7717     5030               EIGHT              =        BIT4                                  
050033,000214:    7717     4334               NINE               =        R2D1                                  
050034,000215:    7717     4377               TEN                =        BINCON                                
050035,000216:    7717     5040               NOUTCON            =        ELEVEN                                
050036,000217:    7717     4374               OCT23              =        VD1                                   
050037,000218:    7717     4376               OCT25              =        MD1                                   
050038,000219:    7717     5022               PRIO1              =        BIT10                                 
050039,000220:    7717     5065               EBANK3             =        OCT1400                               
050040,000221:    7717     5021               PRIO2              =        BIT11                                 
050041,000222:    7717     5053               OCT120             =        SUPER101                              
050042,000223:    7717     5054               OCT140             =        SUPER110                              
050043,000224:    7717     5021               2K                 =        BIT11                                 
050044,000225:    7717     5021               EBANK4             =        BIT11                                 
050045,000226:    7717     5020               PRIO4              =        BIT12                                 
050046,000227:    7717     5073               EBANK6             =        PRIO3                                 
050047,000228:    7717     5017               QUARTER            =        BIT13                                 
050048,000229:    7717     5017               PRIO10             =        BIT13                                 
050049,000230:    7717     7632               OCT10001           =        CCSL                                  
050050,000231:    7717     5016               POS1/2             =        HALF                                  
050051,000232:    7717     5016               PRIO20             =        BIT14                                 
050052,000233:    7717     5016               HALF               =        BIT14                                 
050053,000234:    7717     4371               PRIO30             =        CHRPRIO                               
050054,000235:    7717     4371               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
050055,000236:    7717     6440               OCT30002           =        TLOAD      +1                         
050056,000237:    7717     7671               B12T14             =        PRIO34                                
050057,000238:    7717     5015               NEGMAX             =        BIT15                                 
050058,000239:    7717     5015               VLOADCOD           =        BIT15                                 
050059,000240:    7717     6056               VLOAD*             =        OCT40001                              
050060,000241:    7717     4105               OCT60000           =        RELTAB11                              
050061,000242:    7717     4364               BANKMASK           =        HI5                                   
050062,000243: 

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