Source Code

These source-code files are part of a reconstructed copy of Luminary 98, a development version of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memo 85, using asterisks indicating changed lines in the listing as a guide. While no listing of this version is known to exist, nor are the memory-bank checksums available, the reconstruction is believed to be correct because it was an an intermediate step in reconstructing Luminary 97 whose reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152G. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 98 listing.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

046617,000002:                                                                                                  ## Copyright:   Public domain.
046618,000003:                                                                                                  ## Filename:    WAITLIST.agc
046619,000004:                                                                                                  ## Purpose:     A section of Luminary revision 98.
046620,000005:                                                                                                  ##              It is part of the reconstructed source code for the a
046621,000006:                                                                                                  ##              development version of the flight software for the Lunar 
046622,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
046623,000008:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
046624,000009:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
046625,000010:                                                                                                  ##              the listing and Luminary Memo #85, which lists changes between
046626,000011:                                                                                                  ##              Luminary 98 and 99.
046627,000012:                                                                                                  ## Reference:   pp. 1117-1132
046628,000013:                                                                                                  ## Assembler:   yaYUL
046629,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046630,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046631,000016:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
046632,000017: 

Page 1117

046634,000019:                                                                                                  #  PROGRAM DESCRIPTION                                                           DATE - 10 OCTOBER 1966
046635,000020:                                                                                                  #  MOD NO - 2                                                                    LOG SECTION - WAITLIST
046636,000021:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)                          ASSEMBLY SUNBURST REV 5
046637,000022:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
046638,000023:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
046639,000024: 
046640,000025:                                                                                                  #  FUNCTIONAL DESCRIPTION -
046641,000026:                                                                                                  #        PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
046642,000027:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
046643,000028:                                                                                                  #        FOLLOW.
046644,000029: 
046645,000030:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
046646,000031: 
046647,000032:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
046648,000033:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
046649,000034:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
046650,000035:                                                                                                  #                                        .
046651,000036:                                                                                                  #                                        .
046652,000037:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
046653,000038:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
046654,000039: 
046655,000040:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
046656,000041:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
046657,000042:                                                                                                  #                                        .
046658,000043:                                                                                                  #                                        .
046659,000044:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
046660,000045:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
046661,000046: 
046662,000047:                                                                                                  #  WARNINGS -
046663,000048:                                                                                                  #  --------
046664,000049:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
046665,000050:                                                                                                  #        2)      9 TASKS MAXIMUM
046666,000051:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
046667,000052:                                                                                                  #        4)      TASKS END BY TC TASKOVER
046668,000053: 
046669,000054:                                                                                                  #  CALLING SEQUENCE -
046670,000055:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
046671,000056:                                                                                                  #        L       TC      WAITLIST
046672,000057:                                                                                                  #        L+1     2CADR   DESIRED TASK
046673,000058:                                                                                                  #        L+2     (MINOR OF 2CADR)
046674,000059:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
046675,000060: 
046676,000061:                                                                                                  #  TWIDDLE -
046677,000062:                                                                                                  #  -------
046678,000063:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
046679,000064:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1118

