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
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

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

Page 1117

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

Page 1118

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

Page 1119

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

Page 1120

047913,000181:    5235           15257        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
047914,000182: 

Page 1121

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

Page 1122

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

Page 1123

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

Page 1124

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

Page 1125

048062,000330: 01,3354           10000                 +4        CCS      A                                     
048063,000331: 01,3355           61407                           AD       LST1       +7                         
048064,000332: 01,3356           13362                           TCF      +4                                    
048065,000333: 01,3357           64753                           AD       ONE                                   
048066,000334: 01,3360           03374                           TC       WTLST2                                
048067,000335: 01,3361           00007                           OCT      7                                     
048068,000336: 
048069,000337: 01,3362           10000                 +4        CCS      A                                     
048070,000338: 01,3363           03371        WTABORT            TC       FILLED                                
048071,000339: 01,3364           13365                           NOOP                                           #  CAN'T GET HERE
048072,000340: 01,3365           64753                           AD       ONE                                   
048073,000341: 01,3366           03374                           TC       WTLST2                                
048074,000342: 01,3367           00010                           OCT      10                                    
048075,000343: 
048076,000344: 01,3370           40201        OCT40201           OCT      40201                                 
048077,000345: 

Page 1126

048079,000347: 01,3371           52062        FILLED             DXCH     WAITEXIT                              
048080,000348: 01,3372           05716                           TC       BAILOUT1                              #  NO ROOM IN THE INN
048081,000349: 01,3373           01203                           OCT      01203                                 
048082,000350: 

Page 1127

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

Page 1128

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

Page 1129

048165,000433:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
048166,000434: 
048167,000435:    5261                                           BLOCK    02                                    
048168,000436:    5261                                           COUNT*   $$/WAIT                               
048169,000437:    5261           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
048170,000438:    5262           35220                           CAF      WAITBB                                
048171,000439:    5263           54006                           TS       BBANK                                 
048172,000440:    5264           13414                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
048173,000441: 
048174,000442:    5265           30016                           CA       BANKRUPT                              
048175,000443:    5266           00006                           EXTEND                                         
048176,000444:    5267           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
048177,000445: 
048178,000446:    5270           00006        RESUME             EXTEND                                         
048179,000447:    5271           22012                           QXCH     QRUPT                                 
048180,000448:    5272           30016        NOQRSM             CA       BANKRUPT                              
048181,000449:    5273           56006                           XCH      BBANK                                 
048182,000450:    5274           52011        NOQBRSM            DXCH     ARUPT                                 
048183,000451:    5275           00003                           RELINT                                         
048184,000452:    5276           50017                           RESUME                                         
048185,000453: 

Page 1130

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

Page 1131

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

Page 1132

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

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