Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are 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 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

053210,000002:                                                                                                  ## Copyright:   Public domain.
053211,000003:                                                                                                  ## Filename:    WAITLIST.agc
053212,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
053213,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
053214,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
053215,000007:                                                                                                  ## Assembler:   yaYUL
053216,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
053217,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
053218,000010:                                                                                                  ## Pages:       1221-1235
053219,000011:                                                                                                  ## Mod history: 2009-05-14 RSB  Adapted from the Colossus249/ file of the
053220,000012:                                                                                                  ##                              same name, using Comanche055 page images.
053221,000013:                                                                                                  ##              2010-08-29 JL   Fixed indentation.
053222,000014:                                                                                                  ##              2011-05-08 JL   Removed workarounds.
053223,000015:                                                                                                  ##              2016-12-21 RSB  Proofed comment text using octopus/ProoferComments
053224,000016:                                                                                                  ##                              and corrected the errors found.
053225,000017:                                                                                                  ##              2017-01-20 RSB  Fixed comment-text errors noted while diff'ing
053226,000018:                                                                                                  ##                              vs Colossus 249.
053227,000019:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified in proofing Artemis 72
053228,000020:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
053229,000021:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
053230,000022: 
053231,000023:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
053232,000024:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
053233,000025:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
053234,000026:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
053235,000027:                                                                                                  ## consequent reduction in image quality as well) are available online at
053236,000028:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
053237,000029:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
053238,000030:                                                                                                  ## (much) higher-quality images which Paul actually created.
053239,000031:                                                                                                  ##
053240,000032:                                                                                                  ## Notations on the hardcopy document read, in part:
053241,000033:                                                                                                  ##
053242,000034:                                                                                                  ##      Assemble revision 055 of AGC program Comanche by NASA
053243,000035:                                                                                                  ##      2021113-051.  10:28 APR. 1, 1969  
053244,000036:                                                                                                  ##
053245,000037:                                                                                                  ##      This AGC program shall also be referred to as
053246,000038:                                                                                                  ##                      Colossus 2A
053247,000039: 

Page 1221

053249,000041:                                                                                                  #  PROGRAM DESCRIPTION                                           DATE - 10 OCTOBER 1966
053250,000042:                                                                                                  #  MOD NO - 2                                                    LOG SECTION - WAITLIST
053251,000043:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)          ASSEMBLY SUNBURST REV 5
053252,000044:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
053253,000045:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
053254,000046: 
053255,000047:                                                                                                  #  FUNCTIONAL DESCRIPTION -
053256,000048:                                                                                                  #        PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
053257,000049:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
053258,000050:                                                                                                  #        FOLLOW.
053259,000051: 
053260,000052:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
053261,000053: 
053262,000054:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
053263,000055:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
053264,000056:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
053265,000057:                                                                                                  #                                        .
053266,000058:                                                                                                  #                                        .
053267,000059:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
053268,000060:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
053269,000061: 
053270,000062:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
053271,000063:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
053272,000064:                                                                                                  #                                        .
053273,000065:                                                                                                  #                                        .
053274,000066:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
053275,000067:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
053276,000068: 
053277,000069:                                                                                                  #  WARNINGS-
053278,000070:                                                                                                  #  --------
053279,000071:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
053280,000072:                                                                                                  #        2)      9 TASKS MAXIMUM
053281,000073:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
053282,000074:                                                                                                  #        4)      TASKS END BY TC TASKOVER
053283,000075: 
053284,000076:                                                                                                  #  CALLING SEQUENCE -
053285,000077:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
053286,000078:                                                                                                  #        L       TC      WAITLIST
053287,000079:                                                                                                  #        L+1     2CADR   DESIRED TASK
053288,000080:                                                                                                  #        L+2     (MINOR OF 2CADR)
053289,000081:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
053290,000082: 
053291,000083:                                                                                                  #  TWIDDLE-
053292,000084:                                                                                                  #  -------
053293,000085:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
053294,000086:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1222

