Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

052722,000002:                                                                                                  ## Copyright:   Public domain.
052723,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
052724,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
052725,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
052726,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
052727,000007:                                                                                                  ## Assembler:   yaYUL
052728,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052729,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
052730,000010:                                                                                                  ## Pages:       1208-1220
052731,000011:                                                                                                  ## Mod history: 2009-05-14 RSB  Adapted from the Colossus249/ file of the
052732,000012:                                                                                                  ##                              same name, using Comanche055 page images.
052733,000013:                                                                                                  ##              2010-08-29 JL   Fixed indentation.
052734,000014:                                                                                                  ##              2011-05-08 JL   Removed workaround.
052735,000015:                                                                                                  ##              2016-12-21 RSB  Proofed comment text using octopus/ProoferComments
052736,000016:                                                                                                  ##                              and corrected the errors found.
052737,000017:                                                                                                  ##              2017-01-22 RSB  Fixed comment errors detected in cross-diff vs
052738,000018:                                                                                                  ##                              Artemis 72.
052739,000019: 
052740,000020:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
052741,000021:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
052742,000022:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
052743,000023:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
052744,000024:                                                                                                  ## consequent reduction in image quality as well) are available online at
052745,000025:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
052746,000026:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
052747,000027:                                                                                                  ## (much) higher-quality images which Paul actually created.
052748,000028:                                                                                                  ##
052749,000029:                                                                                                  ## Notations on the hardcopy document read, in part:
052750,000030:                                                                                                  ##
052751,000031:                                                                                                  ##      Assemble revision 055 of AGC program Comanche by NASA
052752,000032:                                                                                                  ##      2021113-051.  10:28 APR. 1, 1969  
052753,000033:                                                                                                  ##
052754,000034:                                                                                                  ##      This AGC program shall also be referred to as
052755,000035:                                                                                                  ##                      Colossus 2A
052756,000036: 

Page 1208

052758,000038:    5134                                           BLOCK    02                                    
052759,000039: 
052760,000040:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
052761,000041: 
052762,000042:    5134                                           COUNT    02/EXEC                               
052763,000043: 
052764,000044:    5134           00004        NOVAC              INHINT                                         
052765,000045:    5135           65226                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
052766,000046:    5136           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
052767,000047: 
052768,000048:    5137           00006                           EXTEND                                         
052769,000049:    5140           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
052770,000050:    5141           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
052771,000051:    5142           52066                           DXCH     NEWLOC                                
052772,000052:    5143           35225                           CAF      EXECBANK                              
052773,000053:    5144           56004                           XCH      FBANK                                 
052774,000054:    5145           54061                           TS       EXECTEM1                              
052775,000055:    5146           12650                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
052776,000056: 
052777,000057:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
052778,000058: 
052779,000059:    5147           00004        FINDVAC            INHINT                                         
052780,000060:    5150           54063                           TS       NEWPRIO                               
052781,000061:    5151           00006                           EXTEND                                         
052782,000062:    5152           50002                           INDEX    Q                                     
052783,000063:    5153           30001                           DCA      0                                     
052784,000064:    5154           52066        SPVACIN            DXCH     NEWLOC                                
052785,000065:    5155           35225                           CAF      EXECBANK                              
052786,000066:    5156           56004                           XCH      FBANK                                 
052787,000067:    5157           12626                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
052788,000068: 
052789,000069:                                                                                                  #  TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
052790,000070:                                                                                                  #  USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
052791,000071: 
052792,000072:    5160           56002        SPVAC              XCH      Q                                     
052793,000073:    5161           67715                           AD       NEG2                                  
052794,000074:    5162           56002                           XCH      Q                                     
052795,000075:    5163           15154                           TCF      SPVACIN                               
052796,000076: 
052797,000077:                                                                                                  #  TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
052798,000078: 
052799,000079:    5164           22002        CHANG1             LXCH     Q                                     
052800,000080:    5165           35225                           CAF      EXECBANK                              
052801,000081:    5166           56006                           XCH      BBANK                                 
052802,000082:    5167           12727                           TCF      CHANJOB                               
052803,000083: 
052804,000084:                                                                                                  #  TO SUSPEND AN INTERPRETIVE JOB:
052805,000085: 
052806,000086:    5170           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
052807,000087:                                                                                                  #  ITRACE (4) REFERS TO "CHANG2".

