Source Code

This is a reconstructed version of Luminary 130, the initial AGC program released in November 1969 for the Apollo 13 LM. Three more releases followed before the flown revision was finally manufactured in February 1970.

This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G.

In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'.

046898,000002:                                                                                                  ## Copyright:   Public domain.
046899,000003:                                                                                                  ## Filename:    WAITLIST.agc
046900,000004:                                                                                                  ## Purpose:     A section of the reconstructed source code for Luminary 130.
046901,000005:                                                                                                  ##              This was the original program released for the Apollo 13 LM,
046902,000006:                                                                                                  ##              although several more revisions would follow. It has been
046903,000007:                                                                                                  ##              reconstructed from a listing of Luminary 131, from which it
046904,000008:                                                                                                  ##              differs on only two lines in P70-P71. The difference is
046905,000009:                                                                                                  ##              described in detail in Luminary memo #129, which was used
046906,000010:                                                                                                  ##              to perform the reconstruction. This file is intended to be a
046907,000011:                                                                                                  ##              faithful reconstruction, except that the code format has been
046908,000012:                                                                                                  ##              changed to conform to the requirements of the yaYUL assembler
046909,000013:                                                                                                  ##              rather than the original YUL assembler.
046910,000014:                                                                                                  ## Reference:   pp. 1111-1126
046911,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046912,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046913,000017:                                                                                                  ## Mod history: 05/31/03 RSB.   Began transcribing.
046914,000018:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
046915,000019:                                                                                                  ##              2010-10-25 JL   Indentation fixes.
046916,000020:                                                                                                  ##              2011-05-07 JL   Removed workarounds.
046917,000021:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
046918,000022:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
046919,000023:                                                                                                  ##                              numbers in 1701.pdf.
046920,000024:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
046921,000025:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified in proofing Artemis 72
046922,000026:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
046923,000027:                                                                                                  ##                              Also corrected WAITP00H and LONGP00H to their POOH
046924,000028:                                                                                                  ##                              equivalents.
046925,000029:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
046926,000030:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
046927,000031:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
046928,000032:                                                                                                  ##              2018-09-04 MAS  Copied from Luminary 131 for Luminary 130.
046929,000033: 

Page 1111

046931,000035:                                                                                                  #  PROGRAM DESCRIPTION                                           DATE - 10 OCTOBER 1966
046932,000036:                                                                                                  #  MOD NO - 2                                                    LOG SECTION - WAITLIST
046933,000037:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)          ASSEMBLY SUNBURST REV 5
046934,000038:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
046935,000039:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
046936,000040: 
046937,000041:                                                                                                  #  FUNCTIONAL DESCRIPTION -
046938,000042:                                                                                                  #        PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
046939,000043:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
046940,000044:                                                                                                  #        FOLLOW.
046941,000045: 
046942,000046:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
046943,000047: 
046944,000048:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
046945,000049:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
046946,000050:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
046947,000051:                                                                                                  #                                        .
046948,000052:                                                                                                  #                                        .
046949,000053:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
046950,000054:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
046951,000055: 
046952,000056:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
046953,000057:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
046954,000058:                                                                                                  #                                        .
046955,000059:                                                                                                  #                                        .
046956,000060:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
046957,000061:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
046958,000062: 
046959,000063:                                                                                                  #  WARNINGS -
046960,000064:                                                                                                  #  --------
046961,000065:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
046962,000066:                                                                                                  #        2)      9 TASKS MAXIMUM
046963,000067:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
046964,000068:                                                                                                  #        4)      TASKS END BY TC TASKOVER
046965,000069: 
046966,000070:                                                                                                  #  CALLING SEQUENCE -
046967,000071:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
046968,000072:                                                                                                  #        L       TC      WAITLIST
046969,000073:                                                                                                  #        L+1     2CADR   DESIRED TASK
046970,000074:                                                                                                  #        L+2     (MINOR OF 2CADR)
046971,000075:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
046972,000076: 
046973,000077:                                                                                                  #  TWIDDLE -
046974,000078:                                                                                                  #  -------
046975,000079:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
046976,000080:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1112

