Source Code

These source-code files are part of a reconstructed copy of Luminary 69/2, the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation.

Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
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.

046927,000002:                                                                                                  ## Copyright:   Public domain.
046928,000003:                                                                                                  ## Filename:    FIXED-FIXED_CONSTANT_POOL.agc
046929,000004:                                                                                                  ## Purpose:     A section of LUM69 revision 2.
046930,000005:                                                                                                  ##              It is part of the reconstructed source code for the flown
046931,000006:                                                                                                  ##              version of the flight software for the Lunar Module's (LM)
046932,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 10. The code has
046933,000008:                                                                                                  ##              been recreated from a copy of Luminary revsion 069, using
046934,000009:                                                                                                  ##              changes present in Luminary 099 which were described in
046935,000010:                                                                                                  ##              Luminary memos 75 and 78. The code has been adapted such
046936,000011:                                                                                                  ##              that the resulting bugger words exactly match those specified
046937,000012:                                                                                                  ##              for LUM69 revision 2 in NASA drawing 2021152B, which gives
046938,000013:                                                                                                  ##              relatively high confidence that the reconstruction is correct.
046939,000014:                                                                                                  ## Reference:   pp. 1090-1094
046940,000015:                                                                                                  ## Assembler:   yaYUL
046941,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046942,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046943,000018:                                                                                                  ## Mod history: 2019-07-27 MAS  Created from Luminary 69.
046944,000019: 

Page 1090

046946,000021:    4732                                           BLOCK    02                                    
046947,000022:    4732                                           COUNT*   $$/FCONS                              
046948,000023: 
046949,000024:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
046950,000025: 
046951,000026:    4732           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
046952,000027:    4733           37777        POSMAX             OCT      37777                                 
046953,000028: 
046954,000029:    4734     4734               LIMITS             =        NEG1/2                                
046955,000030: 
046956,000031:    4734           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
046957,000032:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
046958,000033: 
046959,000034:                                                                                                  #  BIT TABLE                                     
046960,000035: 
046961,000036:    4735           40000        BIT15              OCT      40000                                 
046962,000037:    4736           20000        BIT14              OCT      20000                                 
046963,000038:    4737           10000        BIT13              OCT      10000                                 
046964,000039:    4740           04000        BIT12              OCT      04000                                 
046965,000040:    4741           02000        BIT11              OCT      02000                                 
046966,000041:    4742           01000        BIT10              OCT      01000                                 
046967,000042:    4743           00400        BIT9               OCT      00400                                 
046968,000043:    4744           00200        BIT8               OCT      00200                                 
046969,000044:    4745           00100        BIT7               OCT      00100                                 
046970,000045:    4746           00040        BIT6               OCT      00040                                 
046971,000046:    4747           00020        BIT5               OCT      00020                                 
046972,000047:    4750           00010        BIT4               OCT      00010                                 
046973,000048:    4751           00004        BIT3               OCT      00004                                 
046974,000049:    4752           00002        BIT2               OCT      00002                                 
046975,000050:    4753           00001        BIT1               OCT      00001                                 
046976,000051: 
046977,000052:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
046978,000053:    4754           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
046979,000054:    4755           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
046980,000055:                                                                                                  #  BIT1          OCT     00001
046981,000056:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
046982,000057:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
046983,000058:                                                                                                  #  R3D1          OCT     4               PINBALL
046984,000059:    4756           00005        FIVE               OCT      5                                     
046985,000060:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
046986,000061:    4757           00007        SEVEN              OCT      7                                     
046987,000062:                                                                                                  #  BIT4          OCT     00010
046988,000063:                                                                                                  #  R2D1          OCT     11              PINBALL
046989,000064:    4760     4320               OCT11              =        R2D1                                  #  P20S
046990,000065:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
046991,000066:    4760           00013        ELEVEN             DEC      11         B-14                       
046992,000067:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
046993,000068:    4761           00015        OCT15              OCT      15                                    
046994,000069:                                                                                                  #  R1D1          OCT     16              PINBALL
046995,000070:    4762           00017        LOW4               OCT      17                                    

Page 1091

