Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

047958,000002:                                                                                                  ## Copyright:   Public domain.
047959,000003:                                                                                                  ## Filename:    WAITLIST.agc
047960,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
047961,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
047962,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
047963,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
047964,000008:                                                                                                  ##              that the code format has been changed to conform to the
047965,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
047966,000010:                                                                                                  ##              original YUL assembler.
047967,000011:                                                                                                  ## Reference:   pp. 1115-1130
047968,000012:                                                                                                  ## Assembler:   yaYUL
047969,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047970,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047971,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
047972,000016:                                                                                                  ##              2016-11-18 MAS  Transcribed. Mostly just comment corrections.
047973,000017:                                                                                                  ##              2016-12-07 HG   Fix P00 -> POO
047974,000018:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
047975,000019:                                                                                                  ##                              and corrected errors found.
047976,000020:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
047977,000021:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
047978,000022:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
047979,000023:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
047980,000024: 

Page 1115

047982,000026:                                                                                                  #  PROGRAM DESCRIPTION                                                                     DATE - 10 OCTOBER 1966
047983,000027:                                                                                                  #  MOD NO - 2                                                                              LOG SECTION - WAITLIST
047984,000028:                                                                                                  #  MOD BY - MILLER   (DTMAX INCREASED TO 162.5 SEC)                                        ASSEMBLY SUNBURST REV 5
047985,000029:                                                                                                  #  MOD 3 BY KERNAN  (INHINT INSERTED AT WAITLIST)  2/28/68 SKIPPER REV 4
047986,000030: 
047987,000031:                                                                                                  #  MOD 4BY KERNAN (TWIDDLE IN 54)  3/28/68 SKIPPER REV 13.
047988,000032: 
047989,000033:                                                                                                  #  FUNCTIONAL DESCRIPTION-
047990,000034:                                                                                                  #          PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED  TO CALL A PROGRAM, (CALLED A TASK),
047991,000035:                                                                                                  #     WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
047992,000036:                                                                                                  #     FOLLOW.
047993,000037: 
047994,000038:                                                                                                  #                  C(TIME3)  = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
047995,000039: 
047996,000040: 
047997,000041:                                                                                                  #                               C(LST1)    = -(T2-T1)+1
047998,000042:                                                                                                  #                               C(LST1 +1) = -(T3-T2)+1
047999,000043:                                                                                                  #                               C(LST1 +2) = -(T4-T3)+1
048000,000044:                                                                                                  #                                          .
048001,000045:                                                                                                  #                                          .
048002,000046:                                                                                                  #                               C(LST1 +6) = -(T8-T7)+1
048003,000047:                                                                                                  #                               C(LST1 +7) = -(T9-T8)+1
048004,000048: 
048005,000049:                                                                                                  #                               C(LST2)    = 2CADR OF TASK1
048006,000050:                                                                                                  #                               C(LST2 +2) = 2CADR OF TASK2
048007,000051:                                                                                                  #                                          .
048008,000052:                                                                                                  #                                          .
048009,000053:                                                                                                  #                               C(LST2 +14)= 2CADR OF TASK8
048010,000054:                                                                                                  #                               C(LST2 +16)= 2CADR OF TASK9
048011,000055: 
048012,000056:                                                                                                  #  WARNINGS-
048013,000057:                                                                                                  #  --------
048014,000058:                                                                                                  #               1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
048015,000059:                                                                                                  #               2) 9 TASKS MAXIMUM
048016,000060:                                                                                                  #               3) TASKS CALLED UNDER INTERRUPT INHIBITED
048017,000061:                                                                                                  #               4) TASKS END BY TC TASKOVER
048018,000062: 
048019,000063:                                                                                                  #  CALLING SEQUENCE-
048020,000064: 
048021,000065:                                                                                                  #               L-1    CA     DELTAT   (TIME IN CENTISECONDS TO TASK START)
048022,000066:                                                                                                  #               L      TC     WAITLIST
048023,000067:                                                                                                  #               L+1    2CADR  DESIRED TASK
048024,000068:                                                                                                  #               L+2    (MINOR OF 2CADR)
048025,000069:                                                                                                  #               L+3    RELINT          (RETURNS HERE)
048026,000070: 
048027,000071:                                                                                                  #  TWIDDLE -
048028,000072:                                                                                                  #  -------
048029,000073:                                                                                                  #               TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.   IN
048030,000074:                                                                                                  #               SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1116

