Source Code

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

The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). 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 173 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.

047064,000002:                                                                                                  ## Copyright:   Public domain.
047065,000003:                                                                                                  ## Filename:    WAITLIST.agc
047066,000004:                                                                                                  ## Purpose:     A section of Luminary revision 173.
047067,000005:                                                                                                  ##              It is part of the reconstructed source code for the second
047068,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
047069,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
047070,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
047071,000009:                                                                                                  ##              Luminary 178, as well as Luminary memo 167 (revision 1).
047072,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
047073,000011:                                                                                                  ##              exactly match those specified for Luminary 173 in NASA
047074,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
047075,000013:                                                                                                  ##              that the reconstruction is correct.
047076,000014:                                                                                                  ## Reference:   pp. 1108-1123
047077,000015:                                                                                                  ## Assembler:   yaYUL
047078,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047079,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047080,000018:                                                                                                  ## Mod history: 2019-09-18 MAS  Created from Luminary 178.
047081,000019: 

Page 1108

047083,000021:                                                                                                  #  PROGRAM DESCRIPTION                                                                     DATE - 10 OCTOBER 1966
047084,000022:                                                                                                  #  MOD NO - 2                                                                              LOG SECTION - WAITLIST
047085,000023:                                                                                                  #  MOD BY - MILLER   (DTMAX INCREASED TO 162.5 SEC)                                        ASSEMBLY SUNBURST REV 5
047086,000024:                                                                                                  #  MOD 3 BY KERNAN  (INHINT INSERTED AT WAITLIST)  2/28/68 SKIPPER REV 4
047087,000025: 
047088,000026:                                                                                                  #  MOD 4BY KERNAN (TWIDDLE IN 54)  3/28/68 SKIPPER REV 13.
047089,000027: 
047090,000028: 
047091,000029:                                                                                                  #  FUNCTIONAL DESCRIPTION-
047092,000030:                                                                                                  #          PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED  TO CALL A PROGRAM, (CALLED A TASK),
047093,000031:                                                                                                  #     WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
047094,000032:                                                                                                  #     FOLLOW.
047095,000033: 
047096,000034:                                                                                                  #                  C(TIME3)  = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
047097,000035: 
047098,000036: 
047099,000037:                                                                                                  #                               C(LST1)    = -(T2-T1)+1
047100,000038:                                                                                                  #                               C(LST1 +1) = -(T3-T2)+1
047101,000039:                                                                                                  #                               C(LST1 +2) = -(T4-T3)+1
047102,000040:                                                                                                  #                                          .
047103,000041:                                                                                                  #                                          .
047104,000042:                                                                                                  #                               C(LST1 +6) = -(T8-T7)+1
047105,000043:                                                                                                  #                               C(LST1 +7) = -(T9-T8)+1
047106,000044: 
047107,000045:                                                                                                  #                               C(LST2)    = 2CADR OF TASK1
047108,000046:                                                                                                  #                               C(LST2 +2) = 2CADR OF TASK2
047109,000047:                                                                                                  #                                          .
047110,000048:                                                                                                  #                                          .
047111,000049:                                                                                                  #                               C(LST2 +14)= 2CADR OF TASK8
047112,000050:                                                                                                  #                               C(LST2 +16)= 2CADR OF TASK9
047113,000051: 
047114,000052:                                                                                                  #  WARNINGS-
047115,000053:                                                                                                  #  --------
047116,000054:                                                                                                  #               1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
047117,000055:                                                                                                  #               2) 9 TASKS MAXIMUM
047118,000056:                                                                                                  #               3) TASKS CALLED UNDER INTERRUPT INHIBITED
047119,000057:                                                                                                  #               4) TASKS END BY TC TASKOVER
047120,000058: 
047121,000059:                                                                                                  #  CALLING SEQUENCE-
047122,000060: 
047123,000061:                                                                                                  #               L-1    CA     DELTAT   (TIME IN CENTISECONDS TO TASK START)
047124,000062:                                                                                                  #               L      TC     WAITLIST
047125,000063:                                                                                                  #               L+1    2CADR  DESIRED TASK
047126,000064:                                                                                                  #               L+2    (MINOR OF 2CADR)
047127,000065:                                                                                                  #               L+3    RELINT          (RETURNS HERE)
047128,000066: 
047129,000067:                                                                                                  #  TWIDDLE -
047130,000068:                                                                                                  #  -------
047131,000069:                                                                                                  #               TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.   IN
047132,000070:                                                                                                  #               SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1109

