Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

047453,000002:                                                                                                  ## Copyright:   Public domain.
047454,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
047455,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
047456,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
047457,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
047458,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
047459,000008:                                                                                                  ##              that the code format has been changed to conform to the
047460,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
047461,000010:                                                                                                  ##              original YUL assembler.
047462,000011:                                                                                                  ## Reference:   pp. 1101-1114
047463,000012:                                                                                                  ## Assembler:   yaYUL
047464,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047465,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047466,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
047467,000016:                                                                                                  ##              2016-11-18 MAS  Transcribed.
047468,000017:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
047469,000018:                                                                                                  ##                              and corrected errors found.
047470,000019:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
047471,000020:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
047472,000021: 

Page 1101

047474,000023:    5063                                           BLOCK    02                                    
047475,000024:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
047476,000025: 
047477,000026:    5063                                           COUNT*   $$/EXEC                               
047478,000027:    5063           00004        NOVAC              INHINT                                         
047479,000028:    5064           65155                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
047480,000029:    5065           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
047481,000030: 
047482,000031:    5066           00006                           EXTEND                                         
047483,000032:    5067           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
047484,000033:    5070           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
047485,000034:    5071           52066                           DXCH     NEWLOC                                
047486,000035:    5072           35154                           CAF      EXECBANK                              
047487,000036:    5073           56004                           XCH      FBANK                                 
047488,000037:    5074           54061                           TS       EXECTEM1                              
047489,000038:    5075           12631                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
047490,000039: 
047491,000040:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
047492,000041: 
047493,000042:    5076           00004        FINDVAC            INHINT                                         
047494,000043:    5077           54063                           TS       NEWPRIO                               
047495,000044:    5100           00006                           EXTEND                                         
047496,000045:    5101           50002                           INDEX    Q                                     
047497,000046:    5102           30001                           DCA      0                                     
047498,000047:    5103           52066        SPVACIN            DXCH     NEWLOC                                
047499,000048:    5104           35154                           CAF      EXECBANK                              
047500,000049:    5105           56004                           XCH      FBANK                                 
047501,000050:    5106           12605                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
047502,000051: 
047503,000052:                                                                                                  #           TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
047504,000053: 
047505,000054:                                                                                                  #           USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
047506,000055: 
047507,000056:    5107           56002        SPVAC              XCH      Q                                     
047508,000057:    5110           67767                           AD       NEG2                                  
047509,000058:    5111           56002                           XCH      Q                                     
047510,000059:    5112           15103                           TCF      SPVACIN                               
047511,000060: 
047512,000061:                                                                                                  #           TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
047513,000062: 
047514,000063:    5113           22002        CHANG1             LXCH     Q                                     
047515,000064:    5114           35154                           CAF      EXECBANK                              
047516,000065:    5115           56006                           XCH      BBANK                                 
047517,000066:    5116           12712                           TCF      CHANJOB                               
047518,000067: 
047519,000068:                                                                                                  #           TO SUSPEND AN INTERPRETIVE JOB:
047520,000069: 
047521,000070:    5117           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
047522,000071:                                                                                                  #           ITRACE (4) REFERS TO "CHANG2".
047523,000072:    5120           54001                           TS       L                                     

Page 1102

047525,000074:    5121           35154                 +2        CAF      EXECBANK                              
047526,000075:    5122           54006                           TS       BBANK                                 
047527,000076:    5123           12711                           TCF      CHANJOB    -1                         
047528,000077: 

Page 1103