046978,000082:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
046979,000083:                                                                                                  #                L-1     CA      DELTAT
046980,000084:                                                                                                  #                L       TC      TWIDDLE
046981,000085:                                                                                                  #                L+1     ADRES   DESIRED TASK
046982,000086:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
046983,000087: 
046984,000088:                                                                                                  #  NORMAL EXIT MODES -
046985,000089:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
046986,000090: 
046987,000091:                                                                                                  #  ALARM OR ABORT EXIT MODES -
046988,000092:                                                                                                  #        TC      ABORT
046989,000093:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
046990,000094: 
046991,000095:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
046992,000096:                                                                                                  #        ACCOMPLISHED BY FRESH START,--  LST2, ..., LST2 +16 = ENDTASK
046993,000097:                                                                                                  #                                        LST1, ..., LST1 +7  = NEG1/2
046994,000098: 
046995,000099:                                                                                                  #  OUTPUT--
046996,000100:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
046997,000101: 
046998,000102:                                                                                                  #  DEBRIS-
046999,000103:                                                                                                  #        CENTRALS - A,Q,L
047000,000104:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
047001,000105: 
047002,000106:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
047003,000107:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
047004,000108:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
047005,000109:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
047006,000110:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
047007,000111:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
047008,000112:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
047009,000113:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
047010,000114:                                                                                                  #        (Z=0, USUALLY)
047011,000115:                                                                                                  #                LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
047012,000116:                                                                                                  #             THEN   DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
047013,000117:                                                                                                  #        *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
047014,000118: 
047015,000119:                                                                                                  #             IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
047016,000120:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
047017,000121:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
047018,000122: 
047019,000123:    5173                                           BLOCK    02                                    

Page 1113

047021,000125:    5173  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
047022,000126: 
047023,000127:    5173                                           COUNT*   $$/WAIT                               
047024,000128:    5173           00004        TWIDDLE            INHINT                                         
047025,000129:    5174           54001                           TS       L                                     #  SAVE DELAY TIME IN L
047026,000130:    5175           34733                           CA       POSMAX                                
047027,000131:    5176           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
047028,000132:    5177           30006                           CA       BBANK                                 
047029,000133:    5200           00006                           EXTEND                                         
047030,000134:    5201           04007                           ROR      SUPERBNK                              
047031,000135:    5202           56001                           XCH      L                                     
047032,000136: 
047033,000137:    5203           00004        WAITLIST           INHINT                                         
047034,000138:    5204           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
047035,000139:    5205           54061                           TS       WAITEXIT                              #  WAITEXIT.
047036,000140:    5206           00006                           EXTEND                                         
047037,000141:    5207           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
047038,000142:    5210           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
047039,000143:    5211           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
047040,000144:    5212           35220        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
047041,000145:    5213           56006                           XCH      BBANK                                 
047042,000146:    5214           13232                           TCF      WAIT2                                 
047043,000147: 
047044,000148:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
047045,000149: 
047046,000150:    5215           52062        LVWTLIST           DXCH     WAITEXIT                              
047047,000151:    5216           64752                           AD       TWO                                   
047048,000152:    5217           52006                           DTCB                                           
047049,000153: 
047050,000154:    5220  E3,1400                                  EBANK=   LST1                                  
047051,000155:    5220           02063        WAITBB             BBCON    WAIT2                                 
047052,000156: 
047053,000157:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
047054,000158: 
047055,000159:    5221           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
047056,000160:    5222           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
047057,000161:    5223           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
047058,000162: 
047059,000163:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
047060,000164: 
047061,000165:    5224           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
047062,000166:    5225           54063                           TS       WAITADR                               
047063,000167:    5226           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
047064,000168:    5227           00006                           EXTEND                                         
047065,000169:    5230           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
047066,000170:    5231           54001                           TS       L                                     
047067,000171:    5232           35235                           CAF      DELAYEX                               
047068,000172:    5233           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
047069,000173:    5234           15212                           TCF      DLY2                                  
047070,000174: 

Page 1114