048032,000076:                                                                                                  #               SAVING A WORD.   TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
048033,000077: 
048034,000078:                                                                                                  #               L-1    CA     DELTAT
048035,000079:                                                                                                  #               L      TC     TWIDDLE
048036,000080:                                                                                                  #               L+1    ADRES  DESIRED TASK
048037,000081:                                                                                                  #               L+2    RELINT               (RETURNS HERE)
048038,000082: 
048039,000083:                                                                                                  #  NORMAL EXIT MODES-
048040,000084: 
048041,000085:                                                                                                  #               AT L+3 OF CALLING SEQUENCE
048042,000086: 
048043,000087:                                                                                                  #  ALARM OR ABORT EXIT MODES-
048044,000088: 
048045,000089:                                                                                                  #               TC     ABORT
048046,000090:                                                                                                  #               OCT    1203   (WAITLIST OVERFLOW - TOO MANY TASKS)
048047,000091: 
048048,000092:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
048049,000093: 
048050,000094:                                                                                                  #               ACCOMPLISHED BY FRESH START,--LST2,..., LST2 +16 =ENDTASK
048051,000095:                                                                                                  #                                             LST1,..., LST1 +7  =NEG1/2
048052,000096: 
048053,000097:                                                                                                  #  OUTPUT--
048054,000098: 
048055,000099:                                                                                                  #               LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
048056,000100: 
048057,000101:                                                                                                  #  DEBRIS-
048058,000102: 
048059,000103:                                                                                                  #               CENTRALS- A,Q,L
048060,000104:                                                                                                  #               OTHER   - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
048061,000105:                                                                                                  #  DETAILED ANALYSIS OF TIMING-
048062,000106: 
048063,000107:                                                                                                  #          CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR)   IN EXACTLY DELTA T CENTISECONDS.
048064,000108:                                                                                                  #     THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
048065,000109: 
048066,000110:                                                                                                  #               LET TO = THE TIME OF THE TC WAITLIST
048067,000111:                                                                                                  #               LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
048068,000112:                                                                                                  #               LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
048069,000113:                                                                                                  #               LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
048070,000114:                                                                                                  #               LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
048071,000115:                                                                                                  #     (Z=0, USUALLY)
048072,000116:                                                                                                  #               LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
048073,000117:                                                                                                  #            THEN   DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
048074,000118:                                                                                                  #     *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
048075,000119: 
048076,000120: 
048077,000121:                                                                                                  #          IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
048078,000122:                                                                                                  #     INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
048079,000123:                                                                                                  #     OF OTHER TASKS INHIBITING THE INTERRUPT.
048080,000124: 
048081,000125: 
048082,000126:    5175                                           BLOCK    02                                    

Page 1117

048084,000128:    5175  E3,1400                                  EBANK=   LST1                                  #  TASK  LISTS IN SWITCHED E BANK.
048085,000129: 
048086,000130:    5175                                           COUNT*   $$/WAIT                               
048087,000131:    5175           00004        TWIDDLE            INHINT                                         
048088,000132:    5176           54001                           TS       L                                     #  SAVE DELAY TIME IN L
048089,000133:    5177           34724                           CA       POSMAX                                
048090,000134:    5200           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
048091,000135:    5201           30006                           CA       BBANK                                 
048092,000136:    5202           00006                           EXTEND                                         
048093,000137:    5203           04007                           ROR      SUPERBNK                              
048094,000138:    5204           56001                           XCH      L                                     
048095,000139: 
048096,000140:    5205           00004        WAITLIST           INHINT                                         
048097,000141:    5206           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
048098,000142:    5207           54061                           TS       WAITEXIT                              #  WAITEXIT.
048099,000143:    5210           00006                           EXTEND                                         
048100,000144:    5211           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
048101,000145:    5212           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
048102,000146:    5213           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
048103,000147:    5214           35222        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
048104,000148:    5215           56006                           XCH      BBANK                                 
048105,000149:    5216           13234                           TCF      WAIT2                                 
048106,000150: 
048107,000151:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
048108,000152: 
048109,000153:    5217           52062        LVWTLIST           DXCH     WAITEXIT                              
048110,000154:    5220           64743                           AD       TWO                                   
048111,000155:    5221           52006                           DTCB                                           
048112,000156: 
048113,000157:    5222  E3,1400                                  EBANK=   LST1                                  
048114,000158:    5222           02063        WAITBB             BBCON    WAIT2                                 
048115,000159: 
048116,000160:                                                                                                  #           RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
048117,000161: 
048118,000162:    5223           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
048119,000163:    5224           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
048120,000164:    5225           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
048121,000165: 
048122,000166:                                                                                                  #           RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
048123,000167: 
048124,000168:    5226           56002        VARDELAY           XCH      Q                                     #  DT TO Q. TASK ADRES TO WAITADR.
048125,000169:    5227           54063                           TS       WAITADR                               
048126,000170:    5230           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
048127,000171:    5231           00006                           EXTEND                                         
048128,000172:    5232           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
048129,000173:    5233           54001                           TS       L                                     
048130,000174:    5234           35237                           CAF      DELAYEX                               
048131,000175:    5235           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
048132,000176:    5236           15214                           TCF      DLY2                                  
048133,000177: 

