Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional 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 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

050492,000002:                                                                                                  ## Copyright:   Public domain.
050493,000003:                                                                                                  ## Filename:    WAITLIST.agc
050494,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.  
050495,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
050496,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
050497,000007:                                                                                                  ## Assembler:   yaYUL
050498,000008:                                                                                                  ## Contact:     Onno Hommes <ohommes@alumni.cmu.edu>
050499,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
050500,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
050501,000011:                                                                                                  ## Mod history: 2010-06-02 OH   Adapted from corresponding Colossus 249 file.
050502,000012:                                                                                                  ##              2010-12-04 JL   Remove Colossus 249 header comments. Change to double-has page numbers.
050503,000013:                                                                                                  ##              2011-02-12 JL   Minor fixes.
050504,000014:                                                                                                  ##              2016-11-02 RSB  Typo (offset-reference -1 was not indented).
050505,000015:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
050506,000016:                                                                                                  ##                              and fixed errors found.
050507,000017:                                                                                                  ##              2017-01-20 RSB  Fixed comment-text errors noted while diff'ing
050508,000018:                                                                                                  ##                              vs Colossus 249.
050509,000019:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified in proofing Artemis 72
050510,000020:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
050511,000021:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
050512,000022: 

Page 1188

050514,000024:                                                                                                  #  PROGRAM DESCRIPTION                                                                     DATE - 10 OCTOBER 1966
050515,000025:                                                                                                  #  MOD NO - 2                                                                              LOG SECTION - WAITLIST
050516,000026:                                                                                                  #  MOD BY - MILLER   (DTMAX INCREASED TO 162.5 SEC)                                        ASSEMBLY SUNBURST REV 5
050517,000027:                                                                                                  #  MOD 3 BY KERNAN  (INHINT INSERTED AT WAITLIST)  2/28/68 SKIPPER REV 4
050518,000028: 
050519,000029:                                                                                                  #  MOD 4BY KERNAN (TWIDDLE IN 54)  3/28/68 SKIPPER REV 13.
050520,000030: 
050521,000031: 
050522,000032:                                                                                                  #  FUNCTIONAL DESCRIPTION-
050523,000033:                                                                                                  #          PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED  TO CALL A PROGRAM, (CALLED A TASK),
050524,000034:                                                                                                  #     WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
050525,000035:                                                                                                  #     FOLLOW.
050526,000036: 
050527,000037:                                                                                                  #                  C(TIME3)  = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
050528,000038: 
050529,000039: 
050530,000040:                                                                                                  #                               C(LST1)    = -(T2-T1)+1
050531,000041:                                                                                                  #                               C(LST1 +1) = -(T3-T2)+1
050532,000042:                                                                                                  #                               C(LST1 +2) = -(T4-T3)+1
050533,000043:                                                                                                  #                                          .
050534,000044:                                                                                                  #                                          .
050535,000045:                                                                                                  #                               C(LST1 +6) = -(T8-T7)+1
050536,000046:                                                                                                  #                               C(LST1 +7) = -(T9-T8)+1
050537,000047: 
050538,000048:                                                                                                  #                               C(LST2)    = 2CADR OF TASK1
050539,000049:                                                                                                  #                               C(LST2 +2) = 2CADR OF TASK2
050540,000050:                                                                                                  #                                          .
050541,000051:                                                                                                  #                                          .
050542,000052:                                                                                                  #                               C(LST2 +14)= 2CADR OF TASK8
050543,000053:                                                                                                  #                               C(LST2 +16)= 2CADR OF TASK9
050544,000054: 
050545,000055:                                                                                                  #  WARNINGS-
050546,000056:                                                                                                  #  --------
050547,000057:                                                                                                  #               1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
050548,000058:                                                                                                  #               2) 9 TASKS MAXIMUM
050549,000059:                                                                                                  #               3) TASKS CALLED UNDER INTERRUPT INHIBITED
050550,000060:                                                                                                  #               4) TASKS END BY TC TASKOVER
050551,000061: 
050552,000062:                                                                                                  #  CALLING SEQUENCE-
050553,000063: 
050554,000064:                                                                                                  #               L-1    CA     DELTAT   (TIME IN CENTISECONDS TO TASK START)
050555,000065:                                                                                                  #               L      TC     WAITLIST
050556,000066:                                                                                                  #               L+1    2CADR  DESIRED TASK
050557,000067:                                                                                                  #               L+2    (MINOR OF 2CADR)
050558,000068:                                                                                                  #               L+3    RELINT          (RETURNS HERE)
050559,000069: 
050560,000070:                                                                                                  #  TWIDDLE-
050561,000071:                                                                                                  #  -------
050562,000072:                                                                                                  #               TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.   IN
050563,000073:                                                                                                  #               SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1189

