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.

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

Page 249

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

Page 250

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

Page 251

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

Page 252

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

Page 253

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

Page 254

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

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