Source Code

These source-code files are part of a reconstructed copy of Luminary 163, the first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 163 listing would be different.

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

046996,000002:                                                                                                  ## Copyright:   Public domain.
046997,000003:                                                                                                  ## Filename:    WAITLIST.agc
046998,000004:                                                                                                  ## Purpose:     A section of Luminary revision 163.
046999,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
047000,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
047001,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
047002,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
047003,000009:                                                                                                  ##              Luminary 173, as well as Luminary memos 157 amd 158.
047004,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
047005,000011:                                                                                                  ##              exactly match those specified for Luminary 163 in NASA
047006,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
047007,000013:                                                                                                  ##              that the reconstruction is correct.
047008,000014:                                                                                                  ## Reference:   pp. 1108-1123
047009,000015:                                                                                                  ## Assembler:   yaYUL
047010,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047011,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047012,000018:                                                                                                  ## Mod history: 2019-08-21 MAS  Created from Luminary 173.
047013,000019: 

Page 1108

047015,000021:                                                                                                  #  PROGRAM DESCRIPTION                                                                     DATE - 10 OCTOBER 1966
047016,000022:                                                                                                  #  MOD NO - 2                                                                              LOG SECTION - WAITLIST
047017,000023:                                                                                                  #  MOD BY - MILLER   (DTMAX INCREASED TO 162.5 SEC)                                        ASSEMBLY SUNBURST REV 5
047018,000024:                                                                                                  #  MOD 3 BY KERNAN  (INHINT INSERTED AT WAITLIST)  2/28/68 SKIPPER REV 4
047019,000025: 
047020,000026:                                                                                                  #  MOD 4BY KERNAN (TWIDDLE IN 54)  3/28/68 SKIPPER REV 13.
047021,000027: 
047022,000028: 
047023,000029:                                                                                                  #  FUNCTIONAL DESCRIPTION-
047024,000030:                                                                                                  #          PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED  TO CALL A PROGRAM, (CALLED A TASK),
047025,000031:                                                                                                  #     WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
047026,000032:                                                                                                  #     FOLLOW.
047027,000033: 
047028,000034:                                                                                                  #                  C(TIME3)  = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
047029,000035: 
047030,000036: 
047031,000037:                                                                                                  #                               C(LST1)    = -(T2-T1)+1
047032,000038:                                                                                                  #                               C(LST1 +1) = -(T3-T2)+1
047033,000039:                                                                                                  #                               C(LST1 +2) = -(T4-T3)+1
047034,000040:                                                                                                  #                                          .
047035,000041:                                                                                                  #                                          .
047036,000042:                                                                                                  #                               C(LST1 +6) = -(T8-T7)+1
047037,000043:                                                                                                  #                               C(LST1 +7) = -(T9-T8)+1
047038,000044: 
047039,000045:                                                                                                  #                               C(LST2)    = 2CADR OF TASK1
047040,000046:                                                                                                  #                               C(LST2 +2) = 2CADR OF TASK2
047041,000047:                                                                                                  #                                          .
047042,000048:                                                                                                  #                                          .
047043,000049:                                                                                                  #                               C(LST2 +14)= 2CADR OF TASK8
047044,000050:                                                                                                  #                               C(LST2 +16)= 2CADR OF TASK9
047045,000051: 
047046,000052:                                                                                                  #  WARNINGS-
047047,000053:                                                                                                  #  --------
047048,000054:                                                                                                  #               1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
047049,000055:                                                                                                  #               2) 9 TASKS MAXIMUM
047050,000056:                                                                                                  #               3) TASKS CALLED UNDER INTERRUPT INHIBITED
047051,000057:                                                                                                  #               4) TASKS END BY TC TASKOVER
047052,000058: 
047053,000059:                                                                                                  #  CALLING SEQUENCE-
047054,000060: 
047055,000061:                                                                                                  #               L-1    CA     DELTAT   (TIME IN CENTISECONDS TO TASK START)
047056,000062:                                                                                                  #               L      TC     WAITLIST
047057,000063:                                                                                                  #               L+1    2CADR  DESIRED TASK
047058,000064:                                                                                                  #               L+2    (MINOR OF 2CADR)
047059,000065:                                                                                                  #               L+3    RELINT          (RETURNS HERE)
047060,000066: 
047061,000067:                                                                                                  #  TWIDDLE -
047062,000068:                                                                                                  #  -------
047063,000069:                                                                                                  #               TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.   IN
047064,000070:                                                                                                  #               SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1109

