Source Code

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

The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. 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 178 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.

047157,000002:                                                                                                  ## Copyright:   Public domain.
047158,000003:                                                                                                  ## Filename:    WAITLIST.agc
047159,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
047160,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
047161,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
047162,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
047163,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
047164,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
047165,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
047166,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
047167,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
047168,000013:                                                                                                  ##              that the reconstruction is correct.
047169,000014:                                                                                                  ## Reference:   pp. 1108-1123
047170,000015:                                                                                                  ## Assembler:   yaYUL
047171,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047172,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047173,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
047174,000019: 

Page 1108

047176,000021:                                                                                                  #  PROGRAM DESCRIPTION                                                                     DATE - 10 OCTOBER 1966
047177,000022:                                                                                                  #  MOD NO - 2                                                                              LOG SECTION - WAITLIST
047178,000023:                                                                                                  #  MOD BY - MILLER   (DTMAX INCREASED TO 162.5 SEC)                                        ASSEMBLY SUNBURST REV 5
047179,000024:                                                                                                  #  MOD 3 BY KERNAN  (INHINT INSERTED AT WAITLIST)  2/28/68 SKIPPER REV 4
047180,000025: 
047181,000026:                                                                                                  #  MOD 4BY KERNAN (TWIDDLE IN 54)  3/28/68 SKIPPER REV 13.
047182,000027: 
047183,000028: 
047184,000029:                                                                                                  #  FUNCTIONAL DESCRIPTION-
047185,000030:                                                                                                  #          PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED  TO CALL A PROGRAM, (CALLED A TASK),
047186,000031:                                                                                                  #     WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
047187,000032:                                                                                                  #     FOLLOW.
047188,000033: 
047189,000034:                                                                                                  #                  C(TIME3)  = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
047190,000035: 
047191,000036: 
047192,000037:                                                                                                  #                               C(LST1)    = -(T2-T1)+1
047193,000038:                                                                                                  #                               C(LST1 +1) = -(T3-T2)+1
047194,000039:                                                                                                  #                               C(LST1 +2) = -(T4-T3)+1
047195,000040:                                                                                                  #                                          .
047196,000041:                                                                                                  #                                          .
047197,000042:                                                                                                  #                               C(LST1 +6) = -(T8-T7)+1
047198,000043:                                                                                                  #                               C(LST1 +7) = -(T9-T8)+1
047199,000044: 
047200,000045:                                                                                                  #                               C(LST2)    = 2CADR OF TASK1
047201,000046:                                                                                                  #                               C(LST2 +2) = 2CADR OF TASK2
047202,000047:                                                                                                  #                                          .
047203,000048:                                                                                                  #                                          .
047204,000049:                                                                                                  #                               C(LST2 +14)= 2CADR OF TASK8
047205,000050:                                                                                                  #                               C(LST2 +16)= 2CADR OF TASK9
047206,000051: 
047207,000052:                                                                                                  #  WARNINGS-
047208,000053:                                                                                                  #  --------
047209,000054:                                                                                                  #               1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
047210,000055:                                                                                                  #               2) 9 TASKS MAXIMUM
047211,000056:                                                                                                  #               3) TASKS CALLED UNDER INTERRUPT INHIBITED
047212,000057:                                                                                                  #               4) TASKS END BY TC TASKOVER
047213,000058: 
047214,000059:                                                                                                  #  CALLING SEQUENCE-
047215,000060: 
047216,000061:                                                                                                  #               L-1    CA     DELTAT   (TIME IN CENTISECONDS TO TASK START)
047217,000062:                                                                                                  #               L      TC     WAITLIST
047218,000063:                                                                                                  #               L+1    2CADR  DESIRED TASK
047219,000064:                                                                                                  #               L+2    (MINOR OF 2CADR)
047220,000065:                                                                                                  #               L+3    RELINT          (RETURNS HERE)
047221,000066: 
047222,000067:                                                                                                  #  TWIDDLE -
047223,000068:                                                                                                  #  -------
047224,000069:                                                                                                  #               TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.   IN
047225,000070:                                                                                                  #               SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1109