053296,000088:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
053297,000089:                                                                                                  #                L-1     CA      DELTAT
053298,000090:                                                                                                  #                L       TC      TWIDDLE
053299,000091:                                                                                                  #                L+1     ADRES   DESIRED TASK
053300,000092:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
053301,000093: 
053302,000094:                                                                                                  #  NORMAL EXIT MODES -
053303,000095:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
053304,000096: 
053305,000097:                                                                                                  #  ALARM OR ABORT EXIT MODES -
053306,000098:                                                                                                  #        TC      ABORT
053307,000099:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
053308,000100: 
053309,000101:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
053310,000102:                                                                                                  #        ACCOMPLISHED BY FRESH START,--  LST2, ..., LST2 +16 = ENDTASK
053311,000103:                                                                                                  #                                        LST1, ..., LST1 +7  = NEG1/2
053312,000104: 
053313,000105:                                                                                                  #  OUTPUT --
053314,000106:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
053315,000107: 
053316,000108:                                                                                                  #  DEBRIS -
053317,000109:                                                                                                  #        CENTRALS - A,Q,L
053318,000110:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
053319,000111: 
053320,000112:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
053321,000113:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
053322,000114:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
053323,000115:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
053324,000116:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
053325,000117:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
053326,000118:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
053327,000119:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
053328,000120:                                                                                                  #                (Z=0, USUALLY)
053329,000121:                                                                                                  #                LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
053330,000122:                                                                                                  #        THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
053331,000123:                                                                                                  #                *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
053332,000124:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
053333,000125:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
053334,000126:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
053335,000127: 
053336,000128:    5235                                           BLOCK    02                                    

Page 1223

053338,000130:    5235  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
053339,000131: 
053340,000132:    5235                                           COUNT    02/WAIT                               
053341,000133: 
053342,000134:    5235           00004        TWIDDLE            INHINT                                         
053343,000135:    5236           54001                           TS       L                                     #  SAVE DELAY TIME IN L
053344,000136:    5237           34777                           CA       POSMAX                                
053345,000137:    5240           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
053346,000138:    5241           30006                           CA       BBANK                                 
053347,000139:    5242           00006                           EXTEND                                         
053348,000140:    5243           04007                           ROR      SUPERBNK                              
053349,000141:    5244           56001                           XCH      L                                     
053350,000142: 
053351,000143:    5245           00004        WAITLIST           INHINT                                         
053352,000144:    5246           00006                           EXTEND                                         
053353,000145:    5247           65261                           BZMF     WATLST0-                              
053354,000146:    5250           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
053355,000147:    5251           54061                           TS       WAITEXIT                              #  WAITEXIT.
053356,000148:    5252           00006                           EXTEND                                         
053357,000149:    5253           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
053358,000150:    5254           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
053359,000151:    5255           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
053360,000152:    5256           35266        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
053361,000153:    5257           56006                           XCH      BBANK                                 
053362,000154:    5260           13246                           TCF      WAIT2                                 
053363,000155: 
053364,000156:    5261           05721        WATLST0-           TC       POODOO                                
053365,000157:    5262           01204                           OCT      1204                                  #  WAITLIST CALL WITH ZERO OR NEG DT
053366,000158: 
053367,000159:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
053368,000160: 
053369,000161:    5263           52062        LVWTLIST           DXCH     WAITEXIT                              
053370,000162:    5264           65016                           AD       TWO                                   
053371,000163:    5265           52006                           DTCB                                           
053372,000164: 
053373,000165:    5266  E3,1400                                  EBANK=   LST1                                  
053374,000166:    5266           02063        WAITBB             BBCON    WAIT2                                 
053375,000167: 
053376,000168:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
053377,000169: 
053378,000170:    5267           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
053379,000171:    5270           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
053380,000172:    5271           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
053381,000173: 
053382,000174:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
053383,000175: 
053384,000176:    5272           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
053385,000177:    5273           54063                           TS       WAITADR                               
053386,000178:    5274           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
053387,000179:    5275           00006                           EXTEND                                         

Page 1224

053389,000181:    5276           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
053390,000182:    5277           54001                           TS       L                                     
053391,000183:    5300           35303                           CAF      DELAYEX                               
053392,000184:    5301           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
053393,000185:    5302           15256                           TCF      DLY2                                  
053394,000186: 
053395,000187:    5303           15322        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
053396,000188: 

Page 1225