Page 1118

048135,000179:    5237           15261        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
048136,000180: 

Page 1119

048138,000182:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
048139,000183: 
048140,000184:    5240  E3,1400                                  EBANK=   LST1                                  
048141,000185:    5240           72535 73714  ENDTASK            -2CADR   SVCT3                                 
048142,000186: 
048143,000187:    5242           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
048144,000188:    5243           15263                           TCF      TASKOVER                              
048145,000189:    5244           15263                           TCF      TASKOVER                              
048146,000190:    5245           15246                           TCF      +1                                    
048147,000191: 
048148,000192:    5246           11301        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
048149,000193:    5247           15260                           TCF      SVCT3X                                #  IMUSTALL.
048150,000194:    5250           15253                           TCF      +3                                    
048151,000195:    5251           15260                           TCF      SVCT3X                                
048152,000196:    5252           15260                           TCF      SVCT3X                                
048153,000197: 
048154,000198:    5253           37744                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
048155,000199:    5254           05063                           TC       NOVAC                                 #      ENABLE EVERY 81.93 SECONDS
048156,000200:    5255  E3,1460                                  EBANK=   NBDX                                  
048157,000201:    5255           03625 14063                     2CADR    NBDONLY                               
048158,000202: 
048159,000203:    5257           15263                           TCF      TASKOVER                              
048160,000204: 
048161,000205:    5260           05223        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
048162,000206:    5261           00764                           DEC      500        B-14                       
048163,000207:    5262           05242                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
048164,000208: 

Page 1120

048166,000210:                                                                                                  #           BEGIN TASK INSERTION.
048167,000211: 
048168,000212: 01,3234                                           BANK     01                                    
048169,000213: 01,3234                                           COUNT*   $$/WAIT                               
048170,000214: 01,3234           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
048171,000215: 01,3235           30002                           CA       Q                                     
048172,000216: 01,3236           00006                           EXTEND                                         
048173,000217: 01,3237           63525                           BZMF     WAITPOOH                              
048174,000218: 
048175,000219: 01,3240           40026                           CS       TIME3                                 
048176,000220: 01,3241           64735                           AD       BIT8                                  #  BIT 8 = OCT 200
048177,000221: 01,3242           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
048178,000222:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
048179,000223:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
048180,000224:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
048181,000225: 
048182,000226: 01,3243           66130                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
048183,000227: 01,3244           40000                           CS       A                                     #  T - T1 + 1.0 - 201
048184,000228: 
048185,000229:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
048186,000230: 
048187,000231: 01,3245           63373                           AD       OCT40201                              
048188,000232: 01,3246           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
048189,000233: 
048190,000234: 01,3247           10000                           CCS      A                                     #  TEST TD - T1 + 1
048191,000235: 
048192,000236: 01,3250           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
048193,000237: 01,3251           13313                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
048194,000238: 
048195,000239: 01,3252           13253                           NOOP                                           
048196,000240: 01,3253           40002                           CS       Q                                     
048197,000241: 
048198,000242:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
048199,000243:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
048200,000244:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
048201,000245:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
048202,000246: 
048203,000247: 01,3254           64727                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
048204,000248: 01,3255           64727                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
048205,000249: 01,3256           56026                           XCH      TIME3                                 
048206,000250: 01,3257           64726                           AD       NEGMAX                                
048207,000251: 01,3260           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
048208,000252: 01,3261           00006                           EXTEND                                         #  ZERO INDEX Q.
048209,000253: 01,3262           22007                           QXCH     7                                     #  (ZQ)
048210,000254: 

Page 1121