050565,000075:                                                                                                  #               SAVING A WORD.   TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
050566,000076: 
050567,000077:                                                                                                  #               L-1    CA     DELTAT
050568,000078:                                                                                                  #               L      TC     TWIDDLE
050569,000079:                                                                                                  #               L+1    ADRES  DESIRED TASK
050570,000080:                                                                                                  #               L+2    RELINT               (RETURNS HERE)
050571,000081: 
050572,000082:                                                                                                  #  NORMAL EXIT MODES-
050573,000083: 
050574,000084:                                                                                                  #               AT L+3 OF CALLING SEQUENCE
050575,000085: 
050576,000086:                                                                                                  #  ALARM OR ABORT EXIT MODES-
050577,000087: 
050578,000088:                                                                                                  #               TC     ABORT
050579,000089:                                                                                                  #               OCT    1203   (WAITLIST OVERFLOW - TOO MANY TASKS)
050580,000090: 
050581,000091:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
050582,000092: 
050583,000093:                                                                                                  #               ACCOMPLISHED BY FRESH START,--LST2,..., LST2 +16 =ENDTASK
050584,000094:                                                                                                  #                                             LST1,..., LST1 +7  =NEG1/2
050585,000095: 
050586,000096:                                                                                                  #  OUTPUT--
050587,000097: 
050588,000098:                                                                                                  #               LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
050589,000099:                                                                                                  #  DEBRIS-
050590,000100: 
050591,000101:                                                                                                  #               CENTRALS- A,Q,L
050592,000102:                                                                                                  #               OTHER   - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
050593,000103:                                                                                                  #  DETAILED ANALYSIS OF TIMING-
050594,000104:                                                                                                  #          CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR)   IN EXACTLY DELTA T CENTISECONDS.
050595,000105:                                                                                                  #     THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
050596,000106: 
050597,000107:                                                                                                  #               LET TO = THE TIME OF THE TC WAITLIST
050598,000108:                                                                                                  #               LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
050599,000109:                                                                                                  #               LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
050600,000110:                                                                                                  #               LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
050601,000111:                                                                                                  #               LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
050602,000112:                                                                                                  #     (Z=0, USUALLY)
050603,000113:                                                                                                  #               LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
050604,000114:                                                                                                  #            THEN   DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
050605,000115:                                                                                                  #     *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
050606,000116: 
050607,000117: 
050608,000118:                                                                                                  #          IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
050609,000119:                                                                                                  #     INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
050610,000120:                                                                                                  #     OF OTHER TASKS INHIBITING THE INTERRUPT.
050611,000121: 
050612,000122: 
050613,000123:    5130                                           BLOCK    02                                    

Page 1190