047530,000079:                                                                                                  #           TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
047531,000080: 
047532,000081:    5124           54164        JOBSLEEP           TS       LOC                                   
047533,000082:    5125           35154                           CAF      EXECBANK                              
047534,000083:    5126           54004                           TS       FBANK                                 
047535,000084:    5127           13002                           TCF      JOBSLP1                               
047536,000085: 
047537,000086:                                                                                                  #           TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
047538,000087: 
047539,000088:    5130           00004        JOBWAKE            INHINT                                         
047540,000089:    5131           54065                           TS       NEWLOC                                
047541,000090:    5132           44743                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
047542,000091:    5133           26002                           ADS      Q                                     
047543,000092:    5134           35154                           CAF      EXECBANK                              
047544,000093:    5135           56004                           XCH      FBANK                                 
047545,000094:    5136           13027                           TCF      JOBWAKE2                              
047546,000095: 
047547,000096:                                                                                                  #           TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
047548,000097: 
047549,000098:    5137           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A. RETURNS TO
047550,000099:    5140           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
047551,000100:    5141           35154                           CAF      EXECBANK                              #  HIGHEST. PREPARE FOR POSSIBLE BASIC-
047552,000101:    5142           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
047553,000102:    5143           54165                           TS       BANKSET                               
047554,000103:    5144           30002                           CA       Q                                     
047555,000104:    5145           13076                           TCF      PRIOCH2                               
047556,000105: 
047557,000106:                                                                                                  #           TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
047558,000107: 
047559,000108:    5146           35154        ENDOFJOB           CAF      EXECBANK                              
047560,000109:    5147           54004                           TS       FBANK                                 
047561,000110:    5150           13107                           TCF      ENDJOB1                               
047562,000111: 
047563,000112:    5151           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
047564,000113:    5152           54004                           TS       FBANK                                 #  COMPLETE.
047565,000114:    5153           16762                           TCF      Q+2                                   
047566,000115:    5154           02605        EXECBANK           CADR     FINDVAC2                              
047567,000116: 
047568,000117:    5155           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
047569,000118: 
047570,000119:                                                                                                  #           TO CHANGE A "FINDVAC" JOB TO A "NOVAC" -- RELEASE ITS VAC AREA:
047571,000120:    5156           30167        VACRLEAS           CA       PRIORITY                              #  CHANGE TO NOVAC VALUE
047572,000121:    5157           77746                           MASK     PRIO37                                
047573,000122:    5160           65155                           AD       FAKEPRET                              
047574,000123:    5161           56167                           XCH      PRIORITY                              
047575,000124:    5162           74775                           MASK     LOW9                                  
047576,000125:    5163           10000                           CCS      A                                     
047577,000126:    5164           50000                           INDEX    A                                     
047578,000127:    5165           54000                           TS       0                                     #  RELEASE VAC AREA
047579,000128:    5166           00002                           TC       Q                                     
047580,000129: 

Page 1104

047582,000131:                                                                                                  #           LOCATE AN AVAILABLE VAC AREA.
047583,000132: 
047584,000133: 01,2605                                           BANK     01                                    
047585,000134: 01,2605                                           COUNT*   $$/EXEC                               
047586,000135: 01,2605           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
047587,000136: 01,2606           10400                           CCS      VAC1USE                               
047588,000137: 01,2607           12624                           TCF      VACFOUND                              
047589,000138: 01,2610           10454                           CCS      VAC2USE                               
047590,000139: 01,2611           12624                           TCF      VACFOUND                              
047591,000140: 01,2612           10530                           CCS      VAC3USE                               
047592,000141: 01,2613           12624                           TCF      VACFOUND                              
047593,000142: 01,2614           10604                           CCS      VAC4USE                               
047594,000143: 01,2615           12624                           TCF      VACFOUND                              
047595,000144: 01,2616           10660                           CCS      VAC5USE                               
047596,000145: 01,2617           12624                           TCF      VACFOUND                              
047597,000146: 01,2620           22061                           LXCH     EXECTEM1                              
047598,000147: 01,2621           30002                           CA       Q                                     
047599,000148: 01,2622           05712                           TC       BAILOUT1                              
047600,000149: 01,2623           31201                           OCT      31201                                 #  NO VAC AREAS
047601,000150: 
047602,000151: 01,2624           64743        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
047603,000152: 01,2625           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
047604,000153: 01,2626           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
047605,000154: 01,2627           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
047606,000155: 01,2630           26063                           ADS      NEWPRIO                               
047607,000156: 
047608,000157: 01,2631           34746        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE. FIND A CORE SET.
047609,000158: 01,2632           54064                           TS       LOCCTR                                
047610,000159: 01,2633           32640                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
047611,000160: 01,2634           54062        NOVAC3             TS       EXECTEM2                              
047612,000161: 01,2635           50064                           INDEX    LOCCTR                                
047613,000162: 01,2636           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
047614,000163: 01,2637           12700                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
047615,000164: 01,2640           00007        NO.CORES           DEC      7          B-14                       
047616,000165: 01,2641           12700                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
047617,000166:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
047618,000167: 

