Source Code

These source-code files are part of a reconstructed copy of LM131 revision 1, the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 listing.

Comments from 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.

045692,000002:                                                                                                  ## Copyright:   Public domain.
045693,000003:                                                                                                  ## Filename:    FIXED-FIXED_CONSTANT_POOL.agc
045694,000004:                                                                                                  ## Purpose:     A section of LM131 revision 1.
045695,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
045696,000006:                                                                                                  ##              release of the flight software for the Lunar Module's (LM)
045697,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13. The code has
045698,000008:                                                                                                  ##              been reconstructed from a listing of Luminary 131 and a dump
045699,000009:                                                                                                  ##              of a core rope memory module B5, part number 2010802-171,
045700,000010:                                                                                                  ##              which is the only module different between LM131 revision 1
045701,000011:                                                                                                  ##              and Luminary 131. The executable generated from this source
045702,000012:                                                                                                  ##              has been verified against the module dump, so while the names,
045703,000013:                                                                                                  ##              comments, and ordering may not be exactly correct, the
045704,000014:                                                                                                  ##              resulting binary is.
045705,000015:                                                                                                  ## Reference:   pp. 1089-1093
045706,000016:                                                                                                  ## Assembler:   yaYUL
045707,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
045708,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
045709,000019:                                                                                                  ## Mod history: 2022-10-28 MAS  Created from Luminary 131.
045710,000020: 

Page 1089

045712,000022:    4732                                           BLOCK    02                                    
045713,000023:    4732                                           COUNT*   $$/FCONS                              
045714,000024: 
045715,000025:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
045716,000026: 
045717,000027:    4732           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
045718,000028:    4733           37777        POSMAX             OCT      37777                                 
045719,000029: 
045720,000030:    4734     4734               LIMITS             =        NEG1/2                                
045721,000031: 
045722,000032:    4734           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
045723,000033:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
045724,000034: 
045725,000035:                                                                                                  #  BIT TABLE                                     
045726,000036: 
045727,000037:    4735           40000        BIT15              OCT      40000                                 
045728,000038:    4736           20000        BIT14              OCT      20000                                 
045729,000039:    4737           10000        BIT13              OCT      10000                                 
045730,000040:    4740           04000        BIT12              OCT      04000                                 
045731,000041:    4741           02000        BIT11              OCT      02000                                 
045732,000042:    4742           01000        BIT10              OCT      01000                                 
045733,000043:    4743           00400        BIT9               OCT      00400                                 
045734,000044:    4744           00200        BIT8               OCT      00200                                 
045735,000045:    4745           00100        BIT7               OCT      00100                                 
045736,000046:    4746           00040        BIT6               OCT      00040                                 
045737,000047:    4747           00020        BIT5               OCT      00020                                 
045738,000048:    4750           00010        BIT4               OCT      00010                                 
045739,000049:    4751           00004        BIT3               OCT      00004                                 
045740,000050:    4752           00002        BIT2               OCT      00002                                 
045741,000051:    4753           00001        BIT1               OCT      00001                                 
045742,000052: 
045743,000053:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
045744,000054:    4754           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
045745,000055:    4755           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
045746,000056:                                                                                                  #  BIT1          OCT     00001
045747,000057:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
045748,000058:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
045749,000059:                                                                                                  #  R3D1          OCT     4               PINBALL
045750,000060:    4756           00005        FIVE               OCT      5                                     
045751,000061:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
045752,000062:    4757           00007        SEVEN              OCT      7                                     
045753,000063:                                                                                                  #  BIT4          OCT     00010
045754,000064:                                                                                                  #  R2D1          OCT     11              PINBALL
045755,000065:    4760     4320               OCT11              =        R2D1                                  #  P20S
045756,000066:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
045757,000067:    4760           00013        ELEVEN             DEC      11         B-14                       
045758,000068:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
045759,000069:    4761           00015        OCT15              OCT      15                                    
045760,000070:                                                                                                  #  R1D1          OCT     16              PINBALL
045761,000071:    4762           00017        LOW4               OCT      17                                    

Page 1090

