Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	16:27 JULY 14,1969
Note that the date is the date of the printout, not the date of the program revision.

047750,000002:                                                                                                  ## Copyright:   Public domain.
047751,000003:                                                                                                  ## Filename:    WAITLIST.agc
047752,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
047753,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
047754,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
047755,000007:                                                                                                  ## Assembler:   yaYUL
047756,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047757,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
047758,000010:                                                                                                  ## Pages:       1117-1132
047759,000011:                                                                                                  ## Mod history: 2009-05-25 RSB  Adapted from the corresponding 
047760,000012:                                                                                                  ##                              Luminary131 file, using page 
047761,000013:                                                                                                  ##                              images from Luminary 1A.
047762,000014:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
047763,000015:                                                                                                  ##              2011-05-07 JL   Removed workarounds.
047764,000016:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
047765,000017:                                                                                                  ##                              and corrected the errors found.
047766,000018:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
047767,000019:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified in proofing Artemis 72.
047768,000020:                                                                                                  ##              2017-02-27 RSB  Corrected WAITP00H and LONGP00H to similar POOH names.
047769,000021:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
047770,000022:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
047771,000023:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
047772,000024: 
047773,000025:                                                                                                  ## This source code has been transcribed or otherwise adapted from
047774,000026:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
047775,000027:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
047776,000028:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
047777,000029:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
047778,000030:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
047779,000031:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
047780,000032:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
047781,000033:                                                                                                  ## actually created.
047782,000034:                                                                                                  ##
047783,000035:                                                                                                  ## Notations on the hardcopy document read, in part:
047784,000036:                                                                                                  ##
047785,000037:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
047786,000038:                                                                                                  ##      16:27 JULY 14, 1969 
047787,000039: 

Page 1117

047789,000041:                                                                                                  #  PROGRAM DESCRIPTION                                                           DATE - 10 OCTOBER 1966
047790,000042:                                                                                                  #  MOD NO - 2                                                                    LOG SECTION - WAITLIST
047791,000043:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)                          ASSEMBLY SUNBURST REV 5
047792,000044:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
047793,000045:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
047794,000046: 
047795,000047:                                                                                                  #  FUNCTIONAL DESCRIPTION -
047796,000048:                                                                                                  #        PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
047797,000049:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
047798,000050:                                                                                                  #        FOLLOW.
047799,000051: 
047800,000052:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
047801,000053: 
047802,000054:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
047803,000055:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
047804,000056:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
047805,000057:                                                                                                  #                                        .
047806,000058:                                                                                                  #                                        .
047807,000059:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
047808,000060:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
047809,000061: 
047810,000062:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
047811,000063:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
047812,000064:                                                                                                  #                                        .
047813,000065:                                                                                                  #                                        .
047814,000066:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
047815,000067:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
047816,000068: 
047817,000069:                                                                                                  #  WARNINGS -
047818,000070:                                                                                                  #  --------
047819,000071:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
047820,000072:                                                                                                  #        2)      9 TASKS MAXIMUM
047821,000073:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
047822,000074:                                                                                                  #        4)      TASKS END BY TC TASKOVER
047823,000075: 
047824,000076:                                                                                                  #  CALLING SEQUENCE -
047825,000077:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
047826,000078:                                                                                                  #        L       TC      WAITLIST
047827,000079:                                                                                                  #        L+1     2CADR   DESIRED TASK
047828,000080:                                                                                                  #        L+2     (MINOR OF 2CADR)
047829,000081:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
047830,000082: 
047831,000083:                                                                                                  #  TWIDDLE -
047832,000084:                                                                                                  #  -------
047833,000085:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
047834,000086:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1118