048212,000256: 01,3263           57400        WTLST4             XCH      LST1                                  
048213,000257: 01,3264           57401                           XCH      LST1       +1                         
048214,000258: 01,3265           57402                           XCH      LST1       +2                         
048215,000259: 01,3266           57403                           XCH      LST1       +3                         
048216,000260: 01,3267           57404                           XCH      LST1       +4                         
048217,000261: 01,3270           57405                           XCH      LST1       +5                         
048218,000262: 01,3271           57406                           XCH      LST1       +6                         
048219,000263: 01,3272           57407                           XCH      LST1       +7                         
048220,000264: 
048221,000265: 01,3273           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
048222,000266: 01,3274           50002                           INDEX    Q                                     
048223,000267: 01,3275           13276                           TCF      +1                                    
048224,000268: 
048225,000269: 01,3276           53411                           DXCH     LST2                                  
048226,000270: 01,3277           53413                           DXCH     LST2       +2                         
048227,000271: 01,3300           53415                           DXCH     LST2       +4                         
048228,000272: 01,3301           53417                           DXCH     LST2       +6                         
048229,000273: 01,3302           53421                           DXCH     LST2       +8D                        
048230,000274: 01,3303           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2+10) IS STD
048231,000275: 01,3304           53425                           DXCH     LST2       +12D                       
048232,000276: 01,3305           53427                           DXCH     LST2       +14D                       
048233,000277: 01,3306           53431                           DXCH     LST2       +16D                       
048234,000278: 01,3307           65240                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
048235,000279:                                                                                                  #    THE LENGTH OF THE LIST.
048236,000280: 01,3310           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
048237,000281: 01,3311           15217                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
048238,000282: 01,3312           13366                           TCF      WTABORT                               #  IT.
048239,000283: 

Page 1122

048241,000285: 01,3313           10000        WTLST5             CCS      A                                     #  TEST  TD - T2 + 1
048242,000286: 01,3314           61401                           AD       LST1       +1                         
048243,000287: 01,3315           13321                           TCF      +4                                    
048244,000288: 01,3316           64744                           AD       ONE                                   
048245,000289: 01,3317           03377                           TC       WTLST2                                
048246,000290: 01,3320           00001                           OCT      1                                     
048247,000291: 
048248,000292: 01,3321           10000                 +4        CCS      A                                     #  TEST  TD - T3 + 1
048249,000293: 01,3322           61402                           AD       LST1       +2                         
048250,000294: 01,3323           13327                           TCF      +4                                    
048251,000295: 01,3324           64744                           AD       ONE                                   
048252,000296: 01,3325           03377                           TC       WTLST2                                
048253,000297: 01,3326           00002                           OCT      2                                     
048254,000298: 
048255,000299: 01,3327           10000                 +4        CCS      A                                     #  TEST  TD - T4 + 1
048256,000300: 01,3330           61403                           AD       LST1       +3                         
048257,000301: 01,3331           13335                           TCF      +4                                    
048258,000302: 01,3332           64744                           AD       ONE                                   
048259,000303: 01,3333           03377                           TC       WTLST2                                
048260,000304: 01,3334           00003                           OCT      3                                     
048261,000305: 
048262,000306: 01,3335           10000                 +4        CCS      A                                     #  TEST  TD - T5 + 1
048263,000307: 01,3336           61404                           AD       LST1       +4                         
048264,000308: 01,3337           13343                           TCF      +4                                    
048265,000309: 01,3340           64744                           AD       ONE                                   
048266,000310: 01,3341           03377                           TC       WTLST2                                
048267,000311: 01,3342           00004                           OCT      4                                     
048268,000312: 
048269,000313: 01,3343           10000                 +4        CCS      A                                     #  TEST  TD - T6 + 1
048270,000314: 01,3344           61405                           AD       LST1       +5                         
048271,000315: 01,3345           13351                           TCF      +4                                    
048272,000316: 01,3346           64744                           AD       ONE                                   
048273,000317: 01,3347           03377                           TC       WTLST2                                
048274,000318: 01,3350           00005                           OCT      5                                     
048275,000319: 
048276,000320: 01,3351           10000                 +4        CCS      A                                     #  TEST  TD - T7 + 1
048277,000321: 01,3352           61406                           AD       LST1       +6                         
048278,000322: 01,3353           13357                           TCF      +4                                    
048279,000323: 01,3354           64744                           AD       ONE                                   
048280,000324: 01,3355           03377                           TC       WTLST2                                
048281,000325: 01,3356           00006                           OCT      6                                     
048282,000326: 