046681,000066:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
046682,000067:                                                                                                  #                L-1     CA      DELTAT
046683,000068:                                                                                                  #                L       TC      TWIDDLE
046684,000069:                                                                                                  #                L+1     ADRES   DESIRED TASK
046685,000070:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
046686,000071: 
046687,000072:                                                                                                  #  NORMAL EXIT MODES -
046688,000073:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
046689,000074: 
046690,000075:                                                                                                  #  ALARM OR ABORT EXIT MODES -
046691,000076:                                                                                                  #        TC      ABORT
046692,000077:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
046693,000078: 
046694,000079:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
046695,000080:                                                                                                  #        ACCOMPLISHED BY FRESH START,--  LST2, ..., LST2 +16 = ENDTASK
046696,000081:                                                                                                  #                                        LST1, ..., LST1 +7  = NEG1/2
046697,000082: 
046698,000083:                                                                                                  #  OUTPUT --
046699,000084:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
046700,000085: 
046701,000086:                                                                                                  #  DEBRIS -
046702,000087:                                                                                                  #        CENTRALS - A,Q,L
046703,000088:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
046704,000089: 
046705,000090:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
046706,000091:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
046707,000092:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
046708,000093:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
046709,000094:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
046710,000095:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
046711,000096:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
046712,000097:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
046713,000098:                                                                                                  #                         (Z=0, USUALLY)
046714,000099:                                                                                                  #                LET DELTD  = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
046715,000100:                                                                                                  #                THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
046716,000101:                                                                                                  #                *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
046717,000102:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
046718,000103:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
046719,000104:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
046720,000105: 
046721,000106:    5173                                           BLOCK    02                                    

Page 1119

046723,000108:    5173  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
046724,000109: 
046725,000110:    5173                                           COUNT*   $$/WAIT                               
046726,000111:    5173           00004        TWIDDLE            INHINT                                         
046727,000112:    5174           54001                           TS       L                                     #  SAVE DELAY TIME IN L
046728,000113:    5175           34733                           CA       POSMAX                                
046729,000114:    5176           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
046730,000115:    5177           30006                           CA       BBANK                                 
046731,000116:    5200           00006                           EXTEND                                         
046732,000117:    5201           04007                           ROR      SUPERBNK                              
046733,000118:    5202           56001                           XCH      L                                     
046734,000119: 
046735,000120:    5203           00004        WAITLIST           INHINT                                         
046736,000121:    5204           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
046737,000122:    5205           54061                           TS       WAITEXIT                              #  WAITEXIT.
046738,000123:    5206           00006                           EXTEND                                         
046739,000124:    5207           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
046740,000125:    5210           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
046741,000126:    5211           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
046742,000127:    5212           35220        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
046743,000128:    5213           56006                           XCH      BBANK                                 
046744,000129:    5214           13231                           TCF      WAIT2                                 
046745,000130: 
046746,000131:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
046747,000132: 
046748,000133:    5215           52062        LVWTLIST           DXCH     WAITEXIT                              
046749,000134:    5216           64752                           AD       TWO                                   
046750,000135:    5217           52006                           DTCB                                           
046751,000136: 
046752,000137:    5220  E3,1400                                  EBANK=   LST1                                  
046753,000138:    5220           02063        WAITBB             BBCON    WAIT2                                 
046754,000139: 
046755,000140:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
046756,000141: 
046757,000142:    5221           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
046758,000143:    5222           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
046759,000144:    5223           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
046760,000145: 
046761,000146:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
046762,000147: 
046763,000148:    5224           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
046764,000149:    5225           54063                           TS       WAITADR                               
046765,000150:    5226           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
046766,000151:    5227           00006                           EXTEND                                         
046767,000152:    5230           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
046768,000153:    5231           54001                           TS       L                                     
046769,000154:    5232           35235                           CAF      DELAYEX                               
046770,000155:    5233           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
046771,000156:    5234           15212                           TCF      DLY2                                  
046772,000157: 

Page 1120

046774,000159:    5235           15257        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
046775,000160: 

Page 1121