047134,000072:                                                                                                  #               SAVING A WORD.   TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
047135,000073: 
047136,000074:                                                                                                  #               L-1    CA     DELTAT
047137,000075:                                                                                                  #               L      TC     TWIDDLE
047138,000076:                                                                                                  #               L+1    ADRES  DESIRED TASK
047139,000077:                                                                                                  #               L+2    RELINT               (RETURNS HERE)
047140,000078: 
047141,000079:                                                                                                  #  NORMAL EXIT MODES-
047142,000080: 
047143,000081:                                                                                                  #               AT L+3 OF CALLING SEQUENCE
047144,000082: 
047145,000083:                                                                                                  #  ALARM OR ABORT EXIT MODES-
047146,000084: 
047147,000085:                                                                                                  #               TC     ABORT
047148,000086:                                                                                                  #               OCT    1203   (WAITLIST OVERFLOW - TOO MANY TASKS)
047149,000087: 
047150,000088:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
047151,000089: 
047152,000090:                                                                                                  #               ACCOMPLISHED BY FRESH START,--LST2,..., LST2 +16 =ENDTASK
047153,000091:                                                                                                  #                                             LST1,..., LST1 +7  =NEG1/2
047154,000092: 
047155,000093:                                                                                                  #  OUTPUT--
047156,000094: 
047157,000095:                                                                                                  #               LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
047158,000096: 
047159,000097:                                                                                                  #  DEBRIS-
047160,000098: 
047161,000099:                                                                                                  #               CENTRALS- A,Q,L
047162,000100:                                                                                                  #               OTHER   - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
047163,000101:                                                                                                  #  DETAILED ANALYSIS OF TIMING-
047164,000102: 
047165,000103:                                                                                                  #          CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR)   IN EXACTLY DELTA T CENTISECONDS.
047166,000104:                                                                                                  #     THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
047167,000105: 
047168,000106:                                                                                                  #               LET TO = THE TIME OF THE TC WAITLIST
047169,000107:                                                                                                  #               LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
047170,000108:                                                                                                  #               LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
047171,000109:                                                                                                  #               LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
047172,000110:                                                                                                  #               LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
047173,000111:                                                                                                  #     (Z=0, USUALLY)
047174,000112:                                                                                                  #               LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
047175,000113:                                                                                                  #            THEN   DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
047176,000114:                                                                                                  #     *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
047177,000115: 
047178,000116: 
047179,000117:                                                                                                  #          IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
047180,000118:                                                                                                  #     INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
047181,000119:                                                                                                  #     OF OTHER TASKS INHIBITING THE INTERRUPT.
047182,000120: 
047183,000121: 
047184,000122:    5204                                           BLOCK    02                                    

Page 1110

