Source Code

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

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. 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 96 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.

046723,000002:                                                                                                  ## Copyright:   Public domain.
046724,000003:                                                                                                  ## Filename:    WAITLIST.agc
046725,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
046726,000005:                                                                                                  ##              It is part of the reconstructed source code for the
046727,000006:                                                                                                  ##              original release of the flight software for the Lunar 
046728,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
046729,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
046730,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
046731,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
046732,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
046733,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
046734,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
046735,000014:                                                                                                  ## Reference:   pp. 1117-1132
046736,000015:                                                                                                  ## Assembler:   yaYUL
046737,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046738,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046739,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
046740,000019: 

Page 1117

046742,000021:                                                                                                  #  PROGRAM DESCRIPTION                                                           DATE - 10 OCTOBER 1966
046743,000022:                                                                                                  #  MOD NO - 2                                                                    LOG SECTION - WAITLIST
046744,000023:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)                          ASSEMBLY SUNBURST REV 5
046745,000024:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
046746,000025:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
046747,000026: 
046748,000027:                                                                                                  #  FUNCTIONAL DESCRIPTION -
046749,000028:                                                                                                  #        PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
046750,000029:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
046751,000030:                                                                                                  #        FOLLOW.
046752,000031: 
046753,000032:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
046754,000033: 
046755,000034:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
046756,000035:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
046757,000036:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
046758,000037:                                                                                                  #                                        .
046759,000038:                                                                                                  #                                        .
046760,000039:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
046761,000040:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
046762,000041: 
046763,000042:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
046764,000043:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
046765,000044:                                                                                                  #                                        .
046766,000045:                                                                                                  #                                        .
046767,000046:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
046768,000047:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
046769,000048: 
046770,000049:                                                                                                  #  WARNINGS -
046771,000050:                                                                                                  #  --------
046772,000051:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
046773,000052:                                                                                                  #        2)      9 TASKS MAXIMUM
046774,000053:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
046775,000054:                                                                                                  #        4)      TASKS END BY TC TASKOVER
046776,000055: 
046777,000056:                                                                                                  #  CALLING SEQUENCE -
046778,000057:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
046779,000058:                                                                                                  #        L       TC      WAITLIST
046780,000059:                                                                                                  #        L+1     2CADR   DESIRED TASK
046781,000060:                                                                                                  #        L+2     (MINOR OF 2CADR)
046782,000061:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
046783,000062: 
046784,000063:                                                                                                  #  TWIDDLE -
046785,000064:                                                                                                  #  -------
046786,000065:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
046787,000066:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1118

046789,000068:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
046790,000069:                                                                                                  #                L-1     CA      DELTAT
046791,000070:                                                                                                  #                L       TC      TWIDDLE
046792,000071:                                                                                                  #                L+1     ADRES   DESIRED TASK
046793,000072:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
046794,000073: 
046795,000074:                                                                                                  #  NORMAL EXIT MODES -
046796,000075:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
046797,000076: 
046798,000077:                                                                                                  #  ALARM OR ABORT EXIT MODES -
046799,000078:                                                                                                  #        TC      ABORT
046800,000079:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
046801,000080: 
046802,000081:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
046803,000082:                                                                                                  #        ACCOMPLISHED BY FRESH START,--  LST2, ..., LST2 +16 = ENDTASK
046804,000083:                                                                                                  #                                        LST1, ..., LST1 +7  = NEG1/2
046805,000084: 
046806,000085:                                                                                                  #  OUTPUT --
046807,000086:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
046808,000087: 
046809,000088:                                                                                                  #  DEBRIS -
046810,000089:                                                                                                  #        CENTRALS - A,Q,L
046811,000090:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
046812,000091: 
046813,000092:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
046814,000093:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
046815,000094:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
046816,000095:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
046817,000096:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
046818,000097:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
046819,000098:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
046820,000099:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
046821,000100:                                                                                                  #                         (Z=0, USUALLY)
046822,000101:                                                                                                  #                LET DELTD  = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
046823,000102:                                                                                                  #                THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
046824,000103:                                                                                                  #                *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
046825,000104:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
046826,000105:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
046827,000106:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
046828,000107: 
046829,000108:    5173                                           BLOCK    02                                    

Page 1119

