Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Mike Higgins. A team of volunteers performed the transcription and proof-reading. Note that the scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's section on archive.org. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	YUL SYSTEM FOR BLK2: REVISION 0 OF PROGRAM RETRED44 BY NASA 2021100
	JUL 9, 1965
Note that the date is the date of the printout, not the date of the program revision.

004211,000002:                                                                                                  ## Copyright:   Public domain.
004212,000003:                                                                                                  ## Filename:    WAITLIST.agc
004213,000004:                                                                                                  ## Purpose:     Part of the source code for Retread 44 (revision 0). It was
004214,000005:                                                                                                  ##              the very first program for the Block II AGC, created as an
004215,000006:                                                                                                  ##              extensive rewrite of the Block I program Sunrise.
004216,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
004217,000008:                                                                                                  ##              that the code format has been changed to conform to the
004218,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
004219,000010:                                                                                                  ##              original YUL assembler.
004220,000011:                                                                                                  ## Reference:   pp. 118-123
004221,000012:                                                                                                  ## Assembler:   yaYUL
004222,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
004223,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
004224,000015:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Aurora 12 version.
004225,000016:                                                                                                  ##              2016-12-18 MAS  Transcribed.
004226,000017:                                                                                                  ##              2016-12-27 RSB  Proofed comment text using octopus/ProoferComments,
004227,000018:                                                                                                  ##                              and fixed errors found.
004228,000019:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified in proofing Artemis 72
004229,000020: 

Page 118 The log section named, WAITLIST, is circled in red.

004232,000023: 
004233,000024:                                                                                                  #  GROUNDRULE....DELTA T SHOULD NOT EXCEED 12000 (= 2 MINUTES)
004234,000025: 
004235,000026:    4251                                           SETLOC   ENDEXECF                              
004236,000027: 
004237,000028:    4251  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
004238,000029: 
004239,000030:    4251           56002        WAITLIST           XCH      Q                                     #   SAVE DELTA T IN Q AND RETURN IN
004240,000031:    4252           54624                           TS       WAITEXIT                              #  WAITEXIT.
004241,000032:    4253           00006                           EXTEND                                         
004242,000033:    4254           50000                           INDEX    A                                     
004243,000034:    4255           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
004244,000035:    4256           54630                           TS       WAITADR                               #  BBCON WILL REMAIN IN L.
004245,000036:    4257           34266        DLY2               CAF      WAITBB                                
004246,000037:    4260           56006                           XCH      BBANK                                 
004247,000038:    4261           12557                           TCF      WAIT2                                 
004248,000039: 
004249,000040:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
004250,000041: 
004251,000042:    4262           30625        LVWTLIST           CA       WAITBANK                              
004252,000043:    4263           54006                           TS       BBANK                                 
004253,000044:    4264           50624                           INDEX    WAITEXIT                              
004254,000045:    4265           00002                           TC       2                                     
004255,000046: 
004256,000047:    4266           02003        WAITBB             BBCON    WAIT2                                 
004257,000048: 
004258,000049:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.

---------------------- ("ENDTASK MUST BE ENTERED" is underlined in red)

004260,000051: 
004261,000052:    4267           73506 73774  ENDTASK            -2CADR   SVCT3                                 
004262,000053: 
004263,000054:    4271           14321        SVCT3              TCF      TASKOVER                              
004264,000055: 

Page 119

