Source Code
These source-code files are part of a reconstructed copy of Sundial E, the
final release of the Block II Command Module (CM) Apollo Guidance Computer
(AGC) system test software.
They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 2003053-121, 2003053-151, and 2003972-211, belonging to the MIT Museum. Since only binary dumps (rather than listings) of Sundial 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. |
005198,000002: ## Copyright: Public domain.
005199,000003: ## Filename: FRESH_START_AND_RESTART.agc
005200,000004: ## Purpose: A section of Sundial E.
005201,000005: ## It is part of the reconstructed source code for the final
005202,000006: ## release of the Block II Command Module system test software. No
005203,000007: ## original listings of this program are available; instead, this
005204,000008: ## file was created via disassembly of dumps of Sundial core rope
005205,000009: ## modules and comparison with other AGC programs.
005206,000010: ## Assembler: yaYUL
005207,000011: ## Contact: Ron Burkey <info@sandroid.org>.
005208,000012: ## Website: www.ibiblio.org/apollo/index.html
005209,000013: ## Mod history: 2023-06-22 MAS Created from Aurora 12.
005210,000014: ## 2023-06-30 MAS Updated for Sundial E.
005211,000015: ## 2023-07-03 MAS Relocated Sundial D patches to T4RUPT PROGRAM.
005212,000016:
005213,000017: 12,2000 BANK 12
005214,000018: 12,2000 E3,1400 EBANK= LST1
005215,000019:
005216,000020: 12,2000 00004 SLAP1 INHINT # FRESH START. COMES HERE FROM PINBALL.
005217,000021: 12,2001 02210 TC STARTSUB # SUBROUTINE DOES MOST OF THE WORK.
005218,000022:
005219,000023: 12,2002 37634 CAF BIT15 # TURN OFF ALL DSPTAB +11D LAMPS ONLY ON
005220,000024: 12,2003 54322 TS DSPTAB +11D # REQUESTED FRESH START.
005221,000025:
005222,000026: 12,2004 37657 CAF ZERO # SAME STORY ON ZEROING FAILREG.
005223,000027: 12,2005 55363 TS FAILREG
005224,000028: 12,2006 55361 TS SMODE
005225,000029:
005226,000030: 12,2007 37657 DOFSTART CAF ZERO # DO A FRESH START,
005227,000031: 12,2010 54276 TS MODREG
005228,000032: 12,2011 54342 TS UPLOCK # FREE UPLINK INTERLOCK
005229,000033:
005230,000034: 12,2012 55073 TS PHASE0 # INITIALIZE PHASE TABLE - NO MISSION
005231,000035: 12,2013 55075 TS PHASE1 # PROGRAMS RUNNING.
005232,000036: 12,2014 55077 TS PHASE2
005233,000037: 12,2015 55101 TS PHASE3
005234,000038: 12,2016 55103 TS PHASE4
005235,000039: 12,2017 55105 TS PHASE5
005236,000040:
005237,000041: 12,2020 40000 COM
005238,000042: 12,2021 55072 TS -PHASE0
005239,000043: 12,2022 55074 TS -PHASE1
005240,000044: 12,2023 55076 TS -PHASE2
005241,000045: 12,2024 55100 TS -PHASE3
005242,000046: 12,2025 55102 TS -PHASE4
005243,000047: 12,2026 55104 TS -PHASE5
005244,000048:
005245,000049: 12,2027 32421 CAF IM30INIF # FRESH START IMU INITIALIZATION.
005246,000050: 12,2030 54361 TS IMODES30
005247,000051:
005248,000052: 12,2031 37641 CAF BIT10 # REMOVE IMU FAIL INHIBIT IN 5 SECS.
005249,000053: 12,2032 04451 TC WAITLIST
005250,000054: 12,2033 02247 26003 2CADR IFAILOK
005251,000055:
005252,000056: 12,2035 00006 EXTEND # LET T5 IDLE.
005253,000057: 12,2036 32373 DCA T5IDLER
005254,000058: 12,2037 52346 DXCH T5LOC
005255,000059:
005256,000060: 12,2040 00006 EXTEND # INITIALIZE SWITCHES ONLY ON FRESH START.
005257,000061: 12,2041 32427 DCA SWINIT
005258,000062: 12,2042 52062 DXCH STATE
005259,000063: 12,2043 00006 EXTEND
005260,000064: 12,2044 32431 DCA SWINIT +2
005261,000065: 12,2045 52064 DXCH STATE +2
005262,000066:
005263,000067: 12,2046 37645 ENDRSTRT CAF BIT6 # IF GIMBAL LOCK LAMP IS STILL ON,
005264,000068: 12,2047 70322 MASK DSPTAB +11D # IMU WAS FOUND IN GIMBAL LOCK IN RESTART
005265,000069: 12,2050 10000 CCS A # AND LEFT IN COARSE ALIGN. IN THIS CASE
005266,000070: 12,2051 47642 CS BIT9 # SET ISS OPERATE BIT IN IMODES30 TO
005267,000071: 12,2052 26361 ADS IMODES30 # OPERATE SO T4 INBIT MONITOR WONT ZERO
005268,000072:
005269,000073: 12,2053 00003 RELINT # THE CDUS AS IT DOES IN FRESH START.
005270,000074: 12,2054 04064 TC BANKCALL # DISPLAY MAJOR MODE.
005271,000075: 12,2055 12001 CADR DSPMM
005272,000076:
005273,000077: 12,2056 14365 STARTSW TCF DUMMYJOB +2 # PATCH FOR SIMULATION.
005274,000078:
005275,000079: 12,2057 37635 STARTSIM CAF BIT14
005276,000080: 12,2060 04307 TC FINDVAC
005277,000081: 12,2061 77777 OCT 77777 # FATAL IF NOT PATCHED AS ABOVE.
005278,000082: 12,2062 77777 OCT 77777
005279,000083:
005280,000084: 12,2063 14365 TCF DUMMYJOB +2 # DONT ZERO NEWJOB
005281,000085:
005282,000086: # COMES HERE FROM LOCATION 4000, GOJAM. RESTART ANY PROGRAMS WHICH MAY HAVE BEEN RUNNING AT THE TIME.
005283,000087:
005284,000088: 12,2064 03746 GOPROG TC GOPROG1
005285,000089:
005286,000090: 12,2065 02210 TC STARTSUB # COMMON INITIALIZATION ROUTINE.
005287,000091:
005288,000092: 12,2066 32424 CAF 9,6 # LEAVE PROGRAM ALARM AND GIMBAL LOCK
005289,000093: 12,2067 70322 MASK DSPTAB +11D # LAMPS INTACT ON RESTART.
005290,000094: 12,2070 67634 AD BIT15
005291,000095: 12,2071 56322 XCH DSPTAB +11D
005292,000096: 12,2072 77645 MASK BIT6
005293,000097: 12,2073 10000 CCS A # IF GIMBAL LOCK LAMP WAS ON, LEAVE ISS IN
005294,000098: 12,2074 37647 CAF BIT4 # COARSE ALIGN.
005295,000099: 12,2075 00006 EXTEND
005296,000100: 12,2076 05012 WOR 12
005297,000101:
005298,000102: 12,2077 34450 CAF PRIO37 # DISPLAY FAILREG AS INDICATION OF RESTART
005299,000103: 12,2100 04276 TC NOVAC # OR TO DISPLAY ABORT CODE AS ABOVE.
005300,000104: 12,2101 03113 02003 2CADR DOALARM
005301,000105:
005302,000106: 12,2103 37644 CAF BIT7 # DOFSTART IF MARK REJECT AND EITHER
005303,000107: 12,2104 00006 EXTEND # ERROR LIGHT RESET BUTTONS ARE DEPRESSED
005304,000108: 12,2105 02016 RAND 16
005305,000109: 12,2106 00006 EXTEND
005306,000110: 12,2107 12124 BZF PCLOOP -1 # VERIFY PHASE TABLE.
005307,000111:
005308,000112: 12,2110 42420 CS -ELR
005309,000113: 12,2111 00006 EXTEND
005310,000114: 12,2112 02016 RAND 16 # NAV DSKY KEYCODES,MARK,MARK REJECT
005311,000115: 12,2113 62420 AD -ELR
005312,000116: 12,2114 00006 EXTEND
005313,000117: 12,2115 12007 BZF DOFSTART
005314,000118:
005315,000119: 12,2116 42420 CS -ELR
005316,000120: 12,2117 00006 EXTEND
005317,000121: 12,2120 02015 RAND 15 # MAIN DSKY KEYCODES
005318,000122: 12,2121 62420 AD -ELR
005319,000123: 12,2122 00006 EXTEND
005320,000124: 12,2123 12007 BZF DOFSTART
005321,000125:
005322,000126: 12,2124 37227 -1 CAF NUMGRPS # VERIFY PHASE TABLE AGREEMENT.
005323,000127: 12,2125 54145 PCLOOP TS MPAC +5
005324,000128: 12,2126 60000 DOUBLE
005325,000129: 12,2127 00006 EXTEND
005326,000130: 12,2130 50000 INDEX A
005327,000131: 12,2131 31073 DCA -PHASE0 # COMPLEMENT INTO A - DIRECT INTO L.
005328,000132: 12,2132 00006 EXTEND
005329,000133: 12,2133 06001 RXOR L # RESULT MUST BE -0 FOR AGREEMENT.
005330,000134: 12,2134 10000 CCS A
005331,000135: 12,2135 12177 TCF PTBAD # RESTART FAILURE.
005332,000136: 12,2136 12177 TCF PTBAD
005333,000137: 12,2137 12177 TCF PTBAD
005334,000138: 12,2140 10145 CCS MPAC +5 # PROCESS ALL RESTART GROUPS.
005335,000139: 12,2141 12125 TCF PCLOOP
005336,000140:
005337,000141: 12,2142 54146 TS MPAC +6 # SET TO +0.
005338,000142: 12,2143 37227 CAF NUMGRPS # SEE IF ANY GROUPS RUNNING.
005339,000143: 12,2144 54145 NXTRST TS MPAC +5
005340,000144: 12,2145 60000 DOUBLE
005341,000145: 12,2146 50000 INDEX A
005342,000146: 12,2147 11073 CCS PHASE0
005343,000147: 12,2150 12173 TCF PACTIVE # PNZ - GROUP ACTIVE.
005344,000148: 12,2151 12166 TCF PINACT # +0 - GROUP NOT RUNNING.
005345,000149:
005346,000150: 12,2152 54140 PTERM TS MPAC # NNZ - TERMINATE REQUEST.
005347,000151: 12,2153 50145 INDEX MPAC +5 # PICK UP RESTART TERMINATE CADR.
005348,000152: 12,2154 32412 CAF RTERMCAD
005349,000153:
005350,000154: 12,2155 54001 PACT2 TS L
005351,000155: 12,2156 24140 INCR MPAC # ABS OF PHASE.
005352,000156: 12,2157 46027 CS LOW7 # SEE THAT MAG IS LESS THAN 128.
005353,000157: 12,2160 70140 MASK MPAC
005354,000158: 12,2161 10000 CCS A
005355,000159: 12,2162 12177 TCF PTBAD # BAD DATA.
005356,000160:
005357,000161: 12,2163 24146 INCR MPAC +6 # INDICATE GROUP DEMANDS PRESENT.
005358,000162: 12,2164 30001 CA L
005359,000163: 12,2165 04070 TC SWCALL # MUST RETURN TO SWRETURN.
005360,000164:
005361,000165: 12,2166 10145 PINACT CCS MPAC +5 # PROCESS ALL RESTART GROUPS.
005362,000166: 12,2167 12144 TCF NXTRST
005363,000167:
005364,000168: 12,2170 10146 TSTMPAC6 CCS MPAC +6 # IF NO GROUPS ACTIVE THIS REQUEST, DO A
005365,000169: 12,2171 12203 TCF DORSTART
005366,000170: 12,2172 12007 TCF DOFSTART # FRESH START
005367,000171:
005368,000172: 12,2173 54140 PACTIVE TS MPAC
005369,000173: 12,2174 50145 INDEX MPAC +5 # SELECT RESTART ACTIVE CADR.
005370,000174: 12,2175 32404 CAF RACTCADR
005371,000175: 12,2176 12155 TCF PACT2
005372,000176:
005373,000177: 12,2177 32202 PTBAD CAF OCT1107 # SET ADDITIONAL FAILURE TO SHOW PHASE
005374,000178: 12,2200 55364 TS SFAIL # TABLE DISAGREEMENT (WILL BE DISPLAYED
005375,000179: 12,2201 12007 TCF DOFSTART # IN R2).
005376,000180:
005377,000181: 12,2202 01107 OCT1107 OCT 1107 # ADDITIONAL ALARM CODE.
005378,000182:
005379,000183: 12,2203 32374 DORSTART CAF IFAILINH # LEAVE IMUFAILURE INHIBITS INTACT ON
005380,000184: 12,2204 70361 MASK IMODES30 # RESTART, RESETTING ALL FAILURE CODES.
005381,000185: 12,2205 62422 AD IM30INIR
005382,000186: 12,2206 54361 TS IMODES30
005383,000187: 12,2207 12046 TCF ENDRSTRT
005384,000188: # INITIALIZATION COMMON TO BOTH FRESH START AND RESTART.
005385,000189:
005386,000190: 12,2210 56002 STARTSUB XCH Q
005387,000191: 12,2211 54114 TS BUF # EXEC TEMPS ARE AVAILABLE TO US.
005388,000192:
005389,000193: 12,2212 37657 CAF ZERO # ZERO OUTBITS WITHIN 3MS OF RESTART.
005390,000194: 12,2213 00006 EXTEND
005391,000195: 12,2214 01012 WRITE 12
005392,000196: 12,2215 00006 EXTEND
005393,000197: 12,2216 01014 WRITE 14
005394,000198: 12,2217 00006 EXTEND
005395,000199: 12,2220 01011 WRITE 11
005396,000200: 12,2221 03757 TC STARTSB1
005397,000201: 12,2222 00006 STARTSB2 EXTEND
005398,000202: 12,2223 01013 WRITE 13
005399,000203:
005400,000204: 12,2224 37632 CAF POSMAX # T3 AND T4 OVERFLOW AS SOON AS POSSIBLE.
005401,000205: 12,2225 54030 TS TIME5 # SO DOES T5.
005402,000206: 12,2226 54026 TS TIME3 # (POSMAX IS PSEUDO INTERRUPT SIGNAL IN
005403,000207: 12,2227 54027 TS TIME4 # CASE RUPT SIGNALLED BEFORE TS TIME3).
005404,000208:
005405,000209: 12,2230 32403 CAF STARTEB
005406,000210: 12,2231 54003 TS EBANK # SET FOR E3
005407,000211:
005408,000212: 12,2232 37633 CAF NEG1/2 # INITIALIZE WAITLIST DELTA-TS.
005409,000213: 12,2233 55407 TS LST1 +7
005410,000214: 12,2234 55406 TS LST1 +6
005411,000215: 12,2235 55405 TS LST1 +5
005412,000216: 12,2236 55404 TS LST1 +4
005413,000217: 12,2237 55403 TS LST1 +3
005414,000218: 12,2240 55402 TS LST1 +2
005415,000219: 12,2241 55401 TS LST1 +1
005416,000220: 12,2242 55400 TS LST1
005417,000221:
005418,000222: 12,2243 44502 CS ENDTASK
005419,000223: 12,2244 55410 TS LST2
005420,000224: 12,2245 55412 TS LST2 +2
005421,000225: 12,2246 55414 TS LST2 +4
005422,000226: 12,2247 55416 TS LST2 +6
005423,000227: 12,2250 55420 TS LST2 +8D
005424,000228: 12,2251 55422 TS LST2 +10D
005425,000229: 12,2252 55424 TS LST2 +12D
005426,000230: 12,2253 55426 TS LST2 +14D
005427,000231: 12,2254 55430 TS LST2 +16D
005428,000232: 12,2255 44503 CS ENDTASK +1
005429,000233: 12,2256 55411 TS LST2 +1
005430,000234: 12,2257 55413 TS LST2 +3
005431,000235: 12,2260 55415 TS LST2 +5
005432,000236: 12,2261 55417 TS LST2 +7
005433,000237: 12,2262 55421 TS LST2 +9D
005434,000238: 12,2263 55423 TS LST2 +11D
005435,000239: 12,2264 55425 TS LST2 +13D
005436,000240: 12,2265 55427 TS LST2 +15D
005437,000241: 12,2266 55431 TS LST2 +17D
005438,000242:
005439,000243: 12,2267 47657 CS ZERO # MAKE ALL EXECUTIVE REGISTER SETS
005440,000244: 12,2270 54153 TS PRIORITY # AVAILABLE.
005441,000245: 12,2271 54167 TS PRIORITY +12D
005442,000246: 12,2272 54203 TS PRIORITY +24D
005443,000247: 12,2273 54217 TS PRIORITY +36D
005444,000248: 12,2274 54233 TS PRIORITY +48D
005445,000249: 12,2275 54247 TS PRIORITY +60D
005446,000250: 12,2276 54263 TS PRIORITY +72D
005447,000251:
005448,000252: 12,2277 54347 TS DSRUPTSW
005449,000253: 12,2300 54067 TS NEWJOB # SHOWS NO ACTIVE JOBS.
005450,000254:
005451,000255: 12,2301 32401 CAF VAC1ADRC # MAKE ALL VAC AREAS AVAILABLE.
005452,000256: 12,2302 54414 TS VAC1USE
005453,000257: 12,2303 62402 AD LTHVACA
005454,000258: 12,2304 54470 TS VAC2USE
005455,000259: 12,2305 62402 AD LTHVACA
005456,000260: 12,2306 54544 TS VAC3USE
005457,000261: 12,2307 62402 AD LTHVACA
005458,000262: 12,2310 54620 TS VAC4USE
005459,000263: 12,2311 62402 AD LTHVACA
005460,000264: 12,2312 54674 TS VAC5USE
005461,000265:
005462,000266: 12,2313 37654 CAF TEN # TURN OFF ALL DISPLAY SYSTEM RELAYS.
005463,000267: 12,2314 54140 DSPOFF TS MPAC
005464,000268: 12,2315 47637 CS BIT12
005465,000269: 12,2316 50140 INDEX MPAC
005466,000270: 12,2317 54307 TS DSPTAB
005467,000271: 12,2320 10140 CCS MPAC
005468,000272: 12,2321 02314 TC DSPOFF
005469,000273:
005470,000274: 12,2322 54045 TS INLINK
005471,000275: 12,2323 54341 TS DSPCNT
005472,000276: 12,2324 54323 TS CADRSTOR
005473,000277: 12,2325 54300 TS REQRET
005474,000278: 12,2326 54302 TS CLPASS
005475,000279: 12,2327 54277 TS DSPLOCK
005476,000280: 12,2330 54305 TS MONSAVE # KILL MONITOR
005477,000281: 12,2331 54306 TS MONSAVE1
005478,000282: 12,2332 54324 TS GRABLOCK
005479,000283: 12,2333 54266 TS VERBREG
005480,000284: 12,2334 54267 TS NOUNREG
005481,000285: 12,2335 54327 TS DSPLIST
005482,000286: 12,2336 54330 TS DSPLIST +1
005483,000287: 12,2337 54331 TS DSPLIST +2
005484,000288:
005485,000289: 12,2340 54365 TS MARKSTAT
005486,000290: 12,2341 54332 TS EXTVBACT # MAKE EXTENDED VERBS AVAILABLE
005487,000291: 12,2342 54363 TS IMUCADR
005488,000292: 12,2343 54364 TS OPTCADR
005489,000293: 12,2344 54351 TS LGYRO
005490,000294: 12,2345 37653 CAF NOUTCON
005491,000295: 12,2346 54303 TS NOUT
005492,000296:
005493,000297: 12,2347 32425 CAF OPTINIT
005494,000298: 12,2350 54354 TS OPTMODES
005495,000299:
005496,000300: 12,2351 37661 CAF NEGONE
005497,000301: 12,2352 54350 TS OPTIND # KILL COARSE OPTICS
005498,000302:
005499,000303: 12,2353 32423 CAF IM33INIT # NO PIP OR TM FAILS.
005500,000304: 12,2354 54362 TS IMODES33
005501,000305:
005502,000306: 12,2355 32400 CAF LESCHK # SELF CHECK GO-TO REGISTER.
005503,000307: 12,2356 55360 TS SELFRET
005504,000308: 12,2357 45470 CS VD1
005505,000309: 12,2360 54264 TS DSPCOUNT
005506,000310: 12,2361 E7,1426 EBANK= DNTMGOTO
005507,000311:
005508,000312: 12,2361 32376 CAF LDNTMGO # SET UP TM PROGRAM.
005509,000313: 12,2362 54003 TS EBANK
005510,000314:
005511,000315: 12,2363 32375 CAF LDNPHAS1
005512,000316: 12,2364 55426 TS DNTMGOTO
005513,000317:
005514,000318: 12,2365 32377 CAF NOMTMLST # SET UP NOMINAL DOWNLINK LIST.
005515,000319: 12,2366 54413 TS DNLSTADR
005516,000320:
005517,000321: 12,2367 00114 TC BUF
005518,000322:
005519,000323: 12,2370 30001 T5IDLOC CA L # T5RUPT COMES HERE EVERY 163.84 SECS
005520,000324: 12,2371 14514 TCF NOQRSM +1 # WHEN NOBODY IS USING IT.
005521,000325:
005522,000326: 12,2372 02370 24007 T5IDLER 2CADR T5IDLOC
005523,000327:
005524,000328: 12,2374 00035 IFAILINH OCT 35 # ISS FAILURE INHIBIT BITS.
005525,000329: 12,2375 03522 LDNPHAS1 GENADR DNPHASE1
005526,000330: 12,2376 03426 LDNTMGO ECADR DNTMGOTO
005527,000331: 12,2377 03724 NOMTMLST GENADR NOMDNLST
005528,000332: 12,2400 02101 LESCHK GENADR SELFCHK
005529,000333: 12,2401 00414 VAC1ADRC ADRES VAC1USE
005530,000334: 12,2402 00054 LTHVACA DEC 44 B-14
005531,000335:
005532,000336: 12,2403 01400 STARTEB ECADR LST1
005533,000337: 12,2404 7227 NUMGRPS EQUALS FIVE # SIX GROUPS CURRENTLY.
005534,000338:
005535,000339: # WHERE TO GO ON RESTART IF GROUP ACTIVE:
005536,000340:
005537,000341: 12,2404 32555 RACTCADR CADR PRELGO # RESTARTS DURING PRELAUNCH ALIGNMENT
005538,000342: 12,2405 35474 CADR OPTMSTRT # RESTARTS DURING OPTM ALIGN CALIBRATION
005539,000343: 12,2406 00000 CADR 10000
005540,000344: 12,2407 00000 CADR 10000
005541,000345: 12,2410 00000 CADR 10000
005542,000346: 12,2411 00000 CADR 10000
005543,000347:
005544,000348: # WHERE TO GO ON RESTART IF TERMINATE REQUESTED.
005545,000349:
005546,000350: 12,2412 00000 RTERMCAD CADR 10000
005547,000351: 12,2413 00000 CADR 10000
005548,000352: 12,2414 00000 CADR 10000
005549,000353: 12,2415 00000 CADR 10000
005550,000354: 12,2416 00000 CADR 10000
005551,000355: 12,2417 00000 CADR 10000
005552,000356:
005553,000357: 12,2420 77755 -ELR OCT -22 # -ERROR LIGHT RESET KEY CODE.
005554,000358: 12,2421 37411 IM30INIF OCT 37411 # INHIBITS IMU FAIL FOR 5 SEC AND PIP ISSW
005555,000359: 12,2422 37400 IM30INIR OCT 37400 # LEAVE FAIL INHIBITS ALONE.
005556,000360: 12,2423 16000 IM33INIT OCT 16000 # NO PIP OR TM FAIL SIGNALS.
005557,000361: 12,2424 00440 9,6 OCT 440 # MASK FOR PROG ALARM AND GIMBAL LOCK.
005558,000362: 12,2425 00130 OPTINIT OCT 130
005559,000363: 12,2426 00000 SWINIT OCT 0
005560,000364: 12,2427 00000 OCT 0
005561,000365: 12,2430 00000 OCT 0
005562,000366: 12,2431 00000 OCT 0
005563,000367:
005564,000368: 12,2432 ENDFRESS EQUALS
End of include-file FRESH_START_AND_RESTART.agc. Parent file is MAIN.agc