047186,000124:    5204  E3,1400                                  EBANK=   LST1                                  #  TASK  LISTS IN SWITCHED E BANK.
047187,000125: 
047188,000126:    5204                                           COUNT*   $$/WAIT                               
047189,000127:    5204           00004        TWIDDLE            INHINT                                         
047190,000128:    5205           54001                           TS       L                                     #  SAVE DELAY TIME IN L
047191,000129:    5206           34733                           CA       POSMAX                                
047192,000130:    5207           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
047193,000131:    5210           30006                           CA       BBANK                                 
047194,000132:    5211           00006                           EXTEND                                         
047195,000133:    5212           04007                           ROR      SUPERBNK                              
047196,000134:    5213           56001                           XCH      L                                     
047197,000135: 
047198,000136:    5214           00004        WAITLIST           INHINT                                         
047199,000137:    5215           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
047200,000138:    5216           54061                           TS       WAITEXIT                              #  WAITEXIT.
047201,000139:    5217           00006                           EXTEND                                         
047202,000140:    5220           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
047203,000141:    5221           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
047204,000142:    5222           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
047205,000143:    5223           35231        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
047206,000144:    5224           56006                           XCH      BBANK                                 
047207,000145:    5225           13234                           TCF      WAIT2                                 
047208,000146: 
047209,000147:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
047210,000148: 
047211,000149:    5226           52062        LVWTLIST           DXCH     WAITEXIT                              
047212,000150:    5227           64752                           AD       TWO                                   
047213,000151:    5230           52006                           DTCB                                           
047214,000152: 
047215,000153:    5231  E3,1400                                  EBANK=   LST1                                  
047216,000154:    5231           02063        WAITBB             BBCON    WAIT2                                 
047217,000155: 
047218,000156:                                                                                                  #           RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
047219,000157: 
047220,000158:    5232           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
047221,000159:    5233           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
047222,000160:    5234           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
047223,000161: 
047224,000162:                                                                                                  #           RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
047225,000163: 
047226,000164:    5235           56002        VARDELAY           XCH      Q                                     #  DT TO Q. TASK ADRES TO WAITADR.
047227,000165:    5236           54063                           TS       WAITADR                               
047228,000166:    5237           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
047229,000167:    5240           00006                           EXTEND                                         
047230,000168:    5241           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
047231,000169:    5242           54001                           TS       L                                     
047232,000170:    5243           35246                           CAF      DELAYEX                               
047233,000171:    5244           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
047234,000172:    5245           15223                           TCF      DLY2                                  
047235,000173: 

Page 1111

047237,000175:    5246           15270        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
047238,000176: 

Page 1112

047240,000178:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
047241,000179: 
047242,000180:    5247  E3,1400                                  EBANK=   LST1                                  
047243,000181:    5247           72526 73714  ENDTASK            -2CADR   SVCT3                                 
047244,000182: 
047245,000183: 
047246,000184:    5251           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
047247,000185:    5252           15272                           TCF      TASKOVER                              
047248,000186:    5253           15272                           TCF      TASKOVER                              
047249,000187:    5254           15255                           TCF      +1                                    
047250,000188: 
047251,000189:    5255           11301        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
047252,000190:    5256           15267                           TCF      SVCT3X                                #  IMUSTALL.
047253,000191:    5257           15262                           TCF      +3                                    
047254,000192:    5260           15267                           TCF      SVCT3X                                
047255,000193:    5261           15267                           TCF      SVCT3X                                
047256,000194: 
047257,000195:    5262           37726                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
047258,000196:    5263           05072                           TC       NOVAC                                 #      ENABLE EVERY 81.93 SECONDS
047259,000197:    5264  E3,1460                                  EBANK=   NBDX                                  
047260,000198:    5264           03563 14063                     2CADR    NBDONLY                               
047261,000199: 
047262,000200:    5266           15272                           TCF      TASKOVER                              
047263,000201: 
047264,000202:    5267           05232        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
047265,000203:    5270           00764                           DEC      500        B-14                       
047266,000204:    5271           05251                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
047267,000205: 

Page 1113