047072,000176:    5235           15257        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
047073,000177: 

Page 1115

047075,000179:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
047076,000180: 
047077,000181:    5236  E3,1400                                  EBANK=   LST1                                  
047078,000182:    5236           72537 73714  ENDTASK            -2CADR   SVCT3                                 
047079,000183: 
047080,000184:    5240           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
047081,000185:    5241           15261                           TCF      TASKOVER                              
047082,000186:    5242           15261                           TCF      TASKOVER                              
047083,000187:    5243           15244                           TCF      +1                                    
047084,000188: 
047085,000189:    5244           11301        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
047086,000190:    5245           15256                           TCF      SVCT3X                                #  IMUSTALL.
047087,000191:    5246           15251                           TCF      +3                                    
047088,000192:    5247           15256                           TCF      SVCT3X                                
047089,000193:    5250           15256                           TCF      SVCT3X                                
047090,000194: 
047091,000195:    5251           37726                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
047092,000196:    5252           05072                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
047093,000197:    5253  E3,1460                                  EBANK=   NBDX                                  
047094,000198:    5253           03563 14063                     2CADR    NBDONLY                               
047095,000199: 
047096,000200:    5255           15261                           TCF      TASKOVER                              
047097,000201: 
047098,000202:    5256           05221        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
047099,000203:    5257           00764                           DEC      500        B-14                       
047100,000204:    5260           05240                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
047101,000205: 

Page 1116

047103,000207:                                                                                                  #  BEGIN TASK INSERTION.
047104,000208: 
047105,000209: 01,3232                                           BANK     01                                    
047106,000210: 01,3232                                           COUNT*   $$/WAIT                               
047107,000211: 01,3232           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
047108,000212: 01,3233           30002                           CA       Q                                     
047109,000213: 01,3234           00006                           EXTEND                                         
047110,000214: 01,3235           63524                           BZMF     WAITPOOH                              
047111,000215: 
047112,000216: 01,3236           40026                           CS       TIME3                                 
047113,000217: 01,3237           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
047114,000218: 01,3240           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
047115,000219:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
047116,000220:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
047117,000221:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
047118,000222: 
047119,000223: 01,3241           66112                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
047120,000224: 01,3242           40000                           CS       A                                     #  T - T1 + 1.0 - 201
047121,000225: 
047122,000226:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
047123,000227: 
047124,000228: 01,3243           63371                           AD       OCT40201                              
047125,000229: 01,3244           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
047126,000230: 
047127,000231: 01,3245           10000                           CCS      A                                     #  TEST TD - T1 + 1
047128,000232: 
047129,000233: 01,3246           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
047130,000234: 01,3247           13311                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
047131,000235: 
047132,000236: 01,3250           13251                           NOOP                                           
047133,000237: 01,3251           40002                           CS       Q                                     
047134,000238: 
047135,000239:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
047136,000240:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
047137,000241:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
047138,000242:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
047139,000243: 
047140,000244: 01,3252           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
047141,000245: 01,3253           64736                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
047142,000246: 01,3254           56026                           XCH      TIME3                                 
047143,000247: 01,3255           64735                           AD       NEGMAX                                
047144,000248: 01,3256           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
047145,000249: 01,3257           00006                           EXTEND                                         #  ZERO INDEX Q.
047146,000250: 01,3260           22007                           QXCH     7                                     #  (ZQ)
047147,000251: 

Page 1117

