Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

048122,000002:                                                                                                  ## Copyright:   Public domain.
048123,000003:                                                                                                  ## Filename:    WAITLIST.agc
048124,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
048125,000005:                                                                                                  ##              It is part of the source code for the original release
048126,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
048127,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
048128,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
048129,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
048130,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
048131,000011:                                                                                                  ##              that the code format has been changed to conform to the
048132,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
048133,000013:                                                                                                  ##              original YUL assembler.
048134,000014:                                                                                                  ## Reference:   pp. 1112-1127
048135,000015:                                                                                                  ## Assembler:   yaYUL
048136,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
048137,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
048138,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
048139,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
048140,000020:                                                                                                  ##              2016-12-26 RRB  Updated for Luminary 69.
048141,000021:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
048142,000022:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
048143,000023:                                                                                                  ##                              and fixed errors found.
048144,000024:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified in proofing Artemis 72
048145,000025:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
048146,000026:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
048147,000027:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
048148,000028:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
048149,000029:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
048150,000030: 

Page 1112

048152,000032:                                                                                                  #  PROGRAM DESCRIPTION                                                           DATE - 10 OCTOBER 1966
048153,000033:                                                                                                  #  MOD NO - 2                                                                    LOG SECTION - WAITLIST
048154,000034:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)                          ASSEMBLY SUNBURST REV 5
048155,000035:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
048156,000036:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
048157,000037: 
048158,000038:                                                                                                  #  FUNCTIONAL DESCRIPTION -
048159,000039:                                                                                                  #        PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
048160,000040:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
048161,000041:                                                                                                  #        FOLLOW.
048162,000042: 
048163,000043:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
048164,000044: 
048165,000045:                                                                                                  #                        C(LST1)    = -(T2-T1)+1
048166,000046:                                                                                                  #                        C(LST1 +1) = -(T3-T2)+1
048167,000047:                                                                                                  #                        C(LST1 +2) = -(T4-T3)+1
048168,000048:                                                                                                  #                                   .
048169,000049:                                                                                                  #                                   .
048170,000050:                                                                                                  #                        C(LST1 +6) = -(T8-T7)+1
048171,000051:                                                                                                  #                        C(LST1 +7) = -(T9-T8)+1
048172,000052: 
048173,000053:                                                                                                  #                        C(LST2)    = 2CADR OF TASK1
048174,000054:                                                                                                  #                        C(LST2 +2) = 2CADR OF TASK2
048175,000055:                                                                                                  #                                   .
048176,000056:                                                                                                  #                                   .
048177,000057:                                                                                                  #                        C(LST2 +14)= 2CADR OF TASK8
048178,000058:                                                                                                  #                        C(LST2 +16)= 2CADR OF TASK9
048179,000059: 
048180,000060:                                                                                                  #  WARNINGS -
048181,000061:                                                                                                  #  --------
048182,000062:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
048183,000063:                                                                                                  #        2)      9 TASKS MAXIMUM
048184,000064:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
048185,000065:                                                                                                  #        4)      TASKS END BY TC TASKOVER
048186,000066: 
048187,000067:                                                                                                  #  CALLING SEQUENCE -
048188,000068:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
048189,000069:                                                                                                  #        L       TC      WAITLIST
048190,000070:                                                                                                  #        L+1     2CADR   DESIRED TASK
048191,000071:                                                                                                  #        L+2     (MINOR OF 2CADR)
048192,000072:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
048193,000073: 
048194,000074:                                                                                                  #  TWIDDLE -
048195,000075:                                                                                                  #  -------
048196,000076:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
048197,000077:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1113