050615,000125:    5130  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
050616,000126: 
050617,000127:    5130                                           COUNT    02/WAIT                               
050618,000128: 
050619,000129:    5130           00004        TWIDDLE            INHINT                                         
050620,000130:    5131           54001                           TS       L                                     #  SAVE DELAY TIME IN L
050621,000131:    5132           34672                           CA       POSMAX                                
050622,000132:    5133           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
050623,000133:    5134           30006                           CA       BBANK                                 
050624,000134:    5135           00006                           EXTEND                                         
050625,000135:    5136           04007                           ROR      SUPERBNK                              
050626,000136:    5137           56001                           XCH      L                                     
050627,000137: 
050628,000138:    5140           00004        WAITLIST           INHINT                                         
050629,000139:    5141           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
050630,000140:    5142           54061                           TS       WAITEXIT                              #  WAITEXIT.
050631,000141:    5143           00006                           EXTEND                                         
050632,000142:    5144           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
050633,000143:    5145           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
050634,000144:    5146           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
050635,000145:    5147           35155        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
050636,000146:    5150           56006                           XCH      BBANK                                 
050637,000147:    5151           13246                           TCF      WAIT2                                 
050638,000148: 
050639,000149:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
050640,000150: 
050641,000151:    5152           52062        LVWTLIST           DXCH     WAITEXIT                              
050642,000152:    5153           64711                           AD       TWO                                   
050643,000153:    5154           52006                           DTCB                                           
050644,000154: 
050645,000155:    5155  E3,1400                                  EBANK=   LST1                                  
050646,000156:    5155           02063        WAITBB             BBCON    WAIT2                                 
050647,000157: 
050648,000158:                                                                                                  #           RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
050649,000159: 
050650,000160:    5156           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
050651,000161:    5157           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
050652,000162:    5160           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
050653,000163: 
050654,000164:                                                                                                  #           RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
050655,000165: 
050656,000166:    5161           56002        VARDELAY           XCH      Q                                     #  DT TO Q. TASK ADRES TO WAITADR.
050657,000167:    5162           54063                           TS       WAITADR                               
050658,000168:    5163           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
050659,000169:    5164           00006                           EXTEND                                         
050660,000170:    5165           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
050661,000171:    5166           54001                           TS       L                                     
050662,000172:    5167           35172                           CAF      DELAYEX                               
050663,000173:    5170           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
050664,000174:    5171           15147                           TCF      DLY2                                  
050665,000175: 

Page 1191

050667,000177:    5172           15211        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
050668,000178: 

Page 1192

050670,000180:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
050671,000181: 
050672,000182:    5173  E3,1400                                  EBANK=   LST1                                  
050673,000183:    5173           72602 73714  ENDTASK            -2CADR   SVCT3                                 
050674,000184: 
050675,000185:    5175           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
050676,000186:    5176           15213                           TCF      TASKOVER                              
050677,000187:    5177           15213                           TCF      TASKOVER                              
050678,000188:    5200           15201                           TCF      +1                                    
050679,000189: 
050680,000190:    5201           11322                           CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
050681,000191:    5202           15213                           TCF      TASKOVER                              #  IMUSTALL.
050682,000192:    5203           15206                           TCF      +3                                    
050683,000193:    5204           15213                           TCF      TASKOVER                              
050684,000194:    5205           15213                           TCF      TASKOVER                              
050685,000195: 
050686,000196:    5206           37672                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
050687,000197:    5207           05027                           TC       NOVAC                                 #      ENABLE EVERY 81.93 SECONDS
050688,000198:    5210  E3,1460                                  EBANK=   NBDX                                  
050689,000199:    5210           03542 14063                     2CADR    NBDONLY                               
050690,000200:    5212           15213                           TCF      TASKOVER                              
050691,000201: 

Page 1193

050693,000203:                                                                                                  #           BEGIN TASK INSERTION.
050694,000204: 
050695,000205: 01,3246                                           BANK     01                                    
050696,000206: 01,3246                                           COUNT    01/WAIT                               
050697,000207: 
050698,000208: 01,3246           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
050699,000209: 01,3247           40026                           CS       TIME3                                 
050700,000210: 01,3250           64703                           AD       BIT8                                  #  BIT 8 = OCT 200
050701,000211: 01,3251           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
050702,000212:                                                                                                  #                                          IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
050703,000213:                                                                                                  #                                          C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
050704,000214:                                                                                                  #                                          ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
050705,000215: 
050706,000216: 01,3252           66056                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
050707,000217: 01,3253           40000                           CS       A                                     #  T - T1 + 1.0 - 201
050708,000218: 
050709,000219:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
050710,000220: 
050711,000221: 01,3254           63402                           AD       OCT40201                              
050712,000222: 01,3255           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
050713,000223: 
050714,000224: 01,3256           10000                           CCS      A                                     #  TEST TD - T1 + 1
050715,000225: 
050716,000226: 01,3257           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
050717,000227: 01,3260           13322                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
050718,000228: 
050719,000229: 01,3261           13262                           NOOP                                           
050720,000230: 01,3262           40002                           CS       Q                                     
050721,000231: 
050722,000232:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
050723,000233:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
050724,000234:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
050725,000235:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
050726,000236: 
050727,000237: 01,3263           64675                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
050728,000238: 01,3264           64675                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
050729,000239: 01,3265           56026                           XCH      TIME3                                 
050730,000240: 01,3266           64674                           AD       NEGMAX                                
050731,000241: 01,3267           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
050732,000242: 01,3270           00006                           EXTEND                                         #  ZERO INDEX Q.
050733,000243: 01,3271           22007                           QXCH     7                                     #  (ZQ)
050734,000244: 

