Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

047076,000002:                                                                                                  ## Copyright:   Public domain.
047077,000003:                                                                                                  ## Filename:    FIXED-FIXED_CONSTANT_POOL.agc
047078,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
047079,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
047080,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
047081,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
047082,000008:                                                                                                  ##              that the code format has been changed to conform to the
047083,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
047084,000010:                                                                                                  ##              original YUL assembler.
047085,000011:                                                                                                  ## Reference:   pp. 1093-1097
047086,000012:                                                                                                  ## Assembler:   yaYUL
047087,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047088,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047089,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
047090,000016:                                                                                                  ##              2016-12-05 RRB  Updated from Luminary210.
047091,000017:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
047092,000018:                                                                                                  ##                              and corrected errors found.
047093,000019: 

Page 1093

047095,000021:    4723                                           BLOCK    02                                    
047096,000022:    4723                                           COUNT*   $$/FCONS                              
047097,000023: 
047098,000024:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
047099,000025: 
047100,000026:    4723           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
047101,000027:    4724           37777        POSMAX             OCT      37777                                 
047102,000028: 
047103,000029:    4725     4725               LIMITS             =        NEG1/2                                
047104,000030: 
047105,000031:    4725           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
047106,000032:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
047107,000033: 
047108,000034:                                                                                                  #  BIT TABLE                                     
047109,000035: 
047110,000036:    4726           40000        BIT15              OCT      40000                                 
047111,000037:    4727           20000        BIT14              OCT      20000                                 
047112,000038:    4730           10000        BIT13              OCT      10000                                 
047113,000039:    4731           04000        BIT12              OCT      04000                                 
047114,000040:    4732           02000        BIT11              OCT      02000                                 
047115,000041:    4733           01000        BIT10              OCT      01000                                 
047116,000042:    4734           00400        BIT9               OCT      00400                                 
047117,000043:    4735           00200        BIT8               OCT      00200                                 
047118,000044:    4736           00100        BIT7               OCT      00100                                 
047119,000045:    4737           00040        BIT6               OCT      00040                                 
047120,000046:    4740           00020        BIT5               OCT      00020                                 
047121,000047:    4741           00010        BIT4               OCT      00010                                 
047122,000048:    4742           00004        BIT3               OCT      00004                                 
047123,000049:    4743           00002        BIT2               OCT      00002                                 
047124,000050:    4744           00001        BIT1               OCT      00001                                 
047125,000051: 
047126,000052:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
047127,000053:    4745           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
047128,000054:    4746           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
047129,000055:                                                                                                  #  BIT1          OCT     00001
047130,000056:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
047131,000057:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
047132,000058:                                                                                                  #  R3D1          OCT     4               PINBALL
047133,000059:    4747           00005        FIVE               OCT      5                                     
047134,000060:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
047135,000061:    4750           00007        SEVEN              OCT      7                                     
047136,000062:                                                                                                  #  BIT4          OCT     00010
047137,000063:                                                                                                  #  R2D1          OCT     11              PINBALL
047138,000064:    4751     4311               OCT11              =        R2D1                                  #  P20S
047139,000065:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
047140,000066:    4751           00013        ELEVEN             DEC      11         B-14                       
047141,000067:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
047142,000068:    4752           00015        OCT15              OCT      15                                    
047143,000069:                                                                                                  #  R1D1          OCT     16              PINBALL
047144,000070:    4753           00017        LOW4               OCT      17                                    

Page 1094