046777,000162:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
046778,000163: 
046779,000164:    5236  E3,1400                                  EBANK=   LST1                                  
046780,000165:    5236           72537 73714  ENDTASK            -2CADR   SVCT3                                 
046781,000166: 
046782,000167:    5240           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
046783,000168:    5241           15261                           TCF      TASKOVER                              
046784,000169:    5242           15261                           TCF      TASKOVER                              
046785,000170:    5243           15244                           TCF      +1                                    
046786,000171: 
046787,000172:    5244           11304        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
046788,000173:    5245           15256                           TCF      SVCT3X                                #  IMUSTALL.
046789,000174:    5246           15251                           TCF      +3                                    
046790,000175:    5247           15256                           TCF      SVCT3X                                
046791,000176:    5250           15256                           TCF      SVCT3X                                
046792,000177: 
046793,000178:    5251           37723                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
046794,000179:    5252           05072                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
046795,000180:    5253  E3,1460                                  EBANK=   NBDX                                  
046796,000181:    5253           03555 14063                     2CADR    NBDONLY                               
046797,000182: 
046798,000183:    5255           15261                           TCF      TASKOVER                              
046799,000184: 
046800,000185:    5256           05221        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
046801,000186:    5257           00764                           DEC      500        B-14                       
046802,000187:    5260           05240                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
046803,000188: 

Page 1122

046805,000190:                                                                                                  #  BEGIN TASK INSERTION.
046806,000191: 
046807,000192: 01,3231                                           BANK     01                                    
046808,000193: 01,3231                                           COUNT*   $$/WAIT                               
046809,000194: 01,3231           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
046810,000195: 01,3232           30002                           CA       Q                                     
046811,000196: 01,3233           00006                           EXTEND                                         
046812,000197: 01,3234           63523                           BZMF     WAITPOOH                              
046813,000198: 
046814,000199: 01,3235           40026                           CS       TIME3                                 
046815,000200: 01,3236           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
046816,000201: 01,3237           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
046817,000202:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
046818,000203:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
046819,000204:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
046820,000205: 
046821,000206: 01,3240           66107                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
046822,000207: 01,3241           40000                           CS       A                                     #  T - T1 + 1.0 - 201
046823,000208: 
046824,000209:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
046825,000210: 
046826,000211: 01,3242           63370                           AD       OCT40201                              
046827,000212: 01,3243           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
046828,000213: 
046829,000214: 01,3244           10000                           CCS      A                                     #  TEST TD - T1 + 1
046830,000215: 
046831,000216: 01,3245           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
046832,000217: 01,3246           13310                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
046833,000218: 
046834,000219: 01,3247           13250                           NOOP                                           
046835,000220: 01,3250           40002                           CS       Q                                     
046836,000221: 
046837,000222:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
046838,000223:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
046839,000224:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
046840,000225:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
046841,000226: 
046842,000227: 01,3251           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
046843,000228: 01,3252           64736                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
046844,000229: 01,3253           56026                           XCH      TIME3                                 
046845,000230: 01,3254           64735                           AD       NEGMAX                                
046846,000231: 01,3255           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
046847,000232: 01,3256           00006                           EXTEND                                         #  ZERO INDEX Q.
046848,000233: 01,3257           22007                           QXCH     7                                     #  (ZQ)
046849,000234: 

Page 1123

046851,000236: 01,3260           57400        WTLST4             XCH      LST1                                  
046852,000237: 01,3261           57401                           XCH      LST1       +1                         
046853,000238: 01,3262           57402                           XCH      LST1       +2                         
046854,000239: 01,3263           57403                           XCH      LST1       +3                         
046855,000240: 01,3264           57404                           XCH      LST1       +4                         
046856,000241: 01,3265           57405                           XCH      LST1       +5                         
046857,000242: 01,3266           57406                           XCH      LST1       +6                         
046858,000243: 01,3267           57407                           XCH      LST1       +7                         
046859,000244: 
046860,000245: 01,3270           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
046861,000246: 01,3271           50002                           INDEX    Q                                     
046862,000247: 01,3272           13273                           TCF      +1                                    
046863,000248: 
046864,000249: 01,3273           53411                           DXCH     LST2                                  
046865,000250: 01,3274           53413                           DXCH     LST2       +2                         
046866,000251: 01,3275           53415                           DXCH     LST2       +4                         
046867,000252: 01,3276           53417                           DXCH     LST2       +6                         
046868,000253: 01,3277           53421                           DXCH     LST2       +8D                        
046869,000254: 01,3300           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
046870,000255: 01,3301           53425                           DXCH     LST2       +12D                       
046871,000256: 01,3302           53427                           DXCH     LST2       +14D                       
046872,000257: 01,3303           53431                           DXCH     LST2       +16D                       
046873,000258: 01,3304           65236                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
046874,000259:                                                                                                  #  THE LENGTH OF THE LIST.
046875,000260: 01,3305           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
046876,000261: 01,3306           15215                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
046877,000262: 01,3307           13363                           TCF      WTABORT                               #  IT.
046878,000263: 