047149,000253: 01,3261           57400        WTLST4             XCH      LST1                                  
047150,000254: 01,3262           57401                           XCH      LST1       +1                         
047151,000255: 01,3263           57402                           XCH      LST1       +2                         
047152,000256: 01,3264           57403                           XCH      LST1       +3                         
047153,000257: 01,3265           57404                           XCH      LST1       +4                         
047154,000258: 01,3266           57405                           XCH      LST1       +5                         
047155,000259: 01,3267           57406                           XCH      LST1       +6                         
047156,000260: 01,3270           57407                           XCH      LST1       +7                         
047157,000261: 
047158,000262: 01,3271           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
047159,000263: 01,3272           50002                           INDEX    Q                                     
047160,000264: 01,3273           13274                           TCF      +1                                    
047161,000265: 
047162,000266: 01,3274           53411                           DXCH     LST2                                  
047163,000267: 01,3275           53413                           DXCH     LST2       +2                         
047164,000268: 01,3276           53415                           DXCH     LST2       +4                         
047165,000269: 01,3277           53417                           DXCH     LST2       +6                         
047166,000270: 01,3300           53421                           DXCH     LST2       +8D                        
047167,000271: 01,3301           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
047168,000272: 01,3302           53425                           DXCH     LST2       +12D                       
047169,000273: 01,3303           53427                           DXCH     LST2       +14D                       
047170,000274: 01,3304           53431                           DXCH     LST2       +16D                       
047171,000275: 01,3305           65236                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
047172,000276:                                                                                                  #  THE LENGTH OF THE LIST.
047173,000277: 01,3306           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
047174,000278: 01,3307           15215                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
047175,000279: 01,3310           13364                           TCF      WTABORT                               #  IT.
047176,000280: 

Page 1118

047178,000282: 01,3311           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
047179,000283: 01,3312           61401                           AD       LST1       +1                         
047180,000284: 01,3313           13317                           TCF      +4                                    
047181,000285: 01,3314           64753                           AD       ONE                                   
047182,000286: 01,3315           03375                           TC       WTLST2                                
047183,000287: 01,3316           00001                           OCT      1                                     
047184,000288: 
047185,000289: 01,3317           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
047186,000290: 01,3320           61402                           AD       LST1       +2                         
047187,000291: 01,3321           13325                           TCF      +4                                    
047188,000292: 01,3322           64753                           AD       ONE                                   
047189,000293: 01,3323           03375                           TC       WTLST2                                
047190,000294: 01,3324           00002                           OCT      2                                     
047191,000295: 
047192,000296: 01,3325           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
047193,000297: 01,3326           61403                           AD       LST1       +3                         
047194,000298: 01,3327           13333                           TCF      +4                                    
047195,000299: 01,3330           64753                           AD       ONE                                   
047196,000300: 01,3331           03375                           TC       WTLST2                                
047197,000301: 01,3332           00003                           OCT      3                                     
047198,000302: 
047199,000303: 01,3333           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
047200,000304: 01,3334           61404                           AD       LST1       +4                         
047201,000305: 01,3335           13341                           TCF      +4                                    
047202,000306: 01,3336           64753                           AD       ONE                                   
047203,000307: 01,3337           03375                           TC       WTLST2                                
047204,000308: 01,3340           00004                           OCT      4                                     
047205,000309: 
047206,000310: 01,3341           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
047207,000311: 01,3342           61405                           AD       LST1       +5                         
047208,000312: 01,3343           13347                           TCF      +4                                    
047209,000313: 01,3344           64753                           AD       ONE                                   
047210,000314: 01,3345           03375                           TC       WTLST2                                
047211,000315: 01,3346           00005                           OCT      5                                     
047212,000316: 
047213,000317: 01,3347           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
047214,000318: 01,3350           61406                           AD       LST1       +6                         
047215,000319: 01,3351           13355                           TCF      +4                                    
047216,000320: 01,3352           64753                           AD       ONE                                   
047217,000321: 01,3353           03375                           TC       WTLST2                                
047218,000322: 01,3354           00006                           OCT      6                                     
047219,000323: 

Page 1119

047221,000325: 01,3355           10000                 +4        CCS      A                                     
047222,000326: 01,3356           61407                           AD       LST1       +7                         
047223,000327: 01,3357           13363                           TCF      +4                                    
047224,000328: 01,3360           64753                           AD       ONE                                   
047225,000329: 01,3361           03375                           TC       WTLST2                                
047226,000330: 01,3362           00007                           OCT      7                                     
047227,000331: 
047228,000332: 01,3363           10000                 +4        CCS      A                                     
047229,000333: 01,3364           03372        WTABORT            TC       FILLED                                
047230,000334: 01,3365           13366                           NOOP                                           #  CAN'T GET HERE
047231,000335: 01,3366           64753                           AD       ONE                                   
047232,000336: 01,3367           03375                           TC       WTLST2                                
047233,000337: 01,3370           00010                           OCT      10                                    
047234,000338: 
047235,000339: 01,3371           40201        OCT40201           OCT      40201                                 
047236,000340: 