Page 1209

052809,000089:    5171           54001                           TS       L                                     
052810,000090:    5172           35225                 +2        CAF      EXECBANK                              
052811,000091:    5173           54006                           TS       BBANK                                 
052812,000092:    5174           12726                           TCF      CHANJOB    -1                         
052813,000093: 

Page 1210

052815,000095:                                                                                                  #  TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
052816,000096: 
052817,000097:    5175           54164        JOBSLEEP           TS       LOC                                   
052818,000098:    5176           35225                           CAF      EXECBANK                              
052819,000099:    5177           54004                           TS       FBANK                                 
052820,000100:    5200           13017                           TCF      JOBSLP1                               
052821,000101: 
052822,000102:                                                                                                  #  TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
052823,000103: 
052824,000104:    5201           00004        JOBWAKE            INHINT                                         
052825,000105:    5202           54065                           TS       NEWLOC                                
052826,000106:    5203           45016                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
052827,000107:    5204           26002                           ADS      Q                                     
052828,000108:    5205           35225                           CAF      EXECBANK                              
052829,000109:    5206           56004                           XCH      FBANK                                 
052830,000110:    5207           13044                           TCF      JOBWAKE2                              
052831,000111: 
052832,000112:                                                                                                  #  TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
052833,000113: 
052834,000114:    5210           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A.  RETURNS TO
052835,000115:    5211           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
052836,000116:    5212           35225                           CAF      EXECBANK                              #  HIGHEST.  PREPARE FOR POSSIBLE BASIC-
052837,000117:    5213           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
052838,000118:    5214           54165                           TS       BANKSET                               
052839,000119:    5215           30002                           CA       Q                                     
052840,000120:    5216           13113                           TCF      PRIOCH2                               
052841,000121: 
052842,000122:                                                                                                  #  TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
052843,000123: 
052844,000124:    5217           35225        ENDOFJOB           CAF      EXECBANK                              
052845,000125:    5220           54004                           TS       FBANK                                 
052846,000126:    5221           13124                           TCF      ENDJOB1                               
052847,000127: 
052848,000128:    5222           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
052849,000129:    5223           54004                           TS       FBANK                                 #  COMPLETE.
052850,000130:    5224           16710                           TCF      Q+2                                   
052851,000131:    5225           02626        EXECBANK           CADR     FINDVAC2                              
052852,000132: 
052853,000133:    5226           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
052854,000134: 

Page 1211

052856,000136:                                                                                                  #  LOCATE AN AVAILABLE VAC AREA.
052857,000137: 
052858,000138: 01,2626                                           BANK     01                                    
052859,000139: 01,2626                                           COUNT    01/EXEC                               
052860,000140: 
052861,000141: 01,2626           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
052862,000142: 01,2627           10400                           CCS      VAC1USE                               
052863,000143: 01,2630           12643                           TCF      VACFOUND                              
052864,000144: 01,2631           10454                           CCS      VAC2USE                               
052865,000145: 01,2632           12643                           TCF      VACFOUND                              
052866,000146: 01,2633           10530                           CCS      VAC3USE                               
052867,000147: 01,2634           12643                           TCF      VACFOUND                              
052868,000148: 01,2635           10604                           CCS      VAC4USE                               
052869,000149: 01,2636           12643                           TCF      VACFOUND                              
052870,000150: 01,2637           10660                           CCS      VAC5USE                               
052871,000151: 01,2640           12643                           TCF      VACFOUND                              
052872,000152: 01,2641           07755                           TC       BAILOUT                               
052873,000153: 01,2642           01201                           OCT      1201                                  #  NO VAC AREAS.
052874,000154: 
052875,000155: 01,2643           65016        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
052876,000156: 01,2644           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
052877,000157: 01,2645           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
052878,000158: 01,2646           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
052879,000159: 01,2647           26063                           ADS      NEWPRIO                               
052880,000160: 
052881,000161: 01,2650           35021        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE.  FIND A CORE SET.
052882,000162: 01,2651           54064                           TS       LOCCTR                                
052883,000163: 01,2652           32657                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
052884,000164: 01,2653           54062        NOVAC3             TS       EXECTEM2                              
052885,000165: 01,2654           50064                           INDEX    LOCCTR                                
052886,000166: 01,2655           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
052887,000167: 01,2656           12717                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
052888,000168: 01,2657           00006        NO.CORES           DEC      6          B-14                       
052889,000169: 01,2660           12717                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
052890,000170:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
052891,000171: 

