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.

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

Page 1208

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

Page 1209

052793,000089:    5171           54001                           TS       L                                     
052794,000090:    5172           35225                 +2        CAF      EXECBANK                              
052795,000091:    5173           54006                           TS       BBANK                                 
052796,000092:    5174           12726                           TCF      CHANJOB    -1                         
052797,000093: 

Page 1210

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

Page 1211

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

Page 1212

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

Page 1213

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

Page 1214

052970,000266: 01,3001           40166                           CS       PUSHLOC                               
052971,000267: 01,3002           54166                           TS       PUSHLOC                               
052972,000268: 01,3003           35017                           CAF      ONE                                   
052973,000269: 01,3004           56121                           XCH      OVFIND                                
052974,000270: 01,3005           54067                           TS       NEWJOB                                
052975,000271: 
052976,000272: 01,3006           00003        ENDPRCHG           RELINT                                         
052977,000273: 01,3007           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
052978,000274: 01,3010           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
052979,000275: 01,3011           63013                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
052980,000276: 01,3012           52006                           DTCB                                           

Page 1215

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

Page 1216

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

Page 1217

053064,000360:                                                                                                  #  PRIORITY CHANGE.  CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
053065,000361: 
053066,000362: 01,3113           54164        PRIOCH2            TS       LOC                                   
053067,000363: 01,3114           35021                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
053068,000364: 01,3115           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
053069,000365: 01,3116           35046                           CAF      LOW9                                  
053070,000366: 01,3117           70167                           MASK     PRIORITY                              
053071,000367: 01,3120           60063                           AD       NEWPRIO                               
053072,000368: 01,3121           54167                           TS       PRIORITY                              
053073,000369: 01,3122           40000                           COM                                            
053074,000370: 01,3123           13030                           TCF      JOBSLP2                               #  AND TO EJSCAN.
053075,000371: 

Page 1218

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

Page 1219

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

Page 1220

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

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