Page 1194

050736,000246: 01,3272           57400        WTLST4             XCH      LST1                                  
050737,000247: 01,3273           57401                           XCH      LST1       +1                         
050738,000248: 01,3274           57402                           XCH      LST1       +2                         
050739,000249: 01,3275           57403                           XCH      LST1       +3                         
050740,000250: 01,3276           57404                           XCH      LST1       +4                         
050741,000251: 01,3277           57405                           XCH      LST1       +5                         
050742,000252: 01,3300           57406                           XCH      LST1       +6                         
050743,000253: 01,3301           57407                           XCH      LST1       +7                         
050744,000254: 
050745,000255: 01,3302           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
050746,000256: 01,3303           50002                           INDEX    Q                                     
050747,000257: 01,3304           13305                           TCF      +1                                    
050748,000258: 
050749,000259: 01,3305           53411                           DXCH     LST2                                  
050750,000260: 01,3306           53413                           DXCH     LST2       +2                         
050751,000261: 01,3307           53415                           DXCH     LST2       +4                         
050752,000262: 01,3310           53417                           DXCH     LST2       +6                         
050753,000263: 01,3311           53421                           DXCH     LST2       +8D                        
050754,000264: 01,3312           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
050755,000265: 01,3313           53425                           DXCH     LST2       +12D                       
050756,000266: 01,3314           53427                           DXCH     LST2       +14D                       
050757,000267: 01,3315           53431                           DXCH     LST2       +16D                       
050758,000268: 01,3316           65173                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
050759,000269:                                                                                                  #                                            THE LENGTH OF THE LIST.
050760,000270: 01,3317           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
050761,000271: 01,3320           15152                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
050762,000272: 01,3321           13375                           TCF      WTABORT                               #  IT.
050763,000273: 

Page 1195

050765,000275: 01,3322           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
050766,000276: 01,3323           61401                           AD       LST1       +1                         
050767,000277: 01,3324           13330                           TCF      +4                                    
050768,000278: 01,3325           64712                           AD       ONE                                   
050769,000279: 01,3326           03403                           TC       WTLST2                                
050770,000280: 01,3327           00001                           OCT      1                                     
050771,000281: 
050772,000282: 01,3330           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
050773,000283: 01,3331           61402                           AD       LST1       +2                         
050774,000284: 01,3332           13336                           TCF      +4                                    
050775,000285: 01,3333           64712                           AD       ONE                                   
050776,000286: 01,3334           03403                           TC       WTLST2                                
050777,000287: 01,3335           00002                           OCT      2                                     
050778,000288: 
050779,000289: 01,3336           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
050780,000290: 01,3337           61403                           AD       LST1       +3                         
050781,000291: 01,3340           13344                           TCF      +4                                    
050782,000292: 01,3341           64712                           AD       ONE                                   
050783,000293: 01,3342           03403                           TC       WTLST2                                
050784,000294: 01,3343           00003                           OCT      3                                     
050785,000295: 
050786,000296: 01,3344           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
050787,000297: 01,3345           61404                           AD       LST1       +4                         
050788,000298: 01,3346           13352                           TCF      +4                                    
050789,000299: 01,3347           64712                           AD       ONE                                   
050790,000300: 01,3350           03403                           TC       WTLST2                                
050791,000301: 01,3351           00004                           OCT      4                                     
050792,000302: 
050793,000303: 01,3352           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
050794,000304: 01,3353           61405                           AD       LST1       +5                         
050795,000305: 01,3354           13360                           TCF      +4                                    
050796,000306: 01,3355           64712                           AD       ONE                                   
050797,000307: 01,3356           03403                           TC       WTLST2                                
050798,000308: 01,3357           00005                           OCT      5                                     
050799,000309: 
050800,000310: 01,3360           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
050801,000311: 01,3361           61406                           AD       LST1       +6                         
050802,000312: 01,3362           13366                           TCF      +4                                    
050803,000313: 01,3363           64712                           AD       ONE                                   
050804,000314: 01,3364           03403                           TC       WTLST2                                
050805,000315: 01,3365           00006                           OCT      6                                     
050806,000316: 