047066,000072:                                                                                                  #               SAVING A WORD.   TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
047067,000073: 
047068,000074:                                                                                                  #               L-1    CA     DELTAT
047069,000075:                                                                                                  #               L      TC     TWIDDLE
047070,000076:                                                                                                  #               L+1    ADRES  DESIRED TASK
047071,000077:                                                                                                  #               L+2    RELINT               (RETURNS HERE)
047072,000078: 
047073,000079:                                                                                                  #  NORMAL EXIT MODES-
047074,000080: 
047075,000081:                                                                                                  #               AT L+3 OF CALLING SEQUENCE
047076,000082: 
047077,000083:                                                                                                  #  ALARM OR ABORT EXIT MODES-
047078,000084: 
047079,000085:                                                                                                  #               TC     ABORT
047080,000086:                                                                                                  #               OCT    1203   (WAITLIST OVERFLOW - TOO MANY TASKS)
047081,000087: 
047082,000088:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
047083,000089: 
047084,000090:                                                                                                  #               ACCOMPLISHED BY FRESH START,--LST2,..., LST2 +16 =ENDTASK
047085,000091:                                                                                                  #                                             LST1,..., LST1 +7  =NEG1/2
047086,000092: 
047087,000093:                                                                                                  #  OUTPUT--
047088,000094: 
047089,000095:                                                                                                  #               LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
047090,000096: 
047091,000097:                                                                                                  #  DEBRIS-
047092,000098: 
047093,000099:                                                                                                  #               CENTRALS- A,Q,L
047094,000100:                                                                                                  #               OTHER   - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
047095,000101:                                                                                                  #  DETAILED ANALYSIS OF TIMING-
047096,000102: 
047097,000103:                                                                                                  #          CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR)   IN EXACTLY DELTA T CENTISECONDS.
047098,000104:                                                                                                  #     THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
047099,000105: 
047100,000106:                                                                                                  #               LET TO = THE TIME OF THE TC WAITLIST
047101,000107:                                                                                                  #               LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
047102,000108:                                                                                                  #               LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
047103,000109:                                                                                                  #               LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
047104,000110:                                                                                                  #               LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
047105,000111:                                                                                                  #     (Z=0, USUALLY)
047106,000112:                                                                                                  #               LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
047107,000113:                                                                                                  #            THEN   DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
047108,000114:                                                                                                  #     *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
047109,000115: 
047110,000116: 
047111,000117:                                                                                                  #          IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
047112,000118:                                                                                                  #     INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
047113,000119:                                                                                                  #     OF OTHER TASKS INHIBITING THE INTERRUPT.
047114,000120: 
047115,000121: 
047116,000122:    5204                                           BLOCK    02                                    

Page 1110

