Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

052331,000002:                                                                                                  ## Copyright:   Public domain.
052332,000003:                                                                                                  ## Filename:    WAITLIST.agc
052333,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
052334,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM)
052335,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for
052336,000007:                                                                                                  ##              Apollo 15-17.
052337,000008:                                                                                                  ## Assembler:   yaYUL
052338,000009:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
052339,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052340,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
052341,000012:                                                                                                  ## Mod history: 2009-08-29 JL   Adapted from corresponding Comanche 055 file.
052342,000013:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
052343,000014:                                                                                                  ##              2010-04-04 JL   Added missing # comment delimitera.
052344,000015:                                                                                                  ##              2011-05-07 JL   Removed workarounds.
052345,000016:                                                                                                  ##              2017-02-09 RSB  Proofed comment text by diff'ing vs Comanche 55
052346,000017:                                                                                                  ##                              and/or octopus/ProoferComments as most-appropriate.
052347,000018:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
052348,000019:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
052349,000020:                                                                                                  ##              2021-05-30 ABS  Added SUPERRSM location symbol.
052350,000021: 

Page 1221

052352,000023: 
052353,000024:                                                                                                  #  PROGRAM DESCRIPTION                                                           DATE - 10 OCTOBER 1966
052354,000025:                                                                                                  #  MOD NO - 2                                                                    LOG SECTION - WAITLIST
052355,000026:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)                          ASSEMBLY SUNBURST REV 5
052356,000027:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
052357,000028:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
052358,000029: 
052359,000030:                                                                                                  #  FUNCTIONAL DESCRIPTION-
052360,000031:                                                                                                  #        PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
052361,000032:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
052362,000033:                                                                                                  #        FOLLOW.
052363,000034: 
052364,000035:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
052365,000036: 
052366,000037:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
052367,000038:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
052368,000039:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
052369,000040:                                                                                                  #                                        .
052370,000041:                                                                                                  #                                        .
052371,000042:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
052372,000043:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
052373,000044: 
052374,000045:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
052375,000046:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
052376,000047:                                                                                                  #                                        .
052377,000048:                                                                                                  #                                        .
052378,000049:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
052379,000050:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
052380,000051: 
052381,000052:                                                                                                  #  WARNINGS-
052382,000053:                                                                                                  #  --------
052383,000054:                                                                                                  #                1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
052384,000055:                                                                                                  #                2) 9 TASKS MAXIMUM
052385,000056:                                                                                                  #                3) TASKS CALLED UNDER INTERRUPT INHIBITED
052386,000057:                                                                                                  #                4) TASKS END BY TC TASKOVER
052387,000058: 
052388,000059:                                                                                                  #  CALLING SEQUENCE-
052389,000060:                                                                                                  #  
052390,000061:                                                                                                  #                L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
052391,000062:                                                                                                  #                L       TC      WAITLIST
052392,000063:                                                                                                  #                L+1     2CADR   DESIRED TASK
052393,000064:                                                                                                  #                L+2     (MINOR OF 2CADR)
052394,000065:                                                                                                  #                L+3     RELINT          (RETURNS HERE)
052395,000066: 
052396,000067:                                                                                                  #  TWIDDLE-
052397,000068:                                                                                                  #  -------
052398,000069:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
052399,000070:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1222

