Source Code
This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release
of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97.
A bug (which had been around since at least Apollo 10, Luminary 69) was
discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute
revision into Rev 1,
which is what actually flew rather than
the Rev 0 presented here. A hardcopy of Rev 0 is known to
exist — it belonged to AGC developer Allan Klumpp for many years — but
unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus
the code you see here had been reconstructed (we believe accurately) rather than
transcribed. The first step of the reconstruction of the Rev 0 source code was
the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection.
The process of reverting the active portion of the source code (i.e., other than
program comments) from Rev 1 to Rev 0 was very minor, consisting
only of moving the position of the STARTSB1 label in
FRESH START AND RESTART. Allan had previously given
us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums
identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read,
in part:GAP: ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051 A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here. |
048633,000002: ## Copyright: Public domain.
048634,000003: ## Filename: WAITLIST.agc
048635,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
048636,000005: ## otherwise known as Luminary Rev 99, the third release
048637,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
048638,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
048639,000008: ## placement of a single label. The corrections shown here have
048640,000009: ## been verified to have the same bank checksums as AGC developer
048641,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
048642,000011: ## to be accurate. This file is intended to be a faithful
048643,000012: ## recreation, except that the code format has been changed to
048644,000013: ## conform to the requirements of the yaYUL assembler rather than
048645,000014: ## the original YUL assembler.
048646,000015: ##
048647,000016: ## Assembler: yaYUL
048648,000017: ## Contact: Ron Burkey <info@sandroid.org>.
048649,000018: ## Website: www.ibiblio.org/apollo.
048650,000019: ## Pages: 1117-1132
048651,000020: ## Mod history: 2009-05-25 RSB Adapted from the corresponding
048652,000021: ## Luminary131 file, using page
048653,000022: ## images from Luminary 1A.
048654,000023: ## 2011-01-06 JL Fixed pseudo-label indentation.
048655,000024: ## 2011-05-07 JL Removed workarounds.
048656,000025: ## 2016-12-17 RSB Proofed text comments with octopus/ProoferComments
048657,000026: ## and corrected the errors found.
048658,000027: ## 2017-01-28 RSB WTIH -> WITH.
048659,000028: ## 2017-02-09 RSB Comment-text fixes identified in proofing Artemis 72.
048660,000029: ## 2017-02-27 RSB Corrected WAITP00H and LONGP00H to similar POOH names.
048661,000030: ## 2017-03-14 RSB Comment-text fixes noted in proofing Luminary 116.
048662,000031: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
048663,000032: ## side-by-side diff of Luminary 69/99/116/131/210.
048664,000033: ## 2017-08-01 MAS Created from LMY99 Rev 1.
048665,000034:
048666,000035: ## This source code has been transcribed or otherwise adapted from
048667,000036: ## digitized images of a hardcopy from the MIT Museum. The digitization
048668,000037: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
048669,000038: ## the Museum. Many thanks to both. The images (with suitable reduction
048670,000039: ## in storage size and consequent reduction in image quality as well) are
048671,000040: ## available online at www.ibiblio.org/apollo. If for some reason you
048672,000041: ## find that the images are illegible, contact me at info@sandroid.org
048673,000042: ## about getting access to the (much) higher-quality images which Paul
048674,000043: ## actually created.
048675,000044: ##
048676,000045: ## The code has been modified to match LMY99 Revision 0, otherwise
048677,000046: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
048678,000047: ## the listing from which it was transcribed. It has been verified to
048679,000048: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
048680,000049: ## of Luminary Revision 99 (for which we do not have scans).
048681,000050: ##
048682,000051: ## Notations on Allan Klumpp's listing read, in part:
048683,000052: ##
048684,000053: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
048685,000054:
Page 1117 |
048687,000056: # PROGRAM DESCRIPTION DATE - 10 OCTOBER 1966
048688,000057: # MOD NO - 2 LOG SECTION - WAITLIST
048689,000058: # MOD BY - MILLER (DTMAX INCREASED TO 162.5 SEC) ASSEMBLY SUNBURST REV 5
048690,000059: # MOD 3 BY KERNAN (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
048691,000060: # MOD 4 BY KERNAN (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
048692,000061:
048693,000062: # FUNCTIONAL DESCRIPTION -
048694,000063: # PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
048695,000064: # WHICH IS TO BEGIN IN C(A) CENTISECONDS. WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
048696,000065: # FOLLOW.
048697,000066:
048698,000067: # C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
048699,000068:
048700,000069: # C(LST1) = -(T2-T1)+1
048701,000070: # C(LST1 +1) = -(T3-T2)+1
048702,000071: # C(LST1 +2) = -(T4-T3)+1
048703,000072: # .
048704,000073: # .
048705,000074: # C(LST1 +6) = -(T8-T7)+1
048706,000075: # C(LST1 +7) = -(T9-T8)+1
048707,000076:
048708,000077: # C(LST2) = 2CADR OF TASK1
048709,000078: # C(LST2 +2) = 2CADR OF TASK2
048710,000079: # .
048711,000080: # .
048712,000081: # C(LST2 +14) = 2CADR OF TASK8
048713,000082: # C(LST2 +16) = 2CADR OF TASK9
048714,000083:
048715,000084: # WARNINGS -
048716,000085: # --------
048717,000086: # 1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
048718,000087: # 2) 9 TASKS MAXIMUM
048719,000088: # 3) TASKS CALLED UNDER INTERRUPT INHIBITED
048720,000089: # 4) TASKS END BY TC TASKOVER
048721,000090:
048722,000091: # CALLING SEQUENCE -
048723,000092: # L-1 CA DELTAT (TIME IN CENTISECONDS TO TASK START)
048724,000093: # L TC WAITLIST
048725,000094: # L+1 2CADR DESIRED TASK
048726,000095: # L+2 (MINOR OF 2CADR)
048727,000096: # L+3 RELINT (RETURNS HERE)
048728,000097:
048729,000098: # TWIDDLE -
048730,000099: # -------
048731,000100: # TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER. IN
048732,000101: # SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,
Page 1118 |
048734,000103: # SAVING A WORD. TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
048735,000104: # L-1 CA DELTAT
048736,000105: # L TC TWIDDLE
048737,000106: # L+1 ADRES DESIRED TASK
048738,000107: # L+2 RELINT (RETURNS HERE)
048739,000108:
048740,000109: # NORMAL EXIT MODES -
048741,000110: # AT L+3 OF CALLING SEQUENCE
048742,000111:
048743,000112: # ALARM OR ABORT EXIT MODES -
048744,000113: # TC ABORT
048745,000114: # OCT 1203 (WAITLIST OVERFLOW - TOO MANY TASKS)
048746,000115:
048747,000116: # ERASABLE INITIALIZATION REQUIRED -
048748,000117: # ACCOMPLISHED BY FRESH START,-- LST2, ..., LST2 +16 = ENDTASK
048749,000118: # LST1, ..., LST1 +7 = NEG1/2
048750,000119:
048751,000120: # OUTPUT --
048752,000121: # LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
048753,000122:
048754,000123: # DEBRIS -
048755,000124: # CENTRALS - A,Q,L
048756,000125: # OTHER - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
048757,000126:
048758,000127: # DETAILED ANALYSIS OF TIMING -
048759,000128: # CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
048760,000129: # THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
048761,000130: # LET TO = THE TIME OF THE TC WAITLIST
048762,000131: # LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
048763,000132: # LET X = TS -(100TS)/100 (VARIANCE FROM COUNTERS)
048764,000133: # LET Y = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
048765,000134: # LET Z = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
048766,000135: # (Z=0, USUALLY)
048767,000136: # LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
048768,000137: # THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
048769,000138: # *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
048770,000139: # IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
048771,000140: # INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
048772,000141: # OF OTHER TASKS INHIBITING THE INTERRUPT.
048773,000142:
048774,000143: 5173 BLOCK 02
Page 1119 |
048776,000145: 5173 E3,1400 EBANK= LST1 # TASK LISTS IN SWITCHED E BANK.
048777,000146:
048778,000147: 5173 COUNT* $$/WAIT
048779,000148: 5173 00004 TWIDDLE INHINT
048780,000149: 5174 54001 TS L # SAVE DELAY TIME IN L
048781,000150: 5175 34733 CA POSMAX
048782,000151: 5176 26002 ADS Q # CREATING OVERFLOW AND Q-1 IN Q
048783,000152: 5177 30006 CA BBANK
048784,000153: 5200 00006 EXTEND
048785,000154: 5201 04007 ROR SUPERBNK
048786,000155: 5202 56001 XCH L
048787,000156:
048788,000157: 5203 00004 WAITLIST INHINT
048789,000158: 5204 56002 XCH Q # SAVE DELTA T IN Q AND RETURN IN
048790,000159: 5205 54061 TS WAITEXIT # WAITEXIT.
048791,000160: 5206 00006 EXTEND
048792,000161: 5207 50061 INDEX WAITEXIT # IF TWIDDLING, THE TS SKIPS TO HERE
048793,000162: 5210 30001 DCA 0 # PICK UP 2CADR OF TASK.
048794,000163: 5211 54063 -1 TS WAITADR # BBCON WILL REMAIN IN L
048795,000164: 5212 35220 DLY2 CAF WAITBB # ENTRY FROM FIXDELAY AND VARDELAY.
048796,000165: 5213 56006 XCH BBANK
048797,000166: 5214 13231 TCF WAIT2
048798,000167:
048799,000168: # RETURN TO CALLER AFTER TASK INSERTION:
048800,000169:
048801,000170: 5215 52062 LVWTLIST DXCH WAITEXIT
048802,000171: 5216 64752 AD TWO
048803,000172: 5217 52006 DTCB
048804,000173:
048805,000174: 5220 E3,1400 EBANK= LST1
048806,000175: 5220 02063 WAITBB BBCON WAIT2
048807,000176:
048808,000177: # RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
048809,000178:
048810,000179: 5221 50002 FIXDELAY INDEX Q # BOTH ROUTINES MUST BE CALLED UNDER
048811,000180: 5222 30000 CAF 0 # WAITLIST CONTROL AND TERMINATE THE TASK
048812,000181: 5223 24002 INCR Q # IN WHICH THEY WERE CALLED.
048813,000182:
048814,000183: # RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
048815,000184:
048816,000185: 5224 56002 VARDELAY XCH Q # DT TO Q. TASK ADRES TO WAITADR.
048817,000186: 5225 54063 TS WAITADR
048818,000187: 5226 30006 CA BBANK # BBANK IS SAVED DURING DELAY.
048819,000188: 5227 00006 EXTEND
048820,000189: 5230 04007 ROR SUPERBNK # ADD SBANK TO BBCON.
048821,000190: 5231 54001 TS L
048822,000191: 5232 35235 CAF DELAYEX
048823,000192: 5233 54061 TS WAITEXIT # GO TO TASKOVER AFTER TASK ENTRY.
048824,000193: 5234 15212 TCF DLY2
048825,000194:
Page 1120 |
048827,000196: 5235 15257 DELAYEX TCF TASKOVER -2 # RETURNS TO TASKOVER
048828,000197:
Page 1121 |
048830,000199: # ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
048831,000200:
048832,000201: 5236 E3,1400 EBANK= LST1
048833,000202: 5236 72537 73714 ENDTASK -2CADR SVCT3
048834,000203:
048835,000204: 5240 10076 SVCT3 CCS FLAGWRD2 # DRIFT FLAG
048836,000205: 5241 15261 TCF TASKOVER
048837,000206: 5242 15261 TCF TASKOVER
048838,000207: 5243 15244 TCF +1
048839,000208:
048840,000209: 5244 11304 CKIMUSE CCS IMUCADR # DON'T DO NBDONLY IF SOMEONE ELSE IS IN
048841,000210: 5245 15256 TCF SVCT3X # IMUSTALL.
048842,000211: 5246 15251 TCF +3
048843,000212: 5247 15256 TCF SVCT3X
048844,000213: 5250 15256 TCF SVCT3X
048845,000214:
048846,000215: 5251 37723 +3 CAF PRIO35 # COMPENSATE FOR NBD COEFFICIENTS ONLY.
048847,000216: 5252 05072 TC NOVAC # ENABLE EVERY 81.93 SECONDS
048848,000217: 5253 E3,1460 EBANK= NBDX
048849,000218: 5253 03555 14063 2CADR NBDONLY
048850,000219:
048851,000220: 5255 15261 TCF TASKOVER
048852,000221:
048853,000222: 5256 05221 SVCT3X TC FIXDELAY # DELAY MAX OF 2 TIMES FOR IMUZERO.
048854,000223: 5257 00764 DEC 500 B-14
048855,000224: 5260 05240 TC SVCT3 # CHECK DRIFT FLAG AGAIN.
048856,000225:
Page 1122 |
048858,000227: # BEGIN TASK INSERTION.
048859,000228:
048860,000229: 01,3231 BANK 01
048861,000230: 01,3231 COUNT* $$/WAIT
048862,000231: 01,3231 54062 WAIT2 TS WAITBANK # BBANK OF CALLING PROGRAM.
048863,000232: 01,3232 30002 CA Q
048864,000233: 01,3233 00006 EXTEND
048865,000234: 01,3234 63523 BZMF WAITPOOH
048866,000235:
048867,000236: 01,3235 40026 CS TIME3
048868,000237: 01,3236 64744 AD BIT8 # BIT 8 = OCT 200
048869,000238: 01,3237 10000 CCS A # TEST 200 - C(TIME3). IF POSITIVE,
048870,000239: # IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
048871,000240: # C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T). THE FOLLOWING FOUR
048872,000241: # ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
048873,000242:
048874,000243: 01,3240 66107 AD OCT40001 # OVERFLOW HAS OCCURRED. SET C(A) =
048875,000244: 01,3241 40000 CS A # T - T1 + 1.0 - 201
048876,000245:
048877,000246: # NORMAL CASE (C(A) NNZ) YIELDS SAME C(A): -( -(1.0-(T1-T)) + 200) - 1
048878,000247:
048879,000248: 01,3242 63370 AD OCT40201
048880,000249: 01,3243 60002 AD Q # RESULT = TD - T1 + 1.
048881,000250:
048882,000251: 01,3244 10000 CCS A # TEST TD - T1 + 1
048883,000252:
048884,000253: 01,3245 61400 AD LST1 # IF TD - T1 POS, GO TO WTLST5 WITH
048885,000254: 01,3246 13310 TCF WTLST5 # C(A) = (TD - T1) + C(LST1) = TD-T2+1
048886,000255:
048887,000256: 01,3247 13250 NOOP
048888,000257: 01,3250 40002 CS Q
048889,000258:
048890,000259: # NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
048891,000260: # SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1. (G/E
048892,000261: # SYMBOL MEANS GREATER THAN OR EQUAL TO). THUS THERE NEED BE NO CON-
048893,000262: # CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
048894,000263:
048895,000264: 01,3251 64736 AD POS1/2 # WHEN TD IS NEXT, FORM QUANTITY
048896,000265: 01,3252 64736 AD POS1/2 # 1.0 - DELTA T = 1.0 - (TD - T)
048897,000266: 01,3253 56026 XCH TIME3
048898,000267: 01,3254 64735 AD NEGMAX
048899,000268: 01,3255 60002 AD Q # 1.0 - DELTAT T NOW COMPLETE.
048900,000269: 01,3256 00006 EXTEND # ZERO INDEX Q.
048901,000270: 01,3257 22007 QXCH 7 # (ZQ)
048902,000271:
Page 1123 |
048904,000273: 01,3260 57400 WTLST4 XCH LST1
048905,000274: 01,3261 57401 XCH LST1 +1
048906,000275: 01,3262 57402 XCH LST1 +2
048907,000276: 01,3263 57403 XCH LST1 +3
048908,000277: 01,3264 57404 XCH LST1 +4
048909,000278: 01,3265 57405 XCH LST1 +5
048910,000279: 01,3266 57406 XCH LST1 +6
048911,000280: 01,3267 57407 XCH LST1 +7
048912,000281:
048913,000282: 01,3270 30063 CA WAITADR # (MINOR PART OF TASK CADR HAS BEEN IN L.)
048914,000283: 01,3271 50002 INDEX Q
048915,000284: 01,3272 13273 TCF +1
048916,000285:
048917,000286: 01,3273 53411 DXCH LST2
048918,000287: 01,3274 53413 DXCH LST2 +2
048919,000288: 01,3275 53415 DXCH LST2 +4
048920,000289: 01,3276 53417 DXCH LST2 +6
048921,000290: 01,3277 53421 DXCH LST2 +8D
048922,000291: 01,3300 53423 DXCH LST2 +10D # AT END, CHECK THAT C(LST2 +10) IS STD
048923,000292: 01,3301 53425 DXCH LST2 +12D
048924,000293: 01,3302 53427 DXCH LST2 +14D
048925,000294: 01,3303 53431 DXCH LST2 +16D
048926,000295: 01,3304 65236 AD ENDTASK # END ITEM, AS CHECK FOR EXCEEDING
048927,000296: # THE LENGTH OF THE LIST.
048928,000297: 01,3305 00006 EXTEND # DUMMY TASK ADRES SHOULD BE IN FIXED-
048929,000298: 01,3306 15215 BZF LVWTLIST # FIXED SO ITS ADRES ALONE DISTINGUISHES
048930,000299: 01,3307 13363 TCF WTABORT # IT.
048931,000300:
Page 1124 |
048933,000302: 01,3310 10000 WTLST5 CCS A # TEST TD - T2 + 1
048934,000303: 01,3311 61401 AD LST1 +1
048935,000304: 01,3312 13316 TCF +4
048936,000305: 01,3313 64753 AD ONE
048937,000306: 01,3314 03374 TC WTLST2
048938,000307: 01,3315 00001 OCT 1
048939,000308:
048940,000309: 01,3316 10000 +4 CCS A # TEST TD - T3 + 1
048941,000310: 01,3317 61402 AD LST1 +2
048942,000311: 01,3320 13324 TCF +4
048943,000312: 01,3321 64753 AD ONE
048944,000313: 01,3322 03374 TC WTLST2
048945,000314: 01,3323 00002 OCT 2
048946,000315:
048947,000316: 01,3324 10000 +4 CCS A # TEST TD - T4 + 1
048948,000317: 01,3325 61403 AD LST1 +3
048949,000318: 01,3326 13332 TCF +4
048950,000319: 01,3327 64753 AD ONE
048951,000320: 01,3330 03374 TC WTLST2
048952,000321: 01,3331 00003 OCT 3
048953,000322:
048954,000323: 01,3332 10000 +4 CCS A # TEST TD - T5 + 1
048955,000324: 01,3333 61404 AD LST1 +4
048956,000325: 01,3334 13340 TCF +4
048957,000326: 01,3335 64753 AD ONE
048958,000327: 01,3336 03374 TC WTLST2
048959,000328: 01,3337 00004 OCT 4
048960,000329:
048961,000330: 01,3340 10000 +4 CCS A # TEST TD - T6 + 1
048962,000331: 01,3341 61405 AD LST1 +5
048963,000332: 01,3342 13346 TCF +4
048964,000333: 01,3343 64753 AD ONE
048965,000334: 01,3344 03374 TC WTLST2
048966,000335: 01,3345 00005 OCT 5
048967,000336:
048968,000337: 01,3346 10000 +4 CCS A # TEST TD - T7 + 1
048969,000338: 01,3347 61406 AD LST1 +6
048970,000339: 01,3350 13354 TCF +4
048971,000340: 01,3351 64753 AD ONE
048972,000341: 01,3352 03374 TC WTLST2
048973,000342: 01,3353 00006 OCT 6
048974,000343:
Page 1125 |
048976,000345: 01,3354 10000 +4 CCS A
048977,000346: 01,3355 61407 AD LST1 +7
048978,000347: 01,3356 13362 TCF +4
048979,000348: 01,3357 64753 AD ONE
048980,000349: 01,3360 03374 TC WTLST2
048981,000350: 01,3361 00007 OCT 7
048982,000351:
048983,000352: 01,3362 10000 +4 CCS A
048984,000353: 01,3363 03371 WTABORT TC FILLED
048985,000354: 01,3364 13365 NOOP # CAN'T GET HERE
048986,000355: 01,3365 64753 AD ONE
048987,000356: 01,3366 03374 TC WTLST2
048988,000357: 01,3367 00010 OCT 10
048989,000358:
048990,000359: 01,3370 40201 OCT40201 OCT 40201
048991,000360:
Page 1126 |
048993,000362: 01,3371 52062 FILLED DXCH WAITEXIT
048994,000363: 01,3372 05716 TC BAILOUT1 # NO ROOM IN THE INN
048995,000364: 01,3373 01203 OCT 01203
048996,000365:
Page 1127 |
048998,000367: # THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T LE TD LE T -1.
048999,000368: # N N+1
049000,000369: # (LE MEANS LESS THAN OR EQUAL TO). AT ENTRY, C(A) = -(TD - T + 1)
049001,000370: # N+1
049002,000371: # THE LST1 ENTRY -(T -T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
049003,000372: # N+1 N N
049004,000373: # THE ENTRY -(T - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
049005,000374: # N+1
049006,000375:
049007,000376: 01,3374 54064 WTLST2 TS WAITTEMP # C(A) = -(TD - T + 1)
049008,000377: 01,3375 50002 INDEX Q
049009,000378: 01,3376 30000 CAF 0
049010,000379: 01,3377 54002 TS Q # INDEX VALUE INTO Q.
049011,000380:
049012,000381: 01,3400 34753 CAF ONE
049013,000382: 01,3401 60064 AD WAITTEMP
049014,000383: 01,3402 50002 INDEX Q # C(A) = -(TD - T ) + 1.
049015,000384: 01,3403 27377 ADS LST1 -1 # N
049016,000385:
049017,000386: 01,3404 40064 CS WAITTEMP
049018,000387: 01,3405 50002 INDEX Q
049019,000388: 01,3406 13260 TCF WTLST4
049020,000389:
049021,000390: # C(TIME3) = 1.0 - (T1 - T)
049022,000391:
049023,000392: # C(LST1) = - (T2 - T1) + 1
049024,000393: # C(LST1+1) = - (T3 - T2) + 1
049025,000394: # C(LST1+2) = - (T4 - T3) + 1
049026,000395: # C(LST1+3) = - (T5 - T4) + 1
049027,000396: # C(LST1+4) = - (T6 - T5) + 1
049028,000397:
049029,000398: # C(LST2) = 2CADR TASK1
049030,000399: # C(LST2+2) = 2CADR TASK2
049031,000400: # C(LST2+4) = 2CADR TASK3
049032,000401: # C(LST2+6) = 2CADR TASK4
049033,000402: # C(LST2+8) = 2CADR TASK5
049034,000403: # C(LST2+10) = 2CADR TASK6
049035,000404:
Page 1128 |
049037,000406: # ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
049038,000407:
049039,000408: 01,3407 00006 T3RUPT EXTEND
049040,000409: 01,3410 04007 ROR SUPERBNK # READ CURRENT SUPERBANK VALUE AND
049041,000410: 01,3411 54016 TS BANKRUPT # SAVE WITH E AND F BANK VALUES.
049042,000411: 01,3412 00006 EXTEND
049043,000412: 01,3413 22012 QXCH QRUPT
049044,000413:
049045,000414: 01,3414 34734 T3RUPT2 CAF NEG1/2 # DISPATCH WAITLIST TASK.
049046,000415: 01,3415 57407 XCH LST1 +7
049047,000416: 01,3416 57406 XCH LST1 +6
049048,000417: 01,3417 57405 XCH LST1 +5
049049,000418: 01,3420 57404 XCH LST1 +4 # 1. MOVE UP LST1 CONTENTS, ENTERING
049050,000419: 01,3421 57403 XCH LST1 +3 # A VALUE OF 1/2 +1 AT THE BOTTOM
049051,000420: 01,3422 57402 XCH LST1 +2 # FOR T6-T5, CORRESPONDING TO THE
049052,000421: 01,3423 57401 XCH LST1 +1 # INTERVAL 81.91 SEC FOR ENDTASK.
049053,000422: 01,3424 57400 XCH LST1
049054,000423: 01,3425 64733 AD POSMAX # 2. SET T3 = 1.0 - T2 - T USING LIST 1.
049055,000424: 01,3426 26026 ADS TIME3 # SO T3 WONT TICK DURING UPDATE.
049056,000425: 01,3427 54734 TS RUPTAGN
049057,000426: 01,3430 44755 CS ZERO
049058,000427: 01,3431 54734 TS RUPTAGN # SETS RUPTAGN TO +1 ON OVERFLOW.
049059,000428:
049060,000429: 01,3432 00006 EXTEND # DISPATCH TASK.
049061,000430: 01,3433 45237 DCS ENDTASK
049062,000431: 01,3434 53431 DXCH LST2 +16D
049063,000432: 01,3435 53427 DXCH LST2 +14D
049064,000433: 01,3436 53425 DXCH LST2 +12D
049065,000434: 01,3437 53423 DXCH LST2 +10D
049066,000435: 01,3440 53421 DXCH LST2 +8D
049067,000436: 01,3441 53417 DXCH LST2 +6
049068,000437: 01,3442 53415 DXCH LST2 +4
049069,000438: 01,3443 53413 DXCH LST2 +2
049070,000439: 01,3444 53411 DXCH LST2
049071,000440:
049072,000441: 01,3445 56001 XCH L
049073,000442: 01,3446 00006 EXTEND
049074,000443: 01,3447 01007 WRITE SUPERBNK # SET SUPERBANK FROM BBCON OF 2CADR
049075,000444: 01,3450 56001 XCH L # RESTORE TO L FOR DXCH Z.
049076,000445: 01,3451 52006 DTCB
049077,000446:
Page 1129 |
049079,000448: # RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
049080,000449:
049081,000450: 5261 BLOCK 02
049082,000451: 5261 COUNT* $$/WAIT
049083,000452: 5261 10734 TASKOVER CCS RUPTAGN # IF +1 RETURN TO T3RUPT, IF -0 RESUME.
049084,000453: 5262 35220 CAF WAITBB
049085,000454: 5263 54006 TS BBANK
049086,000455: 5264 13414 TCF T3RUPT2 # DISPATCH NEXT TASK IF IT WAS DUE.
049087,000456:
049088,000457: 5265 30016 CA BANKRUPT
049089,000458: 5266 00006 EXTEND
049090,000459: 5267 01007 WRITE SUPERBNK # RESTORE SUPERBANK BEFORE RESUME IS DONE
049091,000460:
049092,000461: 5270 00006 RESUME EXTEND
049093,000462: 5271 22012 QXCH QRUPT
049094,000463: 5272 30016 NOQRSM CA BANKRUPT
049095,000464: 5273 56006 XCH BBANK
049096,000465: 5274 52011 NOQBRSM DXCH ARUPT
049097,000466: 5275 00003 RELINT
049098,000467: 5276 50017 RESUME
049099,000468:
Page 1130 |
049101,000470: # LONGCALL
049102,000471: # PROGRAM DESCRIPTION DATE - 17 MARCH 1967
049103,000472: # PROGRAM WRITTEN BY W.H.VANDEVER LOG SECTION WAITLIST
049104,000473: # MOD BY - R. MELANSON TO ADD DOCUMENTATION ASSEMBLY SUNDISK REV. 100
049105,000474:
049106,000475: # FUNCTIONAL DESCRIPTION -
049107,000476: # LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
049108,000477: # IMMEDIATELY FOLLOWING THE TC LONGCALL. FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
049109,000478: # A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
049110,000479: # START
049111,000480: # CALLING SEQUENCE -
049112,000481: # EXTEND
049113,000482: # DCA TIMELOC
049114,000483: # TC LONGCALL
049115,000484: # 2CADR TASKTODO
049116,000485: # NORMAL EXIT MODE -
049117,000486: # 1). TC WAITLIST
049118,000487: # 2). DTCB (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
049119,000488: # 3). DTCB (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
049120,000489: # ALARM OR ABORT EXIT MODE -
049121,000490: # NONE
049122,000491: # OUTPUT -
049123,000492: # LONGTIME AND LONGTIME+1 = DELTA TIME
049124,000493: # LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
049125,000494: # LONGCADR AND LONGCADR+1 = TASK 2CADR
049126,000495: # A = SINGLE PRECISION TIME FOR WAITLIST
049127,000496: # ERASABLE INITIALIZATION -
049128,000497: # A = MOST SIGNIFICANT PART OF DELTA TIME
049129,000498: # L = LEAST SIGNIFICANT PART OF DELTA TIME
049130,000499: # Q = ADDRESS OF 2CADR TASK VALUE
049131,000500: # DEBRIS -
049132,000501: # A,Q,L
049133,000502: # LONGCADR AND LONGCADR+1
049134,000503: # LONGEXIT AND LONGEXIT+1
049135,000504: # LONGTIME AND LONGTIME+1
049136,000505: # *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
049137,000506:
049138,000507: 5277 BLOCK 02
049139,000508: 5277 E3,1400 EBANK= LST1
049140,000509: 5277 53154 LONGCALL DXCH LONGTIME # OBTAIN THE DELTA TIME
049141,000510:
049142,000511: 5300 00006 EXTEND # OBTAIN THE 2CADR
Page 1131 |
049144,000513: 5301 50002 NDX Q
049145,000514: 5302 30001 DCA 0
049146,000515: 5303 53150 DXCH LONGCADR
049147,000516:
049148,000517: 5304 00006 EXTEND # NOW GO TO THE APPROPRIATE SWITCHED BANK
049149,000518: 5305 35310 DCA LGCL2CDR # FOR THE REST OF LONGCALL
049150,000519: 5306 52006 DTCB
049151,000520:
049152,000521: 5307 E3,1400 EBANK= LST1
049153,000522: 5307 03452 02063 LGCL2CDR 2CADR LNGCALL2
049154,000523:
049155,000524: # *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
049156,000525:
049157,000526: 01,3452 BANK 01
049158,000527: 01,3452 COUNT* $$/WAIT
049159,000528: 01,3452 23435 LNGCALL2 LXCH LONGEXIT +1 # SAVE THE CORRECT BB FOR RETURN
049160,000529: 01,3453 34752 CA TWO # OBTAIN THE RETURN ADDRESS
049161,000530: 01,3454 26002 ADS Q
049162,000531: 01,3455 55434 TS LONGEXIT
049163,000532:
049164,000533: 01,3456 31153 CA LONGTIME # CHECK FOR LEGITIMATE DELTA-TIME
049165,000534: 01,3457 10000 CCS A
049166,000535: 01,3460 13466 TCF LONGCYCL # HI-ORDER OK --> ALL IS OK.
049167,000536: 01,3461 13463 TCF +2 # HI-ORDER ZERO --> CHECK LO-ORDER.
049168,000537: 01,3462 13521 TCF LONGPOOH # HI-ORDER NEG. --> NEG. DT
049169,000538: 01,3463 31154 +2 CA LONGTIME +1 # CHECK LO-ORDER FOR ZERO OR NEGATIVE.
049170,000539: 01,3464 00006 EXTEND
049171,000540: 01,3465 63521 BZMF LONGPOOH # BAD DELTA-TIME. ABORT
049172,000541:
049173,000542: # *** WAITLIST TASK LONGCYCL ***
049174,000543:
049175,000544: 01,3466 00006 LONGCYCL EXTEND # CAN WE SUCCESFULLY TAKE ABOUT 1.25
049176,000545: 01,3467 43500 DCS DPBIT14 # MINUTES OFF OF LONGTIME
049177,000546: 01,3470 21154 DAS LONGTIME
049178,000547:
049179,000548: 01,3471 11154 CCS LONGTIME +1 # THE REASONIBG BEHIND THIS PART IS
049180,000549: 01,3472 13511 TCF MUCHTIME # INVOLVED, TAKING INTO ACCOUNT THAT THE
049181,000550: # WORDS MAY NOT BE SIGNED CORRECTED (DP
049182,000551: # BASIC INSTRUCTIONS
049183,000552: # DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
049184,000553: # TED BIT14 (1 OVER HALF THE POS. VALUE
049185,000554: # REPRESENTIBLE IN SINGLE WORD)
049186,000555: 01,3473 13474 NOOP # CAN:T GET HERE **********
049187,000556: 01,3474 13475 TCF +1
049188,000557: 01,3475 11153 CCS LONGTIME
049189,000558: 01,3476 13511 TCF MUCHTIME
049190,000559: 01,3477 00000 DPBIT14 OCT 00000
049191,000560: 01,3500 20000 OCT 20000
049192,000561:
049193,000562: # LONGCALL
Page 1132 |
049195,000564: 01,3501 34736 LASTTIME CA BIT14 # GET BACK THE CORRECT DELTA T FOR WAITLIST
049196,000565: 01,3502 27154 ADS LONGTIME +1
049197,000566: 01,3503 05203 TC WAITLIST
049198,000567: 01,3504 E3,1400 EBANK= LST1
049199,000568: 01,3504 03516 02063 2CADR GETCADR # THE ENTRY TO OUR LONGCADR
049200,000569:
049201,000570: 01,3506 33520 LONGRTRN CA TSKOVCDR # SET IT UP SO THAT ONLY THE FIRST EXIT IS
049202,000571: 01,3507 53435 DXCH LONGEXIT # TO THE CALLER OF LONGCALL
049203,000572: 01,3510 52006 DTCB # THE REST ARE TO TASKOVER
049204,000573:
049205,000574: 01,3511 34736 MUCHTIME CA BIT14 # WE HAVE OVER OUR ABOUT 1.25 MINUTES
049206,000575: 01,3512 05203 TC WAITLIST # SO SET UP FOR ANOTHER CYCLE THROUGH HERE
049207,000576: 01,3513 E3,1400 EBANK= LST1
049208,000577: 01,3513 03466 02063 2CADR LONGCYCL
049209,000578:
049210,000579: 01,3515 13506 TCF LONGRTRN # NOW EXIT PROPERLY
049211,000580:
049212,000581: # *** WAITLIST TASK GETCADR ***
049213,000582:
049214,000583: 01,3516 53150 GETCADR DXCH LONGCADR # GET THE LONGCALL THAT WE WISHED TO START
049215,000584: 01,3517 52006 DTCB # AND TRANSFER CONTROL TO IT
049216,000585:
049217,000586: 01,3520 05261 TSKOVCDR GENADR TASKOVER
049218,000587: 01,3521 53435 LONGPOOH DXCH LONGEXIT
049219,000588: 01,3522 13524 TCF +2
049220,000589: 01,3523 52062 WAITPOOH DXCH WAITEXIT
049221,000590: 01,3524 05726 +2 TC POODOO1
049222,000591: 01,3525 01204 OCT 01204
049223,000592:
End of include-file WAITLIST.agc. Parent file is MAIN.agc