Source Code

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

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

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

051385,000002:                                                                                                  ## Copyright:   Public domain.
051386,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
051387,000004:                                                                                                  ## Purpose:     A section of Manche45 revision 2.
051388,000005:                                                                                                  ##              It is part of the reconstructed source code for the
051389,000006:                                                                                                  ##              final, flown release of the flight software for the Command
051390,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
051391,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
051392,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
051393,000010:                                                                                                  ##              exactly match those specified for Manche 45/2 in NASA drawing
051394,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
051395,000012:                                                                                                  ##              reconstruction is correct.
051396,000013:                                                                                                  ## Assembler:   yaYUL
051397,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
051398,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051399,000016:                                                                                                  ## Mod history: 2020-12-24 MAS  Created from Comanche 45.
051400,000017: 

Page 1208

051402,000019:    5134                                           BLOCK    02                                    
051403,000020: 
051404,000021:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
051405,000022: 
051406,000023:    5134                                           COUNT    02/EXEC                               
051407,000024: 
051408,000025:    5134           00004        NOVAC              INHINT                                         
051409,000026:    5135           65226                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
051410,000027:    5136           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
051411,000028: 
051412,000029:    5137           00006                           EXTEND                                         
051413,000030:    5140           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
051414,000031:    5141           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
051415,000032:    5142           52066                           DXCH     NEWLOC                                
051416,000033:    5143           35225                           CAF      EXECBANK                              
051417,000034:    5144           56004                           XCH      FBANK                                 
051418,000035:    5145           54061                           TS       EXECTEM1                              
051419,000036:    5146           12650                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
051420,000037: 
051421,000038:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
051422,000039: 
051423,000040:    5147           00004        FINDVAC            INHINT                                         
051424,000041:    5150           54063                           TS       NEWPRIO                               
051425,000042:    5151           00006                           EXTEND                                         
051426,000043:    5152           50002                           INDEX    Q                                     
051427,000044:    5153           30001                           DCA      0                                     
051428,000045:    5154           52066        SPVACIN            DXCH     NEWLOC                                
051429,000046:    5155           35225                           CAF      EXECBANK                              
051430,000047:    5156           56004                           XCH      FBANK                                 
051431,000048:    5157           12626                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
051432,000049: 
051433,000050:                                                                                                  #  TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
051434,000051:                                                                                                  #  USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
051435,000052: 
051436,000053:    5160           56002        SPVAC              XCH      Q                                     
051437,000054:    5161           67715                           AD       NEG2                                  
051438,000055:    5162           56002                           XCH      Q                                     
051439,000056:    5163           15154                           TCF      SPVACIN                               
051440,000057: 
051441,000058:                                                                                                  #  TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
051442,000059: 
051443,000060:    5164           22002        CHANG1             LXCH     Q                                     
051444,000061:    5165           35225                           CAF      EXECBANK                              
051445,000062:    5166           56006                           XCH      BBANK                                 
051446,000063:    5167           12727                           TCF      CHANJOB                               
051447,000064: 
051448,000065:                                                                                                  #  TO SUSPEND AN INTERPRETIVE JOB:
051449,000066: 
051450,000067:    5170           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
051451,000068:                                                                                                  #  ITRACE (4) REFERS TO "CHANG2".

Page 1209

051453,000070:    5171           54001                           TS       L                                     
051454,000071:    5172           35225                 +2        CAF      EXECBANK                              
051455,000072:    5173           54006                           TS       BBANK                                 
051456,000073:    5174           12726                           TCF      CHANJOB    -1                         
051457,000074: 

Page 1210