053398,000190:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
053399,000191: 
053400,000192:    5304  E3,1400                                  EBANK=   LST1                                  
053401,000193:    5304           72471 73714  ENDTASK            -2CADR   SVCT3                                 
053402,000194: 
053403,000195:    5306           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
053404,000196:    5307           15324                           TCF      TASKOVER                              
053405,000197:    5310           15324                           TCF      TASKOVER                              
053406,000198:    5311           15312                           TCF      +1                                    
053407,000199: 
053408,000200:    5312           11322                           CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
053409,000201:    5313           17717                           TCF      SVCT3X                                
053410,000202:    5314           15317                           TCF      +3                                    
053411,000203:    5315           17717                           TCF      SVCT3X                                
053412,000204:    5316           17717                           TCF      SVCT3X                                
053413,000205:    5317           37672                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
053414,000206:    5320           05134                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
053415,000207:    5321  E3,1460                                  EBANK=   NBDX                                  
053416,000208:    5321           03542 14063                     2CADR    NBDONLY                               
053417,000209: 
053418,000210:    5323           15324                           TCF      TASKOVER                              
053419,000211: 
053420,000212:    6000                                           SETLOC   FFTAG6                                
053421,000213:    6000                                           BANK                                           
053422,000214: 
053423,000215:    7717           05267        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMU ZERO
053424,000216:    7720           00764                           DEC      500        B-14                       
053425,000217:    7721           05306                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN
053426,000218: 

Page 1226

053428,000220:                                                                                                  #  BEGIN TASK INSERTION.
053429,000221: 
053430,000222: 01,3246                                           BANK     01                                    
053431,000223: 01,3246                                           COUNT    01/WAIT                               
053432,000224: 
053433,000225: 01,3246           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
053434,000226: 01,3247           40026                           CS       TIME3                                 
053435,000227: 01,3250           65010                           AD       BIT8                                  #  BIT 8 = OCT 200
053436,000228: 01,3251           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
053437,000229:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
053438,000230:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
053439,000231:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
053440,000232: 
053441,000233: 01,3252           66056                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
053442,000234: 01,3253           40000                           CS       A                                     #  T - T1 + 1.0 - 201
053443,000235: 
053444,000236:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
053445,000237: 
053446,000238: 01,3254           63402                           AD       OCT40201                              
053447,000239: 01,3255           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
053448,000240: 
053449,000241: 01,3256           10000                           CCS      A                                     #  TEST TD - T1 +1
053450,000242: 
053451,000243: 01,3257           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
053452,000244: 01,3260           13322                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
053453,000245: 
053454,000246: 01,3261           13262                           NOOP                                           
053455,000247: 01,3262           40002                           CS       Q                                     
053456,000248: 
053457,000249:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
053458,000250:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
053459,000251:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
053460,000252:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
053461,000253: 
053462,000254: 01,3263           65002                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
053463,000255: 01,3264           65002                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
053464,000256: 01,3265           56026                           XCH      TIME3                                 
053465,000257: 01,3266           65001                           AD       NEGMAX                                
053466,000258: 01,3267           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
053467,000259: 01,3270           00006                           EXTEND                                         #  ZERO INDEX Q.
053468,000260: 01,3271           22007                           QXCH     7                                     #  (ZQ)
053469,000261: 

Page 1227

053471,000263: 01,3272           57400        WTLST4             XCH      LST1                                  
053472,000264: 01,3273           57401                           XCH      LST1       +1                         
053473,000265: 01,3274           57402                           XCH      LST1       +2                         
053474,000266: 01,3275           57403                           XCH      LST1       +3                         
053475,000267: 01,3276           57404                           XCH      LST1       +4                         
053476,000268: 01,3277           57405                           XCH      LST1       +5                         
053477,000269: 01,3300           57406                           XCH      LST1       +6                         
053478,000270: 01,3301           57407                           XCH      LST1       +7                         
053479,000271: 
053480,000272: 01,3302           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
053481,000273: 01,3303           50002                           INDEX    Q                                     
053482,000274: 01,3304           13305                           TCF      +1                                    
053483,000275: 
053484,000276: 01,3305           53411                           DXCH     LST2                                  
053485,000277: 01,3306           53413                           DXCH     LST2       +2                         
053486,000278: 01,3307           53415                           DXCH     LST2       +4                         
053487,000279: 01,3310           53417                           DXCH     LST2       +6                         
053488,000280: 01,3311           53421                           DXCH     LST2       +8D                        
053489,000281: 01,3312           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
053490,000282: 01,3313           53425                           DXCH     LST2       +12D                       
053491,000283: 01,3314           53427                           DXCH     LST2       +14D                       
053492,000284: 01,3315           53431                           DXCH     LST2       +16D                       
053493,000285: 01,3316           65304                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
053494,000286:                                                                                                  #  THE LENGTH OF THE LIST.
053495,000287: 01,3317           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
053496,000288: 01,3320           15263                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
053497,000289: 01,3321           13375                           TCF      WTABORT                               #  IT.
053498,000290: 

Page 1228