047836,000088:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
047837,000089:                                                                                                  #                L-1     CA      DELTAT
047838,000090:                                                                                                  #                L       TC      TWIDDLE
047839,000091:                                                                                                  #                L+1     ADRES   DESIRED TASK
047840,000092:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
047841,000093: 
047842,000094:                                                                                                  #  NORMAL EXIT MODES -
047843,000095:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
047844,000096: 
047845,000097:                                                                                                  #  ALARM OR ABORT EXIT MODES -
047846,000098:                                                                                                  #        TC      ABORT
047847,000099:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
047848,000100: 
047849,000101:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
047850,000102:                                                                                                  #        ACCOMPLISHED BY FRESH START,--  LST2, ..., LST2 +16 = ENDTASK
047851,000103:                                                                                                  #                                        LST1, ..., LST1 +7  = NEG1/2
047852,000104: 
047853,000105:                                                                                                  #  OUTPUT --
047854,000106:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
047855,000107: 
047856,000108:                                                                                                  #  DEBRIS -
047857,000109:                                                                                                  #        CENTRALS - A,Q,L
047858,000110:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
047859,000111: 
047860,000112:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
047861,000113:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
047862,000114:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
047863,000115:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
047864,000116:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
047865,000117:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
047866,000118:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
047867,000119:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
047868,000120:                                                                                                  #                         (Z=0, USUALLY)
047869,000121:                                                                                                  #                LET DELTD  = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
047870,000122:                                                                                                  #                THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
047871,000123:                                                                                                  #                *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
047872,000124:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
047873,000125:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
047874,000126:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
047875,000127: 
047876,000128:    5173                                           BLOCK    02                                    

Page 1119

047878,000130:    5173  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
047879,000131: 
047880,000132:    5173                                           COUNT*   $$/WAIT                               
047881,000133:    5173           00004        TWIDDLE            INHINT                                         
047882,000134:    5174           54001                           TS       L                                     #  SAVE DELAY TIME IN L
047883,000135:    5175           34733                           CA       POSMAX                                
047884,000136:    5176           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
047885,000137:    5177           30006                           CA       BBANK                                 
047886,000138:    5200           00006                           EXTEND                                         
047887,000139:    5201           04007                           ROR      SUPERBNK                              
047888,000140:    5202           56001                           XCH      L                                     
047889,000141: 
047890,000142:    5203           00004        WAITLIST           INHINT                                         
047891,000143:    5204           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
047892,000144:    5205           54061                           TS       WAITEXIT                              #  WAITEXIT.
047893,000145:    5206           00006                           EXTEND                                         
047894,000146:    5207           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
047895,000147:    5210           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
047896,000148:    5211           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
047897,000149:    5212           35220        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
047898,000150:    5213           56006                           XCH      BBANK                                 
047899,000151:    5214           13231                           TCF      WAIT2                                 
047900,000152: 
047901,000153:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
047902,000154: 
047903,000155:    5215           52062        LVWTLIST           DXCH     WAITEXIT                              
047904,000156:    5216           64752                           AD       TWO                                   
047905,000157:    5217           52006                           DTCB                                           
047906,000158: 
047907,000159:    5220  E3,1400                                  EBANK=   LST1                                  
047908,000160:    5220           02063        WAITBB             BBCON    WAIT2                                 
047909,000161: 
047910,000162:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
047911,000163: 
047912,000164:    5221           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
047913,000165:    5222           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
047914,000166:    5223           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
047915,000167: 
047916,000168:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
047917,000169: 
047918,000170:    5224           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
047919,000171:    5225           54063                           TS       WAITADR                               
047920,000172:    5226           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
047921,000173:    5227           00006                           EXTEND                                         
047922,000174:    5230           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
047923,000175:    5231           54001                           TS       L                                     
047924,000176:    5232           35235                           CAF      DELAYEX                               
047925,000177:    5233           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
047926,000178:    5234           15212                           TCF      DLY2                                  
047927,000179: 

Page 1120

047929,000181:    5235           15257        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
047930,000182: 

Page 1121