046831,000110:    5173  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
046832,000111: 
046833,000112:    5173                                           COUNT*   $$/WAIT                               
046834,000113:    5173           00004        TWIDDLE            INHINT                                         
046835,000114:    5174           54001                           TS       L                                     #  SAVE DELAY TIME IN L
046836,000115:    5175           34733                           CA       POSMAX                                
046837,000116:    5176           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
046838,000117:    5177           30006                           CA       BBANK                                 
046839,000118:    5200           00006                           EXTEND                                         
046840,000119:    5201           04007                           ROR      SUPERBNK                              
046841,000120:    5202           56001                           XCH      L                                     
046842,000121: 
046843,000122:    5203           00004        WAITLIST           INHINT                                         
046844,000123:    5204           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
046845,000124:    5205           54061                           TS       WAITEXIT                              #  WAITEXIT.
046846,000125:    5206           00006                           EXTEND                                         
046847,000126:    5207           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
046848,000127:    5210           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
046849,000128:    5211           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
046850,000129:    5212           35220        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
046851,000130:    5213           56006                           XCH      BBANK                                 
046852,000131:    5214           13231                           TCF      WAIT2                                 
046853,000132: 
046854,000133:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
046855,000134: 
046856,000135:    5215           52062        LVWTLIST           DXCH     WAITEXIT                              
046857,000136:    5216           64752                           AD       TWO                                   
046858,000137:    5217           52006                           DTCB                                           
046859,000138: 
046860,000139:    5220  E3,1400                                  EBANK=   LST1                                  
046861,000140:    5220           02063        WAITBB             BBCON    WAIT2                                 
046862,000141: 
046863,000142:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
046864,000143: 
046865,000144:    5221           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
046866,000145:    5222           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
046867,000146:    5223           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
046868,000147: 
046869,000148:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
046870,000149: 
046871,000150:    5224           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
046872,000151:    5225           54063                           TS       WAITADR                               
046873,000152:    5226           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
046874,000153:    5227           00006                           EXTEND                                         
046875,000154:    5230           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
046876,000155:    5231           54001                           TS       L                                     
046877,000156:    5232           35235                           CAF      DELAYEX                               
046878,000157:    5233           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
046879,000158:    5234           15212                           TCF      DLY2                                  
046880,000159: 

Page 1120

046882,000161:    5235           15257        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
046883,000162: 

Page 1121

046885,000164:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
046886,000165: 
046887,000166:    5236  E3,1400                                  EBANK=   LST1                                  
046888,000167:    5236           72537 73714  ENDTASK            -2CADR   SVCT3                                 
046889,000168: 
046890,000169:    5240           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
046891,000170:    5241           15261                           TCF      TASKOVER                              
046892,000171:    5242           15261                           TCF      TASKOVER                              
046893,000172:    5243           15244                           TCF      +1                                    
046894,000173: 
046895,000174:    5244           11304        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
046896,000175:    5245           15256                           TCF      SVCT3X                                #  IMUSTALL.
046897,000176:    5246           15251                           TCF      +3                                    
046898,000177:    5247           15256                           TCF      SVCT3X                                
046899,000178:    5250           15256                           TCF      SVCT3X                                
046900,000179: 
046901,000180:    5251           37723                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
046902,000181:    5252           05072                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
046903,000182:    5253  E3,1460                                  EBANK=   NBDX                                  
046904,000183:    5253           03555 14063                     2CADR    NBDONLY                               
046905,000184: 
046906,000185:    5255           15261                           TCF      TASKOVER                              
046907,000186: 
046908,000187:    5256           05221        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
046909,000188:    5257           00764                           DEC      500        B-14                       
046910,000189:    5260           05240                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
046911,000190: 

Page 1122