Page 1105

047620,000169: 01,2642           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
047621,000170: 01,2643           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
047622,000171: 01,2644           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
047623,000172: 01,2645           74775                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
047624,000173: 01,2646           50064                           INDEX    LOCCTR                                
047625,000174: 01,2647           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
047626,000175: 
047627,000176: 01,2650           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
047628,000177: 01,2651           12665                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY .
047629,000178: 01,2652           54121                           TS       OVFIND                                
047630,000179: 01,2653           30166                           CA       PUSHLOC                               
047631,000180: 01,2654           54120                           TS       FIXLOC                                
047632,000181: 
047633,000182: 01,2655           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
047634,000183: 01,2656           12665                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
047635,000184: 01,2657           05701                           TC       CCSHOLE                               
047636,000185: 01,2660           05701                           TC       CCSHOLE                               
047637,000186: 01,2661           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
047638,000187: 01,2662           52066                           DXCH     NEWLOC                                
047639,000188: 01,2663           52165                           DXCH     LOC                                   
047640,000189: 01,2664           15151                           TCF      ENDFIND                               
047641,000190: 
047642,000191: 01,2665           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
047643,000192: 01,2666           50064                           INDEX    LOCCTR                                
047644,000193: 01,2667           52165                           DXCH     LOC                                   
047645,000194: 01,2670           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
047646,000195: 01,2671           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
047647,000196: 01,2672           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
047648,000197: 01,2673           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
047649,000198: 01,2674           65151                           BZMF     ENDFIND                               
047650,000199: 01,2675           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
047651,000200: 01,2676           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
047652,000201: 01,2677           15151                           TCF      ENDFIND                               #  REGISTERS, ETC.
047653,000202: 
047654,000203: 01,2700           33037        NEXTCORE           CAF      COREINC                               
047655,000204: 01,2701           26064                           ADS      LOCCTR                                
047656,000205: 01,2702           10062                           CCS      EXECTEM2                              
047657,000206: 01,2703           12634                           TCF      NOVAC3                                
047658,000207: 01,2704           22061                           LXCH     EXECTEM1                              
047659,000208: 01,2705           30002                           CA       Q                                     
047660,000209: 01,2706           05712                           TC       BAILOUT1                              #  NO CORE SETS AVAILABLE.
047661,000210: 01,2707           31202                           OCT      31202                                 

Page 1106

