Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, 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 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

009929,000002:                                                                                                  ## Copyright:   Public domain.
009930,000003:                                                                                                  ## Filename:    RESTART_TABLES.agc
009931,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
009932,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
009933,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
009934,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
009935,000008:                                                                                                  ##              that the code format has been changed to conform to the
009936,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
009937,000010:                                                                                                  ##              original YUL assembler.
009938,000011:                                                                                                  ## Reference:   pp. 238-243
009939,000012:                                                                                                  ## Assembler:   yaYUL
009940,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
009941,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
009942,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
009943,000016:                                                                                                  ##              2017-02-08 RSB  Comment-text fixes identified while proofing Artemis 72.
009944,000017:                                                                                                  ##              2-17-02-28 HG   Transcribed
009945,000018:                                                                                                  ##              2017-03-01 RSB  Proofed comment text by diff vs Luminary 131
009946,000019:                                                                                                  ##                              but no errors found.
009947,000020: 

Page 238

009949,000022:                                                                                                  #  RESTART TABLES
009950,000023: 
009951,000024:                                                                                                  #  ------------------
009952,000025: 
009953,000026:                                                                                                  #  THERE ARE TWO FORMS OF RESTART TABLES FOR EACH GROUP.  THEY ARE KNOWN AS THE EVEN RESTART TABLES AND THE ODD
009954,000027:                                                                                                  #  RESTART TABLES.  THE ODD TABLES HAVE ONLY ONE ENTRY OF THREE LOCATIONS WHILE THE EVEN TABLES HAVE TWO ENTRIES
009955,000028:                                                                                                  #  EACH USING THREE LOCATIONS. THE INFORMATION AS TO WHETHER IT IS A JOB, WAITLIST, OR A LONGCALL IS GIVEN BY THE
009956,000029:                                                                                                  #  WAY THINGS ARE PUT INTO THE TABLES.
009957,000030:                                                                                                  #       A JOB HAS ITS PRIORITY STORED IN PRDTTAB OF THE CORRECT PHASE SPOT - A POSITIVE PRIORITY INDICATES A
009958,000031:                                                                                                  #  FINDVAC JOB, A NEGATIVE PRIORITY A NOVAC.  THE 2CADR OF THE JOB IS STORED IN THE CADRTAB.
009959,000032:                                                                                                  #  FOR EXAMPLE,
009960,000033: 
009961,000034:                                                                                                  #                                          5.7SPOT  OCT    23000
009962,000035:                                                                                                  #                                                   2CADR  SOMEJOB
009963,000036: 
009964,000037:                                                                                                  #  A RESTART OF GROUP 5 WITH PHASE SEVEN WOULD THEN CAUSE SOMEJOB TO BE RESTARTED AS A FINDVAC WITH PRIORITY 23.
009965,000038: 
009966,000039:                                                                                                  #                                          5.5SPOT  OCT    -23000
009967,000040:                                                                                                  #                                                   2CADR  ANYJOB
009968,000041: 
009969,000042:                                                                                                  #  HERE A RESTART OF GROUP 5 WITH PHASE 7 WOULD CAUSE ANYJOB TO BE RESTARTED AS A NOVAC WITH PRIORITY 23.
009970,000043:                                                                                                  #  A LONGCALL HAS ITS GENADR OF ITS 2CADR STORED NEGATIVELY AND ITS BBCON STORED POSITIVELY.  IN ITS PRDTTAB IS
009971,000044:                                                                                                  #  PLACED THE LOCATION OF A DP REGISTER THAT CONTAINS THE DELTA TIME THAT LONGCALL HAD BEEN ORIGINALLY STARTED
009972,000045:                                                                                                  #  WITH.  EXAMPLE,
009973,000046: 
009974,000047:                                                                                                  #                                       3.6SPOT     GENADR DELTAT
009975,000048:                                                                                                  #                                                  -GENADR LONGTASK
009976,000049:                                                                                                  #                                                   BBCON   LONGTASK
009977,000050: 
009978,000051:                                                                                                  #                                                   OCT     31000
009979,000052:                                                                                                  #                                                   2CADR   JOBAGAIN
009980,000053: 
009981,000054:                                                                                                  #  THIS WOULD START UP LONGTASK AT THE APPROPRIATE TIME, OR IMMEDIATELY IF THE TIME HAD ALREADY PASSED. IT SHOULD
009982,000055:                                                                                                  #  BE NOTED THAT IF DELTAT IS IN A SWITCHED E BANK, THIS INFORMATOIN SHOULD BE IN THE BBCON OFTHE 2CADR OF THE
009983,000056:                                                                                                  #  TASK.  FROM ABOVE, WE SEE THAT THE SECOND PART OF THIS PHASE WOULD BE STARTED AS A JOB WITH A PRIORITY OF 31.
009984,000057: 
009985,000058:                                                                                                  #  WAITLIST CALLS ARE IDENTIFIED BY THE FACT THAT THEIR 2CADR IS STORED NEGATIVELY. IF PRDTTAB OF THE PHASE SPOT
009986,000059:                                                                                                  #  IS POSITIVE, THEN IT CONTAINS THE DELTA TIME, IF PRDTTAB IS NEGATIVE THEN IT IS THE -GENADR OF AN ERASABLE
009987,000060:                                                                                                  #  LOCATION CONTAINING THE DELTA TIME, THAT IS, THE TIME IS STORED INDIRECTLY.  IT SHOULD BE NOTED AS ABOVE, THAT
009988,000061:                                                                                                  #  IF THE TIME IS STORED INDIRECTLY, THE BBCON MUST CONTAIN THE NECESSARY E BANK INFORMATION IF APPLICABLE.  WITH
009989,000062:                                                                                                  #  WAITLIST WE HAVE ONE FURTHER OPTION, IF -0 IS STORED IN PRDTTAB, IT WILL CAUSE AN IMMEDIATE RESTART OF THE
009990,000063:                                                                                                  #  TASK.  EXAMPLES,
009991,000064: 
009992,000065:                                                                                                  #                                                   OCT    77777           THIS WILL CAUSE AN IMMEDIATE RESTART
009993,000066:                                                                                                  #                                                  -2CADR  ATASK           OF THE TASK :ATASK:
009994,000067: 
009995,000068:                                                                                                  #                                                   DEC    200             IF THE TIME OF THE 2 SECONDS SINCE DUMMY
009996,000069:                                                                                                  #                                                  -2CADR  DUMMY           WAS PUT ON WAITLIST IS UP, IT WILL BEGIN
009997,000070:                                                                                                  #                                                                          IN 10 MS, OTHERWISE IT WILL BEGIN WHEN
009998,000071:                                                                                                  #                                                                          IT NORMALLY WOULD HAVE BEGUN.
009999,000072: 