047118,000124:    5204  E3,1400                                  EBANK=   LST1                                  #  TASK  LISTS IN SWITCHED E BANK.
047119,000125: 
047120,000126:    5204                                           COUNT*   $$/WAIT                               
047121,000127:    5204           00004        TWIDDLE            INHINT                                         
047122,000128:    5205           54001                           TS       L                                     #  SAVE DELAY TIME IN L
047123,000129:    5206           34733                           CA       POSMAX                                
047124,000130:    5207           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
047125,000131:    5210           30006                           CA       BBANK                                 
047126,000132:    5211           00006                           EXTEND                                         
047127,000133:    5212           04007                           ROR      SUPERBNK                              
047128,000134:    5213           56001                           XCH      L                                     
047129,000135: 
047130,000136:    5214           00004        WAITLIST           INHINT                                         
047131,000137:    5215           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
047132,000138:    5216           54061                           TS       WAITEXIT                              #  WAITEXIT.
047133,000139:    5217           00006                           EXTEND                                         
047134,000140:    5220           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
047135,000141:    5221           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
047136,000142:    5222           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
047137,000143:    5223           35231        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
047138,000144:    5224           56006                           XCH      BBANK                                 
047139,000145:    5225           13234                           TCF      WAIT2                                 
047140,000146: 
047141,000147:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
047142,000148: 
047143,000149:    5226           52062        LVWTLIST           DXCH     WAITEXIT                              
047144,000150:    5227           64752                           AD       TWO                                   
047145,000151:    5230           52006                           DTCB                                           
047146,000152: 
047147,000153:    5231  E3,1400                                  EBANK=   LST1                                  
047148,000154:    5231           02063        WAITBB             BBCON    WAIT2                                 
047149,000155: 
047150,000156:                                                                                                  #           RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
047151,000157: 
047152,000158:    5232           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
047153,000159:    5233           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
047154,000160:    5234           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
047155,000161: 
047156,000162:                                                                                                  #           RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
047157,000163: 
047158,000164:    5235           56002        VARDELAY           XCH      Q                                     #  DT TO Q. TASK ADRES TO WAITADR.
047159,000165:    5236           54063                           TS       WAITADR                               
047160,000166:    5237           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
047161,000167:    5240           00006                           EXTEND                                         
047162,000168:    5241           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
047163,000169:    5242           54001                           TS       L                                     
047164,000170:    5243           35246                           CAF      DELAYEX                               
047165,000171:    5244           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
047166,000172:    5245           15223                           TCF      DLY2                                  
047167,000173: 

Page 1111

047169,000175:    5246           15270        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
047170,000176: 

Page 1112

047172,000178:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
047173,000179: 
047174,000180:    5247  E3,1400                                  EBANK=   LST1                                  
047175,000181:    5247           72526 73714  ENDTASK            -2CADR   SVCT3                                 
047176,000182: 
047177,000183: 
047178,000184:    5251           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
047179,000185:    5252           15272                           TCF      TASKOVER                              
047180,000186:    5253           15272                           TCF      TASKOVER                              
047181,000187:    5254           15255                           TCF      +1                                    
047182,000188: 
047183,000189:    5255           11301        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
047184,000190:    5256           15267                           TCF      SVCT3X                                #  IMUSTALL.
047185,000191:    5257           15262                           TCF      +3                                    
047186,000192:    5260           15267                           TCF      SVCT3X                                
047187,000193:    5261           15267                           TCF      SVCT3X                                
047188,000194: 
047189,000195:    5262           37726                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
047190,000196:    5263           05072                           TC       NOVAC                                 #      ENABLE EVERY 81.93 SECONDS
047191,000197:    5264  E3,1460                                  EBANK=   NBDX                                  
047192,000198:    5264           03563 14063                     2CADR    NBDONLY                               
047193,000199: 
047194,000200:    5266           15272                           TCF      TASKOVER                              
047195,000201: 
047196,000202:    5267           05232        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
047197,000203:    5270           00764                           DEC      500        B-14                       
047198,000204:    5271           05251                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
047199,000205: 

Page 1113