047227,000072:                                                                                                  #               SAVING A WORD.   TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
047228,000073: 
047229,000074:                                                                                                  #               L-1    CA     DELTAT
047230,000075:                                                                                                  #               L      TC     TWIDDLE
047231,000076:                                                                                                  #               L+1    ADRES  DESIRED TASK
047232,000077:                                                                                                  #               L+2    RELINT               (RETURNS HERE)
047233,000078: 
047234,000079:                                                                                                  #  NORMAL EXIT MODES-
047235,000080: 
047236,000081:                                                                                                  #               AT L+3 OF CALLING SEQUENCE
047237,000082: 
047238,000083:                                                                                                  #  ALARM OR ABORT EXIT MODES-
047239,000084: 
047240,000085:                                                                                                  #               TC     ABORT
047241,000086:                                                                                                  #               OCT    1203   (WAITLIST OVERFLOW - TOO MANY TASKS)
047242,000087: 
047243,000088:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
047244,000089: 
047245,000090:                                                                                                  #               ACCOMPLISHED BY FRESH START,--LST2,..., LST2 +16 =ENDTASK
047246,000091:                                                                                                  #                                             LST1,..., LST1 +7  =NEG1/2
047247,000092: 
047248,000093:                                                                                                  #  OUTPUT--
047249,000094: 
047250,000095:                                                                                                  #               LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
047251,000096: 
047252,000097:                                                                                                  #  DEBRIS-
047253,000098: 
047254,000099:                                                                                                  #               CENTRALS- A,Q,L
047255,000100:                                                                                                  #               OTHER   - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
047256,000101:                                                                                                  #  DETAILED ANALYSIS OF TIMING-
047257,000102: 
047258,000103:                                                                                                  #          CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR)   IN EXACTLY DELTA T CENTISECONDS.
047259,000104:                                                                                                  #     THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
047260,000105: 
047261,000106:                                                                                                  #               LET TO = THE TIME OF THE TC WAITLIST
047262,000107:                                                                                                  #               LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
047263,000108:                                                                                                  #               LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
047264,000109:                                                                                                  #               LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
047265,000110:                                                                                                  #               LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
047266,000111:                                                                                                  #     (Z=0, USUALLY)
047267,000112:                                                                                                  #               LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
047268,000113:                                                                                                  #            THEN   DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
047269,000114:                                                                                                  #     *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
047270,000115: 
047271,000116: 
047272,000117:                                                                                                  #          IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
047273,000118:                                                                                                  #     INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
047274,000119:                                                                                                  #     OF OTHER TASKS INHIBITING THE INTERRUPT.
047275,000120: 
047276,000121: 
047277,000122:    5204                                           BLOCK    02                                    

Page 1110

047279,000124:    5204  E3,1400                                  EBANK=   LST1                                  #  TASK  LISTS IN SWITCHED E BANK.
047280,000125: 
047281,000126:    5204                                           COUNT*   $$/WAIT                               
047282,000127:    5204           00004        TWIDDLE            INHINT                                         
047283,000128:    5205           54001                           TS       L                                     #  SAVE DELAY TIME IN L
047284,000129:    5206           34733                           CA       POSMAX                                
047285,000130:    5207           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
047286,000131:    5210           30006                           CA       BBANK                                 
047287,000132:    5211           00006                           EXTEND                                         
047288,000133:    5212           04007                           ROR      SUPERBNK                              
047289,000134:    5213           56001                           XCH      L                                     
047290,000135: 
047291,000136:    5214           00004        WAITLIST           INHINT                                         
047292,000137:    5215           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
047293,000138:    5216           54061                           TS       WAITEXIT                              #  WAITEXIT.
047294,000139:    5217           00006                           EXTEND                                         
047295,000140:    5220           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
047296,000141:    5221           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
047297,000142:    5222           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
047298,000143:    5223           35231        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
047299,000144:    5224           56006                           XCH      BBANK                                 
047300,000145:    5225           13234                           TCF      WAIT2                                 
047301,000146: 
047302,000147:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
047303,000148: 
047304,000149:    5226           52062        LVWTLIST           DXCH     WAITEXIT                              
047305,000150:    5227           64752                           AD       TWO                                   
047306,000151:    5230           52006                           DTCB                                           
047307,000152: 
047308,000153:    5231  E3,1400                                  EBANK=   LST1                                  
047309,000154:    5231           02063        WAITBB             BBCON    WAIT2                                 
047310,000155: 
047311,000156:                                                                                                  #           RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
047312,000157: 
047313,000158:    5232           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
047314,000159:    5233           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
047315,000160:    5234           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
047316,000161: 
047317,000162:                                                                                                  #           RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
047318,000163: 
047319,000164:    5235           56002        VARDELAY           XCH      Q                                     #  DT TO Q. TASK ADRES TO WAITADR.
047320,000165:    5236           54063                           TS       WAITADR                               
047321,000166:    5237           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
047322,000167:    5240           00006                           EXTEND                                         
047323,000168:    5241           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
047324,000169:    5242           54001                           TS       L                                     
047325,000170:    5243           35246                           CAF      DELAYEX                               
047326,000171:    5244           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
047327,000172:    5245           15223                           TCF      DLY2                                  
047328,000173: 