046913,000192:                                                                                                  #  BEGIN TASK INSERTION.
046914,000193: 
046915,000194: 01,3231                                           BANK     01                                    
046916,000195: 01,3231                                           COUNT*   $$/WAIT                               
046917,000196: 01,3231           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
046918,000197: 01,3232           30002                           CA       Q                                     
046919,000198: 01,3233           00006                           EXTEND                                         
046920,000199: 01,3234           63523                           BZMF     WAITPOOH                              
046921,000200: 
046922,000201: 01,3235           40026                           CS       TIME3                                 
046923,000202: 01,3236           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
046924,000203: 01,3237           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
046925,000204:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
046926,000205:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
046927,000206:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
046928,000207: 
046929,000208: 01,3240           66107                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
046930,000209: 01,3241           40000                           CS       A                                     #  T - T1 + 1.0 - 201
046931,000210: 
046932,000211:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
046933,000212: 
046934,000213: 01,3242           63370                           AD       OCT40201                              
046935,000214: 01,3243           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
046936,000215: 
046937,000216: 01,3244           10000                           CCS      A                                     #  TEST TD - T1 + 1
046938,000217: 
046939,000218: 01,3245           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
046940,000219: 01,3246           13310                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
046941,000220: 
046942,000221: 01,3247           13250                           NOOP                                           
046943,000222: 01,3250           40002                           CS       Q                                     
046944,000223: 
046945,000224:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
046946,000225:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
046947,000226:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
046948,000227:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
046949,000228: 
046950,000229: 01,3251           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
046951,000230: 01,3252           64736                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
046952,000231: 01,3253           56026                           XCH      TIME3                                 
046953,000232: 01,3254           64735                           AD       NEGMAX                                
046954,000233: 01,3255           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
046955,000234: 01,3256           00006                           EXTEND                                         #  ZERO INDEX Q.
046956,000235: 01,3257           22007                           QXCH     7                                     #  (ZQ)
046957,000236: 

Page 1123

046959,000238: 01,3260           57400        WTLST4             XCH      LST1                                  
046960,000239: 01,3261           57401                           XCH      LST1       +1                         
046961,000240: 01,3262           57402                           XCH      LST1       +2                         
046962,000241: 01,3263           57403                           XCH      LST1       +3                         
046963,000242: 01,3264           57404                           XCH      LST1       +4                         
046964,000243: 01,3265           57405                           XCH      LST1       +5                         
046965,000244: 01,3266           57406                           XCH      LST1       +6                         
046966,000245: 01,3267           57407                           XCH      LST1       +7                         
046967,000246: 
046968,000247: 01,3270           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
046969,000248: 01,3271           50002                           INDEX    Q                                     
046970,000249: 01,3272           13273                           TCF      +1                                    
046971,000250: 
046972,000251: 01,3273           53411                           DXCH     LST2                                  
046973,000252: 01,3274           53413                           DXCH     LST2       +2                         
046974,000253: 01,3275           53415                           DXCH     LST2       +4                         
046975,000254: 01,3276           53417                           DXCH     LST2       +6                         
046976,000255: 01,3277           53421                           DXCH     LST2       +8D                        
046977,000256: 01,3300           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
046978,000257: 01,3301           53425                           DXCH     LST2       +12D                       
046979,000258: 01,3302           53427                           DXCH     LST2       +14D                       
046980,000259: 01,3303           53431                           DXCH     LST2       +16D                       
046981,000260: 01,3304           65236                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
046982,000261:                                                                                                  #  THE LENGTH OF THE LIST.
046983,000262: 01,3305           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
046984,000263: 01,3306           15215                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
046985,000264: 01,3307           13363                           TCF      WTABORT                               #  IT.
046986,000265: 

Page 1124

046988,000267: 01,3310           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
046989,000268: 01,3311           61401                           AD       LST1       +1                         
046990,000269: 01,3312           13316                           TCF      +4                                    
046991,000270: 01,3313           64753                           AD       ONE                                   
046992,000271: 01,3314           03374                           TC       WTLST2                                
046993,000272: 01,3315           00001                           OCT      1                                     
046994,000273: 
046995,000274: 01,3316           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
046996,000275: 01,3317           61402                           AD       LST1       +2                         
046997,000276: 01,3320           13324                           TCF      +4                                    
046998,000277: 01,3321           64753                           AD       ONE                                   
046999,000278: 01,3322           03374                           TC       WTLST2                                
047000,000279: 01,3323           00002                           OCT      2                                     
047001,000280: 
047002,000281: 01,3324           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
047003,000282: 01,3325           61403                           AD       LST1       +3                         
047004,000283: 01,3326           13332                           TCF      +4                                    
047005,000284: 01,3327           64753                           AD       ONE                                   
047006,000285: 01,3330           03374                           TC       WTLST2                                
047007,000286: 01,3331           00003                           OCT      3                                     
047008,000287: 
047009,000288: 01,3332           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
047010,000289: 01,3333           61404                           AD       LST1       +4                         
047011,000290: 01,3334           13340                           TCF      +4                                    
047012,000291: 01,3335           64753                           AD       ONE                                   
047013,000292: 01,3336           03374                           TC       WTLST2                                
047014,000293: 01,3337           00004                           OCT      4                                     
047015,000294: 
047016,000295: 01,3340           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
047017,000296: 01,3341           61405                           AD       LST1       +5                         
047018,000297: 01,3342           13346                           TCF      +4                                    
047019,000298: 01,3343           64753                           AD       ONE                                   
047020,000299: 01,3344           03374                           TC       WTLST2                                
047021,000300: 01,3345           00005                           OCT      5                                     
047022,000301: 
047023,000302: 01,3346           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
047024,000303: 01,3347           61406                           AD       LST1       +6                         
047025,000304: 01,3350           13354                           TCF      +4                                    
047026,000305: 01,3351           64753                           AD       ONE                                   
047027,000306: 01,3352           03374                           TC       WTLST2                                
047028,000307: 01,3353           00006                           OCT      6                                     
047029,000308: 