051459,000076:                                                                                                  #  TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
051460,000077: 
051461,000078:    5175           54164        JOBSLEEP           TS       LOC                                   
051462,000079:    5176           35225                           CAF      EXECBANK                              
051463,000080:    5177           54004                           TS       FBANK                                 
051464,000081:    5200           13017                           TCF      JOBSLP1                               
051465,000082: 
051466,000083:                                                                                                  #  TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
051467,000084: 
051468,000085:    5201           00004        JOBWAKE            INHINT                                         
051469,000086:    5202           54065                           TS       NEWLOC                                
051470,000087:    5203           45016                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
051471,000088:    5204           26002                           ADS      Q                                     
051472,000089:    5205           35225                           CAF      EXECBANK                              
051473,000090:    5206           56004                           XCH      FBANK                                 
051474,000091:    5207           13044                           TCF      JOBWAKE2                              
051475,000092: 
051476,000093:                                                                                                  #  TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
051477,000094: 
051478,000095:    5210           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A.  RETURNS TO
051479,000096:    5211           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
051480,000097:    5212           35225                           CAF      EXECBANK                              #  HIGHEST.  PREPARE FOR POSSIBLE BASIC-
051481,000098:    5213           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
051482,000099:    5214           54165                           TS       BANKSET                               
051483,000100:    5215           30002                           CA       Q                                     
051484,000101:    5216           13113                           TCF      PRIOCH2                               
051485,000102: 
051486,000103:                                                                                                  #  TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
051487,000104: 
051488,000105:    5217           35225        ENDOFJOB           CAF      EXECBANK                              
051489,000106:    5220           54004                           TS       FBANK                                 
051490,000107:    5221           13124                           TCF      ENDJOB1                               
051491,000108: 
051492,000109:    5222           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
051493,000110:    5223           54004                           TS       FBANK                                 #  COMPLETE.
051494,000111:    5224           16710                           TCF      Q+2                                   
051495,000112:    5225           02626        EXECBANK           CADR     FINDVAC2                              
051496,000113: 
051497,000114:    5226           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
051498,000115: 

Page 1211

051500,000117:                                                                                                  #  LOCATE AN AVAILABLE VAC AREA.
051501,000118: 
051502,000119: 01,2626                                           BANK     01                                    
051503,000120: 01,2626                                           COUNT    01/EXEC                               
051504,000121: 
051505,000122: 01,2626           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
051506,000123: 01,2627           10400                           CCS      VAC1USE                               
051507,000124: 01,2630           12643                           TCF      VACFOUND                              
051508,000125: 01,2631           10454                           CCS      VAC2USE                               
051509,000126: 01,2632           12643                           TCF      VACFOUND                              
051510,000127: 01,2633           10530                           CCS      VAC3USE                               
051511,000128: 01,2634           12643                           TCF      VACFOUND                              
051512,000129: 01,2635           10604                           CCS      VAC4USE                               
051513,000130: 01,2636           12643                           TCF      VACFOUND                              
051514,000131: 01,2637           10660                           CCS      VAC5USE                               
051515,000132: 01,2640           12643                           TCF      VACFOUND                              
051516,000133: 01,2641           07755                           TC       BAILOUT                               
051517,000134: 01,2642           01201                           OCT      1201                                  #  NO VAC AREAS.
051518,000135: 
051519,000136: 01,2643           65016        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
051520,000137: 01,2644           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
051521,000138: 01,2645           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
051522,000139: 01,2646           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
051523,000140: 01,2647           26063                           ADS      NEWPRIO                               
051524,000141: 
051525,000142: 01,2650           35021        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE.  FIND A CORE SET.
051526,000143: 01,2651           54064                           TS       LOCCTR                                
051527,000144: 01,2652           32657                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
051528,000145: 01,2653           54062        NOVAC3             TS       EXECTEM2                              
051529,000146: 01,2654           50064                           INDEX    LOCCTR                                
051530,000147: 01,2655           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
051531,000148: 01,2656           12717                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
051532,000149: 01,2657           00006        NO.CORES           DEC      6          B-14                       
051533,000150: 01,2660           12717                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
051534,000151:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
051535,000152: 

Page 1212