047269,000207:                                                                                                  #           BEGIN TASK INSERTION.
047270,000208: 
047271,000209: 01,3234                                           BANK     01                                    
047272,000210: 01,3234                                           COUNT*   $$/WAIT                               
047273,000211: 01,3234           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
047274,000212: 01,3235           30002                           CA       Q                                     
047275,000213: 01,3236           00006                           EXTEND                                         
047276,000214: 01,3237           63525                           BZMF     WAITPOOH                              
047277,000215: 
047278,000216: 01,3240           40026                           CS       TIME3                                 
047279,000217: 01,3241           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
047280,000218: 01,3242           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
047281,000219:                                                                                                  #                                        IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
047282,000220:                                                                                                  #                                        C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
047283,000221:                                                                                                  #                                        ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
047284,000222: 
047285,000223: 01,3243           66112                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
047286,000224: 01,3244           40000                           CS       A                                     #  T - T1 + 1.0 - 201
047287,000225: 
047288,000226:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
047289,000227: 
047290,000228: 01,3245           63373                           AD       OCT40201                              
047291,000229: 01,3246           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
047292,000230: 
047293,000231: 01,3247           10000                           CCS      A                                     #  TEST TD - T1 + 1
047294,000232: 
047295,000233: 01,3250           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
047296,000234: 01,3251           13313                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
047297,000235: 
047298,000236: 01,3252           13253                           NOOP                                           
047299,000237: 01,3253           40002                           CS       Q                                     
047300,000238: 
047301,000239:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
047302,000240:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
047303,000241:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
047304,000242:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
047305,000243: 
047306,000244: 01,3254           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
047307,000245: 01,3255           64736                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
047308,000246: 01,3256           56026                           XCH      TIME3                                 
047309,000247: 01,3257           64735                           AD       NEGMAX                                
047310,000248: 01,3260           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
047311,000249: 01,3261           00006                           EXTEND                                         #  ZERO INDEX Q.
047312,000250: 01,3262           22007                           QXCH     7                                     #  (ZQ)
047313,000251: 

Page 1114

047315,000253: 01,3263           57400        WTLST4             XCH      LST1                                  
047316,000254: 01,3264           57401                           XCH      LST1       +1                         
047317,000255: 01,3265           57402                           XCH      LST1       +2                         
047318,000256: 01,3266           57403                           XCH      LST1       +3                         
047319,000257: 01,3267           57404                           XCH      LST1       +4                         
047320,000258: 01,3270           57405                           XCH      LST1       +5                         
047321,000259: 01,3271           57406                           XCH      LST1       +6                         
047322,000260: 01,3272           57407                           XCH      LST1       +7                         
047323,000261: 
047324,000262: 01,3273           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
047325,000263: 01,3274           50002                           INDEX    Q                                     
047326,000264: 01,3275           13276                           TCF      +1                                    
047327,000265: 
047328,000266: 01,3276           53411                           DXCH     LST2                                  
047329,000267: 01,3277           53413                           DXCH     LST2       +2                         
047330,000268: 01,3300           53415                           DXCH     LST2       +4                         
047331,000269: 01,3301           53417                           DXCH     LST2       +6                         
047332,000270: 01,3302           53421                           DXCH     LST2       +8D                        
047333,000271: 01,3303           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2+10) IS STD
047334,000272: 01,3304           53425                           DXCH     LST2       +12D                       
047335,000273: 01,3305           53427                           DXCH     LST2       +14D                       
047336,000274: 01,3306           53431                           DXCH     LST2       +16D                       
047337,000275: 01,3307           65247                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
047338,000276:                                                                                                  #    THE LENGTH OF THE LIST.
047339,000277: 01,3310           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
047340,000278: 01,3311           15226                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
047341,000279: 01,3312           13366                           TCF      WTABORT                               #  IT.
047342,000280: 

Page 1115