004266,000057:                                                                                                  #           BEGIN TASK INSERTION.
004267,000058: 
004268,000059: 01,2557                                           SETLOC   ENDEXECS                              
004269,000060: 
004270,000061: 01,2557           54625        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
004271,000062: 01,2560           40026                           CS       TIME3                                 
004272,000063: 01,2561           62562                           AD       +1                                    #  CCS  A  = + 1/4
004273,000064: 01,2562           10000                           CCS      A                                     #  TEST  1/4 - C(TIME3).  IF POSITIVE,
004274,000065:                                                                                                  #          IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
004275,000066:                                                                                                  #          C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
004276,000067:                                                                                                  #          ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
004277,000068: 
004278,000069: 01,2563           66042                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
004279,000070: 01,2564           40000                           CS       A                                     #  T - T1 + 3/4 - 1
004280,000071: 
004281,000072:                                                                                                  #  NORMAL CASE (C(A) MINUS) YIELDS SAME C(A)  -(-(1.0-(T1-T))+1/4)-1
004282,000073: 
004283,000074: 01,2565           62657                           AD       OCT50001                              
004284,000075: 01,2566           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
004285,000076: 
004286,000077: 01,2567           10000                           CCS      A                                     #  TEST TD - T1 + 1
004287,000078: 
004288,000079: 01,2570           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
004289,000080: 01,2571           12625                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
004290,000081: 
004291,000082: 01,2572           12573                           NOOP                                           
004292,000083: 01,2573           40002                           CS       Q                                     
004293,000084: 
004294,000085:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
004295,000086:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
004296,000087:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
004297,000088:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
004298,000089: 
004299,000090: 01,2574           67631                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
004300,000091: 01,2575           67631                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
004301,000092: 01,2576           56026                           XCH      TIME3                                 
004302,000093: 01,2577           67630                           AD       NEGMAX                                
004303,000094: 01,2600           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
004304,000095: 01,2601           00006                           EXTEND                                         #  ZERO INDEX Q.
004305,000096: 01,2602           22007                           QXCH     7                                     #  (ZQ)
004306,000097: 

Page 120

004308,000099: 01,2603           57400        WTLST4             XCH      LST1                                  
004309,000100: 01,2604           57401                           XCH      LST1       +1                         
004310,000101: 01,2605           57402                           XCH      LST1       +2                         
004311,000102: 01,2606           57403                           XCH      LST1       +3                         
004312,000103: 01,2607           57404                           XCH      LST1       +4                         
004313,000104: 
004314,000105: 01,2610           30630                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
004315,000106: 01,2611           50002                           INDEX    Q                                     
004316,000107: 01,2612           12613                           TCF      +1                                    
004317,000108: 
004318,000109: 01,2613           53406                           DXCH     LST2                                  
004319,000110: 01,2614           53410                           DXCH     LST2       +2                         
004320,000111: 01,2615           53412                           DXCH     LST2       +4                         
004321,000112: 01,2616           53414                           DXCH     LST2       +6                         
004322,000113: 01,2617           53416                           DXCH     LST2       +8D                        
004323,000114: 01,2620           53420                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
004324,000115: 01,2621           64267                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
004325,000116:                                                                                                  #    THE LENGTH OF THE LIST.
004326,000117: 01,2622           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
004327,000118: 01,2623           14262                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
004328,000119: 01,2624           12663                           TCF      WTABORT                               #  IT.
004329,000120: 

Page 121

004331,000122: 
004332,000123: 01,2625           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
004333,000124: 01,2626           61401                           AD       LST1       +1                         
004334,000125: 01,2627           12633                           TCF      +4                                    
004335,000126: 01,2630           67646                           AD       ONE                                   
004336,000127: 01,2631           02664                           TC       WTLST2                                
004337,000128: 01,2632           00001                           OCT      1                                     
004338,000129: 
004339,000130: 01,2633           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
004340,000131: 01,2634           61402                           AD       LST1       +2                         
004341,000132: 01,2635           12641                           TCF      +4                                    
004342,000133: 01,2636           67646                           AD       ONE                                   
004343,000134: 01,2637           02664                           TC       WTLST2                                
004344,000135: 01,2640           00002                           OCT      2                                     
004345,000136: 
004346,000137: 01,2641           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
004347,000138: 01,2642           61403                           AD       LST1       +3                         
004348,000139: 01,2643           12647                           TCF      +4                                    
004349,000140: 01,2644           67646                           AD       ONE                                   
004350,000141: 01,2645           02664                           TC       WTLST2                                
004351,000142: 01,2646           00003                           OCT      3                                     
004352,000143: 
004353,000144: 01,2647           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
004354,000145: 01,2650           61404                           AD       LST1       +4                         
004355,000146: 01,2651           12655                           TCF      +4                                    
004356,000147: 01,2652           67646                           AD       ONE                                   
004357,000148: 01,2653           02664                           TC       WTLST2                                
004358,000149: 01,2654           00004                           OCT      4                                     
004359,000150: 
004360,000151: 01,2655           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
004361,000152: 01,2656           12663                           TCF      WTABORT                               
004362,000153: 01,2657           50001        OCT50001           OCT      50001                                 
004363,000154: 01,2660           67646                           AD       ONE                                   
004364,000155: 01,2661           02664                           TC       WTLST2                                
004365,000156: 01,2662           00005                           OCT      5                                     
004366,000157: 
004367,000158: 01,2663           02663        WTABORT            TC       -0                                    #  LIST OVERFLOW.
004368,000159: 
004369,000160: 