047932,000184:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
047933,000185: 
047934,000186:    5236  E3,1400                                  EBANK=   LST1                                  
047935,000187:    5236           72537 73714  ENDTASK            -2CADR   SVCT3                                 
047936,000188: 
047937,000189:    5240           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
047938,000190:    5241           15261                           TCF      TASKOVER                              
047939,000191:    5242           15261                           TCF      TASKOVER                              
047940,000192:    5243           15244                           TCF      +1                                    
047941,000193: 
047942,000194:    5244           11304        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
047943,000195:    5245           15256                           TCF      SVCT3X                                #  IMUSTALL.
047944,000196:    5246           15251                           TCF      +3                                    
047945,000197:    5247           15256                           TCF      SVCT3X                                
047946,000198:    5250           15256                           TCF      SVCT3X                                
047947,000199: 
047948,000200:    5251           37723                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
047949,000201:    5252           05072                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
047950,000202:    5253  E3,1460                                  EBANK=   NBDX                                  
047951,000203:    5253           03555 14063                     2CADR    NBDONLY                               
047952,000204: 
047953,000205:    5255           15261                           TCF      TASKOVER                              
047954,000206: 
047955,000207:    5256           05221        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
047956,000208:    5257           00764                           DEC      500        B-14                       
047957,000209:    5260           05240                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
047958,000210: 

Page 1122

047960,000212:                                                                                                  #  BEGIN TASK INSERTION.
047961,000213: 
047962,000214: 01,3231                                           BANK     01                                    
047963,000215: 01,3231                                           COUNT*   $$/WAIT                               
047964,000216: 01,3231           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
047965,000217: 01,3232           30002                           CA       Q                                     
047966,000218: 01,3233           00006                           EXTEND                                         
047967,000219: 01,3234           63523                           BZMF     WAITPOOH                              
047968,000220: 
047969,000221: 01,3235           40026                           CS       TIME3                                 
047970,000222: 01,3236           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
047971,000223: 01,3237           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
047972,000224:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
047973,000225:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
047974,000226:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
047975,000227: 
047976,000228: 01,3240           66107                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
047977,000229: 01,3241           40000                           CS       A                                     #  T - T1 + 1.0 - 201
047978,000230: 
047979,000231:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
047980,000232: 
047981,000233: 01,3242           63370                           AD       OCT40201                              
047982,000234: 01,3243           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
047983,000235: 
047984,000236: 01,3244           10000                           CCS      A                                     #  TEST TD - T1 + 1
047985,000237: 
047986,000238: 01,3245           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
047987,000239: 01,3246           13310                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
047988,000240: 
047989,000241: 01,3247           13250                           NOOP                                           
047990,000242: 01,3250           40002                           CS       Q                                     
047991,000243: 
047992,000244:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
047993,000245:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
047994,000246:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
047995,000247:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
047996,000248: 
047997,000249: 01,3251           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
047998,000250: 01,3252           64736                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
047999,000251: 01,3253           56026                           XCH      TIME3                                 
048000,000252: 01,3254           64735                           AD       NEGMAX                                
048001,000253: 01,3255           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
048002,000254: 01,3256           00006                           EXTEND                                         #  ZERO INDEX Q.
048003,000255: 01,3257           22007                           QXCH     7                                     #  (ZQ)
048004,000256: 

Page 1123

048006,000258: 01,3260           57400        WTLST4             XCH      LST1                                  
048007,000259: 01,3261           57401                           XCH      LST1       +1                         
048008,000260: 01,3262           57402                           XCH      LST1       +2                         
048009,000261: 01,3263           57403                           XCH      LST1       +3                         
048010,000262: 01,3264           57404                           XCH      LST1       +4                         
048011,000263: 01,3265           57405                           XCH      LST1       +5                         
048012,000264: 01,3266           57406                           XCH      LST1       +6                         
048013,000265: 01,3267           57407                           XCH      LST1       +7                         
048014,000266: 
048015,000267: 01,3270           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
048016,000268: 01,3271           50002                           INDEX    Q                                     
048017,000269: 01,3272           13273                           TCF      +1                                    
048018,000270: 
048019,000271: 01,3273           53411                           DXCH     LST2                                  
048020,000272: 01,3274           53413                           DXCH     LST2       +2                         
048021,000273: 01,3275           53415                           DXCH     LST2       +4                         
048022,000274: 01,3276           53417                           DXCH     LST2       +6                         
048023,000275: 01,3277           53421                           DXCH     LST2       +8D                        
048024,000276: 01,3300           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
048025,000277: 01,3301           53425                           DXCH     LST2       +12D                       
048026,000278: 01,3302           53427                           DXCH     LST2       +14D                       
048027,000279: 01,3303           53431                           DXCH     LST2       +16D                       
048028,000280: 01,3304           65236                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
048029,000281:                                                                                                  #  THE LENGTH OF THE LIST.
048030,000282: 01,3305           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
048031,000283: 01,3306           15215                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
048032,000284: 01,3307           13363                           TCF      WTABORT                               #  IT.
048033,000285: 

