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.

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

Page 238

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

Page 239

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

Page 240

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

Page 241

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

Page 242

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

Page 243

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

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