Source Code

These source-code files are part of a reconstructed copy of Comanche 45, the second release, though not the final mission release, of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45 was preceded by Comanche 44 and followed by Comanche 45/2 (the flown release). The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 45, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 44 (itself previously accurately reconstructed). Comanche 44 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 44 and 45. The now-reconstructed Comanche 45 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
There is also a detailed commentary about the reconstruction process.

Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

051970,000002:                                                                                                  ## Copyright:   Public domain.
051971,000003:                                                                                                  ## Filename:    WAITLIST.agc
051972,000004:                                                                                                  ## Purpose:     A section of Comanche revision 045.
051973,000005:                                                                                                  ##              It is part of the reconstructed source code for the
051974,000006:                                                                                                  ##              second release of the flight software for the Command
051975,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
051976,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
051977,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
051978,000010:                                                                                                  ##              exactly match those specified for Comanche 45 in NASA drawing
051979,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
051980,000012:                                                                                                  ##              reconstruction is correct.
051981,000013:                                                                                                  ## Assembler:   yaYUL
051982,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
051983,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051984,000016:                                                                                                  ## Mod history: 2020-12-06 MAS  Created from Comanche 44.
051985,000017: 

Page 1221

051987,000019:                                                                                                  #  PROGRAM DESCRIPTION                                           DATE - 10 OCTOBER 1966
051988,000020:                                                                                                  #  MOD NO - 2                                                    LOG SECTION - WAITLIST
051989,000021:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)          ASSEMBLY SUNBURST REV 5
051990,000022:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
051991,000023:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
051992,000024: 
051993,000025:                                                                                                  #  FUNCTIONAL DESCRIPTION -
051994,000026:                                                                                                  #        PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
051995,000027:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
051996,000028:                                                                                                  #        FOLLOW.
051997,000029: 
051998,000030:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
051999,000031: 
052000,000032:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
052001,000033:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
052002,000034:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
052003,000035:                                                                                                  #                                        .
052004,000036:                                                                                                  #                                        .
052005,000037:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
052006,000038:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
052007,000039: 
052008,000040:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
052009,000041:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
052010,000042:                                                                                                  #                                        .
052011,000043:                                                                                                  #                                        .
052012,000044:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
052013,000045:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
052014,000046: 
052015,000047:                                                                                                  #  WARNINGS-
052016,000048:                                                                                                  #  --------
052017,000049:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
052018,000050:                                                                                                  #        2)      9 TASKS MAXIMUM
052019,000051:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
052020,000052:                                                                                                  #        4)      TASKS END BY TC TASKOVER
052021,000053: 
052022,000054:                                                                                                  #  CALLING SEQUENCE -
052023,000055:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
052024,000056:                                                                                                  #        L       TC      WAITLIST
052025,000057:                                                                                                  #        L+1     2CADR   DESIRED TASK
052026,000058:                                                                                                  #        L+2     (MINOR OF 2CADR)
052027,000059:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
052028,000060: 
052029,000061:                                                                                                  #  TWIDDLE-
052030,000062:                                                                                                  #  -------
052031,000063:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
052032,000064:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1222

052034,000066:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
052035,000067:                                                                                                  #                L-1     CA      DELTAT
052036,000068:                                                                                                  #                L       TC      TWIDDLE
052037,000069:                                                                                                  #                L+1     ADRES   DESIRED TASK
052038,000070:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
052039,000071: 
052040,000072:                                                                                                  #  NORMAL EXIT MODES -
052041,000073:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
052042,000074: 
052043,000075:                                                                                                  #  ALARM OR ABORT EXIT MODES -
052044,000076:                                                                                                  #        TC      ABORT
052045,000077:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
052046,000078: 
052047,000079:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
052048,000080:                                                                                                  #        ACCOMPLISHED BY FRESH START,--  LST2, ..., LST2 +16 = ENDTASK
052049,000081:                                                                                                  #                                        LST1, ..., LST1 +7  = NEG1/2
052050,000082: 
052051,000083:                                                                                                  #  OUTPUT --
052052,000084:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
052053,000085: 
052054,000086:                                                                                                  #  DEBRIS -
052055,000087:                                                                                                  #        CENTRALS - A,Q,L
052056,000088:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
052057,000089: 
052058,000090:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
052059,000091:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
052060,000092:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
052061,000093:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
052062,000094:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
052063,000095:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
052064,000096:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
052065,000097:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
052066,000098:                                                                                                  #                (Z=0, USUALLY)
052067,000099:                                                                                                  #                LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
052068,000100:                                                                                                  #        THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
052069,000101:                                                                                                  #                *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
052070,000102:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
052071,000103:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
052072,000104:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
052073,000105: 
052074,000106:    5235                                           BLOCK    02                                    

