Source Code
This source code is very close to the Apollo Guidance Computer software for the
Apollo 13 Lunar module. This revision of the Luminary 131 program is from December
of 1969, whereas there was a later revision in January of 1970, and still another
revision in February, which is the code that flew on the mission.
As far as this transcription is concerned, it was originally from a copy made in 1991 of
a printout from the collection of AGC developer Don Eyles for collector David Craig.
It was subsequently scanned by Gary Neff, reprocessed for online
presentation at the now-discontinued History of Recent Science and Technology (HRST) website
of MIT's Dibner Institute (the full-quality scans being discarded in the process),
and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a
high-quality replacement scan for a completely illegible page was later provided by Gary
Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many
errors to be introduced into the transcription. Accordingly, a second scan of the same physical
printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive,
and used to correct the transcription errors. All of the scanned materials mentioned,
as well as other Luminary 131 related material, are available online.
Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017,
so the two scans are not identical in that respect. The page-headings in the printout read, in part:GAP: ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091 17:53 DEC. 19, 1969Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together. |
046151,000002: ## Copyright: Public domain.
046152,000003: ## Filename: EXECUTIVE.agc
046153,000004: ## Purpose: A section of Luminary 1C, revision 131.
046154,000005: ## It is part of the source code for the Lunar Module's (LM)
046155,000006: ## Apollo Guidance Computer (AGC) for Apollo 13.
046156,000007: ## This file is intended to be a faithful transcription, except
046157,000008: ## that the code format has been changed to conform to the
046158,000009: ## requirements of the yaYUL assembler rather than the
046159,000010: ## original YUL assembler.
046160,000011: ## Reference: pp. 1097-1110
046161,000012: ## Contact: Ron Burkey <info@sandroid.org>.
046162,000013: ## Website: www.ibiblio.org/apollo/index.html
046163,000014: ## Mod history: 05/31/03 RSB. Began transcribing.
046164,000015: ## 05/14/05 RSB Corrected website reference above.
046165,000016: ## 2010-10-25 JL Indentation fixes.
046166,000017: ## 2011-05-07 JL Removed workaround.
046167,000018: ## 2017-01-06 RSB Page numbers now agree with those on the
046168,000019: ## original hardcopy, as opposed to the PDF page
046169,000020: ## numbers in 1701.pdf.
046170,000021: ## 2017-02-27 RSB Proofed comment text using octopus/ProoferComments.
046171,000022: ## 2017-03-15 RSB Comment-text fixes identified in 5-way
046172,000023: ## side-by-side diff of Luminary 69/99/116/131/210.
046173,000024:
Page 1097 |
046175,000026: 5072 BLOCK 02
046176,000027:
046177,000028: # TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
046178,000029:
046179,000030: 5072 COUNT* $$/EXEC
046180,000031: 5072 00004 NOVAC INHINT
046181,000032: 5073 65164 AD FAKEPRET # LOC(MPAC +6) - LOC(QPRET)
046182,000033: 5074 54063 TS NEWPRIO # PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
046183,000034:
046184,000035: 5075 00006 EXTEND
046185,000036: 5076 50002 INDEX Q # Q WILL BE UNDISTURBED THROUGHOUT.
046186,000037: 5077 30001 DCA 0 # 2CADR OF JOB ENTERED.
046187,000038: 5100 52066 DXCH NEWLOC
046188,000039: 5101 35163 CAF EXECBANK
046189,000040: 5102 56004 XCH FBANK
046190,000041: 5103 54061 TS EXECTEM1
046191,000042: 5104 12626 TCF NOVAC2 # ENTER EXECUTIVE BANK.
046192,000043:
046193,000044: # TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
046194,000045:
046195,000046: 5105 00004 FINDVAC INHINT
046196,000047: 5106 54063 TS NEWPRIO
046197,000048: 5107 00006 EXTEND
046198,000049: 5110 50002 INDEX Q
046199,000050: 5111 30001 DCA 0
046200,000051: 5112 52066 SPVACIN DXCH NEWLOC
046201,000052: 5113 35163 CAF EXECBANK
046202,000053: 5114 56004 XCH FBANK
046203,000054: 5115 12602 TCF FINDVAC2 # OFF TO EXECUTIVE SWITCHED-BANK.
046204,000055:
046205,000056: # TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
046206,000057: # USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
046207,000058:
046208,000059: 5116 56002 SPVAC XCH Q
046209,000060: 5117 67751 AD NEG2
046210,000061: 5120 56002 XCH Q
046211,000062: 5121 15112 TCF SPVACIN
046212,000063:
046213,000064: # TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
046214,000065:
046215,000066: 5122 22002 CHANG1 LXCH Q
046216,000067: 5123 35163 CAF EXECBANK
046217,000068: 5124 56006 XCH BBANK
046218,000069: 5125 12707 TCF CHANJOB
046219,000070:
046220,000071: # TO SUSPEND AN INTERPRETIVE JOB:
046221,000072:
046222,000073: 5126 40164 CHANG2 CS LOC # NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
046223,000074: # ITRACE (4) REFERS TO "CHANG2".
046224,000075: 5127 54001 TS L
Page 1098 |
046226,000077: 5130 35163 +2 CAF EXECBANK
046227,000078: 5131 54006 TS BBANK
046228,000079: 5132 12706 TCF CHANJOB -1
046229,000080:
Page 1099 |
046231,000082: # TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
046232,000083:
046233,000084: 5133 54164 JOBSLEEP TS LOC
046234,000085: 5134 35163 CAF EXECBANK
046235,000086: 5135 54004 TS FBANK
046236,000087: 5136 12777 TCF JOBSLP1
046237,000088:
046238,000089: # TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
046239,000090:
046240,000091: 5137 00004 JOBWAKE INHINT
046241,000092: 5140 54065 TS NEWLOC
046242,000093: 5141 44752 CS TWO # EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
046243,000094: 5142 26002 ADS Q
046244,000095: 5143 35163 CAF EXECBANK
046245,000096: 5144 56004 XCH FBANK
046246,000097: 5145 13024 TCF JOBWAKE2
046247,000098:
046248,000099: # TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
046249,000100:
046250,000101: 5146 00004 PRIOCHNG INHINT # NEW PRIORITY ARRIVES IN A. RETURNS TO
046251,000102: 5147 54063 TS NEWPRIO # CALLER AS SOON AS NEW JOB PRIORITY IS
046252,000103: 5150 35163 CAF EXECBANK # HIGHEST. PREPARE FOR POSSIBLE BASIC-
046253,000104: 5151 56006 XCH BBANK # STYLE CHANGE-JOB.
046254,000105: 5152 54165 TS BANKSET
046255,000106: 5153 30002 CA Q
046256,000107: 5154 13073 TCF PRIOCH2
046257,000108:
046258,000109: # TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
046259,000110:
046260,000111: 5155 35163 ENDOFJOB CAF EXECBANK
046261,000112: 5156 54004 TS FBANK
046262,000113: 5157 13104 TCF ENDJOB1
046263,000114:
046264,000115: 5160 30061 ENDFIND CA EXECTEM1 # RETURN TO CALLER AFTER JOB ENTRY
046265,000116: 5161 54004 TS FBANK # COMPLETE.
046266,000117: 5162 16744 TCF Q+2
046267,000118: 5163 02602 EXECBANK CADR FINDVAC2
046268,000119:
046269,000120: 5164 00110 FAKEPRET ADRES MPAC -36D # LOC(MPAC +6) - LOC(QPRET)
046270,000121:
Page 1100 |
046272,000123: # LOCATE AN AVAILABLE VAC AREA.
046273,000124:
046274,000125: 01,2602 BANK 01
046275,000126: 01,2602 COUNT* $$/EXEC
046276,000127: 01,2602 54061 FINDVAC2 TS EXECTEM1 # (SAVE CALLER'S BANK FIRST.)
046277,000128: 01,2603 10400 CCS VAC1USE
046278,000129: 01,2604 12621 TCF VACFOUND
046279,000130: 01,2605 10454 CCS VAC2USE
046280,000131: 01,2606 12621 TCF VACFOUND
046281,000132: 01,2607 10530 CCS VAC3USE
046282,000133: 01,2610 12621 TCF VACFOUND
046283,000134: 01,2611 10604 CCS VAC4USE
046284,000135: 01,2612 12621 TCF VACFOUND
046285,000136: 01,2613 10660 CCS VAC5USE
046286,000137: 01,2614 12621 TCF VACFOUND
046287,000138: 01,2615 22061 LXCH EXECTEM1
046288,000139: 01,2616 30002 CA Q
046289,000140: 01,2617 05706 TC BAILOUT1
046290,000141: 01,2620 31201 OCT 31201 # NO VAC AREAS
046291,000142:
046292,000143: 01,2621 64752 VACFOUND AD TWO # RESERVE THIS VAC AREA BY STORING A ZERO
046293,000144: 01,2622 22007 ZL # IN ITS VAC USE REGISTER AND STORE THE
046294,000145: 01,2623 50000 INDEX A # ADDRESS OF THE FIRST WORD OF IT IN THE
046295,000146: 01,2624 21777 LXCH 0 -1 # LOW NINE BITS OF THE PRIORITY WORD.
046296,000147: 01,2625 26063 ADS NEWPRIO
046297,000148:
046298,000149: 01,2626 34755 NOVAC2 CAF ZERO # NOVAC ENTERS HERE. FIND A CORE SET.
046299,000150: 01,2627 54064 TS LOCCTR
046300,000151: 01,2630 32635 CAF NO.CORES # SEVEN SETS OF ELEVEN REGISTERS EACH.
046301,000152: 01,2631 54062 NOVAC3 TS EXECTEM2
046302,000153: 01,2632 50064 INDEX LOCCTR
046303,000154: 01,2633 10167 CCS PRIORITY # EACH PRIORITY REGISTER CONTAINS -0 IF
046304,000155: 01,2634 12675 TCF NEXTCORE # THE CORRESPONDING CORE SET IS AVAILABLE.
046305,000156: 01,2635 00007 NO.CORES DEC 7 B-14
046306,000157: 01,2636 12675 TCF NEXTCORE # AN ACTIVE JOB HAS A POSITIVE PRIORITY
046307,000158: # BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
046308,000159:
Page 1101 |
046310,000161: 01,2637 30063 CORFOUND CA NEWPRIO # SET THE PRIORITY OF THIS JOB IN THE CORE
046311,000162: 01,2640 50064 INDEX LOCCTR # SET'S PRIORITY REGISTER AND SET THE
046312,000163: 01,2641 54167 TS PRIORITY # JOB'S PUSH-DOWN POINTER AT THE BEGINNING
046313,000164: 01,2642 75004 MASK LOW9 # OF THE WORK AREA AND OVERFLOW INDICATOR
046314,000165: 01,2643 50064 INDEX LOCCTR
046315,000166: 01,2644 54166 TS PUSHLOC # OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
046316,000167:
046317,000168: 01,2645 10064 CCS LOCCTR # IF CORE SET ZERO IS BEING LOADED, SET UP
046318,000169: 01,2646 12662 TCF SETLOC # OVFIND AND FIXLOC IMMEDIATELY.
046319,000170: 01,2647 54121 TS OVFIND
046320,000171: 01,2650 30166 CA PUSHLOC
046321,000172: 01,2651 54120 TS FIXLOC
046322,000173:
046323,000174: 01,2652 10067 SPECTEST CCS NEWJOB # SEE IF ANY ACTIVE JOBS WAITING (RARE).
046324,000175: 01,2653 12662 TCF SETLOC # MUST BE AWAKENED BUT UNCHANGED JOB.
046325,000176: 01,2654 05675 TC CCSHOLE
046326,000177: 01,2655 05675 TC CCSHOLE
046327,000178: 01,2656 54067 TS NEWJOB # +0 SHOWS ACTIVE JOB ALREADY SET.
046328,000179: 01,2657 52066 DXCH NEWLOC
046329,000180: 01,2660 52165 DXCH LOC
046330,000181: 01,2661 15160 TCF ENDFIND
046331,000182:
046332,000183: 01,2662 52066 SETLOC DXCH NEWLOC # SET UP THE LOCATION REGISTERS FOR THIS
046333,000184: 01,2663 50064 INDEX LOCCTR
046334,000185: 01,2664 52165 DXCH LOC
046335,000186: 01,2665 50067 INDEX NEWJOB # THIS INDEX INSTRUCTION INSURES THAT THE
046336,000187: 01,2666 40167 CS PRIORITY # HIGHEST ACTIVE PRIORITY WILL BE COMPARED
046337,000188: 01,2667 60063 AD NEWPRIO # WITH THE NEW PRIORITY TO SEE IF NEWJOB
046338,000189: 01,2670 00006 EXTEND # SHOULD BE SET TO SIGNAL A SWITCH.
046339,000190: 01,2671 65160 BZMF ENDFIND
046340,000191: 01,2672 30064 CA LOCCTR # LOCCTR IS LEFT SET AT THIS CORE SET IF
046341,000192: 01,2673 54067 TS NEWJOB # THE CALLER WANTS TO LOAD ANY MPAC
046342,000193: 01,2674 15160 TCF ENDFIND # REGISTERS, ETC.
046343,000194:
046344,000195: 01,2675 33034 NEXTCORE CAF COREINC
046345,000196: 01,2676 26064 ADS LOCCTR
046346,000197: 01,2677 10062 CCS EXECTEM2
046347,000198: 01,2700 12631 TCF NOVAC3
046348,000199: 01,2701 22061 LXCH EXECTEM1
046349,000200: 01,2702 30002 CA Q
046350,000201: 01,2703 05706 TC BAILOUT1 # NO CORE SETS AVAILABLE.
046351,000202: 01,2704 31202 OCT 31202
Page 1102 |
046353,000204: # THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
046354,000205:
046355,000206: 01,2705 22164 -2 LXCH LOC
046356,000207: 01,2706 30165 -1 CAE BANKSET # BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
046357,000208: 01,2707 00004 CHANJOB INHINT
046358,000209: 01,2710 00006 EXTEND
046359,000210: 01,2711 04007 ROR SUPERBNK # PICK UP CURRENT SBANK FOR BBCON
046360,000211: 01,2712 56001 XCH L # LOC IN A AND BBCON IN L.
046361,000212: 01,2713 50067 +4 INDEX NEWJOB # SWAP LOC AND BANKSET.
046362,000213: 01,2714 52165 DXCH LOC
046363,000214: 01,2715 52165 DXCH LOC
046364,000215:
046365,000216: 01,2716 30165 CAE BANKSET
046366,000217: 01,2717 00006 EXTEND
046367,000218: 01,2720 01007 WRITE SUPERBNK # SET SBANK FOR NEW JOB.
046368,000219: 01,2721 52155 DXCH MPAC # SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
046369,000220: 01,2722 50067 INDEX NEWJOB
046370,000221: 01,2723 52155 DXCH MPAC
046371,000222: 01,2724 52155 DXCH MPAC
046372,000223: 01,2725 52157 DXCH MPAC +2
046373,000224: 01,2726 50067 INDEX NEWJOB
046374,000225: 01,2727 52157 DXCH MPAC +2
046375,000226: 01,2730 52157 DXCH MPAC +2
046376,000227: 01,2731 52161 DXCH MPAC +4
046377,000228: 01,2732 50067 INDEX NEWJOB
046378,000229: 01,2733 52161 DXCH MPAC +4
046379,000230: 01,2734 52161 DXCH MPAC +4
046380,000231: 01,2735 52163 DXCH MPAC +6
046381,000232: 01,2736 50067 INDEX NEWJOB
046382,000233: 01,2737 52163 DXCH MPAC +6
046383,000234: 01,2740 52163 DXCH MPAC +6
046384,000235:
046385,000236: 01,2741 34755 CAF ZERO
046386,000237: 01,2742 56121 XCH OVFIND # MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
046387,000238: 01,2743 00006 EXTEND
046388,000239: 01,2744 12747 BZF +3
046389,000240: 01,2745 40166 CS PUSHLOC
046390,000241: 01,2746 54166 TS PUSHLOC
046391,000242:
046392,000243: 01,2747 52167 DXCH PUSHLOC
046393,000244: 01,2750 50067 INDEX NEWJOB
046394,000245: 01,2751 52167 DXCH PUSHLOC
046395,000246: 01,2752 52167 DXCH PUSHLOC # SWAPS PUSHLOC AND PRIORITY.
046396,000247: 01,2753 35004 CAF LOW9 # SET FIXLOC TO BASE OF VAC AREA.
046397,000248: 01,2754 70167 MASK PRIORITY
046398,000249: 01,2755 54120 TS FIXLOC
046399,000250:
046400,000251: 01,2756 10166 CCS PUSHLOC # SET OVERFLOW INDICATOR ACCORDING TO
046401,000252: 01,2757 34755 CAF ZERO
046402,000253: 01,2760 12765 TCF ENDPRCHG -1
046403,000254:
Page 1103 |
046405,000256: 01,2761 40166 CS PUSHLOC
046406,000257: 01,2762 54166 TS PUSHLOC
046407,000258: 01,2763 34753 CAF ONE
046408,000259: 01,2764 56121 XCH OVFIND
046409,000260: 01,2765 54067 TS NEWJOB
046410,000261:
046411,000262: 01,2766 00003 ENDPRCHG RELINT
046412,000263: 01,2767 52165 DXCH LOC # BASIC JOBS HAVE POSITIVE ADDRESSES, SO
046413,000264: 01,2770 00006 EXTEND # DISPATCH WITH A DTCB.
046414,000265: 01,2771 62773 BZMF +2 # IF INTERPRETIVE, SET UP EBANK, ETC.
046415,000266: 01,2772 52006 DTCB
Page 1104 |
046417,000268: 01,2773 40000 COM # EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
046418,000269: 01,2774 64753 AD ONE
046419,000270: 01,2775 54164 TS LOC # RESUME.
046420,000271: 01,2776 16053 TCF INTRSM
046421,000272:
046422,000273: # COMPLETE JOBSLEEP PREPARATIONS.
046423,000274:
046424,000275: 01,2777 00004 JOBSLP1 INHINT
046425,000276: 01,3000 40167 CS PRIORITY # NNZ PRIORITY SHOWS JOB ASLEEP.
046426,000277: 01,3001 54167 TS PRIORITY
046427,000278: 01,3002 36077 CAF LOW7
046428,000279: 01,3003 70006 MASK BBANK
046429,000280: 01,3004 00006 EXTEND
046430,000281: 01,3005 04007 ROR SUPERBNK # SAVE OLD SUPERBANK VALUE.
046431,000282: 01,3006 54165 TS BANKSET
046432,000283: 01,3007 44755 CS ZERO
046433,000284: 01,3010 54131 JOBSLP2 TS BUF +1 # HOLDS - HIGHEST PRIORITY.
046434,000285: 01,3011 13121 TCF EJSCAN # SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
046435,000286:
046436,000287: 01,3012 00004 NUCHANG2 INHINT # QUICK... DONT LET NEWJOB CHANGE TO +0.
046437,000288: 01,3013 10067 CCS NEWJOB
046438,000289: 01,3014 13017 TCF +3 # NEWJOB STILL PNZ
046439,000290: 01,3015 00003 RELINT # NEW JOB HAS CHANGED TO +0. WAKE UP JOB
046440,000291: 01,3016 13217 TCF ADVAN +2 # VIA NUDIRECT. (VERY RARE CASE.)
046441,000292:
046442,000293: 01,3017 34752 CAF TWO
046443,000294: 01,3020 00006 EXTEND
046444,000295: 01,3021 05011 WOR DSALMOUT # TURN ON ACTIVITY LIGHT
046445,000296: 01,3022 52165 DXCH LOC # AND SAVE ADDRESS INFO FOR BENEFIT OF
046446,000297: 01,3023 12713 TCF CHANJOB +4 # POSSIBLE SLEEPING JOB.
046447,000298:
Page 1105 |
046449,000300: # TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
046450,000301: # LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
046451,000302: # LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
046452,000303:
046453,000304: 01,3024 54061 JOBWAKE2 TS EXECTEM1
046454,000305: 01,3025 34755 CAF ZERO # BEGIN CORE SET SCAN.
046455,000306: 01,3026 54064 TS LOCCTR
046456,000307: 01,3027 32635 CAF NO.CORES
046457,000308: 01,3030 54062 JOBWAKE4 TS EXECTEM2
046458,000309: 01,3031 50064 INDEX LOCCTR
046459,000310: 01,3032 10167 CCS PRIORITY
046460,000311: 01,3033 13036 TCF JOBWAKE3 # ACTIVE JOB - CHECK NEXT CORE SET.
046461,000312: 01,3034 00014 COREINC DEC 12 B-14 # 12 REGISTERS PER CORE SET.
046462,000313: 01,3035 13045 TCF WAKETEST # SLEEPING JOB - SEE IF CADR MATCHES.
046463,000314:
046464,000315: 01,3036 33034 JOBWAKE3 CAF COREINC
046465,000316: 01,3037 26064 ADS LOCCTR
046466,000317: 01,3040 10062 CCS EXECTEM2
046467,000318: 01,3041 13030 TCF JOBWAKE4
046468,000319: 01,3042 44753 CS ONE # EXIT IF SLEEPING JOB NOT FOUND.
046469,000320: 01,3043 54064 TS LOCCTR
046470,000321: 01,3044 15160 TCF ENDFIND
046471,000322:
046472,000323: 01,3045 40065 WAKETEST CS NEWLOC
046473,000324: 01,3046 50064 INDEX LOCCTR
046474,000325: 01,3047 60164 AD LOC
046475,000326: 01,3050 00006 EXTEND
046476,000327: 01,3051 13053 BZF +2 # IF MATCH.
046477,000328: 01,3052 13036 TCF JOBWAKE3 # EXAMINE NEXT CORE SET IF NO MATCH.
046478,000329:
046479,000330: 01,3053 50064 INDEX LOCCTR # RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
046480,000331: 01,3054 40167 CS PRIORITY
046481,000332: 01,3055 54063 TS NEWPRIO
046482,000333: 01,3056 50064 INDEX LOCCTR
046483,000334: 01,3057 54167 TS PRIORITY
046484,000335:
046485,000336: 01,3060 44350 CS FBANKMSK # MAKE UP THE 2CADR OF THE WAKE ADDRESS
046486,000337: 01,3061 70065 MASK NEWLOC # USING THE CADR IN NEWLOC AND THE EBANK
046487,000338: 01,3062 64741 AD 2K # HALF OF BBANK SAVED IN BANKSET.
046488,000339: 01,3063 56065 XCH NEWLOC
046489,000340: 01,3064 74350 MASK FBANKMSK
046490,000341: 01,3065 50064 INDEX LOCCTR
046491,000342: 01,3066 60165 AD BANKSET
046492,000343: 01,3067 54066 TS NEWLOC +1
046493,000344:
046494,000345: 01,3070 10064 CCS LOCCTR # SPECIAL TREATMENT IF THIS JOB WAS
046495,000346: 01,3071 12662 TCF SETLOC # ALREADY IN THE RUN (0) POSITION.
046496,000347: 01,3072 12652 TCF SPECTEST
046497,000348:
Page 1106 |
046499,000350: # PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
046500,000351:
046501,000352: 01,3073 54164 PRIOCH2 TS LOC
046502,000353: 01,3074 34755 CAF ZERO # SET FLAG TO TELL ENDJOB SCANNER IF THIS
046503,000354: 01,3075 54130 TS BUF # JOB IS STILL HIGHEST PRIORITY.
046504,000355: 01,3076 35004 CAF LOW9
046505,000356: 01,3077 70167 MASK PRIORITY
046506,000357: 01,3100 60063 AD NEWPRIO
046507,000358: 01,3101 54167 TS PRIORITY
046508,000359: 01,3102 40000 COM
046509,000360: 01,3103 13010 TCF JOBSLP2 # AND TO EJSCAN.
046510,000361:
Page 1107 |
046512,000363: # RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
046513,000364:
046514,000365: 01,3104 00004 ENDJOB1 INHINT
046515,000366: 01,3105 44755 CS ZERO
046516,000367: 01,3106 54131 TS BUF +1
046517,000368: 01,3107 56167 XCH PRIORITY
046518,000369: 01,3110 75004 MASK LOW9
046519,000370: 01,3111 54001 TS L
046520,000371:
046521,000372: 01,3112 45164 CS FAKEPRET
046522,000373: 01,3113 60001 AD L
046523,000374:
046524,000375: 01,3114 00006 EXTEND
046525,000376: 01,3115 63121 BZMF EJSCAN # NOVAC ENDOFJOB
046526,000377:
046527,000378: 01,3116 10001 CCS L
046528,000379: 01,3117 50000 INDEX A
046529,000380: 01,3120 54000 TS 0
046530,000381:
046531,000382: 01,3121 10203 EJSCAN CCS PRIORITY +12D
046532,000383: 01,3122 03172 TC EJ1
046533,000384: 01,3123 05675 TC CCSHOLE
046534,000385: 01,3124 13125 TCF +1
046535,000386:
046536,000387: 01,3125 10217 CCS PRIORITY +24D # EXAMINE EACH PRIORITY REGISTER TO FIND
046537,000388: 01,3126 03172 TC EJ1 # THE JOB OF HIGHEST ACTIVE PRIORITY.
046538,000389: 01,3127 05675 TC CCSHOLE
046539,000390: 01,3130 13131 TCF +1
046540,000391:
046541,000392: 01,3131 10233 CCS PRIORITY +36D
046542,000393: 01,3132 03172 TC EJ1
046543,000394: 01,3133 67610 -CCSPR -CCS PRIORITY
046544,000395: 01,3134 13135 TCF +1
046545,000396:
046546,000397: 01,3135 10247 CCS PRIORITY +48D
046547,000398: 01,3136 03172 TC EJ1
046548,000399: 01,3137 05675 TC CCSHOLE
046549,000400: 01,3140 13141 TCF +1
046550,000401:
046551,000402: 01,3141 10263 CCS PRIORITY +60D
046552,000403: 01,3142 03172 TC EJ1
046553,000404: 01,3143 05675 TC CCSHOLE
046554,000405: 01,3144 13145 TCF +1
046555,000406:
046556,000407: 01,3145 10277 CCS PRIORITY +72D
046557,000408: 01,3146 03172 TC EJ1
046558,000409: 01,3147 05675 TC CCSHOLE
046559,000410: 01,3150 13151 TCF +1
046560,000411:
046561,000412: 01,3151 10313 CCS PRIORITY +84D
Page 1108 |
046563,000414: 01,3152 03172 TC EJ1
046564,000415: 01,3153 05675 TC CCSHOLE
046565,000416: 01,3154 13155 TCF +1
046566,000417:
Page 1109 |
046568,000419: # EVALUATE THE RESULTS OF THE SCAN.
046569,000420:
046570,000421: 01,3155 10131 CCS BUF +1 # SEE IF THERE ARE ANY ACTIVE JOBS WAITING
046571,000422: 01,3156 05675 TC CCSHOLE
046572,000423: 01,3157 05675 TC CCSHOLE
046573,000424:
046574,000425: 01,3160 13162 TCF +2
046575,000426: 01,3161 13207 TCF DUMMYJOB
046576,000427: 01,3162 10130 CCS BUF # BUF IS ZERO IF THIS IS A PRIOCHNG AND
046577,000428: 01,3163 13165 TCF +2 # CHANGED PRIORITY IS STILL HIGHEST.
046578,000429: 01,3164 12765 TCF ENDPRCHG -1
046579,000430:
046580,000431: 01,3165 50000 INDEX A # OTHERWISE, SET NEWJOB TO THE RELATIVE
046581,000432: 01,3166 27777 CAF 0 -1 # ADDRESS OF THE NEW JOB'S CORE SET.
046582,000433: 01,3167 63133 AD -CCSPR
046583,000434: 01,3170 54067 TS NEWJOB
046584,000435: 01,3171 12705 TCF CHANJOB -2
046585,000436:
046586,000437: 01,3172 54132 EJ1 TS BUF +2
046587,000438: 01,3173 60131 AD BUF +1 # - OLD HIGH PRIORITY.
046588,000439: 01,3174 10000 CCS A
046589,000440: 01,3175 40132 CS BUF +2
046590,000441: 01,3176 13202 TCF EJ2 # NEW HIGH PRIORITY.
046591,000442: 01,3177 13200 NOOP
046592,000443: 01,3200 50002 INDEX Q
046593,000444: 01,3201 00002 TC 2 # PROCEED WITH SEARCH.
046594,000445:
046595,000446: 01,3202 54131 EJ2 TS BUF +1
046596,000447: 01,3203 00006 EXTEND
046597,000448: 01,3204 22130 QXCH BUF # FOR LOCATING CCS PRIORITY + X INSTR.
046598,000449: 01,3205 50130 INDEX BUF
046599,000450: 01,3206 00002 TC 2
046600,000451:
Page 1110 |
046602,000453: # IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
046603,000454: # BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
046604,000455:
046605,000456: 01,3207 1361 EBANK= SELFRET # SELF-CHECK STORAGE IN EBANK.
046606,000457:
046607,000458: 01,3207 44755 DUMMYJOB CS ZERO # SET NEWJOB TO -0 FOR IDLING.
046608,000459: 01,3210 54067 TS NEWJOB
046609,000460: 01,3211 00003 RELINT
046610,000461: 01,3212 44752 CS TWO # TURN OFF THE ACTIVITY LIGHT.
046611,000462: 01,3213 00006 EXTEND
046612,000463: 01,3214 03011 WAND DSALMOUT
046613,000464: 01,3215 10067 ADVAN CCS NEWJOB # IS A NEWJOB ACTIVE?
046614,000465: 01,3216 13012 TCF NUCHANG2 # YES... ONE REQUIRING A CHANGE JOB.
046615,000466: 01,3217 34752 CAF TWO # NEW JOB ALREADY IN POSITION FOR
046616,000467: 01,3220 13226 TCF NUDIRECT # EXECUTION.
046617,000468:
046618,000469: 01,3221 31361 CA SELFRET
046619,000470: 01,3222 54001 TS L # PUT RETURN ADDRESS IN L.
046620,000471: 01,3223 33225 CAF SELFBANK
046621,000472: 01,3224 15166 TCF SUPDXCHZ +1 # AND DISPATCH JOB.
046622,000473:
046623,000474: 01,3225 1361 EBANK= SELFRET
046624,000475: 01,3225 66102 SELFBANK BBCON SELFCHK
046625,000476:
046626,000477: 01,3226 00006 NUDIRECT EXTEND # TURN THE GREEN LIGHT BACK ON.
046627,000478: 01,3227 05011 WOR DSALMOUT
046628,000479: 01,3230 52165 DXCH LOC # JOBS STARTED IN THIS FASHION MUST BE
046629,000480: 01,3231 15165 TCF SUPDXCHZ
046630,000481:
046631,000482: 5165 BLOCK 2 # IN FIXED-FIXED SO OTHERS MAY USE.
046632,000483:
046633,000484: 5165 COUNT* $$/EXEC
046634,000485:
046635,000486: # SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
046636,000487: # CALLING SEQUENCE
046637,000488: # TCF SUPDXCHZ WITH 2CADR OF DESIRED LOCATION IN A + L.
046638,000489:
046639,000490: 5165 56001 SUPDXCHZ XCH L # BASIC.
046640,000491: 5166 00006 +1 EXTEND
046641,000492: 5167 01007 WRITE SUPERBNK
046642,000493: 5170 54006 TS BBANK
046643,000494: 5171 00001 TC L
046644,000495:
046645,000496: 5172 77677 NEG100 OCT 77677
046646,000497:
End of include-file EXECUTIVE.agc. Parent file is MAIN.agc