052401,000072:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
052402,000073: 
052403,000074:                                                                                                  #                L-1     CA      DELTAT
052404,000075:                                                                                                  #                L       TC      TWIDDLE
052405,000076:                                                                                                  #                L+1     ADRES   DESIRED TASK
052406,000077:                                                                                                  #                L+2     RELINT                  (RETURNS HERE)
052407,000078: 
052408,000079:                                                                                                  #  NORMAL EXIT MODES-
052409,000080: 
052410,000081:                                                                                                  #                AT L+3 OF CALLING SEQUENCE
052411,000082: 
052412,000083:                                                                                                  #  ALARM OR ABORT EXIT MODES-
052413,000084: 
052414,000085:                                                                                                  #                TC      ABORT
052415,000086:                                                                                                  #                OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
052416,000087: 
052417,000088:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
052418,000089: 
052419,000090:                                                                                                  #                ACCOMPLISHED BY FRESH START,--LST2,...,LST2 +16 = ENDTASK
052420,000091:                                                                                                  #                                              LST1,...,LST1 +7  = NEG1/2
052421,000092: 
052422,000093:                                                                                                  #  OUTPUT--
052423,000094:                                                                                                  #                LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
052424,000095: 
052425,000096:                                                                                                  #  DEBRIS-
052426,000097: 
052427,000098:                                                                                                  #                CENTRALS - A,Q,L
052428,000099:                                                                                                  #                OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
052429,000100: 
052430,000101:                                                                                                  #  DETAILED ANALYSIS OF TIMING-
052431,000102: 
052432,000103:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
052433,000104:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
052434,000105:                                                                                                  #                        LET TO = THE TIME OF THE TC WAITLIST
052435,000106:                                                                                                  #                        LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
052436,000107:                                                                                                  #                        LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
052437,000108:                                                                                                  #                        LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
052438,000109:                                                                                                  #                        LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
052439,000110:                                                                                                  #        (Z=0, USUALLY)
052440,000111:                                                                                                  #                        LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
052441,000112:                                                                                                  #                THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
052442,000113:                                                                                                  #        *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
052443,000114: 
052444,000115:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
052445,000116:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
052446,000117:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
052447,000118: 
052448,000119:    4000                                           SETLOC   WAITF2                                

Page 1223

052450,000121:    4000                                           BANK                                           
052451,000122: 
052452,000123:    5222  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
052453,000124: 
052454,000125:    5222                                           COUNT*   $$/WAIT                               
052455,000126:    5222           34770        TWIDBIT1           CAF      ONE                                   
052456,000127:    5223           00004        TWIDDLE            INHINT                                         
052457,000128:    5224           54001                           TS       L                                     #  SAVE DELAY TIME IN L
052458,000129:    5225           34750                           CA       POSMAX                                
052459,000130:    5226           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
052460,000131:    5227           30006                           CA       BBANK                                 
052461,000132:    5230           00006                           EXTEND                                         
052462,000133:    5231           04007                           ROR      SUPERBNK                              
052463,000134:    5232           56001                           XCH      L                                     
052464,000135: 
052465,000136:    5233           00004        WAITLIST           INHINT                                         
052466,000137:    5234           00006                           EXTEND                                         
052467,000138:    5235           65247                           BZMF     WATLST0-                              
052468,000139:    5236           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
052469,000140:    5237           54061                           TS       WAITEXIT                              #  WAITEXIT.
052470,000141:    5240           00006                           EXTEND                                         
052471,000142:    5241           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
052472,000143:    5242           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
052473,000144:    5243           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
052474,000145:    5244           35254        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
052475,000146:    5245           56006                           XCH      BBANK                                 
052476,000147:    5246           13213                           TCF      WAIT2                                 
052477,000148: 
052478,000149:    5247           05726        WATLST0-           TC       POODOO                                
052479,000150:    5250           21204                           OCT      21204                                 
052480,000151: 
052481,000152:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
052482,000153: 
052483,000154:    5251           52062        LVWTLIST           DXCH     WAITEXIT                              
052484,000155:    5252           64767                           AD       TWO                                   
052485,000156:    5253           52006                           DTCB                                           
052486,000157: 
052487,000158:    5254  E3,1400                                  EBANK=   LST1                                  
052488,000159:    5254           02063        WAITBB             BBCON    WAIT2                                 
052489,000160: 
052490,000161:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
052491,000162: 
052492,000163:    5255           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
052493,000164:    5256           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
052494,000165:    5257           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
052495,000166: 
052496,000167:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
052497,000168: 
052498,000169:    5260           00006        VARDELAY           EXTEND                                         
052499,000170:    5261           65247                           BZMF     WATLST0-                              

Page 1224

052501,000172:    5262           56002                           XCH      Q                                     
052502,000173:    5263           54063                           TS       WAITADR                               
052503,000174:    5264           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
052504,000175:    5265           00006                           EXTEND                                         
052505,000176:    5266           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
052506,000177:    5267           54001                           TS       L                                     
052507,000178:    5270           35273                           CAF      DELAYEX                               
052508,000179:    5271           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
052509,000180:    5272           15244                           TCF      DLY2                                  
052510,000181: 
052511,000182:    5273           15312        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
052512,000183: 