Page 1223

052076,000108:    5235  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
052077,000109: 
052078,000110:    5235                                           COUNT    02/WAIT                               
052079,000111: 
052080,000112:    5235           00004        TWIDDLE            INHINT                                         
052081,000113:    5236           54001                           TS       L                                     #  SAVE DELAY TIME IN L
052082,000114:    5237           34777                           CA       POSMAX                                
052083,000115:    5240           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
052084,000116:    5241           30006                           CA       BBANK                                 
052085,000117:    5242           00006                           EXTEND                                         
052086,000118:    5243           04007                           ROR      SUPERBNK                              
052087,000119:    5244           56001                           XCH      L                                     
052088,000120: 
052089,000121:    5245           00004        WAITLIST           INHINT                                         
052090,000122:    5246           00006                           EXTEND                                         
052091,000123:    5247           65261                           BZMF     WATLST0-                              
052092,000124:    5250           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
052093,000125:    5251           54061                           TS       WAITEXIT                              #  WAITEXIT.
052094,000126:    5252           00006                           EXTEND                                         
052095,000127:    5253           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
052096,000128:    5254           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
052097,000129:    5255           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
052098,000130:    5256           35266        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
052099,000131:    5257           56006                           XCH      BBANK                                 
052100,000132:    5260           13246                           TCF      WAIT2                                 
052101,000133: 
052102,000134:    5261           05721        WATLST0-           TC       POODOO                                
052103,000135:    5262           01204                           OCT      1204                                  #  WAITLIST CALL WITH ZERO OR NEG DT
052104,000136: 
052105,000137:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
052106,000138: 
052107,000139:    5263           52062        LVWTLIST           DXCH     WAITEXIT                              
052108,000140:    5264           65016                           AD       TWO                                   
052109,000141:    5265           52006                           DTCB                                           
052110,000142: 
052111,000143:    5266  E3,1400                                  EBANK=   LST1                                  
052112,000144:    5266           02063        WAITBB             BBCON    WAIT2                                 
052113,000145: 
052114,000146:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
052115,000147: 
052116,000148:    5267           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
052117,000149:    5270           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
052118,000150:    5271           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
052119,000151: 
052120,000152:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
052121,000153: 
052122,000154:    5272           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
052123,000155:    5273           54063                           TS       WAITADR                               
052124,000156:    5274           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
052125,000157:    5275           00006                           EXTEND                                         

Page 1224

052127,000159:    5276           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
052128,000160:    5277           54001                           TS       L                                     
052129,000161:    5300           35303                           CAF      DELAYEX                               
052130,000162:    5301           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
052131,000163:    5302           15256                           TCF      DLY2                                  
052132,000164: 
052133,000165:    5303           15322        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
052134,000166: 

Page 1225

052136,000168:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
052137,000169: 
052138,000170:    5304  E3,1400                                  EBANK=   LST1                                  
052139,000171:    5304           72471 73714  ENDTASK            -2CADR   SVCT3                                 
052140,000172: 
052141,000173:    5306           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
052142,000174:    5307           15324                           TCF      TASKOVER                              
052143,000175:    5310           15324                           TCF      TASKOVER                              
052144,000176:    5311           15312                           TCF      +1                                    
052145,000177: 
052146,000178:    5312           11322                           CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
052147,000179:    5313           17717                           TCF      SVCT3X                                
052148,000180:    5314           15317                           TCF      +3                                    
052149,000181:    5315           17717                           TCF      SVCT3X                                
052150,000182:    5316           17717                           TCF      SVCT3X                                
052151,000183:    5317           37672                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
052152,000184:    5320           05134                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
052153,000185:    5321  E3,1460                                  EBANK=   NBDX                                  
052154,000186:    5321           03542 14063                     2CADR    NBDONLY                               
052155,000187: 
052156,000188:    5323           15324                           TCF      TASKOVER                              
052157,000189: 
052158,000190:    6000                                           SETLOC   FFTAG6                                
052159,000191:    6000                                           BANK                                           
052160,000192: 
052161,000193:    7717           05267        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMU ZERO
052162,000194:    7720           00764                           DEC      500        B-14                       
052163,000195:    7721           05306                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN
052164,000196: 