047201,000207:                                                                                                  #           BEGIN TASK INSERTION.
047202,000208: 
047203,000209: 01,3234                                           BANK     01                                    
047204,000210: 01,3234                                           COUNT*   $$/WAIT                               
047205,000211: 01,3234           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
047206,000212: 01,3235           30002                           CA       Q                                     
047207,000213: 01,3236           00006                           EXTEND                                         
047208,000214: 01,3237           63525                           BZMF     WAITPOOH                              
047209,000215: 
047210,000216: 01,3240           40026                           CS       TIME3                                 
047211,000217: 01,3241           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
047212,000218: 01,3242           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
047213,000219:                                                                                                  #                                        IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
047214,000220:                                                                                                  #                                        C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
047215,000221:                                                                                                  #                                        ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
047216,000222: 
047217,000223: 01,3243           66112                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
047218,000224: 01,3244           40000                           CS       A                                     #  T - T1 + 1.0 - 201
047219,000225: 
047220,000226:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
047221,000227: 
047222,000228: 01,3245           63373                           AD       OCT40201                              
047223,000229: 01,3246           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
047224,000230: 
047225,000231: 01,3247           10000                           CCS      A                                     #  TEST TD - T1 + 1
047226,000232: 
047227,000233: 01,3250           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
047228,000234: 01,3251           13313                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
047229,000235: 
047230,000236: 01,3252           13253                           NOOP                                           
047231,000237: 01,3253           40002                           CS       Q                                     
047232,000238: 
047233,000239:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
047234,000240:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
047235,000241:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
047236,000242:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
047237,000243: 
047238,000244: 01,3254           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
047239,000245: 01,3255           64736                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
047240,000246: 01,3256           56026                           XCH      TIME3                                 
047241,000247: 01,3257           64735                           AD       NEGMAX                                
047242,000248: 01,3260           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
047243,000249: 01,3261           00006                           EXTEND                                         #  ZERO INDEX Q.
047244,000250: 01,3262           22007                           QXCH     7                                     #  (ZQ)
047245,000251: 

Page 1114

047247,000253: 01,3263           57400        WTLST4             XCH      LST1                                  
047248,000254: 01,3264           57401                           XCH      LST1       +1                         
047249,000255: 01,3265           57402                           XCH      LST1       +2                         
047250,000256: 01,3266           57403                           XCH      LST1       +3                         
047251,000257: 01,3267           57404                           XCH      LST1       +4                         
047252,000258: 01,3270           57405                           XCH      LST1       +5                         
047253,000259: 01,3271           57406                           XCH      LST1       +6                         
047254,000260: 01,3272           57407                           XCH      LST1       +7                         
047255,000261: 
047256,000262: 01,3273           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
047257,000263: 01,3274           50002                           INDEX    Q                                     
047258,000264: 01,3275           13276                           TCF      +1                                    
047259,000265: 
047260,000266: 01,3276           53411                           DXCH     LST2                                  
047261,000267: 01,3277           53413                           DXCH     LST2       +2                         
047262,000268: 01,3300           53415                           DXCH     LST2       +4                         
047263,000269: 01,3301           53417                           DXCH     LST2       +6                         
047264,000270: 01,3302           53421                           DXCH     LST2       +8D                        
047265,000271: 01,3303           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2+10) IS STD
047266,000272: 01,3304           53425                           DXCH     LST2       +12D                       
047267,000273: 01,3305           53427                           DXCH     LST2       +14D                       
047268,000274: 01,3306           53431                           DXCH     LST2       +16D                       
047269,000275: 01,3307           65247                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
047270,000276:                                                                                                  #    THE LENGTH OF THE LIST.
047271,000277: 01,3310           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
047272,000278: 01,3311           15226                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
047273,000279: 01,3312           13366                           TCF      WTABORT                               #  IT.
047274,000280: 

Page 1115