Page 1225

052514,000185:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
052515,000186: 
052516,000187:    5274  E3,1400                                  EBANK=   LST1                                  
052517,000188:    5274           72501 73714  ENDTASK            -2CADR   SVCT3                                 
052518,000189: 
052519,000190:    5276           30076        SVCT3              CA       FLAGWRD2                              
052520,000191:    5277           74752                           MASK     DRFTBIT                               
052521,000192:    5300           00006                           EXTEND                                         
052522,000193:    5301           15314                           BZF      TASKOVER                              
052523,000194:    5302           11335                           CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
052524,000195:    5303           17703                           TCF      SVCT3X                                
052525,000196:    5304           15307                           TCF      +3                                    
052526,000197:    5305           17703                           TCF      SVCT3X                                
052527,000198:    5306           17703                           TCF      SVCT3X                                
052528,000199:    5307           37657                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
052529,000200:    5310           05121        NOVACADR           TC       NOVAC                                 #  ENABLE EVERY 81.93 SECONDS (=GENADR)
052530,000201:    5311  E3,1460                                  EBANK=   NBDX                                  
052531,000202:    5311           03561 14063                     2CADR    NBDONLY                               
052532,000203: 
052533,000204:    5313           05314        TSKOVCDR           TC       TASKOVER                              #  (=GENADR)
052534,000205:    6000                                           SETLOC   FFTAG6                                
052535,000206:    6000                                           BANK                                           
052536,000207: 
052537,000208:    7703                                           COUNT*   $$/WAIT                               
052538,000209:    7703           05255        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMU ZERO
052539,000210:    7704           00764        DEC500             DEC      500        B-14                       #  MUST COME AFTER SVCT3X
052540,000211:    7705           05276                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN
052541,000212: 

Page 1226

052543,000214:                                                                                                  #  BEGIN TASK INSERTION.
052544,000215: 
052545,000216: 01,2000                                           SETLOC   EXECB1                                
052546,000217: 01,2000                                           BANK                                           
052547,000218: 
052548,000219: 01,3213                                           COUNT*   $$/WAIT                               
052549,000220: 01,3213           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
052550,000221: 01,3214           40026                           CS       TIME3                                 
052551,000222: 01,3215           64761                           AD       BIT8                                  #  BIT 8 = OCT 200
052552,000223: 01,3216           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
052553,000224:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
052554,000225:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
052555,000226:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
052556,000227: 
052557,000228: 01,3217           66056                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
052558,000229: 01,3220           40000                           CS       A                                     #  T - T1 + 1.0 - 201
052559,000230: 
052560,000231:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
052561,000232: 
052562,000233: 01,3221           63117                           AD       OCT40201                              
052563,000234: 01,3222           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
052564,000235: 
052565,000236: 01,3223           10000                           CCS      A                                     #  TEST TD - T1 + 1
052566,000237: 
052567,000238: 01,3224           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
052568,000239: 01,3225           13267                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
052569,000240: 
052570,000241: 01,3226           13227                           NOOP                                           
052571,000242: 01,3227           40002                           CS       Q                                     
052572,000243: 
052573,000244:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
052574,000245:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
052575,000246:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
052576,000247:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
052577,000248: 
052578,000249: 01,3230           64753                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
052579,000250: 01,3231           64753                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
052580,000251: 01,3232           56026                           XCH      TIME3                                 
052581,000252: 01,3233           64752                           AD       NEGMAX                                
052582,000253: 01,3234           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
052583,000254: 01,3235           00006                           EXTEND                                         #  ZERO INDEX Q.
052584,000255: 01,3236           22007                           QXCH     7                                     #  (ZQ)
052585,000256: 

Page 1227