Page 1212

052893,000173: 01,2661           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
052894,000174: 01,2662           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
052895,000175: 01,2663           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
052896,000176: 01,2664           75046                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
052897,000177: 01,2665           50064                           INDEX    LOCCTR                                
052898,000178: 01,2666           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
052899,000179: 
052900,000180: 01,2667           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
052901,000181: 01,2670           12704                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY.
052902,000182: 01,2671           54121                           TS       OVFIND                                
052903,000183: 01,2672           30166                           CA       PUSHLOC                               
052904,000184: 01,2673           54120                           TS       FIXLOC                                
052905,000185: 
052906,000186: 01,2674           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
052907,000187: 01,2675           12704                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
052908,000188: 01,2676           05747                           TC       CCSHOLE                               
052909,000189: 01,2677           05747                           TC       CCSHOLE                               
052910,000190: 01,2700           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
052911,000191: 01,2701           52066                           DXCH     NEWLOC                                
052912,000192: 01,2702           52165                           DXCH     LOC                                   
052913,000193: 01,2703           15222                           TCF      ENDFIND                               
052914,000194: 
052915,000195: 01,2704           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
052916,000196: 01,2705           50064                           INDEX    LOCCTR                                
052917,000197: 01,2706           52165                           DXCH     LOC                                   
052918,000198: 01,2707           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
052919,000199: 01,2710           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
052920,000200: 01,2711           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
052921,000201: 01,2712           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
052922,000202: 01,2713           65222                           BZMF     ENDFIND                               
052923,000203: 01,2714           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
052924,000204: 01,2715           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
052925,000205: 01,2716           15222                           TCF      ENDFIND                               #  REGISTERS, ETC.
052926,000206: 
052927,000207: 01,2717           33054        NEXTCORE           CAF      COREINC                               
052928,000208: 01,2720           26064                           ADS      LOCCTR                                
052929,000209: 01,2721           10062                           CCS      EXECTEM2                              
052930,000210: 01,2722           12653                           TCF      NOVAC3                                
052931,000211: 01,2723           07755                           TC       BAILOUT                               #  NO CORE SETS.
052932,000212: 01,2724           01202                           OCT      1202                                  

Page 1213

