Source Code

These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

008691,000002:                                                                                                  ## Copyright:   Public domain.
008692,000003:                                                                                                  ## Filename:    RESTART_TABLES.agc
008693,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
008694,000005:                                                                                                  ##              as closely as possible with available information. Sundance
008695,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
008696,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
008697,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
008698,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
008699,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
008700,000011:                                                                                                  ##              or the Sundance GSOPs.
008701,000012:                                                                                                  ## Assembler:   yaYUL
008702,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
008703,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
008704,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
008705,000016: 
008706,000017: 
008707,000018: 
008708,000019:                                                                                                  #  RESTART TABLES
008709,000020: 
008710,000021:                                                                                                  #  ------------------
008711,000022: 
008712,000023:                                                                                                  #  THERE ARE TWO FORMS OF RESTART TABLES FOR EACH GROUP.  THEY ARE KNOWN AS THE EVEN RESTART TABLES AND THE ODD
008713,000024:                                                                                                  #  RESTART TABLES.  THE ODD TABLES HAVE ONLY ONE ENTRY OF THREE LOCATIONS WHILE THE EVEN TABLES HAVE TWO ENTRIES
008714,000025:                                                                                                  #  EACH USING THREE LOCATIONS. THE INFORMATION AS TO WHETHER IT IS A JOB, WAITLIST, OR A LONGCALL IS GIVEN BY THE
008715,000026:                                                                                                  #  WAY THINGS ARE PUT INTO THE TABLES.
008716,000027:                                                                                                  #       A JOB HAS ITS PRIORITY STORED IN PRDTTAB OF THE CORRECT PHASE SPOT - A POSITIVE PRIORITY INDICATES A
008717,000028:                                                                                                  #  FINDVAC JOB, A NEGATIVE PRIORITY A NOVAC.  THE 2CADR OF THE JOB IS STORED IN THE CADRTAB.
008718,000029:                                                                                                  #  FOR EXAMPLE,
008719,000030: 
008720,000031:                                                                                                  #                                          5.7SPOT  OCT    23000
008721,000032:                                                                                                  #                                                   2CADR  SOMEJOB
008722,000033: 
008723,000034:                                                                                                  #  A RESTART OF GROUP 5 WITH PHASE SEVEN WOULD THEN CAUSE SOMEJOB TO BE RESTARTED AS A FINDVAC WITH PRIORITY 23.
008724,000035: 
008725,000036:                                                                                                  #                                          5.5SPOT  OCT    -23000
008726,000037:                                                                                                  #                                                   2CADR  ANYJOB
008727,000038: 
008728,000039:                                                                                                  #  HERE A RESTART OF GROUP 5 WITH PHASE 7 WOULD CAUSE ANYJOB TO BE RESTARTED AS A NOVAC WITH PRIORITY 23.
008729,000040:                                                                                                  #  A LONGCALL HAS ITS GENADR OF ITS 2CADR STORED NEGATIVELY AND ITS BBCON STORED POSITIVELY.  IN ITS PRDTTAB IS
008730,000041:                                                                                                  #  PLACED THE LOCATION OF A DP REGISTER THAT CONTAINS THE DELTA TIME THAT LONGCALL HAD BEEN ORIGINALLY STARTED
008731,000042:                                                                                                  #  WITH.  EXAMPLE,
008732,000043: 
008733,000044:                                                                                                  #                                          3.6SPOT  GENADR DELTAT
008734,000045:                                                                                                  #                                                  -GENADR LONGTASK
008735,000046:                                                                                                  #                                                   BBCON  LONGTASK
008736,000047: 
008737,000048:                                                                                                  #                                                   OCT    31000
008738,000049:                                                                                                  #                                                   2CADR  JOBAGAIN
008739,000050: 
008740,000051:                                                                                                  #  THIS WOULD START UP LONGTASK AT THE APPROPRIATE TIME, OR IMMEDIATELY IF THE TIME HAD ALREADY PASSED. IT SHOULD
008741,000052:                                                                                                  #  BE NOTED THAT IF DELTAT IS IN A SWITCHED E BANK, THIS INFORMATOIN SHOULD BE IN THE BBCON OFTHE 2CADR OF THE
008742,000053:                                                                                                  #  TASK.  FROM ABOVE, WE SEE THAT THE SECOND PART OF THIS PHASE WOULD BE STARTED AS A JOB WITH A PRIORITY OF 31.
008743,000054: 
008744,000055:                                                                                                  #  WAITLIST CALLS ARE IDENTIFIED BY THE FACT THAT THEIR 2CADR IS STORED NEGATIVELY. IF PRDTTAB OF THE PHASE SPOT
008745,000056:                                                                                                  #  IS POSITIVE, THEN IT CONTAINS THE DELTA TIME, IF PRDTTAB IS NEGATIVE THEN IT IS THE -GENADR OF AN ERASABLE
008746,000057:                                                                                                  #  LOCATION CONTAINING THE DELTA TIME, THAT IS, THE TIME IS STORED INDIRECTLY.  IT SHOULD BE NOTED AS ABOVE, THAT
008747,000058:                                                                                                  #  IF THE TIME IS STORED INDIRECTLY, THE BBCON MUST CONTAIN THE NECESSARY E BANK INFORMATION IF APPLICABLE.  WITH
008748,000059:                                                                                                  #  WAITLIST WE HAVE ONE FURTHER OPTION, IF -0 IS STORED IN PRDTTAB, IT WILL CAUSE AN IMMEDIATE RESTART OF THE
008749,000060:                                                                                                  #  TASK.  EXAMPLES,
008750,000061: 
008751,000062:                                                                                                  #                                                   OCT    77777           THIS WILL CAUSE AN IMMEDIATE RESTART
008752,000063:                                                                                                  #                                                  -2CADR  ATASK           OF THE TASK :ATASK:
008753,000064: 
008754,000065:                                                                                                  #                                                   DEC    200             IF THE TIME OF THE 2 SECONDS SINCE DUMMY
008755,000066:                                                                                                  #                                                  -2CADR  DUMMY           WAS PUT ON WAITLIST IS UP, IT WILL BEGIN
008756,000067:                                                                                                  #                                                                          IN 10 MS, OTHERWISE IT WILL BEGIN WHEN
008757,000068:                                                                                                  #                                                                          IT NORMALLY WOULD HAVE BEGUN.
008758,000069: 
008759,000070:                                                                                                  #                                                  -GENADR DTIME           WHERE DTIME CONTAINS THE DELTA TIME
008760,000071:                                                                                                  #                                                  -2CADR  TASKTASK        OTHERWISE THIS IS AS ABOVE
008761,000072: 
008762,000073:                                                                                                  #  *****    NOW THE TABLES THEMSELVES *****
008763,000074: 
008764,000075: 01,2000                                           BANK     01                                    
008765,000076: 01,2000                                           SETLOC   RESTART                               
008766,000077: 01,2000                                           BANK                                           
008767,000078: 
008768,000079: 01,2000                        PRDTTAB            EQUALS   12000                                 #  USED TO FIND THE PRIORITY OR DELTATIME
008769,000080: 01,2000                        CADRTAB            EQUALS   12001                                 #  THIS AND THE NEXT RELATIVE LOC CONTAIN
008770,000081:                                                                                                  #  RESTART 2CADR
008771,000082: 
008772,000083: 01,2000                                           COUNT*   $$/RSTAB                              #  TABLES IN BANK 1.
008773,000084: 01,2000           00006        SIZETAB            TC       1.2SPOT    -12006                     
008774,000085: 01,2001           00016                           TC       1.3SPOT    -12004                     
008775,000086: 01,2002           00006                           TC       2.2SPOT    -12006                     
008776,000087: 01,2003           00024                           TC       2.3SPOT    -12004                     
008777,000088: 01,2004           00006                           TC       3.2SPOT    -12006                     
008778,000089: 01,2005           00046                           TC       3.3SPOT    -12004                     
008779,000090: 01,2006           00047                           TC       4.2SPOT    -12006                     
008780,000091: 01,2007           00057                           TC       4.3SPOT    -12004                     
008781,000092: 01,2010           00113                           TC       5.2SPOT    -12006                     
008782,000093: 01,2011           00137                           TC       5.3SPOT    -12004                     
008783,000094: 01,2012           00006                           TC       6.2SPOT    -12006                     
008784,000095: 01,2013           00150                           TC       6.3SPOT    -12004                     
008785,000096: 01,2014           21000        1.2SPOT            OCT      21000                                 #  A DUMMY EXAMPLE TO BE REPLACED AS SOON
008786,000097: 01,2015     0074                                  EBANK=   STATE                                 
008787,000098: 01,2015           05225 04060                     2CADR    ENDOFJOB                              #  AS THERE IS A LEGITIMATE 1.2SPOT
008788,000099: 01,2017           00144                           DEC      100        B-14                       
008789,000100: 01,2020     0074                                  EBANK=   STATE                                 
008790,000101: 01,2020           05331 04060                     2CADR    TASKOVER                              
008791,000102: 
008792,000103:                                                                                                  #  ANY MORE GROUP 1.EVEN RESTART VALUES SHOULD GO HERE
008793,000104: 
008794,000105: 01,2022           76321        1.3SPOT            -GENADR  SAVET-30                              
008795,000106: 01,2023  E7,1472                                  EBANK=   DVCNTR                                
008796,000107: 01,2023           75401 03710                     -2CADR   ULLGTASK                              
008797,000108: 01,2025           10000        1.5SPOT            OCT      10000                                 
008798,000109: 01,2026  E7,1702                                  EBANK=   VG                                    
008799,000110: 01,2026           03071 56067                     2CADR    S40.9                                 
008800,000111:                                                                                                  #  ANY MORE GROUP 1.ODD RESTART VALUES SHOULD GO HERE
008801,000112: 
008802,000113: 01,2030  01,2014               2.2SPOT            EQUALS   1.2SPOT                               
008803,000114:                                                                                                  #  ANY MORE GROUP 2.EVEN RESTART VALUES SHOULD GO HERE
008804,000115: 
008805,000116: 01,2030           02606        2.3SPOT            GENADR   600SECS                               
008806,000117: 01,2031           75215                           -GENADR  STATEINT                              
008807,000118: 01,2032  E3,1554                                  EBANK=   RRECTCSM                              
008808,000119: 01,2032           26063                           BBCON    STATEINT                              
008809,000120: 
008810,000121: 01,2033           05000        2.5SPOT            OCT      05000                                 
008811,000122: 01,2034  E3,1554                                  EBANK=   RRECTCSM                              
008812,000123: 01,2034           02571 26063                     2CADR    STATINT1                              
008813,000124: 01,2036           02734        2.7SPOT            DEC      1500       B-14                       
008814,000125: 01,2037  E7,1433                                  EBANK=   LOSCOUNT                              
008815,000126: 01,2037           75565 27710                     -2CADR   P20LEMC1                              
008816,000127: 
008817,000128: 01,2041           14000        2.11SPOT           OCT      14000                                 
008818,000129: 01,2042  E7,1745                                  EBANK=   P21TIME                               
008819,000130: 01,2042           02367 50067                     2CADR    P25LEM1                               
008820,000131: 01,2044           10000        2.13SPOT           OCT      10000                                 
008821,000132: 01,2045  E7,1433                                  EBANK=   LOSCOUNT                              
008822,000133: 01,2045           02232 54067                     2CADR    RELINUS                               
008823,000134: 01,2047           26000        2.15SPOT           OCT      26000                                 
008824,000135: 01,2050  E7,1433                                  EBANK=   LOSCOUNT                              
008825,000136: 01,2050           02636 50067                     2CADR    R22RSTRT                              
008826,000137:                                                                                                  #  ANY MORE GROUP 2.ODD RESTART VALUES SHOULD GO HERE.
008827,000138: 
008828,000139: 01,2052  01,2014               3.2SPOT            EQUALS   1.2SPOT                               
008829,000140:                                                                                                  #  ANY MORE GROUP 3.EVEN RESTART VALUES SHOULD GO HERE
008830,000141: 
008831,000142: 01,2052           76356        3.3SPOT            -GENADR  ZOOMTIME                              
008832,000143: 01,2053  E7,1472                                  EBANK=   DVCNTR                                
008833,000144: 01,2053           75211 03710                     -2CADR   ZOOM                                  
008834,000145:                                                                                                  #  ANY MORE GROUP 3.ODD RESTART VALUES SHOULD GO HERE
008835,000146: 
008836,000147: 01,2055           04704        4.2SPOT            DEC      2500       B-14                       
008837,000148: 01,2056  E7,1426                                  EBANK=   TTOGO                                 
008838,000149: 01,2056           75375 03710                     -2CADR   TIG-5                                 
008839,000150: 01,2060           77777                           OCT      77777                                 
008840,000151: 01,2061  E7,1426                                  EBANK=   TTOGO                                 
008841,000152: 01,2061           75405 03710                     -2CADR   REDO4.2                               
008842,000153:                                                                                                  #  ANY MORE GROUP 4.EVEN RESTART VALUES SHOULD GO HERE
008843,000154: 
008844,000155: 01,2063           00000        4.3SPOT            OCT      0                                     
008845,000156: 01,2064           00000                           OCT      0                                     
008846,000157: 01,2065           00000                           OCT      0                                     
008847,000158: 01,2066           00062        4.5SPOT            DEC      50         B-14                       
008848,000159: 01,2067  E7,1426                                  EBANK=   TTOGO                                 
008849,000160: 01,2067           75225 03710                     -2CADR   ULLAGOFF                              
008850,000161: 01,2071           00764        4.7SPOT            DEC      500        B-14                       
008851,000162: 01,2072  E7,1472                                  EBANK=   DVCNTR                                
008852,000163: 01,2072           75351 03710                     -2CADR   TIG-0                                 
008853,000164: 01,2074           76303        4.11SPOT           -GENADR  TGO        +1                         
008854,000165: 01,2075  E7,1472                                  EBANK=   DVCNTR                                
008855,000166: 01,2075           74240 03710                     -2CADR   ENGOFTSK                              
008856,000167: 01,2077           12000        4.13SPOT           OCT      12000                                 
008857,000168: 01,2100  E7,1447                                  EBANK=   TRKMKCNT                              
008858,000169: 01,2100           03206 74067                     2CADR    POSTBURN                              
008859,000170: 
008860,000171: 01,2102           00764        4.15SPOT           DEC      500        B-14                       
008861,000172: 01,2103  E7,1426                                  EBANK=   TTOGO                                 
008862,000173: 01,2103           75444 03710                     -2CADR   TIG-30                                
008863,000174: 01,2105           77777        4.17SPOT           OCT      77777                                 
008864,000175: 01,2106  E7,1472                                  EBANK=   DVCNTR                                
008865,000176: 01,2106           75375 03710                     -2CADR   TIG-5                                 
008866,000177: 01,2110           13000        4.21SPOT           OCT      13000                                 
008867,000178: 01,2111  E5,1730                                  EBANK=   STAR                                  
008868,000179: 01,2111           02322 30065                     2CADR    R51.1      +1                         
008869,000180: 01,2113           77777        4.23SPOT           OCT      77777                                 
008870,000181: 01,2114  E7,1472                                  EBANK=   DVCNTR                                
008871,000182: 01,2114           75331 03710                     -2CADR   IGNITION                              
008872,000183: 01,2116           01456        4.25SPOT           GENADR   SAVET-30                              
008873,000184: 01,2117           75502                           -GENADR  TIG-35                                
008874,000185: 01,2120  E7,1456                                  EBANK=   SAVET-30                              
008875,000186: 01,2120           74067                           BBCON    TIG-35                                
008876,000187:                                                                                                  #  ANY MORE 4.ODD RESTART VALUES SHOULD GO HERE.
008877,000188: 
008878,000189: 01,2121           22000        5.2SPOT            OCT      22000                                 
008879,000190: 01,2122  E7,1472                                  EBANK=   DVCNTR                                
008880,000191: 01,2122           02360 66067                     2CADR    NORMLIZE                              
008881,000192: 01,2124           00310                           DEC      200        B-14                       
008882,000193: 01,2125  E7,1472                                  EBANK=   DVCNTR                                
008883,000194: 01,2125           75305 11710                     -2CADR   REREADAC                              
008884,000195: 
008885,000196: 01,2127           00310        5.4SPOT            DEC      200        B-14                       
008886,000197: 01,2130  E7,1472                                  EBANK=   DVCNTR                                
008887,000198: 01,2130           75305 11710                     -2CADR   REREADAC                              
008888,000199: 
008889,000200: 01,2132           20000                           OCT      20000                                 
008890,000201: 01,2133  E7,1472                                  EBANK=   DVCNTR                                
008891,000202: 01,2133           02127 66067                     2CADR    SERVICER                              
008892,000203: 
008893,000204: 01,2135           45777        5.6SPOT            OCT      45777                                 
008894,000205: 01,2136  E3,1460                                  EBANK=   NBDX                                  
008895,000206: 01,2136           03651 14063                     2CADR    NORMBIAS                              
008896,000207: 
008897,000208: 01,2140           00310                           DEC      200        B-14                       
008898,000209: 01,2141  E7,1472                                  EBANK=   DVCNTR                                
008899,000210: 01,2141           75305 11710                     -2CADR   REREADAC                              
008900,000211:                                                                                                  #  ANY MORE GROUP 5.EVEN RESTART VALUES SHOULD GO HERE
008901,000212: 
008902,000213: 01,2143           00310        5.3SPOT            DEC      200        B-14                       
008903,000214: 01,2144  E7,1472                                  EBANK=   DVCNTR                                
008904,000215: 01,2144           75305 11710                     -2CADR   REREADAC                              
008905,000216: 
008906,000217: 01,2146           77777        5.5SPOT            OCT      77777                                 
008907,000218: 01,2147  E7,1472                                  EBANK=   DVCNTR                                
008908,000219: 01,2147           75712 11710                     -2CADR   REDO5.5                               
008909,000220: 
008910,000221: 01,2151           77777        5.7SPOT            OCT      77777                                 
008911,000222: 01,2152  E7,1472                                  EBANK=   DVCNTR                                
008912,000223: 01,2152           75770 11710                     -2CADR   BIBIBIAS                              
008913,000224:                                                                                                  #  ANY MORE GROUP 5.ODD RESTART VALUES SHOULD GO HERE
008914,000225: 
008915,000226: 01,2154  01,2014               6.2SPOT            EQUALS   1.2SPOT                               
008916,000227: 01,2154           00144        6.3SPOT            DEC      100        B-14                       
008917,000228: 01,2155  E7,1424                                  EBANK=   TIG                                   
008918,000229: 01,2155           75070 03710                     -2CADR   CLOKTASK                              
008919,000230: 01,2157           30000        6.5SPOT            OCT      30000                                 #  PROTECT INCREMENTING OF TIME2,TIME1 BY
008920,000231: 01,2160  E3,1706                                  EBANK=   TEPHEM                                #  P27(UPDATE PROGRAM) VIA V70 OR V73.
008921,000232: 01,2160           03422 10063                     2CADR    TIMEDIDR                              
008922,000233: 01,2162           17000        6.7SPOT            OCT      17000                                 
008923,000234: 01,2163  E7,1673                                  EBANK=   VGPREV                                
008924,000235: 01,2163           03333 74067                     2CADR    REDO6.7                               

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