Page 1196

050808,000318: 01,3366           10000                 +4        CCS      A                                     
050809,000319: 01,3367           61407                           AD       LST1       +7                         
050810,000320: 01,3370           13374                           TCF      +4                                    
050811,000321: 01,3371           64712                           AD       ONE                                   
050812,000322: 01,3372           03403                           TC       WTLST2                                
050813,000323: 01,3373           00007                           OCT      7                                     
050814,000324: 
050815,000325: 01,3374           10000                 +4        CCS      A                                     
050816,000326: 01,3375           05604        WTABORT            TC       BAILOUT                               #  NO ROOM IN THE INN.
050817,000327: 01,3376           01203                           OCT      1203                                  
050818,000328: 
050819,000329: 01,3377           64712                           AD       ONE                                   
050820,000330: 01,3400           03403                           TC       WTLST2                                
050821,000331: 01,3401           00010                           OCT      10                                    
050822,000332: 
050823,000333: 01,3402           40201        OCT40201           OCT      40201                                 
050824,000334: 

Page 1197

050826,000336:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
050827,000337:                                                                                                  #                                                     N           N+1
050828,000338: 
050829,000339:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
050830,000340:                                                                                                  #                                                              N+1
050831,000341: 
050832,000342:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
050833,000343:                                                                                                  #                    N+1   N                                 N
050834,000344: 
050835,000345:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
050836,000346:                                                                                                  #               N+1
050837,000347: 
050838,000348: 01,3403           54064        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
050839,000349: 01,3404           50002                           INDEX    Q                                     
050840,000350: 01,3405           30000                           CAF      0                                     
050841,000351: 01,3406           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
050842,000352: 
050843,000353: 01,3407           34712                           CAF      ONE                                   
050844,000354: 01,3410           60064                           AD       WAITTEMP                              
050845,000355: 01,3411           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
050846,000356: 01,3412           27377                           ADS      LST1       -1                         #                 N
050847,000357: 
050848,000358: 01,3413           40064                           CS       WAITTEMP                              
050849,000359: 01,3414           50002                           INDEX    Q                                     
050850,000360: 01,3415           13272                           TCF      WTLST4                                
050851,000361: 
050852,000362:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
050853,000363: 
050854,000364:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
050855,000365:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
050856,000366:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
050857,000367:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
050858,000368:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
050859,000369: 
050860,000370:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
050861,000371:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
050862,000372:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
050863,000373:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
050864,000374:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
050865,000375:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
050866,000376: 

Page 1198

050868,000378:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
050869,000379: 
050870,000380: 01,3416           00006        T3RUPT             EXTEND                                         
050871,000381: 01,3417           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
050872,000382: 01,3420           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
050873,000383: 01,3421           00006                           EXTEND                                         
050874,000384: 01,3422           22012                           QXCH     QRUPT                                 
050875,000385: 
050876,000386: 01,3423           34673        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
050877,000387: 01,3424           57407                           XCH      LST1       +7                         
050878,000388: 01,3425           57406                           XCH      LST1       +6                         
050879,000389: 01,3426           57405                           XCH      LST1       +5                         
050880,000390: 01,3427           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
050881,000391: 01,3430           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
050882,000392: 01,3431           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
050883,000393: 01,3432           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
050884,000394: 01,3433           57400                           XCH      LST1                                  
050885,000395: 01,3434           64672                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
050886,000396: 01,3435           26026                           ADS      TIME3                                 #     SO T3 WONT TICK DURING UPDATE.
050887,000397: 01,3436           54734                           TS       RUPTAGN                               
050888,000398: 01,3437           44714                           CS       ZERO                                  
050889,000399: 01,3440           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
050890,000400: 
050891,000401: 01,3441           00006                           EXTEND                                         #  DISPATCH TASK.
050892,000402: 01,3442           45174                           DCS      ENDTASK                               
050893,000403: 01,3443           53431                           DXCH     LST2       +16D                       
050894,000404: 01,3444           53427                           DXCH     LST2       +14D                       
050895,000405: 01,3445           53425                           DXCH     LST2       +12D                       
050896,000406: 01,3446           53423                           DXCH     LST2       +10D                       
050897,000407: 01,3447           53421                           DXCH     LST2       +8D                        
050898,000408: 01,3450           53417                           DXCH     LST2       +6                         
050899,000409: 01,3451           53415                           DXCH     LST2       +4                         
050900,000410: 01,3452           53413                           DXCH     LST2       +2                         
050901,000411: 01,3453           53411                           DXCH     LST2                                  
050902,000412: 
050903,000413: 01,3454           56001                           XCH      L                                     
050904,000414: 01,3455           00006                           EXTEND                                         
050905,000415: 01,3456           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
050906,000416: 01,3457           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
050907,000417: 01,3460           52006                           DTCB                                           
050908,000418: 