048199,000079:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
048200,000080:                                                                                                  #                L-1     CA      DELTAT
048201,000081:                                                                                                  #                L       TC      TWIDDLE
048202,000082:                                                                                                  #                L+1     ADRES   DESIRED TASK
048203,000083:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
048204,000084: 
048205,000085:                                                                                                  #  NORMAL EXIT MODES -
048206,000086:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
048207,000087: 
048208,000088:                                                                                                  #  ALARM OR ABORT EXIT MODES -
048209,000089:                                                                                                  #        TC      ABORT
048210,000090:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
048211,000091: 
048212,000092:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
048213,000093:                                                                                                  #        ACCOMPLISHED BY FRESH START,--LST2, ..., LST2 +16 = ENDTASK
048214,000094:                                                                                                  #                                      LST1, ..., LST1 +7  = NEG1/2
048215,000095: 
048216,000096:                                                                                                  #  OUTPUT --
048217,000097:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
048218,000098: 
048219,000099:                                                                                                  #  DEBRIS -
048220,000100:                                                                                                  #        CENTRALS - A,Q,L
048221,000101:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
048222,000102: 
048223,000103:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
048224,000104:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
048225,000105:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
048226,000106:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
048227,000107:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
048228,000108:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
048229,000109:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
048230,000110:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
048231,000111:                                                                                                  #                         (Z=0, USUALLY)
048232,000112:                                                                                                  #                LET DELTD  = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
048233,000113:                                                                                                  #                THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
048234,000114:                                                                                                  #                *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
048235,000115:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
048236,000116:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
048237,000117:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
048238,000118: 
048239,000119:    5173                                           BLOCK    02                                    

Page 1114

048241,000121:    5173  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
048242,000122: 
048243,000123:    5173                                           COUNT*   $$/WAIT                               
048244,000124:    5173           00004        TWIDDLE            INHINT                                         
048245,000125:    5174           54001                           TS       L                                     #  SAVE DELAY TIME IN L
048246,000126:    5175           34733                           CA       POSMAX                                
048247,000127:    5176           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
048248,000128:    5177           30006                           CA       BBANK                                 
048249,000129:    5200           00006                           EXTEND                                         
048250,000130:    5201           04007                           ROR      SUPERBNK                              
048251,000131:    5202           56001                           XCH      L                                     
048252,000132: 
048253,000133:    5203           00004        WAITLIST           INHINT                                         
048254,000134:    5204           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
048255,000135:    5205           54061                           TS       WAITEXIT                              #  WAITEXIT.
048256,000136:    5206           00006                           EXTEND                                         
048257,000137:    5207           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
048258,000138:    5210           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
048259,000139:    5211           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
048260,000140:    5212           35220        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
048261,000141:    5213           56006                           XCH      BBANK                                 
048262,000142:    5214           13226                           TCF      WAIT2                                 
048263,000143: 
048264,000144:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
048265,000145: 
048266,000146:    5215           52062        LVWTLIST           DXCH     WAITEXIT                              
048267,000147:    5216           64752                           AD       TWO                                   
048268,000148:    5217           52006                           DTCB                                           
048269,000149: 
048270,000150:    5220  E3,1400                                  EBANK=   LST1                                  
048271,000151:    5220           02063        WAITBB             BBCON    WAIT2                                 
048272,000152: 
048273,000153:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
048274,000154: 
048275,000155:    5221           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
048276,000156:    5222           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
048277,000157:    5223           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
048278,000158: 
048279,000159:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
048280,000160: 
048281,000161:    5224           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
048282,000162:    5225           54063                           TS       WAITADR                               
048283,000163:    5226           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
048284,000164:    5227           00006                           EXTEND                                         
048285,000165:    5230           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
048286,000166:    5231           54001                           TS       L                                     
048287,000167:    5232           35235                           CAF      DELAYEX                               
048288,000168:    5233           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
048289,000169:    5234           15212                           TCF      DLY2                                  
048290,000170: 

Page 1115

048292,000172:    5235           15257        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
048293,000173: 

Page 1116