Page 239

010001,000074:                                                                                                  #                                                  -GENADR DTIME           WHERE DTIME CONTAINS THE DELTA TIME
010002,000075:                                                                                                  #                                                  -2CADR  TASKTASK        OTHERWISE THIS IS AS ABOVE
010003,000076: 
010004,000077:                                                                                                  #  ***** NOW THE TABLES THEMSELVES *****
010005,000078: 
010006,000079: 01,2002                                           BANK     01                                    
010007,000080: 01,2000                                           SETLOC   RESTART                               
010008,000081: 01,2000                                           BANK                                           
010009,000082: 
010010,000083: 01,2002                        PRDTTAB            EQUALS   12000                                 #  USED TO FIND THE PRIORITY OR DELTATIME
010011,000084: 01,2002                        CADRTAB            EQUALS   12001                                 #  THIS AND THE NEXT RELATIVE LOC CONTAIN
010012,000085:                                                                                                  #  RESTART 2CADR
010013,000086: 
010014,000087: 01,2002                                           COUNT*   $$/RSTAB                              #  TABLES IN BANK 1.
010015,000088: 01,2002           00010        SIZETAB            TC       1.2SPOT    -12006                     
010016,000089: 01,2003           00020                           TC       1.3SPOT    -12004                     
010017,000090: 01,2004           00010                           TC       2.2SPOT    -12006                     
010018,000091: 01,2005           00026                           TC       2.3SPOT    -12004                     
010019,000092: 01,2006           00010                           TC       3.2SPOT    -12006                     
010020,000093: 01,2007           00056                           TC       3.3SPOT    -12004                     
010021,000094: 01,2010           00062                           TC       4.2SPOT    -12006                     
010022,000095: 01,2011           00072                           TC       4.3SPOT    -12004                     
010023,000096: 01,2012           00145                           TC       5.2SPOT    -12006                     
010024,000097: 01,2013           00163                           TC       5.3SPOT    -12004                     
010025,000098: 01,2014           00010                           TC       6.2SPOT    -12006                     
010026,000099: 01,2015           00174                           TC       6.3SPOT    -12004                     
010027,000100: 01,2016           21000        1.2SPOT            OCT      21000                                 #  A DUMMY EXAMPLE TO BE REPLACED AS SOON
010028,000101: 01,2017     0074                                  EBANK=   STATE                                 
010029,000102: 01,2017           05155 04060                     2CADR    ENDOFJOB                              #  AS THERE IS A LEGITIMATE 1.2SPOT
010030,000103: 01,2021           00144                           DEC      100        B-14                       
010031,000104: 01,2022     0074                                  EBANK=   STATE                                 
010032,000105: 01,2022           05261 04060                     2CADR    TASKOVER                              
010033,000106:                                                                                                  #  ANY MORE GROUP 1.EVEN RESTART VALUES SHOULD GO HERE
010034,000107: 
010035,000108: 01,2024           76300        1.3SPOT            -GENADR  SAVET-30                              
010036,000109: 01,2025  E7,1515                                  EBANK=   DVCNTR                                
010037,000110: 01,2025           75427 03710                     -2CADR   ULLGTASK                              
010038,000111: 01,2027           32000        1.5SPOT            OCT      32000                                 
010039,000112: 01,2030  E7,1654                                  EBANK=   HMEAS                                 
010040,000113: 01,2030           03632 66067                     2CADR    REREPOS                               
010041,000114:                                                                                                  #  ANY MORE GROUP 1.ODD RESTART VALUES SHOULD GO HERE
010042,000115: 
010043,000116: 01,2032  01,2016               2.2SPOT            EQUALS   1.2SPOT                               
010044,000117:                                                                                                  #  ANY MORE GROUP 2.EVEN RESTART VALUES SHOULD GO HERE
010045,000118: 
010046,000119: 01,2032           02631        2.3SPOT            GENADR   600SECS                               
010047,000120: 