047344,000282: 01,3313           10000        WTLST5             CCS      A                                     #  TEST  TD - T2 + 1
047345,000283: 01,3314           61401                           AD       LST1       +1                         
047346,000284: 01,3315           13321                           TCF      +4                                    
047347,000285: 01,3316           64753                           AD       ONE                                   
047348,000286: 01,3317           03377                           TC       WTLST2                                
047349,000287: 01,3320           00001                           OCT      1                                     
047350,000288: 
047351,000289: 01,3321           10000                 +4        CCS      A                                     #  TEST  TD - T3 + 1
047352,000290: 01,3322           61402                           AD       LST1       +2                         
047353,000291: 01,3323           13327                           TCF      +4                                    
047354,000292: 01,3324           64753                           AD       ONE                                   
047355,000293: 01,3325           03377                           TC       WTLST2                                
047356,000294: 01,3326           00002                           OCT      2                                     
047357,000295: 
047358,000296: 01,3327           10000                 +4        CCS      A                                     #  TEST  TD - T4 + 1
047359,000297: 01,3330           61403                           AD       LST1       +3                         
047360,000298: 01,3331           13335                           TCF      +4                                    
047361,000299: 01,3332           64753                           AD       ONE                                   
047362,000300: 01,3333           03377                           TC       WTLST2                                
047363,000301: 01,3334           00003                           OCT      3                                     
047364,000302: 
047365,000303: 01,3335           10000                 +4        CCS      A                                     #  TEST  TD - T5 + 1
047366,000304: 01,3336           61404                           AD       LST1       +4                         
047367,000305: 01,3337           13343                           TCF      +4                                    
047368,000306: 01,3340           64753                           AD       ONE                                   
047369,000307: 01,3341           03377                           TC       WTLST2                                
047370,000308: 01,3342           00004                           OCT      4                                     
047371,000309: 
047372,000310: 01,3343           10000                 +4        CCS      A                                     #  TEST  TD - T6 + 1
047373,000311: 01,3344           61405                           AD       LST1       +5                         
047374,000312: 01,3345           13351                           TCF      +4                                    
047375,000313: 01,3346           64753                           AD       ONE                                   
047376,000314: 01,3347           03377                           TC       WTLST2                                
047377,000315: 01,3350           00005                           OCT      5                                     
047378,000316: 
047379,000317: 01,3351           10000                 +4        CCS      A                                     #  TEST  TD - T7 + 1
047380,000318: 01,3352           61406                           AD       LST1       +6                         
047381,000319: 01,3353           13357                           TCF      +4                                    
047382,000320: 01,3354           64753                           AD       ONE                                   
047383,000321: 01,3355           03377                           TC       WTLST2                                
047384,000322: 01,3356           00006                           OCT      6                                     
047385,000323: 

Page 1116

047387,000325: 01,3357           10000                 +4        CCS      A                                     
047388,000326: 01,3360           61407                           AD       LST1       +7                         
047389,000327: 01,3361           13365                           TCF      +4                                    
047390,000328: 01,3362           64753                           AD       ONE                                   
047391,000329: 01,3363           03377                           TC       WTLST2                                
047392,000330: 01,3364           00007                           OCT      7                                     
047393,000331: 
047394,000332: 01,3365           10000                 +4        CCS      A                                     
047395,000333: 01,3366           03374        WTABORT            TC       FILLED                                
047396,000334: 01,3367           13370                           NOOP                                           #  CAN'T GET HERE
047397,000335: 01,3370           64753                           AD       ONE                                   
047398,000336: 01,3371           03377                           TC       WTLST2                                
047399,000337: 01,3372           00010                           OCT      10                                    
047400,000338: 
047401,000339: 01,3373           40201        OCT40201           OCT      40201                                 
047402,000340: 

Page 1117

047404,000342: 01,3374           52062        FILLED             DXCH     WAITEXIT                              
047405,000343: 01,3375           05717                           TC       BAILOUT1                              #  NO ROOM IN THE INN
047406,000344: 01,3376           31203                           OCT      31203                                 
047407,000345: 

Page 1118