Page 1124

048035,000287: 01,3310           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
048036,000288: 01,3311           61401                           AD       LST1       +1                         
048037,000289: 01,3312           13316                           TCF      +4                                    
048038,000290: 01,3313           64753                           AD       ONE                                   
048039,000291: 01,3314           03374                           TC       WTLST2                                
048040,000292: 01,3315           00001                           OCT      1                                     
048041,000293: 
048042,000294: 01,3316           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
048043,000295: 01,3317           61402                           AD       LST1       +2                         
048044,000296: 01,3320           13324                           TCF      +4                                    
048045,000297: 01,3321           64753                           AD       ONE                                   
048046,000298: 01,3322           03374                           TC       WTLST2                                
048047,000299: 01,3323           00002                           OCT      2                                     
048048,000300: 
048049,000301: 01,3324           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
048050,000302: 01,3325           61403                           AD       LST1       +3                         
048051,000303: 01,3326           13332                           TCF      +4                                    
048052,000304: 01,3327           64753                           AD       ONE                                   
048053,000305: 01,3330           03374                           TC       WTLST2                                
048054,000306: 01,3331           00003                           OCT      3                                     
048055,000307: 
048056,000308: 01,3332           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
048057,000309: 01,3333           61404                           AD       LST1       +4                         
048058,000310: 01,3334           13340                           TCF      +4                                    
048059,000311: 01,3335           64753                           AD       ONE                                   
048060,000312: 01,3336           03374                           TC       WTLST2                                
048061,000313: 01,3337           00004                           OCT      4                                     
048062,000314: 
048063,000315: 01,3340           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
048064,000316: 01,3341           61405                           AD       LST1       +5                         
048065,000317: 01,3342           13346                           TCF      +4                                    
048066,000318: 01,3343           64753                           AD       ONE                                   
048067,000319: 01,3344           03374                           TC       WTLST2                                
048068,000320: 01,3345           00005                           OCT      5                                     
048069,000321: 
048070,000322: 01,3346           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
048071,000323: 01,3347           61406                           AD       LST1       +6                         
048072,000324: 01,3350           13354                           TCF      +4                                    
048073,000325: 01,3351           64753                           AD       ONE                                   
048074,000326: 01,3352           03374                           TC       WTLST2                                
048075,000327: 01,3353           00006                           OCT      6                                     
048076,000328: 

Page 1125

048078,000330: 01,3354           10000                 +4        CCS      A                                     
048079,000331: 01,3355           61407                           AD       LST1       +7                         
048080,000332: 01,3356           13362                           TCF      +4                                    
048081,000333: 01,3357           64753                           AD       ONE                                   
048082,000334: 01,3360           03374                           TC       WTLST2                                
048083,000335: 01,3361           00007                           OCT      7                                     
048084,000336: 
048085,000337: 01,3362           10000                 +4        CCS      A                                     
048086,000338: 01,3363           03371        WTABORT            TC       FILLED                                
048087,000339: 01,3364           13365                           NOOP                                           #  CAN'T GET HERE
048088,000340: 01,3365           64753                           AD       ONE                                   
048089,000341: 01,3366           03374                           TC       WTLST2                                
048090,000342: 01,3367           00010                           OCT      10                                    
048091,000343: 
048092,000344: 01,3370           40201        OCT40201           OCT      40201                                 
048093,000345: 