047663,000212:                                                                                                  #           THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
047664,000213: 
047665,000214: 01,2710           22164                 -2        LXCH     LOC                                   
047666,000215: 01,2711           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
047667,000216: 01,2712           00004        CHANJOB            INHINT                                         
047668,000217: 01,2713           00006                           EXTEND                                         
047669,000218: 01,2714           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
047670,000219: 01,2715           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
047671,000220: 01,2716           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
047672,000221: 01,2717           52165                           DXCH     LOC                                   
047673,000222: 01,2720           52165                           DXCH     LOC                                   
047674,000223: 
047675,000224: 01,2721           30165                           CAE      BANKSET                               
047676,000225: 01,2722           00006                           EXTEND                                         
047677,000226: 01,2723           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
047678,000227: 01,2724           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
047679,000228: 01,2725           50067                           INDEX    NEWJOB                                
047680,000229: 01,2726           52155                           DXCH     MPAC                                  
047681,000230: 01,2727           52155                           DXCH     MPAC                                  
047682,000231: 01,2730           52157                           DXCH     MPAC       +2                         
047683,000232: 01,2731           50067                           INDEX    NEWJOB                                
047684,000233: 01,2732           52157                           DXCH     MPAC       +2                         
047685,000234: 01,2733           52157                           DXCH     MPAC       +2                         
047686,000235: 01,2734           52161                           DXCH     MPAC       +4                         
047687,000236: 01,2735           50067                           INDEX    NEWJOB                                
047688,000237: 01,2736           52161                           DXCH     MPAC       +4                         
047689,000238: 01,2737           52161                           DXCH     MPAC       +4                         
047690,000239: 01,2740           52163                           DXCH     MPAC       +6                         
047691,000240: 01,2741           50067                           INDEX    NEWJOB                                
047692,000241: 01,2742           52163                           DXCH     MPAC       +6                         
047693,000242: 01,2743           52163                           DXCH     MPAC       +6                         
047694,000243: 
047695,000244: 01,2744           34746                           CAF      ZERO                                  
047696,000245: 01,2745           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
047697,000246: 01,2746           00006                           EXTEND                                         
047698,000247: 01,2747           12752                           BZF      +3                                    
047699,000248: 01,2750           40166                           CS       PUSHLOC                               
047700,000249: 01,2751           54166                           TS       PUSHLOC                               
047701,000250: 
047702,000251: 01,2752           52167                           DXCH     PUSHLOC                               
047703,000252: 01,2753           50067                           INDEX    NEWJOB                                
047704,000253: 01,2754           52167                           DXCH     PUSHLOC                               
047705,000254: 01,2755           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
047706,000255: 01,2756           34775                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
047707,000256: 01,2757           70167                           MASK     PRIORITY                              
047708,000257: 01,2760           54120                           TS       FIXLOC                                
047709,000258: 
047710,000259: 01,2761           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
047711,000260: 01,2762           34746                           CAF      ZERO                                  
047712,000261: 01,2763           12770                           TCF      ENDPRCHG   -1                         
047713,000262: 

Page 1107

047715,000264: 01,2764           40166                           CS       PUSHLOC                               
047716,000265: 01,2765           54166                           TS       PUSHLOC                               
047717,000266: 01,2766           34744                           CAF      ONE                                   
047718,000267: 01,2767           56121                           XCH      OVFIND                                
047719,000268: 01,2770           54067                           TS       NEWJOB                                
047720,000269: 
047721,000270: 01,2771           00003        ENDPRCHG           RELINT                                         
047722,000271: 01,2772           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
047723,000272: 01,2773           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
047724,000273: 01,2774           62776                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
047725,000274: 01,2775           52006                           DTCB                                           
047726,000275: 

Page 1108

047728,000277: 01,2776           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
047729,000278: 01,2777           64744                           AD       ONE                                   
047730,000279: 01,3000           54164                           TS       LOC                                   #  RESUME.
047731,000280: 01,3001           16071                           TCF      INTRSM                                
047732,000281: 
047733,000282:                                                                                                  #           COMPLETE JOBSLEEP PREPARATIONS.
047734,000283: 
047735,000284: 01,3002           00004        JOBSLP1            INHINT                                         
047736,000285: 01,3003           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
047737,000286: 01,3004           54167                           TS       PRIORITY                              
047738,000287: 01,3005           36115                           CAF      LOW7                                  
047739,000288: 01,3006           70006                           MASK     BBANK                                 
047740,000289: 01,3007           00006                           EXTEND                                         
047741,000290: 01,3010           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
047742,000291: 01,3011           54165                           TS       BANKSET                               
047743,000292: 01,3012           44746                           CS       ZERO                                  
047744,000293: 01,3013           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
047745,000294: 01,3014           13124                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
047746,000295: 
047747,000296: 01,3015           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0 .
047748,000297: 01,3016           10067                           CCS      NEWJOB                                
047749,000298: 01,3017           13022                           TCF      +3                                    #  NEWJOB STILL PNZ
047750,000299: 01,3020           00003                           RELINT                                         #  NEWJOB HAS CHANGED TO +0. WAKE UP JOB
047751,000300: 01,3021           13220                           TCF      ADVAN      +2                         #  VIA NUDIRECT. (VERY RARE CASE.)
047752,000301: 
047753,000302: 01,3022           34743                           CAF      TWO                                   
047754,000303: 01,3023           00006                           EXTEND                                         
047755,000304: 01,3024           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
047756,000305: 01,3025           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
047757,000306: 01,3026           12716                           TCF      CHANJOB    +4                         #   POSSIBLE SLEEPING JOB.
047758,000307: 

