Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

051841,000002:                                                                                                  ## Copyright:   Public domain.
051842,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
051843,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
051844,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM)
051845,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for
051846,000007:                                                                                                  ##              Apollo 15-17.
051847,000008:                                                                                                  ## Assembler:   yaYUL
051848,000009:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
051849,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051850,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
051851,000012:                                                                                                  ## Mod history: 2009-08-29 JL   Adapted from corresponding Comanche 055 file.
051852,000013:                                                                                                  ##              2010-02-10 JL   Fixed error on p1218.
051853,000014:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
051854,000015:                                                                                                  ##              2011-05-07 JL   Removed workaround.
051855,000016:                                                                                                  ##              2017-01-22 RSB  Proofed comment text by diff'ing vs Comanche 55
051856,000017:                                                                                                  ##                              and corrected errors found.
051857,000018: 

Page 1208

051859,000020: 
051860,000021:    4000                                           SETLOC   EXECF2                                
051861,000022:    4000                                           BANK                                           
051862,000023: 
051863,000024:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
051864,000025: 
051865,000026:    5120                                           COUNT*   $$/EXEC                               
051866,000027:    5120           34346        NOVAC30            CAF      PRIO30                                
051867,000028:    5121           00004        NOVAC              INHINT                                         
051868,000029:    5122           65213                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
051869,000030:    5123           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
051870,000031: 
051871,000032:    5124           00006                           EXTEND                                         
051872,000033:    5125           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
051873,000034:    5126           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
051874,000035:    5127           52066                           DXCH     NEWLOC                                
051875,000036:    5130           34756                           CAF      EXECBANK                              
051876,000037:    5131           56004                           XCH      FBANK                                 
051877,000038:    5132           54061                           TS       EXECTEM1                              
051878,000039:    5133           12620                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
051879,000040: 
051880,000041:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
051881,000042: 
051882,000043:    5134           34753        FINVAC20           CAF      PRIO20                                
051883,000044:    5135           00004        FINDVAC            INHINT                                         
051884,000045:    5136           54063                           TS       NEWPRIO                               
051885,000046:    5137           00006                           EXTEND                                         
051886,000047:    5140           50002                           INDEX    Q                                     
051887,000048:    5141           30001                           DCA      0                                     
051888,000049:    5142           52066        SPVACIN            DXCH     NEWLOC                                
051889,000050:    5143           34756                           CAF      EXECBANK                              
051890,000051:    5144           56004                           XCH      FBANK                                 
051891,000052:    5145           12576                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
051892,000053: 
051893,000054:                                                                                                  #  TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
051894,000055: 
051895,000056:                                                                                                  #  USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
051896,000057: 
051897,000058:    5146           56002        SPVAC              XCH      Q                                     
051898,000059:    5147           67701                           AD       NEG2                                  
051899,000060:    5150           56002                           XCH      Q                                     
051900,000061:    5151           15142                           TCF      SPVACIN                               
051901,000062: 
051902,000063:                                                                                                  #  TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
051903,000064: 
051904,000065:    5152           22002        CHANG1             LXCH     Q                                     
051905,000066:    5153           34756                           CAF      EXECBANK                              
051906,000067:    5154           56006                           XCH      BBANK                                 
051907,000068:    5155           12677                           TCF      CHANJOB                               
051908,000069: 
051909,000070:                                                                                                  #  TO SUSPEND AN INTERPRETIVE JOB:
051910,000071: 

Page 1209

051912,000073:    5156           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
051913,000074:                                                                                                  #  ITRACE (4) REFERS TO "CHANG2".
051914,000075:    5157           54001                           TS       L                                     
051915,000076:    5160           34756                 +2        CAF      EXECBANK                              
051916,000077:    5161           54006                           TS       BBANK                                 
051917,000078:    5162           12676                           TCF      CHANJOB    -1                         
051918,000079: 

Page 1210

