Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

047211,000002:                                                                                                  ## Copyright:   Public domain.
047212,000003:                                                                                                  ## Filename:    FIXED-FIXED_CONSTANT_POOL.agc
047213,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
047214,000005:                                                                                                  ##              It is part of the source code for the original release
047215,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
047216,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
047217,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
047218,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
047219,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
047220,000011:                                                                                                  ##              that the code format has been changed to conform to the
047221,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
047222,000013:                                                                                                  ##              original YUL assembler.
047223,000014:                                                                                                  ## Reference:   pp. 1090-1094
047224,000015:                                                                                                  ## Assembler:   yaYUL
047225,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047226,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047227,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
047228,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
047229,000020:                                                                                                  ##              2017-01-02 RRB  Updated for Luminary 69.
047230,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
047231,000022:                                                                                                  ##                              but no errors found.
047232,000023:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
047233,000024: 

Page 1090

047235,000026:    4732                                           BLOCK    02                                    
047236,000027:    4732                                           COUNT*   $$/FCONS                              
047237,000028: 
047238,000029:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
047239,000030: 
047240,000031:    4732           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
047241,000032:    4733           37777        POSMAX             OCT      37777                                 
047242,000033: 
047243,000034:    4734     4734               LIMITS             =        NEG1/2                                
047244,000035: 
047245,000036:    4734           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
047246,000037:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
047247,000038: 
047248,000039:                                                                                                  #  BIT TABLE                                     
047249,000040: 
047250,000041:    4735           40000        BIT15              OCT      40000                                 
047251,000042:    4736           20000        BIT14              OCT      20000                                 
047252,000043:    4737           10000        BIT13              OCT      10000                                 
047253,000044:    4740           04000        BIT12              OCT      04000                                 
047254,000045:    4741           02000        BIT11              OCT      02000                                 
047255,000046:    4742           01000        BIT10              OCT      01000                                 
047256,000047:    4743           00400        BIT9               OCT      00400                                 
047257,000048:    4744           00200        BIT8               OCT      00200                                 
047258,000049:    4745           00100        BIT7               OCT      00100                                 
047259,000050:    4746           00040        BIT6               OCT      00040                                 
047260,000051:    4747           00020        BIT5               OCT      00020                                 
047261,000052:    4750           00010        BIT4               OCT      00010                                 
047262,000053:    4751           00004        BIT3               OCT      00004                                 
047263,000054:    4752           00002        BIT2               OCT      00002                                 
047264,000055:    4753           00001        BIT1               OCT      00001                                 
047265,000056: 
047266,000057:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
047267,000058:    4754           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
047268,000059:    4755           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
047269,000060:                                                                                                  #  BIT1          OCT     00001
047270,000061:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
047271,000062:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
047272,000063:                                                                                                  #  R3D1          OCT     4               PINBALL
047273,000064:    4756           00005        FIVE               OCT      5                                     
047274,000065:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
047275,000066:    4757           00007        SEVEN              OCT      7                                     
047276,000067:                                                                                                  #  BIT4          OCT     00010
047277,000068:                                                                                                  #  R2D1          OCT     11              PINBALL
047278,000069:    4760     4320               OCT11              =        R2D1                                  #  P20S
047279,000070:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
047280,000071:    4760           00013        ELEVEN             DEC      11         B-14                       
047281,000072:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
047282,000073:    4761           00015        OCT15              OCT      15                                    
047283,000074:                                                                                                  #  R1D1          OCT     16              PINBALL
047284,000075:    4762           00017        LOW4               OCT      17                                    

Page 1091