048295,000175:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
048296,000176: 
048297,000177:    5236  E3,1400                                  EBANK=   LST1                                  
048298,000178:    5236           72537 73714  ENDTASK            -2CADR   SVCT3                                 
048299,000179: 
048300,000180:    5240           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
048301,000181:    5241           15261                           TCF      TASKOVER                              
048302,000182:    5242           15261                           TCF      TASKOVER                              
048303,000183:    5243           15244                           TCF      +1                                    
048304,000184: 
048305,000185:    5244           11304        CKIMUSE            CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
048306,000186:    5245           15256                           TCF      SVCT3X                                #  IMUSTALL.
048307,000187:    5246           15251                           TCF      +3                                    
048308,000188:    5247           15256                           TCF      SVCT3X                                
048309,000189:    5250           15256                           TCF      SVCT3X                                
048310,000190: 
048311,000191:    5251           37722                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
048312,000192:    5252           05072                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
048313,000193:    5253  E3,1460                                  EBANK=   NBDX                                  
048314,000194:    5253           03555 14063                     2CADR    NBDONLY                               
048315,000195: 
048316,000196:    5255           15261                           TCF      TASKOVER                              
048317,000197: 
048318,000198:    5256           05221        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMUZERO.
048319,000199:    5257           00764                           DEC      500        B-14                       
048320,000200:    5260           05240                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN.
048321,000201: 

Page 1117

048323,000203:                                                                                                  #  BEGIN TASK INSERTION.
048324,000204: 
048325,000205: 01,3226                                           BANK     01                                    
048326,000206: 01,3226                                           COUNT*   $$/WAIT                               
048327,000207: 01,3226           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
048328,000208: 01,3227           30002                           CA       Q                                     
048329,000209: 01,3230           00006                           EXTEND                                         
048330,000210: 01,3231           63520                           BZMF     WAITPOOH                              
048331,000211: 
048332,000212: 01,3232           40026                           CS       TIME3                                 
048333,000213: 01,3233           64744                           AD       BIT8                                  #  BIT 8 = OCT 200
048334,000214: 01,3234           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
048335,000215:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
048336,000216:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
048337,000217:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
048338,000218: 
048339,000219: 01,3235           66106                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
048340,000220: 01,3236           40000                           CS       A                                     #  T - T1 + 1.0 - 201
048341,000221: 
048342,000222:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
048343,000223: 
048344,000224: 01,3237           63365                           AD       OCT40201                              
048345,000225: 01,3240           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
048346,000226: 
048347,000227: 01,3241           10000                           CCS      A                                     #  TEST TD - T1 + 1
048348,000228: 
048349,000229: 01,3242           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
048350,000230: 01,3243           13305                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
048351,000231: 
048352,000232: 01,3244           13245                           NOOP                                           
048353,000233: 01,3245           40002                           CS       Q                                     
048354,000234: 
048355,000235:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
048356,000236:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
048357,000237:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
048358,000238:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
048359,000239: 
048360,000240: 01,3246           64736                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
048361,000241: 01,3247           64736                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
048362,000242: 01,3250           56026                           XCH      TIME3                                 
048363,000243: 01,3251           64735                           AD       NEGMAX                                
048364,000244: 01,3252           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
048365,000245: 01,3253           00006                           EXTEND                                         #  ZERO INDEX Q.
048366,000246: 01,3254           22007                           QXCH     7                                     #  (ZQ)
048367,000247: 

Page 1118

048369,000249: 01,3255           57400        WTLST4             XCH      LST1                                  
048370,000250: 01,3256           57401                           XCH      LST1       +1                         
048371,000251: 01,3257           57402                           XCH      LST1       +2                         
048372,000252: 01,3260           57403                           XCH      LST1       +3                         
048373,000253: 01,3261           57404                           XCH      LST1       +4                         
048374,000254: 01,3262           57405                           XCH      LST1       +5                         
048375,000255: 01,3263           57406                           XCH      LST1       +6                         
048376,000256: 01,3264           57407                           XCH      LST1       +7                         
048377,000257: 
048378,000258: 01,3265           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
048379,000259: 01,3266           50002                           INDEX    Q                                     
048380,000260: 01,3267           13270                           TCF      +1                                    
048381,000261: 
048382,000262: 01,3270           53411                           DXCH     LST2                                  
048383,000263: 01,3271           53413                           DXCH     LST2       +2                         
048384,000264: 01,3272           53415                           DXCH     LST2       +4                         
048385,000265: 01,3273           53417                           DXCH     LST2       +6                         
048386,000266: 01,3274           53421                           DXCH     LST2       +8D                        
048387,000267: 01,3275           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
048388,000268: 01,3276           53425                           DXCH     LST2       +12D                       
048389,000269: 01,3277           53427                           DXCH     LST2       +14D                       
048390,000270: 01,3300           53431                           DXCH     LST2       +16D                       
048391,000271: 01,3301           65236                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
048392,000272:                                                                                                  #  THE LENGTH OF THE LIST.
048393,000273: 01,3302           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
048394,000274: 01,3303           15215                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
048395,000275: 01,3304           13360                           TCF      WTABORT                               #  IT.
048396,000276: 

