Source Code

These source-code files are part of a reconstructed copy of Artemis 071, the first release of the Apollo 15 through 17 Command Module (CM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Artemis 072 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes between the two versions. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021154-. Note that page numbers in the reconstructed code match those on the Artemis 072 printout, although the changed code would likely have changed page numbers for a real Artemis 071 listing.

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.

052189,000002:                                                                                                  ## Copyright:   Public domain.
052190,000003:                                                                                                  ## Filename:    WAITLIST.agc
052191,000004:                                                                                                  ## Purpose:     A section of Artemis revision 071.
052192,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
052193,000006:                                                                                                  ##              release of the flight software for the Command Module's
052194,000007:                                                                                                  ##              (CM) Apollo Guidance Computer (AGC) for Apollo 15 through
052195,000008:                                                                                                  ##              17. The code has been recreated from a copy of Artemis 072.
052196,000009:                                                                                                  ##              It has been adapted such that the resulting bugger words
052197,000010:                                                                                                  ##              exactly match those specified for Artemis 071 in NASA
052198,000011:                                                                                                  ##              drawing 2021154-, which gives relatively high confidence
052199,000012:                                                                                                  ##              that the reconstruction is correct.
052200,000013:                                                                                                  ## Reference:   1221
052201,000014:                                                                                                  ## Assembler:   yaYUL
052202,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052203,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052204,000017:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Artemis 072.
052205,000018:                                                                                                  ##              2021-05-30 ABS  Added SUPERRSM location symbol.
052206,000019: 

Page 1221

052208,000021: 
052209,000022:                                                                                                  #  PROGRAM DESCRIPTION                                                           DATE - 10 OCTOBER 1966
052210,000023:                                                                                                  #  MOD NO - 2                                                                    LOG SECTION - WAITLIST
052211,000024:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)                          ASSEMBLY SUNBURST REV 5
052212,000025:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
052213,000026:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
052214,000027: 
052215,000028:                                                                                                  #  FUNCTIONAL DESCRIPTION-
052216,000029:                                                                                                  #        PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
052217,000030:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
052218,000031:                                                                                                  #        FOLLOW.
052219,000032: 
052220,000033:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
052221,000034: 
052222,000035:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
052223,000036:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
052224,000037:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
052225,000038:                                                                                                  #                                        .
052226,000039:                                                                                                  #                                        .
052227,000040:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
052228,000041:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
052229,000042: 
052230,000043:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
052231,000044:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
052232,000045:                                                                                                  #                                        .
052233,000046:                                                                                                  #                                        .
052234,000047:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
052235,000048:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
052236,000049: 
052237,000050:                                                                                                  #  WARNINGS-
052238,000051:                                                                                                  #  --------
052239,000052:                                                                                                  #                1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
052240,000053:                                                                                                  #                2) 9 TASKS MAXIMUM
052241,000054:                                                                                                  #                3) TASKS CALLED UNDER INTERRUPT INHIBITED
052242,000055:                                                                                                  #                4) TASKS END BY TC TASKOVER
052243,000056: 
052244,000057:                                                                                                  #  CALLING SEQUENCE-
052245,000058:                                                                                                  #  
052246,000059:                                                                                                  #                L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
052247,000060:                                                                                                  #                L       TC      WAITLIST
052248,000061:                                                                                                  #                L+1     2CADR   DESIRED TASK
052249,000062:                                                                                                  #                L+2     (MINOR OF 2CADR)
052250,000063:                                                                                                  #                L+3     RELINT          (RETURNS HERE)
052251,000064: 
052252,000065:                                                                                                  #  TWIDDLE-
052253,000066:                                                                                                  #  -------
052254,000067:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
052255,000068:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1222