047286,000077:                                                                                                  #  BIT5          OCT     00020
047287,000078:                                                                                                  #  ND1           OCT     21              PINBALL
047288,000079:                                                                                                  #  VD1           OCT     23              PINBALL
047289,000080:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
047290,000081:                                                                                                  #  MD1           OCT     25              PINBALL
047291,000082:    4763           00030        BITS4&5            OCT      30                                    
047292,000083:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
047293,000084:    4764           00033        OCT33              OCT      33                                    
047294,000085:    4765     4764               DEC27              =        OCT33                                 
047295,000086:    4765           00035        OCT35              OCT      35                                    
047296,000087:    4766     4765               DEC29              =        OCT35                                 
047297,000088:    4766           00032        CALLCODE           OCT      00032                                 
047298,000089:                                                                                                  #  LOW5          OCT     37              PINBALL
047299,000090:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
047300,000091:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
047301,000092:    4767           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
047302,000093:    4770           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
047303,000094:                                                                                                  #  BIT6          OCT     00040
047304,000095:    4771           00050        OCT50              OCT      50                                    
047305,000096:    4772           00055        DEC45              DEC      45         B-14                       
047306,000097:    4773           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
047307,000098:    4774           00062        .5SEC              DEC      50         B-14                       
047308,000099:                                                                                                  #  BIT7          OCT     00100
047309,000100: 
047310,000101:    4775     4745               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
047311,000102:                                                                                                  #  (LAST 4K OF ROPE)
047312,000103:    4775           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
047313,000104:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
047314,000105:                                                                                                  #  (FIRST 8K OF ACM)
047315,000106:    4776           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
047316,000107:                                                                                                  #  (LAST 8K OF ACM)
047317,000108:    4777           00144        1SEC               DEC      100        B-14                       
047318,000109:                                                                                                  #  LOW7          OCT     177             INTERPRETER
047319,000110:                                                                                                  #  BIT8          OCT     00200
047320,000111:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
047321,000112:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
047322,000113:    5000           00310        2SECS              DEC      200        B-14                       
047323,000114:                                                                                                  #  LOW8          OCT     377             PINBALL
047324,000115:                                                                                                  #  BIT9          OCT     00400
047325,000116:    5001           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
047326,000117:    5002           00454        3SECS              DEC      300        B-14                       
047327,000118:    5003           00620        4SECS              DEC      400        B-14                       
047328,000119:    5004           00777        LOW9               OCT      777                                   
047329,000120:                                                                                                  #  BIT10         OCT     01000
047330,000121:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
047331,000122:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
047332,000123:    5005           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
047333,000124:    5006           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
047334,000125:    5007           01400        OCT1400            OCT      01400                                 
047335,000126:    5010           01426        V06N22             VN       0622                                  

Page 1092

047337,000128:                                                                                                  #  MID5          OCT     1740            PINBALL
047338,000129:    5011           01776        BITS2-10           OCT      1776                                  
047339,000130:    5012           01777        LOW10              OCT      1777                                  
047340,000131:                                                                                                  #  BIT11         OCT     02000
047341,000132:                                                                                                  #  2K+3          OCT     2003            PINBALL
047342,000133:    5013           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
047343,000134:    5014           02400        EBANK5             OCT      02400                                 
047344,000135:    5015           03000        PRIO3              OCT      03000                                 
047345,000136:    5016           03400        EBANK7             OCT      03400                                 
047346,000137:                                                                                                  #  LOW11         OCT     3777            PINBALL
047347,000138:                                                                                                  #  BIT12         OCT     04000
047348,000139:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
047349,000140:    5017           05000        PRIO5              OCT      05000                                 
047350,000141:    5020           06000        PRIO6              OCT      06000                                 
047351,000142:    5021           07000        PRIO7              OCT      07000                                 
047352,000143: 
047353,000144:                                                                                                  #  BIT13         OCT     10000
047354,000145:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
047355,000146:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
047356,000147:    5022           11000        PRIO11             OCT      11000                                 
047357,000148:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
047358,000149:    5023           13000        PRIO13             OCT      13000                                 
047359,000150:    5024           14000        PRIO14             OCT      14000                                 
047360,000151:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
047361,000152:    5025           15000        PRIO15             OCT      15000                                 
047362,000153:    5026           16000        PRIO16             OCT      16000                                 
047363,000154:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
047364,000155:    5027           17000        PRIO17             OCT      17000                                 
047365,000156:    5030           17770        OCT17770           OCT      17770                                 
047366,000157:                                                                                                  #  BIT14         OCT     20000
047367,000158:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
047368,000159:    5031           21000        PRIO21             OCT      21000                                 
047369,000160:    7707                                           BLOCK    03                                    
047370,000161:    7707                                           COUNT*   $$/FCONS                              
047371,000162:    7707           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
047372,000163:    7710           23000        PRIO23             OCT      23000                                 
047373,000164:    7711           24000        PRIO24             OCT      24000                                 
047374,000165:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
047375,000166:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
047376,000167:    7712           25000        PRIO25             OCT      25000                                 
047377,000168:    7713           26000        PRIO26             OCT      26000                                 
047378,000169:    7714           27000        PRIO27             OCT      27000                                 
047379,000170:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
047380,000171:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
047381,000172:    7715           31000        PRIO31             OCT      31000                                 
047382,000173:    7716           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
047383,000174:    7717           32000        PRIO32             OCT      32000                                 
047384,000175:    7720           33000        PRIO33             OCT      33000                                 
047385,000176:    7721           34000        PRIO34             OCT      34000                                 
047386,000177:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              

Page 1093

