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.

010866,000002:                                                                                                  ## Copyright:   Public domain.
010867,000003:                                                                                                  ## Filename:    RESTART_TABLES.agc
010868,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
010869,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
010870,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
010871,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
010872,000008:                                                                                                  ##              that the code format has been changed to conform to the
010873,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
010874,000010:                                                                                                  ##              original YUL assembler.
010875,000011:                                                                                                  ## Reference:   pp. 249-254
010876,000012:                                                                                                  ## Assembler:   yaYUL
010877,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
010878,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
010879,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
010880,000016:                                                                                                  ##              2016-11-18 MAS  Transcribed.
010881,000017:                                                                                                  ##              2016-12-07 HG   Fix P00 -> POO
010882,000018:                                                                                                  ##              2016-12-23 RSB  Proofed comment text with octopus/ProoferComments
010883,000019:                                                                                                  ##                              but no errors found.
010884,000020: 

Page 249

010886,000022:                                                                                                  #  RESTART TABLES
010887,000023: 
010888,000024:                                                                                                  #  ------------------
010889,000025: 
010890,000026:                                                                                                  #  THERE ARE TWO FORMS OF RESTART TABLES FOR EACH GROUP.  THEY ARE KNOWN AS THE EVEN RESTART TABLES AND THE ODD
010891,000027:                                                                                                  #  RESTART TABLES.  THE ODD TABLES HAVE ONLY ONE ENTRY OF THREE LOCATIONS WHILE THE EVEN TABLES HAVE TWO ENTRIES
010892,000028:                                                                                                  #  EACH USING THREE LOCATIONS. THE INFORMATION AS TO WHETHER IT IS A JOB, WAITLIST, OR A LONGCALL IS GIVEN BY THE
010893,000029:                                                                                                  #  WAY THINGS ARE PUT INTO THE TABLES.
010894,000030:                                                                                                  #       A JOB HAS ITS PRIORITY STORED IN PRDTTAB OF THE CORRECT PHASE SPOT - A POSITIVE PRIORITY INDICATES A
010895,000031:                                                                                                  #  FINDVAC JOB, A NEGATIVE PRIORITY A NOVAC.  THE 2CADR OF THE JOB IS STORED IN THE CADRTAB.
010896,000032:                                                                                                  #  FOR EXAMPLE,
010897,000033: 
010898,000034:                                                                                                  #                                          5.7SPOT  OCT    23000
010899,000035:                                                                                                  #                                                   2CADR  SOMEJOB
010900,000036: 
010901,000037:                                                                                                  #  A RESTART OF GROUP 5 WITH PHASE SEVEN WOULD THEN CAUSE SOMEJOB TO BE RESTARTED AS A FINDVAC WITH PRIORITY 23.
010902,000038: 
010903,000039:                                                                                                  #                                          5.5SPOT  OCT    -23000
010904,000040:                                                                                                  #                                                   2CADR  ANYJOB
010905,000041: 
010906,000042:                                                                                                  #  HERE A RESTART OF GROUP 5 WITH PHASE 7 WOULD CAUSE ANYJOB TO BE RESTARTED AS A NOVAC WITH PRIORITY 23.
010907,000043:                                                                                                  #  A LONGCALL HAS ITS GENADR OF ITS 2CADR STORED NEGATIVELY AND ITS BBCON STORED POSITIVELY.  IN ITS PRDTTAB IS
010908,000044:                                                                                                  #  PLACED THE LOCATION OF A DP REGISTER THAT CONTAINS THE DELTA TIME THAT LONGCALL HAD BEEN ORIGINALLY STARTED
010909,000045:                                                                                                  #  WITH.  EXAMPLE,
010910,000046: 
010911,000047:                                                                                                  #                                          3.6SPOT  GENADR DELTAT
010912,000048:                                                                                                  #                                                  -GENADR LONGTASK
010913,000049:                                                                                                  #                                                   BBCON  LONGTASK
010914,000050: 
010915,000051:                                                                                                  #                                                   OCT    31000
010916,000052:                                                                                                  #                                                   2CADR  JOBAGAIN
010917,000053: 
010918,000054:                                                                                                  #  THIS WOULD START UP LONGTASK AT THE APPROPRIATE TIME, OR IMMEDIATELY IF THE TIME HAD ALREADY PASSED. IT SHOULD
010919,000055:                                                                                                  #  BE NOTED THAT IF DELTAT IS IN A SWITCHED E BANK, THIS INFORMATOIN SHOULD BE IN THE BBCON OFTHE 2CADR OF THE
010920,000056:                                                                                                  #  TASK.  FROM ABOVE, WE SEE THAT THE SECOND PART OF THIS PHASE WOULD BE STARTED AS A JOB WITH A PRIORITY OF 31.
010921,000057: 
010922,000058:                                                                                                  #  WAITLIST CALLS ARE IDENTIFIED BY THE FACT THAT THEIR 2CADR IS STORED NEGATIVELY. IF PRDTTAB OF THE PHASE SPOT
010923,000059:                                                                                                  #  IS POSITIVE, THEN IT CONTAINS THE DELTA TIME, IF PRDTTAB IS NEGATIVE THEN IT IS THE -GENADR OF AN ERASABLE
010924,000060:                                                                                                  #  LOCATION CONTAINING THE DELTA TIME, THAT IS, THE TIME IS STORED INDIRECTLY.  IT SHOULD BE NOTED AS ABOVE, THAT
010925,000061:                                                                                                  #  IF THE TIME IS STORED INDIRECTLY, THE BBCON MUST CONTAIN THE NECESSARY E BANK INFORMATION IF APPLICABLE.  WITH
010926,000062:                                                                                                  #  WAITLIST WE HAVE ONE FURTHER OPTION, IF -0 IS STORED IN PRDTTAB, IT WILL CAUSE AN IMMEDIATE RESTART OF THE
010927,000063:                                                                                                  #  TASK.  EXAMPLES,
010928,000064: 
010929,000065:                                                                                                  #                                                   OCT    77777           THIS WILL CAUSE AN IMMEDIATE RESTART
010930,000066:                                                                                                  #                                                  -2CADR  ATASK           OF THE TASK :ATASK:
010931,000067:                                                                                                  #     
010932,000068:                                                                                                  #                                                   DEC    200             IF THE TIME OF THE 2 SECONDS SINCE DUMMY
010933,000069:                                                                                                  #                                                  -2CADR  DUMMY           WAS PUT ON WAITLIST IS UP, IT WILL BEGIN
010934,000070:                                                                                                  #                                                                          IN 10 MS, OTHERWISE IT WILL BEGIN WHEN
010935,000071:                                                                                                  #                                                                          IT NORMALLY WOULD HAVE BEGUN.