053500,000292: 01,3322           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
053501,000293: 01,3323           61401                           AD       LST1       +1                         
053502,000294: 01,3324           13330                           TCF      +4                                    
053503,000295: 01,3325           65017                           AD       ONE                                   
053504,000296: 01,3326           03403                           TC       WTLST2                                
053505,000297: 01,3327           00001                           OCT      1                                     
053506,000298: 
053507,000299: 01,3330           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
053508,000300: 01,3331           61402                           AD       LST1       +2                         
053509,000301: 01,3332           13336                           TCF      +4                                    
053510,000302: 01,3333           65017                           AD       ONE                                   
053511,000303: 01,3334           03403                           TC       WTLST2                                
053512,000304: 01,3335           00002                           OCT      2                                     
053513,000305: 
053514,000306: 01,3336           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
053515,000307: 01,3337           61403                           AD       LST1       +3                         
053516,000308: 01,3340           13344                           TCF      +4                                    
053517,000309: 01,3341           65017                           AD       ONE                                   
053518,000310: 01,3342           03403                           TC       WTLST2                                
053519,000311: 01,3343           00003                           OCT      3                                     
053520,000312: 
053521,000313: 01,3344           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
053522,000314: 01,3345           61404                           AD       LST1       +4                         
053523,000315: 01,3346           13352                           TCF      +4                                    
053524,000316: 01,3347           65017                           AD       ONE                                   
053525,000317: 01,3350           03403                           TC       WTLST2                                
053526,000318: 01,3351           00004                           OCT      4                                     
053527,000319: 
053528,000320: 01,3352           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
053529,000321: 01,3353           61405                           AD       LST1       +5                         
053530,000322: 01,3354           13360                           TCF      +4                                    
053531,000323: 01,3355           65017                           AD       ONE                                   
053532,000324: 01,3356           03403                           TC       WTLST2                                
053533,000325: 01,3357           00005                           OCT      5                                     
053534,000326: 
053535,000327: 01,3360           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
053536,000328: 01,3361           61406                           AD       LST1       +6                         
053537,000329: 01,3362           13366                           TCF      +4                                    
053538,000330: 01,3363           65017                           AD       ONE                                   
053539,000331: 01,3364           03403                           TC       WTLST2                                
053540,000332: 01,3365           00006                           OCT      6                                     
053541,000333: 

Page 1229

053543,000335: 01,3366           10000                 +4        CCS      A                                     
053544,000336: 01,3367           61407                           AD       LST1       +7                         
053545,000337: 01,3370           13374                           TCF      +4                                    
053546,000338: 01,3371           65017                           AD       ONE                                   
053547,000339: 01,3372           03403                           TC       WTLST2                                
053548,000340: 01,3373           00007                           OCT      7                                     
053549,000341: 
053550,000342: 01,3374           10000                 +4        CCS      A                                     
053551,000343: 01,3375           07755        WTABORT            TC       BAILOUT                               #  NO ROOM IN THE INN.
053552,000344: 01,3376           01203                           OCT      1203                                  
053553,000345: 
053554,000346: 01,3377           65017                           AD       ONE                                   
053555,000347: 01,3400           03403                           TC       WTLST2                                
053556,000348: 01,3401           00010                           OCT      10                                    
053557,000349: 
053558,000350: 01,3402           40201        OCT40201           OCT      40201                                 
053559,000351: 

Page 1230

053561,000353:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
053562,000354:                                                                                                  #                                                   N           N+1
053563,000355: 
053564,000356:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
053565,000357:                                                                                                  #                                                              N+1
053566,000358: 
053567,000359:                                                                                                  #  THE LST1 ENTRY-(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
053568,000360:                                                                                                  #                   N+1  N                                 N
053569,000361: 
053570,000362:                                                                                                  #  THE ENTRY-(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
053571,000363:                                                                                                  #              N+1
053572,000364: 
053573,000365: 01,3403           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
053574,000366: 01,3404           50002                           INDEX    Q                                     
053575,000367: 01,3405           30000                           CAF      0                                     
053576,000368: 01,3406           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
053577,000369: 
053578,000370: 01,3407           35017                           CAF      ONE                                   
053579,000371: 01,3410           60064                           AD       WAITTEMP                              
053580,000372: 01,3411           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
053581,000373: 01,3412           27377                           ADS      LST1       -1                         #                 N
053582,000374: 
053583,000375: 01,3413           40064                           CS       WAITTEMP                              
053584,000376: 01,3414           50002                           INDEX    Q                                     
053585,000377: 01,3415           13272                           TCF      WTLST4                                
053586,000378: 
053587,000379:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
053588,000380: 
053589,000381:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
053590,000382:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
053591,000383:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
053592,000384:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
053593,000385:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
053594,000386: 
053595,000387:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
053596,000388:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
053597,000389:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
053598,000390:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
053599,000391:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
053600,000392:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
053601,000393: 