047388,000179:    7722           35000        PRIO35             OCT      35000                                 
047389,000180:    7723           36000        PRIO36             OCT      36000                                 
047390,000181:    7724           37000        PRIO37             OCT      37000                                 
047391,000182:    7725           37401        63/64+1            OCT      37401                                 
047392,000183:                                                                                                  #  MID7          OCT     37600           PINBALL
047393,000184:    7726           37766        OCT37766           OCT      37766                                 
047394,000185:    7727           37774        OCT37774           OCT      37774                                 
047395,000186:    7730           37776        OCT37776           OCT      37776                                 
047396,000187:                                                                                                  #  DPOSMAX       OCT     37777
047397,000188:                                                                                                  #  BIT15         OCT     40000
047398,000189:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
047399,000190:    7731           40014        DLOADCOD           OCT      40014                                 
047400,000191:    7732           40015        DLOAD*             OCT      40015                                 
047401,000192:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
047402,000193:    7733           40040        BIT15+6            OCT      40040                                 
047403,000194:    7734           40200        OCT40200           OCT      40200                                 
047404,000195:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
047405,000196:                                                                                                  #                OCT     50037           T4RUPT   RELTAB +9D
047406,000197:                                                                                                  #                OCT     54000           T4RUPT   RELTAB +10D
047407,000198:    7735           57777        -BIT14             OCT      57777                                 
047408,000199:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
047409,000200:    7736           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
047410,000201:    7737           70000        13,14,15           OCT      70000                                 
047411,000202:    7740           73777        -1/8               OCT      73777                                 
047412,000203:    7741           74000        HIGH4              OCT      74000                                 
047413,000204:    7742           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
047414,000205:                                                                                                  #  HI5           OCT     76000           PINBALL
047415,000206:    7743           77700        HIGH9              OCT      77700                                 
047416,000207:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
047417,000208:                                                                                                  #  -OCT10        OCT     -10                                      (OCT 77767)
047418,000209:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
047419,000210:    7744           77774        NEG3               DEC      -3         B-14                       
047420,000211:    7745           77775        NEG2               OCT      77775                                 
047421,000212:    7746           77776        NEGONE             DEC      -1         B-14                       
047422,000213: 

Page 1094

047424,000215: 
047425,000216:                                                                                                  #  DEFINED BY EQUALS
047426,000217: 
047427,000218:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
047428,000219:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
047429,000220: 
047430,000221:    7747     7746               MINUS1             =        NEG1                                  
047431,000222:    7747     7746               NEG1               =        NEGONE                                
047432,000223:    7747     4753               ONE                =        BIT1                                  
047433,000224:    7747     4752               TWO                =        BIT2                                  
047434,000225:    7747     6244               THREE              =        OCTAL3                                
047435,000226:    7747     6244               LOW2               =        THREE                                 
047436,000227:    7747     4751               FOUR               =        BIT3                                  
047437,000228:    7747     6241               SIX                =        REVCNT                                
047438,000229:    7747     4757               LOW3               =        SEVEN                                 
047439,000230:    7747     4750               EIGHT              =        BIT4                                  
047440,000231:    7747     4320               NINE               =        R2D1                                  
047441,000232:    7747     4363               TEN                =        BINCON                                
047442,000233:    7747     4760               NOUTCON            =        ELEVEN                                
047443,000234:    7747     4360               OCT23              =        VD1                                   
047444,000235:    7747     4362               OCT25              =        MD1                                   
047445,000236:    7747     4742               PRIO1              =        BIT10                                 
047446,000237:    7747     5007               EBANK3             =        OCT1400                               
047447,000238:    7747     4741               PRIO2              =        BIT11                                 
047448,000239:    7747     4775               OCT120             =        SUPER101                              
047449,000240:    7747     4776               OCT140             =        SUPER110                              
047450,000241:    7747     4741               2K                 =        BIT11                                 
047451,000242:    7747     4741               EBANK4             =        BIT11                                 
047452,000243:    7747     4740               PRIO4              =        BIT12                                 
047453,000244:    7747     5015               EBANK6             =        PRIO3                                 
047454,000245:    7747     4737               QUARTER            =        BIT13                                 
047455,000246:    7747     4737               PRIO10             =        BIT13                                 
047456,000247:    7747     7662               OCT10001           =        CCSL                                  
047457,000248:    7747     4736               POS1/2             =        HALF                                  
047458,000249:    7747     4736               PRIO20             =        BIT14                                 
047459,000250:    7747     4736               HALF               =        BIT14                                 
047460,000251:    7747     4355               PRIO30             =        CHRPRIO                               
047461,000252:    7747     4355               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
047462,000253:    7747     6470               OCT30002           =        TLOAD      +1                         
047463,000254:    7747     7721               B12T14             =        PRIO34                                
047464,000255:    7747     4735               NEGMAX             =        BIT15                                 
047465,000256:    7747     4735               VLOADCOD           =        BIT15                                 
047466,000257:    7747     6106               VLOAD*             =        OCT40001                              
047467,000258:    7747     4101               OCT60000           =        RELTAB11                              
047468,000259:    7747     4350               BANKMASK           =        HI5                                   
047469,000260: 

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