Page 1120

047238,000342: 01,3372           52062        FILLED             DXCH     WAITEXIT                              
047239,000343: 01,3373           05706                           TC       BAILOUT1                              #  NO ROOM IN THE INN
047240,000344: 01,3374           31203                           OCT      31203                                 
047241,000345: 

Page 1121

047243,000347:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
047244,000348:                                                                                                  #                                                   N           N+1
047245,000349:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
047246,000350:                                                                                                  #                                                              N+1
047247,000351:                                                                                                  #  THE LST1 ENTRY-(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
047248,000352:                                                                                                  #                   N+1  N                                 N
047249,000353:                                                                                                  #  THE ENTRY-(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
047250,000354:                                                                                                  #              N+1
047251,000355: 
047252,000356: 01,3375           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
047253,000357: 01,3376           50002                           INDEX    Q                                     
047254,000358: 01,3377           30000                           CAF      0                                     
047255,000359: 01,3400           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
047256,000360: 
047257,000361: 01,3401           34753                           CAF      ONE                                   
047258,000362: 01,3402           60064                           AD       WAITTEMP                              
047259,000363: 01,3403           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
047260,000364: 01,3404           27377                           ADS      LST1       -1                         #                 N
047261,000365: 
047262,000366: 01,3405           40064                           CS       WAITTEMP                              
047263,000367: 01,3406           50002                           INDEX    Q                                     
047264,000368: 01,3407           13261                           TCF      WTLST4                                
047265,000369: 
047266,000370:                                                                                                  #        C(TIME3)        =       1.0 - (T1 - T)
047267,000371: 
047268,000372:                                                                                                  #        C(LST1)         =       - (T2 - T1) + 1
047269,000373:                                                                                                  #        C(LST1+1)       =       - (T3 - T2) + 1
047270,000374:                                                                                                  #        C(LST1+2)       =       - (T4 - T3) + 1
047271,000375:                                                                                                  #        C(LST1+3)       =       - (T5 - T4) + 1
047272,000376:                                                                                                  #        C(LST1+4)       =       - (T6 - T5) + 1
047273,000377: 
047274,000378:                                                                                                  #        C(LST2)         =       2CADR TASK1
047275,000379:                                                                                                  #        C(LST2+2)       =       2CADR TASK2
047276,000380:                                                                                                  #        C(LST2+4)       =       2CADR TASK3
047277,000381:                                                                                                  #        C(LST2+6)       =       2CADR TASK4
047278,000382:                                                                                                  #        C(LST2+8)       =       2CADR TASK5
047279,000383:                                                                                                  #        C(LST2+10)      =       2CADR TASK6
047280,000384: 

Page 1122