Page 1226

052166,000198:                                                                                                  #  BEGIN TASK INSERTION.
052167,000199: 
052168,000200: 01,3246                                           BANK     01                                    
052169,000201: 01,3246                                           COUNT    01/WAIT                               
052170,000202: 
052171,000203: 01,3246           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
052172,000204: 01,3247           40026                           CS       TIME3                                 
052173,000205: 01,3250           65010                           AD       BIT8                                  #  BIT 8 = OCT 200
052174,000206: 01,3251           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
052175,000207:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
052176,000208:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
052177,000209:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
052178,000210: 
052179,000211: 01,3252           66056                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
052180,000212: 01,3253           40000                           CS       A                                     #  T - T1 + 1.0 - 201
052181,000213: 
052182,000214:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
052183,000215: 
052184,000216: 01,3254           63402                           AD       OCT40201                              
052185,000217: 01,3255           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
052186,000218: 
052187,000219: 01,3256           10000                           CCS      A                                     #  TEST TD - T1 +1
052188,000220: 
052189,000221: 01,3257           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
052190,000222: 01,3260           13322                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
052191,000223: 
052192,000224: 01,3261           13262                           NOOP                                           
052193,000225: 01,3262           40002                           CS       Q                                     
052194,000226: 
052195,000227:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
052196,000228:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
052197,000229:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
052198,000230:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
052199,000231: 
052200,000232: 01,3263           65002                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
052201,000233: 01,3264           65002                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
052202,000234: 01,3265           56026                           XCH      TIME3                                 
052203,000235: 01,3266           65001                           AD       NEGMAX                                
052204,000236: 01,3267           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
052205,000237: 01,3270           00006                           EXTEND                                         #  ZERO INDEX Q.
052206,000238: 01,3271           22007                           QXCH     7                                     #  (ZQ)
052207,000239: 

Page 1227

052209,000241: 01,3272           57400        WTLST4             XCH      LST1                                  
052210,000242: 01,3273           57401                           XCH      LST1       +1                         
052211,000243: 01,3274           57402                           XCH      LST1       +2                         
052212,000244: 01,3275           57403                           XCH      LST1       +3                         
052213,000245: 01,3276           57404                           XCH      LST1       +4                         
052214,000246: 01,3277           57405                           XCH      LST1       +5                         
052215,000247: 01,3300           57406                           XCH      LST1       +6                         
052216,000248: 01,3301           57407                           XCH      LST1       +7                         
052217,000249: 
052218,000250: 01,3302           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
052219,000251: 01,3303           50002                           INDEX    Q                                     
052220,000252: 01,3304           13305                           TCF      +1                                    
052221,000253: 
052222,000254: 01,3305           53411                           DXCH     LST2                                  
052223,000255: 01,3306           53413                           DXCH     LST2       +2                         
052224,000256: 01,3307           53415                           DXCH     LST2       +4                         
052225,000257: 01,3310           53417                           DXCH     LST2       +6                         
052226,000258: 01,3311           53421                           DXCH     LST2       +8D                        
052227,000259: 01,3312           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
052228,000260: 01,3313           53425                           DXCH     LST2       +12D                       
052229,000261: 01,3314           53427                           DXCH     LST2       +14D                       
052230,000262: 01,3315           53431                           DXCH     LST2       +16D                       
052231,000263: 01,3316           65304                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
052232,000264:                                                                                                  #  THE LENGTH OF THE LIST.
052233,000265: 01,3317           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
052234,000266: 01,3320           15263                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
052235,000267: 01,3321           13375                           TCF      WTABORT                               #  IT.
052236,000268: 

Page 1228