Page 1119

048398,000278: 01,3305           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
048399,000279: 01,3306           61401                           AD       LST1       +1                         
048400,000280: 01,3307           13313                           TCF      +4                                    
048401,000281: 01,3310           64753                           AD       ONE                                   
048402,000282: 01,3311           03371                           TC       WTLST2                                
048403,000283: 01,3312           00001                           OCT      1                                     
048404,000284: 
048405,000285: 01,3313           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
048406,000286: 01,3314           61402                           AD       LST1       +2                         
048407,000287: 01,3315           13321                           TCF      +4                                    
048408,000288: 01,3316           64753                           AD       ONE                                   
048409,000289: 01,3317           03371                           TC       WTLST2                                
048410,000290: 01,3320           00002                           OCT      2                                     
048411,000291: 
048412,000292: 01,3321           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
048413,000293: 01,3322           61403                           AD       LST1       +3                         
048414,000294: 01,3323           13327                           TCF      +4                                    
048415,000295: 01,3324           64753                           AD       ONE                                   
048416,000296: 01,3325           03371                           TC       WTLST2                                
048417,000297: 01,3326           00003                           OCT      3                                     
048418,000298: 
048419,000299: 01,3327           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
048420,000300: 01,3330           61404                           AD       LST1       +4                         
048421,000301: 01,3331           13335                           TCF      +4                                    
048422,000302: 01,3332           64753                           AD       ONE                                   
048423,000303: 01,3333           03371                           TC       WTLST2                                
048424,000304: 01,3334           00004                           OCT      4                                     
048425,000305: 
048426,000306: 01,3335           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
048427,000307: 01,3336           61405                           AD       LST1       +5                         
048428,000308: 01,3337           13343                           TCF      +4                                    
048429,000309: 01,3340           64753                           AD       ONE                                   
048430,000310: 01,3341           03371                           TC       WTLST2                                
048431,000311: 01,3342           00005                           OCT      5                                     
048432,000312: 
048433,000313: 01,3343           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
048434,000314: 01,3344           61406                           AD       LST1       +6                         
048435,000315: 01,3345           13351                           TCF      +4                                    
048436,000316: 01,3346           64753                           AD       ONE                                   
048437,000317: 01,3347           03371                           TC       WTLST2                                
048438,000318: 01,3350           00006                           OCT      6                                     
048439,000319: 

Page 1120

048441,000321: 01,3351           10000                 +4        CCS      A                                     
048442,000322: 01,3352           61407                           AD       LST1       +7                         
048443,000323: 01,3353           13357                           TCF      +4                                    
048444,000324: 01,3354           64753                           AD       ONE                                   
048445,000325: 01,3355           03371                           TC       WTLST2                                
048446,000326: 01,3356           00007                           OCT      7                                     
048447,000327: 
048448,000328: 01,3357           10000                 +4        CCS      A                                     
048449,000329: 01,3360           03366        WTABORT            TC       FILLED                                
048450,000330: 01,3361           13362                           NOOP                                           #  CAN'T GET HERE
048451,000331: 01,3362           64753                           AD       ONE                                   
048452,000332: 01,3363           03371                           TC       WTLST2                                
048453,000333: 01,3364           00010                           OCT      10                                    
048454,000334: 
048455,000335: 01,3365           40201        OCT40201           OCT      40201                                 
048456,000336: 

Page 1121