051537,000154: 01,2661           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
051538,000155: 01,2662           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
051539,000156: 01,2663           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
051540,000157: 01,2664           75046                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
051541,000158: 01,2665           50064                           INDEX    LOCCTR                                
051542,000159: 01,2666           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
051543,000160: 
051544,000161: 01,2667           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
051545,000162: 01,2670           12704                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY.
051546,000163: 01,2671           54121                           TS       OVFIND                                
051547,000164: 01,2672           30166                           CA       PUSHLOC                               
051548,000165: 01,2673           54120                           TS       FIXLOC                                
051549,000166: 
051550,000167: 01,2674           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
051551,000168: 01,2675           12704                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
051552,000169: 01,2676           05741                           TC       CCSHOLE                               
051553,000170: 01,2677           05741                           TC       CCSHOLE                               
051554,000171: 01,2700           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
051555,000172: 01,2701           52066                           DXCH     NEWLOC                                
051556,000173: 01,2702           52165                           DXCH     LOC                                   
051557,000174: 01,2703           15222                           TCF      ENDFIND                               
051558,000175: 
051559,000176: 01,2704           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
051560,000177: 01,2705           50064                           INDEX    LOCCTR                                
051561,000178: 01,2706           52165                           DXCH     LOC                                   
051562,000179: 01,2707           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
051563,000180: 01,2710           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
051564,000181: 01,2711           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
051565,000182: 01,2712           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
051566,000183: 01,2713           65222                           BZMF     ENDFIND                               
051567,000184: 01,2714           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
051568,000185: 01,2715           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
051569,000186: 01,2716           15222                           TCF      ENDFIND                               #  REGISTERS, ETC.
051570,000187: 
051571,000188: 01,2717           33054        NEXTCORE           CAF      COREINC                               
051572,000189: 01,2720           26064                           ADS      LOCCTR                                
051573,000190: 01,2721           10062                           CCS      EXECTEM2                              
051574,000191: 01,2722           12653                           TCF      NOVAC3                                
051575,000192: 01,2723           07755                           TC       BAILOUT                               #  NO CORE SETS.
051576,000193: 01,2724           01202                           OCT      1202                                  

Page 1213

051578,000195:                                                                                                  #  THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
051579,000196: 
051580,000197: 01,2725           22164                 -2        LXCH     LOC                                   
051581,000198: 01,2726           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
051582,000199: 01,2727           00004        CHANJOB            INHINT                                         
051583,000200: 01,2730           00006                           EXTEND                                         
051584,000201: 01,2731           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
051585,000202: 01,2732           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
051586,000203: 01,2733           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
051587,000204: 01,2734           52165                           DXCH     LOC                                   
051588,000205: 01,2735           52165                           DXCH     LOC                                   
051589,000206: 
051590,000207: 01,2736           30165                           CAE      BANKSET                               
051591,000208: 01,2737           00006                           EXTEND                                         
051592,000209: 01,2740           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
051593,000210: 01,2741           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
051594,000211: 01,2742           50067                           INDEX    NEWJOB                                
051595,000212: 01,2743           52155                           DXCH     MPAC                                  
051596,000213: 01,2744           52155                           DXCH     MPAC                                  
051597,000214: 01,2745           52157                           DXCH     MPAC       +2                         
051598,000215: 01,2746           50067                           INDEX    NEWJOB                                
051599,000216: 01,2747           52157                           DXCH     MPAC       +2                         
051600,000217: 01,2750           52157                           DXCH     MPAC       +2                         
051601,000218: 01,2751           52161                           DXCH     MPAC       +4                         
051602,000219: 01,2752           50067                           INDEX    NEWJOB                                
051603,000220: 01,2753           52161                           DXCH     MPAC       +4                         
051604,000221: 01,2754           52161                           DXCH     MPAC       +4                         
051605,000222: 01,2755           52163                           DXCH     MPAC       +6                         
051606,000223: 01,2756           50067                           INDEX    NEWJOB                                
051607,000224: 01,2757           52163                           DXCH     MPAC       +6                         
051608,000225: 01,2760           52163                           DXCH     MPAC       +6                         
051609,000226: 
051610,000227: 01,2761           35021                           CAF      ZERO                                  
051611,000228: 01,2762           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
051612,000229: 01,2763           00006                           EXTEND                                         
051613,000230: 01,2764           12767                           BZF      +3                                    
051614,000231: 01,2765           40166                           CS       PUSHLOC                               
051615,000232: 01,2766           54166                           TS       PUSHLOC                               
051616,000233: 
051617,000234: 01,2767           52167                           DXCH     PUSHLOC                               
051618,000235: 01,2770           50067                           INDEX    NEWJOB                                
051619,000236: 01,2771           52167                           DXCH     PUSHLOC                               
051620,000237: 01,2772           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
051621,000238: 01,2773           35046                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
051622,000239: 01,2774           70167                           MASK     PRIORITY                              
051623,000240: 01,2775           54120                           TS       FIXLOC                                
051624,000241: 
051625,000242: 01,2776           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
051626,000243: 01,2777           35021                           CAF      ZERO                                  
051627,000244: 01,3000           13005                           TCF      ENDPRCHG   -1                         
051628,000245: 

Page 1214