045763,000073:                                                                                                  #  BIT5          OCT     00020
045764,000074:                                                                                                  #  ND1           OCT     21              PINBALL
045765,000075:                                                                                                  #  VD1           OCT     23              PINBALL
045766,000076:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
045767,000077:                                                                                                  #  MD1           OCT     25              PINBALL
045768,000078:    4763           00030        BITS4&5            OCT      30                                    
045769,000079:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
045770,000080:    4764           00033        OCT33              OCT      33                                    
045771,000081:    4765     4764               DEC27              =        OCT33                                 
045772,000082:    4765           00035        OCT35              OCT      35                                    
045773,000083:    4766     4765               DEC29              =        OCT35                                 
045774,000084:    4766           00032        CALLCODE           OCT      00032                                 
045775,000085:                                                                                                  #  LOW5          OCT     37              PINBALL
045776,000086:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
045777,000087:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
045778,000088:    4767           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
045779,000089:    4770           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
045780,000090:                                                                                                  #  BIT6          OCT     00040
045781,000091:    4771           00050        OCT50              OCT      50                                    
045782,000092:    4772           00055        DEC45              DEC      45         B-14                       
045783,000093:    4773           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
045784,000094:    4774           00062        .5SEC              DEC      50         B-14                       
045785,000095:                                                                                                  #  BIT7          OCT     00100
045786,000096: 
045787,000097:    4775     4745               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
045788,000098:                                                                                                  #  (LAST 4K OF ROPE)
045789,000099:    4775           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
045790,000100:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
045791,000101:                                                                                                  #  (FIRST 8K OF ACM)
045792,000102:    4776           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
045793,000103:                                                                                                  #  (LAST 8K OF ACM)
045794,000104:    4777           00144        1SEC               DEC      100        B-14                       
045795,000105:                                                                                                  #  LOW7          OCT     177             INTERPRETER
045796,000106:                                                                                                  #  BIT8          OCT     00200
045797,000107:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
045798,000108:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
045799,000109:    5000           00310        2SECS              DEC      200        B-14                       
045800,000110:                                                                                                  #  LOW8          OCT     377             PINBALL
045801,000111:                                                                                                  #  BIT9          OCT     00400
045802,000112:    5001           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
045803,000113:    5002           00454        3SECS              DEC      300        B-14                       
045804,000114:    5003           00620        4SECS              DEC      400        B-14                       
045805,000115:    5004           00777        LOW9               OCT      777                                   
045806,000116:                                                                                                  #  BIT10         OCT     01000
045807,000117:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
045808,000118:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
045809,000119:    5005           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
045810,000120:    5006           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
045811,000121:    5007           01400        OCT1400            OCT      01400                                 
045812,000122:    5010           01426        V06N22             VN       0622                                  

Page 1091

045814,000124:                                                                                                  #  MID5          OCT     1740            PINBALL
045815,000125:    5011           01776        BITS2-10           OCT      1776                                  
045816,000126:    5012           01777        LOW10              OCT      1777                                  
045817,000127:                                                                                                  #  BIT11         OCT     02000
045818,000128:                                                                                                  #  2K+3          OCT     2003            PINBALL
045819,000129:    5013           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
045820,000130:    5014           02400        EBANK5             OCT      02400                                 
045821,000131:    5015           03000        PRIO3              OCT      03000                                 
045822,000132:    5016           03400        EBANK7             OCT      03400                                 
045823,000133:                                                                                                  #  LOW11         OCT     3777            PINBALL
045824,000134:                                                                                                  #  BIT12         OCT     04000
045825,000135:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
045826,000136:    5017           05000        PRIO5              OCT      05000                                 
045827,000137:    5020           06000        PRIO6              OCT      06000                                 
045828,000138:    5021           07000        PRIO7              OCT      07000                                 
045829,000139: 
045830,000140:                                                                                                  #  BIT13         OCT     10000
045831,000141:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
045832,000142:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
045833,000143:    5022           11000        PRIO11             OCT      11000                                 
045834,000144:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
045835,000145:    5023           13000        PRIO13             OCT      13000                                 
045836,000146:    5024           14000        PRIO14             OCT      14000                                 
045837,000147:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
045838,000148:    5025           15000        PRIO15             OCT      15000                                 
045839,000149:    5026           16000        PRIO16             OCT      16000                                 
045840,000150:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
045841,000151:    5027           17000        PRIO17             OCT      17000                                 
045842,000152:    5030           17770        OCT17770           OCT      17770                                 
045843,000153:                                                                                                  #  BIT14         OCT     20000
045844,000154:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
045845,000155:    5031           21000        PRIO21             OCT      21000                                 
045846,000156: 
045847,000157:    7713                                           BLOCK    03                                    
045848,000158:    7713                                           COUNT*   $$/FCONS                              
045849,000159: 
045850,000160:    7713           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
045851,000161:    7714           23000        PRIO23             OCT      23000                                 
045852,000162:    7715           24000        PRIO24             OCT      24000                                 
045853,000163:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
045854,000164:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
045855,000165:    7716           25000        PRIO25             OCT      25000                                 
045856,000166:    7717           26000        PRIO26             OCT      26000                                 
045857,000167:    7720           27000        PRIO27             OCT      27000                                 
045858,000168:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
045859,000169:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
045860,000170:    7721           31000        PRIO31             OCT      31000                                 
045861,000171:    7722           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
045862,000172:    7723           32000        PRIO32             OCT      32000                                 
045863,000173:    7724           33000        PRIO33             OCT      33000                                 
045864,000174:    7725           34000        PRIO34             OCT      34000                                 
045865,000175:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              

Page 1092