052587,000258: 01,3237           57400        WTLST4             XCH      LST1                                  
052588,000259: 01,3240           57401                           XCH      LST1       +1                         
052589,000260: 01,3241           57402                           XCH      LST1       +2                         
052590,000261: 01,3242           57403                           XCH      LST1       +3                         
052591,000262: 01,3243           57404                           XCH      LST1       +4                         
052592,000263: 01,3244           57405                           XCH      LST1       +5                         
052593,000264: 01,3245           57406                           XCH      LST1       +6                         
052594,000265: 01,3246           57407                           XCH      LST1       +7                         
052595,000266: 
052596,000267: 01,3247           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
052597,000268: 01,3250           50002                           INDEX    Q                                     
052598,000269: 01,3251           13252                           TCF      +1                                    
052599,000270: 
052600,000271: 01,3252           53411                           DXCH     LST2                                  
052601,000272: 01,3253           53413                           DXCH     LST2       +2                         
052602,000273: 01,3254           53415                           DXCH     LST2       +4                         
052603,000274: 01,3255           53417                           DXCH     LST2       +6                         
052604,000275: 01,3256           53421                           DXCH     LST2       +8D                        
052605,000276: 01,3257           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2+10) IS STD
052606,000277: 01,3260           53425                           DXCH     LST2       +12D                       
052607,000278: 01,3261           53427                           DXCH     LST2       +14D                       
052608,000279: 01,3262           53431                           DXCH     LST2       +16D                       
052609,000280: 01,3263           65274                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
052610,000281:                                                                                                  #    THE LENGTH OF THE LIST.
052611,000282: 01,3264           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
052612,000283: 01,3265           15251                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
052613,000284: 01,3266           13342                           TCF      WTABORT                               #  IT.
052614,000285: 

Page 1228

052616,000287: 01,3267           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
052617,000288: 01,3270           61401                           AD       LST1       +1                         
052618,000289: 01,3271           13275                           TCF      +4                                    
052619,000290: 01,3272           64770                           AD       ONE                                   
052620,000291: 01,3273           03347                           TC       WTLST2                                
052621,000292: 01,3274           00001                           OCT      1                                     
052622,000293: 
052623,000294: 01,3275           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
052624,000295: 01,3276           61402                           AD       LST1       +2                         
052625,000296: 01,3277           13303                           TCF      +4                                    
052626,000297: 01,3300           64770                           AD       ONE                                   
052627,000298: 01,3301           03347                           TC       WTLST2                                
052628,000299: 01,3302           00002                           OCT      2                                     
052629,000300: 
052630,000301: 01,3303           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
052631,000302: 01,3304           61403                           AD       LST1       +3                         
052632,000303: 01,3305           13311                           TCF      +4                                    
052633,000304: 01,3306           64770                           AD       ONE                                   
052634,000305: 01,3307           03347                           TC       WTLST2                                
052635,000306: 01,3310           00003                           OCT      3                                     
052636,000307: 
052637,000308: 01,3311           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
052638,000309: 01,3312           61404                           AD       LST1       +4                         
052639,000310: 01,3313           13317                           TCF      +4                                    
052640,000311: 01,3314           64770                           AD       ONE                                   
052641,000312: 01,3315           03347                           TC       WTLST2                                
052642,000313: 01,3316           00004                           OCT      4                                     
052643,000314: 
052644,000315: 01,3317           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
052645,000316: 01,3320           61405                           AD       LST1       +5                         
052646,000317: 01,3321           13325                           TCF      +4                                    
052647,000318: 01,3322           64770                           AD       ONE                                   
052648,000319: 01,3323           03347                           TC       WTLST2                                
052649,000320: 01,3324           00005                           OCT      5                                     
052650,000321: 
052651,000322: 01,3325           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
052652,000323: 01,3326           61406                           AD       LST1       +6                         
052653,000324: 01,3327           13333                           TCF      +4                                    
052654,000325: 01,3330           64770                           AD       ONE                                   
052655,000326: 01,3331           03347                           TC       WTLST2                                
052656,000327: 01,3332           00006                           OCT      6                                     
052657,000328: 

Page 1229

