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.

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

Page 1188

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

Page 1189

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

Page 1190

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

Page 1191

050659,000177:    5172           15211        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
050660,000178: 

Page 1192

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

Page 1193

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

Page 1194

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

Page 1195

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

Page 1196

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

Page 1197

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

Page 1198

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

Page 1199

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

Page 1200

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

Page 1201

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

Page 1202

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

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