Page 1199

050910,000420:                                                                                                  #           RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
050911,000421: 
050912,000422:    5213                                           BLOCK    02                                    
050913,000423:    5213                                           COUNT    02/WAIT                               
050914,000424: 
050915,000425:    5213           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
050916,000426:    5214           35155                           CAF      WAITBB                                
050917,000427:    5215           54006                           TS       BBANK                                 
050918,000428:    5216           13423                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
050919,000429: 
050920,000430:    5217           30016                           CA       BANKRUPT                              
050921,000431:    5220           00006                           EXTEND                                         
050922,000432:    5221           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
050923,000433: 
050924,000434:    5222           00006        RESUME             EXTEND                                         
050925,000435:    5223           22012                           QXCH     QRUPT                                 
050926,000436:    5224           30016        NOQRSM             CA       BANKRUPT                              
050927,000437:    5225           56006                           XCH      BBANK                                 
050928,000438:    5226           52011        NOQBRSM            DXCH     ARUPT                                 
050929,000439:    5227           00003                           RELINT                                         
050930,000440:    5230           50017                           RESUME                                         
050931,000441: 

Page 1200

050933,000443:                                                                                                  #  LONGCALL
050934,000444: 
050935,000445:                                                                                                  #  PROGRAM DESCRIPTION                                  DATE- 17 MARCH 1967
050936,000446:                                                                                                  #  PROGRAM WRITTEN BY W.H. VANDEVER                    LOG SECTION WAITLIST
050937,000447:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK REV. 100
050938,000448: 
050939,000449:                                                                                                  #  FUNCTIONAL DESCRIPTION-
050940,000450:                                                                                                  #  LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
050941,000451:                                                                                                  #  IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
050942,000452:                                                                                                  #  A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
050943,000453:                                                                                                  #  START
050944,000454: 
050945,000455:                                                                                                  #  CALLING SEQUENCE-
050946,000456:                                                                                                  #                                                   EXTEND
050947,000457:                                                                                                  #                                                   DCA    TIMELOC
050948,000458:                                                                                                  #                                                   TC     LONGCALL
050949,000459:                                                                                                  #                                                   2CADR  TASKTODO
050950,000460: 
050951,000461:                                                                                                  #  NORMAL EXIT MODE-
050952,000462:                                                                                                  #     1). TC    WAITLIST
050953,000463:                                                                                                  #     2). DTCB  (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
050954,000464:                                                                                                  #     3). DTCB  (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
050955,000465: 
050956,000466:                                                                                                  #  ALARM OR ABORT EXIT MODE-
050957,000467:                                                                                                  #     NONE
050958,000468: 
050959,000469:                                                                                                  #  OUTPUT-
050960,000470:                                                                                                  #     LONGTIME AND LONGTIME+1 = DELTA TIME
050961,000471:                                                                                                  #     LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
050962,000472:                                                                                                  #     LONGCADR AND LONGCADR+1 = TASK 2CADR
050963,000473:                                                                                                  #     A = SINGLE PRECISION TIME FOR WAITLIST
050964,000474: 
050965,000475:                                                                                                  #  ERASABLE INITIALIZATION-
050966,000476:                                                                                                  #     A = MOST SIGNIFICANT PART OF DELTA TIME
050967,000477:                                                                                                  #     L = LEAST SIGNIFICANT PART OF DELTA TIME
050968,000478:                                                                                                  #     Q = ADDRESS OF 2CADR TASK VALUE
050969,000479: 
050970,000480:                                                                                                  #  DEBRIS-
050971,000481:                                                                                                  #     A,Q,L
050972,000482:                                                                                                  #     LONGCADR AND LONGCADR+1
050973,000483:                                                                                                  #     LONGEXIT AND LONGEXIT+1
050974,000484:                                                                                                  #     LONGTIME AND LONGTIME+1
050975,000485: 
050976,000486:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
050977,000487: 
050978,000488:    5231                                           BLOCK    02                                    
050979,000489:    5231  E3,1400                                  EBANK=   LST1                                  
050980,000490:    5231           53140        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
050981,000491: 
050982,000492:    5232           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1201