Page 1124

046880,000265: 01,3310           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
046881,000266: 01,3311           61401                           AD       LST1       +1                         
046882,000267: 01,3312           13316                           TCF      +4                                    
046883,000268: 01,3313           64753                           AD       ONE                                   
046884,000269: 01,3314           03374                           TC       WTLST2                                
046885,000270: 01,3315           00001                           OCT      1                                     
046886,000271: 
046887,000272: 01,3316           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
046888,000273: 01,3317           61402                           AD       LST1       +2                         
046889,000274: 01,3320           13324                           TCF      +4                                    
046890,000275: 01,3321           64753                           AD       ONE                                   
046891,000276: 01,3322           03374                           TC       WTLST2                                
046892,000277: 01,3323           00002                           OCT      2                                     
046893,000278: 
046894,000279: 01,3324           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
046895,000280: 01,3325           61403                           AD       LST1       +3                         
046896,000281: 01,3326           13332                           TCF      +4                                    
046897,000282: 01,3327           64753                           AD       ONE                                   
046898,000283: 01,3330           03374                           TC       WTLST2                                
046899,000284: 01,3331           00003                           OCT      3                                     
046900,000285: 
046901,000286: 01,3332           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
046902,000287: 01,3333           61404                           AD       LST1       +4                         
046903,000288: 01,3334           13340                           TCF      +4                                    
046904,000289: 01,3335           64753                           AD       ONE                                   
046905,000290: 01,3336           03374                           TC       WTLST2                                
046906,000291: 01,3337           00004                           OCT      4                                     
046907,000292: 
046908,000293: 01,3340           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
046909,000294: 01,3341           61405                           AD       LST1       +5                         
046910,000295: 01,3342           13346                           TCF      +4                                    
046911,000296: 01,3343           64753                           AD       ONE                                   
046912,000297: 01,3344           03374                           TC       WTLST2                                
046913,000298: 01,3345           00005                           OCT      5                                     
046914,000299: 
046915,000300: 01,3346           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
046916,000301: 01,3347           61406                           AD       LST1       +6                         
046917,000302: 01,3350           13354                           TCF      +4                                    
046918,000303: 01,3351           64753                           AD       ONE                                   
046919,000304: 01,3352           03374                           TC       WTLST2                                
046920,000305: 01,3353           00006                           OCT      6                                     
046921,000306: 

Page 1125

046923,000308: 01,3354           10000                 +4        CCS      A                                     
046924,000309: 01,3355           61407                           AD       LST1       +7                         
046925,000310: 01,3356           13362                           TCF      +4                                    
046926,000311: 01,3357           64753                           AD       ONE                                   
046927,000312: 01,3360           03374                           TC       WTLST2                                
046928,000313: 01,3361           00007                           OCT      7                                     
046929,000314: 
046930,000315: 01,3362           10000                 +4        CCS      A                                     
046931,000316: 01,3363           03371        WTABORT            TC       FILLED                                
046932,000317: 01,3364           13365                           NOOP                                           #  CAN'T GET HERE
046933,000318: 01,3365           64753                           AD       ONE                                   
046934,000319: 01,3366           03374                           TC       WTLST2                                
046935,000320: 01,3367           00010                           OCT      10                                    
046936,000321: 
046937,000322: 01,3370           40201        OCT40201           OCT      40201                                 
046938,000323: 

Page 1126