052257,000070:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
052258,000071: 
052259,000072:                                                                                                  #                L-1     CA      DELTAT
052260,000073:                                                                                                  #                L       TC      TWIDDLE
052261,000074:                                                                                                  #                L+1     ADRES   DESIRED TASK
052262,000075:                                                                                                  #                L+2     RELINT                  (RETURNS HERE)
052263,000076: 
052264,000077:                                                                                                  #  NORMAL EXIT MODES-
052265,000078: 
052266,000079:                                                                                                  #                AT L+3 OF CALLING SEQUENCE
052267,000080: 
052268,000081:                                                                                                  #  ALARM OR ABORT EXIT MODES-
052269,000082: 
052270,000083:                                                                                                  #                TC      ABORT
052271,000084:                                                                                                  #                OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
052272,000085: 
052273,000086:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
052274,000087: 
052275,000088:                                                                                                  #                ACCOMPLISHED BY FRESH START,--LST2,...,LST2 +16 = ENDTASK
052276,000089:                                                                                                  #                                              LST1,...,LST1 +7  = NEG1/2
052277,000090: 
052278,000091:                                                                                                  #  OUTPUT--
052279,000092:                                                                                                  #                LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
052280,000093: 
052281,000094:                                                                                                  #  DEBRIS-
052282,000095: 
052283,000096:                                                                                                  #                CENTRALS - A,Q,L
052284,000097:                                                                                                  #                OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
052285,000098: 
052286,000099:                                                                                                  #  DETAILED ANALYSIS OF TIMING-
052287,000100: 
052288,000101:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
052289,000102:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
052290,000103:                                                                                                  #                        LET TO = THE TIME OF THE TC WAITLIST
052291,000104:                                                                                                  #                        LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
052292,000105:                                                                                                  #                        LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
052293,000106:                                                                                                  #                        LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
052294,000107:                                                                                                  #                        LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
052295,000108:                                                                                                  #        (Z=0, USUALLY)
052296,000109:                                                                                                  #                        LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
052297,000110:                                                                                                  #                THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
052298,000111:                                                                                                  #        *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
052299,000112: 
052300,000113:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
052301,000114:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
052302,000115:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
052303,000116: 
052304,000117:    4000                                           SETLOC   WAITF2                                

Page 1223

052306,000119:    4000                                           BANK                                           
052307,000120: 
052308,000121:    5222  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
052309,000122: 
052310,000123:    5222                                           COUNT*   $$/WAIT                               
052311,000124:    5222           34770        TWIDBIT1           CAF      ONE                                   
052312,000125:    5223           00004        TWIDDLE            INHINT                                         
052313,000126:    5224           54001                           TS       L                                     #  SAVE DELAY TIME IN L
052314,000127:    5225           34750                           CA       POSMAX                                
052315,000128:    5226           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
052316,000129:    5227           30006                           CA       BBANK                                 
052317,000130:    5230           00006                           EXTEND                                         
052318,000131:    5231           04007                           ROR      SUPERBNK                              
052319,000132:    5232           56001                           XCH      L                                     
052320,000133: 
052321,000134:    5233           00004        WAITLIST           INHINT                                         
052322,000135:    5234           00006                           EXTEND                                         
052323,000136:    5235           65247                           BZMF     WATLST0-                              
052324,000137:    5236           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
052325,000138:    5237           54061                           TS       WAITEXIT                              #  WAITEXIT.
052326,000139:    5240           00006                           EXTEND                                         
052327,000140:    5241           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
052328,000141:    5242           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
052329,000142:    5243           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
052330,000143:    5244           35254        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
052331,000144:    5245           56006                           XCH      BBANK                                 
052332,000145:    5246           13213                           TCF      WAIT2                                 
052333,000146: 
052334,000147:    5247           05726        WATLST0-           TC       POODOO                                
052335,000148:    5250           21204                           OCT      21204                                 
052336,000149: 
052337,000150:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
052338,000151: 
052339,000152:    5251           52062        LVWTLIST           DXCH     WAITEXIT                              
052340,000153:    5252           64767                           AD       TWO                                   
052341,000154:    5253           52006                           DTCB                                           
052342,000155: 
052343,000156:    5254  E3,1400                                  EBANK=   LST1                                  
052344,000157:    5254           02063        WAITBB             BBCON    WAIT2                                 
052345,000158: 
052346,000159:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
052347,000160: 
052348,000161:    5255           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
052349,000162:    5256           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
052350,000163:    5257           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
052351,000164: 
052352,000165:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
052353,000166: 
052354,000167:    5260           00006        VARDELAY           EXTEND                                         
052355,000168:    5261           65247                           BZMF     WATLST0-                              

Page 1224