052934,000214:                                                                                                  #  THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
052935,000215: 
052936,000216: 01,2725           22164                 -2        LXCH     LOC                                   
052937,000217: 01,2726           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
052938,000218: 01,2727           00004        CHANJOB            INHINT                                         
052939,000219: 01,2730           00006                           EXTEND                                         
052940,000220: 01,2731           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
052941,000221: 01,2732           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
052942,000222: 01,2733           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
052943,000223: 01,2734           52165                           DXCH     LOC                                   
052944,000224: 01,2735           52165                           DXCH     LOC                                   
052945,000225: 
052946,000226: 01,2736           30165                           CAE      BANKSET                               
052947,000227: 01,2737           00006                           EXTEND                                         
052948,000228: 01,2740           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
052949,000229: 01,2741           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
052950,000230: 01,2742           50067                           INDEX    NEWJOB                                
052951,000231: 01,2743           52155                           DXCH     MPAC                                  
052952,000232: 01,2744           52155                           DXCH     MPAC                                  
052953,000233: 01,2745           52157                           DXCH     MPAC       +2                         
052954,000234: 01,2746           50067                           INDEX    NEWJOB                                
052955,000235: 01,2747           52157                           DXCH     MPAC       +2                         
052956,000236: 01,2750           52157                           DXCH     MPAC       +2                         
052957,000237: 01,2751           52161                           DXCH     MPAC       +4                         
052958,000238: 01,2752           50067                           INDEX    NEWJOB                                
052959,000239: 01,2753           52161                           DXCH     MPAC       +4                         
052960,000240: 01,2754           52161                           DXCH     MPAC       +4                         
052961,000241: 01,2755           52163                           DXCH     MPAC       +6                         
052962,000242: 01,2756           50067                           INDEX    NEWJOB                                
052963,000243: 01,2757           52163                           DXCH     MPAC       +6                         
052964,000244: 01,2760           52163                           DXCH     MPAC       +6                         
052965,000245: 
052966,000246: 01,2761           35021                           CAF      ZERO                                  
052967,000247: 01,2762           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
052968,000248: 01,2763           00006                           EXTEND                                         
052969,000249: 01,2764           12767                           BZF      +3                                    
052970,000250: 01,2765           40166                           CS       PUSHLOC                               
052971,000251: 01,2766           54166                           TS       PUSHLOC                               
052972,000252: 
052973,000253: 01,2767           52167                           DXCH     PUSHLOC                               
052974,000254: 01,2770           50067                           INDEX    NEWJOB                                
052975,000255: 01,2771           52167                           DXCH     PUSHLOC                               
052976,000256: 01,2772           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
052977,000257: 01,2773           35046                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
052978,000258: 01,2774           70167                           MASK     PRIORITY                              
052979,000259: 01,2775           54120                           TS       FIXLOC                                
052980,000260: 
052981,000261: 01,2776           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
052982,000262: 01,2777           35021                           CAF      ZERO                                  
052983,000263: 01,3000           13005                           TCF      ENDPRCHG   -1                         
052984,000264: 

Page 1214

052986,000266: 01,3001           40166                           CS       PUSHLOC                               
052987,000267: 01,3002           54166                           TS       PUSHLOC                               
052988,000268: 01,3003           35017                           CAF      ONE                                   
052989,000269: 01,3004           56121                           XCH      OVFIND                                
052990,000270: 01,3005           54067                           TS       NEWJOB                                
052991,000271: 
052992,000272: 01,3006           00003        ENDPRCHG           RELINT                                         
052993,000273: 01,3007           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
052994,000274: 01,3010           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
052995,000275: 01,3011           63013                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
052996,000276: 01,3012           52006                           DTCB                                           

Page 1215

052998,000278: 01,3013           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
052999,000279: 01,3014           65017                           AD       ONE                                   
053000,000280: 01,3015           54164                           TS       LOC                                   #  RESUME.
053001,000281: 01,3016           16017                           TCF      INTRSM                                
053002,000282: 
053003,000283:                                                                                                  #  COMPLETE JOBSLEEP PREPARATIONS.
053004,000284: 
053005,000285: 01,3017           00004        JOBSLP1            INHINT                                         
053006,000286: 01,3020           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
053007,000287: 01,3021           54167                           TS       PRIORITY                              
053008,000288: 01,3022           36043                           CAF      LOW7                                  
053009,000289: 01,3023           70006                           MASK     BBANK                                 
053010,000290: 01,3024           00006                           EXTEND                                         
053011,000291: 01,3025           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
053012,000292: 01,3026           54165                           TS       BANKSET                               
053013,000293: 01,3027           45021                           CS       ZERO                                  
053014,000294: 01,3030           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
053015,000295: 01,3031           13141                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
053016,000296: 
053017,000297: 01,3032           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0.
053018,000298: 01,3033           10067                           CCS      NEWJOB                                
053019,000299: 01,3034           13037                           TCF      +3                                    #  NEWJOB STILL PNZ
053020,000300: 01,3035           00003                           RELINT                                         #  NEW JOB HAS CHANGED TO +0.  WAKE UP JOB
053021,000301: 01,3036           13233                           TCF      ADVAN      +2                         #  VIA NUDIRECT.  (VERY RARE CASE.)
053022,000302: 
053023,000303: 01,3037           35016                           CAF      TWO                                   
053024,000304: 01,3040           00006                           EXTEND                                         
053025,000305: 01,3041           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
053026,000306: 01,3042           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
053027,000307: 01,3043           12733                           TCF      CHANJOB    +4                         #        POSSIBLE SLEEPING JOB.
053028,000308: 

