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.

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

Page 1221

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

Page 1222

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

Page 1223

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

Page 1224

052490,000171:    5262           56002                           XCH      Q                                     
052491,000172:    5263           54063                           TS       WAITADR                               
052492,000173:    5264           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
052493,000174:    5265           00006                           EXTEND                                         
052494,000175:    5266           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
052495,000176:    5267           54001                           TS       L                                     
052496,000177:    5270           35273                           CAF      DELAYEX                               
052497,000178:    5271           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
052498,000179:    5272           15244                           TCF      DLY2                                  
052499,000180: 
052500,000181:    5273           15312        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
052501,000182: 

Page 1225

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

Page 1226

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

Page 1227

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

Page 1228

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

Page 1229

052648,000329: 01,3333           10000                 +4        CCS      A                                     
052649,000330: 01,3334           61407                           AD       LST1       +7                         
052650,000331: 01,3335           13341                           TCF      +4                                    
052651,000332: 01,3336           64770                           AD       ONE                                   
052652,000333: 01,3337           03347                           TC       WTLST2                                
052653,000334: 01,3340           00007                           OCT      7                                     
052654,000335: 
052655,000336: 01,3341           10000                 +4        CCS      A                                     
052656,000337: 01,3342           07706        WTABORT            TC       BAILOUT                               #  NO ROOM IN THE INN.
052657,000338: 01,3343           31203                           OCT      31203                                 
052658,000339: 
052659,000340: 01,3344           64770                           AD       ONE                                   
052660,000341: 01,3345           03347                           TC       WTLST2                                
052661,000342: 01,3346           00010                           OCT      10                                    
052662,000343: 

Page 1230

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

Page 1231

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

Page 1232

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

Page 1233

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

Page 1234

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

Page 1235

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

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