046940,000325: 01,3371           52062        FILLED             DXCH     WAITEXIT                              
046941,000326: 01,3372           05716                           TC       BAILOUT1                              #  NO ROOM IN THE INN
046942,000327: 01,3373           01203                           OCT      01203                                 
046943,000328: 

Page 1127

046945,000330:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
046946,000331:                                                                                                  #                                                   N           N+1
046947,000332:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
046948,000333:                                                                                                  #                                                              N+1
046949,000334:                                                                                                  #  THE LST1 ENTRY -(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
046950,000335:                                                                                                  #                    N+1  N                                 N
046951,000336:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
046952,000337:                                                                                                  #               N+1
046953,000338: 
046954,000339: 01,3374           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
046955,000340: 01,3375           50002                           INDEX    Q                                     
046956,000341: 01,3376           30000                           CAF      0                                     
046957,000342: 01,3377           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
046958,000343: 
046959,000344: 01,3400           34753                           CAF      ONE                                   
046960,000345: 01,3401           60064                           AD       WAITTEMP                              
046961,000346: 01,3402           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
046962,000347: 01,3403           27377                           ADS      LST1       -1                         #                 N
046963,000348: 
046964,000349: 01,3404           40064                           CS       WAITTEMP                              
046965,000350: 01,3405           50002                           INDEX    Q                                     
046966,000351: 01,3406           13260                           TCF      WTLST4                                
046967,000352: 
046968,000353:                                                                                                  #        C(TIME3)        =       1.0 - (T1 - T)
046969,000354: 
046970,000355:                                                                                                  #        C(LST1)         =       - (T2 - T1) + 1
046971,000356:                                                                                                  #        C(LST1+1)       =       - (T3 - T2) + 1
046972,000357:                                                                                                  #        C(LST1+2)       =       - (T4 - T3) + 1
046973,000358:                                                                                                  #        C(LST1+3)       =       - (T5 - T4) + 1
046974,000359:                                                                                                  #        C(LST1+4)       =       - (T6 - T5) + 1
046975,000360: 
046976,000361:                                                                                                  #        C(LST2)         =       2CADR TASK1
046977,000362:                                                                                                  #        C(LST2+2)       =       2CADR TASK2
046978,000363:                                                                                                  #        C(LST2+4)       =       2CADR TASK3
046979,000364:                                                                                                  #        C(LST2+6)       =       2CADR TASK4
046980,000365:                                                                                                  #        C(LST2+8)       =       2CADR TASK5
046981,000366:                                                                                                  #        C(LST2+10)      =       2CADR TASK6
046982,000367: 

Page 1128

046984,000369:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
046985,000370: 
046986,000371: 01,3407           00006        T3RUPT             EXTEND                                         
046987,000372: 01,3410           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
046988,000373: 01,3411           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
046989,000374: 01,3412           00006                           EXTEND                                         
046990,000375: 01,3413           22012                           QXCH     QRUPT                                 
046991,000376: 
046992,000377: 01,3414           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
046993,000378: 01,3415           57407                           XCH      LST1       +7                         
046994,000379: 01,3416           57406                           XCH      LST1       +6                         
046995,000380: 01,3417           57405                           XCH      LST1       +5                         
046996,000381: 01,3420           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
046997,000382: 01,3421           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
046998,000383: 01,3422           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
046999,000384: 01,3423           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
047000,000385: 01,3424           57400                           XCH      LST1                                  
047001,000386: 01,3425           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
047002,000387: 01,3426           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
047003,000388: 01,3427           54734                           TS       RUPTAGN                               
047004,000389: 01,3430           44755                           CS       ZERO                                  
047005,000390: 01,3431           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
047006,000391: 
047007,000392: 01,3432           00006                           EXTEND                                         #  DISPATCH TASK.
047008,000393: 01,3433           45237                           DCS      ENDTASK                               
047009,000394: 01,3434           53431                           DXCH     LST2       +16D                       
047010,000395: 01,3435           53427                           DXCH     LST2       +14D                       
047011,000396: 01,3436           53425                           DXCH     LST2       +12D                       
047012,000397: 01,3437           53423                           DXCH     LST2       +10D                       
047013,000398: 01,3440           53421                           DXCH     LST2       +8D                        
047014,000399: 01,3441           53417                           DXCH     LST2       +6                         
047015,000400: 01,3442           53415                           DXCH     LST2       +4                         
047016,000401: 01,3443           53413                           DXCH     LST2       +2                         
047017,000402: 01,3444           53411                           DXCH     LST2                                  
047018,000403: 
047019,000404: 01,3445           56001                           XCH      L                                     
047020,000405: 01,3446           00006                           EXTEND                                         
047021,000406: 01,3447           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
047022,000407: 01,3450           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
047023,000408: 01,3451           52006                           DTCB                                           
047024,000409: 

