Source Code
This is the source-code for the Apollo 9 Command Module's Guidance Computer.
These files were derived originally from the scan from MIT's Dibner Institute's
now-discontinued website titled "History of Recent Science and Technology", which
in turn was originally created by Gary Neff, though his high-quality scans were
unfortunately reduced in legibility when presented online.
The markings on the front of the
printout imply that it was the original AGC developer Norm Brodeur's copy.
A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original
AGC developer Fred Martin. The source code was transcribed from
those images by Ron Burkey. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
051602,000002: ## Copyright: Public domain.
051603,000003: ## Filename: EXECUTIVE.agc
051604,000004: ## Purpose: Part of the source code for Colossus, build 249.
051605,000005: ## It is part of the source code for the Command Module's (CM)
051606,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
051607,000007: ## Assembler: yaYUL
051608,000008: ## Reference: Starts on p. 1178
051609,000009: ## Contact: Ron Burkey <info@sandroid.org>.
051610,000010: ## Website: www.ibiblio.org/apollo.
051611,000011: ## Mod history: 08/28/04 RSB Adapted from correspoinding Luminary131 file.
051612,000012: ## 2010-10-24 JL Indentation fixes.
051613,000013: ## 2011-05-07 JL Removed workarounds.
051614,000014: ## 2017-01-06 RSB Page numbers now agree with those on the
051615,000015: ## original harcopy, as opposed to the PDF page
051616,000016: ## numbers in 1701.pdf.
051617,000017: ## 2017-01-12 RSB Proofed comment text with 3-way side-by-side
051618,000018: ## diff vs Colossus 237 and Comanche 55. After
051619,000019: ## errors were corrected, the three were identical.
051620,000020: ## 2017-01-22 RSB Back-ported comment error fixes detected in diff'ing
051621,000021: ## Artemis 72 vs Comanche 55.
051622,000022: ##
051623,000023: ## The contents of the "Colossus249" files, in general, are transcribed
051624,000024: ## from a scanned copy of the program listing. Notations on this
051625,000025: ## document read, in part:
051626,000026: ##
051627,000027: ## Assemble revision 249 of AGC program Colossus by NASA
051628,000028: ## 2021111-041. October 28, 1968.
051629,000029: ##
051630,000030: ## This AGC program shall also be referred to as
051631,000031: ## Colossus 1A
051632,000032: ##
051633,000033: ## Prepared by
051634,000034: ## Massachusetts Institute of Technology
051635,000035: ## 75 Cambridge Parkway
051636,000036: ## Cambridge, Massachusetts
051637,000037: ## under NASA contract NAS 9-4065.
051638,000038: ##
051639,000039: ## Refer directly to the online document mentioned above for further information.
051640,000040: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
051641,000041: ##
051642,000042: ## In some cases, where the source code for Luminary 131 overlaps that of
051643,000043: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
051644,000044: ## source file, and then is proofed to incorporate any changes.
051645,000045:
Page 1178 |
051647,000047: 5027 BLOCK 02
051648,000048:
051649,000049: # TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
051650,000050:
051651,000051: 5027 COUNT 02/EXEC
051652,000052:
051653,000053: 5027 00004 NOVAC INHINT
051654,000054: 5030 65121 AD FAKEPRET # LOC(MPAC +6) - LOC(QPRET)
051655,000055: 5031 54063 TS NEWPRIO # PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
051656,000056:
051657,000057: 5032 00006 EXTEND
051658,000058: 5033 50002 INDEX Q # Q WILL BE UNDISTURBED THROUGHOUT.
051659,000059: 5034 30001 DCA 0 # 2CADR OF JOB ENTERED.
051660,000060: 5035 52066 DXCH NEWLOC
051661,000061: 5036 35120 CAF EXECBANK
051662,000062: 5037 56004 XCH FBANK
051663,000063: 5040 54061 TS EXECTEM1
051664,000064: 5041 12650 TCF NOVAC2 # ENTER EXECUTIVE BANK.
051665,000065:
051666,000066: # TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
051667,000067:
051668,000068: 5042 00004 FINDVAC INHINT
051669,000069: 5043 54063 TS NEWPRIO
051670,000070: 5044 00006 EXTEND
051671,000071: 5045 50002 INDEX Q
051672,000072: 5046 30001 DCA 0
051673,000073: 5047 52066 SPVACIN DXCH NEWLOC
051674,000074: 5050 35120 CAF EXECBANK
051675,000075: 5051 56004 XCH FBANK
051676,000076: 5052 12626 TCF FINDVAC2 # OFF TO EXECUTIVE SWITCHED-BANK.
051677,000077:
051678,000078: # TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
051679,000079: # USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
051680,000080:
051681,000081: 5053 56002 SPVAC XCH Q
051682,000082: 5054 67715 AD NEG2
051683,000083: 5055 56002 XCH Q
051684,000084: 5056 15047 TCF SPVACIN
051685,000085:
051686,000086: # TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
051687,000087:
051688,000088: 5057 22002 CHANG1 LXCH Q
051689,000089: 5060 35120 CAF EXECBANK
051690,000090: 5061 56006 XCH BBANK
051691,000091: 5062 12727 TCF CHANJOB
051692,000092:
051693,000093: # TO SUSPEND AN INTERPRETIVE JOB:
051694,000094:
051695,000095: 5063 40164 CHANG2 CS LOC # NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
051696,000096:
051697,000097: # ITRACE (4) REFERS TO "CHANG2".
Page 1179 |
051699,000099: 5064 54001 TS L
051700,000100: 5065 35120 +2 CAF EXECBANK
051701,000101: 5066 54006 TS BBANK
051702,000102: 5067 12726 TCF CHANJOB -1
051703,000103:
Page 1180 |
051705,000105: # TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
051706,000106:
051707,000107: 5070 54164 JOBSLEEP TS LOC
051708,000108: 5071 35120 CAF EXECBANK
051709,000109: 5072 54004 TS FBANK
051710,000110: 5073 13017 TCF JOBSLP1
051711,000111:
051712,000112: # TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
051713,000113:
051714,000114: 5074 00004 JOBWAKE INHINT
051715,000115: 5075 54065 TS NEWLOC
051716,000116: 5076 44711 CS TWO # EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
051717,000117: 5077 26002 ADS Q
051718,000118: 5100 35120 CAF EXECBANK
051719,000119: 5101 56004 XCH FBANK
051720,000120: 5102 13044 TCF JOBWAKE2
051721,000121:
051722,000122: # TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
051723,000123:
051724,000124: 5103 00004 PRIOCHNG INHINT # NEW PRIORITY ARRIVES IN A. RETURNS TO
051725,000125: 5104 54063 TS NEWPRIO # CALLER AS SOON AS NEW JOB PRIORITY IS
051726,000126: 5105 35120 CAF EXECBANK # HIGHEST. PREPARE FOR POSSIBLE BASIC-
051727,000127: 5106 56006 XCH BBANK # STYLE CHANGE-JOB.
051728,000128: 5107 54165 TS BANKSET
051729,000129: 5110 30002 CA Q
051730,000130: 5111 13113 TCF PRIOCH2
051731,000131:
051732,000132: # TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
051733,000133:
051734,000134: 5112 35120 ENDOFJOB CAF EXECBANK
051735,000135: 5113 54004 TS FBANK
051736,000136: 5114 13124 TCF ENDJOB1
051737,000137:
051738,000138: 5115 30061 ENDFIND CA EXECTEM1 # RETURN TO CALLER AFTER JOB ENTRY
051739,000139: 5116 54004 TS FBANK # COMPLETE.
051740,000140: 5117 16710 TCF Q+2
051741,000141: 5120 02626 EXECBANK CADR FINDVAC2
051742,000142:
051743,000143: 5121 00110 FAKEPRET ADRES MPAC -36D # LOC(MPAC +6) - LOC(QPRET)
051744,000144:
Page 1181 |
051746,000146: # LOCATE AN AVAILABLE VAC AREA.
051747,000147:
051748,000148: 01,2626 BANK 01
051749,000149: 01,2626 COUNT 01/EXEC
051750,000150:
051751,000151: 01,2626 54061 FINDVAC2 TS EXECTEM1 # (SAVE CALLER'S BANK FIRST.)
051752,000152: 01,2627 10400 CCS VAC1USE
051753,000153: 01,2630 12643 TCF VACFOUND
051754,000154: 01,2631 10454 CCS VAC2USE
051755,000155: 01,2632 12643 TCF VACFOUND
051756,000156: 01,2633 10530 CCS VAC3USE
051757,000157: 01,2634 12643 TCF VACFOUND
051758,000158: 01,2635 10604 CCS VAC4USE
051759,000159: 01,2636 12643 TCF VACFOUND
051760,000160: 01,2637 10660 CCS VAC5USE
051761,000161: 01,2640 12643 TCF VACFOUND
051762,000162: 01,2641 05604 TC BAILOUT
051763,000163: 01,2642 01201 OCT 1201 # NO VAC AREAS.
051764,000164:
051765,000165: 01,2643 64711 VACFOUND AD TWO # RESERVE THIS VAC AREA BY STORING A ZERO
051766,000166: 01,2644 22007 ZL # IN ITS VAC USE REGISTER AND STORE THE
051767,000167: 01,2645 50000 INDEX A # ADDRESS OF THE FIRST WORD OF IT IN THE
051768,000168: 01,2646 21777 LXCH 0 -1 # LOW NINE BITS OF THE PRIORITY WORD.
051769,000169: 01,2647 26063 ADS NEWPRIO
051770,000170:
051771,000171: 01,2650 34714 NOVAC2 CAF ZERO # NOVAC ENTERS HERE. FIND A CORE SET.
051772,000172: 01,2651 54064 TS LOCCTR
051773,000173: 01,2652 32657 CAF NO.CORES # SEVEN SETS OF ELEVEN REGISTERS EACH.
051774,000174: 01,2653 54062 NOVAC3 TS EXECTEM2
051775,000175: 01,2654 50064 INDEX LOCCTR
051776,000176: 01,2655 10167 CCS PRIORITY # EACH PRIORITY REGISTER CONTAINS -0 IF
051777,000177: 01,2656 12717 TCF NEXTCORE # THE CORRESPONDING CORE SET IS AVAILABLE.
051778,000178: 01,2657 00006 NO.CORES DEC 6 B-14
051779,000179: 01,2660 12717 TCF NEXTCORE # AN ACTIVE JOB HAS A POSITIVE PRIORITY
051780,000180: # BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
051781,000181:
Page 1182 |
051783,000183: 01,2661 30063 CORFOUND CA NEWPRIO # SET THE PRIORITY OF THIS JOB IN THE CORE
051784,000184: 01,2662 50064 INDEX LOCCTR # SET'S PRIORITY REGISTER AND SET THE
051785,000185: 01,2663 54167 TS PRIORITY # JOB'S PUSH-DOWN POINTER AT THE BEGINNING
051786,000186: 01,2664 74741 MASK LOW9 # OF THE WORK AREA AND OVERFLOW INDICATOR
051787,000187: 01,2665 50064 INDEX LOCCTR
051788,000188: 01,2666 54166 TS PUSHLOC # OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
051789,000189:
051790,000190: 01,2667 10064 CCS LOCCTR # IF CORE SET ZERO IS BEING LOADED, SET UP
051791,000191: 01,2670 12704 TCF SETLOC # OVFIND AND FIXLOC IMMEDIATELY.
051792,000192: 01,2671 54121 TS OVFIND
051793,000193: 01,2672 30166 CA PUSHLOC
051794,000194: 01,2673 54120 TS FIXLOC
051795,000195:
051796,000196: 01,2674 10067 SPECTEST CCS NEWJOB # SEE IF ANY ACTIVE JOBS WAITING (RARE).
051797,000197: 01,2675 12704 TCF SETLOC # MUST BE AWAKENED BUT UNCHANGED JOB.
051798,000198: 01,2676 05640 TC CCSHOLE
051799,000199: 01,2677 05640 TC CCSHOLE
051800,000200: 01,2700 54067 TS NEWJOB # +0 SHOWS ACTIVE JOB ALREADY SET.
051801,000201: 01,2701 52066 DXCH NEWLOC
051802,000202: 01,2702 52165 DXCH LOC
051803,000203: 01,2703 15115 TCF ENDFIND
051804,000204:
051805,000205: 01,2704 52066 SETLOC DXCH NEWLOC # SET UP THE LOCATION REGISTERS FOR THIS
051806,000206: 01,2705 50064 INDEX LOCCTR
051807,000207: 01,2706 52165 DXCH LOC
051808,000208: 01,2707 50067 INDEX NEWJOB # THIS INDEX INSTRUCTION INSURES THAT THE
051809,000209: 01,2710 40167 CS PRIORITY # HIGHEST ACTIVE PRIORITY WILL BE COMPARED
051810,000210: 01,2711 60063 AD NEWPRIO # WITH THE NEW PRIORITY TO SEE IF NEWJOB
051811,000211: 01,2712 00006 EXTEND # SHOULD BE SET TO SIGNAL A SWITCH.
051812,000212: 01,2713 65115 BZMF ENDFIND
051813,000213: 01,2714 30064 CA LOCCTR # LOCCTR IS LEFT SET AT THIS CORE SET IF
051814,000214: 01,2715 54067 TS NEWJOB # THE CALLER WANTS TO LOAD ANY MPAC
051815,000215: 01,2716 15115 TCF ENDFIND # REGISTERS, ETC.
051816,000216:
051817,000217: 01,2717 33054 NEXTCORE CAF COREINC
051818,000218: 01,2720 26064 ADS LOCCTR
051819,000219: 01,2721 10062 CCS EXECTEM2
051820,000220: 01,2722 12653 TCF NOVAC3
051821,000221: 01,2723 05604 TC BAILOUT # NO CORE SETS.
051822,000222: 01,2724 01202 OCT 1202
Page 1183 |
051824,000224: # THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
051825,000225:
051826,000226: 01,2725 22164 -2 LXCH LOC
051827,000227: 01,2726 30165 -1 CAE BANKSET # BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
051828,000228: 01,2727 00004 CHANJOB INHINT
051829,000229: 01,2730 00006 EXTEND
051830,000230: 01,2731 04007 ROR SUPERBNK # PICK UP CURRENT SBANK FOR BBCON
051831,000231: 01,2732 56001 XCH L # LOC IN A AND BBCON IN L.
051832,000232: 01,2733 50067 +4 INDEX NEWJOB # SWAP LOC AND BANKSET.
051833,000233: 01,2734 52165 DXCH LOC
051834,000234: 01,2735 52165 DXCH LOC
051835,000235:
051836,000236: 01,2736 30165 CAE BANKSET
051837,000237: 01,2737 00006 EXTEND
051838,000238: 01,2740 01007 WRITE SUPERBNK # SET SBANK FOR NEW JOB.
051839,000239: 01,2741 52155 DXCH MPAC # SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
051840,000240: 01,2742 50067 INDEX NEWJOB
051841,000241: 01,2743 52155 DXCH MPAC
051842,000242: 01,2744 52155 DXCH MPAC
051843,000243: 01,2745 52157 DXCH MPAC +2
051844,000244: 01,2746 50067 INDEX NEWJOB
051845,000245: 01,2747 52157 DXCH MPAC +2
051846,000246: 01,2750 52157 DXCH MPAC +2
051847,000247: 01,2751 52161 DXCH MPAC +4
051848,000248: 01,2752 50067 INDEX NEWJOB
051849,000249: 01,2753 52161 DXCH MPAC +4
051850,000250: 01,2754 52161 DXCH MPAC +4
051851,000251: 01,2755 52163 DXCH MPAC +6
051852,000252: 01,2756 50067 INDEX NEWJOB
051853,000253: 01,2757 52163 DXCH MPAC +6
051854,000254: 01,2760 52163 DXCH MPAC +6
051855,000255:
051856,000256: 01,2761 34714 CAF ZERO
051857,000257: 01,2762 56121 XCH OVFIND # MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
051858,000258: 01,2763 00006 EXTEND
051859,000259: 01,2764 12767 BZF +3
051860,000260: 01,2765 40166 CS PUSHLOC
051861,000261: 01,2766 54166 TS PUSHLOC
051862,000262:
051863,000263: 01,2767 52167 DXCH PUSHLOC
051864,000264: 01,2770 50067 INDEX NEWJOB
051865,000265: 01,2771 52167 DXCH PUSHLOC
051866,000266: 01,2772 52167 DXCH PUSHLOC # SWAPS PUSHLOC AND PRIORITY.
051867,000267: 01,2773 34741 CAF LOW9 # SET FIXLOC TO BASE OF VAC AREA.
051868,000268: 01,2774 70167 MASK PRIORITY
051869,000269: 01,2775 54120 TS FIXLOC
051870,000270:
051871,000271: 01,2776 10166 CCS PUSHLOC # SET OVERFLOW INDICATOR ACCORDING TO
051872,000272: 01,2777 34714 CAF ZERO
051873,000273: 01,3000 13005 TCF ENDPRCHG -1
051874,000274:
Page 1184 |
051876,000276: 01,3001 40166 CS PUSHLOC
051877,000277: 01,3002 54166 TS PUSHLOC
051878,000278: 01,3003 34712 CAF ONE
051879,000279: 01,3004 56121 XCH OVFIND
051880,000280: 01,3005 54067 TS NEWJOB
051881,000281:
051882,000282: 01,3006 00003 ENDPRCHG RELINT
051883,000283: 01,3007 52165 DXCH LOC # BASIC JOBS HAVE POSITIVE ADDRESSES, SO
051884,000284: 01,3010 00006 EXTEND # DISPATCH WITH A DTCB.
051885,000285: 01,3011 63013 BZMF +2 # IF INTERPRETIVE, SET UP EBANK, ETC.
051886,000286: 01,3012 52006 DTCB
Page 1185 |
051888,000288: 01,3013 40000 COM # EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
051889,000289: 01,3014 64712 AD ONE
051890,000290: 01,3015 54164 TS LOC # RESUME.
051891,000291: 01,3016 16017 TCF INTRSM
051892,000292:
051893,000293: # COMPLETE JOBSLEEP PREPARATIONS.
051894,000294:
051895,000295: 01,3017 00004 JOBSLP1 INHINT
051896,000296: 01,3020 40167 CS PRIORITY # NNZ PRIORITY SHOWS JOB ASLEEP.
051897,000297: 01,3021 54167 TS PRIORITY
051898,000298: 01,3022 36043 CAF LOW7
051899,000299: 01,3023 70006 MASK BBANK
051900,000300: 01,3024 00006 EXTEND
051901,000301: 01,3025 04007 ROR SUPERBNK # SAVE OLD SUPERBANK VALUE.
051902,000302: 01,3026 54165 TS BANKSET
051903,000303: 01,3027 44714 CS ZERO
051904,000304: 01,3030 54131 JOBSLP2 TS BUF +1 # HOLDS - HIGHEST PRIORITY.
051905,000305: 01,3031 13141 TCF EJSCAN # SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
051906,000306:
051907,000307: 01,3032 00004 NUCHANG2 INHINT # QUICK... DONT LET NEWJOB CHANGE TO +0.
051908,000308: 01,3033 10067 CCS NEWJOB
051909,000309: 01,3034 13037 TCF +3 # NEWJOB STILL PNZ
051910,000310: 01,3035 00003 RELINT # NEW JOB HAS CHANGED TO +0. WAKE UP JOB
051911,000311: 01,3036 13233 TCF ADVAN +2 # VIA NUDIRECT. (VERY RARE CASE.)
051912,000312:
051913,000313: 01,3037 34711 CAF TWO
051914,000314: 01,3040 00006 EXTEND
051915,000315: 01,3041 05011 WOR DSALMOUT # TURN ON ACTIVITY LIGHT
051916,000316: 01,3042 52165 DXCH LOC # AND SAVE ADDRESS INFO FOR BENEFIT OF
051917,000317: 01,3043 12733 TCF CHANJOB +4 # POSSIBLE SLEEPING JOB.
051918,000318:
Page 1186 |
051920,000320: # TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
051921,000321: # LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
051922,000322: # LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
051923,000323:
051924,000324: 01,3044 54061 JOBWAKE2 TS EXECTEM1
051925,000325: 01,3045 34714 CAF ZERO # BEGIN CORE SET SCAN.
051926,000326: 01,3046 54064 TS LOCCTR
051927,000327: 01,3047 32657 CAF NO.CORES
051928,000328: 01,3050 54062 JOBWAKE4 TS EXECTEM2
051929,000329: 01,3051 50064 INDEX LOCCTR
051930,000330: 01,3052 10167 CCS PRIORITY
051931,000331: 01,3053 13056 TCF JOBWAKE3 # ACTIVE JOB - CHECK NEXT CORE SET.
051932,000332: 01,3054 00014 COREINC DEC 12 B-14 # 12 REGISTERS PER CORE SET.
051933,000333: 01,3055 13065 TCF WAKETEST # SLEEPING JOB - SEE IF CADR MATCHES.
051934,000334:
051935,000335: 01,3056 33054 JOBWAKE3 CAF COREINC
051936,000336: 01,3057 26064 ADS LOCCTR
051937,000337: 01,3060 10062 CCS EXECTEM2
051938,000338: 01,3061 13050 TCF JOBWAKE4
051939,000339: 01,3062 44712 CS ONE # EXIT IF SLEEPING JOB NOT FOUND.
051940,000340: 01,3063 54064 TS LOCCTR
051941,000341: 01,3064 15115 TCF ENDFIND
051942,000342:
051943,000343: 01,3065 40065 WAKETEST CS NEWLOC
051944,000344: 01,3066 50064 INDEX LOCCTR
051945,000345: 01,3067 60164 AD LOC
051946,000346: 01,3070 00006 EXTEND
051947,000347: 01,3071 13073 BZF +2 # IF MATCH.
051948,000348: 01,3072 13056 TCF JOBWAKE3 # EXAMINE NEXT CORE SET IF NO MATCH.
051949,000349:
051950,000350: 01,3073 50064 INDEX LOCCTR # RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
051951,000351: 01,3074 40167 CS PRIORITY
051952,000352: 01,3075 54063 TS NEWPRIO
051953,000353: 01,3076 50064 INDEX LOCCTR
051954,000354: 01,3077 54167 TS PRIORITY
051955,000355:
051956,000356: 01,3100 44364 CS FBANKMSK # MAKE UP THE 2CADR OF THE WAKE ADDRESS
051957,000357: 01,3101 70065 MASK NEWLOC # USING THE CADR IN NEWLOC AND THE EBANK
051958,000358: 01,3102 64700 AD 2K # HALF OF BBANK SAVED IN BANKSET.
051959,000359: 01,3103 56065 XCH NEWLOC
051960,000360: 01,3104 74364 MASK FBANKMSK
051961,000361: 01,3105 50064 INDEX LOCCTR
051962,000362: 01,3106 60165 AD BANKSET
051963,000363: 01,3107 54066 TS NEWLOC +1
051964,000364:
051965,000365: 01,3110 10064 CCS LOCCTR # SPECIAL TREATMENT IF THIS JOB WAS
051966,000366: 01,3111 12704 TCF SETLOC # ALREADY IN THE RUN (0) POSITION.
051967,000367: 01,3112 12674 TCF SPECTEST
051968,000368:
Page 1187 |
051970,000370: # PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
051971,000371:
051972,000372: 01,3113 54164 PRIOCH2 TS LOC
051973,000373: 01,3114 34714 CAF ZERO # SET FLAG TO TELL ENDJOB SCANNER IF THIS
051974,000374: 01,3115 54130 TS BUF # JOB IS STILL HIGHEST PRIORITY.
051975,000375: 01,3116 34741 CAF LOW9
051976,000376: 01,3117 70167 MASK PRIORITY
051977,000377: 01,3120 60063 AD NEWPRIO
051978,000378: 01,3121 54167 TS PRIORITY
051979,000379: 01,3122 40000 COM
051980,000380: 01,3123 13030 TCF JOBSLP2 # AND TO EJSCAN.
051981,000381:
Page 1188 |
051983,000383: # RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
051984,000384:
051985,000385: 01,3124 00004 ENDJOB1 INHINT
051986,000386: 01,3125 44714 CS ZERO
051987,000387: 01,3126 54131 TS BUF +1
051988,000388: 01,3127 56167 XCH PRIORITY
051989,000389: 01,3130 74741 MASK LOW9
051990,000390: 01,3131 54001 TS L
051991,000391:
051992,000392: 01,3132 45121 CS FAKEPRET
051993,000393: 01,3133 60001 AD L
051994,000394:
051995,000395: 01,3134 00006 EXTEND
051996,000396: 01,3135 63141 BZMF EJSCAN # NOVAC ENDOFJOB
051997,000397:
051998,000398: 01,3136 10001 CCS L
051999,000399: 01,3137 50000 INDEX A
052000,000400: 01,3140 54000 TS 0
052001,000401:
052002,000402: 01,3141 10203 EJSCAN CCS PRIORITY +12D
052003,000403: 01,3142 03206 TC EJ1
052004,000404: 01,3143 05640 TC CCSHOLE
052005,000405: 01,3144 13145 TCF +1
052006,000406:
052007,000407: 01,3145 10217 CCS PRIORITY +24D # EXAMINE EACH PRIORITY REGISTER TO FIND
052008,000408: 01,3146 03206 TC EJ1 # THE JOB OF HIGHEST ACTIVE PRIORITY.
052009,000409: 01,3147 05640 TC CCSHOLE
052010,000410: 01,3150 13151 TCF +1
052011,000411:
052012,000412: 01,3151 10233 CCS PRIORITY +36D
052013,000413: 01,3152 03206 TC EJ1
052014,000414: 01,3153 67610 -CCSPR -CCS PRIORITY
052015,000415: 01,3154 13155 TCF +1
052016,000416:
052017,000417: 01,3155 10247 CCS PRIORITY +48D
052018,000418: 01,3156 03206 TC EJ1
052019,000419: 01,3157 05640 TC CCSHOLE
052020,000420: 01,3160 13161 TCF +1
052021,000421:
052022,000422: 01,3161 10263 CCS PRIORITY +60D
052023,000423: 01,3162 03206 TC EJ1
052024,000424: 01,3163 05640 TC CCSHOLE
052025,000425: 01,3164 13165 TCF +1
052026,000426:
052027,000427: 01,3165 10277 CCS PRIORITY +72D
052028,000428: 01,3166 03206 TC EJ1
052029,000429: 01,3167 05640 TC CCSHOLE
052030,000430: 01,3170 13171 TCF +1
052031,000431:
Page 1189 |
052033,000433: # EVALUATE THE RESULTS OF THE SCAN.
052034,000434:
052035,000435: 01,3171 10131 CCS BUF +1 # SEE IF THERE ARE ANY ACTIVE JOBS WAITING
052036,000436: 01,3172 05640 TC CCSHOLE
052037,000437: 01,3173 05640 TC CCSHOLE
052038,000438:
052039,000439: 01,3174 13176 TCF +2
052040,000440: 01,3175 13223 TCF DUMMYJOB
052041,000441: 01,3176 10130 CCS BUF # BUF IS ZERO IF THIS IS A PRIOCHNG AND
052042,000442: 01,3177 13201 TCF +2 # CHANGED PRIORITY IS STILL HIGHEST.
052043,000443: 01,3200 13005 TCF ENDPRCHG -1
052044,000444:
052045,000445: 01,3201 50000 INDEX A # OTHERWISE, SET NEWJOB TO THE RELATIVE
052046,000446: 01,3202 27777 CAF 0 -1 # ADDRESS OF THE NEW JOB'S CORE SET.
052047,000447: 01,3203 63153 AD -CCSPR
052048,000448: 01,3204 54067 TS NEWJOB
052049,000449: 01,3205 12725 TCF CHANJOB -2
052050,000450:
052051,000451: 01,3206 54132 EJ1 TS BUF +2
052052,000452: 01,3207 60131 AD BUF +1 # - OLD HIGH PRIORITY.
052053,000453: 01,3210 10000 CCS A
052054,000454: 01,3211 40132 CS BUF +2
052055,000455: 01,3212 13216 TCF EJ2 # NEW HIGH PRIORITY.
052056,000456: 01,3213 13214 NOOP
052057,000457: 01,3214 50002 INDEX Q
052058,000458: 01,3215 00002 TC 2 # PROCEED WITH SEARCH.
052059,000459:
052060,000460: 01,3216 54131 EJ2 TS BUF +1
052061,000461: 01,3217 00006 EXTEND
052062,000462: 01,3220 22130 QXCH BUF # FOR LOCATING CCS PRIORITY + X INSTR.
052063,000463: 01,3221 50130 INDEX BUF
052064,000464: 01,3222 00002 TC 2
052065,000465:
Page 1190 |
052067,000467: # IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
052068,000468: # BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
052069,000469:
052070,000470: 01,3223 1361 EBANK= SELFRET # SELF-CHECK STORAGE IN EBANK.
052071,000471:
052072,000472: 01,3223 44714 DUMMYJOB CS ZERO # SET NEWJOB TO -0 FOR IDLING.
052073,000473: 01,3224 54067 TS NEWJOB
052074,000474: 01,3225 00003 RELINT
052075,000475: 01,3226 44711 CS TWO # TURN OFF THE ACTIVITY LIGHT.
052076,000476: 01,3227 00006 EXTEND
052077,000477: 01,3230 03011 WAND DSALMOUT
052078,000478: 01,3231 10067 ADVAN CCS NEWJOB # IS A NEWJOB ACTIVE?
052079,000479: 01,3232 13032 TCF NUCHANG2 # YES... ONE REQUIRING A CHANGE JOB.
052080,000480: 01,3233 34711 CAF TWO # NEW JOB ALREADY IN POSITION FOR
052081,000481: 01,3234 13242 TCF NUDIRECT # EXECUTION.
052082,000482:
052083,000483: 01,3235 31361 CA SELFRET
052084,000484: 01,3236 54001 TS L # PUT RETURN ADDRESS IN L.
052085,000485: 01,3237 33241 CAF SELFBANK
052086,000486: 01,3240 15123 TCF SUPDXCHZ +1 # AND DISPATCH JOB.
052087,000487:
052088,000488: 01,3241 1361 EBANK= SELFRET
052089,000489: 01,3241 66102 SELFBANK BBCON SELFCHK
052090,000490:
052091,000491: 01,3242 00006 NUDIRECT EXTEND # TURN THE GREEN LIGHT BACK ON.
052092,000492: 01,3243 05011 WOR DSALMOUT
052093,000493: 01,3244 52165 DXCH LOC # JOBS STARTED IN THIS FASHION MUST BE
052094,000494: 01,3245 15122 TCF SUPDXCHZ
052095,000495:
052096,000496: 5122 BLOCK 2 # IN FIXED-FIXED SO OTHERS MAY USE.
052097,000497:
052098,000498: 5122 COUNT 02/EXEC
052099,000499:
052100,000500: # SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
052101,000501: # CALLING SEQUENCE
052102,000502: # TCF SUPDXCHZ WITH 2CADR OF DESIRED LOCATION IN A + L.
052103,000503:
052104,000504: 5122 56001 SUPDXCHZ XCH L # BASIC.
052105,000505: 5123 00006 +1 EXTEND
052106,000506: 5124 01007 WRITE SUPERBNK
052107,000507: 5125 54006 TS BBANK
052108,000508: 5126 00001 TC L
052109,000509:
052110,000510: 5127 77677 NEG100 OCT 77677
End of include-file EXECUTIVE.agc. Parent file is MAIN.agc