052357,000170:    5262           56002                           XCH      Q                                     
052358,000171:    5263           54063                           TS       WAITADR                               
052359,000172:    5264           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
052360,000173:    5265           00006                           EXTEND                                         
052361,000174:    5266           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
052362,000175:    5267           54001                           TS       L                                     
052363,000176:    5270           35273                           CAF      DELAYEX                               
052364,000177:    5271           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
052365,000178:    5272           15244                           TCF      DLY2                                  
052366,000179: 
052367,000180:    5273           15312        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
052368,000181: 

Page 1225

052370,000183:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
052371,000184: 
052372,000185:    5274  E3,1400                                  EBANK=   LST1                                  
052373,000186:    5274           72501 73714  ENDTASK            -2CADR   SVCT3                                 
052374,000187: 
052375,000188:    5276           30076        SVCT3              CA       FLAGWRD2                              
052376,000189:    5277           74752                           MASK     DRFTBIT                               
052377,000190:    5300           00006                           EXTEND                                         
052378,000191:    5301           15314                           BZF      TASKOVER                              
052379,000192:    5302           11335                           CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
052380,000193:    5303           17703                           TCF      SVCT3X                                
052381,000194:    5304           15307                           TCF      +3                                    
052382,000195:    5305           17703                           TCF      SVCT3X                                
052383,000196:    5306           17703                           TCF      SVCT3X                                
052384,000197:    5307           37657                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
052385,000198:    5310           05121        NOVACADR           TC       NOVAC                                 #  ENABLE EVERY 81.93 SECONDS (=GENADR)
052386,000199:    5311  E3,1460                                  EBANK=   NBDX                                  
052387,000200:    5311           03561 14063                     2CADR    NBDONLY                               
052388,000201: 
052389,000202:    5313           05314        TSKOVCDR           TC       TASKOVER                              #  (=GENADR)
052390,000203:    6000                                           SETLOC   FFTAG6                                
052391,000204:    6000                                           BANK                                           
052392,000205: 
052393,000206:    7703                                           COUNT*   $$/WAIT                               
052394,000207:    7703           05255        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMU ZERO
052395,000208:    7704           00764        DEC500             DEC      500        B-14                       #  MUST COME AFTER SVCT3X
052396,000209:    7705           05276                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN
052397,000210: 

Page 1226

052399,000212:                                                                                                  #  BEGIN TASK INSERTION.
052400,000213: 
052401,000214: 01,2000                                           SETLOC   EXECB1                                
052402,000215: 01,2000                                           BANK                                           
052403,000216: 
052404,000217: 01,3213                                           COUNT*   $$/WAIT                               
052405,000218: 01,3213           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
052406,000219: 01,3214           40026                           CS       TIME3                                 
052407,000220: 01,3215           64761                           AD       BIT8                                  #  BIT 8 = OCT 200
052408,000221: 01,3216           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
052409,000222:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
052410,000223:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
052411,000224:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
052412,000225: 
052413,000226: 01,3217           66056                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
052414,000227: 01,3220           40000                           CS       A                                     #  T - T1 + 1.0 - 201
052415,000228: 
052416,000229:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
052417,000230: 
052418,000231: 01,3221           63117                           AD       OCT40201                              
052419,000232: 01,3222           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
052420,000233: 
052421,000234: 01,3223           10000                           CCS      A                                     #  TEST TD - T1 + 1
052422,000235: 
052423,000236: 01,3224           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
052424,000237: 01,3225           13267                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
052425,000238: 
052426,000239: 01,3226           13227                           NOOP                                           
052427,000240: 01,3227           40002                           CS       Q                                     
052428,000241: 
052429,000242:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
052430,000243:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
052431,000244:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
052432,000245:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
052433,000246: 
052434,000247: 01,3230           64753                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
052435,000248: 01,3231           64753                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
052436,000249: 01,3232           56026                           XCH      TIME3                                 
052437,000250: 01,3233           64752                           AD       NEGMAX                                
052438,000251: 01,3234           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
052439,000252: 01,3235           00006                           EXTEND                                         #  ZERO INDEX Q.
052440,000253: 01,3236           22007                           QXCH     7                                     #  (ZQ)
052441,000254: 

Page 1227