052659,000330: 01,3333           10000                 +4        CCS      A                                     
052660,000331: 01,3334           61407                           AD       LST1       +7                         
052661,000332: 01,3335           13341                           TCF      +4                                    
052662,000333: 01,3336           64770                           AD       ONE                                   
052663,000334: 01,3337           03347                           TC       WTLST2                                
052664,000335: 01,3340           00007                           OCT      7                                     
052665,000336: 
052666,000337: 01,3341           10000                 +4        CCS      A                                     
052667,000338: 01,3342           07706        WTABORT            TC       BAILOUT                               #  NO ROOM IN THE INN.
052668,000339: 01,3343           31203                           OCT      31203                                 
052669,000340: 
052670,000341: 01,3344           64770                           AD       ONE                                   
052671,000342: 01,3345           03347                           TC       WTLST2                                
052672,000343: 01,3346           00010                           OCT      10                                    
052673,000344: 

Page 1230

052675,000346:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
052676,000347:                                                                                                  #                                                     N           N+1
052677,000348: 
052678,000349:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
052679,000350:                                                                                                  #                                                              N+1
052680,000351: 
052681,000352:                                                                                                  #  THE LST1 ENTRY -(T   -T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
052682,000353:                                                                                                  #                    N+1  N                                 N
052683,000354: 
052684,000355:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
052685,000356:                                                                                                  #               N+1
052686,000357: 
052687,000358: 01,3347           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
052688,000359: 01,3350           50002                           INDEX    Q                                     
052689,000360: 01,3351           30000                           CAF      0                                     
052690,000361: 01,3352           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
052691,000362: 
052692,000363: 01,3353           34770                           CAF      ONE                                   
052693,000364: 01,3354           60064                           AD       WAITTEMP                              
052694,000365: 01,3355           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
052695,000366: 01,3356           27377                           ADS      LST1       -1                         #                 N
052696,000367: 
052697,000368: 01,3357           40064                           CS       WAITTEMP                              
052698,000369: 01,3360           50002                           INDEX    Q                                     
052699,000370: 01,3361           13237                           TCF      WTLST4                                
052700,000371: 
052701,000372:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
052702,000373: 
052703,000374:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
052704,000375:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
052705,000376:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
052706,000377:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
052707,000378:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
052708,000379: 
052709,000380:                                                                                                  #  C(LST2   ) = 2CADR    TASK1
052710,000381:                                                                                                  #  C(LST2+2 ) = 2CADR    TASK2
052711,000382:                                                                                                  #  C(LST2+4 ) = 2CADR    TASK3
052712,000383:                                                                                                  #  C(LST2+6 ) = 2CADR    TASK4
052713,000384:                                                                                                  #  C(LST2+8 ) = 2CADR    TASK5
052714,000385:                                                                                                  #  C(LST2+10) = 2CADR    TASK6
052715,000386: 

Page 1231

052717,000388:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
052718,000389: 
052719,000390: 01,3362           00006        T3RUPT             EXTEND                                         
052720,000391: 01,3363           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
052721,000392: 01,3364           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
052722,000393: 01,3365           00006                           EXTEND                                         
052723,000394: 01,3366           22012                           QXCH     QRUPT                                 
052724,000395: 
052725,000396: 01,3367           34751        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
052726,000397: 01,3370           57407                           XCH      LST1       +7                         
052727,000398: 01,3371           57406                           XCH      LST1       +6                         
052728,000399: 01,3372           57405                           XCH      LST1       +5                         
052729,000400: 01,3373           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
052730,000401: 01,3374           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
052731,000402: 01,3375           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
052732,000403: 01,3376           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
052733,000404: 01,3377           57400                           XCH      LST1                                  
052734,000405: 01,3400           64750                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
052735,000406: 01,3401           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
052736,000407: 01,3402           55137                           TS       RUPTAGN                               
052737,000408: 01,3403           44772                           CS       ZERO                                  
052738,000409: 01,3404           55137                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
052739,000410: 
052740,000411: 01,3405           00006                           EXTEND                                         #  DISPATCH TASK.
052741,000412: 01,3406           45275                           DCS      ENDTASK                               
052742,000413: 01,3407           53431                           DXCH     LST2       +16D                       
052743,000414: 01,3410           53427                           DXCH     LST2       +14D                       
052744,000415: 01,3411           53425                           DXCH     LST2       +12D                       
052745,000416: 01,3412           53423                           DXCH     LST2       +10D                       
052746,000417: 01,3413           53421                           DXCH     LST2       +8D                        
052747,000418: 01,3414           53417                           DXCH     LST2       +6                         
052748,000419: 01,3415           53415                           DXCH     LST2       +4                         
052749,000420: 01,3416           53413                           DXCH     LST2       +2                         
052750,000421: 01,3417           53411                           DXCH     LST2                                  
052751,000422: 
052752,000423: 01,3420           56001                           XCH      L                                     
052753,000424: 01,3421           00006                           EXTEND                                         
052754,000425: 01,3422           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
052755,000426: 01,3423           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
052756,000427: 01,3424           52006                           DTCB                                           
052757,000428: 