047146,000072:                                                                                                  #  BIT5          OCT     00020
047147,000073:                                                                                                  #  ND1           OCT     21              PINBALL
047148,000074:                                                                                                  #  VD1           OCT     23              PINBALL
047149,000075:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
047150,000076:                                                                                                  #  MD1           OCT     25              PINBALL
047151,000077:    4754           00030        BITS4&5            OCT      30                                    
047152,000078:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
047153,000079:    4755           00033        OCT33              OCT      33                                    
047154,000080:    4756     4755               DEC27              =        OCT33                                 
047155,000081:    4756           00035        OCT35              OCT      35                                    
047156,000082:    4757     4756               DEC29              =        OCT35                                 
047157,000083:    4757           00032        CALLCODE           OCT      00032                                 
047158,000084:                                                                                                  #  LOW5          OCT     37              PINBALL
047159,000085:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
047160,000086:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
047161,000087:    4760           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
047162,000088:    4761           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
047163,000089:                                                                                                  #  BIT6          OCT     00040
047164,000090:    4762           00050        OCT50              OCT      50                                    
047165,000091:    4763           00055        DEC45              DEC      45         B-14                       
047166,000092:    4764           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
047167,000093:    4765           00062        .5SEC              DEC      50         B-14                       
047168,000094:                                                                                                  #  BIT7          OCT     00100
047169,000095: 
047170,000096:    4766     4736               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
047171,000097:                                                                                                  #  (LAST 4K OF ROPE)
047172,000098:    4766           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
047173,000099:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
047174,000100:                                                                                                  #  (FIRST 8K OF ACM)
047175,000101:    4767           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
047176,000102:                                                                                                  #  (LAST 8K OF ACM)
047177,000103:    4770           00144        1SEC               DEC      100        B-14                       
047178,000104:                                                                                                  #  LOW7          OCT     177             INTERPRETER
047179,000105:                                                                                                  #  BIT8          OCT     00200
047180,000106:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
047181,000107:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
047182,000108:    4771           00310        2SECS              DEC      200        B-14                       
047183,000109:                                                                                                  #  LOW8          OCT     377             PINBALL
047184,000110:                                                                                                  #  BIT9          OCT     00400
047185,000111:    4772           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
047186,000112:    4773           00454        3SECS              DEC      300        B-14                       
047187,000113:    4774           00620        4SECS              DEC      400        B-14                       
047188,000114:    4775           00777        LOW9               OCT      777                                   
047189,000115:                                                                                                  #  BIT10         OCT     01000
047190,000116:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
047191,000117:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
047192,000118:    4776           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
047193,000119:    4777           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
047194,000120:    5000           01400        OCT1400            OCT      01400                                 
047195,000121:    5001           01426        V06N22             VN       0622                                  

Page 1095

047197,000123:                                                                                                  #  MID5          OCT     1740            PINBALL
047198,000124:    5002           01776        BITS2-10           OCT      1776                                  
047199,000125:    5003           01777        LOW10              OCT      1777                                  
047200,000126:                                                                                                  #  BIT11         OCT     02000
047201,000127:                                                                                                  #  2K+3          OCT     2003            PINBALL
047202,000128:    5004           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
047203,000129:    5005           02400        EBANK5             OCT      02400                                 
047204,000130:    5006           03000        PRIO3              OCT      03000                                 
047205,000131:    5007           03400        EBANK7             OCT      03400                                 
047206,000132:                                                                                                  #  LOW11         OCT     3777            PINBALL
047207,000133:                                                                                                  #  BIT12         OCT     04000
047208,000134:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
047209,000135:    5010           05000        PRIO5              OCT      05000                                 
047210,000136:    5011           06000        PRIO6              OCT      06000                                 
047211,000137:    5012           07000        PRIO7              OCT      07000                                 
047212,000138: 
047213,000139:                                                                                                  #  BIT13         OCT     10000
047214,000140:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
047215,000141:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
047216,000142:    5013           11000        PRIO11             OCT      11000                                 
047217,000143:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
047218,000144:    5014           13000        PRIO13             OCT      13000                                 
047219,000145:    5015           14000        PRIO14             OCT      14000                                 
047220,000146:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
047221,000147:    5016           15000        PRIO15             OCT      15000                                 
047222,000148:    5017           16000        PRIO16             OCT      16000                                 
047223,000149:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
047224,000150:    5020           17000        PRIO17             OCT      17000                                 
047225,000151:    5021           17770        OCT17770           OCT      17770                                 
047226,000152:                                                                                                  #  BIT14         OCT     20000
047227,000153:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
047228,000154:    5022           21000        PRIO21             OCT      21000                                 
047229,000155:    7731                                           BLOCK    03                                    
047230,000156:    7731                                           COUNT*   $$/FCONS                              
047231,000157:    7731           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
047232,000158:    7732           23000        PRIO23             OCT      23000                                 
047233,000159:    7733           24000        PRIO24             OCT      24000                                 
047234,000160:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
047235,000161:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
047236,000162:    7734           25000        PRIO25             OCT      25000                                 
047237,000163:    7735           26000        PRIO26             OCT      26000                                 
047238,000164:    7736           27000        PRIO27             OCT      27000                                 
047239,000165:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
047240,000166:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
047241,000167:    7737           31000        PRIO31             OCT      31000                                 
047242,000168:    7740           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
047243,000169:    7741           32000        PRIO32             OCT      32000                                 
047244,000170:    7742           33000        PRIO33             OCT      33000                                 
047245,000171:    7743           34000        PRIO34             OCT      34000                                 
047246,000172:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              

Page 1096