Page 1123

048284,000328: 01,3357           10000                 +4        CCS      A                                     
048285,000329: 01,3360           61407                           AD       LST1       +7                         
048286,000330: 01,3361           13365                           TCF      +4                                    
048287,000331: 01,3362           64744                           AD       ONE                                   
048288,000332: 01,3363           03377                           TC       WTLST2                                
048289,000333: 01,3364           00007                           OCT      7                                     
048290,000334: 
048291,000335: 01,3365           10000                 +4        CCS      A                                     
048292,000336: 01,3366           03374        WTABORT            TC       FILLED                                
048293,000337: 01,3367           13370                           NOOP                                           #  CAN'T GET HERE
048294,000338: 01,3370           64744                           AD       ONE                                   
048295,000339: 01,3371           03377                           TC       WTLST2                                
048296,000340: 01,3372           00010                           OCT      10                                    
048297,000341: 
048298,000342: 01,3373           40201        OCT40201           OCT      40201                                 
048299,000343: 

Page 1124

048301,000345: 01,3374           52062        FILLED             DXCH     WAITEXIT                              
048302,000346: 01,3375           05712                           TC       BAILOUT1                              #  NO ROOM IN THE INN
048303,000347: 01,3376           31203                           OCT      31203                                 
048304,000348: 

Page 1125

048306,000350:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
048307,000351:                                                                                                  #                                                     N           N+1
048308,000352: 
048309,000353:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
048310,000354:                                                                                                  #                                                              N+1
048311,000355: 
048312,000356:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
048313,000357:                                                                                                  #                    N+1   N                                 N
048314,000358: 
048315,000359:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
048316,000360:                                                                                                  #               N+1
048317,000361: 
048318,000362: 01,3377           54064        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
048319,000363: 01,3400           50002                           INDEX    Q                                     
048320,000364: 01,3401           30000                           CAF      0                                     
048321,000365: 01,3402           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
048322,000366: 
048323,000367: 01,3403           34744                           CAF      ONE                                   
048324,000368: 01,3404           60064                           AD       WAITTEMP                              
048325,000369: 01,3405           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
048326,000370: 01,3406           27377                           ADS      LST1       -1                         #                 N
048327,000371: 
048328,000372: 01,3407           40064                           CS       WAITTEMP                              
048329,000373: 01,3410           50002                           INDEX    Q                                     
048330,000374: 01,3411           13263                           TCF      WTLST4                                
048331,000375: 
048332,000376:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
048333,000377: 
048334,000378:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
048335,000379:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
048336,000380:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
048337,000381:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
048338,000382:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
048339,000383: 
048340,000384:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
048341,000385:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
048342,000386:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
048343,000387:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
048344,000388:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
048345,000389:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
048346,000390: 

Page 1126

048348,000392:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
048349,000393: 
048350,000394: 01,3412           00006        T3RUPT             EXTEND                                         
048351,000395: 01,3413           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
048352,000396: 01,3414           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
048353,000397: 01,3415           00006                           EXTEND                                         
048354,000398: 01,3416           22012                           QXCH     QRUPT                                 
048355,000399: 
048356,000400: 01,3417           34725        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
048357,000401: 01,3420           57407                           XCH      LST1       +7                         
048358,000402: 01,3421           57406                           XCH      LST1       +6                         
048359,000403: 01,3422           57405                           XCH      LST1       +5                         
048360,000404: 01,3423           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
048361,000405: 01,3424           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
048362,000406: 01,3425           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
048363,000407: 01,3426           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
048364,000408: 01,3427           57400                           XCH      LST1                                  
048365,000409: 01,3430           64724                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 -T USING LIST 1.
048366,000410: 01,3431           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
048367,000411: 01,3432           54332                           TS       RUPTAGN                               
048368,000412: 01,3433           44746                           CS       ZERO                                  
048369,000413: 01,3434           54332                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
048370,000414: 
048371,000415: 01,3435           00006                           EXTEND                                         #  DISPATCH TASK.
048372,000416: 01,3436           45241                           DCS      ENDTASK                               
048373,000417: 01,3437           53431                           DXCH     LST2       +16D                       
048374,000418: 01,3440           53427                           DXCH     LST2       +14D                       
048375,000419: 01,3441           53425                           DXCH     LST2       +12D                       
048376,000420: 01,3442           53423                           DXCH     LST2       +10D                       
048377,000421: 01,3443           53421                           DXCH     LST2       +8D                        
048378,000422: 01,3444           53417                           DXCH     LST2       +6                         
048379,000423: 01,3445           53415                           DXCH     LST2       +4                         
048380,000424: 01,3446           53413                           DXCH     LST2       +2                         
048381,000425: 01,3447           53411                           DXCH     LST2                                  
048382,000426: 
048383,000427: 01,3450           56001                           XCH      L                                     
048384,000428: 01,3451           00006                           EXTEND                                         
048385,000429: 01,3452           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
048386,000430: 01,3453           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
048387,000431: 01,3454           52006                           DTCB                                           
048388,000432: 

