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.

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

Page 1221

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

Page 1222

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

Page 1223

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

Page 1224

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

Page 1225

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

Page 1226

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

Page 1227

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

Page 1228

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

Page 1229

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

Page 1230

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

Page 1231

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

Page 1232

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

Page 1233

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

Page 1234

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

Page 1235

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

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