048458,000338: 01,3366           52062        FILLED             DXCH     WAITEXIT                              
048459,000339: 01,3367           05710                           TC       BAILOUT1                              #  NO ROOM IN THE INN
048460,000340: 01,3370           01203                           OCT      01203                                 
048461,000341: 

Page 1122

048463,000343:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
048464,000344:                                                                                                  #                                                   N           N+1
048465,000345:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
048466,000346:                                                                                                  #                                                              N+1
048467,000347:                                                                                                  #  THE LST1 ENTRY -(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
048468,000348:                                                                                                  #                    N+1  N                                 N
048469,000349:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
048470,000350:                                                                                                  #               N+1
048471,000351: 
048472,000352: 01,3371           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
048473,000353: 01,3372           50002                           INDEX    Q                                     
048474,000354: 01,3373           30000                           CAF      0                                     
048475,000355: 01,3374           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
048476,000356: 
048477,000357: 01,3375           34753                           CAF      ONE                                   
048478,000358: 01,3376           60064                           AD       WAITTEMP                              
048479,000359: 01,3377           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
048480,000360: 01,3400           27377                           ADS      LST1       -1                         #                 N
048481,000361: 
048482,000362: 01,3401           40064                           CS       WAITTEMP                              
048483,000363: 01,3402           50002                           INDEX    Q                                     
048484,000364: 01,3403           13255                           TCF      WTLST4                                
048485,000365: 
048486,000366:                                                                                                  #        C(TIME3)        =       1.0 - (T1 - T)
048487,000367: 
048488,000368:                                                                                                  #        C(LST1  )       =       - (T2 - T1) + 1
048489,000369:                                                                                                  #        C(LST1+1)       =       - (T3 - T2) + 1
048490,000370:                                                                                                  #        C(LST1+2)       =       - (T4 - T3) + 1
048491,000371:                                                                                                  #        C(LST1+3)       =       - (T5 - T4) + 1
048492,000372:                                                                                                  #        C(LST1+4)       =       - (T6 - T5) + 1
048493,000373: 
048494,000374:                                                                                                  #        C(LST2   )      =       2CADR TASK1
048495,000375:                                                                                                  #        C(LST2+2 )      =       2CADR TASK2
048496,000376:                                                                                                  #        C(LST2+4 )      =       2CADR TASK3
048497,000377:                                                                                                  #        C(LST2+6 )      =       2CADR TASK4
048498,000378:                                                                                                  #        C(LST2+8 )      =       2CADR TASK5
048499,000379:                                                                                                  #        C(LST2+10)      =       2CADR TASK6
048500,000380: 

Page 1123

048502,000382:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
048503,000383: 
048504,000384: 01,3404           00006        T3RUPT             EXTEND                                         
048505,000385: 01,3405           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
048506,000386: 01,3406           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
048507,000387: 01,3407           00006                           EXTEND                                         
048508,000388: 01,3410           22012                           QXCH     QRUPT                                 
048509,000389: 
048510,000390: 01,3411           34734        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
048511,000391: 01,3412           57407                           XCH      LST1       +7                         
048512,000392: 01,3413           57406                           XCH      LST1       +6                         
048513,000393: 01,3414           57405                           XCH      LST1       +5                         
048514,000394: 01,3415           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
048515,000395: 01,3416           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
048516,000396: 01,3417           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
048517,000397: 01,3420           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
048518,000398: 01,3421           57400                           XCH      LST1                                  
048519,000399: 01,3422           64733                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
048520,000400: 01,3423           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
048521,000401: 01,3424           54734                           TS       RUPTAGN                               
048522,000402: 01,3425           44755                           CS       ZERO                                  
048523,000403: 01,3426           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
048524,000404: 
048525,000405: 01,3427           00006                           EXTEND                                         #  DISPATCH TASK.
048526,000406: 01,3430           45237                           DCS      ENDTASK                               
048527,000407: 01,3431           53431                           DXCH     LST2       +16D                       
048528,000408: 01,3432           53427                           DXCH     LST2       +14D                       
048529,000409: 01,3433           53425                           DXCH     LST2       +12D                       
048530,000410: 01,3434           53423                           DXCH     LST2       +10D                       
048531,000411: 01,3435           53421                           DXCH     LST2       +8D                        
048532,000412: 01,3436           53417                           DXCH     LST2       +6                         
048533,000413: 01,3437           53415                           DXCH     LST2       +4                         
048534,000414: 01,3440           53413                           DXCH     LST2       +2                         
048535,000415: 01,3441           53411                           DXCH     LST2                                  
048536,000416: 
048537,000417: 01,3442           56001                           XCH      L                                     
048538,000418: 01,3443           00006                           EXTEND                                         
048539,000419: 01,3444           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
048540,000420: 01,3445           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
048541,000421: 01,3446           52006                           DTCB                                           
048542,000422: 