047282,000386:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
047283,000387: 
047284,000388: 01,3410           00006        T3RUPT             EXTEND                                         
047285,000389: 01,3411           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
047286,000390: 01,3412           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
047287,000391: 01,3413           00006                           EXTEND                                         
047288,000392: 01,3414           22012                           QXCH     QRUPT                                 
047289,000393: 
047290,000394: 01,3415           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
047291,000395: 01,3416           57407                           XCH      LST1       +7                         
047292,000396: 01,3417           57406                           XCH      LST1       +6                         
047293,000397: 01,3420           57405                           XCH      LST1       +5                         
047294,000398: 01,3421           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
047295,000399: 01,3422           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
047296,000400: 01,3423           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
047297,000401: 01,3424           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
047298,000402: 01,3425           57400                           XCH      LST1                                  
047299,000403: 01,3426           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
047300,000404: 01,3427           26026                           ADS      TIME3                                 #     SO T3 WONT TICK DURING UPDATE.
047301,000405: 01,3430           54332                           TS       RUPTAGN                               
047302,000406: 01,3431           44755                           CS       ZERO                                  
047303,000407: 01,3432           54332                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
047304,000408: 
047305,000409: 01,3433           00006                           EXTEND                                         #  DISPATCH TASK.
047306,000410: 01,3434           45237                           DCS      ENDTASK                               
047307,000411: 01,3435           53431                           DXCH     LST2       +16D                       
047308,000412: 01,3436           53427                           DXCH     LST2       +14D                       
047309,000413: 01,3437           53425                           DXCH     LST2       +12D                       
047310,000414: 01,3440           53423                           DXCH     LST2       +10D                       
047311,000415: 01,3441           53421                           DXCH     LST2       +8D                        
047312,000416: 01,3442           53417                           DXCH     LST2       +6                         
047313,000417: 01,3443           53415                           DXCH     LST2       +4                         
047314,000418: 01,3444           53413                           DXCH     LST2       +2                         
047315,000419: 01,3445           53411                           DXCH     LST2                                  
047316,000420: 
047317,000421: 01,3446           56001                           XCH      L                                     
047318,000422: 01,3447           00006                           EXTEND                                         
047319,000423: 01,3450           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
047320,000424: 01,3451           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
047321,000425: 01,3452           52006                           DTCB                                           
047322,000426: 

Page 1123

047324,000428:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
047325,000429: 
047326,000430:    5261                                           BLOCK    02                                    
047327,000431:    5261                                           COUNT*   $$/WAIT                               
047328,000432:    5261           10332        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
047329,000433:    5262           35220                           CAF      WAITBB                                
047330,000434:    5263           54006                           TS       BBANK                                 
047331,000435:    5264           13415                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
047332,000436: 
047333,000437:    5265           30016                           CA       BANKRUPT                              
047334,000438:    5266           00006                           EXTEND                                         
047335,000439:    5267           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
047336,000440: 
047337,000441:    5270           00006        RESUME             EXTEND                                         
047338,000442:    5271           22012                           QXCH     QRUPT                                 
047339,000443:    5272           30016        NOQRSM             CA       BANKRUPT                              
047340,000444:    5273           56006                           XCH      BBANK                                 
047341,000445:    5274           52011        NOQBRSM            DXCH     ARUPT                                 
047342,000446:    5275           00003                           RELINT                                         
047343,000447:    5276           50017                           RESUME                                         
047344,000448: 

Page 1124

047346,000450:                                                                                                  #  LONGCALL
047347,000451:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
047348,000452:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
047349,000453:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
047350,000454: 
047351,000455:                                                                                                  #  FUNCTIONAL DESCRIPTION -
047352,000456:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
047353,000457:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
047354,000458:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
047355,000459:                                                                                                  #        START
047356,000460:                                                                                                  #  CALLING SEQUENCE -
047357,000461:                                                                                                  #                EXTEND
047358,000462:                                                                                                  #                DCA     TIMELOC
047359,000463:                                                                                                  #                TC      LONGCALL
047360,000464:                                                                                                  #                2CADR   TASKTODO
047361,000465:                                                                                                  #  NORMAL EXIT MODE -
047362,000466:                                                                                                  #        1).     TC      WAITLIST
047363,000467:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
047364,000468:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
047365,000469:                                                                                                  #  ALARM OR ABORT EXIT MODE -
047366,000470:                                                                                                  #        NONE
047367,000471:                                                                                                  #  OUTPUT -
047368,000472:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
047369,000473:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
047370,000474:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
047371,000475:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
047372,000476:                                                                                                  #  ERASABLE INITIALIZATION -
047373,000477:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
047374,000478:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
047375,000479:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
047376,000480:                                                                                                  #  DEBRIS -
047377,000481:                                                                                                  #        A,Q,L
047378,000482:                                                                                                  #        LONGCADR AND LONGCADR+1
047379,000483:                                                                                                  #        LONGEXIT AND LONGEXIT+1
047380,000484:                                                                                                  #        LONGTIME AND LONGTIME+1
047381,000485:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
047382,000486: 
047383,000487:    5277                                           BLOCK    02                                    
047384,000488:    5277  E3,1400                                  EBANK=   LST1                                  
047385,000489:    5277           53153        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
047386,000490: 
047387,000491:    5300           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1125