Page 1111

047330,000175:    5246           15270        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
047331,000176: 

Page 1112

047333,000178:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
047334,000179: 
047335,000180:    5247  E3,1400                                  EBANK=   LST1                                  
047336,000181:    5247           72526 73714  ENDTASK            -2CADR   SVCT3                                 
047337,000182: 
047338,000183: 
047339,000184:    5251           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
047340,000185:    5252           15272                           TCF      TASKOVER                              
047341,000186:    5253           15272                           TCF      TASKOVER                              
047342,000187:    5254           15255                           TCF      +1                                    
047343,000188: 
047344,000189:    5255           11301        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
047345,000190:    5256           15267                           TCF      SVCT3X                                #  IMUSTALL.
047346,000191:    5257           15262                           TCF      +3                                    
047347,000192:    5260           15267                           TCF      SVCT3X                                
047348,000193:    5261           15267                           TCF      SVCT3X                                
047349,000194: 
047350,000195:    5262           37726                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
047351,000196:    5263           05072                           TC       NOVAC                                 #      ENABLE EVERY 81.93 SECONDS
047352,000197:    5264  E3,1460                                  EBANK=   NBDX                                  
047353,000198:    5264           03563 14063                     2CADR    NBDONLY                               
047354,000199: 
047355,000200:    5266           15272                           TCF      TASKOVER                              
047356,000201: 
047357,000202:    5267           05232        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
047358,000203:    5270           00764                           DEC      500        B-14                       
047359,000204:    5271           05251                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
047360,000205: 

Page 1113

047362,000207:                                                                                                  #           BEGIN TASK INSERTION.
047363,000208: 
047364,000209: 01,3234                                           BANK     01                                    
047365,000210: 01,3234                                           COUNT*   $$/WAIT                               
047366,000211: 01,3234           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
047367,000212: 01,3235           30002                           CA       Q                                     
047368,000213: 01,3236           00006                           EXTEND                                         
047369,000214: 01,3237           63525                           BZMF     WAITPOOH                              
047370,000215: 
047371,000216: 01,3240           40026                           CS       TIME3                                 
047372,000217: 01,3241           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
047373,000218: 01,3242           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
047374,000219:                                                                                                  #                                        IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
047375,000220:                                                                                                  #                                        C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
047376,000221:                                                                                                  #                                        ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
047377,000222: 
047378,000223: 01,3243           66112                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
047379,000224: 01,3244           40000                           CS       A                                     #  T - T1 + 1.0 - 201
047380,000225: 
047381,000226:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
047382,000227: 
047383,000228: 01,3245           63373                           AD       OCT40201                              
047384,000229: 01,3246           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
047385,000230: 
047386,000231: 01,3247           10000                           CCS      A                                     #  TEST TD - T1 + 1
047387,000232: 
047388,000233: 01,3250           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
047389,000234: 01,3251           13313                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
047390,000235: 
047391,000236: 01,3252           13253                           NOOP                                           
047392,000237: 01,3253           40002                           CS       Q                                     
047393,000238: 
047394,000239:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
047395,000240:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
047396,000241:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
047397,000242:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
047398,000243: 
047399,000244: 01,3254           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
047400,000245: 01,3255           64736                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
047401,000246: 01,3256           56026                           XCH      TIME3                                 
047402,000247: 01,3257           64735                           AD       NEGMAX                                
047403,000248: 01,3260           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
047404,000249: 01,3261           00006                           EXTEND                                         #  ZERO INDEX Q.
047405,000250: 01,3262           22007                           QXCH     7                                     #  (ZQ)
047406,000251: 

Page 1114