Page 1127

048390,000434:                                                                                                  #           RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
048391,000435: 
048392,000436:    5263                                           BLOCK    02                                    
048393,000437:    5263                                           COUNT*   $$/WAIT                               
048394,000438:    5263           10332        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
048395,000439:    5264           35222                           CAF      WAITBB                                
048396,000440:    5265           54006                           TS       BBANK                                 
048397,000441:    5266           13417                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
048398,000442: 
048399,000443:    5267           30016                           CA       BANKRUPT                              
048400,000444:    5270           00006                           EXTEND                                         
048401,000445:    5271           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
048402,000446: 
048403,000447:    5272           00006        RESUME             EXTEND                                         
048404,000448:    5273           22012                           QXCH     QRUPT                                 
048405,000449:    5274           30016        NOQRSM             CA       BANKRUPT                              
048406,000450:    5275           56006                           XCH      BBANK                                 
048407,000451:    5276           52011        NOQBRSM            DXCH     ARUPT                                 
048408,000452:    5277           00003                           RELINT                                         
048409,000453:    5300           50017                           RESUME                                         
048410,000454: 

Page 1128

048412,000456:                                                                                                  #  LONGCALL
048413,000457: 
048414,000458:                                                                                                  #  PROGRAM DESCRIPTION                                  DATE- 17 MARCH 1967
048415,000459:                                                                                                  #  PROGRAM WRITTEN BY W.H. VANDEVER                    LOG SECTION WAITLIST
048416,000460:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK REV. 100
048417,000461: 
048418,000462:                                                                                                  #  FUNCTIONAL DESCRIPTION-
048419,000463:                                                                                                  #  LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
048420,000464:                                                                                                  #  IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
048421,000465:                                                                                                  #  A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
048422,000466:                                                                                                  #  START
048423,000467: 
048424,000468:                                                                                                  #  CALLING SEQUENCE-
048425,000469:                                                                                                  #                                                   EXTEND
048426,000470:                                                                                                  #                                                   DCA    TIMELOC
048427,000471:                                                                                                  #                                                   TC     LONGCALL
048428,000472:                                                                                                  #                                                   2CADR  TASKTODO
048429,000473: 
048430,000474:                                                                                                  #  NORMAL EXIT MODE-
048431,000475:                                                                                                  #     1). TC    WAITLIST
048432,000476:                                                                                                  #     2). DTCB  (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
048433,000477:                                                                                                  #     3). DTCB  (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
048434,000478: 
048435,000479:                                                                                                  #  ALARM OR ABORT EXIT MODE-
048436,000480:                                                                                                  #     NONE
048437,000481: 
048438,000482:                                                                                                  #  OUTPUT-
048439,000483:                                                                                                  #     LONGTIME AND LONGTIME+1 = DELTA TIME
048440,000484:                                                                                                  #     LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
048441,000485:                                                                                                  #     LONGCADR AND LONGCADR+1 = TASK 2CADR
048442,000486:                                                                                                  #     A = SINGLE PRECISION TIME FOR WAITLIST
048443,000487: 
048444,000488:                                                                                                  #  ERASABLE INITIALIZATION-
048445,000489:                                                                                                  #     A = MOST SIGNIFICANT PART OF DELTA TIME
048446,000490:                                                                                                  #     L = LEAST SIGNIFICANT PART OF DELTA TIME
048447,000491:                                                                                                  #     Q = ADDRESS OF 2CADR TASK VALUE
048448,000492: 
048449,000493:                                                                                                  #  DEBRIS-
048450,000494:                                                                                                  #     A,Q,L
048451,000495:                                                                                                  #     LONGCADR AND LONGCADR+1
048452,000496:                                                                                                  #     LONGEXIT AND LONGEXIT+1
048453,000497:                                                                                                  #     LONGTIME AND LONGTIME+1
048454,000498: 
048455,000499:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
048456,000500: 
048457,000501:    5301                                           BLOCK    02                                    
048458,000502:    5301  E3,1400                                  EBANK=   LST1                                  
048459,000503:    5301           53153        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
048460,000504: 
048461,000505:    5302           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1129