Page 240

010049,000122: 01,2033           75173                           -GENADR  STATEINT                              
010050,000123: 01,2034  E3,1554                                  EBANK=   RRECTCSM                              
010051,000124: 01,2034           26063                           BBCON    STATEINT                              
010052,000125: 
010053,000126: 01,2035           05000        2.5SPOT            OCT      05000                                 
010054,000127: 01,2036  E3,1554                                  EBANK=   RRECTCSM                              
010055,000128: 01,2036           02613 26063                     2CADR    STATINT1                              
010056,000129: 01,2040           02734        2.7SPOT            DEC      1500       B-14                       
010057,000130: 01,2041  E7,1456                                  EBANK=   LOSCOUNT                              
010058,000131: 01,2041           75533 27710                     -2CADR   P20LEMC1                              
010059,000132: 01,2043           14000        2.11SPOT           OCT      14000                                 
010060,000133: 01,2044  E7,1762                                  EBANK=   P21TIME                               
010061,000134: 01,2044           02414 50067                     2CADR    P25LEM1                               
010062,000135: 01,2046           10000        2.13SPOT           OCT      10000                                 
010063,000136: 01,2047  E7,1456                                  EBANK=   LOSCOUNT                              
010064,000137: 01,2047           02223 54067                     2CADR    RELINUS                               
010065,000138: 01,2051           26000        2.15SPOT           OCT      26000                                 
010066,000139: 01,2052  E7,1456                                  EBANK=   LOSCOUNT                              
010067,000140: 01,2052           02654 50067                     2CADR    R22RSTRT                              
010068,000141: 01,2054           77777        2.17SPOT           OCT      77777                                 
010069,000142: 01,2055  E7,1700                                  EBANK=   VGPREV                                
010070,000143: 01,2055           75436 03710                     -2CADR   REDO2.17                              
010071,000144: 01,2057           00031        2.21SPOT           DEC      25         B-14                       
010072,000145: 01,2060  E7,1515                                  EBANK=   DVCNTR                                
010073,000146: 01,2060           75771 35710                     -2CADR   R10,R11                               
010074,000147:                                                                                                  #  ANY MORE GROUP 2.ODD RESTART VALUES SHOULD GO HERE.
010075,000148: 
010076,000149: 01,2062  01,2016               3.2SPOT            EQUALS   1.2SPOT                               
010077,000150:                                                                                                  #  ANY MORE GROUP 3.EVEN RESTART VALUES SHOULD GO HERE
010078,000151: 
010079,000152: 01,2062           76355        3.3SPOT            -GENADR  ZOOMTIME                              
010080,000153: 01,2063  E7,1515                                  EBANK=   DVCNTR                                
010081,000154: 01,2063           74110 05710                     -2CADR   ZOOM                                  
010082,000155: 01,2065           20000        3.5SPOT            OCT      20000                                 
010083,000156: 01,2066  E7,1453                                  EBANK=   TTOGO                                 
010084,000157: 01,2066           02540 56067                     2CADR    S40.13                                
010085,000158:                                                                                                  #  ANY MORE GROUP 3.ODD RESTART VALUES SHOULD GO HERE
010086,000159: 
010087,000160: 01,2070           04704        4.2SPOT            DEC      2500       B-14                       
010088,000161: 01,2071  E7,1453                                  EBANK=   TTOGO                                 
010089,000162: 