051630,000247: 01,3001           40166                           CS       PUSHLOC                               
051631,000248: 01,3002           54166                           TS       PUSHLOC                               
051632,000249: 01,3003           35017                           CAF      ONE                                   
051633,000250: 01,3004           56121                           XCH      OVFIND                                
051634,000251: 01,3005           54067                           TS       NEWJOB                                
051635,000252: 
051636,000253: 01,3006           00003        ENDPRCHG           RELINT                                         
051637,000254: 01,3007           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
051638,000255: 01,3010           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
051639,000256: 01,3011           63013                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
051640,000257: 01,3012           52006                           DTCB                                           

Page 1215

051642,000259: 01,3013           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
051643,000260: 01,3014           65017                           AD       ONE                                   
051644,000261: 01,3015           54164                           TS       LOC                                   #  RESUME.
051645,000262: 01,3016           16017                           TCF      INTRSM                                
051646,000263: 
051647,000264:                                                                                                  #  COMPLETE JOBSLEEP PREPARATIONS.
051648,000265: 
051649,000266: 01,3017           00004        JOBSLP1            INHINT                                         
051650,000267: 01,3020           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
051651,000268: 01,3021           54167                           TS       PRIORITY                              
051652,000269: 01,3022           36043                           CAF      LOW7                                  
051653,000270: 01,3023           70006                           MASK     BBANK                                 
051654,000271: 01,3024           00006                           EXTEND                                         
051655,000272: 01,3025           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
051656,000273: 01,3026           54165                           TS       BANKSET                               
051657,000274: 01,3027           45021                           CS       ZERO                                  
051658,000275: 01,3030           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
051659,000276: 01,3031           13141                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
051660,000277: 
051661,000278: 01,3032           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0.
051662,000279: 01,3033           10067                           CCS      NEWJOB                                
051663,000280: 01,3034           13037                           TCF      +3                                    #  NEWJOB STILL PNZ
051664,000281: 01,3035           00003                           RELINT                                         #  NEW JOB HAS CHANGED TO +0.  WAKE UP JOB
051665,000282: 01,3036           13233                           TCF      ADVAN      +2                         #  VIA NUDIRECT.  (VERY RARE CASE.)
051666,000283: 
051667,000284: 01,3037           35016                           CAF      TWO                                   
051668,000285: 01,3040           00006                           EXTEND                                         
051669,000286: 01,3041           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
051670,000287: 01,3042           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
051671,000288: 01,3043           12733                           TCF      CHANJOB    +4                         #        POSSIBLE SLEEPING JOB.
051672,000289: 

Page 1216

051674,000291:                                                                                                  #  TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP.  IF THE FCADR IN THE
051675,000292:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED.  IF NO JOB IS FOUND,
051676,000293:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
051677,000294: 
051678,000295: 01,3044           54061        JOBWAKE2           TS       EXECTEM1                              
051679,000296: 01,3045           35021                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
051680,000297: 01,3046           54064                           TS       LOCCTR                                
051681,000298: 01,3047           32657                           CAF      NO.CORES                              
051682,000299: 01,3050           54062        JOBWAKE4           TS       EXECTEM2                              
051683,000300: 01,3051           50064                           INDEX    LOCCTR                                
051684,000301: 01,3052           10167                           CCS      PRIORITY                              
051685,000302: 01,3053           13056                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
051686,000303: 01,3054           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
051687,000304: 01,3055           13065                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
051688,000305: 
051689,000306: 01,3056           33054        JOBWAKE3           CAF      COREINC                               
051690,000307: 01,3057           26064                           ADS      LOCCTR                                
051691,000308: 01,3060           10062                           CCS      EXECTEM2                              
051692,000309: 01,3061           13050                           TCF      JOBWAKE4                              
051693,000310: 01,3062           45017                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
051694,000311: 01,3063           54064                           TS       LOCCTR                                
051695,000312: 01,3064           15222                           TCF      ENDFIND                               
051696,000313: 
051697,000314: 01,3065           40065        WAKETEST           CS       NEWLOC                                
051698,000315: 01,3066           50064                           INDEX    LOCCTR                                
051699,000316: 01,3067           60164                           AD       LOC                                   
051700,000317: 01,3070           00006                           EXTEND                                         
051701,000318: 01,3071           13073                           BZF      +2                                    #  IF MATCH.
051702,000319: 01,3072           13056                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
051703,000320: 
051704,000321: 01,3073           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
051705,000322: 01,3074           40167                           CS       PRIORITY                              
051706,000323: 01,3075           54063                           TS       NEWPRIO                               
051707,000324: 01,3076           50064                           INDEX    LOCCTR                                
051708,000325: 01,3077           54167                           TS       PRIORITY                              
051709,000326: 
051710,000327: 01,3100           44364                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
051711,000328: 01,3101           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
051712,000329: 01,3102           65005                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
051713,000330: 01,3103           56065                           XCH      NEWLOC                                
051714,000331: 01,3104           74364                           MASK     FBANKMSK                              
051715,000332: 01,3105           50064                           INDEX    LOCCTR                                
051716,000333: 01,3106           60165                           AD       BANKSET                               
051717,000334: 01,3107           54066                           TS       NEWLOC     +1                         
051718,000335: 
051719,000336: 01,3110           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
051720,000337: 01,3111           12704                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
051721,000338: 01,3112           12674                           TCF      SPECTEST                              
051722,000339: 

