Source Code
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9)
source code to agree with the images from the printout. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051 10:28 APR. 1,1969Note that the date is the date of the printout, not the date of the program revision. |
053226,000002: ## Copyright: Public domain.
053227,000003: ## Filename: WAITLIST.agc
053228,000004: ## Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
053229,000005: ## It is part of the source code for the Command Module's (CM)
053230,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
053231,000007: ## Assembler: yaYUL
053232,000008: ## Contact: Ron Burkey <info@sandroid.org>.
053233,000009: ## Website: www.ibiblio.org/apollo.
053234,000010: ## Pages: 1221-1235
053235,000011: ## Mod history: 2009-05-14 RSB Adapted from the Colossus249/ file of the
053236,000012: ## same name, using Comanche055 page images.
053237,000013: ## 2010-08-29 JL Fixed indentation.
053238,000014: ## 2011-05-08 JL Removed workarounds.
053239,000015: ## 2016-12-21 RSB Proofed comment text using octopus/ProoferComments
053240,000016: ## and corrected the errors found.
053241,000017: ## 2017-01-20 RSB Fixed comment-text errors noted while diff'ing
053242,000018: ## vs Colossus 249.
053243,000019: ## 2017-02-09 RSB Comment-text fixes identified in proofing Artemis 72
053244,000020: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
053245,000021: ## side-by-side diff of Luminary 69/99/116/131/210.
053246,000022:
053247,000023: ## This source code has been transcribed or otherwise adapted from digitized
053248,000024: ## images of a hardcopy from the MIT Museum. The digitization was performed
053249,000025: ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
053250,000026: ## thanks to both. The images (with suitable reduction in storage size and
053251,000027: ## consequent reduction in image quality as well) are available online at
053252,000028: ## www.ibiblio.org/apollo. If for some reason you find that the images are
053253,000029: ## illegible, contact me at info@sandroid.org about getting access to the
053254,000030: ## (much) higher-quality images which Paul actually created.
053255,000031: ##
053256,000032: ## Notations on the hardcopy document read, in part:
053257,000033: ##
053258,000034: ## Assemble revision 055 of AGC program Comanche by NASA
053259,000035: ## 2021113-051. 10:28 APR. 1, 1969
053260,000036: ##
053261,000037: ## This AGC program shall also be referred to as
053262,000038: ## Colossus 2A
053263,000039:
Page 1221 |
053265,000041: # PROGRAM DESCRIPTION DATE - 10 OCTOBER 1966
053266,000042: # MOD NO - 2 LOG SECTION - WAITLIST
053267,000043: # MOD BY - MILLER (DTMAX INCREASED TO 162.5 SEC) ASSEMBLY SUNBURST REV 5
053268,000044: # MOD 3 BY KERNAN (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
053269,000045: # MOD 4 BY KERNAN (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
053270,000046:
053271,000047: # FUNCTIONAL DESCRIPTION -
053272,000048: # PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
053273,000049: # WHICH IS TO BEGIN IN C(A) CENTISECONDS. WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
053274,000050: # FOLLOW.
053275,000051:
053276,000052: # C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
053277,000053:
053278,000054: # C(LST1) = -(T2-T1)+1
053279,000055: # C(LST1 +1) = -(T3-T2)+1
053280,000056: # C(LST1 +2) = -(T4-T3)+1
053281,000057: # .
053282,000058: # .
053283,000059: # C(LST1 +6) = -(T8-T7)+1
053284,000060: # C(LST1 +7) = -(T9-T8)+1
053285,000061:
053286,000062: # C(LST2) = 2CADR OF TASK1
053287,000063: # C(LST2 +2) = 2CADR OF TASK2
053288,000064: # .
053289,000065: # .
053290,000066: # C(LST2 +14) = 2CADR OF TASK8
053291,000067: # C(LST2 +16) = 2CADR OF TASK9
053292,000068:
053293,000069: # WARNINGS-
053294,000070: # --------
053295,000071: # 1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
053296,000072: # 2) 9 TASKS MAXIMUM
053297,000073: # 3) TASKS CALLED UNDER INTERRUPT INHIBITED
053298,000074: # 4) TASKS END BY TC TASKOVER
053299,000075:
053300,000076: # CALLING SEQUENCE -
053301,000077: # L-1 CA DELTAT (TIME IN CENTISECONDS TO TASK START)
053302,000078: # L TC WAITLIST
053303,000079: # L+1 2CADR DESIRED TASK
053304,000080: # L+2 (MINOR OF 2CADR)
053305,000081: # L+3 RELINT (RETURNS HERE)
053306,000082:
053307,000083: # TWIDDLE-
053308,000084: # -------
053309,000085: # TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER. IN
053310,000086: # SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,
Page 1222 |
053312,000088: # SAVING A WORD. TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
053313,000089: # L-1 CA DELTAT
053314,000090: # L TC TWIDDLE
053315,000091: # L+1 ADRES DESIRED TASK
053316,000092: # L+2 RELINT (RETURNS HERE)
053317,000093:
053318,000094: # NORMAL EXIT MODES -
053319,000095: # AT L+3 OF CALLING SEQUENCE
053320,000096:
053321,000097: # ALARM OR ABORT EXIT MODES -
053322,000098: # TC ABORT
053323,000099: # OCT 1203 (WAITLIST OVERFLOW - TOO MANY TASKS)
053324,000100:
053325,000101: # ERASABLE INITIALIZATION REQUIRED -
053326,000102: # ACCOMPLISHED BY FRESH START,-- LST2, ..., LST2 +16 = ENDTASK
053327,000103: # LST1, ..., LST1 +7 = NEG1/2
053328,000104:
053329,000105: # OUTPUT --
053330,000106: # LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
053331,000107:
053332,000108: # DEBRIS -
053333,000109: # CENTRALS - A,Q,L
053334,000110: # OTHER - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
053335,000111:
053336,000112: # DETAILED ANALYSIS OF TIMING -
053337,000113: # CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
053338,000114: # THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
053339,000115: # LET TO = THE TIME OF THE TC WAITLIST
053340,000116: # LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
053341,000117: # LET X = TS -(100TS)/100 (VARIANCE FROM COUNTERS)
053342,000118: # LET Y = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
053343,000119: # LET Z = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
053344,000120: # (Z=0, USUALLY)
053345,000121: # LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
053346,000122: # THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
053347,000123: # *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
053348,000124: # IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
053349,000125: # INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
053350,000126: # OF OTHER TASKS INHIBITING THE INTERRUPT.
053351,000127:
053352,000128: 5235 BLOCK 02
Page 1223 |
053354,000130: 5235 E3,1400 EBANK= LST1 # TASK LISTS IN SWITCHED E BANK.
053355,000131:
053356,000132: 5235 COUNT 02/WAIT
053357,000133:
053358,000134: 5235 00004 TWIDDLE INHINT
053359,000135: 5236 54001 TS L # SAVE DELAY TIME IN L
053360,000136: 5237 34777 CA POSMAX
053361,000137: 5240 26002 ADS Q # CREATING OVERFLOW AND Q-1 IN Q
053362,000138: 5241 30006 CA BBANK
053363,000139: 5242 00006 EXTEND
053364,000140: 5243 04007 ROR SUPERBNK
053365,000141: 5244 56001 XCH L
053366,000142:
053367,000143: 5245 00004 WAITLIST INHINT
053368,000144: 5246 00006 EXTEND
053369,000145: 5247 65261 BZMF WATLST0-
053370,000146: 5250 56002 XCH Q # SAVE DELTA T IN Q AND RETURN IN
053371,000147: 5251 54061 TS WAITEXIT # WAITEXIT.
053372,000148: 5252 00006 EXTEND
053373,000149: 5253 50061 INDEX WAITEXIT # IF TWIDDLING, THE TS SKIPS TO HERE
053374,000150: 5254 30001 DCA 0 # PICK UP 2CADR OF TASK.
053375,000151: 5255 54063 -1 TS WAITADR # BBCON WILL REMAIN IN L
053376,000152: 5256 35266 DLY2 CAF WAITBB # ENTRY FROM FIXDELAY AND VARDELAY.
053377,000153: 5257 56006 XCH BBANK
053378,000154: 5260 13246 TCF WAIT2
053379,000155:
053380,000156: 5261 05721 WATLST0- TC POODOO
053381,000157: 5262 01204 OCT 1204 # WAITLIST CALL WITH ZERO OR NEG DT
053382,000158:
053383,000159: # RETURN TO CALLER AFTER TASK INSERTION:
053384,000160:
053385,000161: 5263 52062 LVWTLIST DXCH WAITEXIT
053386,000162: 5264 65016 AD TWO
053387,000163: 5265 52006 DTCB
053388,000164:
053389,000165: 5266 E3,1400 EBANK= LST1
053390,000166: 5266 02063 WAITBB BBCON WAIT2
053391,000167:
053392,000168: # RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
053393,000169:
053394,000170: 5267 50002 FIXDELAY INDEX Q # BOTH ROUTINES MUST BE CALLED UNDER
053395,000171: 5270 30000 CAF 0 # WAITLIST CONTROL AND TERMINATE THE TASK
053396,000172: 5271 24002 INCR Q # IN WHICH THEY WERE CALLED.
053397,000173:
053398,000174: # RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
053399,000175:
053400,000176: 5272 56002 VARDELAY XCH Q # DT TO Q. TASK ADRES TO WAITADR.
053401,000177: 5273 54063 TS WAITADR
053402,000178: 5274 30006 CA BBANK # BBANK IS SAVED DURING DELAY.
053403,000179: 5275 00006 EXTEND
Page 1224 |
053405,000181: 5276 04007 ROR SUPERBNK # ADD SBANK TO BBCON.
053406,000182: 5277 54001 TS L
053407,000183: 5300 35303 CAF DELAYEX
053408,000184: 5301 54061 TS WAITEXIT # GO TO TASKOVER AFTER TASK ENTRY.
053409,000185: 5302 15256 TCF DLY2
053410,000186:
053411,000187: 5303 15322 DELAYEX TCF TASKOVER -2 # RETURNS TO TASKOVER
053412,000188:
Page 1225 |
053414,000190: # ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
053415,000191:
053416,000192: 5304 E3,1400 EBANK= LST1
053417,000193: 5304 72471 73714 ENDTASK -2CADR SVCT3
053418,000194:
053419,000195: 5306 10076 SVCT3 CCS FLAGWRD2 # DRIFT FLAG
053420,000196: 5307 15324 TCF TASKOVER
053421,000197: 5310 15324 TCF TASKOVER
053422,000198: 5311 15312 TCF +1
053423,000199:
053424,000200: 5312 11322 CCS IMUCADR # DON'T DO NBDONLY IF SOMEONE ELSE IS IN
053425,000201: 5313 17717 TCF SVCT3X
053426,000202: 5314 15317 TCF +3
053427,000203: 5315 17717 TCF SVCT3X
053428,000204: 5316 17717 TCF SVCT3X
053429,000205: 5317 37672 +3 CAF PRIO35 # COMPENSATE FOR NBD COEFFICIENTS ONLY.
053430,000206: 5320 05134 TC NOVAC # ENABLE EVERY 81.93 SECONDS
053431,000207: 5321 E3,1460 EBANK= NBDX
053432,000208: 5321 03542 14063 2CADR NBDONLY
053433,000209:
053434,000210: 5323 15324 TCF TASKOVER
053435,000211:
053436,000212: 6000 SETLOC FFTAG6
053437,000213: 6000 BANK
053438,000214:
053439,000215: 7717 05267 SVCT3X TC FIXDELAY # DELAY MAX OF 2 TIMES FOR IMU ZERO
053440,000216: 7720 00764 DEC 500 B-14
053441,000217: 7721 05306 TC SVCT3 # CHECK DRIFT FLAG AGAIN
053442,000218:
Page 1226 |
053444,000220: # BEGIN TASK INSERTION.
053445,000221:
053446,000222: 01,3246 BANK 01
053447,000223: 01,3246 COUNT 01/WAIT
053448,000224:
053449,000225: 01,3246 54062 WAIT2 TS WAITBANK # BBANK OF CALLING PROGRAM.
053450,000226: 01,3247 40026 CS TIME3
053451,000227: 01,3250 65010 AD BIT8 # BIT 8 = OCT 200
053452,000228: 01,3251 10000 CCS A # TEST 200 - C(TIME3). IF POSITIVE,
053453,000229: # IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
053454,000230: # C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T). THE FOLLOWING FOUR
053455,000231: # ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
053456,000232:
053457,000233: 01,3252 66056 AD OCT40001 # OVERFLOW HAS OCCURRED. SET C(A) =
053458,000234: 01,3253 40000 CS A # T - T1 + 1.0 - 201
053459,000235:
053460,000236: # NORMAL CASE (C(A) NNZ) YIELDS SAME C(A): -( -(1.0-(T1-T)) + 200) - 1
053461,000237:
053462,000238: 01,3254 63402 AD OCT40201
053463,000239: 01,3255 60002 AD Q # RESULT = TD - T1 + 1.
053464,000240:
053465,000241: 01,3256 10000 CCS A # TEST TD - T1 +1
053466,000242:
053467,000243: 01,3257 61400 AD LST1 # IF TD - T1 POS, GO TO WTLST5 WITH
053468,000244: 01,3260 13322 TCF WTLST5 # C(A) = (TD - T1) + C(LST1) = TD-T2+1
053469,000245:
053470,000246: 01,3261 13262 NOOP
053471,000247: 01,3262 40002 CS Q
053472,000248:
053473,000249: # NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
053474,000250: # SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1. (G/E
053475,000251: # SYMBOL MEANS GREATER THAN OR EQUAL TO). THUS THERE NEED BE NO CON-
053476,000252: # CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
053477,000253:
053478,000254: 01,3263 65002 AD POS1/2 # WHEN TD IS NEXT, FORM QUANTITY
053479,000255: 01,3264 65002 AD POS1/2 # 1.0 - DELTA T = 1.0 - (TD - T)
053480,000256: 01,3265 56026 XCH TIME3
053481,000257: 01,3266 65001 AD NEGMAX
053482,000258: 01,3267 60002 AD Q # 1.0 - DELTAT T NOW COMPLETE.
053483,000259: 01,3270 00006 EXTEND # ZERO INDEX Q.
053484,000260: 01,3271 22007 QXCH 7 # (ZQ)
053485,000261:
Page 1227 |
053487,000263: 01,3272 57400 WTLST4 XCH LST1
053488,000264: 01,3273 57401 XCH LST1 +1
053489,000265: 01,3274 57402 XCH LST1 +2
053490,000266: 01,3275 57403 XCH LST1 +3
053491,000267: 01,3276 57404 XCH LST1 +4
053492,000268: 01,3277 57405 XCH LST1 +5
053493,000269: 01,3300 57406 XCH LST1 +6
053494,000270: 01,3301 57407 XCH LST1 +7
053495,000271:
053496,000272: 01,3302 30063 CA WAITADR # (MINOR PART OF TASK CADR HAS BEEN IN L.)
053497,000273: 01,3303 50002 INDEX Q
053498,000274: 01,3304 13305 TCF +1
053499,000275:
053500,000276: 01,3305 53411 DXCH LST2
053501,000277: 01,3306 53413 DXCH LST2 +2
053502,000278: 01,3307 53415 DXCH LST2 +4
053503,000279: 01,3310 53417 DXCH LST2 +6
053504,000280: 01,3311 53421 DXCH LST2 +8D
053505,000281: 01,3312 53423 DXCH LST2 +10D # AT END, CHECK THAT C(LST2 +10) IS STD
053506,000282: 01,3313 53425 DXCH LST2 +12D
053507,000283: 01,3314 53427 DXCH LST2 +14D
053508,000284: 01,3315 53431 DXCH LST2 +16D
053509,000285: 01,3316 65304 AD ENDTASK # END ITEM, AS CHECK FOR EXCEEDING
053510,000286: # THE LENGTH OF THE LIST.
053511,000287: 01,3317 00006 EXTEND # DUMMY TASK ADRES SHOULD BE IN FIXED-
053512,000288: 01,3320 15263 BZF LVWTLIST # FIXED SO ITS ADRES ALONE DISTINGUISHES
053513,000289: 01,3321 13375 TCF WTABORT # IT.
053514,000290:
Page 1228 |
053516,000292: 01,3322 10000 WTLST5 CCS A # TEST TD - T2 + 1
053517,000293: 01,3323 61401 AD LST1 +1
053518,000294: 01,3324 13330 TCF +4
053519,000295: 01,3325 65017 AD ONE
053520,000296: 01,3326 03403 TC WTLST2
053521,000297: 01,3327 00001 OCT 1
053522,000298:
053523,000299: 01,3330 10000 +4 CCS A # TEST TD - T3 + 1
053524,000300: 01,3331 61402 AD LST1 +2
053525,000301: 01,3332 13336 TCF +4
053526,000302: 01,3333 65017 AD ONE
053527,000303: 01,3334 03403 TC WTLST2
053528,000304: 01,3335 00002 OCT 2
053529,000305:
053530,000306: 01,3336 10000 +4 CCS A # TEST TD - T4 + 1
053531,000307: 01,3337 61403 AD LST1 +3
053532,000308: 01,3340 13344 TCF +4
053533,000309: 01,3341 65017 AD ONE
053534,000310: 01,3342 03403 TC WTLST2
053535,000311: 01,3343 00003 OCT 3
053536,000312:
053537,000313: 01,3344 10000 +4 CCS A # TEST TD - T5 + 1
053538,000314: 01,3345 61404 AD LST1 +4
053539,000315: 01,3346 13352 TCF +4
053540,000316: 01,3347 65017 AD ONE
053541,000317: 01,3350 03403 TC WTLST2
053542,000318: 01,3351 00004 OCT 4
053543,000319:
053544,000320: 01,3352 10000 +4 CCS A # TEST TD - T6 + 1
053545,000321: 01,3353 61405 AD LST1 +5
053546,000322: 01,3354 13360 TCF +4
053547,000323: 01,3355 65017 AD ONE
053548,000324: 01,3356 03403 TC WTLST2
053549,000325: 01,3357 00005 OCT 5
053550,000326:
053551,000327: 01,3360 10000 +4 CCS A # TEST TD - T7 + 1
053552,000328: 01,3361 61406 AD LST1 +6
053553,000329: 01,3362 13366 TCF +4
053554,000330: 01,3363 65017 AD ONE
053555,000331: 01,3364 03403 TC WTLST2
053556,000332: 01,3365 00006 OCT 6
053557,000333:
Page 1229 |
053559,000335: 01,3366 10000 +4 CCS A
053560,000336: 01,3367 61407 AD LST1 +7
053561,000337: 01,3370 13374 TCF +4
053562,000338: 01,3371 65017 AD ONE
053563,000339: 01,3372 03403 TC WTLST2
053564,000340: 01,3373 00007 OCT 7
053565,000341:
053566,000342: 01,3374 10000 +4 CCS A
053567,000343: 01,3375 07755 WTABORT TC BAILOUT # NO ROOM IN THE INN.
053568,000344: 01,3376 01203 OCT 1203
053569,000345:
053570,000346: 01,3377 65017 AD ONE
053571,000347: 01,3400 03403 TC WTLST2
053572,000348: 01,3401 00010 OCT 10
053573,000349:
053574,000350: 01,3402 40201 OCT40201 OCT 40201
053575,000351:
Page 1230 |
053577,000353: # THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T LE TD LE T -1.
053578,000354: # N N+1
053579,000355:
053580,000356: # (LE MEANS LESS THAN OR EQUAL TO). AT ENTRY, C(A) = -(TD - T + 1)
053581,000357: # N+1
053582,000358:
053583,000359: # THE LST1 ENTRY-(T -T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
053584,000360: # N+1 N N
053585,000361:
053586,000362: # THE ENTRY-(T - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
053587,000363: # N+1
053588,000364:
053589,000365: 01,3403 54064 WTLST2 TS WAITTEMP # C(A) = -(TD - T + 1)
053590,000366: 01,3404 50002 INDEX Q
053591,000367: 01,3405 30000 CAF 0
053592,000368: 01,3406 54002 TS Q # INDEX VALUE INTO Q.
053593,000369:
053594,000370: 01,3407 35017 CAF ONE
053595,000371: 01,3410 60064 AD WAITTEMP
053596,000372: 01,3411 50002 INDEX Q # C(A) = -(TD - T ) + 1.
053597,000373: 01,3412 27377 ADS LST1 -1 # N
053598,000374:
053599,000375: 01,3413 40064 CS WAITTEMP
053600,000376: 01,3414 50002 INDEX Q
053601,000377: 01,3415 13272 TCF WTLST4
053602,000378:
053603,000379: # C(TIME3) = 1.0 - (T1 - T)
053604,000380:
053605,000381: # C(LST1 ) = - (T2 - T1) + 1
053606,000382: # C(LST1+1) = - (T3 - T2) + 1
053607,000383: # C(LST1+2) = - (T4 - T3) + 1
053608,000384: # C(LST1+3) = - (T5 - T4) + 1
053609,000385: # C(LST1+4) = - (T6 - T5) + 1
053610,000386:
053611,000387: # C(LST2 ) = 2CADR TASK1
053612,000388: # C(LST2+2 ) = 2CADR TASK2
053613,000389: # C(LST2+4 ) = 2CADR TASK3
053614,000390: # C(LST2+6 ) = 2CADR TASK4
053615,000391: # C(LST2+8 ) = 2CADR TASK5
053616,000392: # C(LST2+10) = 2CADR TASK6
053617,000393:
Page 1231 |
053619,000395: # ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
053620,000396:
053621,000397: 01,3416 00006 T3RUPT EXTEND
053622,000398: 01,3417 04007 ROR SUPERBNK # READ CURRENT SUPERBANK VALUE AND
053623,000399: 01,3420 54016 TS BANKRUPT # SAVE WITH E AND F BANK VALUES.
053624,000400: 01,3421 00006 EXTEND
053625,000401: 01,3422 22012 QXCH QRUPT
053626,000402:
053627,000403: 01,3423 35000 T3RUPT2 CAF NEG1/2 # DISPATCH WAITLIST TASK.
053628,000404: 01,3424 57407 XCH LST1 +7
053629,000405: 01,3425 57406 XCH LST1 +6
053630,000406: 01,3426 57405 XCH LST1 +5
053631,000407: 01,3427 57404 XCH LST1 +4 # 1. MOVE UP LST1 CONTENTS, ENTERING
053632,000408: 01,3430 57403 XCH LST1 +3 # A VALUE OF 1/2 +1 AT THE BOTTOM
053633,000409: 01,3431 57402 XCH LST1 +2 # FOR T6-T5, CORRESPONDING TO THE
053634,000410: 01,3432 57401 XCH LST1 +1 # INTERVAL 81.91 SEC FOR ENDTASK.
053635,000411: 01,3433 57400 XCH LST1
053636,000412: 01,3434 64777 AD POSMAX # 2. SET T3 = 1.0 - T2 - T USING LIST 1.
053637,000413: 01,3435 26026 ADS TIME3 # SO T3 WONT TICK DURING UPDATE.
053638,000414: 01,3436 54734 TS RUPTAGN
053639,000415: 01,3437 45021 CS ZERO
053640,000416: 01,3440 54734 TS RUPTAGN # SETS RUPTAGN TO +1 ON OVERFLOW.
053641,000417:
053642,000418: 01,3441 00006 EXTEND # DISPATCH TASK.
053643,000419: 01,3442 45305 DCS ENDTASK
053644,000420: 01,3443 53431 DXCH LST2 +16D
053645,000421: 01,3444 53427 DXCH LST2 +14D
053646,000422: 01,3445 53425 DXCH LST2 +12D
053647,000423: 01,3446 53423 DXCH LST2 +10D
053648,000424: 01,3447 53421 DXCH LST2 +8D
053649,000425: 01,3450 53417 DXCH LST2 +6
053650,000426: 01,3451 53415 DXCH LST2 +4
053651,000427: 01,3452 53413 DXCH LST2 +2
053652,000428: 01,3453 53411 DXCH LST2
053653,000429:
053654,000430: 01,3454 56001 XCH L
053655,000431: 01,3455 00006 EXTEND
053656,000432: 01,3456 01007 WRITE SUPERBNK # SET SUPERBANK FROM BBCON OF 2CADR
053657,000433: 01,3457 56001 XCH L # RESTORE TO L FOR DXCH Z.
053658,000434: 01,3460 52006 DTCB
053659,000435:
Page 1232 |
053661,000437: # RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
053662,000438:
053663,000439: 5324 BLOCK 02
053664,000440: 5324 COUNT 02/WAIT
053665,000441:
053666,000442: 5324 10734 TASKOVER CCS RUPTAGN # IF +1 RETURN TO T3RUPT, IF -0 RESUME.
053667,000443: 5325 35266 CAF WAITBB
053668,000444: 5326 54006 TS BBANK
053669,000445: 5327 13423 TCF T3RUPT2 # DISPATCH NEXT TASK IF IT WAS DUE.
053670,000446:
053671,000447: 5330 30016 CA BANKRUPT
053672,000448: 5331 00006 EXTEND
053673,000449: 5332 01007 WRITE SUPERBNK # RESTORE SUPERBANK BEFORE RESUME IS DONE
053674,000450:
053675,000451: 5333 00006 RESUME EXTEND
053676,000452: 5334 22012 QXCH QRUPT
053677,000453: 5335 30016 NOQRSM CA BANKRUPT
053678,000454: 5336 56006 XCH BBANK
053679,000455: 5337 52011 NOQBRSM DXCH ARUPT
053680,000456: 5340 00003 RELINT
053681,000457: 5341 50017 RESUME
053682,000458:
Page 1233 |
053684,000460: # LONGCALL
053685,000461: # PROGRAM DESCRIPTION DATE - 17 MARCH 1967
053686,000462: # PROGRAM WRITTEN BY W.H.VANDEVER LOG SECTION WAITLIST
053687,000463: # MOD BY - R. MELANSON TO ADD DOCUMENTATION ASSEMBLY SUNDISK REV. 100
053688,000464:
053689,000465: # FUNCTIONAL DESCRIPTION -
053690,000466: # LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
053691,000467: # IMMEDIATELY FOLLOWING THE TC LONGCALL. FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
053692,000468: # A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
053693,000469: # START
053694,000470:
053695,000471: # CALLING SEQUENCE -
053696,000472: # EXTEND
053697,000473: # DCA TIMELOC
053698,000474: # TC LONGCALL
053699,000475: # 2CADR TASKTODO
053700,000476:
053701,000477: # NORMAL EXIT MODE -
053702,000478: # 1). TC WAITLIST
053703,000479: # 2). DTCB (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
053704,000480: # 3). DTCB (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
053705,000481:
053706,000482: # ALARM OR ABORT EXIT MODE -
053707,000483: # NONE
053708,000484:
053709,000485: # OUTPUT -
053710,000486: # LONGTIME AND LONGTIME+1 = DELTA TIME
053711,000487: # LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
053712,000488: # LONGCADR AND LONGCADR+1 = TASK 2CADR
053713,000489: # A = SINGLE PRECISION TIME FOR WAITLIST
053714,000490:
053715,000491: # ERASABLE INITIALIZATION -
053716,000492: # A = MOST SIGNIFICANT PART OF DELTA TIME
053717,000493: # L = LEAST SIGNIFICANT PART OF DELTA TIME
053718,000494: # Q = ADDRESS OF 2CADR TASK VALUE
053719,000495:
053720,000496: # DEBRIS -
053721,000497: # A,Q,L
053722,000498: # LONGCADR AND LONGCADR+1
053723,000499: # LONGEXIT AND LONGEXIT+1
053724,000500: # LONGTIME AND LONGTIME+1
053725,000501:
053726,000502: # *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
053727,000503:
053728,000504: 5342 BLOCK 02
053729,000505: 5342 E3,1400 EBANK= LST1
053730,000506: 5342 53140 LONGCALL DXCH LONGTIME # OBTAIN THE DELTA TIME
053731,000507:
053732,000508: 5343 00006 EXTEND # OBTAIN THE 2CADR
Page 1234 |
053734,000510: 5344 50002 NDX Q
053735,000511: 5345 30001 DCA 0
053736,000512: 5346 53134 DXCH LONGCADR
053737,000513:
053738,000514: 5347 00006 EXTEND # NOW GO TO THE APPROPRIATE SWITCHED BANK
053739,000515: 5350 35353 DCA LGCL2CDR # FOR THE REST OF LONGCALL
053740,000516: 5351 52006 DTCB
053741,000517:
053742,000518: 5352 E3,1400 EBANK= LST1
053743,000519: 5352 03461 02063 LGCL2CDR 2CADR LNGCALL2
053744,000520:
053745,000521: # *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
053746,000522:
053747,000523: 01,3461 BANK 01
053748,000524: 01,3461 COUNT 01/WAIT
053749,000525:
053750,000526: 01,3461 23435 LNGCALL2 LXCH LONGEXIT +1 # SAVE THE CORRECT BB FOR RETURN
053751,000527: 01,3462 35016 CA TWO # OBTAIN THE RETURN ADDRESS
053752,000528: 01,3463 26002 ADS Q
053753,000529: 01,3464 55434 TS LONGEXIT
053754,000530:
053755,000531: # *** WAITLIST TASK LONGCYCL ***
053756,000532:
053757,000533: 01,3465 00006 LONGCYCL EXTEND # CAN WE SUCCESFULLY TAKE ABOUT 1.25
053758,000534: 01,3466 43477 DCS DPBIT14 # MINUTES OFF OF LONGTIME
053759,000535: 01,3467 21140 DAS LONGTIME
053760,000536:
053761,000537: 01,3470 11140 CCS LONGTIME +1 # THE REASONIBG BEHIND THIS PART IS
053762,000538: 01,3471 13510 TCF MUCHTIME # INVOLVED, TAKING INTO ACCOUNT THAT THE
053763,000539: # WORDS MAY NOT BE SIGNED CORRECTED (DP
053764,000540: # BASIC INSTRUCTIONS
053765,000541: # DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
053766,000542: # TED BIT14 (1 OVER HALF THE POS. VALUE
053767,000543: # REPRESENTIBLE IN SINGLE WORD)
053768,000544: 01,3472 13473 NOOP # CAN:T GET HERE **********
053769,000545: 01,3473 13474 TCF +1
053770,000546: 01,3474 11137 CCS LONGTIME
053771,000547: 01,3475 13510 TCF MUCHTIME
053772,000548: 01,3476 00000 DPBIT14 OCT 00000
053773,000549: 01,3477 20000 OCT 20000
053774,000550:
053775,000551: # LONGCALL
053776,000552: 01,3500 35002 LASTTIME CA BIT14 # GET BACK THE CORRECT DELTA TFOR WAITLIST
053777,000553: 01,3501 27140 ADS LONGTIME +1
053778,000554: 01,3502 05245 TC WAITLIST
053779,000555: 01,3503 E3,1400 EBANK= LST1
053780,000556: 01,3503 03515 02063 2CADR GETCADR # THE ENTRY TO OUR LONGCADR
053781,000557:
053782,000558: 01,3505 33517 LONGRTRN CA TSKOVCDR # SET IT UP SO THAT ONLY THE FIRST EXIT IS
Page 1235 |
053784,000560: 01,3506 53435 DXCH LONGEXIT # TO THE CALLER OF LONGCALL
053785,000561: 01,3507 52006 DTCB # THE REST ARE TO TASKOVER
053786,000562:
053787,000563: 01,3510 35002 MUCHTIME CA BIT14 # WE HAVE OVER OUR ABOUT 1.25 MINUTES
053788,000564: 01,3511 05245 TC WAITLIST # SO SET UP FOR ANOTHER CYCLE THROUGH HERE
053789,000565: 01,3512 E3,1400 EBANK= LST1
053790,000566: 01,3512 03465 02063 2CADR LONGCYCL
053791,000567:
053792,000568: 01,3514 13505 TCF LONGRTRN # NOW EXIT PROPERLY
053793,000569:
053794,000570: # *** WAITLIST TASK GETCADR ***
053795,000571:
053796,000572: 01,3515 53134 GETCADR DXCH LONGCADR # GET THE LONGCALL THAT WE WISHED TO START
053797,000573: 01,3516 52006 DTCB # AND TRANSFER CONTROL TO IT
053798,000574:
053799,000575: 01,3517 05324 TSKOVCDR GENADR TASKOVER
053800,000576:
053801,000577:
End of include-file WAITLIST.agc. Parent file is MAIN.agc