047276,000282: 01,3313           10000        WTLST5             CCS      A                                     #  TEST  TD - T2 + 1
047277,000283: 01,3314           61401                           AD       LST1       +1                         
047278,000284: 01,3315           13321                           TCF      +4                                    
047279,000285: 01,3316           64753                           AD       ONE                                   
047280,000286: 01,3317           03377                           TC       WTLST2                                
047281,000287: 01,3320           00001                           OCT      1                                     
047282,000288: 
047283,000289: 01,3321           10000                 +4        CCS      A                                     #  TEST  TD - T3 + 1
047284,000290: 01,3322           61402                           AD       LST1       +2                         
047285,000291: 01,3323           13327                           TCF      +4                                    
047286,000292: 01,3324           64753                           AD       ONE                                   
047287,000293: 01,3325           03377                           TC       WTLST2                                
047288,000294: 01,3326           00002                           OCT      2                                     
047289,000295: 
047290,000296: 01,3327           10000                 +4        CCS      A                                     #  TEST  TD - T4 + 1
047291,000297: 01,3330           61403                           AD       LST1       +3                         
047292,000298: 01,3331           13335                           TCF      +4                                    
047293,000299: 01,3332           64753                           AD       ONE                                   
047294,000300: 01,3333           03377                           TC       WTLST2                                
047295,000301: 01,3334           00003                           OCT      3                                     
047296,000302: 
047297,000303: 01,3335           10000                 +4        CCS      A                                     #  TEST  TD - T5 + 1
047298,000304: 01,3336           61404                           AD       LST1       +4                         
047299,000305: 01,3337           13343                           TCF      +4                                    
047300,000306: 01,3340           64753                           AD       ONE                                   
047301,000307: 01,3341           03377                           TC       WTLST2                                
047302,000308: 01,3342           00004                           OCT      4                                     
047303,000309: 
047304,000310: 01,3343           10000                 +4        CCS      A                                     #  TEST  TD - T6 + 1
047305,000311: 01,3344           61405                           AD       LST1       +5                         
047306,000312: 01,3345           13351                           TCF      +4                                    
047307,000313: 01,3346           64753                           AD       ONE                                   
047308,000314: 01,3347           03377                           TC       WTLST2                                
047309,000315: 01,3350           00005                           OCT      5                                     
047310,000316: 
047311,000317: 01,3351           10000                 +4        CCS      A                                     #  TEST  TD - T7 + 1
047312,000318: 01,3352           61406                           AD       LST1       +6                         
047313,000319: 01,3353           13357                           TCF      +4                                    
047314,000320: 01,3354           64753                           AD       ONE                                   
047315,000321: 01,3355           03377                           TC       WTLST2                                
047316,000322: 01,3356           00006                           OCT      6                                     
047317,000323: 

Page 1116

047319,000325: 01,3357           10000                 +4        CCS      A                                     
047320,000326: 01,3360           61407                           AD       LST1       +7                         
047321,000327: 01,3361           13365                           TCF      +4                                    
047322,000328: 01,3362           64753                           AD       ONE                                   
047323,000329: 01,3363           03377                           TC       WTLST2                                
047324,000330: 01,3364           00007                           OCT      7                                     
047325,000331: 
047326,000332: 01,3365           10000                 +4        CCS      A                                     
047327,000333: 01,3366           03374        WTABORT            TC       FILLED                                
047328,000334: 01,3367           13370                           NOOP                                           #  CAN'T GET HERE
047329,000335: 01,3370           64753                           AD       ONE                                   
047330,000336: 01,3371           03377                           TC       WTLST2                                
047331,000337: 01,3372           00010                           OCT      10                                    
047332,000338: 
047333,000339: 01,3373           40201        OCT40201           OCT      40201                                 
047334,000340: 

Page 1117

047336,000342: 01,3374           52062        FILLED             DXCH     WAITEXIT                              
047337,000343: 01,3375           05717                           TC       BAILOUT1                              #  NO ROOM IN THE INN
047338,000344: 01,3376           31203                           OCT      31203                                 
047339,000345: 

Page 1118