052443,000256: 01,3237           57400        WTLST4             XCH      LST1                                  
052444,000257: 01,3240           57401                           XCH      LST1       +1                         
052445,000258: 01,3241           57402                           XCH      LST1       +2                         
052446,000259: 01,3242           57403                           XCH      LST1       +3                         
052447,000260: 01,3243           57404                           XCH      LST1       +4                         
052448,000261: 01,3244           57405                           XCH      LST1       +5                         
052449,000262: 01,3245           57406                           XCH      LST1       +6                         
052450,000263: 01,3246           57407                           XCH      LST1       +7                         
052451,000264: 
052452,000265: 01,3247           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
052453,000266: 01,3250           50002                           INDEX    Q                                     
052454,000267: 01,3251           13252                           TCF      +1                                    
052455,000268: 
052456,000269: 01,3252           53411                           DXCH     LST2                                  
052457,000270: 01,3253           53413                           DXCH     LST2       +2                         
052458,000271: 01,3254           53415                           DXCH     LST2       +4                         
052459,000272: 01,3255           53417                           DXCH     LST2       +6                         
052460,000273: 01,3256           53421                           DXCH     LST2       +8D                        
052461,000274: 01,3257           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2+10) IS STD
052462,000275: 01,3260           53425                           DXCH     LST2       +12D                       
052463,000276: 01,3261           53427                           DXCH     LST2       +14D                       
052464,000277: 01,3262           53431                           DXCH     LST2       +16D                       
052465,000278: 01,3263           65274                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
052466,000279:                                                                                                  #    THE LENGTH OF THE LIST.
052467,000280: 01,3264           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
052468,000281: 01,3265           15251                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
052469,000282: 01,3266           13342                           TCF      WTABORT                               #  IT.
052470,000283: 

Page 1228

052472,000285: 01,3267           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
052473,000286: 01,3270           61401                           AD       LST1       +1                         
052474,000287: 01,3271           13275                           TCF      +4                                    
052475,000288: 01,3272           64770                           AD       ONE                                   
052476,000289: 01,3273           03347                           TC       WTLST2                                
052477,000290: 01,3274           00001                           OCT      1                                     
052478,000291: 
052479,000292: 01,3275           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
052480,000293: 01,3276           61402                           AD       LST1       +2                         
052481,000294: 01,3277           13303                           TCF      +4                                    
052482,000295: 01,3300           64770                           AD       ONE                                   
052483,000296: 01,3301           03347                           TC       WTLST2                                
052484,000297: 01,3302           00002                           OCT      2                                     
052485,000298: 
052486,000299: 01,3303           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
052487,000300: 01,3304           61403                           AD       LST1       +3                         
052488,000301: 01,3305           13311                           TCF      +4                                    
052489,000302: 01,3306           64770                           AD       ONE                                   
052490,000303: 01,3307           03347                           TC       WTLST2                                
052491,000304: 01,3310           00003                           OCT      3                                     
052492,000305: 
052493,000306: 01,3311           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
052494,000307: 01,3312           61404                           AD       LST1       +4                         
052495,000308: 01,3313           13317                           TCF      +4                                    
052496,000309: 01,3314           64770                           AD       ONE                                   
052497,000310: 01,3315           03347                           TC       WTLST2                                
052498,000311: 01,3316           00004                           OCT      4                                     
052499,000312: 
052500,000313: 01,3317           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
052501,000314: 01,3320           61405                           AD       LST1       +5                         
052502,000315: 01,3321           13325                           TCF      +4                                    
052503,000316: 01,3322           64770                           AD       ONE                                   
052504,000317: 01,3323           03347                           TC       WTLST2                                
052505,000318: 01,3324           00005                           OCT      5                                     
052506,000319: 
052507,000320: 01,3325           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
052508,000321: 01,3326           61406                           AD       LST1       +6                         
052509,000322: 01,3327           13333                           TCF      +4                                    
052510,000323: 01,3330           64770                           AD       ONE                                   
052511,000324: 01,3331           03347                           TC       WTLST2                                
052512,000325: 01,3332           00006                           OCT      6                                     
052513,000326: 

Page 1229

