Source Code
These source-code files are part of a reconstructed copy of Corona 261, the
final, flown release of the Block I Command Module (CM) Apollo Guidance Computer
(AGC) software for the AS-202 mission.
They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on the mission, part numbers 1003733-171, 1003733-241, 1003733-191, 1003733-211, 1003733-221, and 1003733-241. The source code for the Apollo 4 and 6 software, Solarium 55, was used as a starting point, since it was directly derived from Corona and (at least in theory) only minimally modified. Since only binary dumps (rather than listings) of Corona 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. |
004521,000002: ## Copyright: Public domain.
004522,000003: ## Filename: RESTART_CONTROL.agc
004523,000004: ## Purpose: A section of Corona revision 261.
004524,000005: ## It is part of the source code for the Apollo Guidance Computer
004525,000006: ## (AGC) for AS-202. No original listings of this software are
004526,000007: ## available; instead, this file was created via disassembly of
004527,000008: ## the core rope modules actually flown on the mission.
004528,000009: ## Assembler: yaYUL
004529,000010: ## Contact: Ron Burkey <info@sandroid.org>.
004530,000011: ## Website: www.ibiblio.org/apollo/index.html
004531,000012: ## Mod history: 2023-05-27 MAS Created from Solarium 55.
004532,000013: ## 2023-06-17 MAS Changed a comment from 501 to 202.
004533,000014:
004534,000015:
004535,000016: 2276 BANK 1
004536,000017:
004537,000018: # OF THE PHASE TABLE IN ALMOST CONTSTANT AGREEMENT. CALLING SEQUENCES ARE AS FOLLOWS:
004538,000019:
004539,000020: # TC PHASCHNG CHANGE GROUP G TO PHASE PPP (127 MAX).
004540,000021: # OCT PPP0G (CALL UNDER EXECUTIVE ONLY)
004541,000022:
004542,000023: # CAF -- CHANGE GROUP G TO THE PHASE ARRIVING IN
004543,000024: # TC NEWPHASE A (MAY BE CALLED ANYTIME).
004544,000025: # OCT 0000G
004545,000026:
004546,000027: # IN EACH CASE THE OLD PHASE IS RETURNED TO THE CALLER IN A. IF THE OLD PHASE WAS +0, CONTROL IS
004547,000028: # GIVEN TO A ROUTINE SPECIFIED IN A CADR TABLE. THIS ROUTINE MAY EXIT OR RETURN TO CALLER VIA SWRETURN.
004548,000029:
004549,000030: 2276 30001 PHASCHNG XCH Q
004550,000031: 2277 20017 INHINT
004551,000032: 2300 50642 TS RUPTREG4
004552,000033: 2301 20000 INDEX A
004553,000034: 2302 30000 CAF 0
004554,000035: 2303 50601 TS PHASDATA
004555,000036: 2304 73226 MASK LOW5 # (MAY WANT MORE GROUPS SOME DAY)
004556,000037: 2305 30601 XCH PHASDATA
004557,000038: 2306 25777 EXTEND
004558,000039: 2307 42311 MP -BIT9 # NOTE LP NOT SAVED.
004559,000040: 2310 02321 TC PHASCH2
004560,000041:
004561,000042: 2311 77377 -BIT9 OCT -400
004562,000043:
004563,000044: 2312 20017 NEWPHASE INHINT
004564,000045: 2313 30001 XCH Q
004565,000046: 2314 50642 TS RUPTREG4
004566,000047: 2315 20000 INDEX A
004567,000048: 2316 30000 CAF 0
004568,000049: 2317 50601 TS PHASDATA
004569,000050:
004570,000051: 2320 40001 CS Q
004571,000052: 2321 20601 PHASCH2 INDEX PHASDATA
004572,000053: 2322 50655 TS -PHASE1 -1 # PHASE1 IS FOR PROG NUM 1.
004573,000054: 2323 40000 COM
004574,000055: 2324 20601 INDEX PHASDATA
004575,000056: 2325 30647 XCH PHASE1 -1 # INTO PHASE1 FOR PROG 1.
004576,000057:
004577,000058: 2326 10000 CCS A
004578,000059: 2327 02332 TC +3
004579,000060:
004580,000061: 2330 02341 TC UPT # ON +0.
004581,000062:
004582,000063: 2331 45503 CS TWO # -1 IS INACTIVE STATE
004583,000064: 2332 64516 +3 AD ONE
004584,000065:
004585,000066: 2333 30642 PHASEXIT XCH RUPTREG4
004586,000067: 2334 64516 AD ONE
004587,000068: 2335 50001 TS Q # WE MUST RELINT BEFORE RETURN.
004588,000069: 2336 30642 XCH RUPTREG4 # OLD PHASE BITS.
004589,000070: 2337 20016 RELINT
004590,000071: 2340 00001 TC Q
004591,000072:
004592,000073: 2341 20601 UPT INDEX PHASDATA
004593,000074: 2342 36651 CAF UPTCADR -1
004594,000075: 2343 05662 TC SWCALL
004595,000076:
004596,000077: 2344 35501 CAF ZERO # IF RETURN
004597,000078: 2345 02333 TC PHASEXIT
004598,000079:
004599,000080:
004600,000081: # MAJOR MODE LIGHT MAINTENANCE ROUTINES.
004601,000082:
004602,000083: # ROUTINE TO CHECK EQUALITY BETWEEN THE MAJOR MODE DISPLAY AND THE ARGUMENT AT CALLER +1. RETURNS TO
004603,000084: # CALLER +2 IF NOT AND CALLER +3 IF SO.
004604,000085:
004605,000086: 2346 34516 CHECKMM CAF ONE
004606,000087: 2347 60001 AD Q
004607,000088: 2350 30001 XCH Q
004608,000089: 2351 20000 INDEX A
004609,000090: 2352 40000 CS 0
004610,000091: 2353 60612 AD MODREG
004611,000092: 2354 10000 CCS A
004612,000093: 2355 00001 TC Q
004613,000094: 2356 00017 FINEMASK OCT 17
004614,000095: 2357 00001 TC Q
004615,000096: 2360 20001 INDEX Q
004616,000097: 2361 00001 TC Q
004617,000098:
004618,000099: # TO UPDATE THE MAJOR MODE LIGHTS:
004619,000100:
004620,000101: 2362 20001 NEWMODE INDEX Q
004621,000102: 2363 30000 CAF 0
004622,000103: 2364 50612 TS MODREG
004623,000104: 2365 33322 CAF GRABUSY +1 # CADR OF BANK CONTAINING DSPMM.
004624,000105: 2366 30015 XCH BANKREG
004625,000106: 2367 50116 TS MPAC +1 # MPACS NOT USED BY DSPMM.
004626,000107: 2370 30001 XCH Q
004627,000108: 2371 50115 TS MPAC
004628,000109: 2372 06003 TC DSPMM
004629,000110:
004630,000111: 2373 30116 XCH MPAC +1
004631,000112: 2374 50015 TS BANKREG
004632,000113: 2375 20115 INDEX MPAC
004633,000114: 2376 00001 TC 1
004634,000115:
004635,000116:
004636,000117: # PROGRAM PRGSTALL IS AN EXECUTIVE INTERLOCK ROUTINE. REQUESTING PROGS DO
004637,000118: # TC BANKCALL
004638,000119: # CADR PRGSTALL
004639,000120: # RETURN IS TO L+2 AFTER TWO PROGS HAVE CALLED.
004640,000121:
004641,000122:
004642,000123:
004643,000124: 04,6624 BANK 4
004644,000125: 04,6624 20017 PRGSTALL INHINT
004645,000126: 04,6625 40645 CS STATE
004646,000127: 04,6626 74516 MASK PRGBIT
004647,000128: 04,6627 50001 TS Q
004648,000129: 04,6630 44516 CS PRGBIT
004649,000130: 04,6631 70645 MASK STATE
004650,000131: 04,6632 60001 AD Q
004651,000132: 04,6633 50645 TS STATE
004652,000133: 04,6634 10001 CCS Q
004653,000134: 04,6635 06642 TC PRGSLEEP
004654,000135: 04,6636 36651 CAF LPRGRET
004655,000136: 04,6637 02060 TC JOBWAKE
004656,000137: 04,6640 20016 RELINT
004657,000138: 04,6641 05702 TC SWRETURN
004658,000139:
004659,000140: 04,6642 05706 PRGSLEEP TC MAKECADR
004660,000141: 04,6643 30062 XCH ADDRWD
004661,000142: 04,6644 50117 TS MPAC +2
004662,000143: 04,6645 36651 CAF LPRGRET
004663,000144: 04,6646 02127 TC JOBSLEEP
004664,000145:
004665,000146: 04,6647 30117 PRGRET XCH MPAC +2
004666,000147: 04,6650 05723 TC BANKJUMP
004667,000148:
004668,000149: 04,6651 10647 LPRGRET CADR PRGRET
004669,000150: 04,6652 4516 PRGBIT EQUALS BIT1
004670,000151:
004671,000152: 04,6652 10652 UPTCADR CADR 10652
004672,000153:
004673,000154:
004674,000155: # PINBALL COMES TO MODROUT ON RECEIVING THE NEW MODE REQUESTED BY VERB 37. THE DESIRED MODE IN IS A
004675,000156: # ON ARRIVAL.
004676,000157:
004677,000158: 04,6653 20017 MODROUT INHINT
004678,000159: 04,6654 64341 AD NEG3 # FOR FLIGHT 202, ONLY MODES 01 AND 03 MAY
004679,000160: 04,6655 10000 CCS A # BE INITIATED BY VERB 37.
004680,000161: 04,6656 06703 TC V37BAD
004681,000162: 04,6657 03070 TC CCSHOLE
004682,000163: 04,6660 06670 TC 1CHECK # SEE IF 01 CALLED FOR.
004683,000164:
004684,000165: 04,6661 02346 TC CHECKMM # MODE 03 REQUESTED - DEMANDS MODE 02
004685,000166: 04,6662 00002 OCT 02 # PRESENTLY.
004686,000167: 04,6663 06703 TC V37BAD
004687,000168:
004688,000169: 04,6664 32150 CAF PRIO14 # START OPTICAL CHECK.
004689,000170: 04,6665 02046 TC FINDVAC
004690,000171: 04,6666 43273 CADR CHKOPT
004691,000172: 04,6667 02124 TC ENDOFJOB
004692,000173:
004693,000174: 04,6670 64335 1CHECK AD MINUS1 # SEE IF 01 REQUESTED.
004694,000175: 04,6671 10000 CCS A
004695,000176: 04,6672 06703 TC V37BAD
004696,000177: 04,6673 03070 TC CCSHOLE
004697,000178: 04,6674 06703 TC V37BAD
004698,000179:
004699,000180: 04,6675 10612 CCS MODREG # DEMAND IDLE MODE.
004700,000181: 04,6676 06703 TC V37BAD
004701,000182:
004702,000183: 04,6677 34501 CAF PRIO20
004703,000184: 04,6700 02046 TC FINDVAC
004704,000185: 04,6701 42000 CADR TOP1
004705,000186: 04,6702 02124 TC ENDOFJOB
004706,000187:
004707,000188: 04,6703 03241 V37BAD TC FALTON # ILLEGAL REQUEST.
004708,000189: 04,6704 02124 TC ENDOFJOB
004709,000190:
End of include-file RESTART_CONTROL.agc. Parent file is MAIN.agc