Page 1232

052759,000430:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
052760,000431: 
052761,000432:    4000                                           SETLOC   WAITF2                                
052762,000433:    4000                                           BANK                                           
052763,000434: 
052764,000435:    5314                                           COUNT*   $$/WAIT                               
052765,000436:    5314           11137        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
052766,000437:    5315           35254                           CAF      WAITBB                                
052767,000438:    5316           54006                           TS       BBANK                                 
052768,000439:    5317           13367                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
052769,000440: 
052770,000441:    5320           30016        SUPERRSM           CA       BANKRUPT                              
052771,000442:    5321           00006                           EXTEND                                         
052772,000443:    5322           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
052773,000444: 
052774,000445:    5323           00006        RESUME             EXTEND                                         
052775,000446:    5324           22012                           QXCH     QRUPT                                 
052776,000447:    5325           30016        NOQRSM             CA       BANKRUPT                              
052777,000448:    5326           56006                 +1        XCH      BBANK                                 
052778,000449:    5327           52011        NOQBRSM            DXCH     ARUPT                                 
052779,000450:    5330           00003                           RELINT                                         
052780,000451:    5331           50017                           RESUME                                         
052781,000452: 

Page 1233

052783,000454:                                                                                                  #  LONGCALL
052784,000455:                                                                                                  #  PROGRAM DESCRIPTION                                         DATE- 17 MARCH 1967
052785,000456:                                                                                                  #  PROGRAM WRITTEN BY W.H. VANDEVER                           LOG SECTION WAITLIST
052786,000457:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION              ASSEMBLY SUNDISK REV. 100
052787,000458: 
052788,000459:                                                                                                  #  FUNCTIONAL DESCRIPTION-
052789,000460:                                                                                                  #  LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
052790,000461:                                                                                                  #  IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
052791,000462:                                                                                                  #  A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
052792,000463:                                                                                                  #  START
052793,000464: 
052794,000465:                                                                                                  #  CALLING SEQUENCE-
052795,000466:                                                                                                  #                                EXTEND
052796,000467:                                                                                                  #                                DCA     TIMELOC
052797,000468:                                                                                                  #                                TC      LONGCALL
052798,000469:                                                                                                  #                                2CADR   TASKTODO
052799,000470: 
052800,000471:                                                                                                  #  NORMAL EXIT MODE-
052801,000472:                                                                                                  #        1). TC    WAITLIST
052802,000473:                                                                                                  #        2). DTCB  (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
052803,000474:                                                                                                  #        3). DTCB  (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
052804,000475: 
052805,000476:                                                                                                  #  ALARM OR ABORT EXIT MODE-
052806,000477:                                                                                                  #        NONE
052807,000478: 
052808,000479:                                                                                                  #  OUTPUT-
052809,000480:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
052810,000481:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
052811,000482:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
052812,000483:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
052813,000484: 
052814,000485:                                                                                                  #  ERASABLE INITIALIZATION-
052815,000486:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
052816,000487:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
052817,000488:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
052818,000489: 
052819,000490:                                                                                                  #  DEBRIS-
052820,000491:                                                                                                  #        A,Q,L
052821,000492:                                                                                                  #        LONGCADR AND LONGCADR+1
052822,000493:                                                                                                  #        LONGEXIT AND LONGEXIT+1
052823,000494:                                                                                                  #        LONGTIME AND LONGTIME+1
052824,000495: 
052825,000496:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
052826,000497: 
052827,000498:    4000                                           SETLOC   WAITF2                                
052828,000499:    4000                                           BANK                                           
052829,000500: 
052830,000501:    5332                                           COUNT*   $$/WAIT                               
052831,000502:    5332  E3,1400                                  EBANK=   LST1                                  