047409,000347:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
047410,000348:                                                                                                  #                                                     N           N+1
047411,000349: 
047412,000350:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
047413,000351:                                                                                                  #                                                              N+1
047414,000352: 
047415,000353:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
047416,000354:                                                                                                  #                    N+1   N                                 N
047417,000355: 
047418,000356:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
047419,000357:                                                                                                  #               N+1
047420,000358: 
047421,000359: 01,3377           54064        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
047422,000360: 01,3400           50002                           INDEX    Q                                     
047423,000361: 01,3401           30000                           CAF      0                                     
047424,000362: 01,3402           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
047425,000363: 
047426,000364: 01,3403           34753                           CAF      ONE                                   
047427,000365: 01,3404           60064                           AD       WAITTEMP                              
047428,000366: 01,3405           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
047429,000367: 01,3406           27377                           ADS      LST1       -1                         #                 N
047430,000368: 
047431,000369: 01,3407           40064                           CS       WAITTEMP                              
047432,000370: 01,3410           50002                           INDEX    Q                                     
047433,000371: 01,3411           13263                           TCF      WTLST4                                
047434,000372: 
047435,000373:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
047436,000374: 
047437,000375:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
047438,000376:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
047439,000377:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
047440,000378:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
047441,000379:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
047442,000380: 
047443,000381:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
047444,000382:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
047445,000383:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
047446,000384:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
047447,000385:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
047448,000386:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
047449,000387: 

Page 1119

047451,000389:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
047452,000390: 
047453,000391: 01,3412           00006        T3RUPT             EXTEND                                         
047454,000392: 01,3413           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
047455,000393: 01,3414           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
047456,000394: 01,3415           00006                           EXTEND                                         
047457,000395: 01,3416           22012                           QXCH     QRUPT                                 
047458,000396: 
047459,000397: 01,3417           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
047460,000398: 01,3420           57407                           XCH      LST1       +7                         
047461,000399: 01,3421           57406                           XCH      LST1       +6                         
047462,000400: 01,3422           57405                           XCH      LST1       +5                         
047463,000401: 01,3423           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
047464,000402: 01,3424           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
047465,000403: 01,3425           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
047466,000404: 01,3426           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
047467,000405: 01,3427           57400                           XCH      LST1                                  
047468,000406: 01,3430           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 -T USING LIST 1.
047469,000407: 01,3431           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
047470,000408: 01,3432           54332                           TS       RUPTAGN                               
047471,000409: 01,3433           44755                           CS       ZERO                                  
047472,000410: 01,3434           54332                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
047473,000411: 
047474,000412: 01,3435           00006                           EXTEND                                         #  DISPATCH TASK.
047475,000413: 01,3436           45250                           DCS      ENDTASK                               
047476,000414: 01,3437           53431                           DXCH     LST2       +16D                       
047477,000415: 01,3440           53427                           DXCH     LST2       +14D                       
047478,000416: 01,3441           53425                           DXCH     LST2       +12D                       
047479,000417: 01,3442           53423                           DXCH     LST2       +10D                       
047480,000418: 01,3443           53421                           DXCH     LST2       +8D                        
047481,000419: 01,3444           53417                           DXCH     LST2       +6                         
047482,000420: 01,3445           53415                           DXCH     LST2       +4                         
047483,000421: 01,3446           53413                           DXCH     LST2       +2                         
047484,000422: 01,3447           53411                           DXCH     LST2                                  
047485,000423: 
047486,000424: 01,3450           56001                           XCH      L                                     
047487,000425: 01,3451           00006                           EXTEND                                         
047488,000426: 01,3452           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
047489,000427: 01,3453           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
047490,000428: 01,3454           52006                           DTCB                                           
047491,000429: 

Page 1120