Page 1216

053030,000310:                                                                                                  #  TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP.  IF THE FCADR IN THE
053031,000311:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED.  IF NO JOB IS FOUND,
053032,000312:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
053033,000313: 
053034,000314: 01,3044           54061        JOBWAKE2           TS       EXECTEM1                              
053035,000315: 01,3045           35021                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
053036,000316: 01,3046           54064                           TS       LOCCTR                                
053037,000317: 01,3047           32657                           CAF      NO.CORES                              
053038,000318: 01,3050           54062        JOBWAKE4           TS       EXECTEM2                              
053039,000319: 01,3051           50064                           INDEX    LOCCTR                                
053040,000320: 01,3052           10167                           CCS      PRIORITY                              
053041,000321: 01,3053           13056                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
053042,000322: 01,3054           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
053043,000323: 01,3055           13065                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
053044,000324: 
053045,000325: 01,3056           33054        JOBWAKE3           CAF      COREINC                               
053046,000326: 01,3057           26064                           ADS      LOCCTR                                
053047,000327: 01,3060           10062                           CCS      EXECTEM2                              
053048,000328: 01,3061           13050                           TCF      JOBWAKE4                              
053049,000329: 01,3062           45017                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
053050,000330: 01,3063           54064                           TS       LOCCTR                                
053051,000331: 01,3064           15222                           TCF      ENDFIND                               
053052,000332: 
053053,000333: 01,3065           40065        WAKETEST           CS       NEWLOC                                
053054,000334: 01,3066           50064                           INDEX    LOCCTR                                
053055,000335: 01,3067           60164                           AD       LOC                                   
053056,000336: 01,3070           00006                           EXTEND                                         
053057,000337: 01,3071           13073                           BZF      +2                                    #  IF MATCH.
053058,000338: 01,3072           13056                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
053059,000339: 
053060,000340: 01,3073           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
053061,000341: 01,3074           40167                           CS       PRIORITY                              
053062,000342: 01,3075           54063                           TS       NEWPRIO                               
053063,000343: 01,3076           50064                           INDEX    LOCCTR                                
053064,000344: 01,3077           54167                           TS       PRIORITY                              
053065,000345: 
053066,000346: 01,3100           44364                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
053067,000347: 01,3101           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
053068,000348: 01,3102           65005                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
053069,000349: 01,3103           56065                           XCH      NEWLOC                                
053070,000350: 01,3104           74364                           MASK     FBANKMSK                              
053071,000351: 01,3105           50064                           INDEX    LOCCTR                                
053072,000352: 01,3106           60165                           AD       BANKSET                               
053073,000353: 01,3107           54066                           TS       NEWLOC     +1                         
053074,000354: 
053075,000355: 01,3110           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
053076,000356: 01,3111           12704                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
053077,000357: 01,3112           12674                           TCF      SPECTEST                              
053078,000358: 

Page 1217