052238,000270: 01,3322           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
052239,000271: 01,3323           61401                           AD       LST1       +1                         
052240,000272: 01,3324           13330                           TCF      +4                                    
052241,000273: 01,3325           65017                           AD       ONE                                   
052242,000274: 01,3326           03403                           TC       WTLST2                                
052243,000275: 01,3327           00001                           OCT      1                                     
052244,000276: 
052245,000277: 01,3330           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
052246,000278: 01,3331           61402                           AD       LST1       +2                         
052247,000279: 01,3332           13336                           TCF      +4                                    
052248,000280: 01,3333           65017                           AD       ONE                                   
052249,000281: 01,3334           03403                           TC       WTLST2                                
052250,000282: 01,3335           00002                           OCT      2                                     
052251,000283: 
052252,000284: 01,3336           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
052253,000285: 01,3337           61403                           AD       LST1       +3                         
052254,000286: 01,3340           13344                           TCF      +4                                    
052255,000287: 01,3341           65017                           AD       ONE                                   
052256,000288: 01,3342           03403                           TC       WTLST2                                
052257,000289: 01,3343           00003                           OCT      3                                     
052258,000290: 
052259,000291: 01,3344           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
052260,000292: 01,3345           61404                           AD       LST1       +4                         
052261,000293: 01,3346           13352                           TCF      +4                                    
052262,000294: 01,3347           65017                           AD       ONE                                   
052263,000295: 01,3350           03403                           TC       WTLST2                                
052264,000296: 01,3351           00004                           OCT      4                                     
052265,000297: 
052266,000298: 01,3352           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
052267,000299: 01,3353           61405                           AD       LST1       +5                         
052268,000300: 01,3354           13360                           TCF      +4                                    
052269,000301: 01,3355           65017                           AD       ONE                                   
052270,000302: 01,3356           03403                           TC       WTLST2                                
052271,000303: 01,3357           00005                           OCT      5                                     
052272,000304: 
052273,000305: 01,3360           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
052274,000306: 01,3361           61406                           AD       LST1       +6                         
052275,000307: 01,3362           13366                           TCF      +4                                    
052276,000308: 01,3363           65017                           AD       ONE                                   
052277,000309: 01,3364           03403                           TC       WTLST2                                
052278,000310: 01,3365           00006                           OCT      6                                     
052279,000311: 

Page 1229

052281,000313: 01,3366           10000                 +4        CCS      A                                     
052282,000314: 01,3367           61407                           AD       LST1       +7                         
052283,000315: 01,3370           13374                           TCF      +4                                    
052284,000316: 01,3371           65017                           AD       ONE                                   
052285,000317: 01,3372           03403                           TC       WTLST2                                
052286,000318: 01,3373           00007                           OCT      7                                     
052287,000319: 
052288,000320: 01,3374           10000                 +4        CCS      A                                     
052289,000321: 01,3375           07755        WTABORT            TC       BAILOUT                               #  NO ROOM IN THE INN.
052290,000322: 01,3376           01203                           OCT      1203                                  
052291,000323: 
052292,000324: 01,3377           65017                           AD       ONE                                   
052293,000325: 01,3400           03403                           TC       WTLST2                                
052294,000326: 01,3401           00010                           OCT      10                                    
052295,000327: 
052296,000328: 01,3402           40201        OCT40201           OCT      40201                                 
052297,000329: 

Page 1230

052299,000331:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
052300,000332:                                                                                                  #                                                   N           N+1
052301,000333: 
052302,000334:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
052303,000335:                                                                                                  #                                                              N+1
052304,000336: 
052305,000337:                                                                                                  #  THE LST1 ENTRY-(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
052306,000338:                                                                                                  #                   N+1  N                                 N
052307,000339: 
052308,000340:                                                                                                  #  THE ENTRY-(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
052309,000341:                                                                                                  #              N+1
052310,000342: 
052311,000343: 01,3403           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
052312,000344: 01,3404           50002                           INDEX    Q                                     
052313,000345: 01,3405           30000                           CAF      0                                     
052314,000346: 01,3406           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
052315,000347: 
052316,000348: 01,3407           35017                           CAF      ONE                                   
052317,000349: 01,3410           60064                           AD       WAITTEMP                              
052318,000350: 01,3411           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
052319,000351: 01,3412           27377                           ADS      LST1       -1                         #                 N
052320,000352: 
052321,000353: 01,3413           40064                           CS       WAITTEMP                              
052322,000354: 01,3414           50002                           INDEX    Q                                     
052323,000355: 01,3415           13272                           TCF      WTLST4                                
052324,000356: 
052325,000357:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
052326,000358: 
052327,000359:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
052328,000360:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
052329,000361:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
052330,000362:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
052331,000363:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
052332,000364: 
052333,000365:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
052334,000366:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
052335,000367:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
052336,000368:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
052337,000369:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
052338,000370:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
052339,000371: 