052515,000328: 01,3333           10000                 +4        CCS      A                                     
052516,000329: 01,3334           61407                           AD       LST1       +7                         
052517,000330: 01,3335           13341                           TCF      +4                                    
052518,000331: 01,3336           64770                           AD       ONE                                   
052519,000332: 01,3337           03347                           TC       WTLST2                                
052520,000333: 01,3340           00007                           OCT      7                                     
052521,000334: 
052522,000335: 01,3341           10000                 +4        CCS      A                                     
052523,000336: 01,3342           07706        WTABORT            TC       BAILOUT                               #  NO ROOM IN THE INN.
052524,000337: 01,3343           31203                           OCT      31203                                 
052525,000338: 
052526,000339: 01,3344           64770                           AD       ONE                                   
052527,000340: 01,3345           03347                           TC       WTLST2                                
052528,000341: 01,3346           00010                           OCT      10                                    
052529,000342: 

Page 1230

052531,000344:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
052532,000345:                                                                                                  #                                                     N           N+1
052533,000346: 
052534,000347:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
052535,000348:                                                                                                  #                                                              N+1
052536,000349: 
052537,000350:                                                                                                  #  THE LST1 ENTRY -(T   -T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
052538,000351:                                                                                                  #                    N+1  N                                 N
052539,000352: 
052540,000353:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
052541,000354:                                                                                                  #               N+1
052542,000355: 
052543,000356: 01,3347           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
052544,000357: 01,3350           50002                           INDEX    Q                                     
052545,000358: 01,3351           30000                           CAF      0                                     
052546,000359: 01,3352           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
052547,000360: 
052548,000361: 01,3353           34770                           CAF      ONE                                   
052549,000362: 01,3354           60064                           AD       WAITTEMP                              
052550,000363: 01,3355           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
052551,000364: 01,3356           27377                           ADS      LST1       -1                         #                 N
052552,000365: 
052553,000366: 01,3357           40064                           CS       WAITTEMP                              
052554,000367: 01,3360           50002                           INDEX    Q                                     
052555,000368: 01,3361           13237                           TCF      WTLST4                                
052556,000369: 
052557,000370:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
052558,000371: 
052559,000372:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
052560,000373:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
052561,000374:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
052562,000375:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
052563,000376:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
052564,000377: 
052565,000378:                                                                                                  #  C(LST2   ) = 2CADR    TASK1
052566,000379:                                                                                                  #  C(LST2+2 ) = 2CADR    TASK2
052567,000380:                                                                                                  #  C(LST2+4 ) = 2CADR    TASK3
052568,000381:                                                                                                  #  C(LST2+6 ) = 2CADR    TASK4
052569,000382:                                                                                                  #  C(LST2+8 ) = 2CADR    TASK5
052570,000383:                                                                                                  #  C(LST2+10) = 2CADR    TASK6
052571,000384: 

Page 1231

052573,000386:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
052574,000387: 
052575,000388: 01,3362           00006        T3RUPT             EXTEND                                         
052576,000389: 01,3363           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
052577,000390: 01,3364           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
052578,000391: 01,3365           00006                           EXTEND                                         
052579,000392: 01,3366           22012                           QXCH     QRUPT                                 
052580,000393: 
052581,000394: 01,3367           34751        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
052582,000395: 01,3370           57407                           XCH      LST1       +7                         
052583,000396: 01,3371           57406                           XCH      LST1       +6                         
052584,000397: 01,3372           57405                           XCH      LST1       +5                         
052585,000398: 01,3373           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
052586,000399: 01,3374           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
052587,000400: 01,3375           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
052588,000401: 01,3376           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
052589,000402: 01,3377           57400                           XCH      LST1                                  
052590,000403: 01,3400           64750                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
052591,000404: 01,3401           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
052592,000405: 01,3402           55137                           TS       RUPTAGN                               
052593,000406: 01,3403           44772                           CS       ZERO                                  
052594,000407: 01,3404           55137                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
052595,000408: 
052596,000409: 01,3405           00006                           EXTEND                                         #  DISPATCH TASK.
052597,000410: 01,3406           45275                           DCS      ENDTASK                               
052598,000411: 01,3407           53431                           DXCH     LST2       +16D                       
052599,000412: 01,3410           53427                           DXCH     LST2       +14D                       
052600,000413: 01,3411           53425                           DXCH     LST2       +12D                       
052601,000414: 01,3412           53423                           DXCH     LST2       +10D                       
052602,000415: 01,3413           53421                           DXCH     LST2       +8D                        
052603,000416: 01,3414           53417                           DXCH     LST2       +6                         
052604,000417: 01,3415           53415                           DXCH     LST2       +4                         
052605,000418: 01,3416           53413                           DXCH     LST2       +2                         
052606,000419: 01,3417           53411                           DXCH     LST2                                  
052607,000420: 
052608,000421: 01,3420           56001                           XCH      L                                     
052609,000422: 01,3421           00006                           EXTEND                                         
052610,000423: 01,3422           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
052611,000424: 01,3423           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
052612,000425: 01,3424           52006                           DTCB                                           
052613,000426: 