Page 1217

051724,000341:                                                                                                  #  PRIORITY CHANGE.  CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
051725,000342: 
051726,000343: 01,3113           54164        PRIOCH2            TS       LOC                                   
051727,000344: 01,3114           35021                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
051728,000345: 01,3115           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
051729,000346: 01,3116           35046                           CAF      LOW9                                  
051730,000347: 01,3117           70167                           MASK     PRIORITY                              
051731,000348: 01,3120           60063                           AD       NEWPRIO                               
051732,000349: 01,3121           54167                           TS       PRIORITY                              
051733,000350: 01,3122           40000                           COM                                            
051734,000351: 01,3123           13030                           TCF      JOBSLP2                               #  AND TO EJSCAN.
051735,000352: 

Page 1218

051737,000354:                                                                                                  #  RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
051738,000355: 
051739,000356: 01,3124           00004        ENDJOB1            INHINT                                         
051740,000357: 01,3125           45021                           CS       ZERO                                  
051741,000358: 01,3126           54131                           TS       BUF        +1                         
051742,000359: 01,3127           56167                           XCH      PRIORITY                              
051743,000360: 01,3130           75046                           MASK     LOW9                                  
051744,000361: 01,3131           54001                           TS       L                                     
051745,000362: 
051746,000363: 01,3132           45226                           CS       FAKEPRET                              
051747,000364: 01,3133           60001                           AD       L                                     
051748,000365: 
051749,000366: 01,3134           00006                           EXTEND                                         
051750,000367: 01,3135           63141                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
051751,000368: 
051752,000369: 01,3136           10001                           CCS      L                                     
051753,000370: 01,3137           50000                           INDEX    A                                     
051754,000371: 01,3140           54000                           TS       0                                     
051755,000372: 
051756,000373: 01,3141           10203        EJSCAN             CCS      PRIORITY   +12D                       
051757,000374: 01,3142           03206                           TC       EJ1                                   
051758,000375: 01,3143           05741                           TC       CCSHOLE                               
051759,000376: 01,3144           13145                           TCF      +1                                    
051760,000377: 
051761,000378: 01,3145           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
051762,000379: 01,3146           03206                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
051763,000380: 01,3147           05741                           TC       CCSHOLE                               
051764,000381: 01,3150           13151                           TCF      +1                                    
051765,000382: 
051766,000383: 01,3151           10233                           CCS      PRIORITY   +36D                       
051767,000384: 01,3152           03206                           TC       EJ1                                   
051768,000385: 01,3153           67610        -CCSPR             -CCS     PRIORITY                              
051769,000386: 01,3154           13155                           TCF      +1                                    
051770,000387: 
051771,000388: 01,3155           10247                           CCS      PRIORITY   +48D                       
051772,000389: 01,3156           03206                           TC       EJ1                                   
051773,000390: 01,3157           05741                           TC       CCSHOLE                               
051774,000391: 01,3160           13161                           TCF      +1                                    
051775,000392: 
051776,000393: 01,3161           10263                           CCS      PRIORITY   +60D                       
051777,000394: 01,3162           03206                           TC       EJ1                                   
051778,000395: 01,3163           05741                           TC       CCSHOLE                               
051779,000396: 01,3164           13165                           TCF      +1                                    
051780,000397: 
051781,000398: 01,3165           10277                           CCS      PRIORITY   +72D                       
051782,000399: 01,3166           03206                           TC       EJ1                                   
051783,000400: 01,3167           05741                           TC       CCSHOLE                               
051784,000401: 01,3170           13171                           TCF      +1                                    
051785,000402: 