Page 1231

053603,000395:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
053604,000396: 
053605,000397: 01,3416           00006        T3RUPT             EXTEND                                         
053606,000398: 01,3417           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
053607,000399: 01,3420           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
053608,000400: 01,3421           00006                           EXTEND                                         
053609,000401: 01,3422           22012                           QXCH     QRUPT                                 
053610,000402: 
053611,000403: 01,3423           35000        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
053612,000404: 01,3424           57407                           XCH      LST1       +7                         
053613,000405: 01,3425           57406                           XCH      LST1       +6                         
053614,000406: 01,3426           57405                           XCH      LST1       +5                         
053615,000407: 01,3427           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
053616,000408: 01,3430           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
053617,000409: 01,3431           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
053618,000410: 01,3432           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
053619,000411: 01,3433           57400                           XCH      LST1                                  
053620,000412: 01,3434           64777                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
053621,000413: 01,3435           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
053622,000414: 01,3436           54734                           TS       RUPTAGN                               
053623,000415: 01,3437           45021                           CS       ZERO                                  
053624,000416: 01,3440           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
053625,000417: 
053626,000418: 01,3441           00006                           EXTEND                                         #  DISPATCH TASK.
053627,000419: 01,3442           45305                           DCS      ENDTASK                               
053628,000420: 01,3443           53431                           DXCH     LST2       +16D                       
053629,000421: 01,3444           53427                           DXCH     LST2       +14D                       
053630,000422: 01,3445           53425                           DXCH     LST2       +12D                       
053631,000423: 01,3446           53423                           DXCH     LST2       +10D                       
053632,000424: 01,3447           53421                           DXCH     LST2       +8D                        
053633,000425: 01,3450           53417                           DXCH     LST2       +6                         
053634,000426: 01,3451           53415                           DXCH     LST2       +4                         
053635,000427: 01,3452           53413                           DXCH     LST2       +2                         
053636,000428: 01,3453           53411                           DXCH     LST2                                  
053637,000429: 
053638,000430: 01,3454           56001                           XCH      L                                     
053639,000431: 01,3455           00006                           EXTEND                                         
053640,000432: 01,3456           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
053641,000433: 01,3457           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
053642,000434: 01,3460           52006                           DTCB                                           
053643,000435: 

Page 1232

053645,000437:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
053646,000438: 
053647,000439:    5324                                           BLOCK    02                                    
053648,000440:    5324                                           COUNT    02/WAIT                               
053649,000441: 
053650,000442:    5324           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
053651,000443:    5325           35266                           CAF      WAITBB                                
053652,000444:    5326           54006                           TS       BBANK                                 
053653,000445:    5327           13423                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
053654,000446: 
053655,000447:    5330           30016                           CA       BANKRUPT                              
053656,000448:    5331           00006                           EXTEND                                         
053657,000449:    5332           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
053658,000450: 
053659,000451:    5333           00006        RESUME             EXTEND                                         
053660,000452:    5334           22012                           QXCH     QRUPT                                 
053661,000453:    5335           30016        NOQRSM             CA       BANKRUPT                              
053662,000454:    5336           56006                           XCH      BBANK                                 
053663,000455:    5337           52011        NOQBRSM            DXCH     ARUPT                                 
053664,000456:    5340           00003                           RELINT                                         
053665,000457:    5341           50017                           RESUME                                         
053666,000458: 

Page 1233