Page 241

010091,000164: 01,2071           75423 03710                     -2CADR   TIG-5                                 
010092,000165: 01,2073           77777                           OCT      77777                                 
010093,000166: 01,2074  E7,1453                                  EBANK=   TTOGO                                 
010094,000167: 01,2074           75433 03710                     -2CADR   REDO4.2                               
010095,000168:                                                                                                  #  ANY MORE GROUP 4.EVEN RESTART VALUES SHOULD GO HERE
010096,000169: 
010097,000170: 01,2076           25000        4.3SPOT            OCT      25000                                 
010098,000171: 01,2077  E7,1515                                  EBANK=   DVCNTR                                
010099,000172: 01,2077           03547 64067                     2CADR    GOABORT                               
010100,000173: 01,2101           00062        4.5SPOT            DEC      50         B-14                       
010101,000174: 01,2102  E7,1453                                  EBANK=   TTOGO                                 
010102,000175: 01,2102           75211 03710                     -2CADR   ULLAGOFF                              
010103,000176: 01,2104           00764        4.7SPOT            DEC      500        B-14                       
010104,000177: 01,2105  E7,1515                                  EBANK=   DVCNTR                                
010105,000178: 01,2105           75370 03710                     -2CADR   TIG-0                                 
010106,000179: 01,2107           76260        4.11SPOT           -GENADR  TGO        +1                         
010107,000180: 01,2110  E7,1515                                  EBANK=   DVCNTR                                
010108,000181: 01,2110           74231 03710                     -2CADR   ENGOFTSK                              
010109,000182: 01,2112           12000        4.13SPOT           OCT      12000                                 
010110,000183: 01,2113  E7,1462                                  EBANK=   TRKMKCNT                              
010111,000184: 01,2113           03227 74067                     2CADR    POSTBURN                              
010112,000185: 01,2115           00764        4.15SPOT           DEC      500        B-14                       
010113,000186: 01,2116  E7,1453                                  EBANK=   TTOGO                                 
010114,000187: 01,2116           75477 03710                     -2CADR   TIG-30                                
010115,000188: 01,2120           77777        4.17SPOT           OCT      77777                                 
010116,000189: 01,2121  E7,1515                                  EBANK=   DVCNTR                                
010117,000190: 01,2121           75423 03710                     -2CADR   TIG-5                                 
010118,000191: 01,2123           13000        4.21SPOT           OCT      13000                                 
010119,000192: 01,2124  E5,1730                                  EBANK=   STAR                                  
010120,000193: 01,2124           03012 30065                     2CADR    R51.1      +1                         
010121,000194: 01,2126           77777        4.23SPOT           OCT      77777                                 
010122,000195: 01,2127  E7,1515                                  EBANK=   DVCNTR                                
010123,000196: 01,2127           75345 03710                     -2CADR   IGNITION                              
010124,000197: 01,2131           01477        4.25SPOT           GENADR   SAVET-30                              
010125,000198: 01,2132           75535                           -GENADR  TIG-35                                
010126,000199: 01,2133  E7,1477                                  EBANK=   SAVET-30                              
010127,000200: 01,2133           74067                           BBCON    TIG-35                                
010128,000201: 

Page 242