Page 1126

048095,000347: 01,3371           52062        FILLED             DXCH     WAITEXIT                              
048096,000348: 01,3372           05716                           TC       BAILOUT1                              #  NO ROOM IN THE INN
048097,000349: 01,3373           01203                           OCT      01203                                 
048098,000350: 

Page 1127

048100,000352:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
048101,000353:                                                                                                  #                                                   N           N+1
048102,000354:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
048103,000355:                                                                                                  #                                                              N+1
048104,000356:                                                                                                  #  THE LST1 ENTRY -(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
048105,000357:                                                                                                  #                    N+1  N                                 N
048106,000358:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
048107,000359:                                                                                                  #               N+1
048108,000360: 
048109,000361: 01,3374           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
048110,000362: 01,3375           50002                           INDEX    Q                                     
048111,000363: 01,3376           30000                           CAF      0                                     
048112,000364: 01,3377           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
048113,000365: 
048114,000366: 01,3400           34753                           CAF      ONE                                   
048115,000367: 01,3401           60064                           AD       WAITTEMP                              
048116,000368: 01,3402           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
048117,000369: 01,3403           27377                           ADS      LST1       -1                         #                 N
048118,000370: 
048119,000371: 01,3404           40064                           CS       WAITTEMP                              
048120,000372: 01,3405           50002                           INDEX    Q                                     
048121,000373: 01,3406           13260                           TCF      WTLST4                                
048122,000374: 
048123,000375:                                                                                                  #        C(TIME3)        =       1.0 - (T1 - T)
048124,000376: 
048125,000377:                                                                                                  #        C(LST1)         =       - (T2 - T1) + 1
048126,000378:                                                                                                  #        C(LST1+1)       =       - (T3 - T2) + 1
048127,000379:                                                                                                  #        C(LST1+2)       =       - (T4 - T3) + 1
048128,000380:                                                                                                  #        C(LST1+3)       =       - (T5 - T4) + 1
048129,000381:                                                                                                  #        C(LST1+4)       =       - (T6 - T5) + 1
048130,000382: 
048131,000383:                                                                                                  #        C(LST2)         =       2CADR TASK1
048132,000384:                                                                                                  #        C(LST2+2)       =       2CADR TASK2
048133,000385:                                                                                                  #        C(LST2+4)       =       2CADR TASK3
048134,000386:                                                                                                  #        C(LST2+6)       =       2CADR TASK4
048135,000387:                                                                                                  #        C(LST2+8)       =       2CADR TASK5
048136,000388:                                                                                                  #        C(LST2+10)      =       2CADR TASK6
048137,000389: 

Page 1128

048139,000391:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
048140,000392: 
048141,000393: 01,3407           00006        T3RUPT             EXTEND                                         
048142,000394: 01,3410           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
048143,000395: 01,3411           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
048144,000396: 01,3412           00006                           EXTEND                                         
048145,000397: 01,3413           22012                           QXCH     QRUPT                                 
048146,000398: 
048147,000399: 01,3414           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
048148,000400: 01,3415           57407                           XCH      LST1       +7                         
048149,000401: 01,3416           57406                           XCH      LST1       +6                         
048150,000402: 01,3417           57405                           XCH      LST1       +5                         
048151,000403: 01,3420           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
048152,000404: 01,3421           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
048153,000405: 01,3422           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
048154,000406: 01,3423           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
048155,000407: 01,3424           57400                           XCH      LST1                                  
048156,000408: 01,3425           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
048157,000409: 01,3426           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
048158,000410: 01,3427           54734                           TS       RUPTAGN                               
048159,000411: 01,3430           44755                           CS       ZERO                                  
048160,000412: 01,3431           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
048161,000413: 
048162,000414: 01,3432           00006                           EXTEND                                         #  DISPATCH TASK.
048163,000415: 01,3433           45237                           DCS      ENDTASK                               
048164,000416: 01,3434           53431                           DXCH     LST2       +16D                       
048165,000417: 01,3435           53427                           DXCH     LST2       +14D                       
048166,000418: 01,3436           53425                           DXCH     LST2       +12D                       
048167,000419: 01,3437           53423                           DXCH     LST2       +10D                       
048168,000420: 01,3440           53421                           DXCH     LST2       +8D                        
048169,000421: 01,3441           53417                           DXCH     LST2       +6                         
048170,000422: 01,3442           53415                           DXCH     LST2       +4                         
048171,000423: 01,3443           53413                           DXCH     LST2       +2                         
048172,000424: 01,3444           53411                           DXCH     LST2                                  
048173,000425: 
048174,000426: 01,3445           56001                           XCH      L                                     
048175,000427: 01,3446           00006                           EXTEND                                         
048176,000428: 01,3447           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
048177,000429: 01,3450           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
048178,000430: 01,3451           52006                           DTCB                                           
048179,000431: 