047408,000253: 01,3263           57400        WTLST4             XCH      LST1                                  
047409,000254: 01,3264           57401                           XCH      LST1       +1                         
047410,000255: 01,3265           57402                           XCH      LST1       +2                         
047411,000256: 01,3266           57403                           XCH      LST1       +3                         
047412,000257: 01,3267           57404                           XCH      LST1       +4                         
047413,000258: 01,3270           57405                           XCH      LST1       +5                         
047414,000259: 01,3271           57406                           XCH      LST1       +6                         
047415,000260: 01,3272           57407                           XCH      LST1       +7                         
047416,000261: 
047417,000262: 01,3273           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
047418,000263: 01,3274           50002                           INDEX    Q                                     
047419,000264: 01,3275           13276                           TCF      +1                                    
047420,000265: 
047421,000266: 01,3276           53411                           DXCH     LST2                                  
047422,000267: 01,3277           53413                           DXCH     LST2       +2                         
047423,000268: 01,3300           53415                           DXCH     LST2       +4                         
047424,000269: 01,3301           53417                           DXCH     LST2       +6                         
047425,000270: 01,3302           53421                           DXCH     LST2       +8D                        
047426,000271: 01,3303           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2+10) IS STD
047427,000272: 01,3304           53425                           DXCH     LST2       +12D                       
047428,000273: 01,3305           53427                           DXCH     LST2       +14D                       
047429,000274: 01,3306           53431                           DXCH     LST2       +16D                       
047430,000275: 01,3307           65247                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
047431,000276:                                                                                                  #    THE LENGTH OF THE LIST.
047432,000277: 01,3310           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
047433,000278: 01,3311           15226                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
047434,000279: 01,3312           13366                           TCF      WTABORT                               #  IT.
047435,000280: 

Page 1115

047437,000282: 01,3313           10000        WTLST5             CCS      A                                     #  TEST  TD - T2 + 1
047438,000283: 01,3314           61401                           AD       LST1       +1                         
047439,000284: 01,3315           13321                           TCF      +4                                    
047440,000285: 01,3316           64753                           AD       ONE                                   
047441,000286: 01,3317           03377                           TC       WTLST2                                
047442,000287: 01,3320           00001                           OCT      1                                     
047443,000288: 
047444,000289: 01,3321           10000                 +4        CCS      A                                     #  TEST  TD - T3 + 1
047445,000290: 01,3322           61402                           AD       LST1       +2                         
047446,000291: 01,3323           13327                           TCF      +4                                    
047447,000292: 01,3324           64753                           AD       ONE                                   
047448,000293: 01,3325           03377                           TC       WTLST2                                
047449,000294: 01,3326           00002                           OCT      2                                     
047450,000295: 
047451,000296: 01,3327           10000                 +4        CCS      A                                     #  TEST  TD - T4 + 1
047452,000297: 01,3330           61403                           AD       LST1       +3                         
047453,000298: 01,3331           13335                           TCF      +4                                    
047454,000299: 01,3332           64753                           AD       ONE                                   
047455,000300: 01,3333           03377                           TC       WTLST2                                
047456,000301: 01,3334           00003                           OCT      3                                     
047457,000302: 
047458,000303: 01,3335           10000                 +4        CCS      A                                     #  TEST  TD - T5 + 1
047459,000304: 01,3336           61404                           AD       LST1       +4                         
047460,000305: 01,3337           13343                           TCF      +4                                    
047461,000306: 01,3340           64753                           AD       ONE                                   
047462,000307: 01,3341           03377                           TC       WTLST2                                
047463,000308: 01,3342           00004                           OCT      4                                     
047464,000309: 
047465,000310: 01,3343           10000                 +4        CCS      A                                     #  TEST  TD - T6 + 1
047466,000311: 01,3344           61405                           AD       LST1       +5                         
047467,000312: 01,3345           13351                           TCF      +4                                    
047468,000313: 01,3346           64753                           AD       ONE                                   
047469,000314: 01,3347           03377                           TC       WTLST2                                
047470,000315: 01,3350           00005                           OCT      5                                     
047471,000316: 
047472,000317: 01,3351           10000                 +4        CCS      A                                     #  TEST  TD - T7 + 1
047473,000318: 01,3352           61406                           AD       LST1       +6                         
047474,000319: 01,3353           13357                           TCF      +4                                    
047475,000320: 01,3354           64753                           AD       ONE                                   
047476,000321: 01,3355           03377                           TC       WTLST2                                
047477,000322: 01,3356           00006                           OCT      6                                     
047478,000323: 

