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. |
004171,000002: ## Copyright: Public domain.
004172,000003: ## Filename: WAITLIST.agc
004173,000004: ## Purpose: A section of Corona revision 261.
004174,000005: ## It is part of the source code for the Apollo Guidance Computer
004175,000006: ## (AGC) for AS-202. No original listings of this software are
004176,000007: ## available; instead, this file was created via disassembly of
004177,000008: ## the core rope modules actually flown on the mission.
004178,000009: ## Assembler: yaYUL
004179,000010: ## Contact: Ron Burkey <info@sandroid.org>.
004180,000011: ## Website: www.ibiblio.org/apollo/index.html
004181,000012: ## Mod history: 2023-05-27 MAS Created from Solarium 55.
004182,000013:
004183,000014:
004184,000015: # CHECK-OUT STATUS - UNIT VERIFICATION COMPLETE MAY, 1965 EXCEPT LONGCALL SECTION.
004185,000016:
004186,000017: # DO NOT CHANGE THIS SECTION WITHOUT PRB APPROVAL.
004187,000018:
004188,000019: # GROUNDRULE....DELTA T SHOULD NOT EXCEED 12000 (= 2 MINUTES)
004189,000020:
004190,000021: 2173 BANK 1
004191,000022: 2173 50577 WAITLIST TS DELT # STORE DELTA T = TD - T (TD = DESIRED
004192,000023: 2174 30001 XCH Q # TIME FOR FUTURE ACTION).
004193,000024: 2175 02065 TC EXECCOM # PICK UP TASK ADDRESS AND SAVE BANKREG.
004194,000025: 2176 06374 TC WTLST3
004195,000026:
004196,000027: 04,6374 BANK 4
004197,000028: 04,6374 40037 WTLST3 CS TIME3
004198,000029: 04,6375 66376 AD +1 # CCS A = + 1/4
004199,000030: 04,6376 10000 CCS A # TEST 1/4 - C(TIME3). IF POSITIVE,
004200,000031: # IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
004201,000032: # C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T). THE FOLLOWING FOUR
004202,000033: # ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE. C(CSQ) = CS Q = 40001
004203,000034: # AND C(TSQ) = TS Q = 50001 NOTATION... 1 - 00001, 1.0 = 37777+1
004204,000035:
004205,000036: 04,6377 64664 AD CSQ # OVERFLOW HAS OCCURRED. SET C(A) =
004206,000037: 04,6400 40000 CS A # T - T1 + 3/4 - 1
004207,000038:
004208,000039: # NORMAL CASE (C(A) MINUS) YIELDS SAME C(A) -(-(1.0-(T1-T))+1/4)-1
004209,000040:
004210,000041: 04,6401 64561 AD TSQ # TS Q = - 3/4 + 2
004211,000042: 04,6402 60577 AD DELT # RESULT = TD - T1 + 1
004212,000043: # 10W
004213,000044: 04,6403 10000 CCS A # TEST TD - T1 + 1
004214,000045:
004215,000046: 04,6404 60552 AD LST1 # IF TD - T1 POS, GO TO WTLST5 WITH
004216,000047: 04,6405 06451 TC WTLST5 # C(A) = (TD - T1) + C(LST1) = TD-T2+1
004217,000048:
004218,000049: 04,6406 06407 TC +1
004219,000050: 04,6407 40577 CS DELT
004220,000051:
004221,000052: # NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
004222,000053: # SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1. (G/E
004223,000054: # SYMBOL MEANS GREATER THAN OR EQUAL TO). THUS THERE NEED BE NO CON-
004224,000055: # CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
004225,000056:
004226,000057: 04,6410 64522 AD POS1/2 # WHEN TD IS NEXT, FORM QUANTITY
004227,000058: 04,6411 64522 AD POS1/2 # 1.0 - DELTA T = 1.0 - (TD - T)
004228,000059: 04,6412 30037 XCH TIME3
004229,000060: 04,6413 64563 AD MSIGN
004230,000061: 04,6414 60577 AD DELT
004231,000062: 04,6415 50577 TS DELT
004232,000063: 04,6416 35501 CAF ZERO
004233,000064: 04,6417 30577 XCH DELT
004234,000065: 04,6420 30552 WTLST4 XCH LST1
004235,000066: 04,6421 30553 XCH LST1 +1
004236,000067: 04,6422 30554 XCH LST1 +2
004237,000068: 04,6423 30555 XCH LST1 +3
004238,000069: 04,6424 30556 XCH LST1 +4
004239,000070: 04,6425 30557 XCH LST1 +5
004240,000071: 04,6426 30560 XCH LST1 +6
004241,000072: 04,6427 30573 XCH EXECTEM2 # TASK ADDRESS.
004242,000073: 04,6430 20577 INDEX NVAL
004243,000074: 04,6431 06432 TC +1
004244,000075: 04,6432 30561 XCH LST2
004245,000076: 04,6433 30562 XCH LST2 +1
004246,000077: 04,6434 30563 XCH LST2 +2
004247,000078: 04,6435 30564 XCH LST2 +3
004248,000079: 04,6436 30565 XCH LST2 +4
004249,000080: 04,6437 30566 XCH LST2 +5 # AT END, CHECK THAT C(LST2+5) IS STD
004250,000081: 04,6440 30567 XCH LST2 +6
004251,000082: 04,6441 30570 XCH LST2 +7
004252,000083: 04,6442 62260 AD ENDTASK # END ITEM, AS CHECK FOR EXCEEDING
004253,000084: # THE LENGTH OF THE LIST.
004254,000085: 04,6443 10000 CCS A
004255,000086: 04,6444 03052 TC ABORT # WAITLIST OVERFLOW.
004256,000087: 04,6445 01203 OCT 01203
004257,000088: 04,6446 06444 TC -2
004258,000089:
004259,000090: 04,6447 30572 XCH EXECTEM1 # RETURN TO CALLER.
004260,000091: 04,6450 02076 TC LVWTLIST # SAME ROUTINE AS FINDVAC, ETC., EXIT.
004261,000092:
004262,000093:
004263,000094: 04,6451 10000 WTLST5 CCS A # TEST TD - T2 + 1
004264,000095: 04,6452 60553 AD LST1 +1
004265,000096: 04,6453 06457 TC +4
004266,000097: 04,6454 64516 AD ONE
004267,000098: 04,6455 06535 TC WTLST2
004268,000099: 04,6456 00001 OCT 1
004269,000100:
004270,000101: 04,6457 10000 +4 CCS A # TEST TD - T3 + 1
004271,000102: 04,6460 60554 AD LST1 +2
004272,000103: 04,6461 06465 TC +4
004273,000104: 04,6462 64516 AD ONE
004274,000105: 04,6463 06535 TC WTLST2
004275,000106: 04,6464 00002 OCT 2
004276,000107:
004277,000108: 04,6465 10000 +4 CCS A # TEST TD - T4 + 1
004278,000109: 04,6466 60555 AD LST1 +3
004279,000110: 04,6467 06473 TC +4
004280,000111: 04,6470 64516 AD ONE
004281,000112: 04,6471 06535 TC WTLST2
004282,000113: 04,6472 00003 OCT 3
004283,000114:
004284,000115: 04,6473 10000 +4 CCS A # TEST TD - T5 + 1
004285,000116: 04,6474 60556 AD LST1 +4
004286,000117: 04,6475 06501 TC +4
004287,000118: 04,6476 64516 AD ONE
004288,000119: 04,6477 06535 TC WTLST2
004289,000120: 04,6500 00004 OCT 4
004290,000121:
004291,000122: 04,6501 10000 +4 CCS A # TEST TD - T6 + 1
004292,000123: 04,6502 60557 AD LST1 +5
004293,000124: 04,6503 06507 TC +4
004294,000125: 04,6504 64516 AD ONE
004295,000126: 04,6505 06535 TC WTLST2
004296,000127: 04,6506 00005 OCT 5
004297,000128:
004298,000129: 04,6507 10000 +4 CCS A
004299,000130: 04,6510 60560 AD LST1 +6
004300,000131: 04,6511 06515 TC +4
004301,000132: 04,6512 64516 AD ONE
004302,000133: 04,6513 06535 TC WTLST2
004303,000134: 04,6514 00006 OCT 6
004304,000135:
004305,000136: 04,6515 10000 +4 CCS A
004306,000137: 04,6516 06523 TC WTALARM
004307,000138: 04,6517 30000 NOOP
004308,000139: 04,6520 64516 AD ONE
004309,000140: 04,6521 06535 TC WTLST2
004310,000141: 04,6522 00007 OCT 7
004311,000142:
004312,000143: 04,6523 03052 WTALARM TC ABORT
004313,000144: 04,6524 01204 OCT 01204
004314,000145:
004315,000146: 04,6525 2076 LVWTLIST EQUALS FOUNDVAC
004316,000147:
004317,000148: 04,6525 10647 SVCT3X CCS FLAGWRD2 # IF DURING FREE-FALL AND AFTER
004318,000149: 04,6526 02256 TC TASKOVER # PLATFORM HAS BEEN ALIGNED, COMPENSATE
004319,000150: 04,6527 02256 TC TASKOVER # FOR GYRO BIAS DRIFT.
004320,000151: 04,6530 06531 TC +1
004321,000152:
004322,000153: 04,6531 32170 CAF PRIO35
004323,000154: 04,6532 02052 TC NOVAC
004324,000155: 04,6533 31247 CADR BIASONLY
004325,000156: 04,6534 02256 LTSKOV TC TASKOVER # USED BY LONGCALL.
004326,000157:
004327,000158: # C(TIME3) = 1.0 - (T1 - T)
004328,000159:
004329,000160: # C(LST1 ) = - (T2 - T1) + 1
004330,000161: # C(LST1+1) = - (T3 - T2) + 1
004331,000162: # C(LST1+2) = - (T4 - T3) + 1
004332,000163: # C(LST1+3) = - (T5 - T4) + 1
004333,000164: # C(LST1+4) = - (T6 - T5) + 1
004334,000165:
004335,000166: # C(LST2 ) = TC TASK1
004336,000167: # C(LST2+1) = TC TASK2
004337,000168: # C(LST2+2) = TC TASK3
004338,000169: # C(LST2+3) = TC TASK4
004339,000170: # C(LST2+4) = TC TASK5
004340,000171: # C(LST2+5) = TC TASK6 11W
004341,000172:
004342,000173:
004343,000174: # THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T LE TD LE T -1.
004344,000175: # N N+1
004345,000176: # (LE MEANS LESS THAN OR EQUAL TO). AT ENTRY, C(A) = -(TD - T + 1)
004346,000177: # N+1
004347,000178:
004348,000179: # THE LST1 ENTRY -(T - T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
004349,000180: # N+1 N N
004350,000181:
004351,000182: # THE ENTRY -(T - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
004352,000183: # N+1
004353,000184:
004354,000185: 04,6535 30001 WTLST2 XCH Q # NEW C(Q) = -(TD - T + 1)
004355,000186: 04,6536 20000 INDEX A # N+1
004356,000187: 04,6537 30000 CAF 0
004357,000188: 04,6540 50577 TS NVAL # VALUE OF N INTO NVAL
004358,000189:
004359,000190: 04,6541 34516 CAF ONE
004360,000191: 04,6542 60001 AD Q
004361,000192: 04,6543 20577 INDEX NVAL # C(A) = -(TD - T ) + 1.
004362,000193: 04,6544 60551 AD LST1 -1 # N
004363,000194:
004364,000195: 04,6545 20577 INDEX NVAL
004365,000196: 04,6546 50551 TS LST1 -1
004366,000197:
004367,000198: 04,6547 40001 CS Q # -C(Q) = -(T - TD) + 1
004368,000199: 04,6550 20577 INDEX NVAL # N+1
004369,000200: 04,6551 06420 TC WTLST4
004370,000201:
004371,000202:
004372,000203: # THIS ROUTINE HANDLES TASKS MORE THAN 120 SECS IN THE FUTURE. IT REQUIRES CALL TIME IN LONGTIME, +1 SCALED SAME
004373,000204: # AS TIME2, 1 AND THE TASK ADDRESS IN CALLCADR. ENTER WITH
004374,000205: # TC IBNKCALL
004375,000206: # CADR LONGCALL
004376,000207: # THE ROUTINE ONLY HANDLES ONE CALL AT A TIME
004377,000208:
004378,000209: 04,6552 30001 LONGCALL XCH Q
004379,000210: 04,6553 51466 TS LONGEXIT
004380,000211:
004381,000212: 04,6554 31461 XCH LONGTIME +1
004382,000213: 04,6555 60000 DOUBLE
004383,000214: 04,6556 51461 TS LONGTIME +1
004384,000215: 04,6557 35501 CAF ZERO
004385,000216: 04,6560 61460 AD LONGTIME
004386,000217: 04,6561 61460 AD LONGTIME
004387,000218: 04,6562 51460 TS LONGTIME
004388,000219: 04,6563 06565 TC +2
004389,000220: 04,6564 06564 TC -0 # ERROR TRAP. DT TOO BIG
004390,000221:
004391,000222: 04,6565 34516 CAF ONE
004392,000223: 04,6566 61461 AD LONGTIME +1
004393,000224: 04,6567 64476 AD POSMAX
004394,000225: 04,6570 51461 TS LONGTIME +1
004395,000226: 04,6571 35501 CAF ZERO
004396,000227:
004397,000228: 04,6572 61460 AD LONGTIME
004398,000229: 04,6573 64476 AD POSMAX
004399,000230: 04,6574 51460 TS LONGTIME
004400,000231: 04,6575 03070 TC CCSHOLE
004401,000232:
004402,000233: 04,6576 34501 CAF BIT14
004403,000234: 04,6577 25777 EXTEND
004404,000235: 04,6600 41461 MP LONGTIME +1
004405,000236: 04,6601 51461 TS LONGTIME +1
004406,000237:
004407,000238: 04,6602 11460 LONGCYCL CCS LONGTIME
004408,000239: 04,6603 06613 TC LOOPAGIN
004409,000240:
004410,000241: 04,6604 11461 CCS LONGTIME +1 # TEST FOR LOWER ORDER ZERO
004411,000242: 04,6605 06607 TC +2
004412,000243: 04,6606 06622 TC GETCADR
004413,000244:
004414,000245: 04,6607 31461 XCH LONGTIME +1
004415,000246: 04,6610 02173 TC WAITLIST
004416,000247: 04,6611 10622 CADR GETCADR
004417,000248:
004418,000249: 04,6612 06617 TC LONGC1
004419,000250: 04,6613 51460 LOOPAGIN TS LONGTIME
004420,000251: 04,6614 34501 CAF BIT14
004421,000252: 04,6615 02173 TC WAITLIST
004422,000253: 04,6616 10602 CADR LONGCYCL
004423,000254:
004424,000255: 04,6617 36534 LONGC1 CAF LTSKOV
004425,000256: 04,6620 31466 XCH LONGEXIT
004426,000257: 04,6621 00000 XAQ
004427,000258:
004428,000259: 04,6622 31467 GETCADR XCH CALLCADR
004429,000260: 04,6623 05723 TC BANKJUMP
004430,000261:
004431,000262:
004432,000263: # ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
004433,000264:
004434,000265: 2177 SETLOC WAITLIST +4 # BACK TO FF.
004435,000266:
004436,000267: 2177 30015 T3RUPT XCH BANKREG # TIME 3 OVERFLOW INTERRUPT PROGRAM
004437,000268: 2200 50030 TS BANKRUPT
004438,000269: 2201 30034 XCH OVCTR # 1. PICK UP CONTENTS OF THE OVERFLOW
004439,000270: 2202 50031 TS OVRUPT # AND SAVE IN OVRUPT FOR ENTIRE T3RUPT.
004440,000271:
004441,000272: 2203 45501 T3RUPT2 CS ZERO # SET RUPTAGN TO -0 INITIALLY, AND SET
004442,000273: 2204 50571 TS RUPTAGN # T3 TO -0 WHILE WE MAKE UP ITS NEW
004443,000274: 2205 30037 XCH TIME3 # CONTENTS SO WE CAN DETECT AN INCREMENT
004444,000275: 2206 50001 TS Q # OCCURING IN THE PROCESS.
004445,000276:
004446,000277: 2207 34520 CAF NEG1/2
004447,000278: 2210 30560 XCH LST1 +6
004448,000279: 2211 30557 XCH LST1 +5
004449,000280: 2212 30556 XCH LST1 +4 # 3. MOVE UP LST1 CONTENTS, ENTERING
004450,000281: 2213 30555 XCH LST1 +3 # A VALUE OF 1/2 +1 AT THE BOTTOM
004451,000282: 2214 30554 XCH LST1 +2 # FOR T6-T5, CORRESPONDING TO THE
004452,000283: 2215 30553 XCH LST1 +1 # INTERVAL 81.93 SEC FOR ENDTASK.
004453,000284: 2216 30552 XCH LST1
004454,000285: 2217 64476 AD POSMAX # 4. SET T3 = 1.0 - T2 -T USING LIST 1.
004455,000286: 2220 60001 AD Q # SAMPLED T3.
004456,000287: 2221 50000 TS A # SEE IF NEW T3 HAS OVERFLOW. IF SO, NEXT
004457,000288: 2222 02226 TC +4 # TASK IS DUE THIS T3 RUPT AND SET RUPTAGN
004458,000289: 2223 30571 XCH RUPTAGN # ACCORDINGLY.
004459,000290: 2224 34516 CAF ONE
004460,000291: 2225 30571 XCH RUPTAGN
004461,000292:
004462,000293: 2226 30037 +4 XCH TIME3
004463,000294: 2227 10000 CCS A # T3 IS ALMOST ALWAYS -0 UNLESS AN
004464,000295: 2230 34516 CAF ONE # INCREMENT OCCURRED IN WHICH CASE WE MUST
004465,000296: 2231 60037 AD TIME3 # ADD IT TO THE NEW T3.
004466,000297: 2232 02272 TC XTRAINC
004467,000298:
004468,000299:
004469,000300: 2233 42260 T3DSP CS ENDTASK
004470,000301: 2234 30570 XCH LST2 +7
004471,000302: 2235 30567 XCH LST2 +6
004472,000303: 2236 30566 XCH LST2 +5 # ENTERING THE ENDTASK AT BOTTOM.
004473,000304: 2237 30565 XCH LST2 +4
004474,000305: 2240 30564 XCH LST2 +3
004475,000306: 2241 30563 XCH LST2 +2
004476,000307: 2242 30562 XCH LST2 +1
004477,000308: 2243 30561 XCH LST2 # 9. PICK UP TOP TASK ON LIST
004478,000309:
004479,000310: 2244 50015 TS BANKREG # SWITCH BANKS IF NECESSARY
004480,000311: 2245 50577 TS ITEMP1
004481,000312: 2246 72665 MASK 70K
004482,000313: 2247 10000 CCS A
004483,000314: 2250 02252 TC +2 # IF +
004484,000315: 2251 00577 TC ITEMP1
004485,000316: 2252 30577 XCH ITEMP1
004486,000317: 2253 74606 MASK LOW10
004487,000318: 2254 20000 INDEX A
004488,000319: 2255 06000 TC 6000
004489,000320:
004490,000321:
004491,000322:
004492,000323: # RETURN, AFTER EXECUTION OF TIME3 OVERFLOW TASK.
004493,000324:
004494,000325: 2256 10571 TASKOVER CCS RUPTAGN # IF +1 RETURN TO T3RUPT, IF -0 RESUME.
004495,000326: 2257 02203 TC T3RUPT2 # DISPATCH NEXT TASK IF IT WAS DUE.
004496,000327:
004497,000328: 2260 67774 ENDTASK -CADR SVCT3
004498,000329: 2261 76000 BANKMASK OCT 76000
004499,000330:
004500,000331: 2262 30031 OVRESUME XCH OVRUPT # OVCTR RESTORE AND BANKREG RESTORE.
004501,000332: 2263 50034 TS OVCTR
004502,000333:
004503,000334: 2264 30030 RESUME XCH BANKRUPT # STANDARD BANK-SWITCH RESUME.
004504,000335: 2265 50015 TS BANKREG
004505,000336:
004506,000337: 2266 30027 NBRESUME XCH QRUPT # NO-BANK-SWITCH RESUME.
004507,000338: 2267 50001 TS Q
004508,000339: 2270 30026 XCH ARUPT
004509,000340: 2271 20025 RESUME
004510,000341:
004511,000342: # FINISH UP RARE EVENT OF EXTRA INCREMENT TO T3.
004512,000343:
004513,000344: 2272 50037 XTRAINC TS TIME3
004514,000345: 2273 02233 TC T3DSP # USUAL CASE.
004515,000346: 2274 50571 TS RUPTAGN # EVEN MORE RARE - THE NEXT TASK IS DUE
004516,000347: 2275 02233 TC T3DSP # THIS T3RUPT.
004517,000348:
004518,000349:
End of include-file WAITLIST.agc. Parent file is MAIN.agc