051920,000081:                                                                                                  #  TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
051921,000082: 
051922,000083:    5163           54164        JOBSLEEP           TS       LOC                                   
051923,000084:    5164           34756                           CAF      EXECBANK                              
051924,000085:    5165           54004                           TS       FBANK                                 
051925,000086:    5166           12767                           TCF      JOBSLP1                               
051926,000087: 
051927,000088:                                                                                                  #  TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
051928,000089: 
051929,000090:    5167           00004        JOBWAKE            INHINT                                         
051930,000091:    5170           54065                           TS       NEWLOC                                
051931,000092:    5171           44767                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
051932,000093:    5172           26002                           ADS      Q                                     
051933,000094:    5173           34756                           CAF      EXECBANK                              
051934,000095:    5174           56004                           XCH      FBANK                                 
051935,000096:    5175           13014                           TCF      JOBWAKE2                              
051936,000097: 
051937,000098:                                                                                                  #  TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
051938,000099: 
051939,000100:    5176           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A. RETURNS TO
051940,000101:    5177           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
051941,000102:    5200           34756                           CAF      EXECBANK                              #  HIGHEST. PREPARE FOR POSSIBLE BASIC-
051942,000103:    5201           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
051943,000104:    5202           54165                           TS       BANKSET                               
051944,000105:    5203           30002                           CA       Q                                     
051945,000106:    5204           13063                           TCF      PRIOCH2                               
051946,000107: 
051947,000108:                                                                                                  #  TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
051948,000109: 
051949,000110:    5205           34756        ENDOFJOB           CAF      EXECBANK                              
051950,000111:    5206           54004                           TS       FBANK                                 
051951,000112:    5207           13074                           TCF      ENDJOB1                               
051952,000113: 
051953,000114:    5210           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
051954,000115:    5211           54004                           TS       FBANK                                 #  COMPLETE.
051955,000116:    5212           16710                           TCF      Q+2                                   
051956,000117:    5213     4756               EXECBANK           EQUALS   BIT11                                 #  THIS IS TRUE IF FINDVAC2 STAYS IN BANK 01
051957,000118: 
051958,000119:    5213           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
051959,000120: 

Page 1211

051961,000122:                                                                                                  #  LOCATE AN AVAILABLE VAC AREA.
051962,000123: 
051963,000124: 01,2000                                           SETLOC   EXECB1                                
051964,000125: 01,2000                                           BANK                                           
051965,000126: 
051966,000127: 01,2576                                           COUNT*   $$/EXEC                               
051967,000128:                                                                                                  #       ******** IF THE  EXECUTIVE IS 
051968,000129:                                                                                                  #                MOVED   OUT OF BANK 01
051969,000130:                                                                                                  #                DONT    FORGET TO CHANGE
051970,000131:                                                                                                  #                THE     VALUE OF
051971,000132:                                                                                                  #                ******  EXECBANK ****
051972,000133: 01,2576           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
051973,000134: 01,2577           10400                           CCS      VAC1USE                               
051974,000135: 01,2600           12613                           TCF      VACFOUND                              
051975,000136: 01,2601           10454                           CCS      VAC2USE                               
051976,000137: 01,2602           12613                           TCF      VACFOUND                              
051977,000138: 01,2603           10530                           CCS      VAC3USE                               
051978,000139: 01,2604           12613                           TCF      VACFOUND                              
051979,000140: 01,2605           10604                           CCS      VAC4USE                               
051980,000141: 01,2606           12613                           TCF      VACFOUND                              
051981,000142: 01,2607           10660                           CCS      VAC5USE                               
051982,000143: 01,2610           12613                           TCF      VACFOUND                              
051983,000144: 01,2611           07706                           TC       BAILOUT                               
051984,000145: 01,2612           31201                           OCT      31201                                 #  NO VAC AREAS
051985,000146: 
051986,000147: 01,2613           64767        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
051987,000148: 01,2614           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
051988,000149: 01,2615           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
051989,000150: 01,2616           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
051990,000151: 01,2617           26063                           ADS      NEWPRIO                               
051991,000152: 
051992,000153: 01,2620           34772        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE. FIND A CORE SET.
051993,000154: 01,2621           54064                           TS       LOCCTR                                
051994,000155: 01,2622           32627                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
051995,000156: 01,2623           54062        NOVAC3             TS       EXECTEM2                              
051996,000157: 01,2624           50064                           INDEX    LOCCTR                                
051997,000158: 01,2625           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
051998,000159: 01,2626           12667                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
051999,000160: 01,2627           00006        NO.CORES           DEC      6          B-14                       
052000,000161: 01,2630           12667                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
052001,000162:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
052002,000163: 

Page 1212