Page 1125

047031,000310: 01,3354           10000                 +4        CCS      A                                     
047032,000311: 01,3355           61407                           AD       LST1       +7                         
047033,000312: 01,3356           13362                           TCF      +4                                    
047034,000313: 01,3357           64753                           AD       ONE                                   
047035,000314: 01,3360           03374                           TC       WTLST2                                
047036,000315: 01,3361           00007                           OCT      7                                     
047037,000316: 
047038,000317: 01,3362           10000                 +4        CCS      A                                     
047039,000318: 01,3363           03371        WTABORT            TC       FILLED                                
047040,000319: 01,3364           13365                           NOOP                                           #  CAN'T GET HERE
047041,000320: 01,3365           64753                           AD       ONE                                   
047042,000321: 01,3366           03374                           TC       WTLST2                                
047043,000322: 01,3367           00010                           OCT      10                                    
047044,000323: 
047045,000324: 01,3370           40201        OCT40201           OCT      40201                                 
047046,000325: 

Page 1126

047048,000327: 01,3371           52062        FILLED             DXCH     WAITEXIT                              
047049,000328: 01,3372           05716                           TC       BAILOUT1                              #  NO ROOM IN THE INN
047050,000329: 01,3373           01203                           OCT      01203                                 
047051,000330: 

Page 1127

047053,000332:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
047054,000333:                                                                                                  #                                                   N           N+1
047055,000334:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
047056,000335:                                                                                                  #                                                              N+1
047057,000336:                                                                                                  #  THE LST1 ENTRY -(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
047058,000337:                                                                                                  #                    N+1  N                                 N
047059,000338:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
047060,000339:                                                                                                  #               N+1
047061,000340: 
047062,000341: 01,3374           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
047063,000342: 01,3375           50002                           INDEX    Q                                     
047064,000343: 01,3376           30000                           CAF      0                                     
047065,000344: 01,3377           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
047066,000345: 
047067,000346: 01,3400           34753                           CAF      ONE                                   
047068,000347: 01,3401           60064                           AD       WAITTEMP                              
047069,000348: 01,3402           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
047070,000349: 01,3403           27377                           ADS      LST1       -1                         #                 N
047071,000350: 
047072,000351: 01,3404           40064                           CS       WAITTEMP                              
047073,000352: 01,3405           50002                           INDEX    Q                                     
047074,000353: 01,3406           13260                           TCF      WTLST4                                
047075,000354: 
047076,000355:                                                                                                  #        C(TIME3)        =       1.0 - (T1 - T)
047077,000356: 
047078,000357:                                                                                                  #        C(LST1)         =       - (T2 - T1) + 1
047079,000358:                                                                                                  #        C(LST1+1)       =       - (T3 - T2) + 1
047080,000359:                                                                                                  #        C(LST1+2)       =       - (T4 - T3) + 1
047081,000360:                                                                                                  #        C(LST1+3)       =       - (T5 - T4) + 1
047082,000361:                                                                                                  #        C(LST1+4)       =       - (T6 - T5) + 1
047083,000362: 
047084,000363:                                                                                                  #        C(LST2)         =       2CADR TASK1
047085,000364:                                                                                                  #        C(LST2+2)       =       2CADR TASK2
047086,000365:                                                                                                  #        C(LST2+4)       =       2CADR TASK3
047087,000366:                                                                                                  #        C(LST2+6)       =       2CADR TASK4
047088,000367:                                                                                                  #        C(LST2+8)       =       2CADR TASK5
047089,000368:                                                                                                  #        C(LST2+10)      =       2CADR TASK6
047090,000369: 

Page 1128

