Source Code
This is the source-code for the Apollo 9 Command Module's Guidance Computer.
These files were derived originally from the scan from MIT's Dibner Institute's
now-discontinued website titled "History of Recent Science and Technology", which
in turn was originally created by Gary Neff, though his high-quality scans were
unfortunately reduced in legibility when presented online.
The markings on the front of the
printout imply that it was the original AGC developer Norm Brodeur's copy.
A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original
AGC developer Fred Martin. The source code was transcribed from
those images by Ron Burkey. 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:ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
052113,000002: ## Copyright: Public domain.
052114,000003: ## Filename: WAITLIST.agc
052115,000004: ## Purpose: Part of the source code for Colossus, build 249.
052116,000005: ## It is part of the source code for the Command Module's (CM)
052117,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
052118,000007: ## Assembler: yaYUL
052119,000008: ## Reference: Begins on p. 1191
052120,000009: ## Contact: Ron Burkey <info@sandroid.org>.
052121,000010: ## Website: www.ibiblio.org/apollo/index.html
052122,000011: ## Mod history: 08/28/04 RSB Began adapting from similar Luminary131 file.
052123,000012: ## 05/14/05 RSB Corrected website reference above.
052124,000013: ## 2010-10-24 JL Indentation fixes.
052125,000014: ## 2011-05-07 JL Remove workarounds.
052126,000015: ## 2017-01-06 RSB Page numbers now agree with those on the
052127,000016: ## original harcopy, as opposed to the PDF page
052128,000017: ## numbers in 1701.pdf.
052129,000018: ## 2017-01-20 RSB Cross-diff'd comment text (not whitespace)
052130,000019: ## vs the already-proofed corresponding Colossus
052131,000020: ## 237 and Comanche 55 source-code files
052132,000021: ## and corrected errors found.
052133,000022: ## 2017-02-09 RSB Comment-text fixes identified in proofing Artemis 72
052134,000023: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
052135,000024: ## side-by-side diff of Luminary 69/99/116/131/210.
052136,000025:
052137,000026: ## The contents of the "Colossus249" files, in general, are transcribed
052138,000027: ## from a scanned copy of the program listing. Notations on this
052139,000028: ## document read, in part:
052140,000029: ##
052141,000030: ## Assemble revision 249 of AGC program Colossus by NASA
052142,000031: ## 2021111-041. October 28, 1968.
052143,000032: ##
052144,000033: ## This AGC program shall also be referred to as
052145,000034: ## Colossus 1A
052146,000035: ##
052147,000036: ## Prepared by
052148,000037: ## Massachusetts Institute of Technology
052149,000038: ## 75 Cambridge Parkway
052150,000039: ## Cambridge, Massachusetts
052151,000040: ## under NASA contract NAS 9-4065.
052152,000041: ##
052153,000042: ## Refer directly to the online document mentioned above for further information.
052154,000043: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
052155,000044: ##
052156,000045: ## In some cases, where the source code for Luminary 131 overlaps that of
052157,000046: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
052158,000047: ## source file, and then is proofed to incorporate any changes.
052159,000048:
Page 1191 |
052161,000050: # PROGRAM DESCRIPTION DATE - 10 OCTOBER 1966
052162,000051: # MOD NO - 2 LOG SECTION - WAITLIST
052163,000052: # MOD BY - MILLER (DTMAX INCREASED TO 162.5 SEC) ASSEMBLY SUNBURST REV 5
052164,000053: # MOD 3 BY KERNAN (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
052165,000054: # MOD 4 BY KERNAN (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
052166,000055:
052167,000056: # FUNCTIONAL DESCRIPTION -
052168,000057: # PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
052169,000058: # WHICH IS TO BEGIN IN C(A) CENTISECONDS. WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
052170,000059: # FOLLOW.
052171,000060:
052172,000061: # C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
052173,000062:
052174,000063: # C(LST1) = -(T2-T1)+1
052175,000064: # C(LST1 +1) = -(T3-T2)+1
052176,000065: # C(LST1 +2) = -(T4-T3)+1
052177,000066: # .
052178,000067: # .
052179,000068: # C(LST1 +6) = -(T8-T7)+1
052180,000069: # C(LST1 +7) = -(T9-T8)+1
052181,000070:
052182,000071: # C(LST2) = 2CADR OF TASK1
052183,000072: # C(LST2 +2) = 2CADR OF TASK2
052184,000073: # .
052185,000074: # .
052186,000075: # C(LST2 +14) = 2CADR OF TASK8
052187,000076: # C(LST2 +16) = 2CADR OF TASK9
052188,000077:
052189,000078: # WARNINGS-
052190,000079: # --------
052191,000080: # 1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
052192,000081: # 2) 9 TASKS MAXIMUM
052193,000082: # 3) TASKS CALLED UNDER INTERRUPT INHIBITED
052194,000083: # 4) TASKS END BY TC TASKOVER
052195,000084:
052196,000085: # CALLING SEQUENCE -
052197,000086: # L-1 CA DELTAT (TIME IN CENTISECONDS TO TASK START)
052198,000087: # L TC WAITLIST
052199,000088: # L+1 2CADR DESIRED TASK
052200,000089: # L+2 (MINOR OF 2CADR)
052201,000090: # L+3 RELINT (RETURNS HERE)
052202,000091:
052203,000092: # TWIDDLE-
052204,000093: # -------
052205,000094: # TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER. IN
052206,000095: # SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,
Page 1192 |
052208,000097: # SAVING A WORD. TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
052209,000098: # L-1 CA DELTAT
052210,000099: # L TC TWIDDLE
052211,000100: # L+1 ADRES DESIRED TASK
052212,000101: # L+2 RELINT (RETURNS HERE)
052213,000102:
052214,000103: # NORMAL EXIT MODES -
052215,000104: # AT L+3 OF CALLING SEQUENCE
052216,000105:
052217,000106: # ALARM OR ABORT EXIT MODES -
052218,000107: # TC ABORT
052219,000108: # OCT 1203 (WAITLIST OVERFLOW - TOO MANY TASKS)
052220,000109:
052221,000110: # ERASABLE INITIALIZATION REQUIRED -
052222,000111: # ACCOMPLISHED BY FRESH START,-- LST2, ..., LST2 +16 = ENDTASK
052223,000112: # LST1, ..., LST1 +7 = NEG1/2
052224,000113:
052225,000114: # OUTPUT --
052226,000115: # LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
052227,000116:
052228,000117: # DEBRIS -
052229,000118: # CENTRALS - A,Q,L
052230,000119: # OTHER - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
052231,000120:
052232,000121: # DETAILED ANALYSIS OF TIMING -
052233,000122: # CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
052234,000123: # THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
052235,000124: # LET TO = THE TIME OF THE TC WAITLIST
052236,000125: # LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
052237,000126: # LET X = TS -(100TS)/100 (VARIANCE FROM COUNTERS)
052238,000127: # LET Y = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
052239,000128: # LET Z = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
052240,000129: # (Z=0, USUALLY)
052241,000130: # LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
052242,000131: # THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
052243,000132: # *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
052244,000133: # IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
052245,000134: # INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
052246,000135: # OF OTHER TASKS INHIBITING THE INTERRUPT.
052247,000136:
052248,000137: 5130 BLOCK 02
Page 1193 |
052250,000139: 5130 E3,1400 EBANK= LST1 # TASK LISTS IN SWITCHED E BANK.
052251,000140:
052252,000141: 5130 COUNT 02/WAIT
052253,000142:
052254,000143: 5130 00004 TWIDDLE INHINT
052255,000144: 5131 54001 TS L # SAVE DELAY TIME IN L
052256,000145: 5132 34672 CA POSMAX
052257,000146: 5133 26002 ADS Q # CREATING OVERFLOW AND Q-1 IN Q
052258,000147: 5134 30006 CA BBANK
052259,000148: 5135 00006 EXTEND
052260,000149: 5136 04007 ROR SUPERBNK
052261,000150: 5137 56001 XCH L
052262,000151:
052263,000152: 5140 00004 WAITLIST INHINT
052264,000153: 5141 56002 XCH Q # SAVE DELTA T IN Q AND RETURN IN
052265,000154: 5142 54061 TS WAITEXIT # WAITEXIT.
052266,000155: 5143 00006 EXTEND
052267,000156: 5144 50061 INDEX WAITEXIT # IF TWIDDLING, THE TS SKIPS TO HERE
052268,000157: 5145 30001 DCA 0 # PICK UP 2CADR OF TASK.
052269,000158: 5146 54063 -1 TS WAITADR # BBCON WILL REMAIN IN L
052270,000159: 5147 35155 DLY2 CAF WAITBB # ENTRY FROM FIXDELAY AND VARDELAY.
052271,000160: 5150 56006 XCH BBANK
052272,000161: 5151 13246 TCF WAIT2
052273,000162:
052274,000163: # RETURN TO CALLER AFTER TASK INSERTION:
052275,000164:
052276,000165: 5152 52062 LVWTLIST DXCH WAITEXIT
052277,000166: 5153 64711 AD TWO
052278,000167: 5154 52006 DTCB
052279,000168:
052280,000169: 5155 E3,1400 EBANK= LST1
052281,000170: 5155 02063 WAITBB BBCON WAIT2
052282,000171:
052283,000172: # RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
052284,000173:
052285,000174: 5156 50002 FIXDELAY INDEX Q # BOTH ROUTINES MUST BE CALLED UNDER
052286,000175: 5157 30000 CAF 0 # WAITLIST CONTROL AND TERMINATE THE TASK
052287,000176: 5160 24002 INCR Q # IN WHICH THEY WERE CALLED.
052288,000177:
052289,000178: # RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
052290,000179:
052291,000180: 5161 56002 VARDELAY XCH Q # DT TO Q. TASK ADRES TO WAITADR.
052292,000181: 5162 54063 TS WAITADR
052293,000182: 5163 30006 CA BBANK # BBANK IS SAVED DURING DELAY.
052294,000183: 5164 00006 EXTEND
052295,000184: 5165 04007 ROR SUPERBNK # ADD SBANK TO BBCON.
052296,000185: 5166 54001 TS L
052297,000186: 5167 35172 CAF DELAYEX
052298,000187: 5170 54061 TS WAITEXIT # GO TO TASKOVER AFTER TASK ENTRY.
052299,000188: 5171 15147 TCF DLY2
052300,000189:
Page 1194 |
052302,000191: 5172 15211 DELAYEX TCF TASKOVER -2 # RETURNS TO TASKOVER
052303,000192:
Page 1195 |
052305,000194: # ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
052306,000195:
052307,000196: 5173 E3,1400 EBANK= LST1
052308,000197: 5173 72602 73714 ENDTASK -2CADR SVCT3
052309,000198:
052310,000199: 5175 10076 SVCT3 CCS FLAGWRD2 # DRIFT FLAG
052311,000200: 5176 15213 TCF TASKOVER
052312,000201: 5177 15213 TCF TASKOVER
052313,000202: 5200 15201 TCF +1
052314,000203:
052315,000204: 5201 11322 CCS IMUCADR # DON'T DO NBDONLY IF SOMEONE ELSE IS IN
052316,000205: 5202 15213 TCF TASKOVER # IMUSTALL.
052317,000206: 5203 15206 TCF +3
052318,000207: 5204 15213 TCF TASKOVER
052319,000208: 5205 15213 TCF TASKOVER
052320,000209:
052321,000210: 5206 37672 +3 CAF PRIO35 # COMPENSATE FOR NBD COEFFICIENTS ONLY.
052322,000211: 5207 05027 TC NOVAC # ENABLE EVERY 81.93 SECONDS
052323,000212: 5210 E3,1460 EBANK= NBDX
052324,000213: 5210 03542 14063 2CADR NBDONLY
052325,000214:
052326,000215: 5212 15213 TCF TASKOVER
052327,000216:
Page 1196 |
052329,000218: # BEGIN TASK INSERTION.
052330,000219:
052331,000220: 01,3246 BANK 01
052332,000221: 01,3246 COUNT 01/WAIT
052333,000222:
052334,000223: 01,3246 54062 WAIT2 TS WAITBANK # BBANK OF CALLING PROGRAM.
052335,000224: 01,3247 40026 CS TIME3
052336,000225: 01,3250 64703 AD BIT8 # BIT 8 = OCT 200
052337,000226: 01,3251 10000 CCS A # TEST 200 - C(TIME3). IF POSITIVE,
052338,000227: # IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
052339,000228: # C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T). THE FOLLOWING FOUR
052340,000229: # ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
052341,000230:
052342,000231: 01,3252 66056 AD OCT40001 # OVERFLOW HAS OCCURRED. SET C(A) =
052343,000232: 01,3253 40000 CS A # T - T1 + 1.0 - 201
052344,000233:
052345,000234: # NORMAL CASE (C(A) NNZ) YIELDS SAME C(A): -( -(1.0-(T1-T)) + 200) - 1
052346,000235:
052347,000236: 01,3254 63402 AD OCT40201
052348,000237: 01,3255 60002 AD Q # RESULT = TD - T1 + 1.
052349,000238:
052350,000239: 01,3256 10000 CCS A # TEST TD - T1 +1
052351,000240:
052352,000241: 01,3257 61400 AD LST1 # IF TD - T1 POS, GO TO WTLST5 WITH
052353,000242: 01,3260 13322 TCF WTLST5 # C(A) = (TD - T1) + C(LST1) = TD-T2+1
052354,000243:
052355,000244: 01,3261 13262 NOOP
052356,000245: 01,3262 40002 CS Q
052357,000246:
052358,000247: # NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
052359,000248: # SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1. (G/E
052360,000249: # SYMBOL MEANS GREATER THAN OR EQUAL TO). THUS THERE NEED BE NO CON-
052361,000250: # CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
052362,000251:
052363,000252: 01,3263 64675 AD POS1/2 # WHEN TD IS NEXT, FORM QUANTITY
052364,000253: 01,3264 64675 AD POS1/2 # 1.0 - DELTA T = 1.0 - (TD - T)
052365,000254: 01,3265 56026 XCH TIME3
052366,000255: 01,3266 64674 AD NEGMAX
052367,000256: 01,3267 60002 AD Q # 1.0 - DELTAT T NOW COMPLETE.
052368,000257: 01,3270 00006 EXTEND # ZERO INDEX Q.
052369,000258: 01,3271 22007 QXCH 7 # (ZQ)
052370,000259:
Page 1197 |
052372,000261: 01,3272 57400 WTLST4 XCH LST1
052373,000262: 01,3273 57401 XCH LST1 +1
052374,000263: 01,3274 57402 XCH LST1 +2
052375,000264: 01,3275 57403 XCH LST1 +3
052376,000265: 01,3276 57404 XCH LST1 +4
052377,000266: 01,3277 57405 XCH LST1 +5
052378,000267: 01,3300 57406 XCH LST1 +6
052379,000268: 01,3301 57407 XCH LST1 +7
052380,000269:
052381,000270: 01,3302 30063 CA WAITADR # (MINOR PART OF TASK CADR HAS BEEN IN L.)
052382,000271: 01,3303 50002 INDEX Q
052383,000272: 01,3304 13305 TCF +1
052384,000273:
052385,000274: 01,3305 53411 DXCH LST2
052386,000275: 01,3306 53413 DXCH LST2 +2
052387,000276: 01,3307 53415 DXCH LST2 +4
052388,000277: 01,3310 53417 DXCH LST2 +6
052389,000278: 01,3311 53421 DXCH LST2 +8D
052390,000279: 01,3312 53423 DXCH LST2 +10D # AT END, CHECK THAT C(LST2 +10) IS STD
052391,000280: 01,3313 53425 DXCH LST2 +12D
052392,000281: 01,3314 53427 DXCH LST2 +14D
052393,000282: 01,3315 53431 DXCH LST2 +16D
052394,000283: 01,3316 65173 AD ENDTASK # END ITEM, AS CHECK FOR EXCEEDING
052395,000284: # THE LENGTH OF THE LIST.
052396,000285: 01,3317 00006 EXTEND # DUMMY TASK ADRES SHOULD BE IN FIXED-
052397,000286: 01,3320 15152 BZF LVWTLIST # FIXED SO ITS ADRES ALONE DISTINGUISHES
052398,000287: 01,3321 13375 TCF WTABORT # IT.
052399,000288:
Page 1198 |
052401,000290: 01,3322 10000 WTLST5 CCS A # TEST TD - T2 + 1
052402,000291: 01,3323 61401 AD LST1 +1
052403,000292: 01,3324 13330 TCF +4
052404,000293: 01,3325 64712 AD ONE
052405,000294: 01,3326 03403 TC WTLST2
052406,000295: 01,3327 00001 OCT 1
052407,000296:
052408,000297: 01,3330 10000 +4 CCS A # TEST TD - T3 + 1
052409,000298: 01,3331 61402 AD LST1 +2
052410,000299: 01,3332 13336 TCF +4
052411,000300: 01,3333 64712 AD ONE
052412,000301: 01,3334 03403 TC WTLST2
052413,000302: 01,3335 00002 OCT 2
052414,000303:
052415,000304: 01,3336 10000 +4 CCS A # TEST TD - T4 + 1
052416,000305: 01,3337 61403 AD LST1 +3
052417,000306: 01,3340 13344 TCF +4
052418,000307: 01,3341 64712 AD ONE
052419,000308: 01,3342 03403 TC WTLST2
052420,000309: 01,3343 00003 OCT 3
052421,000310:
052422,000311: 01,3344 10000 +4 CCS A # TEST TD - T5 + 1
052423,000312: 01,3345 61404 AD LST1 +4
052424,000313: 01,3346 13352 TCF +4
052425,000314: 01,3347 64712 AD ONE
052426,000315: 01,3350 03403 TC WTLST2
052427,000316: 01,3351 00004 OCT 4
052428,000317:
052429,000318: 01,3352 10000 +4 CCS A # TEST TD - T6 + 1
052430,000319: 01,3353 61405 AD LST1 +5
052431,000320: 01,3354 13360 TCF +4
052432,000321: 01,3355 64712 AD ONE
052433,000322: 01,3356 03403 TC WTLST2
052434,000323: 01,3357 00005 OCT 5
052435,000324:
052436,000325: 01,3360 10000 +4 CCS A # TEST TD - T7 + 1
052437,000326: 01,3361 61406 AD LST1 +6
052438,000327: 01,3362 13366 TCF +4
052439,000328: 01,3363 64712 AD ONE
052440,000329: 01,3364 03403 TC WTLST2
052441,000330: 01,3365 00006 OCT 6
052442,000331:
Page 1199 |
052444,000333: 01,3366 10000 +4 CCS A
052445,000334: 01,3367 61407 AD LST1 +7
052446,000335: 01,3370 13374 TCF +4
052447,000336: 01,3371 64712 AD ONE
052448,000337: 01,3372 03403 TC WTLST2
052449,000338: 01,3373 00007 OCT 7
052450,000339:
052451,000340: 01,3374 10000 +4 CCS A
052452,000341: 01,3375 05604 WTABORT TC BAILOUT # NO ROOM IN THE INN.
052453,000342: 01,3376 01203 OCT 1203
052454,000343:
052455,000344: 01,3377 64712 AD ONE
052456,000345: 01,3400 03403 TC WTLST2
052457,000346: 01,3401 00010 OCT 10
052458,000347:
052459,000348: 01,3402 40201 OCT40201 OCT 40201
052460,000349:
Page 1200 |
052462,000351: # THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T LE TD LE T -1.
052463,000352: # N N+1
052464,000353: # (LE MEANS LESS THAN OR EQUAL TO). AT ENTRY, C(A) = -(TD - T + 1)
052465,000354: # N+1
052466,000355: # THE LST1 ENTRY-(T -T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
052467,000356: # N+1 N N
052468,000357: # THE ENTRY-(T - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
052469,000358: # N+1
052470,000359:
052471,000360: 01,3403 54064 WTLST2 TS WAITTEMP # C(A) = -(TD - T + 1)
052472,000361: 01,3404 50002 INDEX Q
052473,000362: 01,3405 30000 CAF 0
052474,000363: 01,3406 54002 TS Q # INDEX VALUE INTO Q.
052475,000364:
052476,000365: 01,3407 34712 CAF ONE
052477,000366: 01,3410 60064 AD WAITTEMP
052478,000367: 01,3411 50002 INDEX Q # C(A) = -(TD - T ) + 1.
052479,000368: 01,3412 27377 ADS LST1 -1 # N
052480,000369:
052481,000370: 01,3413 40064 CS WAITTEMP
052482,000371: 01,3414 50002 INDEX Q
052483,000372: 01,3415 13272 TCF WTLST4
052484,000373:
052485,000374: # C(TIME3) = 1.0 - (T1 - T)
052486,000375:
052487,000376: # C(LST1) = - (T2 - T1) + 1
052488,000377: # C(LST1+1) = - (T3 - T2) + 1
052489,000378: # C(LST1+2) = - (T4 - T3) + 1
052490,000379: # C(LST1+3) = - (T5 - T4) + 1
052491,000380: # C(LST1+4) = - (T6 - T5) + 1
052492,000381:
052493,000382: # C(LST2) = 2CADR TASK1
052494,000383: # C(LST2+2) = 2CADR TASK2
052495,000384: # C(LST2+4) = 2CADR TASK3
052496,000385: # C(LST2+6) = 2CADR TASK4
052497,000386: # C(LST2+8) = 2CADR TASK5
052498,000387: # C(LST2+10) = 2CADR TASK6
052499,000388:
Page 1201 |
052501,000390: # ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
052502,000391:
052503,000392: 01,3416 00006 T3RUPT EXTEND
052504,000393: 01,3417 04007 ROR SUPERBNK # READ CURRENT SUPERBANK VALUE AND
052505,000394: 01,3420 54016 TS BANKRUPT # SAVE WITH E AND F BANK VALUES.
052506,000395: 01,3421 00006 EXTEND
052507,000396: 01,3422 22012 QXCH QRUPT
052508,000397:
052509,000398: 01,3423 34673 T3RUPT2 CAF NEG1/2 # DISPATCH WAITLIST TASK.
052510,000399: 01,3424 57407 XCH LST1 +7
052511,000400: 01,3425 57406 XCH LST1 +6
052512,000401: 01,3426 57405 XCH LST1 +5
052513,000402: 01,3427 57404 XCH LST1 +4 # 1. MOVE UP LST1 CONTENTS, ENTERING
052514,000403: 01,3430 57403 XCH LST1 +3 # A VALUE OF 1/2 +1 AT THE BOTTOM
052515,000404: 01,3431 57402 XCH LST1 +2 # FOR T6-T5, CORRESPONDING TO THE
052516,000405: 01,3432 57401 XCH LST1 +1 # INTERVAL 81.91 SEC FOR ENDTASK.
052517,000406: 01,3433 57400 XCH LST1
052518,000407: 01,3434 64672 AD POSMAX # 2. SET T3 = 1.0 - T2 - T USING LIST 1.
052519,000408: 01,3435 26026 ADS TIME3 # SO T3 WONT TICK DURING UPDATE.
052520,000409: 01,3436 54734 TS RUPTAGN
052521,000410: 01,3437 44714 CS ZERO
052522,000411: 01,3440 54734 TS RUPTAGN # SETS RUPTAGN TO +1 ON OVERFLOW.
052523,000412:
052524,000413: 01,3441 00006 EXTEND # DISPATCH TASK.
052525,000414: 01,3442 45174 DCS ENDTASK
052526,000415: 01,3443 53431 DXCH LST2 +16D
052527,000416: 01,3444 53427 DXCH LST2 +14D
052528,000417: 01,3445 53425 DXCH LST2 +12D
052529,000418: 01,3446 53423 DXCH LST2 +10D
052530,000419: 01,3447 53421 DXCH LST2 +8D
052531,000420: 01,3450 53417 DXCH LST2 +6
052532,000421: 01,3451 53415 DXCH LST2 +4
052533,000422: 01,3452 53413 DXCH LST2 +2
052534,000423: 01,3453 53411 DXCH LST2
052535,000424:
052536,000425: 01,3454 56001 XCH L
052537,000426: 01,3455 00006 EXTEND
052538,000427: 01,3456 01007 WRITE SUPERBNK # SET SUPERBANK FROM BBCON OF 2CADR
052539,000428: 01,3457 56001 XCH L # RESTORE TO L FOR DXCH Z.
052540,000429: 01,3460 52006 DTCB
052541,000430:
Page 1202 |
052543,000432: # RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
052544,000433:
052545,000434: 5213 BLOCK 02
052546,000435: 5213 COUNT 02/WAIT
052547,000436:
052548,000437: 5213 10734 TASKOVER CCS RUPTAGN # IF +1 RETURN TO T3RUPT, IF -0 RESUME.
052549,000438: 5214 35155 CAF WAITBB
052550,000439: 5215 54006 TS BBANK
052551,000440: 5216 13423 TCF T3RUPT2 # DISPATCH NEXT TASK IF IT WAS DUE.
052552,000441:
052553,000442: 5217 30016 CA BANKRUPT
052554,000443: 5220 00006 EXTEND
052555,000444: 5221 01007 WRITE SUPERBNK # RESTORE SUPERBANK BEFORE RESUME IS DONE
052556,000445:
052557,000446: 5222 00006 RESUME EXTEND
052558,000447: 5223 22012 QXCH QRUPT
052559,000448: 5224 30016 NOQRSM CA BANKRUPT
052560,000449: 5225 56006 XCH BBANK
052561,000450: 5226 52011 NOQBRSM DXCH ARUPT
052562,000451: 5227 00003 RELINT
052563,000452: 5230 50017 RESUME
052564,000453:
Page 1203 |
052566,000455: # LONGCALL
052567,000456: # PROGRAM DESCRIPTION DATE - 17 MARCH 1967
052568,000457: # PROGRAM WRITTEN BY W.H.VANDEVER LOG SECTION WAITLIST
052569,000458: # MOD BY - R. MELANSON TO ADD DOCUMENTATION ASSEMBLY SUNDISK REV. 100
052570,000459:
052571,000460: # FUNCTIONAL DESCRIPTION -
052572,000461: # LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
052573,000462: # IMMEDIATELY FOLLOWING THE TC LONGCALL. FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
052574,000463: # A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
052575,000464: # START
052576,000465: # CALLING SEQUENCE -
052577,000466: # EXTEND
052578,000467: # DCA TIMELOC
052579,000468: # TC LONGCALL
052580,000469: # 2CADR TASKTODO
052581,000470: # NORMAL EXIT MODE -
052582,000471: # 1). TC WAITLIST
052583,000472: # 2). DTCB (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
052584,000473: # 3). DTCB (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
052585,000474: # ALARM OR ABORT EXIT MODE -
052586,000475: # NONE
052587,000476: # OUTPUT -
052588,000477: # LONGTIME AND LONGTIME+1 = DELTA TIME
052589,000478: # LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
052590,000479: # LONGCADR AND LONGCADR+1 = TASK 2CADR
052591,000480: # A = SINGLE PRECISION TIME FOR WAITLIST
052592,000481: # ERASABLE INITIALIZATION -
052593,000482: # A = MOST SIGNIFICANT PART OF DELTA TIME
052594,000483: # L = LEAST SIGNIFICANT PART OF DELTA TIME
052595,000484: # Q = ADDRESS OF 2CADR TASK VALUE
052596,000485: # DEBRIS -
052597,000486: # A,Q,L
052598,000487: # LONGCADR AND LONGCADR+1
052599,000488: # LONGEXIT AND LONGEXIT+1
052600,000489: # LONGTIME AND LONGTIME+1
052601,000490: # *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
052602,000491:
052603,000492: 5231 BLOCK 02
052604,000493: 5231 E3,1400 EBANK= LST1
052605,000494: 5231 53140 LONGCALL DXCH LONGTIME # OBTAIN THE DELTA TIME
052606,000495:
052607,000496: 5232 00006 EXTEND # OBTAIN THE 2CADR
Page 1204 |
052609,000498: 5233 50002 NDX Q
052610,000499: 5234 30001 DCA 0
052611,000500: 5235 53134 DXCH LONGCADR
052612,000501:
052613,000502: 5236 00006 EXTEND # NOW GO TO THE APPROPRIATE SWITCHED BANK
052614,000503: 5237 35242 DCA LGCL2CDR # FOR THE REST OF LONGCALL
052615,000504: 5240 52006 DTCB
052616,000505:
052617,000506: 5241 E3,1400 EBANK= LST1
052618,000507: 5241 03461 02063 LGCL2CDR 2CADR LNGCALL2
052619,000508:
052620,000509: # *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
052621,000510:
052622,000511: 01,3461 BANK 01
052623,000512: 01,3461 COUNT 01/WAIT
052624,000513:
052625,000514: 01,3461 23435 LNGCALL2 LXCH LONGEXIT +1 # SAVE THE CORRECT BB FOR RETURN
052626,000515: 01,3462 34711 CA TWO # OBTAIN THE RETURN ADDRESS
052627,000516: 01,3463 26002 ADS Q
052628,000517: 01,3464 55434 TS LONGEXIT
052629,000518:
052630,000519: # *** WAITLIST TASK LONGCYCL ***
052631,000520:
052632,000521: 01,3465 00006 LONGCYCL EXTEND # CAN WE SUCCESFULLY TAKE ABOUT 1.25
052633,000522: 01,3466 43477 DCS DPBIT14 # MINUTES OFF OF LONGTIME
052634,000523: 01,3467 21140 DAS LONGTIME
052635,000524:
052636,000525: 01,3470 11140 CCS LONGTIME +1 # THE REASONIBG BEHIND THIS PART IS
052637,000526: 01,3471 13510 TCF MUCHTIME # INVOLVED, TAKING INTO ACCOUNT THAT THE
052638,000527: # WORDS MAY NOT BE SIGNED CORRECTED (DP
052639,000528: # BASIC INSTRUCTIONS
052640,000529: # DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
052641,000530: # TED BIT14 (1 OVER HALF THE POS. VALUE
052642,000531: # REPRESENTIBLE IN SINGLE WORD)
052643,000532: 01,3472 13473 NOOP # CAN:T GET HERE **********
052644,000533: 01,3473 13474 TCF +1
052645,000534: 01,3474 11137 CCS LONGTIME
052646,000535: 01,3475 13510 TCF MUCHTIME
052647,000536: 01,3476 00000 DPBIT14 OCT 00000
052648,000537: 01,3477 20000 OCT 20000
052649,000538:
052650,000539: # LONGCALL
052651,000540: 01,3500 34675 LASTTIME CA BIT14 # GET BACK THE CORRECT DELTA TFOR WAITLIST
052652,000541: 01,3501 27140 ADS LONGTIME +1
052653,000542: 01,3502 05140 TC WAITLIST
052654,000543: 01,3503 E3,1400 EBANK= LST1
052655,000544: 01,3503 03515 02063 2CADR GETCADR # THE ENTRY TO OUR LONGCADR
052656,000545:
052657,000546: 01,3505 33517 LONGRTRN CA TSKOVCDR # SET IT UP SO THAT ONLY THE FIRST EXIT IS
Page 1205 |
052659,000548: 01,3506 53435 DXCH LONGEXIT # TO THE CALLER OF LONGCALL
052660,000549: 01,3507 52006 DTCB # THE REST ARE TO TASKOVER
052661,000550:
052662,000551: 01,3510 34675 MUCHTIME CA BIT14 # WE HAVE OVER OUR ABOUT 1.25 MINUTES
052663,000552: 01,3511 05140 TC WAITLIST # SO SET UP FOR ANOTHER CYCLE THROUGH HERE
052664,000553: 01,3512 E3,1400 EBANK= LST1
052665,000554: 01,3512 03465 02063 2CADR LONGCYCL
052666,000555:
052667,000556: 01,3514 13505 TCF LONGRTRN # NOW EXIT PROPERLY
052668,000557:
052669,000558: # *** WAITLIST TASK GETCADR ***
052670,000559:
052671,000560: 01,3515 53134 GETCADR DXCH LONGCADR # GET THE LONGCALL THAT WE WISHED TO START
052672,000561: 01,3516 52006 DTCB # AND TRANSFER CONTROL TO IT
052673,000562:
052674,000563: 01,3517 05213 TSKOVCDR GENADR TASKOVER
End of include-file WAITLIST.agc. Parent file is MAIN.agc