047248,000174:    7744           35000        PRIO35             OCT      35000                                 
047249,000175:    7745           36000        PRIO36             OCT      36000                                 
047250,000176:    7746           37000        PRIO37             OCT      37000                                 
047251,000177:    7747           37401        63/64+1            OCT      37401                                 
047252,000178:                                                                                                  #  MID7          OCT     37600           PINBALL
047253,000179:    7750           37766        OCT37766           OCT      37766                                 
047254,000180:    7751           37774        OCT37774           OCT      37774                                 
047255,000181:    7752           37776        OCT37776           OCT      37776                                 
047256,000182:                                                                                                  #  DPOSMAX       OCT     37777
047257,000183:                                                                                                  #  BIT15         OCT     40000
047258,000184:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
047259,000185:    7753           40014        DLOADCOD           OCT      40014                                 
047260,000186:    7754           40015        DLOAD*             OCT      40015                                 
047261,000187:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
047262,000188:    7755           40040        BIT15+6            OCT      40040                                 
047263,000189:    7756           40200        OCT40200           OCT      40200                                 
047264,000190:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
047265,000191:                                                                                                  #                OCT     50037           T4RUPT   RELTAB +9D
047266,000192:                                                                                                  #                OCT     54000           T4RUPT   RELTAB +10D
047267,000193:    7757           57777        -BIT14             OCT      57777                                 
047268,000194:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
047269,000195:    7760           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
047270,000196:    7761           70000        13,14,15           OCT      70000                                 
047271,000197:    7762           73777        -1/8               OCT      73777                                 
047272,000198:    7763           74000        HIGH4              OCT      74000                                 
047273,000199:    7764           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
047274,000200:                                                                                                  #  HI5           OCT     76000           PINBALL
047275,000201:    7765           77700        HIGH9              OCT      77700                                 
047276,000202:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
047277,000203:                                                                                                  #  -OCT10        OCT     -10                                     (OCT 77767)
047278,000204:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
047279,000205:    7766           77774        NEG3               DEC      -3         B-14                       ## In octal to left, "77774 0" is circled - RRB
047280,000206:    7767           77775        NEG2               OCT      77775                                 
047281,000207:    7770           77776        NEGONE             DEC      -1         B-14                       
047282,000208: 

Page 1097

047284,000210: 
047285,000211:                                                                                                  #  DEFINED BY EQUALS
047286,000212: 
047287,000213:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
047288,000214:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
047289,000215: 
047290,000216:    7771     7770               MINUS1             =        NEG1                                  
047291,000217:    7771     7770               NEG1               =        NEGONE                                
047292,000218:    7771     4744               ONE                =        BIT1                                  
047293,000219:    7771     4743               TWO                =        BIT2                                  
047294,000220:    7771     6266               THREE              =        OCTAL3                                
047295,000221:    7771     6266               LOW2               =        THREE                                 
047296,000222:    7771     4742               FOUR               =        BIT3                                  
047297,000223:    7771     6263               SIX                =        REVCNT                                
047298,000224:    7771     4750               LOW3               =        SEVEN                                 
047299,000225:    7771     4741               EIGHT              =        BIT4                                  
047300,000226:    7771     4311               NINE               =        R2D1                                  
047301,000227:    7771     4354               TEN                =        BINCON                                
047302,000228:    7771     4751               NOUTCON            =        ELEVEN                                
047303,000229:    7771     4351               OCT23              =        VD1                                   
047304,000230:    7771     4353               OCT25              =        MD1                                   
047305,000231:    7771     4733               PRIO1              =        BIT10                                 
047306,000232:    7771     5000               EBANK3             =        OCT1400                               
047307,000233:    7771     4732               PRIO2              =        BIT11                                 
047308,000234:    7771     4766               OCT120             =        SUPER101                              
047309,000235:    7771     4767               OCT140             =        SUPER110                              
047310,000236:    7771     4732               2K                 =        BIT11                                 
047311,000237:    7771     4732               EBANK4             =        BIT11                                 
047312,000238:    7771     4731               PRIO4              =        BIT12                                 
047313,000239:    7771     5006               EBANK6             =        PRIO3                                 
047314,000240:    7771     4730               QUARTER            =        BIT13                                 
047315,000241:    7771     4730               PRIO10             =        BIT13                                 
047316,000242:    7771     7704               OCT10001           =        CCSL                                  
047317,000243:    7771     4727               POS1/2             =        HALF                                  
047318,000244:    7771     4727               PRIO20             =        BIT14                                 
047319,000245:    7771     4727               HALF               =        BIT14                                 
047320,000246:    7771     4346               PRIO30             =        CHRPRIO                               
047321,000247:    7771     4346               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
047322,000248:    7771     6512               OCT30002           =        TLOAD      +1                         
047323,000249:    7771     7743               B12T14             =        PRIO34                                
047324,000250:    7771     4726               NEGMAX             =        BIT15                                 
047325,000251:    7771     4726               VLOADCOD           =        BIT15                                 
047326,000252:    7771     6130               VLOAD*             =        OCT40001                              
047327,000253:    7771     4101               OCT60000           =        RELTAB11                              
047328,000254:    7771     4341               BANKMASK           =        HI5                                   
047329,000255: 

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