053080,000360:                                                                                                  #  PRIORITY CHANGE.  CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
053081,000361: 
053082,000362: 01,3113           54164        PRIOCH2            TS       LOC                                   
053083,000363: 01,3114           35021                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
053084,000364: 01,3115           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
053085,000365: 01,3116           35046                           CAF      LOW9                                  
053086,000366: 01,3117           70167                           MASK     PRIORITY                              
053087,000367: 01,3120           60063                           AD       NEWPRIO                               
053088,000368: 01,3121           54167                           TS       PRIORITY                              
053089,000369: 01,3122           40000                           COM                                            
053090,000370: 01,3123           13030                           TCF      JOBSLP2                               #  AND TO EJSCAN.
053091,000371: 

Page 1218

053093,000373:                                                                                                  #  RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
053094,000374: 
053095,000375: 01,3124           00004        ENDJOB1            INHINT                                         
053096,000376: 01,3125           45021                           CS       ZERO                                  
053097,000377: 01,3126           54131                           TS       BUF        +1                         
053098,000378: 01,3127           56167                           XCH      PRIORITY                              
053099,000379: 01,3130           75046                           MASK     LOW9                                  
053100,000380: 01,3131           54001                           TS       L                                     
053101,000381: 
053102,000382: 01,3132           45226                           CS       FAKEPRET                              
053103,000383: 01,3133           60001                           AD       L                                     
053104,000384: 
053105,000385: 01,3134           00006                           EXTEND                                         
053106,000386: 01,3135           63141                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
053107,000387: 
053108,000388: 01,3136           10001                           CCS      L                                     
053109,000389: 01,3137           50000                           INDEX    A                                     
053110,000390: 01,3140           54000                           TS       0                                     
053111,000391: 
053112,000392: 01,3141           10203        EJSCAN             CCS      PRIORITY   +12D                       
053113,000393: 01,3142           03206                           TC       EJ1                                   
053114,000394: 01,3143           05747                           TC       CCSHOLE                               
053115,000395: 01,3144           13145                           TCF      +1                                    
053116,000396: 
053117,000397: 01,3145           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
053118,000398: 01,3146           03206                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
053119,000399: 01,3147           05747                           TC       CCSHOLE                               
053120,000400: 01,3150           13151                           TCF      +1                                    
053121,000401: 
053122,000402: 01,3151           10233                           CCS      PRIORITY   +36D                       
053123,000403: 01,3152           03206                           TC       EJ1                                   
053124,000404: 01,3153           67610        -CCSPR             -CCS     PRIORITY                              
053125,000405: 01,3154           13155                           TCF      +1                                    
053126,000406: 
053127,000407: 01,3155           10247                           CCS      PRIORITY   +48D                       
053128,000408: 01,3156           03206                           TC       EJ1                                   
053129,000409: 01,3157           05747                           TC       CCSHOLE                               
053130,000410: 01,3160           13161                           TCF      +1                                    
053131,000411: 
053132,000412: 01,3161           10263                           CCS      PRIORITY   +60D                       
053133,000413: 01,3162           03206                           TC       EJ1                                   
053134,000414: 01,3163           05747                           TC       CCSHOLE                               
053135,000415: 01,3164           13165                           TCF      +1                                    
053136,000416: 
053137,000417: 01,3165           10277                           CCS      PRIORITY   +72D                       
053138,000418: 01,3166           03206                           TC       EJ1                                   
053139,000419: 01,3167           05747                           TC       CCSHOLE                               
053140,000420: 01,3170           13171                           TCF      +1                                    
053141,000421: 

Page 1219