047493,000431:                                                                                                  #           RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
047494,000432: 
047495,000433:    5272                                           BLOCK    02                                    
047496,000434:    5272                                           COUNT*   $$/WAIT                               
047497,000435:    5272           10332        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
047498,000436:    5273           35231                           CAF      WAITBB                                
047499,000437:    5274           54006                           TS       BBANK                                 
047500,000438:    5275           13417                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
047501,000439: 
047502,000440:    5276           30016                           CA       BANKRUPT                              
047503,000441:    5277           00006                           EXTEND                                         
047504,000442:    5300           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
047505,000443: 
047506,000444:    5301           00006        RESUME             EXTEND                                         
047507,000445:    5302           22012                           QXCH     QRUPT                                 
047508,000446:    5303           30016        NOQRSM             CA       BANKRUPT                              
047509,000447:    5304           56006                           XCH      BBANK                                 
047510,000448:    5305           52011        NOQBRSM            DXCH     ARUPT                                 
047511,000449:    5306           00003                           RELINT                                         
047512,000450:    5307           50017                           RESUME                                         
047513,000451: 

Page 1121

047515,000453:                                                                                                  #  LONGCALL
047516,000454: 
047517,000455:                                                                                                  #  PROGRAM DESCRIPTION                                  DATE- 17 MARCH 1967
047518,000456:                                                                                                  #  PROGRAM WRITTEN BY W.H. VANDEVER                    LOG SECTION WAITLIST
047519,000457:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK REV. 100
047520,000458: 
047521,000459:                                                                                                  #  FUNCTIONAL DESCRIPTION-
047522,000460:                                                                                                  #  LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
047523,000461:                                                                                                  #  IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
047524,000462:                                                                                                  #  A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
047525,000463:                                                                                                  #  START
047526,000464: 
047527,000465:                                                                                                  #  CALLING SEQUENCE-
047528,000466:                                                                                                  #                                                   EXTEND
047529,000467:                                                                                                  #                                                   DCA    TIMELOC
047530,000468:                                                                                                  #                                                   TC     LONGCALL
047531,000469:                                                                                                  #                                                   2CADR  TASKTODO
047532,000470: 
047533,000471:                                                                                                  #  NORMAL EXIT MODE-
047534,000472:                                                                                                  #     1). TC    WAITLIST
047535,000473:                                                                                                  #     2). DTCB  (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
047536,000474:                                                                                                  #     3). DTCB  (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
047537,000475: 
047538,000476:                                                                                                  #  ALARM OR ABORT EXIT MODE-
047539,000477:                                                                                                  #     NONE
047540,000478: 
047541,000479:                                                                                                  #  OUTPUT-
047542,000480:                                                                                                  #     LONGTIME AND LONGTIME+1 = DELTA TIME
047543,000481:                                                                                                  #     LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
047544,000482:                                                                                                  #     LONGCADR AND LONGCADR+1 = TASK 2CADR
047545,000483:                                                                                                  #     A = SINGLE PRECISION TIME FOR WAITLIST
047546,000484: 
047547,000485:                                                                                                  #  ERASABLE INITIALIZATION-
047548,000486:                                                                                                  #     A = MOST SIGNIFICANT PART OF DELTA TIME
047549,000487:                                                                                                  #     L = LEAST SIGNIFICANT PART OF DELTA TIME
047550,000488:                                                                                                  #     Q = ADDRESS OF 2CADR TASK VALUE
047551,000489: 
047552,000490:                                                                                                  #  DEBRIS-
047553,000491:                                                                                                  #     A,Q,L
047554,000492:                                                                                                  #     LONGCADR AND LONGCADR+1
047555,000493:                                                                                                  #     LONGEXIT AND LONGEXIT+1
047556,000494:                                                                                                  #     LONGTIME AND LONGTIME+1
047557,000495: 
047558,000496:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
047559,000497: 
047560,000498:    5310                                           BLOCK    02                                    
047561,000499:    5310  E3,1400                                  EBANK=   LST1                                  
047562,000500:    5310           53153        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
047563,000501: 
047564,000502:    5311           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1122