Page 1129

047026,000411:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
047027,000412: 
047028,000413:    5261                                           BLOCK    02                                    
047029,000414:    5261                                           COUNT*   $$/WAIT                               
047030,000415:    5261           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
047031,000416:    5262           35220                           CAF      WAITBB                                
047032,000417:    5263           54006                           TS       BBANK                                 
047033,000418:    5264           13414                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
047034,000419: 
047035,000420:    5265           30016                           CA       BANKRUPT                              
047036,000421:    5266           00006                           EXTEND                                         
047037,000422:    5267           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
047038,000423: 
047039,000424:    5270           00006        RESUME             EXTEND                                         
047040,000425:    5271           22012                           QXCH     QRUPT                                 
047041,000426:    5272           30016        NOQRSM             CA       BANKRUPT                              
047042,000427:    5273           56006                           XCH      BBANK                                 
047043,000428:    5274           52011        NOQBRSM            DXCH     ARUPT                                 
047044,000429:    5275           00003                           RELINT                                         
047045,000430:    5276           50017                           RESUME                                         
047046,000431: 

Page 1130

047048,000433:                                                                                                  #  LONGCALL
047049,000434:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
047050,000435:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
047051,000436:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
047052,000437: 
047053,000438:                                                                                                  #  FUNCTIONAL DESCRIPTION -
047054,000439:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
047055,000440:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
047056,000441:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
047057,000442:                                                                                                  #        START
047058,000443:                                                                                                  #  CALLING SEQUENCE -
047059,000444:                                                                                                  #                EXTEND
047060,000445:                                                                                                  #                DCA     TIMELOC
047061,000446:                                                                                                  #                TC      LONGCALL
047062,000447:                                                                                                  #                2CADR   TASKTODO
047063,000448:                                                                                                  #  NORMAL EXIT MODE -
047064,000449:                                                                                                  #        1).     TC      WAITLIST
047065,000450:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
047066,000451:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
047067,000452:                                                                                                  #  ALARM OR ABORT EXIT MODE -
047068,000453:                                                                                                  #        NONE
047069,000454:                                                                                                  #  OUTPUT -
047070,000455:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
047071,000456:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
047072,000457:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
047073,000458:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
047074,000459:                                                                                                  #  ERASABLE INITIALIZATION -
047075,000460:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
047076,000461:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
047077,000462:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
047078,000463:                                                                                                  #  DEBRIS -
047079,000464:                                                                                                  #        A,Q,L
047080,000465:                                                                                                  #        LONGCADR AND LONGCADR+1
047081,000466:                                                                                                  #        LONGEXIT AND LONGEXIT+1
047082,000467:                                                                                                  #        LONGTIME AND LONGTIME+1
047083,000468:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
047084,000469: 
047085,000470:    5277                                           BLOCK    02                                    
047086,000471:    5277  E3,1400                                  EBANK=   LST1                                  
047087,000472:    5277           53154        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
047088,000473: 
047089,000474:    5300           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1131