052004,000165: 01,2631           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
052005,000166: 01,2632           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
052006,000167: 01,2633           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
052007,000168: 01,2634           75021                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
052008,000169: 01,2635           50064                           INDEX    LOCCTR                                
052009,000170: 01,2636           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
052010,000171: 
052011,000172: 01,2637           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
052012,000173: 01,2640           12654                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY.
052013,000174: 01,2641           54121                           TS       OVFIND                                
052014,000175: 01,2642           30166                           CA       PUSHLOC                               
052015,000176: 01,2643           54120                           TS       FIXLOC                                
052016,000177: 
052017,000178: 01,2644           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
052018,000179: 01,2645           12654                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
052019,000180: 01,2646           12647                           NOOP                                           #  CANNOT GET HERE
052020,000181: 01,2647           12650                           NOOP                                           #  CANNOT GET HERE
052021,000182: 01,2650           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
052022,000183: 01,2651           52066                           DXCH     NEWLOC                                
052023,000184: 01,2652           52165                           DXCH     LOC                                   
052024,000185: 01,2653           15210                           TCF      ENDFIND                               
052025,000186: 
052026,000187: 01,2654           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
052027,000188: 01,2655           50064                           INDEX    LOCCTR                                
052028,000189: 01,2656           52165                           DXCH     LOC                                   
052029,000190: 01,2657           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
052030,000191: 01,2660           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
052031,000192: 01,2661           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
052032,000193: 01,2662           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
052033,000194: 01,2663           65210                           BZMF     ENDFIND                               
052034,000195: 01,2664           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
052035,000196: 01,2665           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
052036,000197: 01,2666           15210                           TCF      ENDFIND                               #  REGISTERS, ETC.
052037,000198: 
052038,000199: 01,2667           33024        NEXTCORE           CAF      COREINC                               
052039,000200: 01,2670           26064                           ADS      LOCCTR                                
052040,000201: 01,2671           10062                           CCS      EXECTEM2                              
052041,000202: 01,2672           12623                           TCF      NOVAC3                                
052042,000203: 01,2673           07706                           TC       BAILOUT                               #  NO CORE SETS.
052043,000204: 01,2674           31202                           OCT      31202                                 
052044,000205: 

Page 1213

052046,000207:                                                                                                  #  THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
052047,000208: 
052048,000209: 01,2675           22164                 -2        LXCH     LOC                                   
052049,000210: 01,2676           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
052050,000211: 01,2677           00004        CHANJOB            INHINT                                         
052051,000212: 01,2700           00006                           EXTEND                                         
052052,000213: 01,2701           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
052053,000214: 01,2702           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
052054,000215: 01,2703           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
052055,000216: 01,2704           52165                           DXCH     LOC                                   
052056,000217: 01,2705           52165                           DXCH     LOC                                   
052057,000218: 
052058,000219: 01,2706           30165                           CAE      BANKSET                               
052059,000220: 01,2707           00006                           EXTEND                                         
052060,000221: 01,2710           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
052061,000222: 01,2711           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
052062,000223: 01,2712           50067                           INDEX    NEWJOB                                
052063,000224: 01,2713           52155                           DXCH     MPAC                                  
052064,000225: 01,2714           52155                           DXCH     MPAC                                  
052065,000226: 01,2715           52157                           DXCH     MPAC       +2                         
052066,000227: 01,2716           50067                           INDEX    NEWJOB                                
052067,000228: 01,2717           52157                           DXCH     MPAC       +2                         
052068,000229: 01,2720           52157                           DXCH     MPAC       +2                         
052069,000230: 01,2721           52161                           DXCH     MPAC       +4                         
052070,000231: 01,2722           50067                           INDEX    NEWJOB                                
052071,000232: 01,2723           52161                           DXCH     MPAC       +4                         
052072,000233: 01,2724           52161                           DXCH     MPAC       +4                         
052073,000234: 01,2725           52163                           DXCH     MPAC       +6                         
052074,000235: 01,2726           50067                           INDEX    NEWJOB                                
052075,000236: 01,2727           52163                           DXCH     MPAC       +6                         
052076,000237: 01,2730           52163                           DXCH     MPAC       +6                         
052077,000238: 
052078,000239: 01,2731           34772                           CAF      ZERO                                  
052079,000240: 01,2732           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
052080,000241: 01,2733           00006                           EXTEND                                         
052081,000242: 01,2734           12737                           BZF      +3                                    
052082,000243: 01,2735           40166                           CS       PUSHLOC                               
052083,000244: 01,2736           54166                           TS       PUSHLOC                               
052084,000245: 
052085,000246: 01,2737           52167                           DXCH     PUSHLOC                               
052086,000247: 01,2740           50067                           INDEX    NEWJOB                                
052087,000248: 01,2741           52167                           DXCH     PUSHLOC                               
052088,000249: 01,2742           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
052089,000250: 01,2743           35021                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
052090,000251: 01,2744           70167                           MASK     PRIORITY                              
052091,000252: 01,2745           54120                           TS       FIXLOC                                
052092,000253: 
052093,000254: 01,2746           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
052094,000255: 01,2747           34772                           CAF      ZERO                                  
052095,000256: 01,2750           12755                           TCF      ENDPRCHG   -1                         