047092,000371:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
047093,000372: 
047094,000373: 01,3407           00006        T3RUPT             EXTEND                                         
047095,000374: 01,3410           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
047096,000375: 01,3411           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
047097,000376: 01,3412           00006                           EXTEND                                         
047098,000377: 01,3413           22012                           QXCH     QRUPT                                 
047099,000378: 
047100,000379: 01,3414           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
047101,000380: 01,3415           57407                           XCH      LST1       +7                         
047102,000381: 01,3416           57406                           XCH      LST1       +6                         
047103,000382: 01,3417           57405                           XCH      LST1       +5                         
047104,000383: 01,3420           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
047105,000384: 01,3421           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
047106,000385: 01,3422           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
047107,000386: 01,3423           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
047108,000387: 01,3424           57400                           XCH      LST1                                  
047109,000388: 01,3425           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
047110,000389: 01,3426           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
047111,000390: 01,3427           54734                           TS       RUPTAGN                               
047112,000391: 01,3430           44755                           CS       ZERO                                  
047113,000392: 01,3431           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
047114,000393: 
047115,000394: 01,3432           00006                           EXTEND                                         #  DISPATCH TASK.
047116,000395: 01,3433           45237                           DCS      ENDTASK                               
047117,000396: 01,3434           53431                           DXCH     LST2       +16D                       
047118,000397: 01,3435           53427                           DXCH     LST2       +14D                       
047119,000398: 01,3436           53425                           DXCH     LST2       +12D                       
047120,000399: 01,3437           53423                           DXCH     LST2       +10D                       
047121,000400: 01,3440           53421                           DXCH     LST2       +8D                        
047122,000401: 01,3441           53417                           DXCH     LST2       +6                         
047123,000402: 01,3442           53415                           DXCH     LST2       +4                         
047124,000403: 01,3443           53413                           DXCH     LST2       +2                         
047125,000404: 01,3444           53411                           DXCH     LST2                                  
047126,000405: 
047127,000406: 01,3445           56001                           XCH      L                                     
047128,000407: 01,3446           00006                           EXTEND                                         
047129,000408: 01,3447           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
047130,000409: 01,3450           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
047131,000410: 01,3451           52006                           DTCB                                           
047132,000411: 

Page 1129

047134,000413:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
047135,000414: 
047136,000415:    5261                                           BLOCK    02                                    
047137,000416:    5261                                           COUNT*   $$/WAIT                               
047138,000417:    5261           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
047139,000418:    5262           35220                           CAF      WAITBB                                
047140,000419:    5263           54006                           TS       BBANK                                 
047141,000420:    5264           13414                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
047142,000421: 
047143,000422:    5265           30016                           CA       BANKRUPT                              
047144,000423:    5266           00006                           EXTEND                                         
047145,000424:    5267           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
047146,000425: 
047147,000426:    5270           00006        RESUME             EXTEND                                         
047148,000427:    5271           22012                           QXCH     QRUPT                                 
047149,000428:    5272           30016        NOQRSM             CA       BANKRUPT                              
047150,000429:    5273           56006                           XCH      BBANK                                 
047151,000430:    5274           52011        NOQBRSM            DXCH     ARUPT                                 
047152,000431:    5275           00003                           RELINT                                         
047153,000432:    5276           50017                           RESUME                                         
047154,000433: 

Page 1130

047156,000435:                                                                                                  #  LONGCALL
047157,000436:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
047158,000437:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
047159,000438:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
047160,000439: 
047161,000440:                                                                                                  #  FUNCTIONAL DESCRIPTION -
047162,000441:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
047163,000442:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
047164,000443:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
047165,000444:                                                                                                  #        START
047166,000445:                                                                                                  #  CALLING SEQUENCE -
047167,000446:                                                                                                  #                EXTEND
047168,000447:                                                                                                  #                DCA     TIMELOC
047169,000448:                                                                                                  #                TC      LONGCALL
047170,000449:                                                                                                  #                2CADR   TASKTODO
047171,000450:                                                                                                  #  NORMAL EXIT MODE -
047172,000451:                                                                                                  #        1).     TC      WAITLIST
047173,000452:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
047174,000453:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
047175,000454:                                                                                                  #  ALARM OR ABORT EXIT MODE -
047176,000455:                                                                                                  #        NONE
047177,000456:                                                                                                  #  OUTPUT -
047178,000457:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
047179,000458:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
047180,000459:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
047181,000460:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
047182,000461:                                                                                                  #  ERASABLE INITIALIZATION -
047183,000462:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
047184,000463:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
047185,000464:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
047186,000465:                                                                                                  #  DEBRIS -
047187,000466:                                                                                                  #        A,Q,L
047188,000467:                                                                                                  #        LONGCADR AND LONGCADR+1
047189,000468:                                                                                                  #        LONGEXIT AND LONGEXIT+1
047190,000469:                                                                                                  #        LONGTIME AND LONGTIME+1
047191,000470:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
047192,000471: 
047193,000472:    5277                                           BLOCK    02                                    
047194,000473:    5277  E3,1400                                  EBANK=   LST1                                  
047195,000474:    5277           53154        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
047196,000475: 
047197,000476:    5300           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1131