Page 1116

047480,000325: 01,3357           10000                 +4        CCS      A                                     
047481,000326: 01,3360           61407                           AD       LST1       +7                         
047482,000327: 01,3361           13365                           TCF      +4                                    
047483,000328: 01,3362           64753                           AD       ONE                                   
047484,000329: 01,3363           03377                           TC       WTLST2                                
047485,000330: 01,3364           00007                           OCT      7                                     
047486,000331: 
047487,000332: 01,3365           10000                 +4        CCS      A                                     
047488,000333: 01,3366           03374        WTABORT            TC       FILLED                                
047489,000334: 01,3367           13370                           NOOP                                           #  CAN'T GET HERE
047490,000335: 01,3370           64753                           AD       ONE                                   
047491,000336: 01,3371           03377                           TC       WTLST2                                
047492,000337: 01,3372           00010                           OCT      10                                    
047493,000338: 
047494,000339: 01,3373           40201        OCT40201           OCT      40201                                 
047495,000340: 

Page 1117

047497,000342: 01,3374           52062        FILLED             DXCH     WAITEXIT                              
047498,000343: 01,3375           05717                           TC       BAILOUT1                              #  NO ROOM IN THE INN
047499,000344: 01,3376           31203                           OCT      31203                                 
047500,000345: 

Page 1118

047502,000347:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
047503,000348:                                                                                                  #                                                     N           N+1
047504,000349: 
047505,000350:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
047506,000351:                                                                                                  #                                                              N+1
047507,000352: 
047508,000353:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
047509,000354:                                                                                                  #                    N+1   N                                 N
047510,000355: 
047511,000356:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
047512,000357:                                                                                                  #               N+1
047513,000358: 
047514,000359: 01,3377           54064        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
047515,000360: 01,3400           50002                           INDEX    Q                                     
047516,000361: 01,3401           30000                           CAF      0                                     
047517,000362: 01,3402           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
047518,000363: 
047519,000364: 01,3403           34753                           CAF      ONE                                   
047520,000365: 01,3404           60064                           AD       WAITTEMP                              
047521,000366: 01,3405           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
047522,000367: 01,3406           27377                           ADS      LST1       -1                         #                 N
047523,000368: 
047524,000369: 01,3407           40064                           CS       WAITTEMP                              
047525,000370: 01,3410           50002                           INDEX    Q                                     
047526,000371: 01,3411           13263                           TCF      WTLST4                                
047527,000372: 
047528,000373:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
047529,000374: 
047530,000375:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
047531,000376:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
047532,000377:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
047533,000378:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
047534,000379:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
047535,000380: 
047536,000381:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
047537,000382:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
047538,000383:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
047539,000384:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
047540,000385:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
047541,000386:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
047542,000387: 

Page 1119

047544,000389:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
047545,000390: 
047546,000391: 01,3412           00006        T3RUPT             EXTEND                                         
047547,000392: 01,3413           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
047548,000393: 01,3414           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
047549,000394: 01,3415           00006                           EXTEND                                         
047550,000395: 01,3416           22012                           QXCH     QRUPT                                 
047551,000396: 
047552,000397: 01,3417           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
047553,000398: 01,3420           57407                           XCH      LST1       +7                         
047554,000399: 01,3421           57406                           XCH      LST1       +6                         
047555,000400: 01,3422           57405                           XCH      LST1       +5                         
047556,000401: 01,3423           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
047557,000402: 01,3424           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
047558,000403: 01,3425           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
047559,000404: 01,3426           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
047560,000405: 01,3427           57400                           XCH      LST1                                  
047561,000406: 01,3430           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 -T USING LIST 1.
047562,000407: 01,3431           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
047563,000408: 01,3432           54332                           TS       RUPTAGN                               
047564,000409: 01,3433           44755                           CS       ZERO                                  
047565,000410: 01,3434           54332                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
047566,000411: 
047567,000412: 01,3435           00006                           EXTEND                                         #  DISPATCH TASK.
047568,000413: 01,3436           45250                           DCS      ENDTASK                               
047569,000414: 01,3437           53431                           DXCH     LST2       +16D                       
047570,000415: 01,3440           53427                           DXCH     LST2       +14D                       
047571,000416: 01,3441           53425                           DXCH     LST2       +12D                       
047572,000417: 01,3442           53423                           DXCH     LST2       +10D                       
047573,000418: 01,3443           53421                           DXCH     LST2       +8D                        
047574,000419: 01,3444           53417                           DXCH     LST2       +6                         
047575,000420: 01,3445           53415                           DXCH     LST2       +4                         
047576,000421: 01,3446           53413                           DXCH     LST2       +2                         
047577,000422: 01,3447           53411                           DXCH     LST2                                  
047578,000423: 
047579,000424: 01,3450           56001                           XCH      L                                     
047580,000425: 01,3451           00006                           EXTEND                                         
047581,000426: 01,3452           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
047582,000427: 01,3453           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
047583,000428: 01,3454           52006                           DTCB                                           
047584,000429: 