Page 1129

048181,000433:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
048182,000434: 
048183,000435:    5261                                           BLOCK    02                                    
048184,000436:    5261                                           COUNT*   $$/WAIT                               
048185,000437:    5261           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
048186,000438:    5262           35220                           CAF      WAITBB                                
048187,000439:    5263           54006                           TS       BBANK                                 
048188,000440:    5264           13414                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
048189,000441: 
048190,000442:    5265           30016                           CA       BANKRUPT                              
048191,000443:    5266           00006                           EXTEND                                         
048192,000444:    5267           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
048193,000445: 
048194,000446:    5270           00006        RESUME             EXTEND                                         
048195,000447:    5271           22012                           QXCH     QRUPT                                 
048196,000448:    5272           30016        NOQRSM             CA       BANKRUPT                              
048197,000449:    5273           56006                           XCH      BBANK                                 
048198,000450:    5274           52011        NOQBRSM            DXCH     ARUPT                                 
048199,000451:    5275           00003                           RELINT                                         
048200,000452:    5276           50017                           RESUME                                         
048201,000453: 

Page 1130

048203,000455:                                                                                                  #  LONGCALL
048204,000456:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
048205,000457:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
048206,000458:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
048207,000459: 
048208,000460:                                                                                                  #  FUNCTIONAL DESCRIPTION -
048209,000461:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
048210,000462:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
048211,000463:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
048212,000464:                                                                                                  #        START
048213,000465:                                                                                                  #  CALLING SEQUENCE -
048214,000466:                                                                                                  #                EXTEND
048215,000467:                                                                                                  #                DCA     TIMELOC
048216,000468:                                                                                                  #                TC      LONGCALL
048217,000469:                                                                                                  #                2CADR   TASKTODO
048218,000470:                                                                                                  #  NORMAL EXIT MODE -
048219,000471:                                                                                                  #        1).     TC      WAITLIST
048220,000472:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
048221,000473:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
048222,000474:                                                                                                  #  ALARM OR ABORT EXIT MODE -
048223,000475:                                                                                                  #        NONE
048224,000476:                                                                                                  #  OUTPUT -
048225,000477:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
048226,000478:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
048227,000479:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
048228,000480:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
048229,000481:                                                                                                  #  ERASABLE INITIALIZATION -
048230,000482:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
048231,000483:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
048232,000484:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
048233,000485:                                                                                                  #  DEBRIS -
048234,000486:                                                                                                  #        A,Q,L
048235,000487:                                                                                                  #        LONGCADR AND LONGCADR+1
048236,000488:                                                                                                  #        LONGEXIT AND LONGEXIT+1
048237,000489:                                                                                                  #        LONGTIME AND LONGTIME+1
048238,000490:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
048239,000491: 
048240,000492:    5277                                           BLOCK    02                                    
048241,000493:    5277  E3,1400                                  EBANK=   LST1                                  
048242,000494:    5277           53154        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
048243,000495: 
048244,000496:    5300           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1131