Page 1109

047760,000309:                                                                                                  #           TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
047761,000310:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
047762,000311:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
047763,000312: 
047764,000313: 01,3027           54061        JOBWAKE2           TS       EXECTEM1                              
047765,000314: 01,3030           34746                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
047766,000315: 01,3031           54064                           TS       LOCCTR                                
047767,000316: 01,3032           32640                           CAF      NO.CORES                              
047768,000317: 01,3033           54062        JOBWAKE4           TS       EXECTEM2                              
047769,000318: 01,3034           50064                           INDEX    LOCCTR                                
047770,000319: 01,3035           10167                           CCS      PRIORITY                              
047771,000320: 01,3036           13041                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
047772,000321: 01,3037           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
047773,000322: 01,3040           13050                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
047774,000323: 
047775,000324: 01,3041           33037        JOBWAKE3           CAF      COREINC                               
047776,000325: 01,3042           26064                           ADS      LOCCTR                                
047777,000326: 01,3043           10062                           CCS      EXECTEM2                              
047778,000327: 01,3044           13033                           TCF      JOBWAKE4                              
047779,000328: 01,3045           44744                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
047780,000329: 01,3046           54064                           TS       LOCCTR                                
047781,000330: 01,3047           15151                           TCF      ENDFIND                               
047782,000331: 
047783,000332: 01,3050           40065        WAKETEST           CS       NEWLOC                                
047784,000333: 01,3051           50064                           INDEX    LOCCTR                                
047785,000334: 01,3052           60164                           AD       LOC                                   
047786,000335: 01,3053           00006                           EXTEND                                         
047787,000336: 01,3054           13056                           BZF      +2                                    #  IF MATCH.
047788,000337: 01,3055           13041                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
047789,000338: 
047790,000339: 01,3056           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
047791,000340: 01,3057           40167                           CS       PRIORITY                              
047792,000341: 01,3060           54063                           TS       NEWPRIO                               
047793,000342: 01,3061           50064                           INDEX    LOCCTR                                
047794,000343: 01,3062           54167                           TS       PRIORITY                              
047795,000344: 
047796,000345: 01,3063           44341                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
047797,000346: 01,3064           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
047798,000347: 01,3065           64732                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
047799,000348: 01,3066           56065                           XCH      NEWLOC                                
047800,000349: 01,3067           74341                           MASK     FBANKMSK                              
047801,000350: 01,3070           50064                           INDEX    LOCCTR                                
047802,000351: 01,3071           60165                           AD       BANKSET                               
047803,000352: 01,3072           54066                           TS       NEWLOC     +1                         
047804,000353: 
047805,000354: 01,3073           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
047806,000355: 01,3074           12665                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
047807,000356: 01,3075           12655                           TCF      SPECTEST                              
047808,000357: 

Page 1110