047389,000493:    5301           50002                           NDX      Q                                     
047390,000494:    5302           30001                           DCA      0                                     
047391,000495:    5303           53147                           DXCH     LONGCADR                              
047392,000496: 
047393,000497:    5304           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
047394,000498:    5305           35310                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
047395,000499:    5306           52006                           DTCB                                           
047396,000500: 
047397,000501:    5307  E3,1400                                  EBANK=   LST1                                  
047398,000502:    5307           03453 02063  LGCL2CDR           2CADR    LNGCALL2                              
047399,000503: 
047400,000504:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
047401,000505: 
047402,000506: 01,3453                                           BANK     01                                    
047403,000507: 01,3453                                           COUNT*   $$/WAIT                               
047404,000508: 01,3453           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
047405,000509: 01,3454           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
047406,000510: 01,3455           26002                           ADS      Q                                     
047407,000511: 01,3456           55434                           TS       LONGEXIT                              
047408,000512: 
047409,000513: 01,3457           31152                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
047410,000514: 01,3460           10000                           CCS      A                                     
047411,000515: 01,3461           13467                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
047412,000516: 01,3462           13464                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
047413,000517: 01,3463           13522                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
047414,000518: 01,3464           31153                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
047415,000519: 01,3465           00006                           EXTEND                                         
047416,000520: 01,3466           63522                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
047417,000521: 
047418,000522:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
047419,000523: 
047420,000524: 01,3467           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
047421,000525: 01,3470           43501                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
047422,000526: 01,3471           21153                           DAS      LONGTIME                              
047423,000527: 
047424,000528: 01,3472           11153                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
047425,000529: 01,3473           13512                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
047426,000530:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
047427,000531:                                                                                                  #  BASIC INSTRUCTIONS
047428,000532:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
047429,000533:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
047430,000534:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
047431,000535: 01,3474           13475                           NOOP                                           #  CAN:T GET HERE    **********
047432,000536: 01,3475           13476                           TCF      +1                                    
047433,000537: 01,3476           11152                           CCS      LONGTIME                              
047434,000538: 01,3477           13512                           TCF      MUCHTIME                              
047435,000539: 01,3500           00000        DPBIT14            OCT      00000                                 
047436,000540: 01,3501           20000                           OCT      20000                                 
047437,000541: 
047438,000542:                                                                                                  #  LONGCALL

Page 1126

047440,000544: 01,3502           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
047441,000545: 01,3503           27153                           ADS      LONGTIME   +1                         
047442,000546: 01,3504           05203                           TC       WAITLIST                              
047443,000547: 01,3505  E3,1400                                  EBANK=   LST1                                  
047444,000548: 01,3505           03517 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
047445,000549: 
047446,000550: 01,3507           33521        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
047447,000551: 01,3510           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
047448,000552: 01,3511           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
047449,000553: 
047450,000554: 01,3512           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
047451,000555: 01,3513           05203                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
047452,000556: 01,3514  E3,1400                                  EBANK=   LST1                                  
047453,000557: 01,3514           03467 02063                     2CADR    LONGCYCL                              
047454,000558: 
047455,000559: 01,3516           13507                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
047456,000560: 
047457,000561:                                                                                                  #  *** WAITLIST TASK GETCADR ***
047458,000562: 
047459,000563: 01,3517           53147        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
047460,000564: 01,3520           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
047461,000565: 
047462,000566: 01,3521           05261        TSKOVCDR           GENADR   TASKOVER                              
047463,000567: 01,3522           53435        LONGPOOH           DXCH     LONGEXIT                              
047464,000568: 01,3523           13525                           TCF      +2                                    
047465,000569: 01,3524           52062        WAITPOOH           DXCH     WAITEXIT                              
047466,000570: 01,3525           05716                 +2        TC       POODOO1                               
047467,000571: 01,3526           21204                           OCT      21204                                 
047468,000572: 

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