047341,000347:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
047342,000348:                                                                                                  #                                                     N           N+1
047343,000349: 
047344,000350:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
047345,000351:                                                                                                  #                                                              N+1
047346,000352: 
047347,000353:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
047348,000354:                                                                                                  #                    N+1   N                                 N
047349,000355: 
047350,000356:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
047351,000357:                                                                                                  #               N+1
047352,000358: 
047353,000359: 01,3377           54064        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
047354,000360: 01,3400           50002                           INDEX    Q                                     
047355,000361: 01,3401           30000                           CAF      0                                     
047356,000362: 01,3402           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
047357,000363: 
047358,000364: 01,3403           34753                           CAF      ONE                                   
047359,000365: 01,3404           60064                           AD       WAITTEMP                              
047360,000366: 01,3405           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
047361,000367: 01,3406           27377                           ADS      LST1       -1                         #                 N
047362,000368: 
047363,000369: 01,3407           40064                           CS       WAITTEMP                              
047364,000370: 01,3410           50002                           INDEX    Q                                     
047365,000371: 01,3411           13263                           TCF      WTLST4                                
047366,000372: 
047367,000373:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
047368,000374: 
047369,000375:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
047370,000376:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
047371,000377:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
047372,000378:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
047373,000379:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
047374,000380: 
047375,000381:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
047376,000382:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
047377,000383:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
047378,000384:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
047379,000385:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
047380,000386:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
047381,000387: 

Page 1119

047383,000389:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
047384,000390: 
047385,000391: 01,3412           00006        T3RUPT             EXTEND                                         
047386,000392: 01,3413           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
047387,000393: 01,3414           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
047388,000394: 01,3415           00006                           EXTEND                                         
047389,000395: 01,3416           22012                           QXCH     QRUPT                                 
047390,000396: 
047391,000397: 01,3417           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
047392,000398: 01,3420           57407                           XCH      LST1       +7                         
047393,000399: 01,3421           57406                           XCH      LST1       +6                         
047394,000400: 01,3422           57405                           XCH      LST1       +5                         
047395,000401: 01,3423           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
047396,000402: 01,3424           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
047397,000403: 01,3425           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
047398,000404: 01,3426           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
047399,000405: 01,3427           57400                           XCH      LST1                                  
047400,000406: 01,3430           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 -T USING LIST 1.
047401,000407: 01,3431           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
047402,000408: 01,3432           54332                           TS       RUPTAGN                               
047403,000409: 01,3433           44755                           CS       ZERO                                  
047404,000410: 01,3434           54332                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
047405,000411: 
047406,000412: 01,3435           00006                           EXTEND                                         #  DISPATCH TASK.
047407,000413: 01,3436           45250                           DCS      ENDTASK                               
047408,000414: 01,3437           53431                           DXCH     LST2       +16D                       
047409,000415: 01,3440           53427                           DXCH     LST2       +14D                       
047410,000416: 01,3441           53425                           DXCH     LST2       +12D                       
047411,000417: 01,3442           53423                           DXCH     LST2       +10D                       
047412,000418: 01,3443           53421                           DXCH     LST2       +8D                        
047413,000419: 01,3444           53417                           DXCH     LST2       +6                         
047414,000420: 01,3445           53415                           DXCH     LST2       +4                         
047415,000421: 01,3446           53413                           DXCH     LST2       +2                         
047416,000422: 01,3447           53411                           DXCH     LST2                                  
047417,000423: 
047418,000424: 01,3450           56001                           XCH      L                                     
047419,000425: 01,3451           00006                           EXTEND                                         
047420,000426: 01,3452           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
047421,000427: 01,3453           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
047422,000428: 01,3454           52006                           DTCB                                           
047423,000429: 

Page 1120