Page 1120

047586,000431:                                                                                                  #           RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
047587,000432: 
047588,000433:    5272                                           BLOCK    02                                    
047589,000434:    5272                                           COUNT*   $$/WAIT                               
047590,000435:    5272           10332        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
047591,000436:    5273           35231                           CAF      WAITBB                                
047592,000437:    5274           54006                           TS       BBANK                                 
047593,000438:    5275           13417                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
047594,000439: 
047595,000440:    5276           30016                           CA       BANKRUPT                              
047596,000441:    5277           00006                           EXTEND                                         
047597,000442:    5300           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
047598,000443: 
047599,000444:    5301           00006        RESUME             EXTEND                                         
047600,000445:    5302           22012                           QXCH     QRUPT                                 
047601,000446:    5303           30016        NOQRSM             CA       BANKRUPT                              
047602,000447:    5304           56006                           XCH      BBANK                                 
047603,000448:    5305           52011        NOQBRSM            DXCH     ARUPT                                 
047604,000449:    5306           00003                           RELINT                                         
047605,000450:    5307           50017                           RESUME                                         
047606,000451: 

Page 1121

047608,000453:                                                                                                  #  LONGCALL
047609,000454: 
047610,000455:                                                                                                  #  PROGRAM DESCRIPTION                                  DATE- 17 MARCH 1967
047611,000456:                                                                                                  #  PROGRAM WRITTEN BY W.H. VANDEVER                    LOG SECTION WAITLIST
047612,000457:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK REV. 100
047613,000458: 
047614,000459:                                                                                                  #  FUNCTIONAL DESCRIPTION-
047615,000460:                                                                                                  #  LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
047616,000461:                                                                                                  #  IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
047617,000462:                                                                                                  #  A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
047618,000463:                                                                                                  #  START
047619,000464: 
047620,000465:                                                                                                  #  CALLING SEQUENCE-
047621,000466:                                                                                                  #                                                   EXTEND
047622,000467:                                                                                                  #                                                   DCA    TIMELOC
047623,000468:                                                                                                  #                                                   TC     LONGCALL
047624,000469:                                                                                                  #                                                   2CADR  TASKTODO
047625,000470: 
047626,000471:                                                                                                  #  NORMAL EXIT MODE-
047627,000472:                                                                                                  #     1). TC    WAITLIST
047628,000473:                                                                                                  #     2). DTCB  (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
047629,000474:                                                                                                  #     3). DTCB  (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
047630,000475: 
047631,000476:                                                                                                  #  ALARM OR ABORT EXIT MODE-
047632,000477:                                                                                                  #     NONE
047633,000478: 
047634,000479:                                                                                                  #  OUTPUT-
047635,000480:                                                                                                  #     LONGTIME AND LONGTIME+1 = DELTA TIME
047636,000481:                                                                                                  #     LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
047637,000482:                                                                                                  #     LONGCADR AND LONGCADR+1 = TASK 2CADR
047638,000483:                                                                                                  #     A = SINGLE PRECISION TIME FOR WAITLIST
047639,000484: 
047640,000485:                                                                                                  #  ERASABLE INITIALIZATION-
047641,000486:                                                                                                  #     A = MOST SIGNIFICANT PART OF DELTA TIME
047642,000487:                                                                                                  #     L = LEAST SIGNIFICANT PART OF DELTA TIME
047643,000488:                                                                                                  #     Q = ADDRESS OF 2CADR TASK VALUE
047644,000489: 
047645,000490:                                                                                                  #  DEBRIS-
047646,000491:                                                                                                  #     A,Q,L
047647,000492:                                                                                                  #     LONGCADR AND LONGCADR+1
047648,000493:                                                                                                  #     LONGEXIT AND LONGEXIT+1
047649,000494:                                                                                                  #     LONGTIME AND LONGTIME+1
047650,000495: 
047651,000496:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
047652,000497: 
047653,000498:    5310                                           BLOCK    02                                    
047654,000499:    5310  E3,1400                                  EBANK=   LST1                                  
047655,000500:    5310           53153        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
047656,000501: 
047657,000502:    5311           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1122