047091,000476:    5301           50002                           NDX      Q                                     
047092,000477:    5302           30001                           DCA      0                                     
047093,000478:    5303           53150                           DXCH     LONGCADR                              
047094,000479: 
047095,000480:    5304           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
047096,000481:    5305           35310                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
047097,000482:    5306           52006                           DTCB                                           
047098,000483: 
047099,000484:    5307  E3,1400                                  EBANK=   LST1                                  
047100,000485:    5307           03452 02063  LGCL2CDR           2CADR    LNGCALL2                              
047101,000486: 
047102,000487:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
047103,000488: 
047104,000489: 01,3452                                           BANK     01                                    
047105,000490: 01,3452                                           COUNT*   $$/WAIT                               
047106,000491: 01,3452           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
047107,000492: 01,3453           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
047108,000493: 01,3454           26002                           ADS      Q                                     
047109,000494: 01,3455           55434                           TS       LONGEXIT                              
047110,000495: 
047111,000496: 01,3456           31153                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
047112,000497: 01,3457           10000                           CCS      A                                     
047113,000498: 01,3460           13466                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
047114,000499: 01,3461           13463                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
047115,000500: 01,3462           13521                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
047116,000501: 01,3463           31154                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
047117,000502: 01,3464           00006                           EXTEND                                         
047118,000503: 01,3465           63521                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
047119,000504: 
047120,000505:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
047121,000506: 
047122,000507: 01,3466           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
047123,000508: 01,3467           43500                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
047124,000509: 01,3470           21154                           DAS      LONGTIME                              
047125,000510: 
047126,000511: 01,3471           11154                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
047127,000512: 01,3472           13511                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
047128,000513:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
047129,000514:                                                                                                  #  BASIC INSTRUCTIONS
047130,000515:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
047131,000516:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
047132,000517:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
047133,000518: 01,3473           13474                           NOOP                                           #  CAN:T GET HERE **********
047134,000519: 01,3474           13475                           TCF      +1                                    
047135,000520: 01,3475           11153                           CCS      LONGTIME                              
047136,000521: 01,3476           13511                           TCF      MUCHTIME                              
047137,000522: 01,3477           00000        DPBIT14            OCT      00000                                 
047138,000523: 01,3500           20000                           OCT      20000                                 
047139,000524: 
047140,000525:                                                                                                  #  LONGCALL

Page 1132

047142,000527: 01,3501           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA T FOR WAITLIST
047143,000528: 01,3502           27154                           ADS      LONGTIME   +1                         
047144,000529: 01,3503           05203                           TC       WAITLIST                              
047145,000530: 01,3504  E3,1400                                  EBANK=   LST1                                  
047146,000531: 01,3504           03516 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
047147,000532: 
047148,000533: 01,3506           33520        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
047149,000534: 01,3507           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
047150,000535: 01,3510           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
047151,000536: 
047152,000537: 01,3511           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
047153,000538: 01,3512           05203                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
047154,000539: 01,3513  E3,1400                                  EBANK=   LST1                                  
047155,000540: 01,3513           03466 02063                     2CADR    LONGCYCL                              
047156,000541: 
047157,000542: 01,3515           13506                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
047158,000543: 
047159,000544:                                                                                                  #  *** WAITLIST TASK GETCADR ***
047160,000545: 
047161,000546: 01,3516           53150        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
047162,000547: 01,3517           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
047163,000548: 
047164,000549: 01,3520           05261        TSKOVCDR           GENADR   TASKOVER                              
047165,000550: 01,3521           53435        LONGPOOH           DXCH     LONGEXIT                              
047166,000551: 01,3522           13524                           TCF      +2                                    
047167,000552: 01,3523           52062        WAITPOOH           DXCH     WAITEXIT                              
047168,000553: 01,3524           05726                 +2        TC       POODOO1                               
047169,000554: 01,3525           01204                           OCT      01204                                 
047170,000555: 

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