Page 1214

052097,000258: 01,2751           40166                           CS       PUSHLOC                               
052098,000259: 01,2752           54166                           TS       PUSHLOC                               
052099,000260: 01,2753           34770                           CAF      ONE                                   
052100,000261: 01,2754           56121                           XCH      OVFIND                                
052101,000262: 01,2755           54067                 -1        TS       NEWJOB                                
052102,000263: 01,2756           00003        ENDPRCHG           RELINT                                         
052103,000264: 01,2757           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
052104,000265: 01,2760           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
052105,000266: 01,2761           62763                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
052106,000267: 01,2762           52006                           DTCB                                           
052107,000268: 

Page 1215

052109,000270: 
052110,000271: 01,2763           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
052111,000272: 01,2764           64770                           AD       ONE                                   
052112,000273: 01,2765           54164                           TS       LOC                                   #  RESUME.
052113,000274: 01,2766           16017                           TCF      INTRSM                                
052114,000275: 
052115,000276:                                                                                                  #  COMPLETE JOBSLEEP PREPARATIONS.
052116,000277: 
052117,000278: 01,2767           00004        JOBSLP1            INHINT                                         
052118,000279: 01,2770           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
052119,000280: 01,2771           54167                           TS       PRIORITY                              
052120,000281: 01,2772           36043                           CAF      LOW7                                  
052121,000282: 01,2773           70006                           MASK     BBANK                                 
052122,000283: 01,2774           00006                           EXTEND                                         
052123,000284: 01,2775           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
052124,000285: 01,2776           54165                           TS       BANKSET                               
052125,000286: 01,2777           44772                           CS       ZERO                                  
052126,000287: 01,3000           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
052127,000288: 01,3001           13111                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
052128,000289: 
052129,000290: 01,3002           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0.
052130,000291: 01,3003           10067                           CCS      NEWJOB                                
052131,000292: 01,3004           13007                           TCF      +3                                    #  NEWJOB STILL PNZ
052132,000293: 01,3005           00003                           RELINT                                         #  NEW JOB HAS CHANGED TO +0. WAKE UP JOB
052133,000294: 01,3006           13201                           TCF      ADVAN      +2                         #  VIA NUDIRECT. (VERY RARE CASE.)
052134,000295: 
052135,000296: 01,3007           34767                           CAF      TWO                                   
052136,000297: 01,3010           00006                           EXTEND                                         
052137,000298: 01,3011           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
052138,000299: 01,3012           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
052139,000300: 01,3013           12703                           TCF      CHANJOB    +4                         #   POSSIBLE SLEEPING JOB.
052140,000301: 

Page 1216

052142,000303:                                                                                                  #  TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
052143,000304:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
052144,000305:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
052145,000306: 
052146,000307: 01,3014           54061        JOBWAKE2           TS       EXECTEM1                              
052147,000308: 01,3015           34772                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
052148,000309: 01,3016           54064                           TS       LOCCTR                                
052149,000310: 01,3017           32627                           CAF      NO.CORES                              
052150,000311: 01,3020           54062        JOBWAKE4           TS       EXECTEM2                              
052151,000312: 01,3021           50064                           INDEX    LOCCTR                                
052152,000313: 01,3022           10167                           CCS      PRIORITY                              
052153,000314: 01,3023           13026                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
052154,000315: 01,3024           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
052155,000316: 01,3025           13035                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
052156,000317: 
052157,000318: 01,3026           33024        JOBWAKE3           CAF      COREINC                               
052158,000319: 01,3027           26064                           ADS      LOCCTR                                
052159,000320: 01,3030           10062                           CCS      EXECTEM2                              
052160,000321: 01,3031           13020                           TCF      JOBWAKE4                              
052161,000322: 01,3032           44770                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
052162,000323: 01,3033           54064                           TS       LOCCTR                                
052163,000324: 01,3034           15210                           TCF      ENDFIND                               
052164,000325: 
052165,000326: 01,3035           40065        WAKETEST           CS       NEWLOC                                
052166,000327: 01,3036           50064                           INDEX    LOCCTR                                
052167,000328: 01,3037           60164                           AD       LOC                                   
052168,000329: 01,3040           00006                           EXTEND                                         
052169,000330: 01,3041           13043                           BZF      +2                                    #  IF MATCH.
052170,000331: 01,3042           13026                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
052171,000332: 
052172,000333: 01,3043           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
052173,000334: 01,3044           40167                           CS       PRIORITY                              
052174,000335: 01,3045           54063                           TS       NEWPRIO                               
052175,000336: 01,3046           50064                           INDEX    LOCCTR                                
052176,000337: 01,3047           54167                           TS       PRIORITY                              
052177,000338: 
052178,000339: 01,3050           44344                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
052179,000340: 01,3051           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
052180,000341: 01,3052           64756                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
052181,000342: 01,3053           56065                           XCH      NEWLOC                                
052182,000343: 01,3054           74344                           MASK     FBANKMSK                              
052183,000344: 01,3055           50064                           INDEX    LOCCTR                                
052184,000345: 01,3056           60165                           AD       BANKSET                               
052185,000346: 01,3057           54066                           TS       NEWLOC     +1                         
052186,000347: 
052187,000348: 01,3060           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
052188,000349: 01,3061           12654                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
052189,000350: 01,3062           12644                           TCF      SPECTEST                              
052190,000351: 