Page 250

010937,000073:                                                                                                  #                                                  -GENADR DTIME           WHERE DTIME CONTAINS THE DELTA TIME
010938,000074:                                                                                                  #                                                  -2CADR  TASKTASK        OTHERWISE THIS IS AS ABOVE
010939,000075: 
010940,000076:                                                                                                  #  *****    NOW THE TABLES THEMSELVES *****
010941,000077: 
010942,000078: 01,2002                                           BANK     01                                    
010943,000079: 01,2000                                           SETLOC   RESTART                               
010944,000080: 01,2000                                           BANK                                           
010945,000081: 
010946,000082: 01,2002                        PRDTTAB            EQUALS   12000                                 #  USED TO FIND THE PRIORITY OR DELTATIME
010947,000083: 01,2002                        CADRTAB            EQUALS   12001                                 #  THIS AND THE NEXT RELATIVE LOC CONTAIN
010948,000084:                                                                                                  #  RESTART 2CADR
010949,000085: 
010950,000086: 01,2002                                           COUNT*   $$/RSTAB                              #  TABLES IN BANK 1.
010951,000087: 01,2002           00010        SIZETAB            TC       1.2SPOT    -12006                     
010952,000088: 01,2003           00020                           TC       1.3SPOT    -12004                     
010953,000089: 01,2004           00010                           TC       2.2SPOT    -12006                     
010954,000090: 01,2005           00026                           TC       2.3SPOT    -12004                     
010955,000091: 01,2006           00010                           TC       3.2SPOT    -12006                     
010956,000092: 01,2007           00056                           TC       3.3SPOT    -12004                     
010957,000093: 01,2010           00062                           TC       4.2SPOT    -12006                     
010958,000094: 01,2011           00072                           TC       4.3SPOT    -12004                     
010959,000095: 01,2012           00145                           TC       5.2SPOT    -12006                     
010960,000096: 01,2013           00163                           TC       5.3SPOT    -12004                     
010961,000097: 01,2014           00010                           TC       6.2SPOT    -12006                     
010962,000098: 01,2015           00174                           TC       6.3SPOT    -12004                     
010963,000099: 01,2016           21000        1.2SPOT            OCT      21000                                 #  A DUMMY EXAMPLE TO BE REPLACED AS SOON
010964,000100: 01,2017     0074                                  EBANK=   STATE                                 
010965,000101: 01,2017           05146 04060                     2CADR    ENDOFJOB                              #  AS THERE IS A LEGITIMATE 1.2SPOT
010966,000102: 
010967,000103: 01,2021           00144                           DEC      100        B-14                       
010968,000104: 01,2022     0074                                  EBANK=   STATE                                 
010969,000105: 01,2022           05263 04060                     2CADR    TASKOVER                              
010970,000106: 
010971,000107:                                                                                                  #  ANY MORE GROUP 1.EVEN RESTART VALUES SHOULD GO HERE
010972,000108: 
010973,000109: 01,2024           76300        1.3SPOT            -GENADR  SAVET-30                              
010974,000110: 01,2025  E7,1515                                  EBANK=   DVCNTR                                
010975,000111: 01,2025           75427 03710                     -2CADR   ULLGTASK                              
010976,000112: 
010977,000113: 01,2027           32000        1.5SPOT            OCT      32000                                 
010978,000114: 01,2030  E7,1654                                  EBANK=   HMEAS                                 
010979,000115: 01,2030           03555 66067                     2CADR    REREPOS                               
010980,000116: 
010981,000117:                                                                                                  #  ANY MORE GROUP 1.ODD RESTART VALUES SHOULD GO HERE
010982,000118: 
010983,000119: 01,2032  01,2016               2.2SPOT            EQUALS   1.2SPOT                               
010984,000120:                                                                                                  #  ANY MORE GROUP 2.EVEN RESTART VALUES SHOULD GO HERE
010985,000121: 
010986,000122: 01,2032           02666        2.3SPOT            GENADR   600SECS                               