Page 1124

048544,000424:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
048545,000425: 
048546,000426:    5261                                           BLOCK    02                                    
048547,000427:    5261                                           COUNT*   $$/WAIT                               
048548,000428:    5261           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
048549,000429:    5262           35220                           CAF      WAITBB                                
048550,000430:    5263           54006                           TS       BBANK                                 
048551,000431:    5264           13411                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
048552,000432: 
048553,000433:    5265           30016                           CA       BANKRUPT                              
048554,000434:    5266           00006                           EXTEND                                         
048555,000435:    5267           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
048556,000436: 
048557,000437:    5270           00006        RESUME             EXTEND                                         
048558,000438:    5271           22012                           QXCH     QRUPT                                 
048559,000439:    5272           30016        NOQRSM             CA       BANKRUPT                              
048560,000440:    5273           56006                           XCH      BBANK                                 
048561,000441:    5274           52011        NOQBRSM            DXCH     ARUPT                                 
048562,000442:    5275           00003                           RELINT                                         
048563,000443:    5276           50017                           RESUME                                         
048564,000444: 

Page 1125

048566,000446:                                                                                                  #  LONGCALL
048567,000447:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
048568,000448:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
048569,000449:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
048570,000450: 
048571,000451:                                                                                                  #  FUNCTIONAL DESCRIPTION -
048572,000452:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
048573,000453:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
048574,000454:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
048575,000455:                                                                                                  #        START
048576,000456:                                                                                                  #  CALLING SEQUENCE -
048577,000457:                                                                                                  #                EXTEND
048578,000458:                                                                                                  #                DCA     TIMELOC
048579,000459:                                                                                                  #                TC      LONGCALL
048580,000460:                                                                                                  #                2CADR   TASKTODO
048581,000461:                                                                                                  #  NORMAL EXIT MODE -
048582,000462:                                                                                                  #        1).     TC      WAITLIST
048583,000463:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
048584,000464:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
048585,000465:                                                                                                  #  ALARM OR ABORT EXIT MODE -
048586,000466:                                                                                                  #        NONE
048587,000467:                                                                                                  #  OUTPUT -
048588,000468:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
048589,000469:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
048590,000470:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
048591,000471:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
048592,000472:                                                                                                  #  ERASABLE INITIALIZATION -
048593,000473:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
048594,000474:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
048595,000475:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
048596,000476:                                                                                                  #  DEBRIS -
048597,000477:                                                                                                  #        A,Q,L
048598,000478:                                                                                                  #        LONGCADR AND LONGCADR+1
048599,000479:                                                                                                  #        LONGEXIT AND LONGEXIT+1
048600,000480:                                                                                                  #        LONGTIME AND LONGTIME+1
048601,000481:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
048602,000482: 
048603,000483:    5277                                           BLOCK    02                                    
048604,000484:    5277  E3,1400                                  EBANK=   LST1                                  
048605,000485:    5277           53154        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
048606,000486: 
048607,000487:    5300           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1126