046997,000072:                                                                                                  #  BIT5          OCT     00020
046998,000073:                                                                                                  #  ND1           OCT     21              PINBALL
046999,000074:                                                                                                  #  VD1           OCT     23              PINBALL
047000,000075:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
047001,000076:                                                                                                  #  MD1           OCT     25              PINBALL
047002,000077:    4763           00030        BITS4&5            OCT      30                                    
047003,000078:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
047004,000079:    4764           00033        OCT33              OCT      33                                    
047005,000080:    4765     4764               DEC27              =        OCT33                                 
047006,000081:    4765           00035        OCT35              OCT      35                                    
047007,000082:    4766     4765               DEC29              =        OCT35                                 
047008,000083:    4766           00032        CALLCODE           OCT      00032                                 
047009,000084:                                                                                                  #  LOW5          OCT     37              PINBALL
047010,000085:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
047011,000086:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
047012,000087:    4767           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
047013,000088:    4770           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
047014,000089:                                                                                                  #  BIT6          OCT     00040
047015,000090:    4771           00050        OCT50              OCT      50                                    
047016,000091:    4772           00055        DEC45              DEC      45         B-14                       
047017,000092:    4773           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
047018,000093:    4774           00062        .5SEC              DEC      50         B-14                       
047019,000094:                                                                                                  #  BIT7          OCT     00100
047020,000095: 
047021,000096:    4775     4745               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
047022,000097:                                                                                                  #  (LAST 4K OF ROPE)
047023,000098:    4775           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
047024,000099:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
047025,000100:                                                                                                  #  (FIRST 8K OF ACM)
047026,000101:    4776           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
047027,000102:                                                                                                  #  (LAST 8K OF ACM)
047028,000103:    4777           00144        1SEC               DEC      100        B-14                       
047029,000104:                                                                                                  #  LOW7          OCT     177             INTERPRETER
047030,000105:                                                                                                  #  BIT8          OCT     00200
047031,000106:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
047032,000107:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
047033,000108:    5000           00310        2SECS              DEC      200        B-14                       
047034,000109:                                                                                                  #  LOW8          OCT     377             PINBALL
047035,000110:                                                                                                  #  BIT9          OCT     00400
047036,000111:    5001           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
047037,000112:    5002           00454        3SECS              DEC      300        B-14                       
047038,000113:    5003           00620        4SECS              DEC      400        B-14                       
047039,000114:    5004           00777        LOW9               OCT      777                                   
047040,000115:                                                                                                  #  BIT10         OCT     01000
047041,000116:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
047042,000117:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
047043,000118:    5005           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
047044,000119:    5006           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
047045,000120:    5007           01400        OCT1400            OCT      01400                                 
047046,000121:    5010           01426        V06N22             VN       0622                                  

Page 1092

047048,000123:                                                                                                  #  MID5          OCT     1740            PINBALL
047049,000124:    5011           01776        BITS2-10           OCT      1776                                  
047050,000125:    5012           01777        LOW10              OCT      1777                                  
047051,000126:                                                                                                  #  BIT11         OCT     02000
047052,000127:                                                                                                  #  2K+3          OCT     2003            PINBALL
047053,000128:    5013           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
047054,000129:    5014           02400        EBANK5             OCT      02400                                 
047055,000130:    5015           03000        PRIO3              OCT      03000                                 
047056,000131:    5016           03400        EBANK7             OCT      03400                                 
047057,000132:                                                                                                  #  LOW11         OCT     3777            PINBALL
047058,000133:                                                                                                  #  BIT12         OCT     04000
047059,000134:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
047060,000135:    5017           05000        PRIO5              OCT      05000                                 
047061,000136:    5020           06000        PRIO6              OCT      06000                                 
047062,000137:    5021           07000        PRIO7              OCT      07000                                 
047063,000138: 
047064,000139:                                                                                                  #  BIT13         OCT     10000
047065,000140:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
047066,000141:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
047067,000142:    5022           11000        PRIO11             OCT      11000                                 
047068,000143:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
047069,000144:    5023           13000        PRIO13             OCT      13000                                 
047070,000145:    5024           14000        PRIO14             OCT      14000                                 
047071,000146:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
047072,000147:    5025           15000        PRIO15             OCT      15000                                 
047073,000148:    5026           16000        PRIO16             OCT      16000                                 
047074,000149:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
047075,000150:    5027           17000        PRIO17             OCT      17000                                 
047076,000151:    5030           17770        OCT17770           OCT      17770                                 
047077,000152:                                                                                                  #  BIT14         OCT     20000
047078,000153:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
047079,000154:    5031           21000        PRIO21             OCT      21000                                 
047080,000155:    7707                                           BLOCK    03                                    
047081,000156:    7707                                           COUNT*   $$/FCONS                              
047082,000157:    7707           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
047083,000158:    7710           23000        PRIO23             OCT      23000                                 
047084,000159:    7711           24000        PRIO24             OCT      24000                                 
047085,000160:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
047086,000161:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
047087,000162:    7712           25000        PRIO25             OCT      25000                                 
047088,000163:    7713           26000        PRIO26             OCT      26000                                 
047089,000164:    7714           27000        PRIO27             OCT      27000                                 
047090,000165:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
047091,000166:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
047092,000167:    7715           31000        PRIO31             OCT      31000                                 
047093,000168:    7716           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
047094,000169:    7717           32000        PRIO32             OCT      32000                                 
047095,000170:    7720           33000        PRIO33             OCT      33000                                 
047096,000171:    7721           34000        PRIO34             OCT      34000                                 
047097,000172:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              

Page 1093