048463,000507:    5303           50002                           NDX      Q                                     
048464,000508:    5304           30001                           DCA      0                                     
048465,000509:    5305           53147                           DXCH     LONGCADR                              
048466,000510: 
048467,000511:    5306           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
048468,000512:    5307           35312                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
048469,000513:    5310           52006                           DTCB                                           
048470,000514: 
048471,000515:    5311  E3,1400                                  EBANK=   LST1                                  
048472,000516:    5311           03455 02063  LGCL2CDR           2CADR    LNGCALL2                              
048473,000517: 
048474,000518:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
048475,000519: 
048476,000520: 01,3455                                           BANK     01                                    
048477,000521: 01,3455                                           COUNT*   $$/WAIT                               
048478,000522: 01,3455           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
048479,000523: 01,3456           34743                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
048480,000524: 01,3457           26002                           ADS      Q                                     
048481,000525: 01,3460           55434                           TS       LONGEXIT                              
048482,000526: 
048483,000527: 01,3461           31152                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
048484,000528: 01,3462           10000                           CCS      A                                     
048485,000529: 01,3463           13471                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
048486,000530: 01,3464           13466                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
048487,000531: 01,3465           13523                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
048488,000532: 01,3466           31153                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
048489,000533: 01,3467           00006                           EXTEND                                         
048490,000534: 01,3470           63523                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
048491,000535: 
048492,000536:                                                                                                  #           *** WAITLIST TASK LONGCYCL ***
048493,000537: 01,3471           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
048494,000538: 01,3472           43503                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
048495,000539: 01,3473           21153                           DAS      LONGTIME                              
048496,000540: 
048497,000541: 01,3474           11153                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
048498,000542: 01,3475           13513                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
048499,000543:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
048500,000544:                                                                                                  #  BASIC INSTRUCTIONS
048501,000545:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
048502,000546:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
048503,000547:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
048504,000548: 01,3476           13477                           NOOP                                           #  CAN:T GET HERE    **********
048505,000549: 01,3477           13500                           TCF      +1                                    
048506,000550: 01,3500           11152                           CCS      LONGTIME                              
048507,000551: 01,3501           13513                           TCF      MUCHTIME                              
048508,000552: 01,3502           00000        DPBIT14            OCT      00000                                 
048509,000553: 01,3503           20000                           OCT      20000                                 
048510,000554:                                                                                                  #  LONGCALL
048511,000555: 

Page 1130

048513,000557: 01,3504           34727        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
048514,000558: 01,3505           27153                           ADS      LONGTIME   +1                         
048515,000559: 01,3506           05175                           TC       TWIDDLE                               
048516,000560: 01,3507  E3,1400                                  EBANK=   LST1                                  
048517,000561: 01,3507           03520                           ADRES    GETCADR                               
048518,000562: 01,3510           33522        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
048519,000563: 01,3511           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
048520,000564: 01,3512           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
048521,000565: 
048522,000566: 01,3513           34727        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
048523,000567: 01,3514           05205                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
048524,000568: 01,3515  E3,1400                                  EBANK=   LST1                                  
048525,000569: 01,3515           03471 02063                     2CADR    LONGCYCL                              
048526,000570: 
048527,000571: 
048528,000572: 01,3517           13510                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
048529,000573: 
048530,000574:                                                                                                  #           *** WAITLIST TASK GETCADR ***
048531,000575: 01,3520           53147        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
048532,000576: 01,3521           15167                           TCF      SUPDXCHZ                              #  AND TRANSFER CONTROL
048533,000577: 01,3522           05263        TSKOVCDR           GENADR   TASKOVER                              
048534,000578: 01,3523           53435        LONGPOOH           DXCH     LONGEXIT                              
048535,000579: 01,3524           13526                           TCF      +2                                    
048536,000580: 01,3525           52062        WAITPOOH           DXCH     WAITEXIT                              
048537,000581: 01,3526           05722                 +2        TC       POODOO1                               
048538,000582: 01,3527           21204                           OCT      21204                                 

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