Page 1231

052341,000373:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
052342,000374: 
052343,000375: 01,3416           00006        T3RUPT             EXTEND                                         
052344,000376: 01,3417           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
052345,000377: 01,3420           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
052346,000378: 01,3421           00006                           EXTEND                                         
052347,000379: 01,3422           22012                           QXCH     QRUPT                                 
052348,000380: 
052349,000381: 01,3423           35000        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
052350,000382: 01,3424           57407                           XCH      LST1       +7                         
052351,000383: 01,3425           57406                           XCH      LST1       +6                         
052352,000384: 01,3426           57405                           XCH      LST1       +5                         
052353,000385: 01,3427           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
052354,000386: 01,3430           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
052355,000387: 01,3431           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
052356,000388: 01,3432           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
052357,000389: 01,3433           57400                           XCH      LST1                                  
052358,000390: 01,3434           64777                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
052359,000391: 01,3435           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
052360,000392: 01,3436           54734                           TS       RUPTAGN                               
052361,000393: 01,3437           45021                           CS       ZERO                                  
052362,000394: 01,3440           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
052363,000395: 
052364,000396: 01,3441           00006                           EXTEND                                         #  DISPATCH TASK.
052365,000397: 01,3442           45305                           DCS      ENDTASK                               
052366,000398: 01,3443           53431                           DXCH     LST2       +16D                       
052367,000399: 01,3444           53427                           DXCH     LST2       +14D                       
052368,000400: 01,3445           53425                           DXCH     LST2       +12D                       
052369,000401: 01,3446           53423                           DXCH     LST2       +10D                       
052370,000402: 01,3447           53421                           DXCH     LST2       +8D                        
052371,000403: 01,3450           53417                           DXCH     LST2       +6                         
052372,000404: 01,3451           53415                           DXCH     LST2       +4                         
052373,000405: 01,3452           53413                           DXCH     LST2       +2                         
052374,000406: 01,3453           53411                           DXCH     LST2                                  
052375,000407: 
052376,000408: 01,3454           56001                           XCH      L                                     
052377,000409: 01,3455           00006                           EXTEND                                         
052378,000410: 01,3456           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
052379,000411: 01,3457           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
052380,000412: 01,3460           52006                           DTCB                                           
052381,000413: 

Page 1232

052383,000415:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
052384,000416: 
052385,000417:    5324                                           BLOCK    02                                    
052386,000418:    5324                                           COUNT    02/WAIT                               
052387,000419: 
052388,000420:    5324           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
052389,000421:    5325           35266                           CAF      WAITBB                                
052390,000422:    5326           54006                           TS       BBANK                                 
052391,000423:    5327           13423                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
052392,000424: 
052393,000425:    5330           30016                           CA       BANKRUPT                              
052394,000426:    5331           00006                           EXTEND                                         
052395,000427:    5332           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
052396,000428: 
052397,000429:    5333           00006        RESUME             EXTEND                                         
052398,000430:    5334           22012                           QXCH     QRUPT                                 
052399,000431:    5335           30016        NOQRSM             CA       BANKRUPT                              
052400,000432:    5336           56006                           XCH      BBANK                                 
052401,000433:    5337           52011        NOQBRSM            DXCH     ARUPT                                 
052402,000434:    5340           00003                           RELINT                                         
052403,000435:    5341           50017                           RESUME                                         
052404,000436: 

Page 1233