Page 122

004371,000162:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
004372,000163:                                                                                                  #                                                     N           N+1
004373,000164: 
004374,000165:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
004375,000166:                                                                                                  #                                                              N+1
004376,000167: 
004377,000168:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
004378,000169:                                                                                                  #                    N+1   N                                 N
004379,000170: 
004380,000171:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
004381,000172:                                                                                                  #               N+1
004382,000173: 
004383,000174: 01,2664           54631        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
004384,000175: 01,2665           50002                           INDEX    Q                                     
004385,000176: 01,2666           30000                           CAF      0                                     
004386,000177: 01,2667           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
004387,000178: 
004388,000179: 01,2670           37646                           CAF      ONE                                   
004389,000180: 01,2671           60631                           AD       WAITTEMP                              
004390,000181: 01,2672           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
004391,000182: 01,2673           27377                           ADS      LST1       -1                         #                 N
004392,000183: 
004393,000184: 01,2674           40631                           CS       WAITTEMP                              
004394,000185: 01,2675           50002                           INDEX    Q                                     
004395,000186: 01,2676           12603                           TCF      WTLST4                                
004396,000187: 
004397,000188: 01,2677                        ENDWAITS           EQUALS                                         #  LAST SWITCHABLE LOCATION.
004398,000189: 
004399,000190:                                                                                                  #  C(TIME3)  = 1.0 - (T1 - T)
004400,000191: 
004401,000192:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
004402,000193:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
004403,000194:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
004404,000195:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
004405,000196:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
004406,000197: 
004407,000198:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
004408,000199:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
004409,000200:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
004410,000201:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
004411,000202:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
004412,000203:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
004413,000204: 

Page 123

004415,000206:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
004416,000207: 
004417,000208:    4272                                           SETLOC   SVCT3      +1                         
004418,000209: 
004419,000210:    4272           54016        T3RUPT             TS       BANKRUPT                              
004420,000211:    4273           00006                           EXTEND                                         
004421,000212:    4274           22012                           QXCH     QRUPT                                 
004422,000213: 
004423,000214:    4275           37627        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
004424,000215:    4276           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
004425,000216:    4277           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
004426,000217:    4300           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
004427,000218:    4301           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
004428,000219:    4302           57400                           XCH      LST1                                  
004429,000220:    4303           67626                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 -T USING LIST 1.
004430,000221:    4304           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
004431,000222:    4305           54636                           TS       RUPTAGN                               
004432,000223:    4306           47653                           CS       ZERO                                  
004433,000224:    4307           54636                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
004434,000225: 
004435,000226:    4310           00006                           EXTEND                                         #  DISPATCH TASK.
004436,000227:    4311           44270                           DCS      ENDTASK                               
004437,000228:    4312           53420                           DXCH     LST2       +10D                       
004438,000229:    4313           53416                           DXCH     LST2       +8D                        
004439,000230:    4314           53414                           DXCH     LST2       +6                         
004440,000231:    4315           53412                           DXCH     LST2       +4                         
004441,000232:    4316           53410                           DXCH     LST2       +2                         
004442,000233:    4317           53406                           DXCH     LST2                                  
004443,000234: 
004444,000235:    4320           52006                           DTCB                                           
004445,000236: 
004446,000237: 
004447,000238: 
004448,000239:                                                                                                  #  RETURN, AFTER EXECUTION OF TIME3 OVERFLOW TASK.
004449,000240: 
004450,000241:    4321           10636        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
004451,000242:    4322           34266                           CAF      WAITBB                                
004452,000243:    4323           54006                           TS       BBANK                                 
004453,000244:    4324           14275                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
004454,000245: 
004455,000246:    4325           00006        RESUME             EXTEND                                         
004456,000247:    4326           22012                           QXCH     QRUPT                                 
004457,000248:    4327           30016                           CA       BANKRUPT                              
004458,000249:    4330           54006                           TS       BBANK                                 
004459,000250:    4331           52011                           DXCH     ARUPT                                 
004460,000251:    4332           50017                           RESUME                                         
004461,000252: 
004462,000253:    4333                        ENDWAITF           EQUALS                                         #  LAST FIXED-FIXED LOCATION OF T3RUPT.

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