Page 251

010988,000124: 01,2033           75136                           -GENADR  STATEINT                              
010989,000125: 01,2034  E3,1554                                  EBANK=   RRECTCSM                              
010990,000126: 01,2034           26063                           BBCON    STATEINT                              
010991,000127: 
010992,000128: 01,2035           05000        2.5SPOT            OCT      05000                                 
010993,000129: 01,2036  E3,1554                                  EBANK=   RRECTCSM                              
010994,000130: 01,2036           02650 26063                     2CADR    STATINT1                              
010995,000131: 
010996,000132: 01,2040           02734        2.7SPOT            DEC      1500       B-14                       
010997,000133: 01,2041  E7,1456                                  EBANK=   LOSCOUNT                              
010998,000134: 01,2041           75455 27710                     -2CADR   P20LEMC1                              
010999,000135: 
011000,000136: 01,2043           14000        2.11SPOT           OCT      14000                                 
011001,000137: 01,2044  E7,1762                                  EBANK=   P21TIME                               
011002,000138: 01,2044           02476 50067                     2CADR    P25LEM1                               
011003,000139: 
011004,000140: 01,2046           10000        2.13SPOT           OCT      10000                                 
011005,000141: 01,2047  E7,1456                                  EBANK=   LOSCOUNT                              
011006,000142: 01,2047           02231 54067                     2CADR    RELINUS                               
011007,000143: 
011008,000144: 01,2051           26000        2.15SPOT           OCT      26000                                 
011009,000145: 01,2052  E7,1456                                  EBANK=   LOSCOUNT                              
011010,000146: 01,2052           02735 50067                     2CADR    R22RSTRT                              
011011,000147: 
011012,000148: 01,2054           77777        2.17SPOT           OCT      77777                                 
011013,000149: 01,2055  E7,1700                                  EBANK=   VGPREV                                
011014,000150: 01,2055           75436 03710                     -2CADR   REDO2.17                              
011015,000151: 
011016,000152: 01,2057           00031        2.21SPOT           DEC      25         B-14                       
011017,000153: 01,2060  E7,1515                                  EBANK=   DVCNTR                                
011018,000154: 01,2060           75735 35710                     -2CADR   R10,R11                               
011019,000155: 
011020,000156:                                                                                                  #  ANY MORE GROUP 2.ODD RESTART VALUES SHOULD GO HERE.
011021,000157: 
011022,000158: 01,2062  01,2016               3.2SPOT            EQUALS   1.2SPOT                               
011023,000159:                                                                                                  #  ANY MORE GROUP 3.EVEN RESTART VALUES SHOULD GO HERE
011024,000160: 
011025,000161: 01,2062           76355        3.3SPOT            -GENADR  ZOOMTIME                              
011026,000162: 01,2063  E7,1515                                  EBANK=   DVCNTR                                
011027,000163: 01,2063           74107 05710                     -2CADR   ZOOM                                  
011028,000164: 
011029,000165: 01,2065           20000        3.5SPOT            OCT      20000                                 
011030,000166: 01,2066  E7,1453                                  EBANK=   TTOGO                                 
011031,000167: 01,2066           02536 56067                     2CADR    S40.13                                
011032,000168: 
011033,000169:                                                                                                  #  ANY MORE GROUP 3.ODD RESTART VALUES SHOULD GO HERE
011034,000170: 
011035,000171: 01,2070           04704        4.2SPOT            DEC      2500       B-14                       
011036,000172: 01,2071  E7,1453                                  EBANK=   TTOGO                                 