047810,000359:                                                                                                  #           PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
047811,000360: 
047812,000361: 01,3076           54164        PRIOCH2            TS       LOC                                   
047813,000362: 01,3077           34746                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
047814,000363: 01,3100           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
047815,000364: 01,3101           34775                           CAF      LOW9                                  
047816,000365: 01,3102           70167                           MASK     PRIORITY                              
047817,000366: 01,3103           60063                           AD       NEWPRIO                               
047818,000367: 01,3104           54167                           TS       PRIORITY                              
047819,000368: 01,3105           40000                           COM                                            
047820,000369: 01,3106           13013                           TCF      JOBSLP2                               #  AND TO EJSCAN.
047821,000370: 

Page 1111

047823,000372:                                                                                                  #           RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
047824,000373: 
047825,000374: 01,3107           00004        ENDJOB1            INHINT                                         
047826,000375: 01,3110           44746                           CS       ZERO                                  
047827,000376: 01,3111           54131                           TS       BUF        +1                         
047828,000377: 01,3112           56167                           XCH      PRIORITY                              
047829,000378: 01,3113           74775                           MASK     LOW9                                  
047830,000379: 01,3114           54001                           TS       L                                     
047831,000380: 
047832,000381: 01,3115           45155                           CS       FAKEPRET                              
047833,000382: 01,3116           60001                           AD       L                                     
047834,000383: 
047835,000384: 01,3117           00006                           EXTEND                                         
047836,000385: 01,3120           63124                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
047837,000386: 
047838,000387: 01,3121           10001                           CCS      L                                     
047839,000388: 01,3122           50000                           INDEX    A                                     
047840,000389: 01,3123           54000                           TS       0                                     
047841,000390: 
047842,000391: 01,3124           10203        EJSCAN             CCS      PRIORITY   +12D                       
047843,000392: 01,3125           03175                           TC       EJ1                                   
047844,000393: 01,3126           05701                           TC       CCSHOLE                               
047845,000394: 01,3127           13130                           TCF      +1                                    
047846,000395: 
047847,000396: 01,3130           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
047848,000397: 01,3131           03175                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
047849,000398: 01,3132           05701                           TC       CCSHOLE                               
047850,000399: 01,3133           13134                           TCF      +1                                    
047851,000400: 
047852,000401: 01,3134           10233                           CCS      PRIORITY   +36D                       
047853,000402: 01,3135           03175                           TC       EJ1                                   
047854,000403: 01,3136           67610        -CCSPR             -CCS     PRIORITY                              
047855,000404: 01,3137           13140                           TCF      +1                                    
047856,000405: 
047857,000406: 01,3140           10247                           CCS      PRIORITY   +48D                       
047858,000407: 01,3141           03175                           TC       EJ1                                   
047859,000408: 01,3142           05701                           TC       CCSHOLE                               
047860,000409: 01,3143           13144                           TCF      +1                                    
047861,000410: 
047862,000411: 01,3144           10263                           CCS      PRIORITY   +60D                       
047863,000412: 01,3145           03175                           TC       EJ1                                   
047864,000413: 01,3146           05701                           TC       CCSHOLE                               
047865,000414: 01,3147           13150                           TCF      +1                                    
047866,000415: 
047867,000416: 01,3150           10277                           CCS      PRIORITY   +72D                       
047868,000417: 01,3151           03175                           TC       EJ1                                   
047869,000418: 01,3152           05701                           TC       CCSHOLE                               
047870,000419: 01,3153           13154                           TCF      +1                                    
047871,000420: 
047872,000421: 01,3154           10313                           CCS      PRIORITY   +84D                       

Page 1112

047874,000423: 01,3155           03175                           TC       EJ1                                   
047875,000424: 01,3156           05701                           TC       CCSHOLE                               
047876,000425: 01,3157           13160                           TCF      +1                                    
047877,000426: 

Page 1113