Page 1232

052615,000428:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
052616,000429: 
052617,000430:    4000                                           SETLOC   WAITF2                                
052618,000431:    4000                                           BANK                                           
052619,000432: 
052620,000433:    5314                                           COUNT*   $$/WAIT                               
052621,000434:    5314           11137        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
052622,000435:    5315           35254                           CAF      WAITBB                                
052623,000436:    5316           54006                           TS       BBANK                                 
052624,000437:    5317           13367                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
052625,000438: 
052626,000439:    5320           30016        SUPERRSM           CA       BANKRUPT                              
052627,000440:    5321           00006                           EXTEND                                         
052628,000441:    5322           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
052629,000442: 
052630,000443:    5323           00006        RESUME             EXTEND                                         
052631,000444:    5324           22012                           QXCH     QRUPT                                 
052632,000445:    5325           30016        NOQRSM             CA       BANKRUPT                              
052633,000446:    5326           56006                 +1        XCH      BBANK                                 
052634,000447:    5327           52011        NOQBRSM            DXCH     ARUPT                                 
052635,000448:    5330           00003                           RELINT                                         
052636,000449:    5331           50017                           RESUME                                         
052637,000450: 

Page 1233

052639,000452:                                                                                                  #  LONGCALL
052640,000453:                                                                                                  #  PROGRAM DESCRIPTION                                         DATE- 17 MARCH 1967
052641,000454:                                                                                                  #  PROGRAM WRITTEN BY W.H. VANDEVER                           LOG SECTION WAITLIST
052642,000455:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION              ASSEMBLY SUNDISK REV. 100
052643,000456: 
052644,000457:                                                                                                  #  FUNCTIONAL DESCRIPTION-
052645,000458:                                                                                                  #  LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
052646,000459:                                                                                                  #  IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
052647,000460:                                                                                                  #  A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
052648,000461:                                                                                                  #  START
052649,000462: 
052650,000463:                                                                                                  #  CALLING SEQUENCE-
052651,000464:                                                                                                  #                                EXTEND
052652,000465:                                                                                                  #                                DCA     TIMELOC
052653,000466:                                                                                                  #                                TC      LONGCALL
052654,000467:                                                                                                  #                                2CADR   TASKTODO
052655,000468: 
052656,000469:                                                                                                  #  NORMAL EXIT MODE-
052657,000470:                                                                                                  #        1). TC    WAITLIST
052658,000471:                                                                                                  #        2). DTCB  (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
052659,000472:                                                                                                  #        3). DTCB  (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
052660,000473: 
052661,000474:                                                                                                  #  ALARM OR ABORT EXIT MODE-
052662,000475:                                                                                                  #        NONE
052663,000476: 
052664,000477:                                                                                                  #  OUTPUT-
052665,000478:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
052666,000479:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
052667,000480:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
052668,000481:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
052669,000482: 
052670,000483:                                                                                                  #  ERASABLE INITIALIZATION-
052671,000484:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
052672,000485:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
052673,000486:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
052674,000487: 
052675,000488:                                                                                                  #  DEBRIS-
052676,000489:                                                                                                  #        A,Q,L
052677,000490:                                                                                                  #        LONGCADR AND LONGCADR+1
052678,000491:                                                                                                  #        LONGEXIT AND LONGEXIT+1
052679,000492:                                                                                                  #        LONGTIME AND LONGTIME+1
052680,000493: 
052681,000494:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
052682,000495: 
052683,000496:    4000                                           SETLOC   WAITF2                                
052684,000497:    4000                                           BANK                                           
052685,000498: 
052686,000499:    5332                                           COUNT*   $$/WAIT                               
052687,000500:    5332  E3,1400                                  EBANK=   LST1                                  