Page 1217

052192,000353:                                                                                                  #  PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
052193,000354: 
052194,000355: 01,3063           54164        PRIOCH2            TS       LOC                                   
052195,000356: 01,3064           34772                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
052196,000357: 01,3065           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
052197,000358: 01,3066           35021                           CAF      LOW9                                  
052198,000359: 01,3067           70167                           MASK     PRIORITY                              
052199,000360: 01,3070           60063                           AD       NEWPRIO                               
052200,000361: 01,3071           54167                           TS       PRIORITY                              
052201,000362: 01,3072           40000                           COM                                            
052202,000363: 01,3073           13000                           TCF      JOBSLP2                               #  AND TO EJSCAN.
052203,000364: 

Page 1218

052205,000366:                                                                                                  #  RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
052206,000367: 
052207,000368: 01,3074           00004        ENDJOB1            INHINT                                         
052208,000369: 01,3075           44772                           CS       ZERO                                  
052209,000370: 01,3076           54131                           TS       BUF        +1                         
052210,000371: 01,3077           56167                           XCH      PRIORITY                              
052211,000372: 01,3100           75021                           MASK     LOW9                                  
052212,000373: 01,3101           54001                           TS       L                                     
052213,000374: 
052214,000375: 01,3102           45213                           CS       FAKEPRET                              
052215,000376: 01,3103           60001                           AD       L                                     
052216,000377: 
052217,000378: 01,3104           00006                           EXTEND                                         
052218,000379: 01,3105           63111                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
052219,000380: 
052220,000381: 01,3106           10001                           CCS      L                                     
052221,000382: 01,3107           50000                           INDEX    A                                     
052222,000383: 01,3110           54000                           TS       0                                     
052223,000384: 
052224,000385: 01,3111           10203        EJSCAN             CCS      PRIORITY   +12D                       
052225,000386: 01,3112           03156                           TC       EJ1                                   
052226,000387: 01,3113     1361                                  EBANK=   SELFRET                               
052227,000388: 01,3113           66102        SELFBANK           BBCON    SELFCHK                               #  CANNOT GET HERE
052228,000389: 01,3114           13115                           TCF      +1                                    
052229,000390: 
052230,000391: 01,3115           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
052231,000392: 01,3116           03156                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
052232,000393: 01,3117           40201        OCT40201           OCT      40201                                 #  CANNOT GET HERE
052233,000394: 01,3120           13121                           TCF      +1                                    
052234,000395: 
052235,000396: 01,3121           10233                           CCS      PRIORITY   +36D                       
052236,000397: 01,3122           03156                           TC       EJ1                                   
052237,000398: 01,3123           67610        -CCSPR             -CCS     PRIORITY                              
052238,000399: 01,3124           13125                           TCF      +1                                    
052239,000400: 
052240,000401: 01,3125           10247                           CCS      PRIORITY   +48D                       
052241,000402: 01,3126           03156                           TC       EJ1                                   
052242,000403: 01,3127           03724        PHS2CADR           GENADR   PHSPART2                              #  CANNOT GET HERE
052243,000404: 01,3130           13131                           TCF      +1                                    
052244,000405: 
052245,000406: 01,3131           10263                           CCS      PRIORITY   +60D                       
052246,000407: 01,3132           03156                           TC       EJ1                                   
052247,000408: 01,3133           03502        PRT2CADR           GENADR   GETPART2                              #  CANNOT GET HERE
052248,000409: 01,3134           13135                           TCF      +1                                    
052249,000410: 
052250,000411: 01,3135           10277                           CCS      PRIORITY   +72D                       
052251,000412: 01,3136           03156                           TC       EJ1                                   
052252,000413: 01,3137           05332        LGCLCADR           GENADR   LONGCALL                              #  CANNOT GET HERE
052253,000414: 01,3140           13141                           TCF      +1                                    
052254,000415: 