047566,000504:    5312           50002                           NDX      Q                                     
047567,000505:    5313           30001                           DCA      0                                     
047568,000506:    5314           53147                           DXCH     LONGCADR                              
047569,000507: 
047570,000508:    5315           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
047571,000509:    5316           35321                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
047572,000510:    5317           52006                           DTCB                                           
047573,000511: 
047574,000512:    5320  E3,1400                                  EBANK=   LST1                                  
047575,000513:    5320           03455 02063  LGCL2CDR           2CADR    LNGCALL2                              
047576,000514: 
047577,000515:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
047578,000516: 
047579,000517: 01,3455                                           BANK     01                                    
047580,000518: 01,3455                                           COUNT*   $$/WAIT                               
047581,000519: 01,3455           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
047582,000520: 01,3456           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
047583,000521: 01,3457           26002                           ADS      Q                                     
047584,000522: 01,3460           55434                           TS       LONGEXIT                              
047585,000523: 
047586,000524: 01,3461           31152                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
047587,000525: 01,3462           10000                           CCS      A                                     
047588,000526: 01,3463           13471                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
047589,000527: 01,3464           13466                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
047590,000528: 01,3465           13523                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
047591,000529: 01,3466           31153                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
047592,000530: 01,3467           00006                           EXTEND                                         
047593,000531: 01,3470           63523                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
047594,000532: 
047595,000533:                                                                                                  #           *** WAITLIST TASK LONGCYCL ***
047596,000534: 01,3471           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
047597,000535: 01,3472           43503                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
047598,000536: 01,3473           21153                           DAS      LONGTIME                              
047599,000537: 
047600,000538: 01,3474           11153                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
047601,000539: 01,3475           13513                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
047602,000540:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
047603,000541:                                                                                                  #  BASIC INSTRUCTIONS
047604,000542:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
047605,000543:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
047606,000544:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
047607,000545: 01,3476           13477                           NOOP                                           #  CAN:T GET HERE    **********
047608,000546: 01,3477           13500                           TCF      +1                                    
047609,000547: 01,3500           11152                           CCS      LONGTIME                              
047610,000548: 01,3501           13513                           TCF      MUCHTIME                              
047611,000549: 01,3502           00000        DPBIT14            OCT      00000                                 
047612,000550: 01,3503           20000                           OCT      20000                                 
047613,000551:                                                                                                  #  LONGCALL
047614,000552: 

Page 1123

047616,000554: 01,3504           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
047617,000555: 01,3505           27153                           ADS      LONGTIME   +1                         
047618,000556: 01,3506           05204                           TC       TWIDDLE                               
047619,000557: 01,3507  E3,1400                                  EBANK=   LST1                                  
047620,000558: 01,3507           03520                           ADRES    GETCADR                               
047621,000559: 01,3510           33522        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
047622,000560: 01,3511           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
047623,000561: 01,3512           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
047624,000562: 
047625,000563: 01,3513           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
047626,000564: 01,3514           05214                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
047627,000565: 01,3515  E3,1400                                  EBANK=   LST1                                  
047628,000566: 01,3515           03471 02063                     2CADR    LONGCYCL                              
047629,000567: 
047630,000568: 
047631,000569: 01,3517           13510                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
047632,000570: 
047633,000571:                                                                                                  #           *** WAITLIST TASK GETCADR ***
047634,000572: 01,3520           53147        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
047635,000573: 01,3521           15176                           TCF      SUPDXCHZ                              #  AND TRANSFER CONTROL
047636,000574: 01,3522           05272        TSKOVCDR           GENADR   TASKOVER                              
047637,000575: 01,3523           53435        LONGPOOH           DXCH     LONGEXIT                              
047638,000576: 01,3524           13526                           TCF      +2                                    
047639,000577: 01,3525           52062        WAITPOOH           DXCH     WAITEXIT                              
047640,000578: 01,3526           05727                 +2        TC       POODOO1                               
047641,000579: 01,3527           21204                           OCT      21204                                 

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