047199,000478:    5301           50002                           NDX      Q                                     
047200,000479:    5302           30001                           DCA      0                                     
047201,000480:    5303           53150                           DXCH     LONGCADR                              
047202,000481: 
047203,000482:    5304           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
047204,000483:    5305           35310                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
047205,000484:    5306           52006                           DTCB                                           
047206,000485: 
047207,000486:    5307  E3,1400                                  EBANK=   LST1                                  
047208,000487:    5307           03452 02063  LGCL2CDR           2CADR    LNGCALL2                              
047209,000488: 
047210,000489:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
047211,000490: 
047212,000491: 01,3452                                           BANK     01                                    
047213,000492: 01,3452                                           COUNT*   $$/WAIT                               
047214,000493: 01,3452           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
047215,000494: 01,3453           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
047216,000495: 01,3454           26002                           ADS      Q                                     
047217,000496: 01,3455           55434                           TS       LONGEXIT                              
047218,000497: 
047219,000498: 01,3456           31153                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
047220,000499: 01,3457           10000                           CCS      A                                     
047221,000500: 01,3460           13466                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
047222,000501: 01,3461           13463                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
047223,000502: 01,3462           13521                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
047224,000503: 01,3463           31154                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
047225,000504: 01,3464           00006                           EXTEND                                         
047226,000505: 01,3465           63521                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
047227,000506: 
047228,000507:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
047229,000508: 
047230,000509: 01,3466           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
047231,000510: 01,3467           43500                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
047232,000511: 01,3470           21154                           DAS      LONGTIME                              
047233,000512: 
047234,000513: 01,3471           11154                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
047235,000514: 01,3472           13511                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
047236,000515:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
047237,000516:                                                                                                  #  BASIC INSTRUCTIONS
047238,000517:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
047239,000518:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
047240,000519:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
047241,000520: 01,3473           13474                           NOOP                                           #  CAN:T GET HERE **********
047242,000521: 01,3474           13475                           TCF      +1                                    
047243,000522: 01,3475           11153                           CCS      LONGTIME                              
047244,000523: 01,3476           13511                           TCF      MUCHTIME                              
047245,000524: 01,3477           00000        DPBIT14            OCT      00000                                 
047246,000525: 01,3500           20000                           OCT      20000                                 
047247,000526: 
047248,000527:                                                                                                  #  LONGCALL

Page 1132

047250,000529: 01,3501           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA T FOR WAITLIST
047251,000530: 01,3502           27154                           ADS      LONGTIME   +1                         
047252,000531: 01,3503           05203                           TC       WAITLIST                              
047253,000532: 01,3504  E3,1400                                  EBANK=   LST1                                  
047254,000533: 01,3504           03516 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
047255,000534: 
047256,000535: 01,3506           33520        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
047257,000536: 01,3507           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
047258,000537: 01,3510           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
047259,000538: 
047260,000539: 01,3511           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
047261,000540: 01,3512           05203                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
047262,000541: 01,3513  E3,1400                                  EBANK=   LST1                                  
047263,000542: 01,3513           03466 02063                     2CADR    LONGCYCL                              
047264,000543: 
047265,000544: 01,3515           13506                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
047266,000545: 
047267,000546:                                                                                                  #  *** WAITLIST TASK GETCADR ***
047268,000547: 
047269,000548: 01,3516           53150        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
047270,000549: 01,3517           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
047271,000550: 
047272,000551: 01,3520           05261        TSKOVCDR           GENADR   TASKOVER                              
047273,000552: 01,3521           53435        LONGPOOH           DXCH     LONGEXIT                              
047274,000553: 01,3522           13524                           TCF      +2                                    
047275,000554: 01,3523           52062        WAITPOOH           DXCH     WAITEXIT                              
047276,000555: 01,3524           05726                 +2        TC       POODOO1                               
047277,000556: 01,3525           01204                           OCT      01204                                 
047278,000557: 

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