Page 1234

052689,000502:    5332           53305        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
052690,000503: 
052691,000504:    5333           00006                           EXTEND                                         #  OBTAIN THE 2CADR
052692,000505:    5334           50002                           NDX      Q                                     
052693,000506:    5335           30001                           DCA      0                                     
052694,000507:    5336           53301                           DXCH     LONGCADR                              
052695,000508: 
052696,000509:    5337           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
052697,000510:    5340           35343                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
052698,000511:    5341           52006                           DTCB                                           
052699,000512: 
052700,000513:    5342  E3,1400                                  EBANK=   LST1                                  
052701,000514:    5342           03425 02063  LGCL2CDR           2CADR    LNGCALL2                              
052702,000515: 
052703,000516:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
052704,000517: 
052705,000518: 01,2000                                           SETLOC   EXECB1                                
052706,000519: 01,2000                                           BANK                                           
052707,000520: 
052708,000521: 01,3425                                           COUNT*   $$/WAIT                               
052709,000522: 01,3425           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
052710,000523: 01,3426           34767                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
052711,000524: 01,3427           26002                           ADS      Q                                     
052712,000525: 01,3430           55434                           TS       LONGEXIT                              
052713,000526: 
052714,000527: 01,3431           11304        LGCLNGTM           CCS      LONGTIME                              #  TEST FOR NEG. TIME
052715,000528: 01,3432           13440                           TCF      LONGCYCL                              #  HI-ORDER POS...OK
052716,000529: 01,3433           13435                           TCF      +2                                    #           ZERO..TEST LO-ORDER
052717,000530: 01,3434           15247                           TCF      WATLST0-                              #           NEG...POODOO
052718,000531: 01,3435           31305                           CA       LONGTIME   +1                         #           ZERO..TEST LO-ORDER
052719,000532: 01,3436           00006                           EXTEND                                         
052720,000533: 01,3437           65247                           BZMF     WATLST0-                              #  LO-ORDER ZERO/NEG...POODOO
052721,000534: 
052722,000535:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
052723,000536: 
052724,000537: 01,3440           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
052725,000538: 01,3441           43452                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
052726,000539: 01,3442           21305                           DAS      LONGTIME                              
052727,000540: 
052728,000541: 01,3443           11305                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
052729,000542: 01,3444           13462                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
052730,000543:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
052731,000544:                                                                                                  #  BASIC INSTRUCTIONS
052732,000545:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
052733,000546:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
052734,000547:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
052735,000548: 01,3445           13446                           NOOP                                           #  CAN:T GET HERE        **********
052736,000549: 01,3446           13447                           TCF      +1                                    
052737,000550: 01,3447           11304                           CCS      LONGTIME                              
052738,000551: 01,3450           13462                           TCF      MUCHTIME                              

Page 1235

052740,000553: 01,3451           00000        DPBIT14            OCT      00000                                 
052741,000554: 01,3452           20000                           OCT      20000                                 
052742,000555: 
052743,000556:                                                                                                  #  LONGCALL
052744,000557: 01,3453           34753        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA T FOR WAITLIST
052745,000558: 01,3454           27305                           ADS      LONGTIME   +1                         
052746,000559: 01,3455           05223                           TC       TWIDDLE                               
052747,000560: 01,3456           03142                           ADRES    GETCADR                               #  THE ENTRY TO OUR LONGCADR
052748,000561: 01,3457           35313        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
052749,000562: 01,3460           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
052750,000563: 01,3461           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
052751,000564: 
052752,000565: 01,3462           34753        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
052753,000566: 01,3463           05233        WTLTCADR           TC       WAITLIST                              #  SET UP ANOTHER CYCLE THRU HERE (=GENADR)
052754,000567: 01,3464  E3,1400                                  EBANK=   LST1                                  
052755,000568: 01,3464           03440 02063                     2CADR    LONGCYCL                              
052756,000569: 
052757,000570: 01,3466           13457                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY

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