Page 252

011038,000174: 01,2071           75423 03710                     -2CADR   TIG-5                                 
011039,000175: 
011040,000176: 01,2073           77777                           OCT      77777                                 
011041,000177: 01,2074  E7,1453                                  EBANK=   TTOGO                                 
011042,000178: 01,2074           75433 03710                     -2CADR   REDO4.2                               
011043,000179: 
011044,000180:                                                                                                  #  ANY MORE GROUP 4.EVEN RESTART VALUES SHOULD GO HERE
011045,000181: 
011046,000182: 01,2076           25000        4.3SPOT            OCT      25000                                 
011047,000183: 01,2077  E7,1515                                  EBANK=   DVCNTR                                
011048,000184: 01,2077           03443 64067                     2CADR    GOABORT                               
011049,000185: 
011050,000186: 01,2101           00062        4.5SPOT            DEC      50         B-14                       
011051,000187: 01,2102  E7,1453                                  EBANK=   TTOGO                                 
011052,000188: 01,2102           75216 03710                     -2CADR   ULLAGOFF                              
011053,000189: 
011054,000190: 01,2104           00764        4.7SPOT            DEC      500        B-14                       
011055,000191: 01,2105  E7,1515                                  EBANK=   DVCNTR                                
011056,000192: 01,2105           75370 03710                     -2CADR   TIG-0                                 
011057,000193: 
011058,000194: 01,2107           76260        4.11SPOT           -GENADR  TGO        +1                         
011059,000195: 01,2110  E7,1515                                  EBANK=   DVCNTR                                
011060,000196: 01,2110           74234 03710                     -2CADR   ENGOFTSK                              
011061,000197: 
011062,000198: 01,2112           12000        4.13SPOT           OCT      12000                                 
011063,000199: 01,2113  E7,1462                                  EBANK=   TRKMKCNT                              
011064,000200: 01,2113           03222 74067                     2CADR    POSTBURN                              
011065,000201: 
011066,000202: 01,2115           00764        4.15SPOT           DEC      500        B-14                       
011067,000203: 01,2116  E7,1453                                  EBANK=   TTOGO                                 
011068,000204: 01,2116           75477 03710                     -2CADR   TIG-30                                
011069,000205: 
011070,000206: 01,2120           77777        4.17SPOT           OCT      77777                                 
011071,000207: 01,2121  E7,1515                                  EBANK=   DVCNTR                                
011072,000208: 01,2121           75423 03710                     -2CADR   TIG-5                                 
011073,000209: 
011074,000210: 01,2123           13000        4.21SPOT           OCT      13000                                 
011075,000211: 01,2124  E5,1730                                  EBANK=   STAR                                  
011076,000212: 01,2124           03026 30065                     2CADR    R51.1      +1                         
011077,000213: 
011078,000214: 01,2126           77777        4.23SPOT           OCT      77777                                 
011079,000215: 01,2127  E7,1515                                  EBANK=   DVCNTR                                
011080,000216: 01,2127           75344 03710                     -2CADR   IGNITION                              
011081,000217: 
011082,000218: 01,2131           01477        4.25SPOT           GENADR   SAVET-30                              
011083,000219: 01,2132           75535                           -GENADR  TIG-35                                
011084,000220: 01,2133  E7,1477                                  EBANK=   SAVET-30                              
011085,000221: 01,2133           74067                           BBCON    TIG-35                                
011086,000222: 

Page 253