048609,000489:    5301           50002                           NDX      Q                                     
048610,000490:    5302           30001                           DCA      0                                     
048611,000491:    5303           53150                           DXCH     LONGCADR                              
048612,000492: 
048613,000493:    5304           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
048614,000494:    5305           35310                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
048615,000495:    5306           52006                           DTCB                                           
048616,000496: 
048617,000497:    5307  E3,1400                                  EBANK=   LST1                                  
048618,000498:    5307           03447 02063  LGCL2CDR           2CADR    LNGCALL2                              
048619,000499: 
048620,000500:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
048621,000501: 
048622,000502: 01,3447                                           BANK     01                                    
048623,000503: 01,3447                                           COUNT*   $$/WAIT                               
048624,000504: 01,3447           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
048625,000505: 01,3450           34752                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
048626,000506: 01,3451           26002                           ADS      Q                                     
048627,000507: 01,3452           55434                           TS       LONGEXIT                              
048628,000508: 
048629,000509: 01,3453           31153                           CA       LONGTIME                              #  CHECK FOR LEGITIMATE DELTA-TIME
048630,000510: 01,3454           10000                           CCS      A                                     
048631,000511: 01,3455           13463                           TCF      LONGCYCL                              #  HI-ORDER OK --> ALL IS OK.
048632,000512: 01,3456           13460                           TCF      +2                                    #  HI-ORDER ZERO --> CHECK LO-ORDER.
048633,000513: 01,3457           13516                           TCF      LONGPOOH                              #  HI-ORDER NEG. --> NEG. DT
048634,000514: 01,3460           31154                 +2        CA       LONGTIME   +1                         #  CHECK LO-ORDER FOR ZERO OR NEGATIVE.
048635,000515: 01,3461           00006                           EXTEND                                         
048636,000516: 01,3462           63516                           BZMF     LONGPOOH                              #  BAD DELTA-TIME.  ABORT
048637,000517: 
048638,000518:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
048639,000519: 
048640,000520: 01,3463           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
048641,000521: 01,3464           43475                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
048642,000522: 01,3465           21154                           DAS      LONGTIME                              
048643,000523: 
048644,000524: 01,3466           11154                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
048645,000525: 01,3467           13506                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
048646,000526:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
048647,000527:                                                                                                  #  BASIC INSTRUCTIONS
048648,000528:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
048649,000529:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
048650,000530:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
048651,000531: 01,3470           13471                           NOOP                                           #  CAN:T GET HERE **********
048652,000532: 01,3471           13472                           TCF      +1                                    
048653,000533: 01,3472           11153                           CCS      LONGTIME                              
048654,000534: 01,3473           13506                           TCF      MUCHTIME                              
048655,000535: 01,3474           00000        DPBIT14            OCT      00000                                 
048656,000536: 01,3475           20000                           OCT      20000                                 
048657,000537: 
048658,000538:                                                                                                  #  LONGCALL

Page 1127

048660,000540: 01,3476           34736        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
048661,000541: 01,3477           27154                           ADS      LONGTIME   +1                         
048662,000542: 01,3500           05203                           TC       WAITLIST                              
048663,000543: 01,3501  E3,1400                                  EBANK=   LST1                                  
048664,000544: 01,3501           03513 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
048665,000545: 
048666,000546: 01,3503           33515        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS
048667,000547: 01,3504           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
048668,000548: 01,3505           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
048669,000549: 
048670,000550: 01,3506           34736        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
048671,000551: 01,3507           05203                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
048672,000552: 01,3510  E3,1400                                  EBANK=   LST1                                  
048673,000553: 01,3510           03463 02063                     2CADR    LONGCYCL                              
048674,000554: 
048675,000555: 01,3512           13503                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
048676,000556: 
048677,000557:                                                                                                  #  *** WAITLIST TASK GETCADR ***
048678,000558: 
048679,000559: 01,3513           53150        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
048680,000560: 01,3514           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
048681,000561: 
048682,000562: 01,3515           05261        TSKOVCDR           GENADR   TASKOVER                              
048683,000563: 01,3516           53435        LONGPOOH           DXCH     LONGEXIT                              
048684,000564: 01,3517           13521                           TCF      +2                                    
048685,000565: 01,3520           52062        WAITPOOH           DXCH     WAITEXIT                              
048686,000566: 01,3521           05720                 +2        TC       POODOO1                               
048687,000567: 01,3522           01204                           OCT      01204                                 
048688,000568: 

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