053143,000423:                                                                                                  #  EVALUATE THE RESULTS OF THE SCAN.
053144,000424: 
053145,000425: 01,3171           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
053146,000426: 01,3172           05747                           TC       CCSHOLE                               
053147,000427: 01,3173           05747                           TC       CCSHOLE                               
053148,000428: 
053149,000429: 01,3174           13176                           TCF      +2                                    
053150,000430: 01,3175           13223                           TCF      DUMMYJOB                              
053151,000431: 01,3176           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
053152,000432: 01,3177           13201                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
053153,000433: 01,3200           13005                           TCF      ENDPRCHG   -1                         
053154,000434: 
053155,000435: 01,3201           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
053156,000436: 01,3202           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
053157,000437: 01,3203           63153                           AD       -CCSPR                                
053158,000438: 01,3204           54067                           TS       NEWJOB                                
053159,000439: 01,3205           12725                           TCF      CHANJOB    -2                         
053160,000440: 
053161,000441: 01,3206           54132        EJ1                TS       BUF        +2                         
053162,000442: 01,3207           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
053163,000443: 01,3210           10000                           CCS      A                                     
053164,000444: 01,3211           40132                           CS       BUF        +2                         
053165,000445: 01,3212           13216                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
053166,000446: 01,3213           13214                           NOOP                                           
053167,000447: 01,3214           50002                           INDEX    Q                                     
053168,000448: 01,3215           00002                           TC       2                                     #  PROCEED WITH SEARCH.
053169,000449: 
053170,000450: 01,3216           54131        EJ2                TS       BUF        +1                         
053171,000451: 01,3217           00006                           EXTEND                                         
053172,000452: 01,3220           22130                           QXCH     BUF                                   #  FOR LOCATING CCS PRIORITY + X INSTR.
053173,000453: 01,3221           50130                           INDEX    BUF                                   
053174,000454: 01,3222           00002                           TC       2                                     
053175,000455: 

Page 1220

053177,000457:                                                                                                  #  IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
053178,000458:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
053179,000459: 
053180,000460: 01,3223     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
053181,000461: 
053182,000462: 01,3223           45021        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
053183,000463: 01,3224           54067                           TS       NEWJOB                                
053184,000464: 01,3225           00003                           RELINT                                         
053185,000465: 01,3226           45016                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
053186,000466: 01,3227           00006                           EXTEND                                         
053187,000467: 01,3230           03011                           WAND     DSALMOUT                              
053188,000468: 01,3231           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE?
053189,000469: 01,3232           13032                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
053190,000470: 01,3233           35016                           CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
053191,000471: 01,3234           13242                           TCF      NUDIRECT                              #  EXECUTION.
053192,000472: 
053193,000473: 01,3235           31361                           CA       SELFRET                               
053194,000474: 01,3236           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
053195,000475: 01,3237           33241                           CAF      SELFBANK                              
053196,000476: 01,3240           15230                           TCF      SUPDXCHZ   +1                         #  AND DISPATCH JOB.
053197,000477: 
053198,000478: 01,3241     1361                                  EBANK=   SELFRET                               
053199,000479: 01,3241           66102        SELFBANK           BBCON    SELFCHK                               
053200,000480: 
053201,000481: 01,3242           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
053202,000482: 01,3243           05011                           WOR      DSALMOUT                              
053203,000483: 01,3244           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
053204,000484: 01,3245           15227                           TCF      SUPDXCHZ                              
053205,000485: 
053206,000486:    5227                                           BLOCK    2                                     #  IN FIXED-FIXED SO OTHERS MAY USE.
053207,000487: 
053208,000488:    5227                                           COUNT    02/EXEC                               
053209,000489: 
053210,000490:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
053211,000491:                                                                                                  #  CALLING SEQUENCE
053212,000492:                                                                                                  #                TCF     SUPDXCHZ        WITH 2CADR OF DESIRED LOCATION IN A + L.
053213,000493: 
053214,000494:    5227           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
053215,000495:    5230           00006                 +1        EXTEND                                         
053216,000496:    5231           01007                           WRITE    SUPERBNK                              
053217,000497:    5232           54006                           TS       BBANK                                 
053218,000498:    5233           00001                           TC       L                                     
053219,000499: 
053220,000500:    5234           77677        NEG100             OCT      77677                                 
053221,000501: 
053222,000502: 
053223,000503: 

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