Page 1234

052833,000504:    5332           53305        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
052834,000505: 
052835,000506:    5333           00006                           EXTEND                                         #  OBTAIN THE 2CADR
052836,000507:    5334           50002                           NDX      Q                                     
052837,000508:    5335           30001                           DCA      0                                     
052838,000509:    5336           53301                           DXCH     LONGCADR                              
052839,000510: 
052840,000511:    5337           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
052841,000512:    5340           35343                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
052842,000513:    5341           52006                           DTCB                                           
052843,000514: 
052844,000515:    5342  E3,1400                                  EBANK=   LST1                                  
052845,000516:    5342           03425 02063  LGCL2CDR           2CADR    LNGCALL2                              
052846,000517: 
052847,000518:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
052848,000519: 
052849,000520: 01,2000                                           SETLOC   EXECB1                                
052850,000521: 01,2000                                           BANK                                           
052851,000522: 
052852,000523: 01,3425                                           COUNT*   $$/WAIT                               
052853,000524: 01,3425           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
052854,000525: 01,3426           34767                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
052855,000526: 01,3427           26002                           ADS      Q                                     
052856,000527: 01,3430           55434                           TS       LONGEXIT                              
052857,000528: 
052858,000529: 01,3431           11304        LGCLNGTM           CCS      LONGTIME                              #  TEST FOR NEG. TIME
052859,000530: 01,3432           13440                           TCF      LONGCYCL                              #  HI-ORDER POS...OK
052860,000531: 01,3433           13435                           TCF      +2                                    #           ZERO..TEST LO-ORDER
052861,000532: 01,3434           15247                           TCF      WATLST0-                              #           NEG...POODOO
052862,000533: 01,3435           31305                           CA       LONGTIME   +1                         #           ZERO..TEST LO-ORDER
052863,000534: 01,3436           00006                           EXTEND                                         
052864,000535: 01,3437           65247                           BZMF     WATLST0-                              #  LO-ORDER ZERO/NEG...POODOO
052865,000536: 
052866,000537:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
052867,000538: 
052868,000539: 01,3440           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
052869,000540: 01,3441           43452                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
052870,000541: 01,3442           21305                           DAS      LONGTIME                              
052871,000542: 
052872,000543: 01,3443           11305                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
052873,000544: 01,3444           13462                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
052874,000545:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
052875,000546:                                                                                                  #  BASIC INSTRUCTIONS
052876,000547:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
052877,000548:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
052878,000549:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
052879,000550: 01,3445           13446                           NOOP                                           #  CAN:T GET HERE        **********
052880,000551: 01,3446           13447                           TCF      +1                                    
052881,000552: 01,3447           11304                           CCS      LONGTIME                              
052882,000553: 01,3450           13462                           TCF      MUCHTIME                              

Page 1235

052884,000555: 01,3451           00000        DPBIT14            OCT      00000                                 
052885,000556: 01,3452           20000                           OCT      20000                                 
052886,000557: 
052887,000558:                                                                                                  #  LONGCALL
052888,000559: 01,3453           34753        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA T FOR WAITLIST
052889,000560: 01,3454           27305                           ADS      LONGTIME   +1                         
052890,000561: 01,3455           05223                           TC       TWIDDLE                               
052891,000562: 01,3456           03142                           ADRES    GETCADR                               #  THE ENTRY TO OUR LONGCADR
052892,000563: 01,3457           35313        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
052893,000564: 01,3460           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
052894,000565: 01,3461           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
052895,000566: 
052896,000567: 01,3462           34753        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
052897,000568: 01,3463           05233        WTLTCADR           TC       WAITLIST                              #  SET UP ANOTHER CYCLE THRU HERE (=GENADR)
052898,000569: 01,3464  E3,1400                                  EBANK=   LST1                                  
052899,000570: 01,3464           03440 02063                     2CADR    LONGCYCL                              
052900,000571: 
052901,000572: 01,3466           13457                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY

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