047099,000174:    7722           35000        PRIO35             OCT      35000                                 
047100,000175:    7723           36000        PRIO36             OCT      36000                                 
047101,000176:    7724           37000        PRIO37             OCT      37000                                 
047102,000177:    7725           37401        63/64+1            OCT      37401                                 
047103,000178:                                                                                                  #  MID7          OCT     37600           PINBALL
047104,000179:    7726           37766        OCT37766           OCT      37766                                 
047105,000180:    7727           37774        OCT37774           OCT      37774                                 
047106,000181:    7730           37776        OCT37776           OCT      37776                                 
047107,000182:                                                                                                  #  DPOSMAX       OCT     37777
047108,000183:                                                                                                  #  BIT15         OCT     40000
047109,000184:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
047110,000185:    7731           40014        DLOADCOD           OCT      40014                                 
047111,000186:    7732           40015        DLOAD*             OCT      40015                                 
047112,000187:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
047113,000188:    7733           40040        BIT15+6            OCT      40040                                 
047114,000189:    7734           40200        OCT40200           OCT      40200                                 
047115,000190:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
047116,000191:                                                                                                  #                OCT     50037           T4RUPT   RELTAB +9D
047117,000192:                                                                                                  #                OCT     54000           T4RUPT   RELTAB +10D
047118,000193:    7735           57777        -BIT14             OCT      57777                                 
047119,000194:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
047120,000195:    7736           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
047121,000196:    7737           70000        13,14,15           OCT      70000                                 
047122,000197:    7740           73777        -1/8               OCT      73777                                 
047123,000198:    7741           74000        HIGH4              OCT      74000                                 
047124,000199:    7742           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
047125,000200:                                                                                                  #  HI5           OCT     76000           PINBALL
047126,000201:    7743           77700        HIGH9              OCT      77700                                 
047127,000202:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
047128,000203:                                                                                                  #  -OCT10        OCT     -10                                      (OCT 77767)
047129,000204:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
047130,000205:    7744           77774        NEG3               DEC      -3         B-14                       
047131,000206:    7745           77775        NEG2               OCT      77775                                 
047132,000207:    7746           77776        NEGONE             DEC      -1         B-14                       
047133,000208: 

Page 1094

047135,000210: 
047136,000211:                                                                                                  #  DEFINED BY EQUALS
047137,000212: 
047138,000213:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
047139,000214:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
047140,000215: 
047141,000216:    7747     7746               MINUS1             =        NEG1                                  
047142,000217:    7747     7746               NEG1               =        NEGONE                                
047143,000218:    7747     4753               ONE                =        BIT1                                  
047144,000219:    7747     4752               TWO                =        BIT2                                  
047145,000220:    7747     6244               THREE              =        OCTAL3                                
047146,000221:    7747     6244               LOW2               =        THREE                                 
047147,000222:    7747     4751               FOUR               =        BIT3                                  
047148,000223:    7747     6241               SIX                =        REVCNT                                
047149,000224:    7747     4757               LOW3               =        SEVEN                                 
047150,000225:    7747     4750               EIGHT              =        BIT4                                  
047151,000226:    7747     4320               NINE               =        R2D1                                  
047152,000227:    7747     4363               TEN                =        BINCON                                
047153,000228:    7747     4760               NOUTCON            =        ELEVEN                                
047154,000229:    7747     4360               OCT23              =        VD1                                   
047155,000230:    7747     4362               OCT25              =        MD1                                   
047156,000231:    7747     4742               PRIO1              =        BIT10                                 
047157,000232:    7747     5007               EBANK3             =        OCT1400                               
047158,000233:    7747     4741               PRIO2              =        BIT11                                 
047159,000234:    7747     4775               OCT120             =        SUPER101                              
047160,000235:    7747     4776               OCT140             =        SUPER110                              
047161,000236:    7747     4741               2K                 =        BIT11                                 
047162,000237:    7747     4741               EBANK4             =        BIT11                                 
047163,000238:    7747     4740               PRIO4              =        BIT12                                 
047164,000239:    7747     5015               EBANK6             =        PRIO3                                 
047165,000240:    7747     4737               QUARTER            =        BIT13                                 
047166,000241:    7747     4737               PRIO10             =        BIT13                                 
047167,000242:    7747     7662               OCT10001           =        CCSL                                  
047168,000243:    7747     4736               POS1/2             =        HALF                                  
047169,000244:    7747     4736               PRIO20             =        BIT14                                 
047170,000245:    7747     4736               HALF               =        BIT14                                 
047171,000246:    7747     4355               PRIO30             =        CHRPRIO                               
047172,000247:    7747     4355               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
047173,000248:    7747     6470               OCT30002           =        TLOAD      +1                         
047174,000249:    7747     7721               B12T14             =        PRIO34                                
047175,000250:    7747     4735               NEGMAX             =        BIT15                                 
047176,000251:    7747     4735               VLOADCOD           =        BIT15                                 
047177,000252:    7747     6106               VLOAD*             =        OCT40001                              
047178,000253:    7747     4101               OCT60000           =        RELTAB11                              
047179,000254:    7747     4350               BANKMASK           =        HI5                                   
047180,000255: 

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