052406,000438:                                                                                                  #  LONGCALL
052407,000439:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
052408,000440:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
052409,000441:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
052410,000442: 
052411,000443:                                                                                                  #  FUNCTIONAL DESCRIPTION -
052412,000444:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
052413,000445:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
052414,000446:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
052415,000447:                                                                                                  #        START
052416,000448: 
052417,000449:                                                                                                  #  CALLING SEQUENCE -
052418,000450:                                                                                                  #                EXTEND
052419,000451:                                                                                                  #                DCA     TIMELOC
052420,000452:                                                                                                  #                TC      LONGCALL
052421,000453:                                                                                                  #                2CADR   TASKTODO
052422,000454: 
052423,000455:                                                                                                  #  NORMAL EXIT MODE -
052424,000456:                                                                                                  #        1).     TC      WAITLIST
052425,000457:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
052426,000458:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
052427,000459: 
052428,000460:                                                                                                  #  ALARM OR ABORT EXIT MODE -
052429,000461:                                                                                                  #        NONE
052430,000462: 
052431,000463:                                                                                                  #  OUTPUT -
052432,000464:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
052433,000465:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
052434,000466:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
052435,000467:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
052436,000468: 
052437,000469:                                                                                                  #  ERASABLE INITIALIZATION -
052438,000470:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
052439,000471:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
052440,000472:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
052441,000473: 
052442,000474:                                                                                                  #  DEBRIS -
052443,000475:                                                                                                  #        A,Q,L
052444,000476:                                                                                                  #        LONGCADR AND LONGCADR+1
052445,000477:                                                                                                  #        LONGEXIT AND LONGEXIT+1
052446,000478:                                                                                                  #        LONGTIME AND LONGTIME+1
052447,000479: 
052448,000480:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
052449,000481: 
052450,000482:    5342                                           BLOCK    02                                    
052451,000483:    5342  E3,1400                                  EBANK=   LST1                                  
052452,000484:    5342           53140        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
052453,000485: 
052454,000486:    5343           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1234

052456,000488:    5344           50002                           NDX      Q                                     
052457,000489:    5345           30001                           DCA      0                                     
052458,000490:    5346           53134                           DXCH     LONGCADR                              
052459,000491: 
052460,000492:    5347           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
052461,000493:    5350           35353                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
052462,000494:    5351           52006                           DTCB                                           
052463,000495: 
052464,000496:    5352  E3,1400                                  EBANK=   LST1                                  
052465,000497:    5352           03461 02063  LGCL2CDR           2CADR    LNGCALL2                              
052466,000498: 
052467,000499:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
052468,000500: 
052469,000501: 01,3461                                           BANK     01                                    
052470,000502: 01,3461                                           COUNT    01/WAIT                               
052471,000503: 
052472,000504: 01,3461           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
052473,000505: 01,3462           35016                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
052474,000506: 01,3463           26002                           ADS      Q                                     
052475,000507: 01,3464           55434                           TS       LONGEXIT                              
052476,000508: 
052477,000509:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
052478,000510: 
052479,000511: 01,3465           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
052480,000512: 01,3466           43477                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
052481,000513: 01,3467           21140                           DAS      LONGTIME                              
052482,000514: 
052483,000515: 01,3470           11140                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
052484,000516: 01,3471           13510                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
052485,000517:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
052486,000518:                                                                                                  #  BASIC INSTRUCTIONS
052487,000519:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
052488,000520:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
052489,000521:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
052490,000522: 01,3472           13473                           NOOP                                           #  CAN:T GET HERE    **********
052491,000523: 01,3473           13474                           TCF      +1                                    
052492,000524: 01,3474           11137                           CCS      LONGTIME                              
052493,000525: 01,3475           13510                           TCF      MUCHTIME                              
052494,000526: 01,3476           00000        DPBIT14            OCT      00000                                 
052495,000527: 01,3477           20000                           OCT      20000                                 
052496,000528: 
052497,000529:                                                                                                  #  LONGCALL
052498,000530: 01,3500           35002        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
052499,000531: 01,3501           27140                           ADS      LONGTIME   +1                         
052500,000532: 01,3502           05245                           TC       WAITLIST                              
052501,000533: 01,3503  E3,1400                                  EBANK=   LST1                                  
052502,000534: 01,3503           03515 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
052503,000535: 
052504,000536: 01,3505           33517        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS

Page 1235

052506,000538: 01,3506           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
052507,000539: 01,3507           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
052508,000540: 
052509,000541: 01,3510           35002        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
052510,000542: 01,3511           05245                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
052511,000543: 01,3512  E3,1400                                  EBANK=   LST1                                  
052512,000544: 01,3512           03465 02063                     2CADR    LONGCYCL                              
052513,000545: 
052514,000546: 01,3514           13505                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
052515,000547: 
052516,000548:                                                                                                  #  *** WAITLIST TASK GETCADR ***
052517,000549: 
052518,000550: 01,3515           53134        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
052519,000551: 01,3516           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
052520,000552: 
052521,000553: 01,3517           05324        TSKOVCDR           GENADR   TASKOVER                              
052522,000554: 
052523,000555: 

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