Source Code

These source-code files are part of a reconstructed copy of Comanche 72/3 (AKA Manche72 revision 3), the final, flown mission release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

The starting point was the source code of Comanche 72 (itself previously reconstructed). Comanche 72 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 72 and 72/3. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72/3 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.

050136,000002:                                                                                                  ## Copyright:   Public domain.
050137,000003:                                                                                                  ## Filename:    FIXED-FIXED_CONSTANT_POOL.agc
050138,000004:                                                                                                  ## Purpose:     A section of Manche72 revision 3.
050139,000005:                                                                                                  ##              It is part of the reconstructed source code for the final, flown
050140,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
050141,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
050142,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
050143,000009:                                                                                                  ##              from a reconstructed copy of Comanche 072. It has been adapted
050144,000010:                                                                                                  ##              such that the resulting bugger words exactly match those
050145,000011:                                                                                                  ##              specified for Manche72 revision 3 in NASA drawing 2021153G,
050146,000012:                                                                                                  ##              which gives relatively high confidence that the reconstruction
050147,000013:                                                                                                  ##              is correct.
050148,000014:                                                                                                  ## Assembler:   yaYUL
050149,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
050150,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
050151,000017:                                                                                                  ## Mod history: 2024-05-19 MAS  Created from Comanche 072.
050152,000018: 
050153,000019:    5012                                           BLOCK    02                                    
050154,000020:    5012                                           COUNT    02/FCONS                              
050155,000021: 
050156,000022:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
050157,000023: 
050158,000024:    5012           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
050159,000025:    5013           37777        POSMAX             OCT      37777                                 
050160,000026: 
050161,000027:    5014     5014               LIMITS             =        NEG1/2                                
050162,000028: 
050163,000029:    5014           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
050164,000030:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
050165,000031: 
050166,000032:                                                                                                  #  BIT TABLE                                     
050167,000033: 
050168,000034:    5015           40000        BIT15              OCT      40000                                 
050169,000035:    5016           20000        BIT14              OCT      20000                                 
050170,000036:    5017           10000        BIT13              OCT      10000                                 
050171,000037:    5020           04000        BIT12              OCT      04000                                 
050172,000038:    5021           02000        BIT11              OCT      02000                                 
050173,000039:    5022           01000        BIT10              OCT      01000                                 
050174,000040:    5023           00400        BIT9               OCT      00400                                 
050175,000041:    5024           00200        BIT8               OCT      00200                                 
050176,000042:    5025           00100        BIT7               OCT      00100                                 
050177,000043:    5026           00040        BIT6               OCT      00040                                 
050178,000044:    5027           00020        BIT5               OCT      00020                                 
050179,000045:    5030           00010        BIT4               OCT      00010                                 
050180,000046:    5031           00004        BIT3               OCT      00004                                 
050181,000047:    5032           00002        BIT2               OCT      00002                                 
050182,000048:    5033           00001        BIT1               OCT      00001                                 
050183,000049: 
050184,000050:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
050185,000051:    5034           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
050186,000052:    5035           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
050187,000053:                                                                                                  #  BIT1          OCT     00001
050188,000054:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
050189,000055:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
050190,000056:                                                                                                  #  R3D1          OCT     4               PINBALL
050191,000057:    5036           00005        FIVE               OCT      5                                     
050192,000058:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
050193,000059:    5037           00007        SEVEN              OCT      7                                     
050194,000060:                                                                                                  #  BIT4          OCT     00010
050195,000061:                                                                                                  #  R2D1          OCT     11              PINBALL
050196,000062:    5040     4334               OCT11              =        R2D1                                  #  P20S
050197,000063:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
050198,000064:    5040           00013        ELEVEN             DEC      11         B-14                       
050199,000065:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
050200,000066:    5041           00015        OCT15              OCT      15                                    
050201,000067:                                                                                                  #  R1D1          OCT     16              PINBALL
050202,000068:    5042           00017        LOW4               OCT      17                                    
050203,000069:                                                                                                  #  BIT5          OCT     00020
050204,000070:                                                                                                  #  ND1           OCT     21              PINBALL
050205,000071:                                                                                                  #  VD1           OCT     23              PINBALL
050206,000072:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
050207,000073:                                                                                                  #  MD1           OCT     25              PINBALL
050208,000074:    5043           00030        BITS4&5            OCT      30                                    
050209,000075:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
050210,000076:    5044           00032        CALLCODE           OCT      00032                                 
050211,000077:                                                                                                  #  LOW5          OCT     37              PINBALL
050212,000078:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
050213,000079:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
050214,000080:    5045           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
050215,000081:    5046           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
050216,000082:                                                                                                  #  BIT6          OCT     00040
050217,000083:    5047           00050        OCT50              OCT      50                                    
050218,000084:    5050           00055        DEC45              DEC      45         B-14                       
050219,000085:    5051           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
050220,000086:    5052           00062        .5SEC              DEC      50         B-14                       
050221,000087:                                                                                                  #  BIT7          OCT     00100
050222,000088: 
050223,000089:    5053     5025               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
050224,000090:                                                                                                  #  (LAST 4K OF ROPE)
050225,000091:    5053           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
050226,000092:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
050227,000093:                                                                                                  #  (FIRST 8K OF ACM)
050228,000094:    5054           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
050229,000095:                                                                                                  #  (LAST 8K OF ACM)
050230,000096:    5055           00144        1SEC               DEC      100        B-14                       
050231,000097:                                                                                                  #  LOW7          OCT     177             INTERPRETER
050232,000098:                                                                                                  #  BIT8          OCT     00200
050233,000099:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
050234,000100:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
050235,000101:    5056           00310        2SECS              DEC      200        B-14                       
050236,000102:                                                                                                  #  LOW8          OCT     377             PINBALL
050237,000103:                                                                                                  #  BIT9          OCT     00400
050238,000104:    5057           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
050239,000105:    5060           00454        3SECS              DEC      300        B-14                       
050240,000106:    5061           00620        4SECS              DEC      400        B-14                       
050241,000107:    5062           00777        LOW9               OCT      777                                   
050242,000108:                                                                                                  #  BIT10         OCT     01000
050243,000109:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
050244,000110:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
050245,000111:    5063           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
050246,000112:    5064           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
050247,000113:    5065           01400        OCT1400            OCT      01400                                 
050248,000114:    5066           01426        V06N22             VN       0622                                  
050249,000115:                                                                                                  #  MID5          OCT     1740            PINBALL
050250,000116:    5067           01776        BITS2-10           OCT      1776                                  
050251,000117:    5070           01777        LOW10              OCT      1777                                  
050252,000118:                                                                                                  #  BIT11         OCT     02000
050253,000119:                                                                                                  #  2K+3          OCT     2003            PINBALL
050254,000120:    5071           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
050255,000121:    5072           02400        EBANK5             OCT      02400                                 
050256,000122:    5073           03000        PRIO3              OCT      03000                                 
050257,000123:    5074           03400        EBANK7             OCT      03400                                 
050258,000124:                                                                                                  #  LOW11         OCT     3777            PINBALL
050259,000125:                                                                                                  #  BIT12         OCT     04000
050260,000126:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
050261,000127:    5075           05000        PRIO5              OCT      05000                                 
050262,000128:    5076           06000        PRIO6              OCT      06000                                 
050263,000129:    5077           07000        PRIO7              OCT      07000                                 
050264,000130: 
050265,000131:                                                                                                  #  BIT13         OCT     10000
050266,000132:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
050267,000133:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
050268,000134:    5100           11000        PRIO11             OCT      11000                                 
050269,000135:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
050270,000136:    5101           13000        PRIO13             OCT      13000                                 
050271,000137:    5102           14000        PRIO14             OCT      14000                                 
050272,000138:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
050273,000139:    5103           15000        PRIO15             OCT      15000                                 
050274,000140:    5104           16000        PRIO16             OCT      16000                                 
050275,000141:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
050276,000142:    5105           17000        PRIO17             OCT      17000                                 
050277,000143:    5106           17770        OCT17770           OCT      17770                                 
050278,000144:                                                                                                  #  BIT14         OCT     20000
050279,000145:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
050280,000146:    5107           21000        PRIO21             OCT      21000                                 
050281,000147:    7657                                           BLOCK    03                                    
050282,000148:    7657                                           COUNT    03/FCONS                              
050283,000149: 
050284,000150:    7657           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
050285,000151:    7660           23000        PRIO23             OCT      23000                                 
050286,000152:    7661           24000        PRIO24             OCT      24000                                 
050287,000153:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
050288,000154:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
050289,000155:    7662           25000        PRIO25             OCT      25000                                 
050290,000156:    7663           26000        PRIO26             OCT      26000                                 
050291,000157:    7664           27000        PRIO27             OCT      27000                                 
050292,000158:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
050293,000159:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
050294,000160:    7665           31000        PRIO31             OCT      31000                                 
050295,000161:    7666           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
050296,000162:    7667           32000        PRIO32             OCT      32000                                 
050297,000163:    7670           33000        PRIO33             OCT      33000                                 
050298,000164:    7671           34000        PRIO34             OCT      34000                                 
050299,000165:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              
050300,000166:    7672           35000        PRIO35             OCT      35000                                 
050301,000167:    7673           36000        PRIO36             OCT      36000                                 
050302,000168:    7674           37000        PRIO37             OCT      37000                                 
050303,000169:    7675           37401        63/64+1            OCT      37401                                 
050304,000170:                                                                                                  #  MID7          OCT     37600           PINBALL
050305,000171:    7676           37766        OCT37766           OCT      37766                                 
050306,000172:    7677           37774        OCT37774           OCT      37774                                 
050307,000173:    7700           37776        OCT37776           OCT      37776                                 
050308,000174:                                                                                                  #  DPOSMAX       OCT     37777
050309,000175:                                                                                                  #  BIT15         OCT     40000
050310,000176:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
050311,000177:    7701           40014        DLOADCOD           OCT      40014                                 
050312,000178:    7702           40015        DLOAD*             OCT      40015                                 
050313,000179:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
050314,000180:    7703           40040        BIT15+6            OCT      40040                                 
050315,000181:    7704           40200        OCT40200           OCT      40200                                 
050316,000182:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
050317,000183:                                                                                                  #                OCT     50037           T4RUPT  RELTAB +9D
050318,000184:                                                                                                  #                OCT     54000           T4RUPT  RELTAB +10D
050319,000185:    7705           57777        -BIT14             OCT      57777                                 
050320,000186:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
050321,000187:    7706           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
050322,000188:    7707           70000        13,14,15           OCT      70000                                 
050323,000189:    7710           73777        -1/8               OCT      73777                                 
050324,000190:    7711           74000        HIGH4              OCT      74000                                 
050325,000191:    7712           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
050326,000192:                                                                                                  #  HI5           OCT     76000           PINBALL
050327,000193:    7713           77700        HIGH9              OCT      77700                                 
050328,000194:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
050329,000195:                                                                                                  #  -OCT10        OCT     -10                                      (OCT 77767)
050330,000196:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
050331,000197:    7714           77774        NEG3               DEC      -3         B-14                       
050332,000198:    7715           77775        NEG2               OCT      77775                                 
050333,000199:    7716           77776        NEGONE             DEC      -1         B-14                       
050334,000200: 
050335,000201: 
050336,000202:                                                                                                  #  DEFINED BY EQUALS
050337,000203: 
050338,000204:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
050339,000205:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
050340,000206: 
050341,000207:    7717     7716               MINUS1             =        NEG1                                  
050342,000208:    7717     7716               NEG1               =        NEGONE                                
050343,000209:    7717     5033               ONE                =        BIT1                                  
050344,000210:    7717     5032               TWO                =        BIT2                                  
050345,000211:    7717     6214               THREE              =        OCTAL3                                
050346,000212:    7717     6214               LOW2               =        THREE                                 
050347,000213:    7717     5031               FOUR               =        BIT3                                  
050348,000214:    7717     6211               SIX                =        REVCNT                                
050349,000215:    7717     5037               LOW3               =        SEVEN                                 
050350,000216:    7717     5030               EIGHT              =        BIT4                                  
050351,000217:    7717     4334               NINE               =        R2D1                                  
050352,000218:    7717     4377               TEN                =        BINCON                                
050353,000219:    7717     5040               NOUTCON            =        ELEVEN                                
050354,000220:    7717     4374               OCT23              =        VD1                                   
050355,000221:    7717     4376               OCT25              =        MD1                                   
050356,000222:    7717     5022               PRIO1              =        BIT10                                 
050357,000223:    7717     5065               EBANK3             =        OCT1400                               
050358,000224:    7717     5021               PRIO2              =        BIT11                                 
050359,000225:    7717     5053               OCT120             =        SUPER101                              
050360,000226:    7717     5054               OCT140             =        SUPER110                              
050361,000227:    7717     5021               2K                 =        BIT11                                 
050362,000228:    7717     5021               EBANK4             =        BIT11                                 
050363,000229:    7717     5020               PRIO4              =        BIT12                                 
050364,000230:    7717     5073               EBANK6             =        PRIO3                                 
050365,000231:    7717     5017               QUARTER            =        BIT13                                 
050366,000232:    7717     5017               PRIO10             =        BIT13                                 
050367,000233:    7717     7632               OCT10001           =        CCSL                                  
050368,000234:    7717     5016               POS1/2             =        HALF                                  
050369,000235:    7717     5016               PRIO20             =        BIT14                                 
050370,000236:    7717     5016               HALF               =        BIT14                                 
050371,000237:    7717     4371               PRIO30             =        CHRPRIO                               
050372,000238:    7717     4371               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
050373,000239:    7717     6440               OCT30002           =        TLOAD      +1                         
050374,000240:    7717     7671               B12T14             =        PRIO34                                
050375,000241:    7717     5015               NEGMAX             =        BIT15                                 
050376,000242:    7717     5015               VLOADCOD           =        BIT15                                 
050377,000243:    7717     6056               VLOAD*             =        OCT40001                              
050378,000244:    7717     4105               OCT60000           =        RELTAB11                              
050379,000245:    7717     4364               BANKMASK           =        HI5                                   
050380,000246: 

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