050984,000494:    5233           50002                           NDX      Q                                     
050985,000495:    5234           30001                           DCA      0                                     
050986,000496:    5235           53134                           DXCH     LONGCADR                              
050987,000497: 
050988,000498:    5236           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
050989,000499:    5237           35242                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
050990,000500:    5240           52006                           DTCB                                           
050991,000501: 
050992,000502:    5241  E3,1400                                  EBANK=   LST1                                  
050993,000503:    5241           03461 02063  LGCL2CDR           2CADR    LNGCALL2                              
050994,000504: 
050995,000505:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
050996,000506: 
050997,000507: 01,3461                                           BANK     01                                    
050998,000508: 01,3461                                           COUNT    01/WAIT                               
050999,000509: 
051000,000510: 01,3461           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
051001,000511: 01,3462           34711                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
051002,000512: 01,3463           26002                           ADS      Q                                     
051003,000513: 01,3464           55434                           TS       LONGEXIT                              
051004,000514: 
051005,000515:                                                                                                  #           *** WAITLIST TASK LONGCYCL ***
051006,000516: 01,3465           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
051007,000517: 01,3466           43477                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
051008,000518: 01,3467           21140                           DAS      LONGTIME                              
051009,000519: 
051010,000520: 01,3470           11140                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
051011,000521: 01,3471           13510                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
051012,000522:                                                                                                  #                                          WORDS MAY NOT BE SIGNED CORRECTED (DP
051013,000523:                                                                                                  #                                          BASIC INSTRUCTIONS
051014,000524:                                                                                                  #                                          DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
051015,000525:                                                                                                  #                                          TED BIT14 (1 OVER HALF THE POS. VALUE
051016,000526:                                                                                                  #                                          REPRESENTIBLE IN SINGLE WORD)
051017,000527: 01,3472           13473                           NOOP                                           #  CAN:T GET HERE    **********
051018,000528: 01,3473           13474                           TCF      +1                                    
051019,000529: 01,3474           11137                           CCS      LONGTIME                              
051020,000530: 01,3475           13510                           TCF      MUCHTIME                              
051021,000531: 01,3476           00000        DPBIT14            OCT      00000                                 
051022,000532: 01,3477           20000                           OCT      20000                                 
051023,000533: 
051024,000534:                                                                                                  #                                          LONGCALL
051025,000535: 01,3500           34675        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
051026,000536: 01,3501           27140                           ADS      LONGTIME   +1                         
051027,000537: 01,3502           05140                           TC       WAITLIST                              
051028,000538: 01,3503  E3,1400                                  EBANK=   LST1                                  
051029,000539: 01,3503           03515 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
051030,000540: 
051031,000541: 01,3505           33517        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS

Page 1202

051033,000543: 01,3506           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
051034,000544: 01,3507           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
051035,000545: 
051036,000546: 01,3510           34675        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
051037,000547: 01,3511           05140                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
051038,000548: 01,3512  E3,1400                                  EBANK=   LST1                                  
051039,000549: 01,3512           03465 02063                     2CADR    LONGCYCL                              
051040,000550: 
051041,000551: 01,3514           13505                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
051042,000552: 
051043,000553:                                                                                                  #           *** WAITLIST TASK GETCADR ***
051044,000554: 01,3515           53134        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
051045,000555: 01,3516           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
051046,000556: 
051047,000557: 01,3517           05213        TSKOVCDR           GENADR   TASKOVER                              

End of include-file WAITLIST.agc.  Parent file is MAIN.agc