Source Code
These source-code files are part of a reconstructed copy of Sundial E, the
final release of the Block II Command Module (CM) Apollo Guidance Computer
(AGC) system test software.
They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 2003053-121, 2003053-151, and 2003972-211, belonging to the MIT Museum. Since only binary dumps (rather than listings) of Sundial are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
001251,000002: ## Copyright: Public domain.
001252,000003: ## Filename: LIST_PROCESSING_INTERPRETER.agc
001253,000004: ## Purpose: A section of Sundial E.
001254,000005: ## It is part of the reconstructed source code for the final
001255,000006: ## release of the Block II Command Module system test software. No
001256,000007: ## original listings of this program are available; instead, this
001257,000008: ## file was created via disassembly of dumps of Sundial core rope
001258,000009: ## modules and comparison with other AGC programs.
001259,000010: ## Assembler: yaYUL
001260,000011: ## Contact: Ron Burkey <info@sandroid.org>.
001261,000012: ## Website: www.ibiblio.org/apollo/index.html
001262,000013: ## Mod history: 2023-06-22 MAS Created from Aurora 12.
001263,000014: ## 2023-06-30 MAS Updated for Sundial E.
001264,000015: ## 2023-07-03 MAS Corrected a corrupted comment and some whitespace.
001265,000016:
001266,000017:
001267,000018: # SECTION 1 DISPATCHER
001268,000019:
001269,000020: # ENTRY TO THE INTERPRETER. INTPRET SETS LOC TO THE FIRST INSTRUCTION, BANKSET TO THE FBANK OF THE
001270,000021: # OBJECT INTERPRETIVE PROGRAM, AND INTBIT15 TO THE BIT15 CONTENTS OF FBANK. INTERPRETIVE PROGRAMS MAY BE IN
001271,000022: # VIRTUALLY ALL BANKS PRESENT UNDER ANY SUPER-BANK SETTING, WITH THE RESTRICTION THAT PROGRAMS IN HIGH BANKS
001272,000023: # (BIT15 OF FBANK = 1) DO NOT REFER TO LOWBANKS, AND VICE-VERSA. THE INTERPRETER DOES NOT SWITCH SUPER-BANK,
001273,000024: # NOR DOES IT SWITCH EBANKS. MOST EBANK SWITCHING IS DONE BY THE EXECUTIVE PROGRAM.
001274,000025:
001275,000026: 6000 SETLOC 6000
001276,000027:
001277,000028: 6000 00006 INTPRET EXTEND # SET LOC TO THE WORD FOLLOWING THE TC.
001278,000029: 6001 22150 QXCH LOC
001279,000030:
001280,000031: 6002 30004 +2 CA FBANK # INTERPRETIVE BRANCHES FINISH HERE.
001281,000032: 6003 54151 TS BANKSET
001282,000033: 6004 77634 MASK BIT15 # GET 15TH BIT FOR INDEXABLE ADDRESSES.
001283,000034: 6005 54101 TS INTBIT15
001284,000035: 6006 66426 AD LOW10 # THIS VERSION IS USED IN PROCESSING
001285,000036: 6007 54100 TS INTB15+ # INDEXABLE FIXED-BANK ADDRESSES.
001286,000037:
001287,000038: 6010 16023 TCF NEWOPS # PICK UP OP CODE PAIR AND BEGIN.
001288,000039:
001289,000040: 6011 22006 INTRSM LXCH BBANK # RESUME SUSPENDED INTERPRETIVE JOB
001290,000041: 6012 16003 TCF INTPRET +3 # (ACTUALLY PART OF THE EXECUTIVE).
001291,000042:
001292,000043: # AT THE END OF MOST INSTRUCTIONS, CONTROL IS GIVEN TO DANZIG TO DISPATCH THE NEXT OPERATION.
001293,000044: 6013 54147 NEWMODE TS MODE # PROLOGUE FOR MODE-CHANGING INSTRUCTIONS.
001294,000045:
001295,000046: 6014 30151 DANZIG CA BANKSET # SET BBANK BEFORE TESTING NEWJOB SO THAT
001296,000047: 6015 54004 TS FBANK # BBANK MAY BE SAVED DIRECTLY BY CHANJOB.
001297,000048:
001298,000049: 6016 10023 NOIBNKSW CCS EDOP # SEE IF AN ORDER CODE IS LEFT OVER FROM
001299,000050: 6017 16032 TCF OPJUMP # THE LAST PAIR RETRIEVED. IF SO, EXECUTE.
001300,000051: # EDOP IS SET TO ZERO ON ITS RE-EDITING.
001301,000052:
001302,000053: 6020 10067 CCS NEWJOB # SEE IF A JOB OF HIGHER PRIORITY IS
001303,000054: 6021 14325 TCF CHANG2 # PRESENT, AND IF SO, CHANGE JOBS.
001304,000055:
001305,000056: 6022 24150 INCR LOC # ADVANCE THE LOCATION COUNTER.
001306,000057: 6023 50150 NEWOPS INDEX LOC # ENTRY TO BEGIN BY PICKING OP CODE PAIR.
001307,000058: 6024 30000 CA 0 # MAY BE AN OPCODE PAIR OR A STORE CODE.
001308,000059: 6025 10000 CCS A # TEST SIGN AND GET DABS(A).
001309,000060: 6026 16342 TCF DOSTORE # PROCESS STORE CODE.
001310,000061:
001311,000062: 6027 00177 LOW7 OCT 177
001312,000063:
001313,000064: 6030 54023 TS EDOP # OP CODE PAIR. LEAVE THE OTHER IN EDOP
001314,000065: 6031 76027 MASK LOW7 # WHERE CCS EDOP WILL HONOR IT NEXT.
001315,000066:
001316,000067: 6032 54020 OPJUMP TS CYR # LOWWD ENTERS HERE IF A RIGHT-HAND OP
001317,000068: 6033 10020 CCS CYR # CODE IS TO BE PROCESSED. TEST PREFICES.
001318,000069: 6034 16167 TCF OPJUMP2 # TEST SECOND PREFIX BIT.
001319,000070:
001320,000071: 6035 16731 TCF EXIT # +0 OP CODE IS EXIT.
001321,000072:
001322,000073: # PROCESS ADDRESSES WHICH MAY BE DIRECT, INDEXED, OR REFERENCE THE PUSHDOWN LIST.
001323,000074:
001324,000075: 6036 77652 ADDRESS MASK BIT1 # SEE IF ADDRESS IS INDEXED. CYR CONTAINED
001325,000076: 6037 10000 CCS A # 400XX, SO BIT 1 IS NOW AS IT WAS IN CYR.
001326,000077: 6040 16073 TCF INDEX # FORM INDEXED ADDRESS.
001327,000078:
001328,000079: 6041 50150 DIRADRES INDEX LOC # LOOK AHEAD TO NEXT WORD TO SEE IF
001329,000080: 6042 40001 OCT40001 CS 1 # ADDRESS IS GIVEN.
001330,000081: 6043 10000 CCS A
001331,000082: 6044 16135 TCF PUSHUP # IF NOT.
001332,000083:
001333,000084: 6045 77773 NEG4 DEC -4 B-14
001334,000085:
001335,000086: 6046 24150 INCR LOC # IF SO, TO SHOW WE PICKED UP A WORD.
001336,000087: 6047 54102 TS ADDRWD
001337,000088:
001338,000089: # FINAL DIGESTION OF DIRECT ADDRESSES OF OP CODES WITH 01 PREFIX IS DONE HERE. IN EACH CASE, THE
001339,000090: # REQUIRED 12 BIT SUB-ADDRESS IS LEFT IN ADDRWD, WITH ANY REQUIRED BANK SWITCHING DONE (F ONLY). ADDRESSES LESS
001340,000091: # THAN 45D ARE TAKEN TO BE RELATIVE TO THE WORK AREA. THE OP CODE IS NOW IN BITS 1-5 OF CYR WITH BIT 14 = 1.
001341,000092:
001342,000093:
001343,000094:
001344,000095: 6050 66171 AD -ENDVAC # SEE IF ADDRESS RELATIVE TO WORK AREA.
001345,000096: 6051 10000 CCS A
001346,000097: 6052 66234 AD -ENDERAS # IF NOT, SEE IF IN GENERAL ERASABLE.
001347,000098: 6053 16060 TCF IERASTST
001348,000099:
001349,000100: 6054 30104 NETZERO CA FIXLOC # IF SO, LEAVE THE MODIFIED ADDRESS IN
001350,000101: 6055 26102 ADS ADDRWD # ADDRWD AND DISPATCH.
001351,000102: 6056 50020 +2 INDEX CYR # THIS INDEX MAKES THE NEXT INSTRUCTION
001352,000103: 6057 76234 7 INDJUMP -1 # TCF INDJUMP + OP, EDITING CYR.
001353,000104:
001354,000105: 6060 00006 IERASTST EXTEND
001355,000106: 6061 66056 BZMF NETZERO +2 # GENERAL ERASABLE - DISPATCH IMMEDIATELY.
001356,000107:
001357,000108: 6062 60100 FIXEDADR AD INTB15+ # FIXED BANK ADDRESS. RESTORE AND ADD B15.
001358,000109: 6063 54004 +1 TS FBANK # SWITCH BANKS AND LEAVE SUB-ADDRESS IN
001359,000110: 6064 76426 MASK LOW10 # ADDRWD FOR OPERAND RETRIEVAL.
001360,000111: 6065 67640 AD 2K
001361,000112: 6066 54102 TS ADDRWD
001362,000113: 6067 50020 INDEX CYR
001363,000114: 6070 76234 7 INDJUMP -1
001364,000115:
001365,000116: # THE FOLLOWING ROUTINE PROCESSES INTERPRETIVE INDEXED ADDRESSES. AN INTERPRETER INDEX REGISTER MAY
001366,000117: # CONTAIN THE ADDRESS OF ANY ERASABLE REGISTER (0-42 BEING RELATIVE TO THE VAC AREA) OR ANY INTERPRETIVE PROGRAM
001367,000118: # BANK, OR ANY INTEGER IN THAT RANGE.
001368,000119:
001369,000120: 6071 37670 DODLOAD* CAF DLOAD* # STODL* COMES HERE TO PROCESS LOAD ADR.
001370,000121: 6072 54020 TS CYR # (STOVL* ENTERS HERE).
001371,000122:
001372,000123: 6073 30104 INDEX CA FIXLOC # SET UP INDEX LOCATION.
001373,000124: 6074 54114 TS INDEXLOC
001374,000125: 6075 24150 INCR LOC # (ADDRESS ALWAYS GIVEN).
001375,000126: 6076 50150 INDEX LOC
001376,000127: 6077 40000 CS 0
001377,000128: 6100 10000 CCS A # INDEX 2 IF ADDRESS STORED COMPLEMENTED.
001378,000129: 6101 24114 INCR INDEXLOC
001379,000130: 6102 16103 NOOP
001380,000131:
001381,000132: 6103 54102 TS ADDRWD # 14 BIT ADDRESS TO ADDRWD.
001382,000133: 6104 76232 MASK BANKMASK # IF ADDRESS GREATER THAN 1K, ADD INTBIT15
001383,000134: 6105 00006 EXTEND
001384,000135: 6106 16111 BZF INDEX2
001385,000136: 6107 30101 CA INTBIT15
001386,000137: 6110 26102 ADS ADDRWD
001387,000138:
001388,000139: 6111 50114 INDEX2 INDEX INDEXLOC
001389,000140: 6112 40046 CS X1
001390,000141: 6113 26102 ADS ADDRWD # DO AUGMENT, IGNORING AND CORRECTING OVF.
001391,000142:
001392,000143: 6114 76231 MASK HIGH9 # SEE IF ADDRESS IS IN WORK AREA.
001393,000144: 6115 00006 EXTEND
001394,000145: 6116 16131 BZF INDWORK
001395,000146: 6117 76232 MASK BANKMASK # SEE IF IN FIXED BANK.
001396,000147: 6120 00006 EXTEND
001397,000148: 6121 16133 BZF INDERASE
001398,000149:
001399,000150: 6122 30102 CA ADDRWD # IN FIXED - SWITCH BANKS AND CREATE
001400,000151: 6123 54004 TS FBANK # SUB-ADDRESS.
001401,000152: 6124 76426 MASK LOW10
001402,000153: 6125 67640 AD 2K
001403,000154: 6126 54102 TS ADDRWD
001404,000155: 6127 50020 INDEX CYR
001405,000156: 6130 36234 3 INDJUMP -1
001406,000157:
001407,000158: 6131 30104 INDWORK CA FIXLOC # MAKE ADDRWD RELATIVE TO WORK AREA.
001408,000159: 6132 26102 ADS ADDRWD
001409,000160:
001410,000161: 6133 50020 INDERASE INDEX CYR
001411,000162: 6134 36234 3 INDJUMP -1
001412,000163:
001413,000164: # PUSH-UP ROUTINES. WHEN NO OPERAND ADDRESS IS GIVEN, THE APPROPRIATE OPERAND IS TAKEN FROM THE PUSH-DOWN
001414,000165: # LIST. IN MOST CASES THE MODE OF THE RESULT (VECTOR OR SCALAR) OF THE LAST ARITHMETIC OPERATION PERFORMED
001415,000166: # IS THE SAME AS THE TYPE OF OPERAND DESIRED (ALL ADD/SUBTRACT ETC.). EXCEPTIONS TO THIS GENERAL RULE ARE LISTED
001416,000167: # BELOW (NOTE THAT IN EVERY CASE THE MODE REGISTER IS LEFT INTACT):
001417,000168:
001418,000169: # 1. VXSC AND V/SC WANT THE OPPOSITE TYPE OF OPERAND, E.G., IF THE LAST OPERATION YIELDED A VECTOR
001419,000170: # RESULT, VXSC WANTS A SCALAR.
001420,000171:
001421,000172: # 2. THE LOAD CODES SHOULD LOAD THE ACCUMULATOR INDEPENDENT OF THE RESULT OF THE LAST OPERATION. THIS
001422,000173: # INCLUDES VLOAD, DLOAD, TLOAD, PDDL, AND PDVL (NO PUSHUP WITH SLOAD).
001423,000174:
001424,000175: # 3. SOME ARITHMETIC OPERATIONS REQUIRE A STANDARD TYPE OF OPERAND REGARDLESS OF THE PREVIOUS OPERATION.
001425,000176: # THIS INCLUDES SIGN WANTING DP AND TAD REQUIRING TP.
001426,000177:
001427,000178: 6135 36227 PUSHUP CAF OCT23 # IF THE LOW 5 BITS OF CYR ARE LESS THAN
001428,000179: 6136 70020 MASK CYR # 20, THIS OP REQUIRES SPECIAL ATTENTION.
001429,000180: 6137 66142 AD -OCT10 # (NO -0).
001430,000181: 6140 10000 CCS A
001431,000182: 6141 16153 TCF REGUP # FOR ALL CODES GREATER THAN OCT 7.
001432,000183:
001433,000184: 6142 77767 -OCT10 OCT -10
001434,000185:
001435,000186: 6143 66045 AD NEG4 # WE NOW HAVE 7 - OP CODE (MOD4). SEE IF
001436,000187: 6144 10000 CCS A # THE OP CODE (MOD4) IS THREE (REVERSE).
001437,000188: 6145 50000 INDEX A # NO - THE MODE IS DEFINITE. PICK UP THE
001438,000189: 6146 46164 CS NO.WDS
001439,000190: 6147 16155 TCF REGUP +2
001440,000191:
001441,000192: 6150 50147 INDEX MODE # FOR VXSC AND V/SC WE WANT THE REQUIRED
001442,000193: 6151 46162 CS REVCNT # PUSHLOC DECREMENT WITHOUT CHANGING THE
001443,000194: 6152 16155 TCF REGUP +2 # MODE AT THIS TIME.
001444,000195:
001445,000196: 6153 50147 REGUP INDEX MODE # MOST ALL OP CODES PUSHUP HERE.
001446,000197: 6154 46164 CS NO.WDS
001447,000198: 6155 26152 +2 ADS PUSHLOC
001448,000199: 6156 54102 TS ADDRWD
001449,000200: 6157 50020 INDEX CYR
001450,000201: 6160 76234 7 INDJUMP -1 # (THE INDEX MAKES THIS A TCF.)
001451,000202:
001452,000203: 6161 00002 OCT 2 # REVERSE PUSHUP DECREMENT. VECTOR TAKES 2
001453,000204: 6162 00006 REVCNT OCT 6 # WORDS, SCALAR TAKES 6.
001454,000205: 6163 00006 OCT 6
001455,000206: 6164 00002 NO.WDS OCT 2 # CONVENTIONAL DECREMENT IS 6 WORDS VECTOR
001456,000207: 6165 00003 OCT 3 # 2 IN DP, AND 3 IN TP.
001457,000208: 6166 00006 OCT 6
001458,000209:
001459,000210: # TEST THE SECOND PREFIX BIT TO SEE IF THIS IS A MISCELLANEOUS OR A UNARY/SHORT SHIFT OPERATION.
001460,000211:
001461,000212: 6167 10020 OPJUMP2 CCS CYR # TEST SECOND PREFIX BIT.
001462,000213: 6170 16217 TCF OPJUMP3 # TEST THIRD BIT TO SEE IF UNARY OR SHIFT.
001463,000214:
001464,000215: 6171 77722 -ENDVAC DEC -45 B-14
001465,000216:
001466,000217: # THE FOLLOWING ROUTINE PROCESSES ADDRESSES OF SUFFIX CLASS 10. THEY ARE BASICALLY WORK AREA ADDRESSES
001467,000218: # IN THE RANGE 0 - 52, ERASABLE ADRES CONSTANTS FROM 100 - 1777, AND FCADRS ABOVE THAT. ALL 15 BITS ARE AVAILABLE
001468,000219: # IN CONTRAST TO SUFFIX 1, IN WHICH ONLY THE LOW ORDER 14 ARE AVAILABLE.
001469,000220:
001470,000221: 6172 24150 15BITADR INCR LOC # (ENTRY HERE FROM STCALL).
001471,000222: 6173 50150 INDEX LOC # PICK UP ADDRESS WORD.
001472,000223: 6174 30000 CA 0
001473,000224: 6175 54103 TS POLISH # THE ABSOLUTE ADDRESS WILL BE LEFT IN
001474,000225: 6176 54102 TS ADDRWD # POLISH WITH AN ERASABLE SUBADDRESS IN
001475,000226: # ADDRWD.
001476,000227: 6177 76231 MASK HIGH9 # SEE IF RELATIVE TO THE WORK AREA.
001477,000228: 6200 10000 CCS A
001478,000229: 6201 16203 TCF +2
001479,000230: 6202 16210 TCF RELWORK # ONLY IF ZERO.
001480,000231:
001481,000232: 6203 36230 CAF LOW7+2K # THESE INSTRUCTIONS ARE IN BANK 1.
001482,000233: 6204 54004 TS FBANK
001483,000234: 6205 70020 MASK CYR
001484,000235: 6206 50000 INDEX A
001485,000236: 6207 16275 TCF MISCJUMP
001486,000237:
001487,000238: 6210 30104 RELWORK CA FIXLOC # MAKE ADDRWD RELATIVE TO FIXLOC, LEAVING
001488,000239: 6211 26102 ADS ADDRWD # POLISH ABSOLUTE IN CASE THIS WAS AN
001489,000240: 6212 36230 CAF LOW7+2K # AXT, ETC.
001490,000241: 6213 54004 TS FBANK
001491,000242: 6214 70020 MASK CYR
001492,000243: 6215 50000 INDEX A
001493,000244: 6216 16275 TCF MISCJUMP
001494,000245:
001495,000246: # COMPLETE THE DISPATCHING OF UNARY AND SHORT SHIFT OPERATIONS.
001496,000247:
001497,000248: 6217 54004 OPJUMP3 TS FBANK # CALL IN BANK 0 (BITS 11-15 OF A ARE 0.)
001498,000249: 6220 10020 CCS CYR # TEST THIRD PREFIX BIT.
001499,000250: 6221 50000 INDEX A # THE DECREMENTED UNARY CODE IS IN BITS
001500,000251: 6222 16315 TCF UNAJUMP # 1-4 OF A (ZERO, EXIT, HAS BEEN DETECTED)
001501,000252:
001502,000253: 6223 10147 CCS MODE # ITS A SHORT SHIFT CODE. SEE IF PRESENT
001503,000254: 6224 12000 TCF SHORTT # SCALAR OR VECTOR.
001504,000255: 6225 12000 TCF SHORTT
001505,000256: 6226 12102 TCF SHORTV # CALLS THE APPROPRIATE ROUTINE.
001506,000257:
001507,000258:
001508,000259: 6227 00023 OCT23 OCT 23 # MASK USED BY PUSH-UP ROUTINE.
001509,000260: 6230 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
001510,000261: 6231 77700 HIGH9 OCT 77700
001511,000262: 6232 76000 BANKMASK OCT 76000 # FBANK MASK.
001512,000263: 6233 6232 FBANKMSK EQUALS BANKMASK
001513,000264: 6233 36000 B11T14 OCT 36000 # USED IN PROCESSING STORE CODES.
001514,000265: 6234 76056 -ENDERAS DEC -977 B-14
001515,000266:
001516,000267: # THE FOLLOWING IS THE JUMP TABLE FOR OP CODES WHICH MAY HAVE INDEXABLE ADDRESSES OR MAY PUSH UP.
001517,000268:
001518,000269: 6235 16511 INDJUMP TCF VLOAD # 00 - LOAD MPAC WITH A VECTOR.
001519,000270: 6236 17050 TCF TAD # 01 - TRIPLE PRECISION ADD TO MPAC.
001520,000271: 6237 17576 TCF SIGN # 02 - COMPLEMENT MPAC (V OR SC) IF X NEG.
001521,000272: 6240 17347 TCF VXSC # 03 - VECTOR TIMES SCALAR.
001522,000273: 6241 16672 TCF CGOTO # 04 - COMPUTED GO TO.
001523,000274: 6242 16474 TCF TLOAD # 05 - LOAD MPAC WITH TRIPLE PRECISION.
001524,000275: 6243 16465 TCF DLOAD # 06 - LOAD MPAC WITH A DP SCALAR.
001525,000276: 6244 17545 TCF V/SC # 07 - VECTOR DIVIDED BY SCALAR.
001526,000277:
001527,000278: 6245 16505 TCF SLOAD # 10 - LOAD MPAC IN SINGLE PRECISION.
001528,000279: 6246 16624 TCF SSP # 11 - SET SINGLE PRECISION INTO X.
001529,000280: 6247 16527 TCF PDDL # 12 - PUSH DOWN MPAC AND RE-LOAD IN DP.
001530,000281: 6250 17302 TCF MXV # 13 - MATRIX POST-MULTIPLIED BY VECTOR.
001531,000282: 6251 16563 TCF PDVL # 14 - PUSH DOWN AND VECTOR LOAD.
001532,000283: 6252 16632 TCF CCALL # 15 - COMPUTED CALL.
001533,000284: 6253 17305 TCF VXM # 16 - MATRIX PRE-MULTIPLIED BY VECTOR.
001534,000285: 6254 17537 TCF TSLC # 17 - NORMALIZE MPAC (SCALAR ONLY).
001535,000286:
001536,000287: 6255 17515 TCF DMPR # 20 - DP MULTIPLY AND ROUND.
001537,000288: 6256 17520 TCF DDV # 21 - DP DIVIDE BY.
001538,000289: 6257 17524 TCF BDDV # 22 - DP DIVIDE INTO.
001539,000290: 6260 17542 TCF GSHIFT # 23 - GENERAL SHIFT INSTRUCTION.
001540,000291: 6261 16733 TCF VAD # 24 - VECTOR ADD.
001541,000292: 6262 16761 TCF VSU # 25 - VECTOR SUBTRACT.
001542,000293: 6263 17011 TCF BVSU # 26 - VECTOR SUBTRACT FROM.
001543,000294: 6264 17277 TCF DOT # 27 - VECTOR DOT PRODUCT.
001544,000295:
001545,000296: 6265 17427 TCF VXV # 30 - VECTOR CROSS PRODUCT.
001546,000297: 6266 17373 TCF VPROJ # 31 - VECTOR PROJECTION.
001547,000298: 6267 16777 TCF DSU # 32 - DP SUBTRACT.
001548,000299: 6270 17035 TCF BDSU # 33 - DP SUBTRACT FROM.
001549,000300: 6271 16751 TCF DAD # 34 - DP ADD.
001550,000301: 6272 16272 TCF +0 # 35 - AVAILABLE
001551,000302: 6273 17513 TCF DMP1 # 36 - DP MULTIPLY.
001552,000303: 6274 17534 TCF SETPD # 37 - SET PUSH DOWN POINTER (DIRECT ONLY)
001553,000304:
001554,000305: # CODES 10 AND 14 MUST NOT PUSH UP. CODE 04 MAY BE USED FOR VECTOR DECLARE BEFORE PUSHUP IF DESIRED.
001555,000306:
001556,000307: # THE FOLLOWING JUMP TABLE APPLIES TO INDEX, BRANCH, AND MISCELLANEOUS INSTRUCTIONS.
001557,000308:
001558,000309: 6275 12000 MISCJUMP TCF AXT # 00 - ADDRESS TO INDEX TRUE.
001559,000310: 6276 12005 TCF AXC # 01 - ADDRESS TO INDEX COMPLEMENTED.
001560,000311: 6277 12010 TCF LXA # 02 - LOAD INDEX FROM ERASABLE.
001561,000312: 6300 12014 TCF LXC # 03 - LOAD INDEX FROM COMPLEMENT OF ERAS.
001562,000313: 6301 12020 TCF SXA # 04 - STORE INDEX IN ERASABLE.
001563,000314: 6302 12024 TCF XCHX # 05 - EXCHANGE INDEX WITH ERASABLE.
001564,000315: 6303 12040 TCF INCR # 06 - INCREMENT INDEX REGISTER.
001565,000316: 6304 12047 TCF TIX # 07 - TRANSFER ON INDEX.
001566,000317:
001567,000318: 6305 12032 TCF XAD # 10 - INDEX REGISTER ADD FROM ERASABLE.
001568,000319: 6306 12043 TCF XSU # 11 - INDEX SUBTRACT FROM ERASABLE.
001569,000320: 6307 12107 TCF BZE/GOTO # 12 - BRANCH ZERO AND GOTO.
001570,000321: 6310 12114 TCF BPL/BMN # 13 - BRANCH PLUS AND BRANCH MINUS.
001571,000322: 6311 12127 TCF CALL/ITA # 14 - CALL AND STORE QPRET.
001572,000323: 6312 12067 TCF RTB/BHIZ # 15 - RETURN TO BASIC AND BRANCH HI ZERO.
001573,000324: 6313 12135 TCF SW/ # 16 - SWITCH INSTRUCTIONS AND AVAILABLE.
001574,000325: 6314 12077 TCF BOV(B) # 17 - BRANCH ON OVERFLOW TO BASIC OR INT.
001575,000326:
001576,000327: # THE FOLLOWING JUMP TABLE APPIES TO UNARY INSTRUCTIONS.
001577,000328:
001578,000329: # 00 - EXIT - DETECTED EARLIER.
001579,000330: 6315 13135 UNAJUMP TCF SQRT # 01 - SQUARE ROOT.
001580,000331: 6316 13456 TCF SINE # 02 - SIN.
001581,000332: 6317 13445 TCF COSINE # 03 - COS.
001582,000333: 6320 13536 TCF ARCSIN # 04 - ARC SIN.
001583,000334: 6321 13540 TCF ARCCOS # 05 - ARC COS.
001584,000335: 6322 13122 TCF DSQ # 06 - DP SQUARE.
001585,000336: 6323 12077 TCF ROUND # 07 - ROUND TO DP.
001586,000337:
001587,000338: 6324 17611 TCF COMP # 10 - COMPLEMENT VECTOR OR SCALAR.
001588,000339: 6325 13160 TCF VDEF # 11 - VECTOR DEFINE.
001589,000340: 6326 12750 TCF UNIT # 12 - UNIT VECTOR.
001590,000341: 6327 13124 TCF ABVALABS # 13 - LENGTH OF VECTOR OR MAG OF SCALAR.
001591,000342: 6330 13174 TCF VSQ # 14 - SQUARE OF LENGTH OF VECTOR.
001592,000343: 6331 16334 TCF STADR # 15 - PUSH UP ON STORE CODE.
001593,000344: 6332 13224 TCF RVQ # 16 - RETURN VIA QPRET.
001594,000345: 6333 13177 TCF PUSH # 17 - PUSH MPAC DOWN.
001595,000346:
001596,000347: # SECTION 2 LOAD AND STORE PACKAGE.
001597,000348:
001598,000349: # A SET OF SIXTEEN STORE CODES ARE PROVIDED AS THE PRIMARY METHOD OF STORING THE MULTI-PURPOSE
001599,000350: # ACCUMULATOR (MPAC). IF IN THE DANZIG SECTION LOC REFERS TO AN ALGEBRAICALLY POSITIVE WORD, IT IS TAKEN AS A
001600,000351: # STORE CODE WITH A CORRESPONDING ERASABLE ADDRESS. MOST OF THESE CODES ARE TWO ADDRESS, SPECIFYING THAT THE WORD
001601,000352: # FOLLOWING THE STORE CODE IS TO BE USED AS AN ADDRESS FROM WHICH TO RE-LOAD MPAC. FOUR OPTIONS ARE AVAILABLE:
001602,000353:
001603,000354: # 1. STORE STORE MPAC. THE E ADDRESS MAY BE INDEXED.
001604,000355: # 2. STODL STORE MPAC AND RE-LOAD IT IN DP WITH THE NEXT ADDRESS (EITHER MAY BE INDEXED).
001605,000356: # 3. STOVL STORE MPAC AND RE-LOAD A VECTOR (AS ABOVE).
001606,000357: # 4. STCALL STORE AND DO A CALL (BOTH ADDRESSES MUST BE DIRECT HERE).
001607,000358:
001608,000359: # STODL AND STOVL WILL TAKE FROM THE PUSH-DOWN LIST IF NO LOAD ADDRESS IS GIVEN.
001609,000360:
001610,000361:
001611,000362:
001612,000363: 6334 30151 STADR CA BANKSET # THE STADR CODE (PUSHUP UP ON STORE
001613,000364: 6335 54004 TS FBANK # ADDRESS) ENTERS HERE.
001614,000365: 6336 24150 INCR LOC
001615,000366: 6337 50150 INDEX LOC # THE STORE CODE WAS STORE COMPLEMENTED TO
001616,000367: 6340 40000 CS 0 # MAKE IT LOOK LIKE AN OPCODE PAIR.
001617,000368: 6341 67661 AD NEGONE # (YUL CANT REMOVE 1 BECAUSE OF EARLY CCS)
001618,000369:
001619,000370: 6342 54102 DOSTORE TS ADDRWD
001620,000371: 6343 76426 MASK LOW10 # ENTRY FROM DISPATCHER. SAVE THE ERASABLE
001621,000372: 6344 56102 XCH ADDRWD # ADDRESS AND JUMP ON THE STORE CODE NO.
001622,000373: 6345 76233 MASK B11T14
001623,000374: 6346 00006 EXTEND
001624,000375: 6347 77645 MP BIT6 # EACH TRANSFER VECTOR ENTRY IS TWO WORDS.
001625,000376: 6350 50000 INDEX A
001626,000377: 6351 16352 TCF STORJUMP
001627,000378:
001628,000379: # STORE CODE JUMP TABLE. CALLS THE APPROPRIATE STORING ROUTINE AND EXITS TO DANZIG OR TO ADDRESS WITH
001629,000380: # A SUPPLIED OPERATION CODE.
001630,000381:
001631,000382: 6352 06422 STORJUMP TC STORE # STORE.
001632,000383: 6353 16022 TCF NEWOPS -1 # PICK UP NEW OP CODE(S).
001633,000384: 6354 06414 TC STORE,1
001634,000385: 6355 16022 TCF NEWOPS -1
001635,000386: 6356 06417 TC STORE,2
001636,000387: 6357 16022 TCF NEWOPS -1
001637,000388:
001638,000389: 6360 06422 TC STORE # STODL.
001639,000390: 6361 16455 TCF DODLOAD
001640,000391: 6362 06414 TC STORE,1
001641,000392: 6363 16455 TCF DODLOAD
001642,000393: 6364 06417 TC STORE,2
001643,000394: 6365 16455 TCF DODLOAD
001644,000395:
001645,000396: 6366 06422 TC STORE # STODL WITH INDEXED LOAD ADDRESS.
001646,000397: 6367 16071 TCF DODLOAD*
001647,000398: 6370 06414 TC STORE,1
001648,000399: 6371 16071 TCF DODLOAD*
001649,000400: 6372 06417 TC STORE,2
001650,000401: 6373 16071 TCF DODLOAD*
001651,000402:
001652,000403: 6374 06422 TC STORE # STOVL.
001653,000404: 6375 16460 TCF DOVLOAD
001654,000405: 6376 06414 TC STORE,1
001655,000406: 6377 16460 TCF DOVLOAD
001656,000407: 6400 06417 TC STORE,2
001657,000408: 6401 16460 TCF DOVLOAD
001658,000409:
001659,000410: 6402 06422 TC STORE # STOVL WITH INDEXED LOAD ADDRESS.
001660,000411: 6403 16463 TCF DOVLOAD*
001661,000412: 6404 06414 TC STORE,1
001662,000413: 6405 16463 TCF DOVLOAD*
001663,000414: 6406 06417 TC STORE,2
001664,000415: 6407 16463 TCF DOVLOAD*
001665,000416:
001666,000417: 6410 06422 TC STORE # STOTC.
001667,000418: 6411 37666 CAF CALLCODE
001668,000419: 6412 54020 TS CYR
001669,000420: 6413 16172 TCF 15BITADR # GET A 15 BIT ADDRESS.
001670,000421:
001671,000422: # STORE CODE ADDRESS PROCESSOR.
001672,000423:
001673,000424: 6414 50104 STORE,1 INDEX FIXLOC
001674,000425: 6415 40046 CS X1
001675,000426: 6416 16421 TCF PRESTORE
001676,000427:
001677,000428: 6417 50104 STORE,2 INDEX FIXLOC
001678,000429: 6420 40047 CS X2
001679,000430: 6421 26102 PRESTORE ADS ADDRWD # RESULTANT ADDRESS IS IN ERASABLE.
001680,000431:
001681,000432: 6422 30102 STORE CA ADDRWD # SEE IF ADDRESS RELATIVE TO WORK AREA.
001682,000433: 6423 66171 AD -ENDVAC
001683,000434: 6424 10000 CCS A
001684,000435: 6425 16431 TCF STARTSTO # ADDRESS OK AS IS.
001685,000436:
001686,000437: 6426 01777 LOW10 OCT 1777
001687,000438:
001688,000439: 6427 30104 CA FIXLOC # GIVEN ADDRESS IS RELATIVE TO WORK AREA.
001689,000440: 6430 26102 ADS ADDRWD
001690,000441:
001691,000442: # STORING ROUTINES. STORE DP, TP, OR VECTOR AS INDICATED BY MODE.
001692,000443:
001693,000444: 6431 00006 STARTSTO EXTEND # MPAC,+1 MUST BE STORED IN ANY EVENT.
001694,000445: 6432 30141 DCA MPAC
001695,000446: 6433 50102 INDEX ADDRWD
001696,000447: 6434 52001 DXCH 0
001697,000448:
001698,000449: 6435 10147 CCS MODE
001699,000450: 6436 16451 TCF TSTORE
001700,000451: 6437 00002 TC Q
001701,000452:
001702,000453: 6440 00006 VSTORE EXTEND
001703,000454: 6441 30144 DCA MPAC +3
001704,000455: 6442 50102 INDEX ADDRWD
001705,000456: 6443 52003 DXCH 2
001706,000457:
001707,000458: 6444 00006 EXTEND
001708,000459: 6445 30146 DCA MPAC +5
001709,000460: 6446 50102 INDEX ADDRWD
001710,000461: 6447 52005 DXCH 4
001711,000462: 6450 00002 TC Q
001712,000463:
001713,000464: 6451 30142 TSTORE CA MPAC +2
001714,000465: 6452 50102 INDEX ADDRWD
001715,000466: 6453 54002 TS 2
001716,000467: 6454 00002 TC Q
001717,000468:
001718,000469: # ROUTINES TO BEGIN PROCESSING OF THE SECOND ADDRESS ASSOCIATED WITH ALL STORE-TYPE CODES EXCEPT STORE
001719,000470: # ITSELF.
001720,000471:
001721,000472: 6455 37667 DODLOAD CAF DLOADCOD
001722,000473: 6456 54020 TS CYR
001723,000474: 6457 16041 TCF DIRADRES # GO GET A DIRECT ADDRESS.
001724,000475:
001725,000476: 6460 37634 DOVLOAD CAF VLOADCOD
001726,000477: 6461 54020 TS CYR
001727,000478: 6462 16041 TCF DIRADRES
001728,000479:
001729,000480: 6463 36042 DOVLOAD* CAF VLOAD*
001730,000481: 6464 16072 TCF DODLOAD* +1 # PROLOGUE TO INDEX ROUTINE.
001731,000482:
001732,000483: # THE FOLLOWING LOAD INSTRUCTIONS ARE PROVIDED FOR LOADING THE MULTI-PURPOSE ACCUMULATOR MPAC.
001733,000484:
001734,000485: 6465 00006 DLOAD EXTEND
001735,000486: 6466 50102 INDEX ADDRWD
001736,000487: 6467 30001 DCA 0 # PICK UP DP ARGUMENT AND LEAVE IT IN
001737,000488: 6470 52141 SLOAD2 DXCH MPAC # MPAC,+1, SETTING MPAC +2 TO ZERO. THE
001738,000489: 6471 37657 CAF ZERO # CONTENTS OF THE OTHER FOUR REGISTERS OF
001739,000490: 6472 54142 TS MPAC +2 # MPAC ARE IRRELEVANT.
001740,000491: 6473 16013 TCF NEWMODE # DECLARE DOUBLE PRECISION MODE.
001741,000492:
001742,000493: 6474 50102 TLOAD INDEX ADDRWD
001743,000494: 6475 30002 CA 2 # LOAD A TRIPLE PRECISION ARGUMENT INTO
001744,000495: 6476 54142 TS MPAC +2 # THE FIRST THREE MPAC REGISTERS, WITH THE
001745,000496: 6477 00006 EXTEND # CONTENTS OF THE OTHER FOUR IRRELEVANT.
001746,000497: 6500 50102 INDEX ADDRWD
001747,000498: 6501 30001 DCA 0
001748,000499: 6502 52141 DXCH MPAC
001749,000500: 6503 37652 CAF ONE
001750,000501: 6504 16013 TCF NEWMODE # DECLARE TRIPLE PRECISION MODE.
001751,000502:
001752,000503: 6505 22007 SLOAD ZL # LOAD A SINGLE PRECISION NUMBER INTO
001753,000504: 6506 50102 INDEX ADDRWD # MPAC, SETTING MPAC+1,2 TO ZERO. THE
001754,000505: 6507 30000 CA 0 # CONTENTS OF THE REMAINING MPAC REGISTERS
001755,000506: 6510 16470 TCF SLOAD2 # ARE IRRELEVANT.
001756,000507:
001757,000508: 6511 00006 VLOAD EXTEND # LOAD A DOUBLE PRECISION VECTOR INTO
001758,000509: 6512 50102 INDEX ADDRWD # MPAC,+1, MPAC+3,4, AND MPAC+5,6. THE
001759,000510: 6513 30001 DCA 0 # CONTENTS OF MPAC +2 ARE IRRELEVANT.
001760,000511: 6514 52141 DXCH MPAC
001761,000512:
001762,000513: 6515 00006 ENDVLOAD EXTEND # PDVL COMES HERE TO FINISH UP FOR DP, TP.
001763,000514: 6516 50102 INDEX ADDRWD
001764,000515: 6517 30003 DCA 2
001765,000516: 6520 52144 DXCH MPAC +3
001766,000517:
001767,000518: 6521 00006 +4 EXTEND # TPDVL FINISHES HERE.
001768,000519: 6522 50102 INDEX ADDRWD
001769,000520: 6523 30005 DCA 4
001770,000521: 6524 52146 DXCH MPAC +5
001771,000522:
001772,000523: 6525 47652 CS ONE # DECLARE VECTOR MODE.
001773,000524: 6526 16013 TCF NEWMODE
001774,000525:
001775,000526: # THE FOLLOWING INSTRUCTIONS ARE PROVIDED FOR STORING OPERANDS IN THE PUSHDOWN LIST:
001776,000527:
001777,000528: # 1. PUSH PUSHDOWN AND NO LOAD.
001778,000529: # 2. PDDL PUSHDOWN AND DOUBLE PRECISION LOAD.
001779,000530: # 3. PDVL PUSHDOWN AND VECTOR LOAD.
001780,000531:
001781,000532: 6527 00006 PDDL EXTEND
001782,000533: 6530 50102 INDEX ADDRWD # LOAD MPAC,+1, PUSHING THE FORMER
001783,000534: 6531 30001 DCA 0 # CONTENTS DOWN.
001784,000535: 6532 52141 DXCH MPAC
001785,000536: 6533 50152 INDEX PUSHLOC
001786,000537: 6534 52001 DXCH 0
001787,000538:
001788,000539: 6535 50147 INDEX MODE # ADVANCE THE PUSHDOWN POINTER APPRO-
001789,000540: 6536 36164 CAF NO.WDS # PRIATELY.
001790,000541: 6537 26152 ADS PUSHLOC
001791,000542:
001792,000543: 6540 10147 CCS MODE
001793,000544: 6541 16556 TCF ENDTPUSH
001794,000545: 6542 16554 TCF ENDDPUSH
001795,000546:
001796,000547: 6543 54147 TS MODE # NOW DP.
001797,000548: 6544 54142 ENDVPUSH TS MPAC +2
001798,000549: 6545 52144 DXCH MPAC +3 # PUSH DOWN THE REST OF THE VECTOR HERE.
001799,000550: 6546 50152 INDEX PUSHLOC
001800,000551: 6547 51775 DXCH 0 -4
001801,000552:
001802,000553: 6550 52146 DXCH MPAC +5
001803,000554: 6551 50152 INDEX PUSHLOC
001804,000555: 6552 51777 DXCH 0 -2
001805,000556:
001806,000557: 6553 16014 TCF DANZIG
001807,000558:
001808,000559: 6554 54142 ENDDPUSH TS MPAC +2 # SET MPAC +2 TO ZERO AND EXIT ON DP.
001809,000560: 6555 16014 TCF DANZIG
001810,000561:
001811,000562: 6556 54147 ENDTPUSH TS MODE
001812,000563: 6557 56142 XCH MPAC +2 # ON TRIPLE, SET MPAC +2 TO ZERO, PUSHING
001813,000564: 6560 50152 +2 INDEX PUSHLOC # DOWN THE OLD CONTENTS
001814,000565: 6561 53777 TS 0 -1
001815,000566: 6562 16014 TCF DANZIG
001816,000567:
001817,000568: # PDVL - PUSHDOWN AND VECTOR LOAD.
001818,000569:
001819,000570: 6563 00006 PDVL EXTEND # RELOAD MPAC AND PUSH DOWN ITS CONTENTS.
001820,000571: 6564 50102 INDEX ADDRWD
001821,000572: 6565 30001 DCA 0
001822,000573: 6566 52141 DXCH MPAC
001823,000574: 6567 50152 INDEX PUSHLOC
001824,000575: 6570 52001 DXCH 0
001825,000576:
001826,000577: 6571 50147 INDEX MODE # ADVANCE THE PUSHDOWN POINTER.
001827,000578: 6572 36164 CAF NO.WDS
001828,000579: 6573 26152 ADS PUSHLOC
001829,000580:
001830,000581: 6574 10147 CCS MODE # TEST PAST MODE.
001831,000582: 6575 16614 TCF TPDVL
001832,000583: 6576 16515 TCF ENDVLOAD # JUST LOAD LAST FOUR REGISTERS ON DP.
001833,000584:
001834,000585: 6577 00006 VPDVL EXTEND # PUSHDOWN AND RE-LOAD LAST TWO COMPONENTS
001835,000586: 6600 50102 INDEX ADDRWD
001836,000587: 6601 30003 DCA 2
001837,000588: 6602 52144 DXCH MPAC +3
001838,000589: 6603 50152 INDEX PUSHLOC
001839,000590: 6604 51775 DXCH 0 -4
001840,000591:
001841,000592: 6605 00006 EXTEND
001842,000593: 6606 50102 INDEX ADDRWD
001843,000594: 6607 30005 DCA 4
001844,000595: 6610 52146 DXCH MPAC +5
001845,000596: 6611 50152 INDEX PUSHLOC
001846,000597: 6612 51777 DXCH 0 -2
001847,000598:
001848,000599: 6613 16014 TCF DANZIG
001849,000600:
001850,000601: 6614 00006 TPDVL EXTEND # ON TP, WE MUST LOAD THE Y COMPONENT
001851,000602: 6615 50102 INDEX ADDRWD # BEFORE STORING MPAC +2 IN CASE THIS IS A
001852,000603: 6616 30003 DCA 2 # PUSHUP.
001853,000604: 6617 52144 DXCH MPAC +3
001854,000605:
001855,000606: 6620 30142 CA MPAC +2
001856,000607: 6621 50152 INDEX PUSHLOC # IN DP.
001857,000608: 6622 53777 TS 0 -1
001858,000609: 6623 16521 TCF ENDVLOAD +4
001859,000610:
001860,000611: # SSP (STORE SINGLE PRECISION) IS EXECUTED HERE.
001861,000612:
001862,000613: 6624 24150 SSP INCR LOC # PICK UP THE WORD FOLLOWING THE GIVEN
001863,000614: 6625 50150 INDEX LOC # ADDRESS AND STORE IT AT X.
001864,000615: 6626 30000 CA 0
001865,000616: 6627 50102 STORE1 INDEX ADDRWD # SOME INDEX AND MISCELLANEOUS OPS END
001866,000617: 6630 54000 TS 0 # HERE.
001867,000618:
001868,000619: 6631 16014 TCF DANZIG
001869,000620:
001870,000621: # SEQUENCE CHANGING AND SUBROUTINE CALLING OPTIONS.
001871,000622:
001872,000623: # THE FOLLOWING OPERATIONS ARE AVAILABLE FOR SEQUENCING CHANGING, BRANCHING, AND CALLING SUBROUTINES:
001873,000624:
001874,000625: # 1. GOTO GO TO.
001875,000626: # 2. CALL CALL SUBROUTINE SETTING QPRET.
001876,000627: # 3. CGOTO COMPUTED GO TO.
001877,000628: # 4. CCALL COMPUTED CALL.
001878,000629: # 7. BPL BRANCH IF MPAC POSITIVE OR ZERO.
001879,000630: # 8. BZE BRANCH IF MPAC ZERO.
001880,000631: # 9. BMN BRANCH IF MPAC NEGATIVE NON-ZERO.
001881,000632:
001882,000633: 6632 24150 CCALL INCR LOC # MAINTAIN LOC FOR QPRET COMPUTATION.
001883,000634: 6633 50150 INDEX LOC
001884,000635: 6634 30000 CAF 0 # GET BASE ADDRESS OF CADR LIST.
001885,000636: 6635 50102 INDEX ADDRWD
001886,000637: 6636 60000 AD 0 # ADD INCREMENT.
001887,000638: 6637 54004 TS FBANK # SELECT DESIRED CADR.
001888,000639: 6640 76426 MASK LOW10
001889,000640: 6641 50000 INDEX A
001890,000641: 6642 32000 CAF 10000
001891,000642: 6643 54103 -1 TS POLISH
001892,000643:
001893,000644: 6644 46426 CALL CS LOW10 # FOR ANY OF THE CALL OPTIONS, MAKE UP THE
001894,000645: 6645 60150 AD LOC # ADDRESS OF THE NEXT OP-CODE PAIR/STORE
001895,000646: 6646 60151 AD BANKSET # CODE AND LEAVE IT IN QPRET. NOTE THAT
001896,000647: 6647 50104 INDEX FIXLOC # LOW10 = 2000 - 1.
001897,000648: 6650 54052 TS QPRET
001898,000649:
001899,000650: 6651 30103 GOTO CA POLISH # BASIC BRANCHING SEQUENCE.
001900,000651: 6652 54004 TS FBANK
001901,000652: 6653 76426 MASK LOW10 # MAKE UP 12 BIT SUB-ADDRESS AND FALL INTO
001902,000653: 6654 67640 AD 2K # FALL INTO THE INTPRET ENTRY UNLESS THE
001903,000654: 6655 54150 TS LOC # GIVEN ADDRESS WAS IN ERASABLE, IN WHICH
001904,000655: 6656 10004 CCS FBANK # CASE IT IS USED AS THE ADDRESS OF THE
001905,000656: 6657 16002 TCF INTPRET +2 # BRANCH ADDRESS.
001906,000657: 6660 16662 TCF +2
001907,000658: 6661 16002 TCF INTPRET +2
001908,000659:
001909,000660: 6662 40150 CS LOC # THE GIVEN ADDRESS IS IN ERASABLE - SEE
001910,000661: 6663 66710 AD EVAC+2K # IF RELATIVE TO THE WORK AREA.
001911,000662: 6664 10000 CCS A
001912,000663: 6665 30104 CA FIXLOC # ADD FIXLOC IF SO.
001913,000664: 6666 26150 ADS LOC
001914,000665:
001915,000666: 6667 50150 INDEX LOC
001916,000667: 6670 26000 CA 0 -2000 # (ADDRESS HAD BEEN AUGMENTED BY 2000.)
001917,000668: 6671 16652 TCF GOTO +1 # ALLOWS ARBITRARY INDIRECTNESS.
001918,000669:
001919,000670: 6672 50150 CGOTO INDEX LOC # COMPUTED GO TO. PICK UP ADDRESS OF CADR
001920,000671: 6673 30001 CA 1 # LIST.
001921,000672: 6674 50102 INDEX ADDRWD # ADD MODIFIER.
001922,000673: 6675 60000 AD 0
001923,000674: 6676 54004 TS FBANK # SELECT GOTO ADDRESS.
001924,000675: 6677 76426 MASK LOW10
001925,000676: 6700 50000 INDEX A
001926,000677: 6701 32000 CA 10000
001927,000678: 6702 16652 TCF GOTO +1 # WITH ADDRESS IN A.
001928,000679:
001929,000680: 6703 30151 SWBRANCH CA BANKSET # SWITCH INSTRUCTIONS WHICH ELECT TO
001930,000681: 6704 54004 TS FBANK # BRANCH COME HERE TO DO SO.
001931,000682: 6705 50150 INDEX LOC
001932,000683: 6706 30001 CA 1
001933,000684: 6707 16652 TCF GOTO +1
001934,000685:
001935,000686: 6710 02055 EVAC+2K DEC 1069 B-14 # =1024+45
001936,000687:
001937,000688: # TRIPLE PRECISION BRANCHING ROUTINE. IF CALLING TC IS AT L, RETURN IS AS FOLLOWS:
001938,000689: # L+1 IF MPAC IS GREATER THAN ZERO.
001939,000690: # L+2 IF MPAC IS EQUAL TO +0 OR -0.
001940,000691: # L+3 IF MPAC IS LESS THAN ZERO.
001941,000692:
001942,000693:
001943,000694:
001944,000695: 6711 10140 BRANCH CCS MPAC
001945,000696: 6712 00002 TC Q
001946,000697: 6713 16715 TCF +2 # ON ZERO.
001947,000698: 6714 16727 TCF NEG
001948,000699:
001949,000700: 6715 10141 CCS MPAC +1
001950,000701: 6716 00002 TC Q
001951,000702: 6717 16721 TCF +2
001952,000703: 6720 16727 TCF NEG
001953,000704:
001954,000705: 6721 10142 CCS MPAC +2
001955,000706: 6722 00002 TC Q
001956,000707: 6723 16725 TCF +2
001957,000708: 6724 16727 TCF NEG
001958,000709:
001959,000710: 6725 50002 INDEX Q # IF ALL THREE REGISTERS WERE +-0.
001960,000711: 6726 00001 TC 1
001961,000712:
001962,000713: 6727 50002 NEG INDEX Q # IF FIRST NON-ZERO REGISTER WAS NEGATIVE.
001963,000714: 6730 00002 TC 2
001964,000715:
001965,000716:
001966,000717:
001967,000718: 6731 50150 EXIT INDEX LOC # LEAVE INTERPRETIVE MODE.
001968,000719: 6732 10001 TCF 1
001969,000720:
001970,000721: # SECTION 3 - ADD/SUBTRACT PACKAGE.
001971,000722:
001972,000723: # THE FOLLOWING OPERATIONS ARE PROVIDED FOR ADDING TO AND SUBTRACTING FROM THE MULTI-PURPOSE ACCUMULATOR
001973,000724: # MPAC:
001974,000725:
001975,000726: # 1. DAD DOUBLE PRECISION ADD.
001976,000727: # 2. DSU DOUBLE PRECISION SUBTRACT.
001977,000728: # 3. BDSU DOUBLE PRECISION SUBTRACT FROM.
001978,000729:
001979,000730: # 4. TAD TRIPLE PRECISION ADD.
001980,000731:
001981,000732: # 5. VAD VECTOR ADD.
001982,000733: # 6. VSU VECTOR SUBTRACT.
001983,000734: # 7. BVSU VECTOR SUBTRACT FROM.
001984,000735:
001985,000736: # THE INTERPRETIVE OVERFLOW INDICATOR OVFIND IS SET NON-ZERO IF OVERFLOW OCCURS IN ANY OF THE ABOVE.
001986,000737:
001987,000738:
001988,000739:
001989,000740: 6733 00006 VAD EXTEND
001990,000741: 6734 50102 INDEX ADDRWD
001991,000742: 6735 30003 DCA 2
001992,000743: 6736 20144 DAS MPAC +3
001993,000744: 6737 00006 EXTEND # CHECK OVERFLOW.
001994,000745: 6740 16742 BZF +2
001995,000746: 6741 07007 TC OVERFLOW
001996,000747:
001997,000748: 6742 00006 EXTEND
001998,000749: 6743 50102 INDEX ADDRWD
001999,000750: 6744 30005 DCA 4
002000,000751: 6745 20146 DAS MPAC +5
002001,000752: 6746 00006 EXTEND
002002,000753: 6747 16751 BZF +2
002003,000754: 6750 07007 TC OVERFLOW
002004,000755:
002005,000756: 6751 00006 DAD EXTEND
002006,000757: 6752 50102 INDEX ADDRWD
002007,000758: 6753 30001 DCA 0
002008,000759: 6754 20141 ENDVXV DAS MPAC # VXV FINISHES HERE.
002009,000760: 6755 00006 EXTEND
002010,000761: 6756 16014 BZF DANZIG
002011,000762: 6757 07007 TC OVERFLOW
002012,000763: 6760 16014 TCF DANZIG
002013,000764:
002014,000765: 6761 00006 VSU EXTEND
002015,000766: 6762 50102 INDEX ADDRWD
002016,000767: 6763 40003 DCS 2
002017,000768: 6764 20144 DAS MPAC +3
002018,000769: 6765 00006 EXTEND
002019,000770: 6766 16770 BZF +2
002020,000771: 6767 07007 TC OVERFLOW
002021,000772:
002022,000773: 6770 00006 EXTEND
002023,000774: 6771 50102 INDEX ADDRWD
002024,000775: 6772 40005 DCS 4
002025,000776: 6773 20146 DAS MPAC +5
002026,000777: 6774 00006 EXTEND
002027,000778: 6775 16777 BZF +2
002028,000779: 6776 07007 TC OVERFLOW
002029,000780:
002030,000781: 6777 00006 DSU EXTEND
002031,000782: 7000 50102 INDEX ADDRWD
002032,000783: 7001 40001 DCS 0
002033,000784: 7002 20141 DAS MPAC
002034,000785: 7003 00006 EXTEND
002035,000786: 7004 16014 BZF DANZIG
002036,000787: 7005 07007 TC OVERFLOW
002037,000788: 7006 16014 TCF DANZIG
002038,000789:
002039,000790: 7007 37652 OVERFLOW CAF ONE # SUBROUTINE TO TURN OVFIND ON.
002040,000791: 7010 17132 TCF SETOVF2
002041,000792:
002042,000793: 7011 00006 BVSU EXTEND
002043,000794: 7012 50102 INDEX ADDRWD
002044,000795: 7013 30003 DCA 2
002045,000796: 7014 52144 DXCH MPAC +3
002046,000797: 7015 00006 EXTEND
002047,000798: 7016 40001 DCOM
002048,000799: 7017 20144 DAS MPAC +3
002049,000800: 7020 00006 EXTEND
002050,000801: 7021 17023 BZF +2
002051,000802: 7022 07007 TC OVERFLOW
002052,000803:
002053,000804: 7023 00006 EXTEND
002054,000805: 7024 50102 INDEX ADDRWD
002055,000806: 7025 30005 DCA 4
002056,000807: 7026 52146 DXCH MPAC +5
002057,000808: 7027 00006 EXTEND
002058,000809: 7030 40001 DCOM
002059,000810: 7031 20146 DAS MPAC +5
002060,000811: 7032 00006 EXTEND
002061,000812: 7033 17035 BZF +2
002062,000813: 7034 07007 TC OVERFLOW
002063,000814:
002064,000815: 7035 00006 BDSU EXTEND
002065,000816: 7036 50102 INDEX ADDRWD
002066,000817: 7037 30001 DCA 0
002067,000818: 7040 52141 DXCH MPAC
002068,000819: 7041 00006 EXTEND
002069,000820: 7042 40001 DCOM
002070,000821: 7043 20141 DAS MPAC
002071,000822: 7044 00006 EXTEND
002072,000823: 7045 16014 BZF DANZIG
002073,000824: 7046 07007 TC OVERFLOW
002074,000825: 7047 16014 TCF DANZIG
002075,000826:
002076,000827: # TRIPLE PRECISION ADD ROUTINE.
002077,000828:
002078,000829: 7050 00006 TAD EXTEND
002079,000830: 7051 50102 INDEX ADDRWD
002080,000831: 7052 30002 DCA 1 # ADD MINOR PARTS FIRST.
002081,000832: 7053 20142 DAS MPAC +1
002082,000833: 7054 50102 INDEX ADDRWD
002083,000834: 7055 60000 AD 0
002084,000835: 7056 60140 AD MPAC
002085,000836: 7057 54140 TS MPAC
002086,000837: 7060 16014 TCF DANZIG
002087,000838:
002088,000839: 7061 54105 SETOVF TS OVFIND # SET OVFIND IF SUCH OCCURS.
002089,000840: 7062 16014 TCF DANZIG
002090,000841:
002091,000842: # ARITHMETIC SUBROUTINES REQUIRED IN FIXED-FIXED.
002092,000843:
002093,000844: # 1. DMPSUB DOUBLE PRECISION MULTIPLY. MULTIPLY THE CONTENTS OF MPAC,+1 BY THE DP WORD WHOSE ADDRESS
002094,000845: # IS IN ADDRWD AND LEAVE A TRIPLE PRECISION RESULT IN MPAC.
002095,000846: # 2. ROUNDSUB ROUND THE TRIPLE PRECISON CONTENTS OF MPAC TO DOUBLE PRECISION.
002096,000847: # 3. DOTSUB TAKE THE DOT PRODUCT OF THE VECTOR IN MPAC AND THE VECTOR WHOSE ADDRESS IS IN ADDRWD
002097,000848: # AND LEAVE THE TRIPLE PRECISION RESULT IN MPAC.
002098,000849: # 4. POLY USING THE CONTENTS OF MPAC AS A DP ARGUMENT, EVALUATE THE POLYNOMIAL WHOSE DEGREE AND
002099,000850: # COEFFICIENTS IMMEDIATELY FOLLOW THE TC POLY INSTRUCTION (SEE ROUTINE FOR DETAILS).
002100,000851:
002101,000852:
002102,000853:
002103,000854: 7063 50002 DMP INDEX Q # BASIC SUBROUTINE FOR USE BY PINBALL, ETC
002104,000855: 7064 30000 CAF 0 # ADRES OF ARGUMENT FOLLOWS TC DMP .
002105,000856: 7065 24002 INCR Q
002106,000857: 7066 54102 -1 TS ADDRWD # (PROLOGUE FOR SETTING ADDRWD.)
002107,000858:
002108,000859: 7067 50102 DMPSUB INDEX ADDRWD # GET MINOR PART OF OPERAND AT C(ADDRWD).
002109,000860: 7070 30001 CA 1
002110,000861: 7071 54142 TS MPAC +2 # THIS WORKS FOR SQUARING MPAC AS WELL.
002111,000862: 7072 37657 CAF ZERO # SET MPAC +1 TO ZERO SO WE CAN ACCUMULATE
002112,000863: 7073 56141 XCH MPAC +1 # THE PARTIAL PRODUCTS WITH DAS
002113,000864: 7074 54121 TS MPTEMP # INSTRUCTIONS.
002114,000865: 7075 00006 EXTEND
002115,000866: 7076 70142 MP MPAC +2 # MINOR OF MPAC X MINOR OF C(ADDRWD).
002116,000867:
002117,000868: 7077 56142 XCH MPAC +2 # DISCARD MINOR PART OF ABOVE RESULT AND
002118,000869: 7100 00006 EXTEND # FORM MAJOR OF MPAC X MINOR OF C(ADDRWD).
002119,000870: 7101 70140 MP MPAC
002120,000871: 7102 20142 DAS MPAC +1 # GUARANTEED NO OVERFLOW.
002121,000872:
002122,000873: 7103 50102 INDEX ADDRWD # GET MAJOR PART OF ARGUMENT AT C(ADDRWD).
002123,000874: 7104 30000 CA 0
002124,000875: 7105 56121 XCH MPTEMP # SAVE AND BRING OUT MINOR OF MPAC.
002125,000876: 7106 00006 EXTEND
002126,000877: 7107 70121 MP MPTEMP # MAJOR OF C(ADDRWD) X MINOR OF MPAC.
002127,000878: 7110 20142 DAS MPAC +1 # ACCUMULATE, SETTING A TO NET OVERFLOW.
002128,000879:
002129,000880: 7111 56140 XCH MPAC # SETTING MPAC TO 0 OR +-1.
002130,000881: 7112 00006 EXTEND
002131,000882: 7113 70121 MP MPTEMP # MAJOR OF MPAC X MAJOR OF C(ADDRWD).
002132,000883: 7114 20141 DAS MPAC # GUARANTEED NO OVERFLOW.
002133,000884: 7115 00002 TC Q # 49 MCT = .573 MS. INCLUDING RETURN.
002134,000885:
002135,000886: # ROUND MPAC TO DOUBLE PRECISION, SETTING OVFIND ON THE RARE EVENT OF OVERFLOW.
002136,000887:
002137,000888: 7116 37657 ROUNDSUB CAF ZERO # SET MPAC +2 = 0 FOR SCALARS AND CHANGE
002138,000889: 7117 54147 +1 TS MODE # MODE TO DP.
002139,000890:
002140,000891: 7120 56142 VROUND XCH MPAC +2 # BUT WE NEEDNT TAKE THE TIME FOR VECTORS.
002141,000892: 7121 60000 DOUBLE
002142,000893: 7122 54001 TS L
002143,000894: 7123 00002 TC Q
002144,000895:
002145,000896: 7124 60141 AD MPAC +1 # ADD ROUNDING BIT IF MPAC +2 WAS GREATER
002146,000897: 7125 54141 TS MPAC +1 # THAN .5 IN MAGNITUDE.
002147,000898: 7126 00002 TC Q
002148,000899:
002149,000900: 7127 60140 AD MPAC # PROPAGATE INTERFLOW.
002150,000901: 7130 54140 TS MPAC
002151,000902: 7131 00002 TC Q
002152,000903:
002153,000904: 7132 54105 SETOVF2 TS OVFIND # (RARE).
002154,000905: 7133 00002 TC Q
002155,000906:
002156,000907: # THE DOT PRODUCT SUBROUTINE USUALLY FORMS THE DOT PRODUCT OF THE VECTOR IN MPAC WITH A STANDARD SIX
002157,000908: # REGISTER VECTOR WHOSE ADDRESS IS IN ADDRWD. IN THIS CASE C(DOTINC) ARE SET TO 2. VXM, HOWEVER, SETS C(DOTINC) TO
002158,000909: # 6 SO THAT DOTSUB DOTS MPAC WITH A COLUMN VECTOR OF THE MATRIX IN QUESTION IN THIS CASE.
002159,000910:
002160,000911:
002161,000912:
002162,000913: 7134 37651 PREDOT CAF TWO # PROLOGUE TO SET DOTINC TO 2.
002163,000914: 7135 54122 TS DOTINC
002164,000915:
002165,000916: 7136 00006 DOTSUB EXTEND
002166,000917: 7137 22123 QXCH DOTRET # SAVE RETURN.
002167,000918: 7140 07067 TC DMPSUB # DOT X COMPONENTS.
002168,000919: 7141 52144 DXCH MPAC +3 # POSITION Y COMPONENT OF MPAC FOR
002169,000920: 7142 52141 DXCH MPAC # MULTIPLICATION WHILE SAVING RESULT IN
002170,000921: 7143 52115 DXCH BUF # THREE WORD BUFFER, BUF.
002171,000922: 7144 30142 CA MPAC +2
002172,000923: 7145 54116 TS BUF +2
002173,000924:
002174,000925: 7146 30122 CA DOTINC # ADVANCE ADDRWD TO Y COMPONENT OF
002175,000926: 7147 26102 ADS ADDRWD # OTHER ARGUMENT.
002176,000927: 7150 07067 TC DMPSUB
002177,000928: 7151 52142 DXCH MPAC +1 # ACCUMULATE PARTIAL PRODUCTS.
002178,000929: 7152 20116 DAS BUF +1
002179,000930: 7153 60140 AD MPAC
002180,000931: 7154 60114 AD BUF
002181,000932: 7155 54114 TS BUF
002182,000933: 7156 17160 TCF +2
002183,000934: 7157 54105 TS OVFIND # IF OVERFLOW OCCURS.
002184,000935:
002185,000936: 7160 52146 DXCH MPAC +5 # MULTIPLY Z COMPONENTS.
002186,000937: 7161 52141 DXCH MPAC
002187,000938: 7162 30122 CA DOTINC
002188,000939: 7163 26102 ADS ADDRWD
002189,000940: 7164 07067 TC DMPSUB
002190,000941: 7165 52116 ENDDOT DXCH BUF +1 # LEAVE FINAL ACCUMULATION IN MPAC.
002191,000942: 7166 20142 DAS MPAC +1
002192,000943: 7167 60140 AD MPAC
002193,000944: 7170 60114 AD BUF
002194,000945: 7171 54140 TS MPAC
002195,000946: 7172 00123 TC DOTRET
002196,000947:
002197,000948: 7173 54105 TS OVFIND # ON OVERFLOW HERE.
002198,000949: 7174 00123 TC DOTRET
002199,000950:
002200,000951: # DOUBLE PRECISION POLYNOMIAL EVALUATOR.
002201,000952:
002202,000953: # N N-1
002203,000954: # THIS ROUTINE EVALUATES A X + A X + ... + A X + A LEAVING THE DP RESULT IN MPAC ON EXIT.
002204,000955: # N N-1 1 0
002205,000956:
002206,000957: # IT IS ASSUMED THAT X ARRIVES IN MPAC AND N AND THE COEFFICIENTS IN THE CALLING SEQUENCE AS FOLLOWS:
002207,000958:
002208,000959: # L TC POLY
002209,000960: # L+1 DEC N-1
002210,000961: # L+2 2DEC A(0)
002211,000962: # ...
002212,000963: # L+2N+2 2DEC A(N) RETURN IS TO L+2N+4.
002213,000964:
002214,000965: 7175 37671 POLY CAF LVBUF # INCOMING X WILL BE STORED IN VBUF, SO
002215,000966: 7176 54102 TS ADDRWD # SET ADDRWD SO DMPSUB WILL MPY BY VBUF.
002216,000967:
002217,000968: 7177 50002 INDEX Q
002218,000969: 7200 30000 CAF 0
002219,000970: 7201 54124 TS POLYCNT # N-1 TO COUNTER.
002220,000971: 7202 60000 DOUBLE
002221,000972: 7203 60002 AD Q
002222,000973: 7204 54125 TS POLYRET # SAVE L+2N-1 FOR RETURN
002223,000974: 7205 54103 TS POLISH # AND FOR REFERENCING COEFFICIENTS.
002224,000975:
002225,000976: 7206 00006 EXTEND
002226,000977: 7207 50000 INDEX A # LOAD A(N) INTO MPAC, SAVING MPAC IN
002227,000978: 7210 30004 DCA 3 # VBUF.
002228,000979: 7211 52141 DXCH MPAC
002229,000980: 7212 52107 DXCH VBUF
002230,000981: 7213 17217 TCF POLY2 # NO ZERO-ORDER POLYNOMIALS ALLOWED.
002231,000982:
002232,000983: 7214 54124 POLYLOOP TS POLYCNT # SAVE DECREMENTED LOOP COUNTER.
002233,000984: 7215 47651 CS TWO # REGRESS COEFFICIENT POINTER.
002234,000985: 7216 26103 ADS POLISH
002235,000986:
002236,000987: 7217 07067 POLY2 TC DMPSUB # MULTIPLY BY X.
002237,000988: 7220 00006 EXTEND
002238,000989: 7221 50103 INDEX POLISH # ADD IN NEXT COEFFICIENT.
002239,000990: 7222 30002 DCA 1
002240,000991: 7223 20141 DAS MPAC # NO CHECK FOR OVERFLOW SINCE SIN, ETC.,
002241,000992: # SHOULD NOT OVERFLOW.
002242,000993: 7224 10124 CCS POLYCNT # LOOP ON COUNTER.
002243,000994: 7225 17214 TCF POLYLOOP
002244,000995: 7226 50125 INDEX POLYRET # DONE - RETURN TO CALLER AT L+2N+4.
002245,000996: 7227 00005 FIVE TC 5
002246,000997:
002247,000998: # MISCELLANEOUS MULTI-PRECISION ROUTINES REQUIRED IN FIXED-FIXED BUT NOT USED BY THE INTERPRETER.
002248,000999:
002249,001000: 7230 00006 TPAGREE EXTEND # FORCE SIGN AGREEMENT AMONG THE TRIPLE-
002250,001001: 7231 22114 QXCH BUF # PRECISION CONTENTS OF MPAC, RETURNING
002251,001002: 7232 06711 TC BRANCH # WITH THE SIGNUM OF THE INPUT IN A.
002252,001003: 7233 17237 TCF ARG+
002253,001004: 7234 17257 TCF ARGZERO
002254,001005:
002255,001006: 7235 47632 CS POSMAX # IF NEGATIVE.
002256,001007: 7236 17240 TCF +2
002257,001008:
002258,001009: 7237 37632 ARG+ CAF POSMAX
002259,001010: 7240 54115 +2 TS BUF +1
002260,001011: 7241 00006 EXTEND
002261,001012: 7242 24000 AUG A # FORMS +-1.0.
002262,001013: 7243 60142 AD MPAC +2
002263,001014: 7244 54142 TS MPAC +2
002264,001015: 7245 37657 CAF ZERO
002265,001016: 7246 60115 AD BUF +1
002266,001017: 7247 60141 AD MPAC +1
002267,001018: 7250 54141 TS MPAC +1
002268,001019: 7251 37657 CAF ZERO
002269,001020: 7252 60115 AD BUF +1
002270,001021: 7253 60140 AD MPAC
002271,001022: 7254 54140 ARGZERO2 TS MPAC # ALWAYS SKIPPING UNLESS ARGZERO.
002272,001023: 7255 54141 TS MPAC +1
002273,001024: 7256 00114 TC BUF # RETURN.
002274,001025:
002275,001026: 7257 54142 ARGZERO TS MPAC +2 # SET ALL THREE MPAC REGISTERS TO ZERO.
002276,001027: 7260 17254 TCF ARGZERO2
002277,001028:
002278,001029: # SHORTMP MULTIPLIES THE TP CONTENTS OF MPAC BY THE SINGLE PRECISION NUMBER ARRIVING IN A.
002279,001030:
002280,001031: 7261 54121 SHORTMP TS MPTEMP
002281,001032: 7262 00006 EXTEND
002282,001033: 7263 70142 MP MPAC +2
002283,001034: 7264 54142 TS MPAC +2
002284,001035: 7265 37657 CAF ZERO # SO SUBSEQUENT DAS WILL WORK.
002285,001036: 7266 56141 XCH MPAC +1
002286,001037: 7267 00006 EXTEND
002287,001038: 7270 70121 MP MPTEMP
002288,001039: 7271 20142 DAS MPAC +1
002289,001040: 7272 56140 XCH MPAC # SETTING MPAC TO 0.
002290,001041: 7273 00006 EXTEND
002291,001042: 7274 70121 MP MPTEMP
002292,001043: 7275 20141 DAS MPAC
002293,001044: 7276 00002 TC Q
002294,001045:
002295,001046: # MISCELLANEOUS VECTOR OPERATIONS. INCLUDED HERE ARE THE FOLLOWING:
002296,001047:
002297,001048: # 1. DOT DP VECTOR DOT PRODUCT.
002298,001049: # 2. VXV DP VECTOR CROSS PRODUCT.
002299,001050: # 3. VXSC DP VECTOR TIMES SCALAR.
002300,001051: # 4. V/SC DP VECTOR DIVIDED BY SCALAR.
002301,001052: # 5. VPROJ DP VECTOR PROJECTION. ( (MPAC.X)MPAC ).
002302,001053: # 6. VXM DP VECTOR POST-MULTIPLIED BY MATRIX.
002303,001054: # 7. MXV DP VECTOR PRE-MULTIPLIED BY MATRIX.
002304,001055:
002305,001056: 7277 07134 DOT TC PREDOT # DO THE DOT PRODUCT AND EXIT, CHANGING
002306,001057: 7300 37657 CAF ZERO # THE MODE TO DP SCALAR.
002307,001058: 7301 16013 TCF NEWMODE
002308,001059:
002309,001060:
002310,001061:
002311,001062: 7302 37651 MXV CAF TWO # SET UP MATINC AND DOTINC FOR ROW
002312,001063: 7303 54124 TS MATINC # VECTORS.
002313,001064: 7304 17310 TCF VXM/MXV # GO TO COMMON PORTION.
002314,001065:
002315,001066: 7305 47654 VXM CS TEN # SET MATINC AND DOTINC TO REFER TO MATRIX
002316,001067: 7306 54124 TS MATINC # AS THREE COLUMN VECTORS.
002317,001068: 7307 36162 CAF SIX
002318,001069:
002319,001070: # COMMON PORTION OF MXV AND VXM.
002320,001071:
002321,001072: 7310 54122 VXM/MXV TS DOTINC
002322,001073: 7311 07501 TC MPACVBUF # SAVE VECTOR IN MPAC FOR FURTHER USE.
002323,001074:
002324,001075: 7312 07136 TC DOTSUB # GO DOT TO GET X COMPONENT OF ANSWER.
002325,001076: 7313 00006 EXTEND
002326,001077: 7314 30107 DCA VBUF # MOVE MPAC VECTOR BACK INTO MPAC, SAVING
002327,001078: 7315 52141 DXCH MPAC # NEW X COMPONENT IN BUF2.
002328,001079: 7316 52120 DXCH BUF2
002329,001080: 7317 00006 EXTEND
002330,001081: 7320 30111 DCA VBUF +2
002331,001082: 7321 52144 DXCH MPAC +3
002332,001083: 7322 00006 EXTEND
002333,001084: 7323 30113 DCA VBUF +4
002334,001085: 7324 52146 DXCH MPAC +5
002335,001086: 7325 30124 CA MATINC # INITIALIZE ADDRWD FOR NEXT DOT PRODUCT.
002336,001087: 7326 26102 ADS ADDRWD # FORMS BASE ADDRESS OF NEXT COLUMN(ROW).
002337,001088:
002338,001089: 7327 07136 TC DOTSUB
002339,001090: 7330 52107 DXCH VBUF # MOVE GIVEN VECTOR BACK TO MPAC, SAVING Y
002340,001091: 7331 52141 DXCH MPAC # COMPONENT OF ANSWER IN VBUF +2.
002341,001092: 7332 52111 DXCH VBUF +2
002342,001093: 7333 52144 DXCH MPAC +3
002343,001094: 7334 52113 DXCH VBUF +4
002344,001095: 7335 52146 DXCH MPAC +5
002345,001096: 7336 30124 CA MATINC # FORM ADDRESS OF LAST COLUMN OR ROW.
002346,001097: 7337 26102 ADS ADDRWD
002347,001098:
002348,001099: 7340 07136 TC DOTSUB
002349,001100: 7341 52120 DXCH BUF2 # ANSWER NOW COMPLETE. PUT COMPONENTS INTO
002350,001101: 7342 52141 DXCH MPAC # PROPER MPAC REGISTERS.
002351,001102: 7343 52146 DXCH MPAC +5
002352,001103: 7344 52111 DXCH VBUF +2
002353,001104: 7345 52144 DXCH MPAC +3
002354,001105: 7346 16014 TCF DANZIG # EXIT.
002355,001106:
002356,001107: # VXSC - VECTOR TIMES SCALAR.
002357,001108:
002358,001109: 7347 10147 VXSC CCS MODE # TEST PRESENT MODE.
002359,001110: 7350 17376 TCF DVXSC # SEPARATE ROUTINE WHEN SCALAR IS IN MPAC.
002360,001111: 7351 17376 TCF DVXSC
002361,001112:
002362,001113: 7352 07067 VVXSC TC DMPSUB # COMPUTE X COMPONENT
002363,001114: 7353 07120 TC VROUND # AND ROUND IT.
002364,001115: 7354 52144 DXCH MPAC +3 # PUT Y COMPONENT INTO MPAC SAVING MPAC IN
002365,001116: 7355 52141 DXCH MPAC # MPAC +3.
002366,001117: 7356 52144 DXCH MPAC +3
002367,001118:
002368,001119: 7357 07067 TC DMPSUB # DO SAME FOR Y AND Z COMPONENTS.
002369,001120: 7360 07120 TC VROUND
002370,001121: 7361 52146 DXCH MPAC +5
002371,001122: 7362 52141 DXCH MPAC
002372,001123: 7363 52146 DXCH MPAC +5
002373,001124:
002374,001125: 7364 07067 TC DMPSUB
002375,001126: 7365 07120 TC VROUND
002376,001127: 7366 52141 VROTATEX DXCH MPAC # EXIT USED TO RESTORE MPAC AFTER THIS
002377,001128: 7367 52146 DXCH MPAC +5 # TYPE OF ROTATION. CALLED BY VECTOR SHIFT
002378,001129: 7370 52144 DXCH MPAC +3 # RIGHT, V/SC, ETC.
002379,001130: 7371 52141 DXCH MPAC
002380,001131: 7372 16014 TCF DANZIG
002381,001132:
002382,001133: # DP VECTOR PROJECTION ROUTINE.
002383,001134:
002384,001135:
002385,001136:
002386,001137: 7373 07134 VPROJ TC PREDOT # (MPAC.X)MPAC IS COMPUTED AND LEFT IN
002387,001138: 7374 47650 CS FOUR # MPAC. DO DOT AND FALL INTO DVXSC.
002388,001139: 7375 26102 ADS ADDRWD
002389,001140:
002390,001141: # VXSC WHEN SCALAR ARRIVES IN MPAC AND VECTOR IS AT X.
002391,001142:
002392,001143: 7376 00006 DVXSC EXTEND # SAVE SCALAR IN MPAC +3 AND GET X
002393,001144: 7377 30141 DCA MPAC # COMPONENT OF ANSWER.
002394,001145: 7400 52144 DXCH MPAC +3
002395,001146: 7401 07067 TC DMPSUB
002396,001147: 7402 07120 TC VROUND
002397,001148:
002398,001149: 7403 37651 CAF TWO # ADVANCE ADDRWD TO Y COMPONENT OF X.
002399,001150: 7404 26102 ADS ADDRWD
002400,001151: 7405 00006 EXTEND
002401,001152: 7406 30144 DCA MPAC +3 # PUT SCALAR BACK INTO MPAC AND SAVE
002402,001153: 7407 52141 DXCH MPAC # X RESULT IN MPAC +5.
002403,001154: 7410 52146 DXCH MPAC +5
002404,001155: 7411 07067 TC DMPSUB
002405,001156: 7412 07120 TC VROUND
002406,001157:
002407,001158: 7413 37651 CAF TWO
002408,001159: 7414 26102 ADS ADDRWD # TO Z COMPONENT.
002409,001160: 7415 52144 DXCH MPAC +3 # BRING SCALAR BACK, PUTTING Y RESULT IN
002410,001161: 7416 52141 DXCH MPAC # THE PROPER PLACE.
002411,001162: 7417 52144 DXCH MPAC +3
002412,001163: 7420 07067 TC DMPSUB
002413,001164: 7421 07120 TC VROUND
002414,001165:
002415,001166: 7422 52141 DXCH MPAC # PUT Z COMPONENT IN PROPER PLACE, ALSO
002416,001167: 7423 52146 DXCH MPAC +5 # POSITIONING X.
002417,001168: 7424 52141 DXCH MPAC
002418,001169:
002419,001170: 7425 47652 CS ONE # MODE HAS CHANGED TO VECTOR.
002420,001171: 7426 16013 TCF NEWMODE
002421,001172:
002422,001173: # THE VECTOR CROSS PRODUCT ROUTINE CALCULATES (X M -X M ,X M -X M ,X M -X M ) WHERE M IS THE VECTOR IN
002423,001174: # 3 2 2 3 1 3 3 1 2 1 1 2
002424,001175: # MPAC AND X THE VECTOR AT THE GIVEN ADDRESS.
002425,001176:
002426,001177:
002427,001178:
002428,001179: 7427 00006 VXV EXTEND
002429,001180: 7430 30146 DCA MPAC +5 # FORM UP M3X1, LEAVING M1 IN VBUF.
002430,001181: 7431 52141 DXCH MPAC
002431,001182: 7432 52107 DXCH VBUF
002432,001183: 7433 07067 TC DMPSUB # BY X1.
002433,001184:
002434,001185: 7434 00006 EXTEND
002435,001186: 7435 40144 DCS MPAC +3 # CALCULATE -X1M2, SAVING X1M3 IN VBUF +2.
002436,001187: 7436 52141 DXCH MPAC
002437,001188: 7437 52111 DXCH VBUF +2
002438,001189: 7440 07067 TC DMPSUB
002439,001190:
002440,001191: 7441 37651 CAF TWO # ADVANCE ADDRWD TO X2.
002441,001192: 7442 26102 ADS ADDRWD
002442,001193: 7443 00006 EXTEND
002443,001194: 7444 40146 DCS MPAC +5 # PREPARE TO GET -X2M3, SAVING -X1M2 IN
002444,001195: 7445 52141 DXCH MPAC # MPAC +5.
002445,001196: 7446 52146 DXCH MPAC +5
002446,001197: 7447 07067 TC DMPSUB
002447,001198:
002448,001199: 7450 00006 EXTEND
002449,001200: 7451 30107 DCA VBUF # GET X2M1, SAVING -X2M3 IN VBUF +4.
002450,001201: 7452 52141 DXCH MPAC
002451,001202: 7453 52113 DXCH VBUF +4
002452,001203: 7454 07067 TC DMPSUB
002453,001204:
002454,001205: 7455 37651 CAF TWO # ADVANCE ADDRWD TO X3.
002455,001206: 7456 26102 ADS ADDRWD
002456,001207: 7457 00006 EXTEND
002457,001208: 7460 40107 DCS VBUF # GET -X3M1, ADDING X2M1 TO MPAC +5 TO
002458,001209: 7461 52141 DXCH MPAC # COMPLETE THE Z COMPONENT OF THE ANSWER.
002459,001210: 7462 20146 DAS MPAC +5
002460,001211:
002461,001212: 7463 00006 EXTEND
002462,001213: 7464 17466 BZF +2
002463,001214: 7465 07007 TC OVERFLOW
002464,001215:
002465,001216: 7466 07067 TC DMPSUB
002466,001217: 7467 52111 DXCH VBUF +2 # MOVE X1M3 TO MPAC +3 SETTING UP FOR X3M2
002467,001218: 7470 52144 DXCH MPAC +3 # AND ADD -X3M1 TO MPAC +3 TO COMPLETE THE
002468,001219: 7471 52141 DXCH MPAC # Y COMPONENT OF THE RESULT.
002469,001220: 7472 20144 DAS MPAC +3
002470,001221:
002471,001222: 7473 00006 EXTEND
002472,001223: 7474 17476 BZF +2
002473,001224: 7475 07007 TC OVERFLOW
002474,001225:
002475,001226: 7476 07067 TC DMPSUB
002476,001227: 7477 52113 DXCH VBUF +4 # GO ADD -X2M3 TO X3M2 TO COMPLETE THE X
002477,001228: 7500 16754 TCF ENDVXV # COMPONENT (TAIL END OF DAD).
002478,001229:
002479,001230: # THE MPACVBUF SUBROUTINE SAVES THE VECTOR IN MPAC IN VBUF WITHOUT CLOBBERING MPAC.
002480,001231:
002481,001232: 7501 00006 MPACVBUF EXTEND # CALLED BY MXV, VXM, AND UNIT.
002482,001233: 7502 30141 DCA MPAC
002483,001234: 7503 52107 DXCH VBUF
002484,001235: 7504 00006 EXTEND
002485,001236: 7505 30144 DCA MPAC +3
002486,001237: 7506 52111 DXCH VBUF +2
002487,001238: 7507 00006 EXTEND
002488,001239: 7510 30146 DCA MPAC +5
002489,001240: 7511 52113 DXCH VBUF +4
002490,001241: 7512 00002 TC Q # RETURN TO CALLER.
002491,001242:
002492,001243: # INTERPRETIVE INSTRUCTIONS WHOSE EXECUTION CONSISTS OF PRINCIPALLY CALLING SUBROUTINES.
002493,001244:
002494,001245: 7513 07067 DMP1 TC DMPSUB # DMP INSTRUCTION.
002495,001246: 7514 16014 TCF DANZIG
002496,001247:
002497,001248: 7515 07067 DMPR TC DMPSUB
002498,001249: 7516 07117 TC ROUNDSUB +1 # (C(A) = +0).
002499,001250: 7517 16014 TCF DANZIG
002500,001251:
002501,001252: 7520 00006 DDV EXTEND
002502,001253: 7521 50102 INDEX ADDRWD # MOVE DIVIDEND INTO BUF.
002503,001254: 7522 30001 DCA 0
002504,001255: 7523 17530 TCF BDDV +4
002505,001256:
002506,001257: 7524 00006 BDDV EXTEND # MOVE DIVISOR INTO MPAC SAVING MPAC, THE
002507,001258: 7525 50102 INDEX ADDRWD # DIVIDEND, IN BUF.
002508,001259: 7526 30001 DCA 0
002509,001260: 7527 52141 DXCH MPAC
002510,001261: 7530 52115 +4 DXCH BUF
002511,001262: 7531 37657 CAF ZERO # DIVIDE ROUTINES IN BANK 0.
002512,001263: 7532 54004 TS FBANK
002513,001264: 7533 12332 TCF DDV/BDDV
002514,001265:
002515,001266: 7534 30102 SETPD CA ADDRWD # ANYWHERE IN ERASABLE IN GENERAL, BUT
002516,001267: 7535 54152 TS PUSHLOC # ALMOST ALWAYS IN THE WORK AREA.
002517,001268: 7536 16016 TCF NOIBNKSW # NO FBANK SWITCH REQUIRED.
002518,001269:
002519,001270: 7537 37657 TSLC CAF ZERO # SHIFTING ROUTINES LOCATED IN BANK 00.
002520,001271: 7540 54004 TS FBANK
002521,001272: 7541 12153 TCF TSLC2
002522,001273:
002523,001274: 7542 36027 GSHIFT CAF LOW7 # USED AS MASK AT GENSHIFT. THIS PROCESSES
002524,001275: 7543 54004 TS FBANK # ANY SHIFT INSTRUCTION (EXCEPT TSLC) WITH
002525,001276: 7544 12174 TCF GENSHIFT # AN ADDRESS (ROUTINES IN BANK 0).
002526,001277:
002527,001278: # THE FOLLOWING IS THE PROLOGUE TO V/SC. IF THE PRESENT MODE IS VECTOR, IT SAVES THE SCALAR AT X IN BUF
002528,001279: # AND CALLS THE V/SC ROUTINE IN BANK 0. IF THE PRESENT MODE IS SCALAR, IT MOVES THE VECTOR AT X INTO MPAC, SAVING
002529,001280: # THE SCALAR IN MPAC IN BUF BEFORE CALLING THE V/SC ROUTINE IN BANK 0.
002530,001281:
002531,001282: 7545 10147 V/SC CCS MODE
002532,001283: 7546 17557 TCF DV/SC # MOVE VECTOR INTO MPAC.
002533,001284: 7547 17557 TCF DV/SC
002534,001285:
002535,001286: 7550 00006 VV/SC EXTEND
002536,001287: 7551 50102 INDEX ADDRWD
002537,001288: 7552 30001 DCA 0
002538,001289: 7553 52115 V/SC1 DXCH BUF # IN BOTH CASES, VECTOR IS NOW IN MPAC AND
002539,001290: 7554 37657 CAF ZERO # SCALAR IN BUF.
002540,001291: 7555 54004 TS FBANK
002541,001292: 7556 12576 TCF V/SC2
002542,001293:
002543,001294: 7557 00006 DV/SC EXTEND
002544,001295: 7560 50102 INDEX ADDRWD
002545,001296: 7561 30003 DCA 2
002546,001297: 7562 52144 DXCH MPAC +3
002547,001298: 7563 00006 EXTEND
002548,001299: 7564 50102 INDEX ADDRWD
002549,001300: 7565 30005 DCA 4
002550,001301: 7566 52146 DXCH MPAC +5
002551,001302:
002552,001303: 7567 47652 CS ONE # CHANGE MODE TO VECTOR.
002553,001304: 7570 54147 TS MODE
002554,001305:
002555,001306: 7571 00006 EXTEND
002556,001307: 7572 50102 INDEX ADDRWD
002557,001308: 7573 30001 DCA 0
002558,001309: 7574 52141 DXCH MPAC
002559,001310: 7575 17553 TCF V/SC1 # FINISH PROLOGUE AT COMMON SECTION.
002560,001311:
002561,001312: # SIGN AND COMPLEMENT INSTRUCTIONS.
002562,001313:
002563,001314: 7576 50102 SIGN INDEX ADDRWD # CALL COMP INSTRUCTION IF WORD AT X IS
002564,001315: 7577 10000 CCS 0 # NEGATIVE NON-ZERO.
002565,001316: 7600 16016 TCF NOIBNKSW # NO FBANK SWITCH REQUIRED.
002566,001317: 7601 17603 TCF +2
002567,001318: 7602 17611 TCF COMP # DO THE COMPLEMENT.
002568,001319:
002569,001320: 7603 50102 INDEX ADDRWD
002570,001321: 7604 10001 CCS 1
002571,001322: 7605 16016 TCF NOIBNKSW # NO FBANK SWITCH REQUIRED.
002572,001323: 7606 16016 TCF NOIBNKSW # NO FBANK SWITCH REQUIRED.
002573,001324: 7607 17611 TCF COMP
002574,001325: 7610 16016 TCF NOIBNKSW # NO FBANK SWITCH REQUIRED.
002575,001326:
002576,001327:
002577,001328:
002578,001329: 7611 00006 COMP EXTEND # COMPLEMENT DP MPAC IN EVERY CASE.
002579,001330: 7612 40141 DCS MPAC
002580,001331: 7613 52141 DXCH MPAC
002581,001332:
002582,001333: 7614 10147 CCS MODE # EITHER COMPLEMENT MPAC +3 OR THE REST OF
002583,001334: 7615 17626 TCF DCOMP # THE VECTOR ACCUMULATOR.
002584,001335: 7616 17626 TCF DCOMP
002585,001336:
002586,001337: 7617 00006 EXTEND # VECTOR COMPLEMENT.
002587,001338: 7620 40144 DCS MPAC +3
002588,001339: 7621 52144 DXCH MPAC +3
002589,001340: 7622 00006 EXTEND
002590,001341: 7623 40146 DCS MPAC +5
002591,001342: 7624 52146 DXCH MPAC +5
002592,001343: 7625 16014 TCF DANZIG
002593,001344:
002594,001345: 7626 40142 DCOMP CS MPAC +2
002595,001346: 7627 54142 TS MPAC +2
002596,001347: 7630 16014 TCF DANZIG
002597,001348:
002598,001349: # CONSTANTS REQUIRED IN FIXED-FIXED.
002599,001350:
002600,001351: 7631 37777 DPOSMAX OCT 37777
002601,001352: 7632 37777 POSMAX OCT 37777
002602,001353: 7633 7633 LIMITS EQUALS POSMAX +1
002603,001354: 7633 57777 NEG1/2 OCT -20000 # MUST BE TWO LOCATIONS AHEAD OF POS1/2.
002604,001355:
002605,001356: 7634 40000 BIT15 OCT 40000 # BIT TABLE FOLLOWS.
002606,001357: 7635 20000 BIT14 OCT 20000
002607,001358: 7636 10000 BIT13 OCT 10000
002608,001359: 7637 04000 BIT12 OCT 04000
002609,001360: 7640 02000 BIT11 OCT 02000
002610,001361: 7641 01000 BIT10 OCT 01000
002611,001362: 7642 00400 BIT9 OCT 00400
002612,001363: 7643 00200 BIT8 OCT 00200
002613,001364: 7644 00100 BIT7 OCT 00100
002614,001365: 7645 00040 BIT6 OCT 00040
002615,001366: 7646 00020 BIT5 OCT 00020
002616,001367: 7647 00010 BIT4 OCT 00010
002617,001368: 7650 00004 BIT3 OCT 00004
002618,001369: 7651 00002 BIT2 OCT 00002
002619,001370: 7652 00001 BIT1 OCT 00001
002620,001371:
002621,001372: 7653 7634 NEGMAX EQUALS BIT15
002622,001373: 7653 7635 HALF EQUALS BIT14
002623,001374: 7653 7635 POS1/2 EQUALS HALF
002624,001375: 7653 7636 QUARTER EQUALS BIT13
002625,001376: 7653 7640 2K EQUALS BIT11
002626,001377: 7653 00013 ELEVEN DEC 11 B-14
002627,001378: 7654 7653 NOUTCON = ELEVEN
002628,001379: 7654 00012 TEN DEC 10 B-14
002629,001380: 7655 00011 NINE DEC 9 B-14
002630,001381: 7656 7647 EIGHT EQUALS BIT4
002631,001382: 7656 00007 SEVEN OCT 7
002632,001383: 7657 6162 SIX EQUALS REVCNT
002633,001384: 7657 7650 FOUR EQUALS BIT3
002634,001385: 7657 6165 THREE EQUALS NO.WDS +1
002635,001386: 7657 7651 TWO EQUALS BIT2
002636,001387: 7657 7652 ONE EQUALS BIT1
002637,001388: 7657 00000 ZERO OCT 0
002638,001389: 7660 77777 NEG0 OCT 77777
002639,001390: 7661 77776 NEGONE DEC -1 B-14
002640,001391:
002641,001392: 7662 7661 NEG1 = NEGONE
002642,001393: 7662 7661 MINUS1 EQUALS NEG1
002643,001394: 7662 77775 NEG2 OCT 77775
002644,001395: 7663 77774 NEG3 DEC -3 B-14
002645,001396: 7664 00777 LOW9 OCT 777
002646,001397: 7665 00017 LOW4 OCT 17
002647,001398:
002648,001399: 7666 7656 LOW3 EQUALS SEVEN
002649,001400: 7666 6165 LOW2 EQUALS THREE
002650,001401:
002651,001402: 7666 00030 CALLCODE OCT 00030
002652,001403: 7667 40014 DLOADCOD OCT 40014
002653,001404: 7670 7634 VLOADCOD EQUALS BIT15
002654,001405: 7670 40015 DLOAD* OCT 40015
002655,001406: 7671 6042 VLOAD* EQUALS OCT40001
002656,001407: 7671 00106 LVBUF ADRES VBUF
002657,001408: 7672 ENDINTF EQUALS
002658,001409:
002659,001410: # SHIFTING AND ROUNDING PACKAGE.
002660,001411:
002661,001412: # THE FOLLOWING SHORT SHIFT CODES REQUIRE NO ADDRESS WORD:
002662,001413:
002663,001414: # 1. SR1 TO SR4 SCALAR SHIFT RIGHT.
002664,001415: # 2. SR1R TO SR4R SCALAR SHIFT RIGHT AND ROUND.
002665,001416: # 3. SL1 TO SL4 SCALAR SHIFT LEFT.
002666,001417: # 4. SL1R TO SL4R SCALAR SHIFT LEFT AND ROUND.
002667,001418:
002668,001419: # 5. VSR1 TO VSR8 VECTOR SHIFT RIGHT (ALWAYS ROUNDS).
002669,001420: # 6. VSL1 TO VSL8 VECTOR SHIFT LEFT (NEVER ROUNDS).
002670,001421:
002671,001422: # THE FOLLOWING CODES REQUIRE AN ADDRESS WHICH MAY BE INDEXED:*
002672,001423:
002673,001424: # 1. SR SCALAR SHIFT RIGHT.
002674,001425: # 2. SRR SCALAR SHIFT RIGHT AND ROUND.
002675,001426: # 3. SL SCALAR SHIFT LEFT.
002676,001427: # 4. SLR SCALAR SHIFT LEFT AND ROUND.
002677,001428:
002678,001429: # 5. VSR VECTOR SHIFT RIGHT.
002679,001430: # 6. VSL VECTOR SHIFT LEFT.
002680,001431:
002681,001432: # * IF THE ADDRESS IS INDEXED, AND THE INDEX MODIFICATION RESULTS IN A NEGATIVE SHIFT COUNT, A SHIFT OF THE
002682,001433: # ABSOLUTE VALUE OF THE COUNT IS DONE IN THE OPPOSITE DIRECTION.
002683,001434:
002684,001435:
002685,001436: 00,2000 SETLOC 10000 # BANK 0 PORTION FOLLOWS.
002686,001437:
002687,001438: 00,2000 36162 SHORTT CAF SIX # SCALAR SHORT SHIFTS COME HERE. THE SHIFT
002688,001439: 00,2001 70020 MASK CYR # COUNT-1 IS NOW IN BITS 2-3 OF CYR. THE
002689,001440: 00,2002 54021 TS SR # ROUNDING BIT IS IN BIT1 AT THIS POINT.
002690,001441:
002691,001442: 00,2003 10020 CCS CYR # SEE IF RIGHT OR LEFT SHIFT DESIRED.
002692,001443: 00,2004 12062 TCF TSSL # SHIFT LEFT.
002693,001444:
002694,001445: 00,2005 00024 SRDDV DEC 20 B-14 # MPTEMP SETTING FOR SR BEFORE DDV.
002695,001446:
002696,001447: 00,2006 50021 TSSR INDEX SR # GET SHIFTING BIT.
002697,001448: 00,2007 37635 CAF BIT14
002698,001449: 00,2010 54121 TS MPTEMP
002699,001450:
002700,001451: 00,2011 10020 CCS CYR # SEE IF A ROUND IS DESIRED.
002701,001452: 00,2012 02031 RIGHTR TC MPACSRND # YES - SHIFT RIGHT AND ROUND.
002702,001453: 00,2013 16013 TCF NEWMODE # SET MODE TO DP (C(A) = 0).
002703,001454: 00,2014 30121 MPACSHR CA MPTEMP # DO A TRIPLE PRECISION SHIFT RIGHT.
002704,001455: 00,2015 00006 EXTEND
002705,001456: 00,2016 70142 MP MPAC +2
002706,001457: 00,2017 54142 +3 TS MPAC +2 # (EXIT FROM SQRT AND ABVAL).
002707,001458: 00,2020 30121 CA MPTEMP
002708,001459:
002709,001460: 00,2021 00006 EXTEND
002710,001461: 00,2022 70140 MP MPAC # SHIFT MAJOR PART INTO A,L AND PLACE IN
002711,001462: 00,2023 52141 DXCH MPAC # MPAC,+1.
002712,001463: 00,2024 30121 CA MPTEMP
002713,001464: 00,2025 00006 EXTEND
002714,001465: 00,2026 70001 MP L # ORIGINAL C(MPAC +1).
002715,001466: 00,2027 20142 DAS MPAC +1 # GUARANTEED NO OVERFLOW.
002716,001467: 00,2030 16014 TCF DANZIG
002717,001468:
002718,001469: # MPAC SHIFT RIGHT AND ROUND SUBROUTINES.
002719,001470:
002720,001471: 00,2031 30142 MPACSRND CA MPAC +2 # WE HAVE TO DO ALL THREE MULTIPLIES SINCE
002721,001472: 00,2032 00006 EXTEND # MPAC +1 AND MPAC +2 MIGHT HAVE SIGN
002722,001473: 00,2033 70121 MP MPTEMP # DISAGREEMENT WITH A SHIFT RIGHT OF 1.
002723,001474: 00,2034 56141 XCH MPAC +1
002724,001475: 00,2035 00006 EXTEND
002725,001476: 00,2036 70121 MP MPTEMP
002726,001477: 00,2037 56141 XCH MPAC +1 # TRIAL MINOR PART.
002727,001478: 00,2040 60001 AD L
002728,001479:
002729,001480: 00,2041 60000 VSHR2 DOUBLE # (FINISH VECTOR COMPONENT SHIFT RIGHT
002730,001481: 00,2042 54142 TS MPAC +2 # AND ROUND.
002731,001482: 00,2043 12045 TCF +2
002732,001483: 00,2044 26141 ADS MPAC +1 # GUARANTEED NO OVERFLOW.
002733,001484:
002734,001485: 00,2045 37657 CAF ZERO
002735,001486: 00,2046 54142 TS MPAC +2
002736,001487: 00,2047 56140 XCH MPAC # SETTING TO ZERO SO FOLLOWING DAS WORKS.
002737,001488: 00,2050 00006 EXTEND
002738,001489: 00,2051 70121 MP MPTEMP
002739,001490: 00,2052 20141 DAS MPAC # AGAIN NO OVERFLOW.
002740,001491: 00,2053 00002 TC Q
002741,001492:
002742,001493: 00,2054 30121 VSHRRND CA MPTEMP # ENTRY TO SHIFT RIGHT AND ROUND MPAC WHEN
002743,001494: 00,2055 00006 EXTEND # MPAC CONTAINS A VECTOR COMPONENT.
002744,001495: 00,2056 70141 MP MPAC +1
002745,001496: 00,2057 54141 TS MPAC +1
002746,001497: 00,2060 56001 XCH L
002747,001498: 00,2061 12041 TCF VSHR2 # GO ADD ONE IF NECESSARY AND FINISH.
002748,001499:
002749,001500: # ROUTINE FOR SHORT SCALAR SHIFT LEFT (AND MAYBE ROUND).
002750,001501:
002751,001502: 00,2062 30021 TSSL CA SR # GET SHIFT COUNT FOR SR.
002752,001503: 00,2063 54121 +1 TS MPTEMP
002753,001504:
002754,001505: 00,2064 00006 +2 EXTEND # ENTRY HERE FROM SL FOR SCALARS.
002755,001506: 00,2065 30142 DCA MPAC +1 # SHIFTING LEFT ONE PLACE AT A TIME IS
002756,001507: 00,2066 20142 DAS MPAC +1 # FASTER THAN DOING THE WHOLE SHIFT WITH
002757,001508: 00,2067 60140 AD MPAC # MULTIPLIES ASSUMING THAT FREQUENCY OF
002758,001509: 00,2070 60140 AD MPAC # SHIFT COUNTS GOES DOWN RAPIDLY AS A
002759,001510: 00,2071 54140 TS MPAC # FUNCTION OF THEIR MAGNITUDE.
002760,001511: 00,2072 12074 TCF +2
002761,001512: 00,2073 54105 TS OVFIND # OVERFLOW. (LEAVES OVERFLOW-CORRECTED
002762,001513: # RESULT ANYWAY).
002763,001514: 00,2074 10121 CCS MPTEMP # LOOP ON DECREMENTED SHIFT COUNT.
002764,001515: 00,2075 12063 TCF TSSL +1
002765,001516:
002766,001517: 00,2076 10020 CCS CYR # SEE IF ROUND WANTED.
002767,001518: 00,2077 07116 ROUND TC ROUNDSUB # YES - ROUND AND EXIT.
002768,001519: 00,2100 16014 TCF DANZIG # SL LEAVES A ZERO IN CYR FOR NO ROUND.
002769,001520: 00,2101 16014 TCF DANZIG # NO - EXIT IMMEDIATL
002770,001521:
002771,001522: # VECTOR SHIFTING ROUTINES.
002772,001523:
002773,001524: 00,2102 37656 SHORTV CAF LOW3 # SAVE 3 BIT SHIFT COUNT - 1 WITHOUT
002774,001525: 00,2103 70020 MASK CYR # EDITING CYR.
002775,001526: 00,2104 54121 TS MPTEMP
002776,001527: 00,2105 10020 CCS CYR # SEE IF LEFT OR RIGHT SHIFT.
002777,001528: 00,2106 12126 TCF VSSL # VECTOR SHIFT LEFT.
002778,001529: 00,2107 00176 OCT176 OCT 176 # USED IN PROCESSED SHIFTS WITH - COUNT.
002779,001530:
002780,001531: 00,2110 50121 VSSR INDEX MPTEMP # (ENTRY FROM SR). PICK UP SHIFTING BIT.
002781,001532: 00,2111 37635 CAF BIT14 # MPTEMP CONTAINS THE SHIFT COUNT - 1.
002782,001533: 00,2112 54121 TS MPTEMP
002783,001534: 00,2113 02054 TC VSHRRND # SHIFT X COMPONENT.
002784,001535:
002785,001536: 00,2114 52141 DXCH MPAC # SWAP X AND Y COMPONENTS.
002786,001537: 00,2115 52144 DXCH MPAC +3
002787,001538: 00,2116 52141 DXCH MPAC
002788,001539: 00,2117 02054 TC VSHRRND # SHIFT Y COMPONENT.
002789,001540:
002790,001541: 00,2120 52141 DXCH MPAC # SWAP Y AND Z COMPONENTS.
002791,001542: 00,2121 52146 DXCH MPAC +5
002792,001543: 00,2122 52141 DXCH MPAC
002793,001544: 00,2123 02054 TC VSHRRND # SHIFT Z COMPONENT.
002794,001545:
002795,001546: 00,2124 17366 TCF VROTATEX # RESTORE COMPONENTS TO PROPER PLACES.
002796,001547:
002797,001548: # VECTOR SHIFT LEFT - DONE ONE PLACE AT A TIME.
002798,001549:
002799,001550: 00,2125 54121 -1 TS MPTEMP # SHIFTING LOOP.
002800,001551:
002801,001552: 00,2126 00006 VSSL EXTEND
002802,001553: 00,2127 30141 DCA MPAC
002803,001554: 00,2130 20141 DAS MPAC
002804,001555: 00,2131 00006 EXTEND
002805,001556: 00,2132 12134 BZF +2
002806,001557: 00,2133 07007 TC OVERFLOW
002807,001558:
002808,001559: 00,2134 00006 EXTEND
002809,001560: 00,2135 30144 DCA MPAC +3
002810,001561: 00,2136 20144 DAS MPAC +3
002811,001562: 00,2137 00006 EXTEND
002812,001563: 00,2140 12142 BZF +2
002813,001564: 00,2141 07007 TC OVERFLOW
002814,001565:
002815,001566: 00,2142 00006 EXTEND
002816,001567: 00,2143 30146 DCA MPAC +5
002817,001568: 00,2144 20146 DAS MPAC +5
002818,001569: 00,2145 00006 EXTEND
002819,001570: 00,2146 12150 BZF +2
002820,001571: 00,2147 07007 TC OVERFLOW
002821,001572:
002822,001573: 00,2150 10121 CCS MPTEMP # LOOP ON DECREMENTED SHIFT COUNTER.
002823,001574: 00,2151 12125 TCF VSSL -1
002824,001575: 00,2152 16014 TCF DANZIG # EXIT.
002825,001576:
002826,001577: # TSLC - TRIPLE SHIFT LEFT AND COUNT. SHIFTS MPAC LEFT UNTIL GREATER THAN .5 IN MAGNITUDE, LEAVING
002827,001578: # THE COMPLEMENT OF THE NUMBER OF SHIFTS REQUIRED IN X.
002828,001579:
002829,001580: 00,2153 54121 TSLC2 TS MPTEMP # START BY ZEROING SHIFT COUNT (IN A NOW).
002830,001581: 00,2154 06711 TC BRANCH # EXIT WITH NO SHIFTING IF ARGUMENT ZERO.
002831,001582: 00,2155 12157 TCF +2
002832,001583: 00,2156 12172 TCF ENDTSLC # STORES ZERO SHIFT COUNT IN THIS CASE.
002833,001584:
002834,001585: 00,2157 30140 CA MPAC # BEGIN NORMALIZATION LOOP.
002835,001586: 00,2160 12167 TCF TSLCTEST
002836,001587:
002837,001588: 00,2161 24121 TSLCLOOP INCR MPTEMP # INCREMENT SHIFT COUNTER.
002838,001589: 00,2162 00006 EXTEND
002839,001590: 00,2163 30142 DCA MPAC +1
002840,001591: 00,2164 20142 DAS MPAC +1
002841,001592: 00,2165 60140 AD MPAC
002842,001593: 00,2166 26140 ADS MPAC
002843,001594: 00,2167 60000 TSLCTEST DOUBLE # SEE IF (ANOTHER) SHIFT IS REQUIRED.
002844,001595: 00,2170 54000 OVSK
002845,001596: 00,2171 12161 TCF TSLCLOOP # YES - INCREMENT COUNT AND SHIFT AGAIN.
002846,001597:
002847,001598: 00,2172 40121 ENDTSLC CS MPTEMP
002848,001599: 00,2173 16627 TCF STORE1 # STORE SHIFT COUNT AND RETURN TO DANZIG.
002849,001600:
002850,001601: # THE FOLLOWING ROUTINES PROCESSES THE GENERAL SHIFT INSTRUCTIONS SR, SRR, SL, AND SLR.
002851,001602: # THE GIVEN ADDRESS IS DECODED AS FOLLOWS:
002852,001603:
002853,001604: # BITS 1-7 SHIFT COUNT (SUBADDRESS) LESS THAN 125 DECIMAL.
002854,001605: # BIT 8 PSEUDO SIGN BIT (DETECTS CHANGE IN SIGN IN INDEXED SHIFTS).
002855,001606: # BIT 9 0 FOR LEFT SHIFT, AND 1 FOR RIGHT SHIFT.
002856,001607: # BIT 10 1 FOR TERMINAL ROUND ON SCALAR SHIFTS, 0 OTHERWISE.
002857,001608: # BITS 11-15 0.
002858,001609:
002859,001610: # THE ABOVE ENCODING IS DONE BY THE YUL SYSTEM.
002860,001611:
002861,001612:
002862,001613:
002863,001614: 00,2174 70102 GENSHIFT MASK ADDRWD # GET SHIFT COUNT, TESTING FOR ZERO.
002864,001615: 00,2175 10000 CCS A # (ARRIVES WITH C(A) = LOW7).
002865,001616: 00,2176 12204 TCF GENSHFT2 # IF NON-ZERO, PROCEED WITH DECREMENTED CT
002866,001617:
002867,001618: 00,2177 37641 CAF BIT10 # ZERO SHIFT COUNT. NO SHIFTS NEEDED BUT
002868,001619: 00,2200 70102 MASK ADDRWD # WE MIGHT HAVE TO ROUND MPAC ON SLR AND
002869,001620: 00,2201 10000 CCS A # SRR (SCALAR ONLY).
002870,001621: 00,2202 07116 TC ROUNDSUB
002871,001622: 00,2203 16014 TCF DANZIG
002872,001623:
002873,001624: 00,2204 54121 GENSHFT2 TS MPTEMP # DECREMENTED SHIFT COUNT TO MPTEMP.
002874,001625: 00,2205 37643 CAF BIT8 # TEST MEANING OF LOW SEVEN BIT COUNT IN
002875,001626: 00,2206 00006 EXTEND # MPTEMP NOW.
002876,001627: 00,2207 70102 MP ADDRWD
002877,001628: 00,2210 76165 MASK LOW2 # JUMPS ON SHIFT DIRECTION (BIT8) AND
002878,001629: 00,2211 50000 INDEX A
002879,001630: 00,2212 12213 TCF +1 # ORIGINAL SHIFT DIRECTION (BIT 9).
002880,001631: 00,2213 12312 TCF RIGHT- # NEGATIVE SHIFT COUNT FOR SL OR SLR.
002881,001632: 00,2214 12321 TCF LEFT # SL OR SLR.
002882,001633: 00,2215 12316 TCF LEFT- # NEGATIVE SHIFT COUNT WITH SR OR SRR.
002883,001634:
002884,001635: # GENERAL SHIFT RIGHT.
002885,001636:
002886,001637: 00,2216 10147 RIGHT CCS MODE # SEE IF VECTOR OR SCALAR.
002887,001638: 00,2217 12257 TCF GENSCR
002888,001639: 00,2220 12257 TCF GENSCR
002889,001640:
002890,001641: 00,2221 30121 CA MPTEMP # SEE IF SHIFT COUNT GREATER THAN 13D.
002891,001642: 00,2222 62273 VRIGHT2 AD NEG12
002892,001643: 00,2223 00006 EXTEND
002893,001644: 00,2224 62110 BZMF VSSR # IF SO, BRANCH AND SHIFT IMMEDIATELY.
002894,001645:
002895,001646: 00,2225 67661 AD NEGONE # IF NOT, REDUCE MPTEMP BY A TOTAL OF 14,
002896,001647: 00,2226 54121 TS MPTEMP # AND DO A SHIFT RIGHT AND ROUND BY 14.
002897,001648: 00,2227 37657 CAF ZERO # THE ROUND AT THIS STAGE MAY INTRODUCE A
002898,001649: 00,2230 54001 TS L # ONE BIT ERROR IN A SHIFT RIGHT 15D.
002899,001650: 00,2231 56140 XCH MPAC
002900,001651: 00,2232 56141 XCH MPAC +1
002901,001652: 00,2233 02252 TC SETROUND # X COMPONENT NOW SHIFTED, SO MAKE UP THE
002902,001653: 00,2234 20141 DAS MPAC # ROUNDING QUANTITY (0 IN A AND 0 OR +-1
002903,001654: # IN L).
002904,001655: 00,2235 56143 XCH MPAC +3 # REPEAT THE ABOVE PROCESS FOR Y AND Z.
002905,001656: 00,2236 56144 XCH MPAC +4
002906,001657: 00,2237 02252 TC SETROUND
002907,001658: 00,2240 20144 DAS MPAC +3 # NO OVERFLOW ON THESE ADDS.
002908,001659:
002909,001660: 00,2241 56145 XCH MPAC +5
002910,001661: 00,2242 56146 XCH MPAC +6
002911,001662: 00,2243 02252 TC SETROUND
002912,001663: 00,2244 20146 DAS MPAC +5
002913,001664:
002914,001665: 00,2245 10121 CCS MPTEMP # SEE IF DONE, DOING FINAL DECREMENT.
002915,001666: 00,2246 12222 TCF VRIGHT2
002916,001667: 00,2247 13630 TCSUBTR TCF SUBTR
002917,001668: 00,2250 04604 BIASLO DEC .2974 B-1 # SQRT CONSTANT
002918,001669:
002919,001670: 00,2251 16014 TCF DANZIG
002920,001671:
002921,001672:
002922,001673:
002923,001674: 00,2252 60000 SETROUND DOUBLE # MAKES UP ROUNDING QUANTITY FROM ARRIVING
002924,001675: 00,2253 54142 TS MPAC +2 # C(A). L IS ZERO INITIALLY.
002925,001676: 00,2254 37657 CAF ZERO
002926,001677: 00,2255 56001 XCH L
002927,001678: 00,2256 00002 TC Q # RETURN AND DO THE DAS, RESETTING L TO 0.
002928,001679:
002929,001680: # PROCESS SR AND SRR FOR SCALARS.
002930,001681:
002931,001682: 00,2257 30121 GENSCR CA MPTEMP # SEE IF THE ORIGINAL SHIFT COUNT WAS LESS
002932,001683: 00,2260 62273 +1 AD NEG12 # THAN 14D.
002933,001684: 00,2261 00006 EXTEND
002934,001685: 00,2262 62302 BZMF DOSSHFT # DO THE SHIFT IMMEDIATELY IF SO.
002935,001686:
002936,001687: 00,2263 67661 +4 AD NEGONE # IF NOT, DECREMENT SHIFT COUNT BY 14D AND
002937,001688: 00,2264 54121 TS MPTEMP # SHIFT MPAC RIGHT 14 PLACES.
002938,001689: 00,2265 37657 CAF ZERO
002939,001690: 00,2266 56140 XCH MPAC
002940,001691: 00,2267 56141 XCH MPAC +1
002941,001692: 00,2270 54142 TS MPAC +2
002942,001693: 00,2271 10121 CCS MPTEMP # SEE IF FINISHED, DO FINAL DECREMENT.
002943,001694: 00,2272 02260 TC GENSCR +1
002944,001695: 00,2273 77763 NEG12 DEC -12 B-14
002945,001696: 00,2274 22650 SLOPEHI DEC .5884 # SQRT CONSTANT.
002946,001697: 00,2275 37641 CAF BIT10 # FINISHED WITH SHIFT. SEE IF ROUND
002947,001698: 00,2276 70102 MASK ADDRWD # WANTED.
002948,001699: 00,2277 10000 CCS A
002949,001700: 00,2300 07116 TC ROUNDSUB
002950,001701: 00,2301 16014 TCF DANZIG # DO SO AND/OR EXIT.
002951,001702:
002952,001703: 00,2302 50121 DOSSHFT INDEX MPTEMP # PICK UP SHIFTING BIT.
002953,001704: 00,2303 37635 CAF BIT14
002954,001705: 00,2304 54121 TS MPTEMP
002955,001706: 00,2305 37641 CAF BIT10 # SEE IF TERMINAL ROUND DESIRED.
002956,001707: 00,2306 70102 MASK ADDRWD
002957,001708: 00,2307 10000 CCS A
002958,001709: 00,2310 12012 TCF RIGHTR # YES.
002959,001710: 00,2311 12014 TCF MPACSHR # JUST SHIFT RIGHT.
002960,001711:
002961,001712: # PROCESS THE RIGHT- (SL(R) WITH A NEGATIVE COUNT), LEFT-, AND LEFT OPTIONS.
002962,001713:
002963,001714: 00,2312 40121 RIGHT- CS MPTEMP # GET ABSOLUTE VALUE - 1 OF SHIFT COUNT
002964,001715: 00,2313 62107 AD OCT176 # UNDERSTANDING THAT BIT8 (PSEUDO-SIGN)
002965,001716: 00,2314 54121 TS MPTEMP # WAS 1 INITIALLY.
002966,001717: 00,2315 12216 TCF RIGHT # DO NORMAL SHIFT RIGHT.
002967,001718:
002968,001719: 00,2316 40121 LEFT- CS MPTEMP # SAME PROLOGUE TO LEFT FOR INDEXED RIGHT
002969,001720: 00,2317 62107 AD OCT176 # SHIFTS WHOSE NET SHIFT COUNT IS NEGATIVE
002970,001721: 00,2320 54121 TS MPTEMP
002971,001722:
002972,001723: 00,2321 10147 LEFT CCS MODE # SINCE LEFT SHIFTING IS SONE ONE PLACE AT
002973,001724: 00,2322 12325 TCF GENSCL # A TIME, NO COMPARISON WITH 14 NEED BE
002974,001725: 00,2323 12325 TCF GENSCL # DONE. FOR SCALARS, SEE IF TERMINAL ROUND
002975,001726: 00,2324 12126 TCF VSSL # DESIRED. FOR VECTORS, SHIFT IMMEDIATELY.
002976,001727:
002977,001728: 00,2325 37645 GENSCL CAF BIT6 # PUT ROUNDING BIT (BIT10 OF ADDRWD) INTO
002978,001729: 00,2326 00006 EXTEND # BIT 15 OF CYR WHERE THE ROUNDING BIT OF
002979,001730: 00,2327 70102 MP ADDRWD # A SHORT SHIFT LEFT WOULD BE.
002980,001731: 00,2330 54020 TS CYR
002981,001732: 00,2331 12064 TCF TSSL +2 # DO THE SHIFT.
002982,001733:
002983,001734: # SCALAR DIVISION INSTRUCTIONS, DDV AND BDDV, ARE EXECUTED HERE. AT THIS POINT, THE DIVIDEND IS IN MPAC
002984,001735: # AND THE DIVISOR IN BUF.
002985,001736:
002986,001737: 00,2332 47652 DDV/BDDV CS ONE # INITIALIZATION.
002987,001738: 00,2333 54122 TS DVSIGN # +-1 FOR POSITIVE QUOTIENT - -0 FOR NEG.
002988,001739: 00,2334 54123 TS DVNORMCT # DIVIDEND NORMALIZATION COUNT.
002989,001740: 00,2335 54124 TS MAXDVSW # NEAR-ONE DIVIDE FLAG.
002990,001741:
002991,001742: 00,2336 10114 CCS BUF # FORCE BUF POSITIVE WITH THE MAJOR PART
002992,001743: 00,2337 12366 TCF BUF+ # NON-ZERO.
002993,001744: 00,2340 12342 TCF +2
002994,001745: 00,2341 12362 TCF BUF-
002995,001746:
002996,001747: 00,2342 56115 XCH BUF +1 # SHIFT DIVIDEND AND DIVISOR LEFT 14.
002997,001748: 00,2343 56114 XCH BUF
002998,001749: 00,2344 56141 XCH MPAC +1
002999,001750: 00,2345 56140 XCH MPAC
003000,001751: 00,2346 00006 EXTEND # CHECK FOR OVERFLOW.
003001,001752: 00,2347 12351 BZF +2
003002,001753: 00,2350 12355 TCF DVOVF
003003,001754:
003004,001755: 00,2351 10114 CCS BUF # TRY AGAIN ON FORMER MINOR PART.
003005,001756: 00,2352 12366 TCF BUF+
003006,001757: 00,2353 12355 TCF DVOVF # OVERFLOW ON ZERO DIVISOR.
003007,001758: 00,2354 12362 TCF BUF-
003008,001759:
003009,001760: 00,2355 37632 DVOVF CAF POSMAX # ON DIVISION OVERFLOW OF ANY SORT, SET
003010,001761: 00,2356 54140 TS MPAC # SET DP MPAC TO +-POSMAX.
003011,001762: 00,2357 02552 TC FINALDV +3
003012,001763: 00,2360 37652 CAF ONE # SET OVERFLOW INDICATOR AND EXIT.
003013,001764: 00,2361 17061 TCF SETOVF
003014,001765:
003015,001766: 00,2362 00006 BUF- EXTEND # IF BUF IS NEGATIVE, COMPLEMENT IT AND
003016,001767: 00,2363 40115 DCS BUF # MAINTAIN DVSIGN FOR FINAL QUOTIENT SIGN.
003017,001768: 00,2364 52115 DXCH BUF
003018,001769: 00,2365 24122 INCR DVSIGN # NOW -0.
003019,001770:
003020,001771: 00,2366 10140 BUF+ CCS MPAC # FORCE MPAC POSITIVE, CHECKING FOR ZERO
003021,001772: 00,2367 12403 TCF MPAC+ # DIVIDEND IN THE PROCESS.
003022,001773: 00,2370 12372 TCF +2
003023,001774: 00,2371 12377 TCF MPAC-
003024,001775: 00,2372 10141 CCS MPAC +1
003025,001776: 00,2373 12403 TCF MPAC+
003026,001777: 00,2374 16014 TCF DANZIG # EXIT IMMEDIATELY ON ZERO DIVIDEND.
003027,001778: 00,2375 12377 TCF MPAC-
003028,001779: 00,2376 16014 TCF DANZIG
003029,001780:
003030,001781: 00,2377 00006 MPAC- EXTEND # FORCE MPAC POSITIVE AS BUF IN BUF-.
003031,001782: 00,2400 40141 DCS MPAC
003032,001783: 00,2401 52141 DXCH MPAC
003033,001784:
003034,001785: 00,2402 24122 INCR DVSIGN # NOW +1 OR -0.
003035,001786:
003036,001787: 00,2403 40140 MPAC+ CS MPAC # CHECK FOR DIVISION OVERFLOW. IF THE
003037,001788: 00,2404 67661 AD NEGONE # MAJOR PART OF THE DIVIDEND IS LESS THAN
003038,001789: 00,2405 60114 AD BUF # THE MAJOR PART OF THE DIVISOR BY AT
003039,001790: 00,2406 10000 CCS A # LEAST TWO, WE CAN PROCEED IMMEDIATELY
003040,001791: 00,2407 12451 TCF DVNORM # WITHOUT NORMALIZATION PRODUCING A DVMAX.
003041,001792: 00,2410 60001 -1/2+2 OCT 60001 # USED IN SQRTSUB.
003042,001793:
003043,001794: 00,2411 12412 TCF +1 # IF THE ABOVE DOES NOT HOLD, FORCE SIGN
003044,001795: 00,2412 37635 CAF HALF # AGREEMENT IN NUMERATOR AND DENOMINATOR
003045,001796: 00,2413 60000 DOUBLE # TO FACILITATE OVERFLOW AND NEAR-ONE
003046,001797: 00,2414 60141 AD MPAC +1 # CHECKING.
003047,001798: 00,2415 54141 TS MPAC +1
003048,001799: 00,2416 37657 CAF ZERO
003049,001800: 00,2417 67632 AD POSMAX
003050,001801: 00,2420 26140 ADS MPAC
003051,001802:
003052,001803: 00,2421 37635 CAF HALF # SAME FOR BUF.
003053,001804: 00,2422 60000 DOUBLE
003054,001805: 00,2423 60115 AD BUF +1
003055,001806: 00,2424 54115 TS BUF +1
003056,001807: 00,2425 37657 CAF ZERO
003057,001808: 00,2426 67632 AD POSMAX
003058,001809: 00,2427 26114 ADS BUF
003059,001810:
003060,001811: 00,2430 40140 CS MPAC # CHECK MAGNITUDE OF SIGN-CORRECTED
003061,001812: 00,2431 60114 AD BUF # OPERANDS.
003062,001813: 00,2432 10000 CCS A
003063,001814: 00,2433 12451 TCF DVNORM # DIVIDE OK - WILL NOT BECOME MAXDV CASE.
003064,001815: 00,2434 00117 LBUF2 ADRES BUF2
003065,001816: 00,2435 12355 TCF DVOVF # DIVISOR NOT LESS THAN DIVIDEND - OVF.
003066,001817:
003067,001818: 00,2436 54124 TS MAXDVSW # IF THE MAJOR PARTS OF THE DIVIDEND AND
003068,001819: 00,2437 40141 CS MPAC +1 # DIVISOR ARE EQUAL, A SPECIAL APPROXIMA-
003069,001820: 00,2440 60115 AD BUF +1 # TION IS USED (PROVIDED THE DIVISION IS
003070,001821: 00,2441 00006 EXTEND # POSSIBLE, OF COURSE).
003071,001822: 00,2442 62355 BZMF DVOVF
003072,001823: 00,2443 12451 TCF DVNORM # IF NO OVERFLOW.
003073,001824:
003074,001825: 00,2444 00006 BUFNORM EXTEND # ADD -1 TO AUGMENT SHIFT COUNT AND SHIFT
003075,001826: 00,2445 24123 AUG DVNORMCT # LEFT ONE PLACE.
003076,001827: 00,2446 00006 EXTEND
003077,001828: 00,2447 30115 DCA BUF
003078,001829: 00,2450 20115 DAS BUF
003079,001830:
003080,001831: 00,2451 30114 DVNORM CA BUF # SEE IF DIVISOR NORMALIZED YET.
003081,001832: 00,2452 60000 DOUBLE
003082,001833: 00,2453 54000 OVSK
003083,001834: 00,2454 12444 TCF BUFNORM # NO - SHIFT LEFT ONE AND TRY AGAIN.
003084,001835:
003085,001836: 00,2455 52141 DXCH MPAC # CALL DIVIDEND NORMALIZATION SEQUENCE
003086,001837: 00,2456 50123 INDEX DVNORMCT # PRIOR TO DOING THE DIVIDE.
003087,001838: 00,2457 02507 TC MAXTEST
003088,001839:
003089,001840: 00,2460 54142 TS MPAC +2 # RETURNS WITH DIVISION DONE AND C(A) = 0.
003090,001841: 00,2461 16014 TCF DANZIG
003091,001842:
003092,001843: # THE FOLLOWING ARE PROLOGUES TO SHIFT THE DIVIDEND ARRIVING IN A AND L BEFORE THE DIVIDE.
003093,001844:
003094,001845: 00,2462 22021 -21D LXCH SR # SPECIAL PROLOGUE FOR UNIT WHEN THE
003095,001846: 00,2463 00006 EXTEND # LENGTH OF THE ARGUMENT WAS NOT LESS THAN
003096,001847: 00,2464 77635 MP HALF # .5. IN THIS CASE, EACH COMPONENT MUST BE
003097,001848: 00,2465 56001 XCH L # SHIFTED RIGHT ONE TO PRODUCE A HALF-UNIT
003098,001849: 00,2466 60021 AD SR # VECTOR.
003099,001850: 00,2467 56001 XCH L
003100,001851: 00,2470 12513 TCF GENDDV +1 # WITH DP DIVIDEND IN A,L.
003101,001852:
003102,001853: 00,2471 20001 DDOUBL # PROLOGUE WHICH NORMALIZES THE DIVIDEND
003103,001854: 00,2472 20001 DDOUBL # WHEN IT IS KNOWN THAT NO DIVISION
003104,001855: 00,2473 20001 DDOUBL # OVERFLOW WILL OCCUR.
003105,001856: 00,2474 20001 DDOUBL
003106,001857: 00,2475 20001 DDOUBL
003107,001858: 00,2476 20001 DDOUBL
003108,001859: 00,2477 20001 DDOUBL
003109,001860: 00,2500 20001 DDOUBL
003110,001861: 00,2501 20001 DDOUBL
003111,001862: 00,2502 20001 DDOUBL
003112,001863: 00,2503 20001 DDOUBL
003113,001864: 00,2504 20001 DDOUBL
003114,001865: 00,2505 20001 DDOUBL
003115,001866: 00,2506 52141 DXCH MPAC
003116,001867:
003117,001868: 00,2507 10124 MAXTEST CCS MAXDVSW # 0 IF MAJORS MIGHT BE =, -1 OTHERWISE.
003118,001869: 00,2510 06552 BIASHI DEC .4192 B-1 # SQRT CONSTANTS
003119,001870:
003120,001871: 00,2511 12564 TCF MAXDV # CHECK TO SEE IF THEY ARE NOW EQUAL.
003121,001872:
003122,001873: # THE FOLLOWING IS A GENERAL PURPOSE DOUBLE PRECISION DIVISION ROUTINE. IT DIVIDES MPAC BY BUF AND LEAVES
003123,001874: # THE RESULT IN MPAC. THE FOLLOWING CONDITIONS MUST BE SATISFIED:
003124,001875:
003125,001876: # 1. THE DIVISOR (BUF) MUST BE POSITIVE AND NOT LESS THAN .5.
003126,001877:
003127,001878: # 2. THE DIVIDEND (MPAC) MUST BE POSITIVE WITH THE MAJOR PART OF MPAC STRICTLY LESS THAN THAT OF BUF
003128,001879: # (A SPECIAL APPROXIMATION, MAXDV, IS USED WHEN THE MAJOR PARTS ARE EQUAL).
003129,001880:
003130,001881: # UNDERSTANDING THAT A/B = Q + S(R/B) WHERE S = 2(-14) AND Q AND R ARE QUOTIENT AND REMAINDER, RESPEC-
003131,001882: # TIVELY, THE FOLLOWING APPROXIMATION IS OBTAINED BY MULTIPLYING ABOVE AND BELOW BY C - SD AND NEGLECTING TERMS OF
003132,001883: # ORDER S-SQUARED (POSSIBLY INTRODUCING ERROR INTO THE LOW TWO BITS OF THE RESULT). SIGN AGREEMENT IS UNNECESSARY.
003133,001884:
003134,001885: # A + SB . (R - QD) A + SB
003135,001886: # ------ = Q + S(------) WHERE Q AND R ARE QUOTIENT AND REMAINDER OF ------ RESPECTIVELY.
003136,001887: # C + SD ( C ) C
003137,001888:
003138,001889: 00,2512 52141 GENDDV DXCH MPAC # WE NEED A AND B ONLY FOR FIRST DV.
003139,001890: 00,2513 00006 +1 EXTEND # (SPECIAL UNIT PROLOGUE ENTERS HERE).
003140,001891: 00,2514 10114 DV BUF # A NOW CONTAINS Q AND L, R.
003141,001892: 00,2515 52141 DXCH MPAC
003142,001893:
003143,001894: 00,2516 40140 CS MPAC # FORM DIVIDEND FOR MINOR PART OF RESULT.
003144,001895: 00,2517 00006 EXTEND
003145,001896: 00,2520 70115 MP BUF +1
003146,001897: 00,2521 60141 AD MPAC +1 # OVERFLOW AT THIS POINT IS POSITIVE SINCE
003147,001898: 00,2522 54000 OVSK # R IS POSITIVE IN EVERY CASE.
003148,001899: 00,2523 12530 TCF +5
003149,001900:
003150,001901: 00,2524 00006 EXTEND # OVERFLOW CAN BE REMOVED BY SUBTRACTING C
003151,001902: 00,2525 60114 SU BUF # (BUF) ONCE SINCE R IS ALWAYS LESS THAN C
003152,001903: 00,2526 24140 INCR MPAC # IN THIS CASE. INCR COMPENSATES SUBTRACT.
003153,001904: 00,2527 12532 TCF +DOWN # (SINCE C(A) IS STILL POSITIVE).
003154,001905:
003155,001906: 00,2530 00006 +5 EXTEND # C(A) CAN BE MADE LESS THAN C IN MAGNI-
003156,001907: 00,2531 62542 BZMF -UP # TUDE BY DIMINISHING IT BY C (SINCE C IS
003157,001908: # NOT LESS THAN .5) UNLESS C(A) = 0.
003158,001909:
003159,001910: 00,2532 00006 +DOWN EXTEND
003160,001911: 00,2533 60114 SU BUF # IF POSITIVE, REDUCE ONLY IF NECESSARY
003161,001912: 00,2534 00006 EXTEND # SINCE THE COMPENSATING INCR MIGHT CAUSE
003162,001913: 00,2535 12540 BZF +3 # OVERFLOW.
003163,001914: 00,2536 00006 EXTEND # DONT SUBTRACT UNLESS RESULT IS POSITIVE
003164,001915: 00,2537 62546 BZMF ENDMAXDV # OR ZERO.
003165,001916:
003166,001917: 00,2540 24140 +3 INCR MPAC # KEEP SUBTRACT HERE AND COMPENSATE.
003167,001918: 00,2541 12547 TCF FINALDV
003168,001919:
003169,001920: 00,2542 00006 -UP EXTEND # IF ZERO, SET MINOR PART OF RESULT TO
003170,001921: 00,2543 12552 BZF FINALDV +3 # ZERO.
003171,001922:
003172,001923: 00,2544 00006 EXTEND # IF NEGATIVE, ADD C TO A, SUBTRACTING ONE
003173,001924: 00,2545 26140 DIM MPAC # TO COMPENSATE. DIM IS OK HERE SINCE THE
003174,001925: 00,2546 60114 ENDMAXDV AD BUF # MAJOR PART NEVER GOES NEGATIVE.
003175,001926:
003176,001927: 00,2547 22007 FINALDV ZL # DO DV TO OBTAIN MINOR PART OF RESULT.
003177,001928: 00,2550 00006 EXTEND
003178,001929: 00,2551 10114 DV BUF
003179,001930: 00,2552 54141 +3 TS MPAC +1
003180,001931:
003181,001932: 00,2553 10122 CCS DVSIGN # LEAVE RESULT POSITIVE UNLESS C(DVSIGN)=
003182,001933: 00,2554 00002 TC Q # -0.
003183,001934: 00,2555 00002 TC Q
003184,001935: 00,2556 00002 TC Q
003185,001936:
003186,001937: 00,2557 00006 EXTEND
003187,001938: 00,2560 40141 DCS MPAC
003188,001939: 00,2561 52141 DXCH MPAC
003189,001940: 00,2562 37657 CAF ZERO # SO WE ALWAYS RETURN WITH C(A) = 0.
003190,001941: 00,2563 00002 TC Q
003191,001942:
003192,001943: # IF THE MAJOR PARTS OF THE DIVISOR AND DIVIDEND ARE EQUAL, BUT THE MINOR PARTS ARE SUCH THAT THE
003193,001944: # DIVIDEND IS STRICTLY LESS THAN THE DIVISOR IN MAGNITUDE, THE FOLLOWING APPROXIMATION IS USED. THE ASSUMPTIONS
003194,001945: # ARE THE SAME AS THE GENERAL ROUTINE WITH THE ADDITION THAT SIGN AGREEMENT IS NECESSARY (B, C, & D POSITIVE).
003195,001946:
003196,001947: # C + SB . (C + B - D)
003197,001948: # ------ = 37777 + S(---------)
003198,001949: # C + SD ( C )
003199,001950:
003200,001951: # THE DIVISION MAY BE PERFORMED IMMEDIATELY SINCE B IS STRICTLY LESS THAN D AND C IS NOT LESS THAN .5.
003201,001952:
003202,001953:
003203,001954:
003204,001955: 00,2564 40140 MAXDV CS MPAC # SEE IF MAXDV CASE STILL HOLDS AFTER
003205,001956: 00,2565 60114 AD BUF # NORMALIZATION.
003206,001957: 00,2566 00006 EXTEND
003207,001958: 00,2567 12571 BZF +2
003208,001959: 00,2570 12512 TCF GENDDV # MPAC NOW LESS THAN BUF - DIVIDE AS USUAL
003209,001960:
003210,001961: 00,2571 37632 +2 CAF POSMAX # SET MAJOR PART OF RESULT.
003211,001962: 00,2572 54140 TS MPAC
003212,001963:
003213,001964: 00,2573 40115 CS BUF +1 # FORM DIVIDEND OF MINOR PART OF RESULT.
003214,001965: 00,2574 60141 AD MPAC +1
003215,001966: 00,2575 12546 TCF ENDMAXDV # GO ADD C AND DO DIVIDE, ATTACHING SIGN
003216,001967: # BEFORE EXITING.
003217,001968:
003218,001969: # VECTOR DIVIDED BY SCALAR, V/SC, IS EXECUTED HERE. THE VECTOR IS NOW IN MPAC WITH SCALAR IN BUF.
003219,001970:
003220,001971: 00,2576 47652 V/SC2 CS ONE # INITIALIZE DIVIDEND NORMALIZATION COUNT
003221,001972: 00,2577 54123 TS DVNORMCT # AND DIVISION SIGN REGISTER.
003222,001973: 00,2600 54113 TS VBUF +5
003223,001974:
003224,001975: 00,2601 10114 CCS BUF # FORCE DIVISOR POSITIVE WITH MAJOR PART
003225,001976: 00,2602 12637 TCF /BUF+ # NON-ZERO (IF POSSIBLE).
003226,001977: 00,2603 12605 TCF +2
003227,001978: 00,2604 12633 TCF /BUF-
003228,001979:
003229,001980: 00,2605 56115 XCH BUF +1 # SHIFT VECTOR AND SCALAR LEFT 14.
003230,001981: 00,2606 56114 XCH BUF
003231,001982: 00,2607 56141 XCH MPAC +1
003232,001983: 00,2610 56140 XCH MPAC
003233,001984: 00,2611 00006 EXTEND # CHECK FOR OVERFLOW IN EACH CASE.
003234,001985: 00,2612 12614 BZF +2
003235,001986: 00,2613 12355 TCF DVOVF
003236,001987:
003237,001988: 00,2614 56144 XCH MPAC +4
003238,001989: 00,2615 56143 XCH MPAC +3
003239,001990: 00,2616 00006 EXTEND
003240,001991: 00,2617 12621 BZF +2
003241,001992: 00,2620 12355 TCF DVOVF
003242,001993:
003243,001994: 00,2621 56146 XCH MPAC +6
003244,001995: 00,2622 56145 XCH MPAC +5
003245,001996: 00,2623 00006 EXTEND
003246,001997: 00,2624 12626 BZF +2
003247,001998: 00,2625 12355 TCF DVOVF
003248,001999:
003249,002000: 00,2626 10114 CCS BUF
003250,002001: 00,2627 12637 TCF /BUF+
003251,002002: 00,2630 12355 TCF DVOVF # ZERO DIVISOR - OVERFLOW.
003252,002003: 00,2631 12633 TCF /BUF-
003253,002004: 00,2632 12355 TCF DVOVF
003254,002005:
003255,002006: 00,2633 00006 /BUF- EXTEND # ON NEGATIVE, COMPLEMENT BUF AND MAINTAIN
003256,002007: 00,2634 40115 DCS BUF # DVSIGN IN VBUF +5.
003257,002008: 00,2635 52115 DXCH BUF
003258,002009: 00,2636 24113 INCR VBUF +5
003259,002010:
003260,002011: 00,2637 37635 /BUF+ CAF HALF # FORCE SIGN AGREEMENT IN DIVISOR.
003261,002012: 00,2640 60000 DOUBLE
003262,002013: 00,2641 60115 AD BUF +1
003263,002014: 00,2642 54115 TS BUF +1
003264,002015: 00,2643 37657 CAF ZERO
003265,002016: 00,2644 67632 AD POSMAX
003266,002017: 00,2645 26114 ADS BUF
003267,002018:
003268,002019: 00,2646 56117 XCH BUF2 # LEAVE ABS(ORIGINAL DIVISOR) IN BUF2 FOR
003269,002020: 00,2647 30115 CA BUF +1 # OVERFLOW TESTING.
003270,002021: 00,2650 54120 TS BUF2 +1
003271,002022: 00,2651 12657 TCF /NORM # NORMALIZE DIVISOR IN BUF.
003272,002023:
003273,002024: 00,2652 00006 /NORM2 EXTEND # IF LESS THAN .5, AUGMENT DVNORMCT AND
003274,002025: 00,2653 24123 AUG DVNORMCT # DOUBLE DIVISOR.
003275,002026: 00,2654 00006 EXTEND
003276,002027: 00,2655 30115 DCA BUF
003277,002028: 00,2656 20115 DAS BUF
003278,002029:
003279,002030: 00,2657 30114 /NORM CA BUF # SEE IF DIVISOR NORMALIZED.
003280,002031: 00,2660 60000 DOUBLE
003281,002032: 00,2661 54000 OVSK
003282,002033: 00,2662 12652 TCF /NORM2 # DOUBLE AND TRY AGAIN IF NOT.
003283,002034:
003284,002035: 00,2663 02675 TC V/SCDV # DO X COMPONENT DIVIDE.
003285,002036: 00,2664 52144 DXCH MPAC +3 # SUPPLY ARGUMENTS IN USUAL SEQUENCE.
003286,002037: 00,2665 52141 DXCH MPAC
003287,002038: 00,2666 52144 DXCH MPAC +3
003288,002039:
003289,002040: 00,2667 02675 TC V/SCDV # Y COMPONENT.
003290,002041: 00,2670 52146 DXCH MPAC +5
003291,002042: 00,2671 52141 DXCH MPAC
003292,002043: 00,2672 52146 DXCH MPAC +5
003293,002044:
003294,002045: 00,2673 02675 TC V/SCDV # Z COMPONENT.
003295,002046: 00,2674 17366 TCF VROTATEX # GO RE-ARRANGE COMPONENTS BEFORE EXIT.
003296,002047:
003297,002048: # SUBROUTINE USED BY V/SC TO DIVIDE VECTOR COMPONENT IN MPAC,+1 BY THE SCALAR GIVEN IN BUF.
003298,002049:
003299,002050: 00,2675 30113 V/SCDV CA VBUF +5 # REFLECTS SIGN OF SCALAR.
003300,002051: 00,2676 54122 TS DVSIGN
003301,002052:
003302,002053: 00,2677 10140 CCS MPAC # FORCE MPAC POSITIVE, EXITING ON ZERO.
003303,002054: 00,2700 12714 TCF /MPAC+
003304,002055: 00,2701 12703 TCF +2
003305,002056: 00,2702 12710 TCF /MPAC-
003306,002057:
003307,002058: 00,2703 10141 CCS MPAC +1
003308,002059: 00,2704 12714 TCF /MPAC+
003309,002060: 00,2705 00002 TC Q
003310,002061: 00,2706 12710 TCF /MPAC-
003311,002062: 00,2707 00002 TC Q
003312,002063:
003313,002064: 00,2710 00006 /MPAC- EXTEND # USUAL COMPLEMENTING AND SETTING OF SIGN.
003314,002065: 00,2711 40141 DCS MPAC
003315,002066: 00,2712 52141 DXCH MPAC
003316,002067: 00,2713 24122 INCR DVSIGN
003317,002068:
003318,002069: 00,2714 47652 /MPAC+ CS ONE # INITIALIZE NEAR-ONE SWITCH.
003319,002070: 00,2715 54124 TS MAXDVSW
003320,002071:
003321,002072: 00,2716 40140 CS MPAC # CHECK POSSIBLE OVERFLOW.
003322,002073: 00,2717 60117 AD BUF2 # UNNORMALIZED INPUT DIVISOR.
003323,002074: 00,2720 00006 EXTEND
003324,002075: 00,2721 62725 BZMF /AGREE # CHECK FOR NEAR-ONE OR OVERFLOW.
003325,002076:
003326,002077: 00,2722 52141 DDVCALL DXCH MPAC # CALL PRE-DIVIDE NORMALIZATION.
003327,002078: 00,2723 50123 INDEX DVNORMCT
003328,002079: 00,2724 12507 TCF MAXTEST
003329,002080:
003330,002081: 00,2725 37635 /AGREE CAF HALF # FORCE SIGN AGREEMENT IN DIVIDEND
003331,002082: 00,2726 60000 DOUBLE # (ALREADY DONE FOR DIVISOR).
003332,002083: 00,2727 60141 AD MPAC +1
003333,002084: 00,2730 54141 TS MPAC +1
003334,002085: 00,2731 37657 CAF ZERO
003335,002086: 00,2732 67632 AD POSMAX
003336,002087: 00,2733 26140 ADS MPAC
003337,002088:
003338,002089: 00,2734 40140 CS MPAC # CHECK TO SEE IF OVERFLOW GONE OR IF
003339,002090: 00,2735 60117 AD BUF2 # NEAR-ONE CASE IS PRESENT.
003340,002091: 00,2736 10000 CCS A
003341,002092: 00,2737 12722 TCF DDVCALL # NOT NEAR-ONE.
003342,002093: 00,2740 32506 SLOPELO DEC .8324
003343,002094: 00,2741 12355 TCF DVOVF # NO HOPE.
003344,002095:
003345,002096: 00,2742 54124 TS MAXDVSW # SIGNAL POSSIBLE NEAR-ONE CASE.
003346,002097: 00,2743 40141 CS MPAC +1 # SEE IF DIVISION CAN BE DONE.
003347,002098: 00,2744 60120 AD BUF2 +1
003348,002099: 00,2745 00006 EXTEND
003349,002100: 00,2746 62355 BZMF DVOVF
003350,002101: 00,2747 12722 TCF DDVCALL # GOING TO MAXDV.
003351,002102:
003352,002103: # THE FOLLOWING ROUTINE EXECUTES THE UNIT INSTRUCTION, WHICH TAKES THE UNIT OF THE VECTOR IN MPAC.
003353,002104:
003354,002105: 00,2750 07501 UNIT TC MPACVBUF # SAVE THE ARGUMENT IN VBUF.
003355,002106: 00,2751 37657 CAF ZERO # MUST SENSE OVERFLOW IN FOLLOWING DOT.
003356,002107: 00,2752 56105 XCH OVFIND
003357,002108: 00,2753 54125 TS TEM1
003358,002109: 00,2754 03246 TC VSQSUB # DOT MPAC WITH ITSELF.
003359,002110: 00,2755 30125 CA TEM1
003360,002111: 00,2756 56105 XCH OVFIND
003361,002112: 00,2757 00006 EXTEND
003362,002113: 00,2760 12762 BZF +2
003363,002114: 00,2761 12355 TCF DVOVF
003364,002115: 00,2762 00006 EXTEND
003365,002116: 00,2763 30141 DCA MPAC # LEAVE THE SQUARE OF THE LENGTH OF THE
003366,002117: 00,2764 50104 INDEX FIXLOC # ARGUMENT IN LVSQUARE.
003367,002118: 00,2765 52043 DXCH LVSQUARE
003368,002119:
003369,002120: 00,2766 03272 TC SQRTSUB # GO TAKE THE NORMALIZED SQUARE ROOT.
003370,002121:
003371,002122: 00,2767 10140 CCS MPAC # CHECK FOR UNIT OVERFLOW.
003372,002123: 00,2770 12775 TCF +5 # MPAC IS NOT LESS THAN .5 UNLESS
003373,002124: 00,2771 54001 TS L
003374,002125: 00,2772 50104 INDEX FIXLOC
003375,002126: 00,2773 52045 DXCH LV
003376,002127: 00,2774 12355 TCF DVOVF # INPUT TO SQRTSUB WAS 0.
003377,002128:
003378,002129: 00,2775 43076 CS FOURTEEN # SEE IF THE INPUT WAS SO SMALL THE THE
003379,002130: 00,2776 60121 AD MPTEMP # FIRST TWO REGISTERS OF THE SQUARE WERE 0
003380,002131: 00,2777 10000 CCS A
003381,002132: 00,3000 40000 COM # IF SO, SAVE THE NEGATIVE OF THE SHIFT
003382,002133: 00,3001 13057 TCF SMALL # COUNT -15D.
003383,002134:
003384,002135: 00,3002 13011 TCF LARGE # (THIS IS USUALLY THE CASE.)
003385,002136:
003386,002137: 00,3003 43075 CS THIRTEEN # IF THE SHIFT COUNT WAS EXACTLY 14, SET
003387,002138: 00,3004 54121 TS MPTEMP # THE PRE-DIVIDE NORM COUNT TO -13D.
003388,002139:
003389,002140: 00,3005 30140 CA MPAC # SHIFT THE LENGTH RIGHT 14 BEFORE STORING
003390,002141: 00,3006 54001 SMALL2 TS L # (SMALL EXITS TO THIS POINT).
003391,002142: 00,3007 37657 CAF ZERO
003392,002143: 00,3010 13036 TCF LARGE2 # GO TO STORE LENGTH AND PROCEED.
003393,002144:
003394,002145: 00,3011 10121 LARGE CCS MPTEMP # MOST ALL CASES COME HERE.
003395,002146: 00,3012 13020 TCF LARGE3 # SEE IF NO NORMALIZATION WAS REQUIRED BY
003396,002147:
003397,002148: 00,3013 42005 CS SRDDV # SQRT, AND IF SO, SET UP FOR A SHIFT
003398,002149: 00,3014 54121 TS MPTEMP # RIGHT 1 BEFORE DIVIDING TO PRODUCE
003399,002150: 00,3015 00006 EXTEND # THE DESIRED HALF UNIT VECTOR.
003400,002151: 00,3016 30141 DCA MPAC
003401,002152: 00,3017 13036 TCF LARGE2
003402,002153:
003403,002154: 00,3020 40000 LARGE3 COM # LEAVE NEGATIVE OF SHIFT COUNT-1 FOR
003404,002155: 00,3021 54121 TS MPTEMP # PREDIVIDE LEFT SHIFT.
003405,002156:
003406,002157: 00,3022 40000 COM # PICK UP REQUIRED SHIFTING BIT TO UNNORM-
003407,002158: 00,3023 50000 INDEX A # ALIZE THE SQRT RESULT.
003408,002159: 00,3024 37635 CAF BIT14
003409,002160: 00,3025 54114 TS BUF
003410,002161: 00,3026 00006 EXTEND
003411,002162: 00,3027 70141 MP MPAC +1
003412,002163: 00,3030 56114 XCH BUF
003413,002164: 00,3031 00006 EXTEND # (UNNORMALIZE THE SQRT FOR LV).
003414,002165: 00,3032 70140 MP MPAC
003415,002166: 00,3033 56001 XCH L
003416,002167: 00,3034 60114 AD BUF
003417,002168: 00,3035 56001 XCH L
003418,002169:
003419,002170: 00,3036 50104 LARGE2 INDEX FIXLOC
003420,002171: 00,3037 52045 DXCH LV # LENGTH NOW STORED IN WORK AREA.
003421,002172:
003422,002173: 00,3040 47652 CS ONE
003423,002174: 00,3041 54124 TS MAXDVSW # NO MAXDV CASES IN UNIT.
003424,002175:
003425,002176: 00,3042 52107 DXCH VBUF # PREPARE X COMPONENT FOR DIVIDE, SETTING
003426,002177: 00,3043 52141 DXCH MPAC # LENGTH OF VECTOR AS DIVISOR IN BUF.
003427,002178: 00,3044 52115 DXCH BUF
003428,002179: 00,3045 03077 TC UNITDV
003429,002180:
003430,002181: 00,3046 52111 DXCH VBUF +2 # DO Y AND Z IN USUAL FASHION SO WE CAN
003431,002182: 00,3047 52141 DXCH MPAC # EXIT THROUGH VROTATEX.
003432,002183: 00,3050 52144 DXCH MPAC +3
003433,002184: 00,3051 03077 TC UNITDV
003434,002185:
003435,002186: 00,3052 52113 DXCH VBUF +4
003436,002187: 00,3053 52141 DXCH MPAC
003437,002188: 00,3054 52146 DXCH MPAC +5
003438,002189: 00,3055 03077 TC UNITDV
003439,002190: 00,3056 17366 TCF VROTATEX # AND EXIT.
003440,002191:
003441,002192: # IF THE LENGTH OF THE ARGUMENT VECTOR WAS LESS THAN 2(-28), EACH COMPONENT MUST BE SHIFTED LEFT AT LEAST
003442,002193: # 14 PLACES BEFORE THE DIVIDE. NOTE THAT IN THIS CASE, THE MAJOR PART OF EACH COMPONENT IS ZERO.
003443,002194:
003444,002195: 00,3057 54121 SMALL TS MPTEMP # NEGATIVE OF PRE-DIVIDE SHIFT COUNT.
003445,002196:
003446,002197: 00,3060 37657 CAF ZERO # SHIFT EACH COMPONENT LEFT 14.
003447,002198: 00,3061 56107 XCH VBUF +1
003448,002199: 00,3062 56106 XCH VBUF
003449,002200: 00,3063 56111 XCH VBUF +3
003450,002201: 00,3064 56110 XCH VBUF +2
003451,002202: 00,3065 56113 XCH VBUF +5
003452,002203: 00,3066 56112 XCH VBUF +4
003453,002204:
003454,002205: 00,3067 40121 CS MPTEMP
003455,002206: 00,3070 50000 INDEX A
003456,002207: 00,3071 37635 CAF BIT14
003457,002208: 00,3072 00006 EXTEND
003458,002209: 00,3073 70140 MP MPAC
003459,002210: 00,3074 13006 TCF SMALL2
003460,002211:
003461,002212: 00,3075 00015 THIRTEEN DEC 13 B-14
003462,002213: 00,3076 00016 FOURTEEN DEC 14 B-14
003463,002214:
003464,002215: # THE FOLLOWING ROUTINE SETS UP THE CALL TO THE DIVIDE ROUTINES.
003465,002216:
003466,002217: 00,3077 10140 UNITDV CCS MPAC # FORCE MPAC POSITIVE IF POSSIBLE, SETTING
003467,002218: 00,3100 13116 TCF UMPAC+ # DVSIGN ACCORDING TO THE SIGN OF MPAC
003468,002219: 00,3101 13103 TCF +2 # SINCE THE DIVISOR IS ALWAYS POSITIVE
003469,002220: 00,3102 13110 TCF UMPAC- # HERE.
003470,002221:
003471,002222: 00,3103 10141 CCS MPAC +1
003472,002223: 00,3104 13116 TCF UMPAC+
003473,002224: 00,3105 00002 TC Q # EXIT IMMEDIATELY ON ZERO.
003474,002225: 00,3106 13110 TCF UMPAC-
003475,002226: 00,3107 00002 TC Q
003476,002227:
003477,002228: 00,3110 47657 UMPAC- CS ZERO # IF NEGATIVE, SET -0 IN DVSIGN FOR FINAL
003478,002229: 00,3111 54122 TS DVSIGN # COMPLEMENT.
003479,002230: 00,3112 00006 EXTEND
003480,002231: 00,3113 40141 DCS MPAC # PICK UP ABSOLUTE VALUE OF ARG AND JUMP.
003481,002232: 00,3114 50121 INDEX MPTEMP
003482,002233: 00,3115 12506 TCF MAXTEST -1
003483,002234:
003484,002235: 00,3116 54122 UMPAC+ TS DVSIGN # SET DVSIGN FOR POSITIVE QUOTIENT.
003485,002236: 00,3117 52141 DXCH MPAC
003486,002237: 00,3120 50121 INDEX MPTEMP
003487,002238: 00,3121 12506 TCF MAXTEST -1
003488,002239:
003489,002240: # MISCELLANEOUS UNARY OPERATIONS.
003490,002241:
003491,002242: 00,3122 03227 DSQ TC DSQSUB # SQUARE THE DP CONTENTS OF MPAC.
003492,002243: 00,3123 16014 TCF DANZIG
003493,002244:
003494,002245: 00,3124 10147 ABVALABS CCS MODE # ABVAL OR ABS INSTRUCTION.
003495,002246: 00,3125 13154 TCF ABS # DO ABS ON SCALAR.
003496,002247: 00,3126 13154 TCF ABS
003497,002248:
003498,002249: 00,3127 03246 ABVAL TC VSQSUB # DOT MPAC WITH ITSELF.
003499,002250: 00,3130 22147 LXCH MODE # MODE IS NOW DP (L ZERO AFTER DAS).
003500,002251:
003501,002252: 00,3131 00006 EXTEND # STORE SQUARE OF LENGTH IN WORK AREA.
003502,002253: 00,3132 30141 DCA MPAC
003503,002254: 00,3133 50104 INDEX FIXLOC
003504,002255: 00,3134 52043 DXCH LVSQUARE
003505,002256:
003506,002257: 00,3135 03272 SQRT TC SQRTSUB # TAKE THE SQUARE ROOT OF MPAC.
003507,002258: 00,3136 10121 CCS MPTEMP # RETURNED NORMALIZED SQUARE ROOT. SEE IF
003508,002259: 00,3137 13141 TCF +2 # ANY UN-NORMALIZATION REQUIRED AND EXIT
003509,002260: 00,3140 16014 TCF DANZIG # IF NOT.
003510,002261:
003511,002262: 00,3141 62273 AD NEG12 # A RIGHT SHIFT OF MORE THAN 13 COULD BE
003512,002263: 00,3142 00006 EXTEND # REQUIRED IF INPUT WAS ZERO IN MPAC,+1.
003513,002264: 00,3143 63147 BZMF SQRTSHFT # GOES HERE IN MOST CASES.
003514,002265: 00,3144 22007 ZL # IF A LONG SHIFT IS REQUIRED, GO TO
003515,002266: 00,3145 22102 LXCH ADDRWD # GENERAL RIGHT SHIFT ROUTINES.
003516,002267: 00,3146 12263 TCF GENSCR +4 # ADDRWD WAS ZERO TO PREVENT ROUND.
003517,002268:
003518,002269: 00,3147 50121 SQRTSHFT INDEX MPTEMP # SELECT SHIFTING BIT AND EXIT THROUGH
003519,002270: 00,3150 37634 CAF BIT15 # SHIFT ROUTINES.
003520,002271: 00,3151 54121 TS MPTEMP
003521,002272: 00,3152 37657 CAF ZERO # TO ZERO MPAC +2 IN THE PROCESS.
003522,002273: 00,3153 12017 TCF MPACSHR +3
003523,002274:
003524,002275: 00,3154 06711 ABS TC BRANCH # TEST SIGN OF MPAC AND COMPLEMENT IF
003525,002276: 00,3155 16014 TCF DANZIG
003526,002277: 00,3156 16014 TCF DANZIG
003527,002278: 00,3157 17611 TCF COMP
003528,002279:
003529,002280: 00,3160 47650 VDEF CS FOUR # VECTOR DEFINE - ESSENTIALLY TREATS
003530,002281: 00,3161 26152 ADS PUSHLOC # SCALAR IN MPAC AS X COMPONENT, PUSHES UP
003531,002282: 00,3162 00006 EXTEND # FOR Y AND THEN AGAIN FOR Z.
003532,002283: 00,3163 50000 INDEX A
003533,002284: 00,3164 30003 DCA 2
003534,002285: 00,3165 52144 DXCH MPAC +3
003535,002286: 00,3166 00006 EXTEND
003536,002287: 00,3167 50152 INDEX PUSHLOC
003537,002288: 00,3170 30001 DCA 0
003538,002289: 00,3171 52146 DXCH MPAC +5
003539,002290: 00,3172 47652 CS ONE # MODE IS NOW VECTOR.
003540,002291: 00,3173 16013 TCF NEWMODE
003541,002292:
003542,002293: 00,3174 03246 VSQ TC VSQSUB # DOT MPAC WITH ITSELF.
003543,002294: 00,3175 37657 CAF ZERO
003544,002295: 00,3176 16013 TCF NEWMODE # MODE IS NOW DP.
003545,002296:
003546,002297: 00,3177 00006 PUSH EXTEND # PUSH DOWN MPAC LEAVING IT LOADED.
003547,002298: 00,3200 30141 DCA MPAC
003548,002299: 00,3201 50152 INDEX PUSHLOC # PUSH DOWN FIRST TWO REGISTERS IN EACH
003549,002300: 00,3202 52001 DXCH 0
003550,002301:
003551,002302: 00,3203 50147 INDEX MODE # INCREMENT PUSHDOWN POINTER.
003552,002303: 00,3204 36164 CAF NO.WDS
003553,002304: 00,3205 26152 ADS PUSHLOC
003554,002305:
003555,002306: 00,3206 10147 CCS MODE
003556,002307: 00,3207 13222 TCF TPUSH # PUSH DOWN MPAC +2.
003557,002308: 00,3210 16014 TCF DANZIG # DONE FOR DP.
003558,002309:
003559,002310: 00,3211 00006 EXTEND # ON VECTOR, PUSH DOWN Y AND Z COMPONENTS.
003560,002311: 00,3212 30144 DCA MPAC +3
003561,002312: 00,3213 50152 INDEX PUSHLOC
003562,002313: 00,3214 51775 DXCH 0 -4
003563,002314: 00,3215 00006 EXTEND
003564,002315: 00,3216 30146 DCA MPAC +5
003565,002316: 00,3217 50152 INDEX PUSHLOC
003566,002317: 00,3220 51777 DXCH 0 -2
003567,002318: 00,3221 16014 TCF DANZIG
003568,002319:
003569,002320: 00,3222 30142 TPUSH CA MPAC +2
003570,002321: 00,3223 16560 TCF ENDTPUSH +2
003571,002322:
003572,002323: 00,3224 50104 RVQ INDEX FIXLOC # RVQ - RETURN IVA QPRET.
003573,002324: 00,3225 30052 CA QPRET
003574,002325: 00,3226 16652 TCF GOTO +1
003575,002326:
003576,002327: # THE FOLLOWING SUBROUTINES ARE USED IN SQUARING MPAC, IN BOTH THE SCALAR AND VECTOR SENSE. THEY ARE
003577,002328: # SPECIAL CASES OF DMPSUB AND DOTSUB, PUT IN TO SAVE SOME TIME.
003578,002329:
003579,002330: 00,3227 30141 DSQSUB CA MPAC +1 # SQUARES THE SCALAR CONTENTS OF MPAC.
003580,002331: 00,3230 00006 EXTEND
003581,002332: 00,3231 70000 SQUARE
003582,002333: 00,3232 54142 TS MPAC +2
003583,002334: 00,3233 37657 CAF ZERO # FORM 2(CROSS TERM).
003584,002335: 00,3234 56141 XCH MPAC +1
003585,002336: 00,3235 00006 EXTEND
003586,002337: 00,3236 70140 MP MPAC
003587,002338: 00,3237 20001 DDOUBL # AND MAYBE OVERFLOW.
003588,002339: 00,3240 20142 DAS MPAC +1 # AND SET A TO NET OVERFLOW.
003589,002340: 00,3241 56140 XCH MPAC
003590,002341: 00,3242 00006 EXTEND
003591,002342: 00,3243 70000 SQUARE
003592,002343: 00,3244 20141 DAS MPAC
003593,002344: 00,3245 00002 TC Q
003594,002345:
003595,002346: 00,3246 00006 VSQSUB EXTEND # DOTS THE VECTOR IN MPAC WITH ITSELF.
003596,002347: 00,3247 22123 QXCH DOTRET
003597,002348: 00,3250 03227 TC DSQSUB # SQUARE THE X COMPONENT.
003598,002349: 00,3251 52144 DXCH MPAC +3
003599,002350: 00,3252 52141 DXCH MPAC
003600,002351: 00,3253 52115 DXCH BUF # SO WE CAN END IN DOTSUB.
003601,002352: 00,3254 30142 CA MPAC +2
003602,002353: 00,3255 54116 TS BUF +2
003603,002354:
003604,002355: 00,3256 03227 TC DSQSUB # SQUARE Y COMPONENT.
003605,002356: 00,3257 52142 DXCH MPAC +1
003606,002357: 00,3260 20116 DAS BUF +1
003607,002358: 00,3261 60140 AD MPAC
003608,002359: 00,3262 60114 AD BUF
003609,002360: 00,3263 54114 TS BUF
003610,002361: 00,3264 13266 TCF +2
003611,002362: 00,3265 54105 TS OVFIND # IF OVERFLOW.
003612,002363:
003613,002364: 00,3266 52146 DXCH MPAC +5
003614,002365: 00,3267 52141 DXCH MPAC
003615,002366: 00,3270 03227 TC DSQSUB # SQUARE Z COMPONENT.
003616,002367: 00,3271 17165 TCF ENDDOT # END AS IN DOTSUB.
003617,002368:
003618,002369: # DOUBLE PRECISION SQUARE ROOT ROUTINE. TAKE THE SQUARE ROOT OF THE TRIPLE PRECISION (MPAC +2 USED ONLY
003619,002370: # IN NORMALIZATION) CONTENTS OF MPAC AND LEAVE THE NORMALIZED RESULT IN MPAC (C(MPAC) GREATER THAN OR EQUAL TO
003620,002371: # .5). THE RIGHT SHIFT COUNT (TO UNNORMALIZE) IS LEFT IN MPTEMP.
003621,002372:
003622,002373:
003623,002374:
003624,002375: 00,3272 37657 SQRTSUB CAF ZERO # START BY ZEROING RIGHT SHIFT COUNT.
003625,002376: 00,3273 54121 TS MPTEMP
003626,002377:
003627,002378: 00,3274 10140 CCS MPAC # CHECK FOR POSITIVE ARGUMENT, SHIFTING
003628,002379: 00,3275 13333 TCF SMPAC+ # FIRST SIGNIFICANT MPAC REGISTER INTO
003629,002380: 00,3276 13300 TCF +2 # MPAC ITSELF.
003630,002381: 00,3277 13322 TCF SQRTNEG # SEE IF MAG OF ARGUMENT LESS THAN 10(-4).
003631,002382:
003632,002383: 00,3300 56142 XCH MPAC +2 # MPAC IS ZERO - SHIFT LEFT 14.
003633,002384: 00,3301 56141 XCH MPAC +1
003634,002385: 00,3302 54140 TS MPAC
003635,002386: 00,3303 37656 CAF SEVEN # AUGMENT RIGHT SHIFT COUNTER.
003636,002387: 00,3304 54121 TS MPTEMP
003637,002388:
003638,002389: 00,3305 10140 CCS MPAC # SEE IF MPAC NOW PNZ.
003639,002390: 00,3306 13333 TCF SMPAC+
003640,002391: 00,3307 13311 TCF +2
003641,002392: 00,3310 13325 TCF ZEROANS # NEGATIVE BUT LESS THAN 10(-4) IN MAG.
003642,002393:
003643,002394: 00,3311 56141 XCH MPAC +1 # ZERO - SHIFT LEFT 14 AGAIN.
003644,002395: 00,3312 54140 TS MPAC
003645,002396: 00,3313 37656 CAF SEVEN # AUGMENT RIGHT SHIFT COUNTER.
003646,002397: 00,3314 26121 ADS MPTEMP
003647,002398:
003648,002399: 00,3315 10140 CCS MPAC
003649,002400: 00,3316 13333 TCF SMPAC+
003650,002401: 00,3317 00002 TC Q # SQRT(0) = 0.
003651,002402: 00,3320 13325 TCF ZEROANS
003652,002403: 00,3321 00002 TC Q
003653,002404:
003654,002405:
003655,002406:
003656,002407: 00,3322 10000 SQRTNEG CCS A # ARGUMENT IS NEGATIVE, BUT SEE IF SIGN-
003657,002408: 00,3323 13331 TCF SQRTABRT # CORRECTED ARGUMENT IS LESS THAN 10(-4)
003658,002409:
003659,002410: 00,3324 10141 CCS MPAC +1 # IN MAGNITUDE. IF SO, CALL ANSWER ZERO.
003660,002411: 00,3325 37657 ZEROANS CAF ZERO # FORCE ANSWER TO ZERO HERE.
003661,002412: 00,3326 13401 TCF FIXROOT
003662,002413: 00,3327 13331 TCF SQRTABRT
003663,002414: 00,3330 13401 TCF FIXROOT
003664,002415:
003665,002416: 00,3331 05677 SQRTABRT TC ABORT
003666,002417: 00,3332 01302 OCT 1302
003667,002418:
003668,002419: 00,3333 62410 SMPAC+ AD -1/2+2 # SEE IF ARGUMENT GREATER THAN OR EQUAL TO
003669,002420: 00,3334 00006 EXTEND # .5.
003670,002421: 00,3335 63404 BZMF SRTEST # IF SO, SEE IF LESS THAN .25.
003671,002422:
003672,002423: 00,3336 52141 DXCH MPAC # WE WILL TAKE THE SQUARE ROOT OF MPAC/2.
003673,002424: 00,3337 22021 LXCH SR # SHIFT RIGHT 1 AND GO TO THE SQRT ROUTINE
003674,002425: 00,3340 00006 EXTEND
003675,002426: 00,3341 77635 MP HALF
003676,002427: 00,3342 52141 DXCH MPAC
003677,002428: 00,3343 56021 XCH SR
003678,002429: 00,3344 26141 ADS MPAC +1 # GUARANTEED NO OVERFLOW.
003679,002430:
003680,002431: 00,3345 32274 ARGHI CAF SLOPEHI # ARGUMENT BETWEEN .25 AND .5. GET A
003681,002432: 00,3346 00006 EXTEND # LINEAR APPROXIMATION FOR THIS RANGE.
003682,002433: 00,3347 70140 MP MPAC
003683,002434: 00,3350 62510 AD BIASHI # X0/2 = (MPAC/2)(SLOPEHI) + BIASHI/2.
003684,002435:
003685,002436: 00,3351 54114 +4 TS BUF # X0/2 (ARGLO ENTERS HERE).
003686,002437: 00,3352 30140 CA MPAC # SINGLE-PRECISION THROUGHOUT.
003687,002438: 00,3353 22007 ZL
003688,002439: 00,3354 00006 EXTEND
003689,002440: 00,3355 10114 DV BUF # (MPAC/2)/(X0/2)
003690,002441: 00,3356 00006 EXTEND
003691,002442: 00,3357 77635 MP HALF
003692,002443: 00,3360 26114 ADS BUF # X1 = X0/2 + .5(MPAC/2)/(X0/2).
003693,002444:
003694,002445: 00,3361 00006 EXTEND
003695,002446: 00,3362 77635 MP HALF # FORM UP X1/2.
003696,002447: 00,3363 52141 DXCH MPAC # SAVE AND BRING OUT ARGUMENT.
003697,002448: 00,3364 00006 EXTEND # TAKE DP QUOTIENT WITH X1.
003698,002449: 00,3365 10114 DV BUF
003699,002450: 00,3366 54115 TS BUF +1 # SAVE MAJOR PART OF QUOTIENT.
003700,002451: 00,3367 37657 CAF ZERO # FORM MINOR PART OF QUOTIENT USING
003701,002452: 00,3370 56001 XCH L # (REMAINDER,0).
003702,002453: 00,3371 00006 EXTEND
003703,002454: 00,3372 10114 DV BUF
003704,002455: 00,3373 54001 TS L # IN PREPARATION FOR DAS.
003705,002456: 00,3374 30115 CA BUF +1
003706,002457: 00,3375 20141 DAS MPAC # X2 = X1/2 + (MPAC/2)X1
003707,002458:
003708,002459: 00,3376 00006 EXTEND # OVERFLOWS IF ARG. NEAR POSMAX.
003709,002460: 00,3377 13403 BZF TCQBNK00
003710,002461: 00,3400 37632 CAF POSMAX
003711,002462: 00,3401 54140 FIXROOT TS MPAC
003712,002463: 00,3402 54141 TS MPAC +1
003713,002464: 00,3403 00002 TCQBNK00 TC Q # RETURN TO CALLER TO UNNORMALIZE, ETC.
003714,002465:
003715,002466: 00,3404 67636 SRTEST AD QUARTER # ARGUMENT WAS LESS THAN .5, SEE IF LESS
003716,002467: 00,3405 00006 EXTEND # THAN .25.
003717,002468: 00,3406 63430 BZMF SQRTNORM # IF SO, BEGIN NORMALIZATION.
003718,002469:
003719,002470: 00,3407 52141 DXCH MPAC # IF BETWEEN .5 AND .25, SHIFT RIGHT 1 AND
003720,002471: 00,3410 22021 LXCH SR # START AT ARGLO.
003721,002472: 00,3411 00006 EXTEND
003722,002473: 00,3412 77635 MP HALF
003723,002474: 00,3413 52141 DXCH MPAC
003724,002475: 00,3414 56021 XCH SR
003725,002476: 00,3415 26141 ADS MPAC +1 # NO OVERFLOW.
003726,002477:
003727,002478: 00,3416 32740 ARGLO CAF SLOPELO # (NORMALIZED) ARGUMENT BETWEEN .125 AND
003728,002479: 00,3417 00006 EXTEND # .25
003729,002480: 00,3420 70140 MP MPAC
003730,002481: 00,3421 62250 AD BIASLO
003731,002482: 00,3422 13351 TCF ARGHI +4 # BEGIN SQUARE ROOT.
003732,002483:
003733,002484: 00,3423 00006 SQRTNM2 EXTEND # SHIFT LEFT 2 AND INCREMENT RIGHT SHIFT
003734,002485: 00,3424 30142 DCA MPAC +1 # COUNT (FOR TERMINAL UNNORMALIZATION).
003735,002486: 00,3425 20142 DAS MPAC +1
003736,002487: 00,3426 60140 AD MPAC
003737,002488: 00,3427 26140 ADS MPAC # (NO OVERFLOW).
003738,002489:
003739,002490: 00,3430 24121 SQRTNORM INCR MPTEMP # FIRST TIME THROUGH, JUST SHIFT LEFT 1
003740,002491: 00,3431 00006 EXTEND # (PUTS IN EFFECTIVE RIGHT SHIFT SINCE
003741,002492: 00,3432 30142 DCA MPAC +1 # WE WANT MPAC/2).
003742,002493: 00,3433 20142 DAS MPAC +1
003743,002494: 00,3434 60140 AD MPAC
003744,002495: 00,3435 26140 ADS MPAC # (AGAIN NO OVERFLOW).
003745,002496: 00,3436 60000 DOUBLE
003746,002497: 00,3437 54022 TS CYL
003747,002498:
003748,002499: 00,3440 10022 NORMTEST CCS CYL # SEE IF ARGUMENT NOW NORMALIZED AT
003749,002500: 00,3441 10022 CCS CYL # GREATER THAN .125.
003750,002501: 00,3442 13423 TCF SQRTNM2 # NO - SHIFT LEFT 2 MORE AND TRY AGAIN.
003751,002502: 00,3443 13345 TCF ARGHI # YES - NOW BETWEEN .5 AND .25.
003752,002503: 00,3444 13416 TCF ARGLO # ARGUMENT NOW BETWEEN .25 AND .125.
003753,002504:
003754,002505: # TRIGONOMETRIC FUNCTION PACKAGE.
003755,002506:
003756,002507: # THE FOLLOWING TRIGONOMETRIC FUNCTIONS ARE AVAILABLE AS INTERPRETIVE OPERATIONS:
003757,002508:
003758,002509: # 1. SIN COMPUTES (1/2)SINE(2 PI MPAC).
003759,002510: # 2. COS COMPUTES (1/2)COSINE(2 PI MPAC).
003760,002511:
003761,002512: # 3. ASIN COMPUTES (1/2PI)ARCSINE(2 MPAC).
003762,002513: # 4. ACOS COMPUTES (1/2PI)ARCCOSINE(2 MPAC).
003763,002514:
003764,002515: # SIN-ASIN AND COS-ACOS ARE MUTUALLY INVERSE, IE SIN(ASIN(X)) = X.
003765,002516:
003766,002517: 00,3445 06711 COSINE TC BRANCH # FINDS COSINE USING THE IDENTITY
003767,002518: 00,3446 13451 TCF +3 # COS(X) = SIN(PI/2 - ABS(X)).
003768,002519: 00,3447 13454 TCF PRESINE
003769,002520: 00,3450 13454 TCF PRESINE
003770,002521:
003771,002522: 00,3451 00006 +3 EXTEND
003772,002523: 00,3452 40141 DCS MPAC
003773,002524: 00,3453 52141 DXCH MPAC
003774,002525:
003775,002526: 00,3454 37636 PRESINE CAF QUARTER # PI/2 SCALED.
003776,002527: 00,3455 26140 ADS MPAC
003777,002528:
003778,002529:
003779,002530:
003780,002531: 00,3456 52141 SINE DXCH MPAC # DOUBLE ARGUMENT.
003781,002532: 00,3457 20001 DDOUBL
003782,002533: 00,3460 54000 OVSK # SEE IF OVERFLOW PRESENT.
003783,002534: 00,3461 13464 TCF +3 # IF NOT, ARGUMENT OK AS IS.
003784,002535:
003785,002536: 00,3462 00006 EXTEND # IF SO, WE LOST (OR GAINED) PI, SO
003786,002537: 00,3463 40001 DCOM # COMPLEMENT MPAC USING THE IDENTITY
003787,002538: # SIN(X-(+)PI) = SIN(-X).
003788,002539: 00,3464 52141 +3 DXCH MPAC
003789,002540: 00,3465 30140 CA MPAC # SEE IF ARGUMENT GREATER THAN .5 IN
003790,002541: 00,3466 60000 DOUBLE # MAGNITUDE. IF SO, REDUCE IT TO LESS THAN
003791,002542: 00,3467 54001 TS L # .5 (+-PI/2 SCALED) AS FOLLOWS:
003792,002543: 00,3470 13501 TCF SN1
003793,002544:
003794,002545: 00,3471 50000 INDEX A # IF POSITIVE, FORM PI - X, IF NEGATIVE
003795,002546: 00,3472 37634 CAF NEG1/2 +1 # USE -PI - X.
003796,002547: 00,3473 60000 DOUBLE
003797,002548: 00,3474 00006 EXTEND
003798,002549: 00,3475 60140 SU MPAC # GUARANTEED NO OVERFLOW.
003799,002550: 00,3476 54140 TS MPAC
003800,002551: 00,3477 40141 CS MPAC +1
003801,002552: 00,3500 54141 TS MPAC +1
003802,002553:
003803,002554: 00,3501 00006 SN1 EXTEND # SET UP TO EVALUATE HASTINGS POLYNOMIAL
003804,002555: 00,3502 30141 DCA MPAC
003805,002556: 00,3503 52120 DXCH BUF2
003806,002557: 00,3504 03227 TC DSQSUB # SQUARE MPAC.
003807,002558:
003808,002559: 00,3505 07175 TC POLY # EVALUATE FOURTH ORDER POLYNOMIAL.
003809,002560: 00,3506 00003 DEC 3 B-14
003810,002561: 00,3507 14441 37325 2DEC +.3926990796
003811,002562:
003812,002563: 00,3511 53250 60764 2DEC -.6459637111
003813,002564:
003814,002565: 00,3513 12146 21276 2DEC +.318758717
003815,002566:
003816,002567: 00,3515 75466 71471 2DEC -.074780249
003817,002568:
003818,002569: 00,3517 00236 32757 2DEC +.009694988
003819,002570:
003820,002571: 00,3521 32434 CAF LBUF2 # MULTIPLY BY ARGUMENT AND SHIFT LEFT 2.
003821,002572: 00,3522 07066 TC DMPSUB -1
003822,002573:
003823,002574: 00,3523 00006 EXTEND
003824,002575: 00,3524 30142 DCA MPAC +1
003825,002576: 00,3525 20142 DAS MPAC +1
003826,002577: 00,3526 60140 AD MPAC
003827,002578: 00,3527 26140 ADS MPAC # NEITHER SHIFT OVERFLOWS.
003828,002579: 00,3530 00006 EXTEND
003829,002580: 00,3531 30142 DCA MPAC +1
003830,002581: 00,3532 20142 DAS MPAC +1
003831,002582: 00,3533 60140 AD MPAC
003832,002583: 00,3534 26140 ADS MPAC
003833,002584: 00,3535 16014 TCF DANZIG
003834,002585:
003835,002586: # ARCSIN/ARCCOS ROUTINE.
003836,002587:
003837,002588: 00,3536 33557 ARCSIN CAF LASINEX # COMPUTE ARCSIN BY USING THE IDENTITY
003838,002589: 00,3537 13541 TCF +2 # ARCSIN(X) = PI/2 - ARCCOS(X).
003839,002590:
003840,002591: 00,3540 33641 ARCCOS CAF LDANZIG # (EXITS IMMEDIATELY).
003841,002592: 00,3541 54122 TS ESCAPE
003842,002593: 00,3542 06711 TC BRANCH # TEST SIGN OF INPUT.
003843,002594: 00,3543 13553 TCF ACOSST # START IMMEDIATELY IF POSITIVE.
003844,002595: 00,3544 13655 TCF ACOSZERO # ARCCOS(0) = PI/2 = .25.
003845,002596: 00,3545 00006 EXTEND # IF NEGATIVE, USE THE IDENTITY
003846,002597: 00,3546 40141 DCS MPAC # ARCCOS(X) = PI - ARCCOS(-X), FORCING
003847,002598: 00,3547 52141 DXCH MPAC # ARGUMENT POSITIVE.
003848,002599: 00,3550 32247 CAF TCSUBTR # SET EXIT TO DO ABOVE BEFORE
003849,002600: 00,3551 56122 XCH ESCAPE # ARCSIN/ARCCOS CONSIDERATIONS.
003850,002601: 00,3552 54123 TS ESCAPE2
003851,002602:
003852,002603: 00,3553 47635 ACOSST CS HALF # TEST MAGNITUDE OF INPUT.
003853,002604: 00,3554 60140 AD MPAC
003854,002605: 00,3555 10000 CCS A
003855,002606: 00,3556 13647 TCF ACOSOVF # THIS IS PROBABLY AN OVERFLOW CASE.
003856,002607:
003857,002608: 00,3557 13635 LASINEX TCF ASINEX
003858,002609:
003859,002610: 00,3560 13570 TCF ACOSST2 # NO OVERFLOW - PROCEED.
003860,002611:
003861,002612: 00,3561 10141 CCS MPAC +1 # IF MAJOR PART IS .5, CALL ANSWER 0
003862,002613: 00,3562 37657 CAF ZERO # UNLESS MINOR PART NEGATIVE.
003863,002614: 00,3563 13565 TCF ACOS=0
003864,002615:
003865,002616: 00,3564 13570 TCF ACOSST2
003866,002617:
003867,002618: 00,3565 54141 ACOS=0 TS MPAC +1
003868,002619: 00,3566 54140 TS MPAC
003869,002620: 00,3567 00122 TC ESCAPE
003870,002621:
003871,002622: 00,3570 00006 ACOSST2 EXTEND # NOW THAT ARGUMENT IS IN PROPER RANGE,
003872,002623: 00,3571 40141 DCS MPAC # BEGIN COMPUTATION. USE HASTINGS
003873,002624: 00,3572 67635 AD HALF # APPROXIMATION ARCCOS(X) = SQRT(1-X)P(X)
003874,002625: 00,3573 52141 DXCH MPAC # IN A SCALED VERSION WHERE P(X) IS A
003875,002626: 00,3574 52120 DXCH BUF2 # SEVENTH ORDER POLYNOMIAL.
003876,002627:
003877,002628: 00,3575 03272 TC SQRTSUB # RETURNS WITH NORMALIZED SQUARE ROOT.
003878,002629:
003879,002630: 00,3576 10121 CCS MPTEMP # SEE IF UN-NORMALIZATION REQUIRED.
003880,002631: 00,3577 13642 TCF ACOSSHR # IF SO.
003881,002632:
003882,002633: 00,3600 52141 ACOS3 DXCH MPAC # SET UP FOR POLYNOMIAL EVALUATION.
003883,002634: 00,3601 52120 DXCH BUF2
003884,002635: 00,3602 52141 DXCH MPAC
003885,002636:
003886,002637: 00,3603 07175 TC POLY
003887,002638: 00,3604 00006 DEC 6 B-14
003888,002639: 00,3605 13240 23630 2DEC +.353553385 # COEFFICIENTS ARE C 2(+I)/PISQRT(2) WHERE
003889,002640:
003890,002641: 00,3607 74721 47775 2DEC* -.0483017006 B+1* # I
003891,002642:
003892,002643: 00,3611 02440 20237 2DEC* +.0200273085 B+2* # WHERE C STANDS FOR ORIGINAL COEFFS.
003893,002644:
003894,002645: 00,3613 75067 70742 2DEC* -.0112931863 B+3*
003895,002646:
003896,002647: 00,3615 03436 26756 2DEC* +.00695311612 B+4*
003897,002648:
003898,002649: 00,3617 74037 57640 2DEC* -.00384617957 B+5*
003899,002650:
003900,002651: 00,3621 03046 07143 2DEC* +.001501297736 B+6*
003901,002652:
003902,002653: 00,3623 76654 42244 2DEC* -.000284160334 B+7*
003903,002654:
003904,002655: 00,3625 32434 CAF LBUF2 # DO FINAL MULTIPLY AND GO TO ANY
003905,002656: 00,3626 07066 TC DMPSUB -1 # EPILOGUE SEQUENCES.
003906,002657: 00,3627 00122 TC ESCAPE
003907,002658:
003908,002659: 00,3630 00006 SUBTR EXTEND # EPILOGUE FOR NEGATIVE INPUTS TO ARCCOS.
003909,002660: 00,3631 40141 DCS MPAC
003910,002661: 00,3632 67635 AD HALF # FORMS PI - ARCCOS(-X) = ARCCOS(X).
003911,002662: 00,3633 52141 DXCH MPAC
003912,002663: 00,3634 00123 TC ESCAPE2 # GO TO POSSIBLE ARCSIN EPILOGUE.
003913,002664:
003914,002665: 00,3635 00006 ASINEX EXTEND
003915,002666: 00,3636 40141 DCS MPAC # ARCSIN EPILOGUE - GET ARCSIN(X)
003916,002667: 00,3637 67636 AD QUARTER # = PI/2 - ARCCOS(X).
003917,002668: 00,3640 52141 DXCH MPAC
003918,002669: 00,3641 16014 LDANZIG TCF DANZIG
003919,002670:
003920,002671: 00,3642 50000 ACOSSHR INDEX A # THE SHIFT RIGHT IS LESS THAN 14 SINCE
003921,002672: 00,3643 37635 CAF BIT14 # THE INPUT WAS NON-ZERO DP.
003922,002673: 00,3644 54121 TS MPTEMP
003923,002674: 00,3645 02054 TC VSHRRND # DP SHIFT RIGHT AND ROUND.
003924,002675: 00,3646 13600 TCF ACOS3 # PROCEED.
003925,002676:
003926,002677: 00,3647 10000 ACOSOVF CCS A # IF MAJOR PART WAS ONLY 1 MORE THAN .5,
003927,002678: 00,3650 13652 TCF +2 # CALL ANSWER 0.
003928,002679: 00,3651 13565 TCF ACOS=0
003929,002680: 00,3652 13565 TCF ACOS=0
003930,002681:
003931,002682: 00,3653 05677 ACOSABRT TC ABORT
003932,002683: 00,3654 01301 OCT 1301
003933,002684:
003934,002685: 00,3655 37636 ACOSZERO CAF QUARTER # ACOS(0) = PI/2.
003935,002686: 00,3656 13566 TCF ACOS=0 +1 # SET MPAC AND EXIT VIA ESCAPE.
003936,002687:
003937,002688: 00,3657 ENDINTS0 EQUALS
003938,002689:
003939,002690: # THE FOLLOWING INSTRUCTIONS ARE AVAILABLE FOR SETTING, MODIFYING, AND BRANCHING ON INDEX REGISTERS:
003940,002691: # 1. AXT ADDRESS TO INDEX TRUE.
003941,002692: # 1. AXC ADDRESS TO INDEX COMPLEMENTED.
003942,002693: # 3. LXA LOAD INDEX FROM ERASABLE.
003943,002694: # 4. LXC LOAD INDEX COMPLEMENTED FROM ERASABLE.
003944,002695: # 5. SXA STORE INDEX IN ERASABLE.
003945,002696: # 6. XCHX EXCHANGE INDEX REIGSTER WITH ERASABLE.
003946,002697:
003947,002698: # 7. INCR INCREMENT INDEX REGISTER.
003948,002699: # 8. XAD ERASABLE ADD TO INDEX REGISTER.
003949,002700: # 9. XSU ERASABLE SUBTRACT FROM INDEX REGISTER.
003950,002701:
003951,002702: # 10. TIX BRANCH ON INDEX REGISTER AND DECREMENT.
003952,002703:
003953,002704:
003954,002705:
003955,002706: 01,2000 SETLOC 12000 # SUFFIX CLASS 01 IS IN BANK 1.
003956,002707:
003957,002708: 01,2000 02061 AXT TC TAGSUB # SELECT APPROPRIATE INDEX REGISTER.
003958,002709: 01,2001 30103 CA POLISH
003959,002710: 01,2002 50114 XSTORE INDEX INDEXLOC # CONTAINS C(FIXLOC) OR C(FIXLOC)+1.
003960,002711: 01,2003 54046 TS X1
003961,002712: 01,2004 16014 TCF DANZIG
003962,002713:
003963,002714: 01,2005 02061 AXC TC TAGSUB
003964,002715: 01,2006 40103 CS POLISH
003965,002716: 01,2007 02002 TC XSTORE
003966,002717:
003967,002718: 01,2010 02061 LXA TC TAGSUB # LOAD INDEX FROM ERASABLE.
003968,002719: 01,2011 50102 INDEX ADDRWD
003969,002720: 01,2012 30000 CA 0
003970,002721: 01,2013 12002 TCF XSTORE
003971,002722:
003972,002723: 01,2014 02061 LXC TC TAGSUB # LOAD INDEX FROM ERASABLE COMPLEMENTED.
003973,002724: 01,2015 50102 INDEX ADDRWD
003974,002725: 01,2016 40000 CS 0
003975,002726: 01,2017 12002 TCF XSTORE
003976,002727:
003977,002728: 01,2020 02061 SXA TC TAGSUB # STORE INDEX IN ERASABLE.
003978,002729: 01,2021 50114 INDEX INDEXLOC
003979,002730: 01,2022 30046 CA X1
003980,002731: 01,2023 16627 TCF STORE1 # (STORE SINGLE PRECISION BEFORE EXIT).
003981,002732:
003982,002733: 01,2024 02061 XCHX TC TAGSUB # EXCHANGE INDEX REGISTER WITH ERASABLE.
003983,002734: 01,2025 50102 INDEX ADDRWD
003984,002735: 01,2026 30000 CA 0
003985,002736: 01,2027 50114 INDEX INDEXLOC
003986,002737: 01,2030 56046 XCH X1
003987,002738: 01,2031 16627 TCF STORE1
003988,002739:
003989,002740: 01,2032 02061 XAD TC TAGSUB # ERASABLE ADD TO INDEX.
003990,002741: 01,2033 50102 INDEX ADDRWD
003991,002742: 01,2034 30000 CA 0
003992,002743: 01,2035 50114 XAD2 INDEX INDEXLOC
003993,002744: 01,2036 26046 ADS X1 # IGNORING OVERFLOWS.
003994,002745: 01,2037 16014 TCF DANZIG
003995,002746:
003996,002747: 01,2040 02061 INCR TC TAGSUB # INCREMENT INDEX REGISTER.
003997,002748: 01,2041 30103 CA POLISH
003998,002749: 01,2042 12035 TCF XAD2
003999,002750:
004000,002751: 01,2043 02061 XSU TC TAGSUB # ERASABLE SUBTRACT FROM INDEX.
004001,002752: 01,2044 50102 INDEX ADDRWD
004002,002753: 01,2045 40000 CS 0
004003,002754: 01,2046 12035 TCF XAD2
004004,002755:
004005,002756:
004006,002757:
004007,002758: 01,2047 02061 TIX TC TAGSUB # BRANCH AND DECREMENT ON INDEX.
004008,002759: 01,2050 50114 INDEX INDEXLOC
004009,002760: 01,2051 40050 CS S1
004010,002761: 01,2052 50114 INDEX INDEXLOC
004011,002762: 01,2053 60046 AD X1
004012,002763: 01,2054 00006 EXTEND # NO OPERATION IF DECREMENTED INDEX IS
004013,002764: 01,2055 66014 BZMF DANZIG # NEGATIVE OR ZERO.
004014,002765:
004015,002766: 01,2056 50114 DOTIXBR INDEX INDEXLOC
004016,002767: 01,2057 56046 XCH X1 # IGNORING OVERFLOWS.
004017,002768:
004018,002769: 01,2060 16651 TCF GOTO # DO THE BRANCH USING THE CADR IN POLISH.
004019,002770:
004020,002771:
004021,002772:
004022,002773: # SUBROUTINE WHICH SETS THE ADDRESS OF THE SPECIFIED INDEX IN INDEXLOC. (ACTUALLY, THE ADDRESS -38D.)
004023,002774:
004024,002775: 01,2061 30104 TAGSUB CA FIXLOC
004025,002776: 01,2062 54114 TS INDEXLOC
004026,002777:
004027,002778: 01,2063 10020 CCS CYR # BIT 15 SPECIFIES INDEX.
004028,002779: 01,2064 24114 INCR INDEXLOC # 0 MEANS USE X2.
004029,002780: 01,2065 00002 TC Q
004030,002781: 01,2066 00002 TC Q # 1 FOR X1.
004031,002782:
004032,002783: # MISCELLANEOUS OPERATION CODES WITH DIRECT ADDRESSES. INCLUDED HERE ARE:
004033,002784:
004034,002785: # 1. ITA STORE QPRET (RETURN ADDRESS) IN ERASABLE.
004035,002786: # 2. CALL CALL A SUBROUTINE, LEAVING RETURN IN QPRET.
004036,002787: # 3. RTB RETURN TO BASIC LANGUAGE AT THE GIVEN ADDRESS.
004037,002788: # 4. BHIZ BRANCH IF THE HIGH ORDER OF MPAC IS ZERO (SINGLE PRECISION).
004038,002789: # 5. BOV BRANCH ON OVERFLOW.
004039,002790: # 6. GOTO SIMPLE SEQUENCE CHANGE.
004040,002791:
004041,002792: 01,2067 10020 RTB/BHIZ CCS CYR
004042,002793: 01,2070 30103 RTB CA POLISH
004043,002794: 01,2071 14106 TCF BANKJUMP # CALL BASIC ROUTINE.
004044,002795:
004045,002796: 01,2072 10140 BHIZ CCS MPAC
004046,002797: 01,2073 16014 TCF DANZIG
004047,002798: 01,2074 16651 TCF GOTO
004048,002799: 01,2075 16014 TCF DANZIG
004049,002800: 01,2076 16651 TCF GOTO
004050,002801:
004051,002802: 01,2077 10105 BOV(B) CCS OVFIND # BRANCH ON OVERFLOW TO BASIC OR INTERP.
004052,002803: 01,2100 12102 TCF +2
004053,002804: 01,2101 16014 TCF DANZIG
004054,002805: 01,2102 54105 TS OVFIND
004055,002806: 01,2103 10020 CCS CYR
004056,002807: 01,2104 12070 TCF RTB # IF BASIC.
004057,002808: 01,2105 00360 B5TOB8 OCT 360
004058,002809: 01,2106 16651 TCF GOTO
004059,002810:
004060,002811: 01,2107 10020 BZE/GOTO CCS CYR # SEE WHICH OP-CODE IS DESIRED.
004061,002812: 01,2110 06711 TC BRANCH # DO BZE.
004062,002813: 01,2111 16014 TCF DANZIG
004063,002814: 01,2112 16651 TCF GOTO # DO GOTO.
004064,002815: 01,2113 16014 TCF DANZIG
004065,002816:
004066,002817: 01,2114 10020 BPL/BMN CCS CYR
004067,002818: 01,2115 12123 TCF BPL
004068,002819: 01,2116 12000 5B10 DEC 5 B+10 # SHIFTS OP CODE IN SWITCH INSTRUCTION ADR
004069,002820:
004070,002821: 01,2117 06711 TC BRANCH # DO BMN.
004071,002822: 01,2120 16014 TCF DANZIG
004072,002823: 01,2121 16014 TCF DANZIG
004073,002824: 01,2122 16651 TCF GOTO # ONLY IF NNZ.
004074,002825:
004075,002826: 01,2123 06711 BPL TC BRANCH
004076,002827: 01,2124 16651 TCF GOTO # IF POSITIVE OR ZERO.
004077,002828: 01,2125 16651 TCF GOTO
004078,002829: 01,2126 16014 TCF DANZIG
004079,002830:
004080,002831: 01,2127 10020 CALL/ITA CCS CYR
004081,002832: 01,2130 16644 TCF CALL
004082,002833:
004083,002834: 01,2131 05715 TC CCSHOLE
004084,002835: 01,2132 50104 INDEX FIXLOC # STORE QPRET.
004085,002836: 01,2133 30052 CA QPRET
004086,002837: 01,2134 16627 TCF STORE1
004087,002838:
004088,002839: # THE FOLLOWING OPERATIONS ARE AVAILABLE FOR ALTERING AND TESTING INTERPRETIVE SWITCHES:
004089,002840:
004090,002841: # 00 BONSET SET A SWITCH AND DO A GOTO IF IT WAS ON.
004091,002842: # 01 SETGO SET A SWITCH AND DO A GOTO.
004092,002843: # 02 BOFSET SET A SWITCH AND DO A GOTO IF IT WAS OFF
004093,002844: # 03 SET SET A SWITCH.
004094,002845:
004095,002846: # 04 BONINV INVERT A SWITCH AND BRANCH IF IT WAS ON.
004096,002847: # 05 INVGO INVERT A SWITCH AND DO A GOTO.
004097,002848: # 06 BOFINV INVERT A SWITCH AND BRANCH IF IT WAS OFF
004098,002849: # 07 INVERT INVERT A SWITCH.
004099,002850:
004100,002851: # 10 BONCLR CLEAR A SWITCH AND BRANCH IF IT WAS ON.
004101,002852: # 11 CLRGO CLEAR A SWITCH AND DO A GOTO.
004102,002853: # 12 BOFCLR CLEAR A SWITCH AND BRANCH IF IT WAS OFF.
004103,002854: # 13 CLEAR CLEAR A SWITCH.
004104,002855:
004105,002856: # 14 BON BRANCH IF A SWITCH WAS ON.
004106,002857: # 16 BOFF BRANCH IF A SWITCH WAS OFF.
004107,002858:
004108,002859:
004109,002860:
004110,002861: # THE ADDRESS SUPPLIED WITH THE SWITCH INSTRUCTION IS INTERPRETED AS FOLLOWS:
004111,002862:
004112,002863: # BITS 1-4 SWITCH BIT NUMBER (1-15).
004113,002864: # BITS 5-8 SWITCH OPERATION NUMBER.
004114,002865: # BITS 9- SWITCH WORD NUMBER (UP TO 64 SWITCH WORDS).
004115,002866:
004116,002867: # THE ADDRESS ITSELF IS MADE UP BY THE YUL SYSTEM ASSEMBLER. THE BRANCH INSTRUCTIONS REQUIRE TWO
004117,002868: # ADDRESSES, THE SECOND TAKEN AS THE DIRECT (OR INDIRECT IF IN ERASABLE) ADDRESS OF THE BRANCH.
004118,002869:
004119,002870:
004120,002871:
004121,002872: 01,2135 37665 SWITCHES CAF LOW4 # LEAVE THE SWITCH BIT IN SWBIT .
004122,002873: 01,2136 70103 MASK POLISH
004123,002874: 01,2137 50000 INDEX A
004124,002875: 01,2140 37634 CAF BIT15 # (NUMBER FROM LEFT TO RIGHT.)
004125,002876: 01,2141 54115 TS SWBIT
004126,002877:
004127,002878: 01,2142 37644 CAF BIT7 # LEAVE THE SWITCH NUMBER IN SWWORD.
004128,002879: 01,2143 00006 EXTEND
004129,002880: 01,2144 70103 MP POLISH
004130,002881: 01,2145 54114 TS SWWORD
004131,002882:
004132,002883: 01,2146 00004 INHINT # DURING SWITCH CHANGE SO RUPT CAN USE TOO
004133,002884: 01,2147 50000 INDEX A # LEAVE THE SWITCH WORD ITSELF IN L.
004134,002885: 01,2150 30061 CA STATE
004135,002886: 01,2151 54002 TS Q # Q WILL BE USED AS A CHANNEL.
004136,002887:
004137,002888:
004138,002889: 01,2152 37640 CAF BIT11
004139,002890: 01,2153 00006 EXTEND # DISPATCH SWITCH BIT OPERATION AS IN BITS
004140,002891: 01,2154 70103 MP POLISH # 7-8 OF POLISH.
004141,002892: 01,2155 72215 MASK B3TOB4 # GETS 4X2-BIT CODE.
004142,002893: 01,2156 50000 INDEX A
004143,002894: 01,2157 12160 TCF +1
004144,002895:
004145,002896: 01,2160 30115 +1 CA SWBIT # 00 - SET SWITCH IN QUESTION.
004146,002897: 01,2161 00006 EXTEND
004147,002898: 01,2162 04002 ROR Q
004148,002899: 01,2163 12172 TCF SWSTORE
004149,002900:
004150,002901: 01,2164 30115 +5 CA SWBIT # 01 - INVERT SWITCH.
004151,002902: 01,2165 00006 EXTEND
004152,002903: 01,2166 06002 RXOR Q
004153,002904: 01,2167 12172 TCF SWSTORE
004154,002905:
004155,002906: 01,2170 40115 +9D CS SWBIT # 10 - CLEAR.
004156,002907: 01,2171 70002 MASK Q
004157,002908: 01,2172 50114 SWSTORE INDEX SWWORD
004158,002909: 01,2173 54061 TS STATE # NEW SWITCH WORD.
004159,002910:
004160,002911: 01,2174 00003 +13D RELINT # 11 - NOOP.
004161,002912: 01,2175 37636 CAF BIT13
004162,002913: 01,2176 00006 EXTEND # DISPATCH SEQUCE CHANGING OR BRANCHING
004163,002914: 01,2177 70103 MP POLISH # CODE.
004164,002915: 01,2200 72215 MASK B3TOB4
004165,002916: 01,2201 50000 INDEX A
004166,002917: 01,2202 12203 TCF +1 # ORIGINALLY STORED IN BITS 5-6.
004167,002918:
004168,002919: 01,2203 40002 +1 CS Q # 00 - BRANCH IF ON.
004169,002920: 01,2204 70115 TEST MASK SWBIT
004170,002921: 01,2205 10000 CCS A
004171,002922: 01,2206 12216 TCF SWSKIP
004172,002923:
004173,002924: 01,2207 16703 +5 TCF SWBRANCH # 01 - GO TO.
004174,002925:
004175,002926: 01,2210 12216 TCF SWSKIP # HERE ONLY ON BIT 15.
004176,002927:
004177,002928: 01,2211 05715 TC CCSHOLE
004178,002929: 01,2212 05715 TC CCSHOLE
004179,002930:
004180,002931: 01,2213 30002 +9D CA Q # 10 - BRANCH IF OFF.
004181,002932: 01,2214 12204 TCF TEST
004182,002933:
004183,002934: 01,2215 00014 B3TOB4 OCT 14
004184,002935: 01,2216 24150 SWSKIP INCR LOC
004185,002936:
004186,002937: 01,2217 01,2135 SW/ EQUALS SWITCHES
004187,002938:
004188,002939: 01,2217 16014 +13D TCF DANZIG # 11 - NOOP.
004189,002940: 01,2220 ENDINTS1 EQUALS
End of include-file LIST_PROCESSING_INTERPRETER.agc. Parent file is MAIN.agc