048246,000498:    5301           50002                           NDX      Q                                     
048247,000499:    5302           30001                           DCA      0                                     
048248,000500:    5303           53150                           DXCH     LONGCADR                              
048249,000501: 
048250,000502:    5304           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
048251,000503:    5305           35310                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
048252,000504:    5306           52006                           DTCB                                           
048253,000505: 
048254,000506:    5307  E3,1400                                  EBANK=   LST1                                  
048255,000507:    5307           03452 02063  LGCL2CDR           2CADR    LNGCALL2                              
048256,000508: 
048257,000509:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
048258,000510: 
048259,000511: 01,3452                                           BANK     01                                    
048260,000512: 01,3452                                           COUNT*   $$/WAIT                               
048261,000513: 01,3452           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
048262,000514: 01,3453           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
048263,000515: 01,3454           26002                           ADS      Q                                     
048264,000516: 01,3455           55434                           TS       LONGEXIT                              
048265,000517: 
048266,000518: 01,3456           31153                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
048267,000519: 01,3457           10000                           CCS      A                                     
048268,000520: 01,3460           13466                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
048269,000521: 01,3461           13463                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
048270,000522: 01,3462           13521                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
048271,000523: 01,3463           31154                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
048272,000524: 01,3464           00006                           EXTEND                                         
048273,000525: 01,3465           63521                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
048274,000526: 
048275,000527:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
048276,000528: 
048277,000529: 01,3466           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
048278,000530: 01,3467           43500                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
048279,000531: 01,3470           21154                           DAS      LONGTIME                              
048280,000532: 
048281,000533: 01,3471           11154                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
048282,000534: 01,3472           13511                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
048283,000535:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
048284,000536:                                                                                                  #  BASIC INSTRUCTIONS
048285,000537:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
048286,000538:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
048287,000539:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
048288,000540: 01,3473           13474                           NOOP                                           #  CAN:T GET HERE **********
048289,000541: 01,3474           13475                           TCF      +1                                    
048290,000542: 01,3475           11153                           CCS      LONGTIME                              
048291,000543: 01,3476           13511                           TCF      MUCHTIME                              
048292,000544: 01,3477           00000        DPBIT14            OCT      00000                                 
048293,000545: 01,3500           20000                           OCT      20000                                 
048294,000546: 
048295,000547:                                                                                                  #  LONGCALL

Page 1132

048297,000549: 01,3501           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA T FOR WAITLIST
048298,000550: 01,3502           27154                           ADS      LONGTIME   +1                         
048299,000551: 01,3503           05203                           TC       WAITLIST                              
048300,000552: 01,3504  E3,1400                                  EBANK=   LST1                                  
048301,000553: 01,3504           03516 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
048302,000554: 
048303,000555: 01,3506           33520        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
048304,000556: 01,3507           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
048305,000557: 01,3510           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
048306,000558: 
048307,000559: 01,3511           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
048308,000560: 01,3512           05203                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
048309,000561: 01,3513  E3,1400                                  EBANK=   LST1                                  
048310,000562: 01,3513           03466 02063                     2CADR    LONGCYCL                              
048311,000563: 
048312,000564: 01,3515           13506                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
048313,000565: 
048314,000566:                                                                                                  #  *** WAITLIST TASK GETCADR ***
048315,000567: 
048316,000568: 01,3516           53150        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
048317,000569: 01,3517           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
048318,000570: 
048319,000571: 01,3520           05261        TSKOVCDR           GENADR   TASKOVER                              
048320,000572: 01,3521           53435        LONGPOOH           DXCH     LONGEXIT                              
048321,000573: 01,3522           13524                           TCF      +2                                    
048322,000574: 01,3523           52062        WAITPOOH           DXCH     WAITEXIT                              
048323,000575: 01,3524           05726                 +2        TC       POODOO1                               
048324,000576: 01,3525           01204                           OCT      01204                                 
048325,000577: 

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