Page 1219

051787,000404:                                                                                                  #  EVALUATE THE RESULTS OF THE SCAN.
051788,000405: 
051789,000406: 01,3171           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
051790,000407: 01,3172           05741                           TC       CCSHOLE                               
051791,000408: 01,3173           05741                           TC       CCSHOLE                               
051792,000409: 
051793,000410: 01,3174           13176                           TCF      +2                                    
051794,000411: 01,3175           13223                           TCF      DUMMYJOB                              
051795,000412: 01,3176           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
051796,000413: 01,3177           13201                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
051797,000414: 01,3200           13005                           TCF      ENDPRCHG   -1                         
051798,000415: 
051799,000416: 01,3201           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
051800,000417: 01,3202           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
051801,000418: 01,3203           63153                           AD       -CCSPR                                
051802,000419: 01,3204           54067                           TS       NEWJOB                                
051803,000420: 01,3205           12725                           TCF      CHANJOB    -2                         
051804,000421: 
051805,000422: 01,3206           54132        EJ1                TS       BUF        +2                         
051806,000423: 01,3207           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
051807,000424: 01,3210           10000                           CCS      A                                     
051808,000425: 01,3211           40132                           CS       BUF        +2                         
051809,000426: 01,3212           13216                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
051810,000427: 01,3213           13214                           NOOP                                           
051811,000428: 01,3214           50002                           INDEX    Q                                     
051812,000429: 01,3215           00002                           TC       2                                     #  PROCEED WITH SEARCH.
051813,000430: 
051814,000431: 01,3216           54131        EJ2                TS       BUF        +1                         
051815,000432: 01,3217           00006                           EXTEND                                         
051816,000433: 01,3220           22130                           QXCH     BUF                                   #  FOR LOCATING CCS PRIORITY + X INSTR.
051817,000434: 01,3221           50130                           INDEX    BUF                                   
051818,000435: 01,3222           00002                           TC       2                                     
051819,000436: 

Page 1220

051821,000438:                                                                                                  #  IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
051822,000439:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
051823,000440: 
051824,000441: 01,3223     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
051825,000442: 
051826,000443: 01,3223           45021        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
051827,000444: 01,3224           54067                           TS       NEWJOB                                
051828,000445: 01,3225           00003                           RELINT                                         
051829,000446: 01,3226           45016                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
051830,000447: 01,3227           00006                           EXTEND                                         
051831,000448: 01,3230           03011                           WAND     DSALMOUT                              
051832,000449: 01,3231           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE?
051833,000450: 01,3232           13032                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
051834,000451: 01,3233           35016                           CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
051835,000452: 01,3234           13242                           TCF      NUDIRECT                              #  EXECUTION.
051836,000453: 
051837,000454: 01,3235           31361                           CA       SELFRET                               
051838,000455: 01,3236           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
051839,000456: 01,3237           33241                           CAF      SELFBANK                              
051840,000457: 01,3240           15230                           TCF      SUPDXCHZ   +1                         #  AND DISPATCH JOB.
051841,000458: 
051842,000459: 01,3241     1361                                  EBANK=   SELFRET                               
051843,000460: 01,3241           66102        SELFBANK           BBCON    SELFCHK                               
051844,000461: 
051845,000462: 01,3242           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
051846,000463: 01,3243           05011                           WOR      DSALMOUT                              
051847,000464: 01,3244           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
051848,000465: 01,3245           15227                           TCF      SUPDXCHZ                              
051849,000466: 
051850,000467:    5227                                           BLOCK    2                                     #  IN FIXED-FIXED SO OTHERS MAY USE.
051851,000468: 
051852,000469:    5227                                           COUNT    02/EXEC                               
051853,000470: 
051854,000471:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
051855,000472:                                                                                                  #  CALLING SEQUENCE
051856,000473:                                                                                                  #                TCF     SUPDXCHZ        WITH 2CADR OF DESIRED LOCATION IN A + L.
051857,000474: 
051858,000475:    5227           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
051859,000476:    5230           00006                 +1        EXTEND                                         
051860,000477:    5231           01007                           WRITE    SUPERBNK                              
051861,000478:    5232           54006                           TS       BBANK                                 
051862,000479:    5233           00001                           TC       L                                     
051863,000480: 
051864,000481:    5234           77677        NEG100             OCT      77677                                 
051865,000482: 
051866,000483: 
051867,000484: 

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