Page 1219

052256,000417:                                                                                                  #  EVALUATE THE RESULTS OF THE SCAN.
052257,000418: 
052258,000419: 01,3141           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
052259,000420: 
052260,000421: 01,3142           53301        GETCADR            DXCH     LONGCADR                              #  CANNOT GET HERE
052261,000422: 01,3143           05214                           TC       SUPDXCHZ                              
052262,000423: 01,3144           13146                           TCF      +2                                    
052263,000424: 01,3145           13171                           TCF      DUMMYJOB                              
052264,000425: 01,3146           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
052265,000426: 01,3147           13151                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
052266,000427: 01,3150           12755                           TCF      ENDPRCHG   -1                         
052267,000428: 
052268,000429: 01,3151           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
052269,000430: 01,3152           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
052270,000431: 01,3153           63123                           AD       -CCSPR                                
052271,000432: 01,3154           54067                           TS       NEWJOB                                
052272,000433: 01,3155           12675                           TCF      CHANJOB    -2                         
052273,000434: 
052274,000435: 01,3156           54132        EJ1                TS       BUF        +2                         
052275,000436: 01,3157           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
052276,000437: 01,3160           10000                           CCS      A                                     
052277,000438: 01,3161           40132                           CS       BUF        +2                         
052278,000439: 01,3162           13165                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
052279,000440: 01,3163           13164                           NOOP                                           
052280,000441: 01,3164           16710                           TCF      Q+2                                   
052281,000442: 
052282,000443: 01,3165           54131        EJ2                TS       BUF        +1                         
052283,000444: 01,3166           30002                           CA       Q                                     
052284,000445: 01,3167           54130                           TS       BUF                                   #  FOR LOCATING CCS PRIORITY + X INSTR.
052285,000446: 01,3170           16710                           TCF      Q+2                                   
052286,000447: 

Page 1220

052288,000449:                                                                                                  #  IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
052289,000450:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
052290,000451: 
052291,000452: 01,3171     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
052292,000453: 
052293,000454: 01,3171           44772        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
052294,000455: 01,3172           54067                           TS       NEWJOB                                
052295,000456: 01,3173           00003                 +2        RELINT                                         
052296,000457: 01,3174           44767                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
052297,000458: 01,3175           00006                           EXTEND                                         
052298,000459: 01,3176           03011                           WAND     DSALMOUT                              
052299,000460: 01,3177           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE ?
052300,000461: 01,3200           13002                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
052301,000462: 01,3201           34767                 +2        CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
052302,000463: 01,3202           13207                           TCF      NUDIRECT                              #  EXECUTION.
052303,000464: 
052304,000465: 01,3203           31361                           CA       SELFRET                               
052305,000466: 01,3204           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
052306,000467: 01,3205           33113                           CAF      SELFBANK                              
052307,000468: 01,3206           15215                           TCF      SUPDXCHZ   +1                         #   AND DISPATCH JOB.
052308,000469: 
052309,000470: 01,3207           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
052310,000471: 01,3210           05011                           WOR      DSALMOUT                              
052311,000472: 01,3211           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
052312,000473: 01,3212           15214                           TCF      SUPDXCHZ                              
052313,000474: 
052314,000475:    4000                                           SETLOC   EXECF2                                
052315,000476:    4000                                           BANK                                           
052316,000477: 
052317,000478:    5214                                           COUNT*   $$/EXEC                               
052318,000479: 
052319,000480:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
052320,000481:                                                                                                  #  CALLING SEQUENCE
052321,000482:                                                                                                  #                TCF     SUPDXCHZ        WITH 2CADR OF DESIRED LOCATION IN A + L.
052322,000483: 
052323,000484:    5214           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
052324,000485:    5215           00006                 +1        EXTEND                                         
052325,000486:    5216           01007                           WRITE    SUPERBNK                              
052326,000487:    5217           54006                           TS       BBANK                                 
052327,000488:    5220           00001                           TC       L                                     
052328,000489: 
052329,000490:    5221           77677        NEG100             OCT      77677                                 

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