047425,000431:                                                                                                  #           RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
047426,000432: 
047427,000433:    5272                                           BLOCK    02                                    
047428,000434:    5272                                           COUNT*   $$/WAIT                               
047429,000435:    5272           10332        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
047430,000436:    5273           35231                           CAF      WAITBB                                
047431,000437:    5274           54006                           TS       BBANK                                 
047432,000438:    5275           13417                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
047433,000439: 
047434,000440:    5276           30016                           CA       BANKRUPT                              
047435,000441:    5277           00006                           EXTEND                                         
047436,000442:    5300           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
047437,000443: 
047438,000444:    5301           00006        RESUME             EXTEND                                         
047439,000445:    5302           22012                           QXCH     QRUPT                                 
047440,000446:    5303           30016        NOQRSM             CA       BANKRUPT                              
047441,000447:    5304           56006                           XCH      BBANK                                 
047442,000448:    5305           52011        NOQBRSM            DXCH     ARUPT                                 
047443,000449:    5306           00003                           RELINT                                         
047444,000450:    5307           50017                           RESUME                                         
047445,000451: 

Page 1121

047447,000453:                                                                                                  #  LONGCALL
047448,000454: 
047449,000455:                                                                                                  #  PROGRAM DESCRIPTION                                  DATE- 17 MARCH 1967
047450,000456:                                                                                                  #  PROGRAM WRITTEN BY W.H. VANDEVER                    LOG SECTION WAITLIST
047451,000457:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK REV. 100
047452,000458: 
047453,000459:                                                                                                  #  FUNCTIONAL DESCRIPTION-
047454,000460:                                                                                                  #  LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
047455,000461:                                                                                                  #  IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
047456,000462:                                                                                                  #  A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
047457,000463:                                                                                                  #  START
047458,000464: 
047459,000465:                                                                                                  #  CALLING SEQUENCE-
047460,000466:                                                                                                  #                                                   EXTEND
047461,000467:                                                                                                  #                                                   DCA    TIMELOC
047462,000468:                                                                                                  #                                                   TC     LONGCALL
047463,000469:                                                                                                  #                                                   2CADR  TASKTODO
047464,000470: 
047465,000471:                                                                                                  #  NORMAL EXIT MODE-
047466,000472:                                                                                                  #     1). TC    WAITLIST
047467,000473:                                                                                                  #     2). DTCB  (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
047468,000474:                                                                                                  #     3). DTCB  (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
047469,000475: 
047470,000476:                                                                                                  #  ALARM OR ABORT EXIT MODE-
047471,000477:                                                                                                  #     NONE
047472,000478: 
047473,000479:                                                                                                  #  OUTPUT-
047474,000480:                                                                                                  #     LONGTIME AND LONGTIME+1 = DELTA TIME
047475,000481:                                                                                                  #     LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
047476,000482:                                                                                                  #     LONGCADR AND LONGCADR+1 = TASK 2CADR
047477,000483:                                                                                                  #     A = SINGLE PRECISION TIME FOR WAITLIST
047478,000484: 
047479,000485:                                                                                                  #  ERASABLE INITIALIZATION-
047480,000486:                                                                                                  #     A = MOST SIGNIFICANT PART OF DELTA TIME
047481,000487:                                                                                                  #     L = LEAST SIGNIFICANT PART OF DELTA TIME
047482,000488:                                                                                                  #     Q = ADDRESS OF 2CADR TASK VALUE
047483,000489: 
047484,000490:                                                                                                  #  DEBRIS-
047485,000491:                                                                                                  #     A,Q,L
047486,000492:                                                                                                  #     LONGCADR AND LONGCADR+1
047487,000493:                                                                                                  #     LONGEXIT AND LONGEXIT+1
047488,000494:                                                                                                  #     LONGTIME AND LONGTIME+1
047489,000495: 
047490,000496:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
047491,000497: 
047492,000498:    5310                                           BLOCK    02                                    
047493,000499:    5310  E3,1400                                  EBANK=   LST1                                  
047494,000500:    5310           53153        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
047495,000501: 
047496,000502:    5311           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1122