047879,000428:                                                                                                  #           EVALUATE THE RESULTS OF THE SCAN.
047880,000429: 
047881,000430: 01,3160           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
047882,000431: 01,3161           05701                           TC       CCSHOLE                               
047883,000432: 01,3162           05701                           TC       CCSHOLE                               
047884,000433: 
047885,000434: 01,3163           13165                           TCF      +2                                    
047886,000435: 01,3164           13210                           TCF      DUMMYJOB                              
047887,000436: 01,3165           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
047888,000437: 01,3166           13170                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
047889,000438: 01,3167           12770                           TCF      ENDPRCHG   -1                         
047890,000439: 
047891,000440: 01,3170           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
047892,000441: 01,3171           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
047893,000442: 01,3172           63136                           AD       -CCSPR                                
047894,000443: 01,3173           54067                           TS       NEWJOB                                
047895,000444: 01,3174           12710                           TCF      CHANJOB    -2                         
047896,000445: 
047897,000446: 01,3175           54132        EJ1                TS       BUF        +2                         
047898,000447: 01,3176           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
047899,000448: 01,3177           10000                           CCS      A                                     
047900,000449: 01,3200           40132                           CS       BUF        +2                         
047901,000450: 01,3201           13204                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
047902,000451: 01,3202           13203                           NOOP                                           
047903,000452: 01,3203           16762                           TCF      Q+2                                   
047904,000453: 
047905,000454: 01,3204           54131        EJ2                TS       BUF        +1                         
047906,000455: 01,3205           30002                           CA       Q                                     
047907,000456: 01,3206           54130                           TS       BUF                                   
047908,000457: 01,3207           16762                           TCF      Q+2                                   
047909,000458: 

Page 1114

047911,000460:                                                                                                  #           IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
047912,000461:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
047913,000462: 
047914,000463: 01,3210     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
047915,000464: 
047916,000465: 01,3210           44746        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
047917,000466: 01,3211           54067                           TS       NEWJOB                                
047918,000467: 01,3212           00003                           RELINT                                         
047919,000468: 01,3213           44743                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
047920,000469: 01,3214           00006                           EXTEND                                         
047921,000470: 01,3215           03011                           WAND     DSALMOUT                              
047922,000471: 01,3216           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE ?
047923,000472: 01,3217           13015                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
047924,000473: 01,3220           34743                           CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
047925,000474: 01,3221           13230                           TCF      NUDIRECT                              #  EXECUTION.
047926,000475: 
047927,000476: 01,3222           25356                           INCR     DUMLOOPS                              #  COUNT DUMMYJOB LOOPS FOR DOWNLINK
047928,000477: 
047929,000478: 01,3223           31361                           CA       SELFRET                               
047930,000479: 01,3224           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
047931,000480: 01,3225           33227                           CAF      SELFBANK                              
047932,000481: 01,3226           15170                           TCF      SUPDXCHZ   +1                         #   AND DISPATCH JOB.
047933,000482: 
047934,000483: 01,3227     1361                                  EBANK=   SELFRET                               
047935,000484: 01,3227           66102        SELFBANK           BBCON    SELFCHK                               
047936,000485: 
047937,000486: 01,3230           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
047938,000487: 01,3231           05011                           WOR      DSALMOUT                              
047939,000488: 01,3232           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
047940,000489: 01,3233           15167                           TCF      SUPDXCHZ                              
047941,000490: 
047942,000491:    5167                                           BLOCK    2                                     #  IN FIXED-FIXED SO OTHERS MAY USE.
047943,000492: 
047944,000493:    5167                                           COUNT*   $$/EXEC                               
047945,000494:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
047946,000495:                                                                                                  #  CALLING SEQUENCE
047947,000496:                                                                                                  #                                                 TCF     SUPDXCHZ         WITH 2CADR OF DESIRED LOCATION IN A + L.
047948,000497: 
047949,000498:    5167           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
047950,000499:    5170           00006                 +1        EXTEND                                         
047951,000500:    5171           01007                           WRITE    SUPERBNK                              
047952,000501:    5172           54006                           TS       BBANK                                 
047953,000502:    5173           00001                           TC       L                                     
047954,000503: 
047955,000504:    5174           77677        NEG100             OCT      77677                                 

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