045867,000177:    7726           35000        PRIO35             OCT      35000                                 
045868,000178:    7727           36000        PRIO36             OCT      36000                                 
045869,000179:    7730           37000        PRIO37             OCT      37000                                 
045870,000180:    7731           37401        63/64+1            OCT      37401                                 
045871,000181:                                                                                                  #  MID7          OCT     37600           PINBALL
045872,000182:    7732           37766        OCT37766           OCT      37766                                 
045873,000183:    7733           37774        OCT37774           OCT      37774                                 
045874,000184:    7734           37776        OCT37776           OCT      37776                                 
045875,000185:                                                                                                  #  DPOSMAX       OCT     37777
045876,000186:                                                                                                  #  BIT15         OCT     40000
045877,000187:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
045878,000188:    7735           40014        DLOADCOD           OCT      40014                                 
045879,000189:    7736           40015        DLOAD*             OCT      40015                                 
045880,000190:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
045881,000191:    7737           40040        BIT15+6            OCT      40040                                 
045882,000192:    7740           40200        OCT40200           OCT      40200                                 
045883,000193:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
045884,000194:                                                                                                  #                OCT     50037           T4RUPT  RELTAB +9D
045885,000195:                                                                                                  #                OCT     54000           T4RUPT  RELTAB +10D
045886,000196:    7741           57777        -BIT14             OCT      57777                                 
045887,000197:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
045888,000198:    7742           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
045889,000199:    7743           70000        13,14,15           OCT      70000                                 
045890,000200:    7744           73777        -1/8               OCT      73777                                 
045891,000201:    7745           74000        HIGH4              OCT      74000                                 
045892,000202:    7746           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
045893,000203:                                                                                                  #  HI5           OCT     76000           PINBALL
045894,000204:    7747           77700        HIGH9              OCT      77700                                 
045895,000205:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
045896,000206:                                                                                                  #  -OCT10        OCT     -10                                      (OCT 77767)
045897,000207:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
045898,000208:    7750           77774        NEG3               DEC      -3         B-14                       
045899,000209:    7751           77775        NEG2               OCT      77775                                 
045900,000210:    7752           77776        NEGONE             DEC      -1         B-14                       
045901,000211: 

Page 1093

045903,000213: 
045904,000214:                                                                                                  #  DEFINED BY EQUALS
045905,000215: 
045906,000216:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
045907,000217:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
045908,000218: 
045909,000219:    7753     7752               MINUS1             =        NEG1                                  
045910,000220:    7753     7752               NEG1               =        NEGONE                                
045911,000221:    7753     4753               ONE                =        BIT1                                  
045912,000222:    7753     4752               TWO                =        BIT2                                  
045913,000223:    7753     6250               THREE              =        OCTAL3                                
045914,000224:    7753     6250               LOW2               =        THREE                                 
045915,000225:    7753     4751               FOUR               =        BIT3                                  
045916,000226:    7753     6245               SIX                =        REVCNT                                
045917,000227:    7753     4757               LOW3               =        SEVEN                                 
045918,000228:    7753     4750               EIGHT              =        BIT4                                  
045919,000229:    7753     4320               NINE               =        R2D1                                  
045920,000230:    7753     4363               TEN                =        BINCON                                
045921,000231:    7753     4760               NOUTCON            =        ELEVEN                                
045922,000232:    7753     4360               OCT23              =        VD1                                   
045923,000233:    7753     4362               OCT25              =        MD1                                   
045924,000234:    7753     4742               PRIO1              =        BIT10                                 
045925,000235:    7753     5007               EBANK3             =        OCT1400                               
045926,000236:    7753     4741               PRIO2              =        BIT11                                 
045927,000237:    7753     4775               OCT120             =        SUPER101                              
045928,000238:    7753     4776               OCT140             =        SUPER110                              
045929,000239:    7753     4741               2K                 =        BIT11                                 
045930,000240:    7753     4741               EBANK4             =        BIT11                                 
045931,000241:    7753     4740               PRIO4              =        BIT12                                 
045932,000242:    7753     5015               EBANK6             =        PRIO3                                 
045933,000243:    7753     4737               QUARTER            =        BIT13                                 
045934,000244:    7753     4737               PRIO10             =        BIT13                                 
045935,000245:    7753     7666               OCT10001           =        CCSL                                  
045936,000246:    7753     4736               POS1/2             =        HALF                                  
045937,000247:    7753     4736               PRIO20             =        BIT14                                 
045938,000248:    7753     4736               HALF               =        BIT14                                 
045939,000249:    7753     4355               PRIO30             =        CHRPRIO                               
045940,000250:    7753     4355               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
045941,000251:    7753     6474               OCT30002           =        TLOAD      +1                         
045942,000252:    7753     7725               B12T14             =        PRIO34                                
045943,000253:    7753     4735               NEGMAX             =        BIT15                                 
045944,000254:    7753     4735               VLOADCOD           =        BIT15                                 
045945,000255:    7753     6112               VLOAD*             =        OCT40001                              
045946,000256:    7753     4101               OCT60000           =        RELTAB11                              
045947,000257:    7753     4350               BANKMASK           =        HI5                                   
045948,000258: 

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