053668,000460:                                                                                                  #  LONGCALL
053669,000461:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
053670,000462:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
053671,000463:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
053672,000464: 
053673,000465:                                                                                                  #  FUNCTIONAL DESCRIPTION -
053674,000466:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
053675,000467:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
053676,000468:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
053677,000469:                                                                                                  #        START
053678,000470: 
053679,000471:                                                                                                  #  CALLING SEQUENCE -
053680,000472:                                                                                                  #                EXTEND
053681,000473:                                                                                                  #                DCA     TIMELOC
053682,000474:                                                                                                  #                TC      LONGCALL
053683,000475:                                                                                                  #                2CADR   TASKTODO
053684,000476: 
053685,000477:                                                                                                  #  NORMAL EXIT MODE -
053686,000478:                                                                                                  #        1).     TC      WAITLIST
053687,000479:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
053688,000480:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
053689,000481: 
053690,000482:                                                                                                  #  ALARM OR ABORT EXIT MODE -
053691,000483:                                                                                                  #        NONE
053692,000484: 
053693,000485:                                                                                                  #  OUTPUT -
053694,000486:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
053695,000487:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
053696,000488:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
053697,000489:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
053698,000490: 
053699,000491:                                                                                                  #  ERASABLE INITIALIZATION -
053700,000492:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
053701,000493:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
053702,000494:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
053703,000495: 
053704,000496:                                                                                                  #  DEBRIS -
053705,000497:                                                                                                  #        A,Q,L
053706,000498:                                                                                                  #        LONGCADR AND LONGCADR+1
053707,000499:                                                                                                  #        LONGEXIT AND LONGEXIT+1
053708,000500:                                                                                                  #        LONGTIME AND LONGTIME+1
053709,000501: 
053710,000502:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
053711,000503: 
053712,000504:    5342                                           BLOCK    02                                    
053713,000505:    5342  E3,1400                                  EBANK=   LST1                                  
053714,000506:    5342           53140        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
053715,000507: 
053716,000508:    5343           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1234

053718,000510:    5344           50002                           NDX      Q                                     
053719,000511:    5345           30001                           DCA      0                                     
053720,000512:    5346           53134                           DXCH     LONGCADR                              
053721,000513: 
053722,000514:    5347           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
053723,000515:    5350           35353                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
053724,000516:    5351           52006                           DTCB                                           
053725,000517: 
053726,000518:    5352  E3,1400                                  EBANK=   LST1                                  
053727,000519:    5352           03461 02063  LGCL2CDR           2CADR    LNGCALL2                              
053728,000520: 
053729,000521:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
053730,000522: 
053731,000523: 01,3461                                           BANK     01                                    
053732,000524: 01,3461                                           COUNT    01/WAIT                               
053733,000525: 
053734,000526: 01,3461           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
053735,000527: 01,3462           35016                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
053736,000528: 01,3463           26002                           ADS      Q                                     
053737,000529: 01,3464           55434                           TS       LONGEXIT                              
053738,000530: 
053739,000531:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
053740,000532: 
053741,000533: 01,3465           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
053742,000534: 01,3466           43477                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
053743,000535: 01,3467           21140                           DAS      LONGTIME                              
053744,000536: 
053745,000537: 01,3470           11140                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
053746,000538: 01,3471           13510                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
053747,000539:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
053748,000540:                                                                                                  #  BASIC INSTRUCTIONS
053749,000541:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
053750,000542:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
053751,000543:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
053752,000544: 01,3472           13473                           NOOP                                           #  CAN:T GET HERE    **********
053753,000545: 01,3473           13474                           TCF      +1                                    
053754,000546: 01,3474           11137                           CCS      LONGTIME                              
053755,000547: 01,3475           13510                           TCF      MUCHTIME                              
053756,000548: 01,3476           00000        DPBIT14            OCT      00000                                 
053757,000549: 01,3477           20000                           OCT      20000                                 
053758,000550: 
053759,000551:                                                                                                  #  LONGCALL
053760,000552: 01,3500           35002        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
053761,000553: 01,3501           27140                           ADS      LONGTIME   +1                         
053762,000554: 01,3502           05245                           TC       WAITLIST                              
053763,000555: 01,3503  E3,1400                                  EBANK=   LST1                                  
053764,000556: 01,3503           03515 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
053765,000557: 
053766,000558: 01,3505           33517        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS

Page 1235

053768,000560: 01,3506           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
053769,000561: 01,3507           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
053770,000562: 
053771,000563: 01,3510           35002        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
053772,000564: 01,3511           05245                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
053773,000565: 01,3512  E3,1400                                  EBANK=   LST1                                  
053774,000566: 01,3512           03465 02063                     2CADR    LONGCYCL                              
053775,000567: 
053776,000568: 01,3514           13505                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
053777,000569: 
053778,000570:                                                                                                  #  *** WAITLIST TASK GETCADR ***
053779,000571: 
053780,000572: 01,3515           53134        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
053781,000573: 01,3516           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
053782,000574: 
053783,000575: 01,3517           05324        TSKOVCDR           GENADR   TASKOVER                              
053784,000576: 
053785,000577: 

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