011088,000224: 01,2134           52777        4.27SPOT           OCT      52777                                 
011089,000225: 01,2135  E7,1515                                  EBANK=   DVCNTR                                
011090,000226: 01,2135           02133 42067                     2CADR    P70A                                  
011091,000227: 
011092,000228: 01,2137           52777        4.31SPOT           OCT      52777                                 
011093,000229: 01,2140  E7,1515                                  EBANK=   DVCNTR                                
011094,000230: 01,2140           02136 42067                     2CADR    P71A                                  
011095,000231: 
011096,000232: 01,2142           46777        4.33SPOT           OCT      46777                                 
011097,000233: 01,2143  E7,1515                                  EBANK=   DVCNTR                                
011098,000234: 01,2143           02040 10067                     2CADR    GOPOOFIX                              
011099,000235: 
011100,000236: 01,2145           46777        4.35SPOT           OCT      46777                                 
011101,000237: 01,2146  E7,1515                                  EBANK=   DVCNTR                                
011102,000238: 01,2146           05661 04067                     2CADR    GOPOODOO                              
011103,000239: 
011104,000240: 01,2150           52777        4.37SPOT           OCT      52777                                 
011105,000241: 01,2151  E7,1455                                  EBANK=   WHICH                                 
011106,000242: 01,2151           02570 74067                     2CADR    COMFAIL                               
011107,000243: 
011108,000244:                                                                                                  #  ANY MORE 4.ODD RESTART VALUES SHOULD GO HERE.
011109,000245: 
011110,000246: 01,2153           22000        5.2SPOT            OCT      22000                                 
011111,000247: 01,2154  E7,1515                                  EBANK=   DVCNTR                                
011112,000248: 01,2154           03661 64067                     2CADR    NORMLIZE                              
011113,000249: 
011114,000250: 01,2156           00310                           DEC      200        B-14                       
011115,000251: 01,2157  E7,1515                                  EBANK=   DVCNTR                                
011116,000252: 01,2157           74164 01710                     -2CADR   REREADAC                              
011117,000253: 
011118,000254: 01,2161           00310        5.4SPOT            DEC      200        B-14                       
011119,000255: 01,2162  E7,1515                                  EBANK=   DVCNTR                                
011120,000256: 01,2162           74164 01710                     -2CADR   REREADAC                              
011121,000257: 
011122,000258: 01,2164           20000                           OCT      20000                                 
011123,000259: 01,2165  E7,1515                                  EBANK=   DVCNTR                                
011124,000260: 01,2165           02121 66067                     2CADR    SERVICER                              
011125,000261: 
011126,000262:                                                                                                  #  ANY MORE GROUP 5.EVEN RESTART VALUES SHOULD GO HERE
011127,000263: 
011128,000264: 01,2167           00310        5.3SPOT            DEC      200        B-14                       
011129,000265: 01,2170  E7,1515                                  EBANK=   DVCNTR                                
011130,000266: 01,2170           74164 01710                     -2CADR   REREADAC                              
011131,000267: 
011132,000268: 01,2172           77777        5.5SPOT            OCT      77777                                 
011133,000269: 01,2173  E7,1515                                  EBANK=   DVCNTR                                
011134,000270: 01,2173           74335 01710                     -2CADR   REDO5.5                               
011135,000271: 

Page 254

011137,000273: 01,2175           77777        5.7SPOT            OCT      77777                                 
011138,000274: 01,2176  E7,1515                                  EBANK=   DVCNTR                                
011139,000275: 01,2176           74370 01710                     -2CADR   BIBIBIAS                              
011140,000276: 
011141,000277:                                                                                                  #  ANY MORE GROUP 5.ODD RESTART VALUES SHOULD GO HERE
011142,000278: 
011143,000279: 01,2200  01,2016               6.2SPOT            EQUALS   1.2SPOT                               
011144,000280: 01,2200           00144        6.3SPOT            DEC      100        B-14                       
011145,000281: 01,2201  E7,1441                                  EBANK=   TIG                                   
011146,000282: 01,2201           75061 03710                     -2CADR   CLOKTASK                              
011147,000283: 
011148,000284: 01,2203           30000        6.5SPOT            OCT      30000                                 #  PROTECT INCREMENTING OF TIME2,TIME1 BY
011149,000285: 01,2204  E3,1706                                  EBANK=   TEPHEM                                #  P27(UPDATE PROGRAM) VIA V70 OR V73.
011150,000286: 01,2204           03603 10063                     2CADR    TIMEDIDR                              
011151,000287: 
011152,000288: 01,2206           17000        6.7SPOT            OCT      17000                                 
011153,000289: 01,2207  E7,1700                                  EBANK=   VGPREV                                
011154,000290: 01,2207           03355 74067                     2CADR    REDO6.7                               
011155,000291: 
011156,000292: 01,2211           17000        6.11SPOT           OCT      17000                                 
011157,000293: 01,2212  E7,1700                                  EBANK=   VGPREV                                
011158,000294: 01,2212           03364 74067                     2CADR    FKP5RST                               
011159,000295: 

End of include-file RESTART_TABLES.agc.  Parent file is MAIN.agc