010130,000203: 01,2134           52777        4.27SPOT           OCT      52777                                 
010131,000204: 01,2135  E7,1515                                  EBANK=   DVCNTR                                
010132,000205: 01,2135           02070 42067                     2CADR    P70A                                  
010133,000206: 01,2137           52777        4.31SPOT           OCT      52777                                 
010134,000207: 01,2140  E7,1515                                  EBANK=   DVCNTR                                
010135,000208: 01,2140           02073 42067                     2CADR    P71A                                  
010136,000209: 01,2142           46777        4.33SPOT           OCT      46777                                 
010137,000210: 01,2143  E7,1515                                  EBANK=   DVCNTR                                
010138,000211: 01,2143           02024 10067                     2CADR    GOPOOFIX                              
010139,000212: 01,2145           46777        4.35SPOT           OCT      46777                                 
010140,000213: 01,2146  E7,1515                                  EBANK=   DVCNTR                                
010141,000214: 01,2146           05655 04067                     2CADR    GOPOODOO                              
010142,000215: 01,2150           52777        4.37SPOT           OCT      52777                                 
010143,000216: 01,2151  E7,1455                                  EBANK=   WHICH                                 
010144,000217: 01,2151           02575 74067                     2CADR    COMFAIL                               
010145,000218:                                                                                                  #  ANY MORE 4.ODD RESTART VALUES SHOULD GO HERE.
010146,000219: 
010147,000220: 01,2153           22000        5.2SPOT            OCT      22000                                 
010148,000221: 01,2154  E7,1515                                  EBANK=   DVCNTR                                
010149,000222: 01,2154           02463 46067                     2CADR    NORMLIZE                              
010150,000223: 01,2156           00310                           DEC      200        B-14                       
010151,000224: 01,2157  E7,1515                                  EBANK=   DVCNTR                                
010152,000225: 01,2157           74166 01710                     -2CADR   REREADAC                              
010153,000226: 01,2161           00310        5.4SPOT            DEC      200        B-14                       
010154,000227: 01,2162  E7,1515                                  EBANK=   DVCNTR                                
010155,000228: 01,2162           74166 01710                     -2CADR   REREADAC                              
010156,000229: 01,2164           20000                           OCT      20000                                 
010157,000230: 01,2165  E7,1515                                  EBANK=   DVCNTR                                
010158,000231: 01,2165           02206 66067                     2CADR    SERVICER                              
010159,000232:                                                                                                  #  ANY MORE GROUP 5.EVEN RESTART VALUES SHOULD GO HERE
010160,000233: 
010161,000234: 01,2167           00310        5.3SPOT            DEC      200        B-14                       
010162,000235: 01,2170  E7,1515                                  EBANK=   DVCNTR                                
010163,000236: 01,2170           74166 01710                     -2CADR   REREADAC                              
010164,000237: 01,2172           77777        5.5SPOT            OCT      77777                                 
010165,000238: 01,2173  E7,1515                                  EBANK=   DVCNTR                                
010166,000239: 01,2173           74326 01710                     -2CADR   REDO5.5                               
010167,000240: 

Page 243

010169,000242: 01,2175           77777        5.7SPOT            OCT      77777                                 
010170,000243: 01,2176  E7,1515                                  EBANK=   DVCNTR                                
010171,000244: 01,2176           74361 01710                     -2CADR   BIBIBIAS                              
010172,000245:                                                                                                  #  ANY MORE GROUP 5.ODD RESTART VALUES SHOULD GO HERE
010173,000246: 
010174,000247: 01,2200  01,2016               6.2SPOT            EQUALS   1.2SPOT                               
010175,000248: 01,2200           00144        6.3SPOT            DEC      100        B-14                       
010176,000249: 01,2201  E7,1441                                  EBANK=   TIG                                   
010177,000250: 01,2201           75054 03710                     -2CADR   CLOKTASK                              
010178,000251: 01,2203           30000        6.5SPOT            OCT      30000                                 #  PROTECT INCREMENTING OF TIME2,TIME1 BY
010179,000252: 01,2204  E3,1706                                  EBANK=   TEPHEM                                #  P27(UPDATE PROGRAM) VIA V70 OR V73.
010180,000253: 01,2204           03562 10063                     2CADR    TIMEDIDR                              
010181,000254: 01,2206           17000        6.7SPOT            OCT      17000                                 
010182,000255: 01,2207  E7,1700                                  EBANK=   VGPREV                                
010183,000256: 01,2207           03354 74067                     2CADR    REDO6.7                               

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