047659,000504:    5312           50002                           NDX      Q                                     
047660,000505:    5313           30001                           DCA      0                                     
047661,000506:    5314           53147                           DXCH     LONGCADR                              
047662,000507: 
047663,000508:    5315           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
047664,000509:    5316           35321                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
047665,000510:    5317           52006                           DTCB                                           
047666,000511: 
047667,000512:    5320  E3,1400                                  EBANK=   LST1                                  
047668,000513:    5320           03455 02063  LGCL2CDR           2CADR    LNGCALL2                              
047669,000514: 
047670,000515:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
047671,000516: 
047672,000517: 01,3455                                           BANK     01                                    
047673,000518: 01,3455                                           COUNT*   $$/WAIT                               
047674,000519: 01,3455           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
047675,000520: 01,3456           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
047676,000521: 01,3457           26002                           ADS      Q                                     
047677,000522: 01,3460           55434                           TS       LONGEXIT                              
047678,000523: 
047679,000524: 01,3461           31152                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
047680,000525: 01,3462           10000                           CCS      A                                     
047681,000526: 01,3463           13471                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
047682,000527: 01,3464           13466                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
047683,000528: 01,3465           13523                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
047684,000529: 01,3466           31153                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
047685,000530: 01,3467           00006                           EXTEND                                         
047686,000531: 01,3470           63523                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
047687,000532: 
047688,000533:                                                                                                  #           *** WAITLIST TASK LONGCYCL ***
047689,000534: 01,3471           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
047690,000535: 01,3472           43503                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
047691,000536: 01,3473           21153                           DAS      LONGTIME                              
047692,000537: 
047693,000538: 01,3474           11153                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
047694,000539: 01,3475           13513                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
047695,000540:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
047696,000541:                                                                                                  #  BASIC INSTRUCTIONS
047697,000542:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
047698,000543:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
047699,000544:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
047700,000545: 01,3476           13477                           NOOP                                           #  CAN:T GET HERE    **********
047701,000546: 01,3477           13500                           TCF      +1                                    
047702,000547: 01,3500           11152                           CCS      LONGTIME                              
047703,000548: 01,3501           13513                           TCF      MUCHTIME                              
047704,000549: 01,3502           00000        DPBIT14            OCT      00000                                 
047705,000550: 01,3503           20000                           OCT      20000                                 
047706,000551:                                                                                                  #  LONGCALL
047707,000552: 

Page 1123

047709,000554: 01,3504           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
047710,000555: 01,3505           27153                           ADS      LONGTIME   +1                         
047711,000556: 01,3506           05204                           TC       TWIDDLE                               
047712,000557: 01,3507  E3,1400                                  EBANK=   LST1                                  
047713,000558: 01,3507           03520                           ADRES    GETCADR                               
047714,000559: 01,3510           33522        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
047715,000560: 01,3511           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
047716,000561: 01,3512           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
047717,000562: 
047718,000563: 01,3513           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
047719,000564: 01,3514           05214                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
047720,000565: 01,3515  E3,1400                                  EBANK=   LST1                                  
047721,000566: 01,3515           03471 02063                     2CADR    LONGCYCL                              
047722,000567: 
047723,000568: 
047724,000569: 01,3517           13510                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
047725,000570: 
047726,000571:                                                                                                  #           *** WAITLIST TASK GETCADR ***
047727,000572: 01,3520           53147        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
047728,000573: 01,3521           15176                           TCF      SUPDXCHZ                              #  AND TRANSFER CONTROL
047729,000574: 01,3522           05272        TSKOVCDR           GENADR   TASKOVER                              
047730,000575: 01,3523           53435        LONGPOOH           DXCH     LONGEXIT                              
047731,000576: 01,3524           13526                           TCF      +2                                    
047732,000577: 01,3525           52062        WAITPOOH           DXCH     WAITEXIT                              
047733,000578: 01,3526           05727                 +2        TC       POODOO1                               
047734,000579: 01,3527           21204                           OCT      21204                                 

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