047498,000504:    5312           50002                           NDX      Q                                     
047499,000505:    5313           30001                           DCA      0                                     
047500,000506:    5314           53147                           DXCH     LONGCADR                              
047501,000507: 
047502,000508:    5315           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
047503,000509:    5316           35321                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
047504,000510:    5317           52006                           DTCB                                           
047505,000511: 
047506,000512:    5320  E3,1400                                  EBANK=   LST1                                  
047507,000513:    5320           03455 02063  LGCL2CDR           2CADR    LNGCALL2                              
047508,000514: 
047509,000515:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
047510,000516: 
047511,000517: 01,3455                                           BANK     01                                    
047512,000518: 01,3455                                           COUNT*   $$/WAIT                               
047513,000519: 01,3455           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
047514,000520: 01,3456           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
047515,000521: 01,3457           26002                           ADS      Q                                     
047516,000522: 01,3460           55434                           TS       LONGEXIT                              
047517,000523: 
047518,000524: 01,3461           31152                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
047519,000525: 01,3462           10000                           CCS      A                                     
047520,000526: 01,3463           13471                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
047521,000527: 01,3464           13466                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
047522,000528: 01,3465           13523                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
047523,000529: 01,3466           31153                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
047524,000530: 01,3467           00006                           EXTEND                                         
047525,000531: 01,3470           63523                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
047526,000532: 
047527,000533:                                                                                                  #           *** WAITLIST TASK LONGCYCL ***
047528,000534: 01,3471           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
047529,000535: 01,3472           43503                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
047530,000536: 01,3473           21153                           DAS      LONGTIME                              
047531,000537: 
047532,000538: 01,3474           11153                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
047533,000539: 01,3475           13513                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
047534,000540:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
047535,000541:                                                                                                  #  BASIC INSTRUCTIONS
047536,000542:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
047537,000543:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
047538,000544:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
047539,000545: 01,3476           13477                           NOOP                                           #  CAN:T GET HERE    **********
047540,000546: 01,3477           13500                           TCF      +1                                    
047541,000547: 01,3500           11152                           CCS      LONGTIME                              
047542,000548: 01,3501           13513                           TCF      MUCHTIME                              
047543,000549: 01,3502           00000        DPBIT14            OCT      00000                                 
047544,000550: 01,3503           20000                           OCT      20000                                 
047545,000551:                                                                                                  #  LONGCALL
047546,000552: 

Page 1123

047548,000554: 01,3504           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
047549,000555: 01,3505           27153                           ADS      LONGTIME   +1                         
047550,000556: 01,3506           05204                           TC       TWIDDLE                               
047551,000557: 01,3507  E3,1400                                  EBANK=   LST1                                  
047552,000558: 01,3507           03520                           ADRES    GETCADR                               
047553,000559: 01,3510           33522        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
047554,000560: 01,3511           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
047555,000561: 01,3512           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
047556,000562: 
047557,000563: 01,3513           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
047558,000564: 01,3514           05214                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
047559,000565: 01,3515  E3,1400                                  EBANK=   LST1                                  
047560,000566: 01,3515           03471 02063                     2CADR    LONGCYCL                              
047561,000567: 
047562,000568: 
047563,000569: 01,3517           13510                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
047564,000570: 
047565,000571:                                                                                                  #           *** WAITLIST TASK GETCADR ***
047566,000572: 01,3520           53147        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
047567,000573: 01,3521           15176                           TCF      SUPDXCHZ                              #  AND TRANSFER CONTROL
047568,000574: 01,3522           05272        TSKOVCDR           GENADR   TASKOVER                              
047569,000575: 01,3523           53435        LONGPOOH           DXCH     LONGEXIT                              
047570,000576: 01,3524           13526                           TCF      +2                                    
047571,000577: 01,3525           52062        WAITPOOH           DXCH     WAITEXIT                              
047572,000578: 01,3526           05727                 +2        TC       POODOO1                               
047573,000579: 01,3527           21204                           OCT      21204                                 

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