Source Code
These source-code files derive from a printout of Luminary 116 (the Apollo 12
Lunar Module guidance computer program), from the personal library of
original AGC developer Don Eyles, digitally photographed at archive.org,
financially sponsored by Ron Burkey, 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 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071 19:09 AUG. 11,1969Note that the date is the date of the printout, not the date of the program revision. |
046415,000002: ## Copyright: Public domain.
046416,000003: ## Filename: EXECUTIVE.agc
046417,000004: ## Purpose: A section of Luminary revision 116.
046418,000005: ## It is part of the source code for the Lunar Module's (LM)
046419,000006: ## Apollo Guidance Computer (AGC) for Apollo 12.
046420,000007: ## This file is intended to be a faithful transcription, except
046421,000008: ## that the code format has been changed to conform to the
046422,000009: ## requirements of the yaYUL assembler rather than the
046423,000010: ## original YUL assembler.
046424,000011: ## Reference: pp. 1095-1108
046425,000012: ## Assembler: yaYUL
046426,000013: ## Contact: Ron Burkey <info@sandroid.org>.
046427,000014: ## Website: www.ibiblio.org/apollo/index.html
046428,000015: ## Mod history: 2017-01-22 MAS Created from Luminary 99.
046429,000016: ## 2017-03-10 HG Transcribed
046430,000017: ## 2017-03-13 RSB Proofed comment text via 3-way diff vs
046431,000018: ## Luminary 99 and 132.
046432,000019: ## 2017-03-15 RSB Comment-text fixes identified in 5-way
046433,000020: ## side-by-side diff of Luminary 69/99/116/131/210.
046434,000021:
Page 1095 |
046436,000023: 5072 BLOCK 02
046437,000024: # TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
046438,000025:
046439,000026: 5072 COUNT* $$/EXEC
046440,000027: 5072 00004 NOVAC INHINT
046441,000028: 5073 65164 AD FAKEPRET # LOC(MPAC +6) - LOC(QPRET)
046442,000029: 5074 54063 TS NEWPRIO # PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
046443,000030:
046444,000031: 5075 00006 EXTEND
046445,000032: 5076 50002 INDEX Q # Q WILL BE UNDISTURBED THROUGHOUT.
046446,000033: 5077 30001 DCA 0 # 2CADR OF JOB ENTERED.
046447,000034: 5100 52066 DXCH NEWLOC
046448,000035: 5101 35163 CAF EXECBANK
046449,000036: 5102 56004 XCH FBANK
046450,000037: 5103 54061 TS EXECTEM1
046451,000038: 5104 12626 TCF NOVAC2 # ENTER EXECUTIVE BANK.
046452,000039:
046453,000040: # TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
046454,000041:
046455,000042: 5105 00004 FINDVAC INHINT
046456,000043: 5106 54063 TS NEWPRIO
046457,000044: 5107 00006 EXTEND
046458,000045: 5110 50002 INDEX Q
046459,000046: 5111 30001 DCA 0
046460,000047: 5112 52066 SPVACIN DXCH NEWLOC
046461,000048: 5113 35163 CAF EXECBANK
046462,000049: 5114 56004 XCH FBANK
046463,000050: 5115 12602 TCF FINDVAC2 # OFF TO EXECUTIVE SWITCHED-BANK.
046464,000051:
046465,000052: # TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
046466,000053:
046467,000054: # USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
046468,000055:
046469,000056: 5116 56002 SPVAC XCH Q
046470,000057: 5117 67751 AD NEG2
046471,000058: 5120 56002 XCH Q
046472,000059: 5121 15112 TCF SPVACIN
046473,000060:
046474,000061: # TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
046475,000062:
046476,000063: 5122 22002 CHANG1 LXCH Q
046477,000064: 5123 35163 CAF EXECBANK
046478,000065: 5124 56006 XCH BBANK
046479,000066: 5125 12707 TCF CHANJOB
046480,000067:
046481,000068: # TO SUSPEND AN INTERPRETIVE JOB:
046482,000069:
046483,000070: 5126 40164 CHANG2 CS LOC # NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
046484,000071: # ITRACE (4) REFERS TO "CHANG2".
046485,000072: 5127 54001 TS L
046486,000073:
Page 1096 |
046488,000075: 5130 35163 +2 CAF EXECBANK
046489,000076: 5131 54006 TS BBANK
046490,000077: 5132 12706 TCF CHANJOB -1
046491,000078:
Page 1097 |
046493,000080: # TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
046494,000081:
046495,000082: 5133 54164 JOBSLEEP TS LOC
046496,000083: 5134 35163 CAF EXECBANK
046497,000084: 5135 54004 TS FBANK
046498,000085: 5136 12777 TCF JOBSLP1
046499,000086:
046500,000087: # TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
046501,000088:
046502,000089: 5137 00004 JOBWAKE INHINT
046503,000090: 5140 54065 TS NEWLOC
046504,000091: 5141 44752 CS TWO # EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
046505,000092: 5142 26002 ADS Q
046506,000093: 5143 35163 CAF EXECBANK
046507,000094: 5144 56004 XCH FBANK
046508,000095: 5145 13024 TCF JOBWAKE2
046509,000096:
046510,000097: # TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
046511,000098:
046512,000099: 5146 00004 PRIOCHNG INHINT # NEW PRIORITY ARRIVES IN A. RETURNS TO
046513,000100: 5147 54063 TS NEWPRIO # CALLER AS SOON AS NEW JOB PRIORITY IS
046514,000101: 5150 35163 CAF EXECBANK # HIGHEST. PREPARE FOR POSSIBLE BASIC-
046515,000102: 5151 56006 XCH BBANK # STYLE CHANGE-JOB.
046516,000103: 5152 54165 TS BANKSET
046517,000104: 5153 30002 CA Q
046518,000105: 5154 13073 TCF PRIOCH2
046519,000106:
046520,000107: # TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
046521,000108:
046522,000109: 5155 35163 ENDOFJOB CAF EXECBANK
046523,000110: 5156 54004 TS FBANK
046524,000111: 5157 13104 TCF ENDJOB1
046525,000112:
046526,000113: 5160 30061 ENDFIND CA EXECTEM1 # RETURN TO CALLER AFTER JOB ENTRY
046527,000114: 5161 54004 TS FBANK # COMPLETE.
046528,000115: 5162 16744 TCF Q+2
046529,000116: 5163 02602 EXECBANK CADR FINDVAC2
046530,000117:
046531,000118: 5164 00110 FAKEPRET ADRES MPAC -36D # LOC(MPAC +6) - LOC(QPRET)
046532,000119:
Page 1098 |
046534,000121: # LOCATE AN AVAILABLE VAC AREA.
046535,000122:
046536,000123: 01,2602 BANK 01
046537,000124: 01,2602 COUNT* $$/EXEC
046538,000125: 01,2602 54061 FINDVAC2 TS EXECTEM1 # (SAVE CALLER'S BANK FIRST.)
046539,000126: 01,2603 10400 CCS VAC1USE
046540,000127: 01,2604 12621 TCF VACFOUND
046541,000128: 01,2605 10454 CCS VAC2USE
046542,000129: 01,2606 12621 TCF VACFOUND
046543,000130: 01,2607 10530 CCS VAC3USE
046544,000131: 01,2610 12621 TCF VACFOUND
046545,000132: 01,2611 10604 CCS VAC4USE
046546,000133: 01,2612 12621 TCF VACFOUND
046547,000134: 01,2613 10660 CCS VAC5USE
046548,000135: 01,2614 12621 TCF VACFOUND
046549,000136: 01,2615 22061 LXCH EXECTEM1
046550,000137: 01,2616 30002 CA Q
046551,000138: 01,2617 05706 TC BAILOUT1
046552,000139: 01,2620 31201 OCT 31201 # NO VAC AREAS
046553,000140:
046554,000141: 01,2621 64752 VACFOUND AD TWO # RESERVE THIS VAC AREA BY STORING A ZERO
046555,000142: 01,2622 22007 ZL # IN ITS VAC USE REGISTER AND STORE THE
046556,000143: 01,2623 50000 INDEX A # ADDRESS OF THE FIRST WORD OF IT IN THE
046557,000144: 01,2624 21777 LXCH 0 -1 # LOW NINE BITS OF THE PRIORITY WORD.
046558,000145: 01,2625 26063 ADS NEWPRIO
046559,000146:
046560,000147: 01,2626 34755 NOVAC2 CAF ZERO # NOVAC ENTERS HERE. FIND A CORE SET.
046561,000148: 01,2627 54064 TS LOCCTR
046562,000149: 01,2630 32635 CAF NO.CORES # SEVEN SETS OF ELEVEN REGISTERS EACH.
046563,000150: 01,2631 54062 NOVAC3 TS EXECTEM2
046564,000151: 01,2632 50064 INDEX LOCCTR
046565,000152: 01,2633 10167 CCS PRIORITY # EACH PRIORITY REGISTER CONTAINS -0 IF
046566,000153: 01,2634 12675 TCF NEXTCORE # THE CORRESPONDING CORE SET IS AVAILABLE.
046567,000154: 01,2635 00007 NO.CORES DEC 7 B-14
046568,000155: 01,2636 12675 TCF NEXTCORE # AN ACTIVE JOB HAS A POSITIVE PRIORITY
046569,000156: # BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
046570,000157:
046571,000158:
Page 1099 |
046573,000160: 01,2637 30063 CORFOUND CA NEWPRIO # SET THE PRIORITY OF THIS JOB IN THE CORE
046574,000161: 01,2640 50064 INDEX LOCCTR # SET'S PRIORITY REGISTER AND SET THE
046575,000162: 01,2641 54167 TS PRIORITY # JOB'S PUSH-DOWN POINTER AT THE BEGINNING
046576,000163: 01,2642 75004 MASK LOW9 # OF THE WORK AREA AND OVERFLOW INDICATOR
046577,000164: 01,2643 50064 INDEX LOCCTR
046578,000165: 01,2644 54166 TS PUSHLOC # OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
046579,000166:
046580,000167: 01,2645 10064 CCS LOCCTR # IF CORE SET ZERO IS BEING LOADED, SET UP
046581,000168: 01,2646 12662 TCF SETLOC # OVFIND AND FIXLOC IMMEDIATELY .
046582,000169: 01,2647 54121 TS OVFIND
046583,000170: 01,2650 30166 CA PUSHLOC
046584,000171: 01,2651 54120 TS FIXLOC
046585,000172:
046586,000173: 01,2652 10067 SPECTEST CCS NEWJOB # SEE IF ANY ACTIVE JOBS WAITING (RARE).
046587,000174: 01,2653 12662 TCF SETLOC # MUST BE AWAKENED BUT UNCHANGED JOB.
046588,000175: 01,2654 05675 TC CCSHOLE
046589,000176: 01,2655 05675 TC CCSHOLE
046590,000177: 01,2656 54067 TS NEWJOB # +0 SHOWS ACTIVE JOB ALREADY SET.
046591,000178: 01,2657 52066 DXCH NEWLOC
046592,000179: 01,2660 52165 DXCH LOC
046593,000180: 01,2661 15160 TCF ENDFIND
046594,000181:
046595,000182: 01,2662 52066 SETLOC DXCH NEWLOC # SET UP THE LOCATION REGISTERS FOR THIS
046596,000183: 01,2663 50064 INDEX LOCCTR
046597,000184: 01,2664 52165 DXCH LOC
046598,000185: 01,2665 50067 INDEX NEWJOB # THIS INDEX INSTRUCTION INSURES THAT THE
046599,000186: 01,2666 40167 CS PRIORITY # HIGHEST ACTIVE PRIORITY WILL BE COMPARED
046600,000187: 01,2667 60063 AD NEWPRIO # WITH THE NEW PRIORITY TO SEE IF NEWJOB
046601,000188: 01,2670 00006 EXTEND # SHOULD BE SET TO SIGNAL A SWITCH.
046602,000189: 01,2671 65160 BZMF ENDFIND
046603,000190: 01,2672 30064 CA LOCCTR # LOCCTR IS LEFT SET AT THIS CORE SET IF
046604,000191: 01,2673 54067 TS NEWJOB # THE CALLER WANTS TO LOAD ANY MPAC
046605,000192: 01,2674 15160 TCF ENDFIND # REGISTERS, ETC.
046606,000193:
046607,000194: 01,2675 33034 NEXTCORE CAF COREINC
046608,000195: 01,2676 26064 ADS LOCCTR
046609,000196: 01,2677 10062 CCS EXECTEM2
046610,000197: 01,2700 12631 TCF NOVAC3
046611,000198: 01,2701 22061 LXCH EXECTEM1
046612,000199: 01,2702 30002 CA Q
046613,000200: 01,2703 05706 TC BAILOUT1 # NO CORE SETS AVAILABLE.
046614,000201: 01,2704 31202 OCT 31202
046615,000202:
Page 1100 |
046617,000204: # THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
046618,000205:
046619,000206: 01,2705 22164 -2 LXCH LOC
046620,000207: 01,2706 30165 -1 CAE BANKSET # BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
046621,000208: 01,2707 00004 CHANJOB INHINT
046622,000209: 01,2710 00006 EXTEND
046623,000210: 01,2711 04007 ROR SUPERBNK # PICK UP CURRENT SBANK FOR BBCON
046624,000211: 01,2712 56001 XCH L # LOC IN A AND BBCON IN L.
046625,000212: 01,2713 50067 +4 INDEX NEWJOB # SWAP LOC AND BANKSET.
046626,000213: 01,2714 52165 DXCH LOC
046627,000214: 01,2715 52165 DXCH LOC
046628,000215:
046629,000216: 01,2716 30165 CAE BANKSET
046630,000217: 01,2717 00006 EXTEND
046631,000218: 01,2720 01007 WRITE SUPERBNK # SET SBANK FOR NEW JOB.
046632,000219: 01,2721 52155 DXCH MPAC # SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
046633,000220: 01,2722 50067 INDEX NEWJOB
046634,000221: 01,2723 52155 DXCH MPAC
046635,000222: 01,2724 52155 DXCH MPAC
046636,000223: 01,2725 52157 DXCH MPAC +2
046637,000224: 01,2726 50067 INDEX NEWJOB
046638,000225: 01,2727 52157 DXCH MPAC +2
046639,000226: 01,2730 52157 DXCH MPAC +2
046640,000227: 01,2731 52161 DXCH MPAC +4
046641,000228: 01,2732 50067 INDEX NEWJOB
046642,000229: 01,2733 52161 DXCH MPAC +4
046643,000230: 01,2734 52161 DXCH MPAC +4
046644,000231: 01,2735 52163 DXCH MPAC +6
046645,000232: 01,2736 50067 INDEX NEWJOB
046646,000233: 01,2737 52163 DXCH MPAC +6
046647,000234: 01,2740 52163 DXCH MPAC +6
046648,000235:
046649,000236: 01,2741 34755 CAF ZERO
046650,000237: 01,2742 56121 XCH OVFIND # MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
046651,000238: 01,2743 00006 EXTEND
046652,000239: 01,2744 12747 BZF +3
046653,000240: 01,2745 40166 CS PUSHLOC
046654,000241: 01,2746 54166 TS PUSHLOC
046655,000242:
046656,000243: 01,2747 52167 DXCH PUSHLOC
046657,000244: 01,2750 50067 INDEX NEWJOB
046658,000245: 01,2751 52167 DXCH PUSHLOC
046659,000246: 01,2752 52167 DXCH PUSHLOC # SWAPS PUSHLOC AND PRIORITY.
046660,000247: 01,2753 35004 CAF LOW9 # SET FIXLOC TO BASE OF VAC AREA.
046661,000248: 01,2754 70167 MASK PRIORITY
046662,000249: 01,2755 54120 TS FIXLOC
046663,000250:
046664,000251: 01,2756 10166 CCS PUSHLOC # SET OVERFLOW INDICATOR ACCORDING TO
046665,000252: 01,2757 34755 CAF ZERO
046666,000253: 01,2760 12765 TCF ENDPRCHG -1
046667,000254:
Page 1101 |
046669,000256: 01,2761 40166 CS PUSHLOC
046670,000257: 01,2762 54166 TS PUSHLOC
046671,000258: 01,2763 34753 CAF ONE
046672,000259: 01,2764 56121 XCH OVFIND
046673,000260: 01,2765 54067 TS NEWJOB
046674,000261:
046675,000262: 01,2766 00003 ENDPRCHG RELINT
046676,000263: 01,2767 52165 DXCH LOC # BASIC JOBS HAVE POSITIVE ADDRESSES, SO
046677,000264: 01,2770 00006 EXTEND # DISPATCH WITH A DTCB.
046678,000265: 01,2771 62773 BZMF +2 # IF INTERPRETIVE, SET UP EBANK, ETC.
046679,000266: 01,2772 52006 DTCB
Note: After the statments a note in blue pencil is written diagonally from left bottom to top right: ENDPRCHG and in a second line underneath it +4 |
046682,000269:
Page 1102 |
046684,000271: 01,2773 40000 COM # EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
046685,000272: 01,2774 64753 AD ONE
046686,000273: 01,2775 54164 TS LOC # RESUME.
046687,000274: 01,2776 16053 TCF INTRSM
046688,000275:
046689,000276: # COMPLETE JOBSLEEP PREPARATIONS.
046690,000277:
046691,000278: 01,2777 00004 JOBSLP1 INHINT
046692,000279: 01,3000 40167 CS PRIORITY # NNZ PRIORITY SHOWS JOB ASLEEP.
046693,000280: 01,3001 54167 TS PRIORITY
046694,000281: 01,3002 36077 CAF LOW7
046695,000282: 01,3003 70006 MASK BBANK
046696,000283: 01,3004 00006 EXTEND
046697,000284: 01,3005 04007 ROR SUPERBNK # SAVE OLD SUPERBANK VALUE.
046698,000285: 01,3006 54165 TS BANKSET
046699,000286: 01,3007 44755 CS ZERO
046700,000287: 01,3010 54131 JOBSLP2 TS BUF +1 # HOLDS - HIGHEST PRIORITY.
046701,000288: 01,3011 13121 TCF EJSCAN # SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
046702,000289:
046703,000290: 01,3012 00004 NUCHANG2 INHINT # QUICK... DONT LET NEWJOB CHANGE TO +0 .
046704,000291: 01,3013 10067 CCS NEWJOB
046705,000292: 01,3014 13017 TCF +3 # NEWJOB STILL PNZ
046706,000293: 01,3015 00003 RELINT # NEWJOB HAS CHANGED TO +0. WAKE UP JOB
046707,000294: 01,3016 13217 TCF ADVAN +2 # VIA NUDIRECT. (VERY RARE CASE.)
046708,000295:
046709,000296: 01,3017 34752 CAF TWO
046710,000297: 01,3020 00006 EXTEND
046711,000298: 01,3021 05011 WOR DSALMOUT # TURN ON ACTIVITY LIGHT
046712,000299: 01,3022 52165 DXCH LOC # AND SAVE ADDRESS INFO FOR BENEFIT OF
046713,000300: 01,3023 12713 TCF CHANJOB +4 # POSSIBLE SLEEPING JOB.
046714,000301:
Page 1103 |
046716,000303: # TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
046717,000304: # LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
046718,000305: # LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
046719,000306:
046720,000307: 01,3024 54061 JOBWAKE2 TS EXECTEM1
046721,000308: 01,3025 34755 CAF ZERO # BEGIN CORE SET SCAN.
046722,000309: 01,3026 54064 TS LOCCTR
046723,000310: 01,3027 32635 CAF NO.CORES
046724,000311: 01,3030 54062 JOBWAKE4 TS EXECTEM2
046725,000312: 01,3031 50064 INDEX LOCCTR
046726,000313: 01,3032 10167 CCS PRIORITY
046727,000314: 01,3033 13036 TCF JOBWAKE3 # ACTIVE JOB - CHECK NEXT CORE SET.
046728,000315: 01,3034 00014 COREINC DEC 12 B-14 # 12 REGISTERS PER CORE SET.
046729,000316: 01,3035 13045 TCF WAKETEST # SLEEPING JOB - SEE IF CADR MATCHES.
046730,000317:
046731,000318: 01,3036 33034 JOBWAKE3 CAF COREINC
046732,000319: 01,3037 26064 ADS LOCCTR
046733,000320: 01,3040 10062 CCS EXECTEM2
046734,000321: 01,3041 13030 TCF JOBWAKE4
046735,000322: 01,3042 44753 CS ONE # EXIT IF SLEEPING JOB NOT FOUND.
046736,000323: 01,3043 54064 TS LOCCTR
046737,000324: 01,3044 15160 TCF ENDFIND
046738,000325:
046739,000326: 01,3045 40065 WAKETEST CS NEWLOC
046740,000327: 01,3046 50064 INDEX LOCCTR
046741,000328: 01,3047 60164 AD LOC
046742,000329: 01,3050 00006 EXTEND
046743,000330: 01,3051 13053 BZF +2 # IF MATCH.
046744,000331: 01,3052 13036 TCF JOBWAKE3 # EXAMINE NEXT CORE SET IF NO MATCH.
046745,000332:
046746,000333: 01,3053 50064 INDEX LOCCTR # RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
046747,000334: 01,3054 40167 CS PRIORITY
046748,000335: 01,3055 54063 TS NEWPRIO
046749,000336: 01,3056 50064 INDEX LOCCTR
046750,000337: 01,3057 54167 TS PRIORITY
046751,000338:
046752,000339: 01,3060 44350 CS FBANKMSK # MAKE UP THE 2CADR OF THE WAKE ADDRESS
046753,000340: 01,3061 70065 MASK NEWLOC # USING THE CADR IN NEWLOC AND THE EBANK
046754,000341: 01,3062 64741 AD 2K # HALF OF BBANK SAVED IN BANKSET.
046755,000342: 01,3063 56065 XCH NEWLOC
046756,000343: 01,3064 74350 MASK FBANKMSK
046757,000344: 01,3065 50064 INDEX LOCCTR
046758,000345: 01,3066 60165 AD BANKSET
046759,000346: 01,3067 54066 TS NEWLOC +1
046760,000347:
046761,000348: 01,3070 10064 CCS LOCCTR # SPECIAL TREATMENT IF THIS JOB WAS
046762,000349: 01,3071 12662 TCF SETLOC # ALREADY IN THE RUN (0) POSITION.
046763,000350: 01,3072 12652 TCF SPECTEST
046764,000351:
Page 1104 |
046766,000353: # PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
046767,000354:
046768,000355: 01,3073 54164 PRIOCH2 TS LOC
046769,000356: 01,3074 34755 CAF ZERO # SET FLAG TO TELL ENDJOB SCANNER IF THIS
046770,000357: 01,3075 54130 TS BUF # JOB IS STILL HIGHEST PRIORITY.
046771,000358: 01,3076 35004 CAF LOW9
046772,000359: 01,3077 70167 MASK PRIORITY
046773,000360: 01,3100 60063 AD NEWPRIO
046774,000361: 01,3101 54167 TS PRIORITY
046775,000362: 01,3102 40000 COM
046776,000363: 01,3103 13010 TCF JOBSLP2 # AND TO EJSCAN.
046777,000364:
Page 1105 |
046779,000366: # RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
046780,000367:
046781,000368: 01,3104 00004 ENDJOB1 INHINT
046782,000369: 01,3105 44755 CS ZERO
046783,000370: 01,3106 54131 TS BUF +1
046784,000371: 01,3107 56167 XCH PRIORITY
046785,000372: 01,3110 75004 MASK LOW9
046786,000373: 01,3111 54001 TS L
046787,000374:
046788,000375: 01,3112 45164 CS FAKEPRET
046789,000376: 01,3113 60001 AD L
046790,000377:
046791,000378: 01,3114 00006 EXTEND
046792,000379: 01,3115 63121 BZMF EJSCAN # NOVAC ENDOFJOB
046793,000380:
046794,000381: 01,3116 10001 CCS L
046795,000382: 01,3117 50000 INDEX A
046796,000383: 01,3120 54000 TS 0
046797,000384:
046798,000385: 01,3121 10203 EJSCAN CCS PRIORITY +12D
046799,000386: 01,3122 03172 TC EJ1
046800,000387: 01,3123 05675 TC CCSHOLE
046801,000388: 01,3124 13125 TCF +1
046802,000389:
046803,000390: 01,3125 10217 CCS PRIORITY +24D # EXAMINE EACH PRIORITY REGISTER TO FIND
046804,000391: 01,3126 03172 TC EJ1 # THE JOB OF HIGHEST ACTIVE PRIORITY.
046805,000392: 01,3127 05675 TC CCSHOLE
046806,000393: 01,3130 13131 TCF +1
046807,000394:
046808,000395: 01,3131 10233 CCS PRIORITY +36D
046809,000396: 01,3132 03172 TC EJ1
046810,000397: 01,3133 67610 -CCSPR -CCS PRIORITY
046811,000398: 01,3134 13135 TCF +1
046812,000399:
046813,000400: 01,3135 10247 CCS PRIORITY +48D
046814,000401: 01,3136 03172 TC EJ1
046815,000402: 01,3137 05675 TC CCSHOLE
046816,000403: 01,3140 13141 TCF +1
046817,000404:
046818,000405: 01,3141 10263 CCS PRIORITY +60D
046819,000406: 01,3142 03172 TC EJ1
046820,000407: 01,3143 05675 TC CCSHOLE
046821,000408: 01,3144 13145 TCF +1
046822,000409:
046823,000410: 01,3145 10277 CCS PRIORITY +72D
046824,000411: 01,3146 03172 TC EJ1
046825,000412: 01,3147 05675 TC CCSHOLE
046826,000413: 01,3150 13151 TCF +1
046827,000414:
046828,000415: 01,3151 10313 CCS PRIORITY +84D
046829,000416:
Page 1106 |
046831,000418: 01,3152 03172 TC EJ1
046832,000419: 01,3153 05675 TC CCSHOLE
046833,000420: 01,3154 13155 TCF +1
046834,000421:
Page 1107 |
046836,000423: # EVALUATE THE RESULTS OF THE SCAN.
046837,000424:
046838,000425: 01,3155 10131 CCS BUF +1 # SEE IF THERE ARE ANY ACTIVE JOBS WAITING
046839,000426: 01,3156 05675 TC CCSHOLE
046840,000427: 01,3157 05675 TC CCSHOLE
046841,000428:
046842,000429: 01,3160 13162 TCF +2
046843,000430: 01,3161 13207 TCF DUMMYJOB
046844,000431: 01,3162 10130 CCS BUF # BUF IS ZERO IF THIS IS A PRIOCHNG AND
046845,000432: 01,3163 13165 TCF +2 # CHANGED PRIORITY IS STILL HIGHEST.
046846,000433: 01,3164 12765 TCF ENDPRCHG -1
046847,000434:
046848,000435: 01,3165 50000 INDEX A # OTHERWISE, SET NEWJOB TO THE RELATIVE
046849,000436: 01,3166 27777 CAF 0 -1 # ADDRESS OF THE NEW JOB'S CORE SET.
046850,000437: 01,3167 63133 AD -CCSPR
046851,000438: 01,3170 54067 TS NEWJOB
046852,000439: 01,3171 12705 TCF CHANJOB -2
046853,000440:
046854,000441: 01,3172 54132 EJ1 TS BUF +2
046855,000442: 01,3173 60131 AD BUF +1 # - OLD HIGH PRIORITY.
046856,000443: 01,3174 10000 CCS A
046857,000444: 01,3175 40132 CS BUF +2
046858,000445: 01,3176 13202 TCF EJ2 # NEW HIGH PRIORITY.
046859,000446: 01,3177 13200 NOOP
046860,000447: 01,3200 50002 INDEX Q
046861,000448: 01,3201 00002 TC 2 # PROCEED WITH SEARCH.
046862,000449:
046863,000450: 01,3202 54131 EJ2 TS BUF +1
046864,000451: 01,3203 00006 EXTEND
046865,000452: 01,3204 22130 QXCH BUF # FOR LOCATING CCS PRIORITY + X INSTR.
046866,000453: 01,3205 50130 INDEX BUF
046867,000454: 01,3206 00002 TC 2
046868,000455:
Page 1108 |
046870,000457: # IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
046871,000458: # BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
046872,000459:
046873,000460: 01,3207 1361 EBANK= SELFRET # SELF-CHECK STORAGE IN EBANK.
046874,000461:
046875,000462: 01,3207 44755 DUMMYJOB CS ZERO # SET NEWJOB TO -0 FOR IDLING.
046876,000463: 01,3210 54067 TS NEWJOB
046877,000464: 01,3211 00003 RELINT
046878,000465: 01,3212 44752 CS TWO # TURN OFF THE ACTIVITY LIGHT.
046879,000466: 01,3213 00006 EXTEND
046880,000467: 01,3214 03011 WAND DSALMOUT
046881,000468: 01,3215 10067 ADVAN CCS NEWJOB # IS A NEWJOB ACTIVE ?
046882,000469: 01,3216 13012 TCF NUCHANG2 # YES... ONE REQUIRING A CHANGE JOB.
046883,000470: 01,3217 34752 CAF TWO # NEW JOB ALREADY IN POSITION FOR
046884,000471: 01,3220 13226 TCF NUDIRECT # EXECUTION.
046885,000472:
046886,000473: 01,3221 31361 CA SELFRET
046887,000474: 01,3222 54001 TS L # PUT RETURN ADDRESS IN L.
046888,000475: 01,3223 33225 CAF SELFBANK
046889,000476: 01,3224 15166 TCF SUPDXCHZ +1 # AND DISPATCH JOB.
046890,000477:
046891,000478: 01,3225 1361 EBANK= SELFRET
046892,000479: 01,3225 66102 SELFBANK BBCON SELFCHK
046893,000480:
046894,000481: 01,3226 00006 NUDIRECT EXTEND # TURN THE GREEN LIGHT BACK ON.
046895,000482: 01,3227 05011 WOR DSALMOUT
046896,000483: 01,3230 52165 DXCH LOC # JOBS STARTED IN THIS FASHION MUST BE
046897,000484: 01,3231 15165 TCF SUPDXCHZ
046898,000485:
046899,000486: 5165 BLOCK 2 # IN FIXED-FIXED SO OTHERS MAY USE.
046900,000487:
046901,000488: 5165 COUNT* $$/EXEC
046902,000489:
046903,000490: # SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
046904,000491: # CALLING SEQUENCE
046905,000492: # TCF SUPDXCHZ WITH 2CADR OF DESIRED LOCATION IN A + L.
046906,000493:
046907,000494: 5165 56001 SUPDXCHZ XCH L # BASIC.
046908,000495: 5166 00006 +1 EXTEND
046909,000496: 5167 01007 WRITE SUPERBNK
046910,000497: 5170 54006 TS BBANK
046911,000498: 5171 00001 TC L
046912,000499:
046913,000500: 5172 77677 NEG100 OCT 77677
End of include-file EXECUTIVE.agc. Parent file is MAIN.agc