Source Code
These source-code files were transcribed from scans made from Don Eyles's personal
copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston
facility, and the scanning was sponsored by Mike Stewart. The code was transcribed
from these scans by a team of volunteers who are referenced in the program
comments. Comments from the original source code are in ALL-CAPS, whereas
comments added later in transcription are in Mixed-Case. In some cases, where
similar code blocks exist in previously-transcribed AGC programs (primarily
Luminary 99, from Apollo 11) those code blocks were used as a starting point and
then corrected to agree with the BURST120 scans. The full scans are available
at the Virtual AGC
project's collection at archive.org, while more-convenient reduced-size (but reduced-quality)
images are available at
the main Virtual AGC website. Report any errors noted by creating an
issue report at the Virtual AGC
project's GitHub repository. Notations on the program listing read, in part:YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 BY NASA 2021106-031 DEC 7, 1967 THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.Note that the date is the date of the printout, not the date of the program revision. |
040905,000002: ## Copyright: Public domain.
040906,000003: ## Filename: INTERPRETER.agc
040907,000004: ## Purpose: A module for revision 0 of BURST120 (Sunburst). It
040908,000005: ## is part of the source code for the Lunar Module's
040909,000006: ## (LM) Apollo Guidance Computer (AGC) for Apollo 5.
040910,000007: ## Assembler: yaYUL
040911,000008: ## Contact: Ron Burkey <info@sandroid.org>.
040912,000009: ## Website: www.ibiblio.org/apollo/index.html
040913,000010: ## Mod history: 2016-09-30 RSB Created draft version.
040914,000011: ## 2016-10-14 MAS Began.
040915,000012: ## 2016-10-14 MAS Completed transcription.
040916,000013: ## 2016-10-31 RSB Typos.
040917,000014: ## 2016-11-01 RSB More typos.
040918,000015: ## 2016-12-06 RSB Comments proofed using octopus/ProoferComments,
040919,000016: ## changes made.
040920,000017: ## 2017-03-15 RSB Comment-text fixes identified in 5-way
040921,000018: ## side-by-side diff of Luminary 69/99/116/131/210.
040922,000019: ## 2017-06-23 RSB Replaced an erroneous } with a correct ).
040923,000020: ## 2021-05-30 ABS B5TOBB -> B5TOB8
040924,000021:
Page 953 |
040926,000023: # SECTION 1 DISPATCHER
040927,000024:
040928,000025: # ENTRY TO THE INTERPRETER. INTPRET SETS LOC TO THE FIRST INSTRUCTION, BANKSET TO THE BBANK OF THE
040929,000026: # OBJECT INTERPRETIVE PROGRAM, AND INTBIT15 TO THE BIT15 CONTENTS OF FBANK. INTERPRETIVE PROGRAMS MAY BE IN
040930,000027: # VIRTUALLY ALL BANKS PRESENT UNDER ANY SUPER-BANK SETTING, WITH THE RESTRICTION THAT PROGRAMS IN HIGH BANKS
040931,000028: # (BIT15 OF FBANK = 1) DO NOT REFER TO LOWBANKS, AND VICE-VERSA. THE INTERPRETER DOES NOT SWITCH SUPERBANKS.
040932,000029: # E-BANK SWITCHING OCCURS WHENEVER GENERAL ERASABLE (100 - 3777) IS ADDRESSED.
040933,000030:
040934,000031:
040935,000032: 6112 BLOCK 03
040936,000033:
040937,000034: 6112 00006 INTPRET EXTEND # SET LOC TO THE WORD FOLLOWING THE TC.
040938,000035: 6113 22154 QXCH LOC
040939,000036:
040940,000037: 6114 30006 +2 CA BBANK # INTERPRETIVE BRANCHES FINISH HERE.
040941,000038: 6115 54155 TS BANKSET
040942,000039: 6116 77745 MASK BIT15 # GET 15TH BIT FOR INDEXABLE ADDRESSES.
040943,000040: 6117 54105 TS INTBIT15
040944,000041:
040945,000042: 6120 54023 TS EDOP # MAKE SURE NO INSTRUCTIONS LEFT OVER
040946,000043:
040947,000044: 6121 16134 TCF NEWOPS # PICK UP OP CODE PAIR AND BEGIN.
040948,000045:
040949,000046:
040950,000047: 6122 22006 INTRSM LXCH BBANK # RESUME SUSPENDED INTERPRETIVE JOB
040951,000048: 6123 16114 TCF INTPRET +2
040952,000049:
Page 954 |
040954,000051: # AT THE END OF MOST INSTRUCTIONS, CONTROL IS GIVEN TO DANZIG TO DISPATCH THE NEXT OPERATION.
040955,000052:
040956,000053: 6124 54153 NEWMODE TS MODE # PROLOGUE FOR MODE-CHANGING INSTRUCTIONS.
040957,000054:
040958,000055: 6125 30155 DANZIG CA BANKSET # SET BBANK BEFORE TESTING NEWJOB SO THAT
040959,000056: 6126 54006 TS BBANK # IT MAY BE SAVED DIRECTLY BY CHANJOB.
040960,000057:
040961,000058: 6127 10023 NOIBNKSW CCS EDOP # SEE IF AN ORDER CODE IS LEFT OVER FROM
040962,000059: 6130 16143 TCF OPJUMP # THE LAST PAIR RETRIEVED. IF SO, EXECUTE.
040963,000060: # EDOP IS SET TO ZERO ON ITS RE-EDITING.
040964,000061:
040965,000062: 6131 10067 CCS NEWJOB # SEE IF A JOB OF HIGHER PRIORITY IS
040966,000063: 6132 15540 TCF CHANG2 # PRESENT, AND IF SO, CHANGE JOBS.
040967,000064:
040968,000065: 6133 24154 INCR LOC # ADVANCE THE LOCATION COUNTER.
040969,000066: # ITRACE (1) REFERS TO "NEWOPS".
040970,000067: 6134 50154 NEWOPS INDEX LOC # ENTRY TO BEGIN BY PICKING OP CODE PAIR.
040971,000068: 6135 30000 CA 0 # MAY BE AN OPCODE PAIR OR A STORE CODE.
040972,000069: 6136 10000 CCS A # TEST SIGN AND GET DABS(A).
040973,000070: 6137 16431 TCF DOSTORE # PROCESS STORE CODE.
040974,000071:
040975,000072: 6140 04736 TC CCSHOLE # TO CATCH SOME TASK USERS OF INTERPRETER.
040976,000073:
040977,000074: 6141 54023 TS EDOP # OP CODE PAIR. LEAVE THE OTHER IN EDOP
040978,000075: 6142 75342 MASK LOW7 # WHERE CCS EDOP WILL HONOR IT NEXT.
040979,000076:
040980,000077: 6143 54020 OPJUMP TS CYR # LOWWD ENTERS HERE IF A RIGHT-HAND OP
040981,000078: 6144 10020 CCS CYR # CODE IS TO BE PROCESSED. TEST PREFICES.
040982,000079: 6145 16313 TCF OPJUMP2 # TEST SECOND PREFIX BIT.
040983,000080:
040984,000081: 6146 17021 TCF EXIT # +0 OP CODE IS EXIT.
040985,000082:
Page 955 |
040987,000084: # PROCESS ADDRESSES WHICH MAY BE DIRECT, INDEXED, OR REFERENCE THE PUSHDOWN LIST.
040988,000085:
040989,000086: 6147 77763 ADDRESS MASK BIT1 # SEE IF ADDRESS IS INDEXED. CYR CONTAINED
040990,000087: 6150 10000 CCS A # 400XX, SO BIT 1 IS NOW AS IT WAS IN CYR.
040991,000088: 6151 16212 TCF INDEX # FORM INDEXED ADDRESS.
040992,000089:
040993,000090: 6152 50154 DIRADRES INDEX LOC # LOOK AHEAD TO NEXT WORD TO SEE IF
040994,000091: 6153 40001 OCT40001 CS 1 # ADDRESS IS GIVEN.
040995,000092: 6154 10000 CCS A
040996,000093: 6155 16261 TCF PUSHUP # IF NOT.
040997,000094:
040998,000095: 6156 77773 NEG4 DEC -4 B-14
040999,000096:
041000,000097: 6157 24154 INCR LOC # IF SO, TO SHOW WE PICKED UP A WORD.
041001,000098: 6160 54106 TS ADDRWD
041002,000099:
Page 956 |
041004,000101: # FINAL DIGESTION OF DIRECT ADDRESSES OF OP CODES WITH 01 PREFIX IS DONE HERE. IN EACH CASE, THE
041005,000102: # REQUIRED 12-BIT SUB-ADDRESS IS LEFT IN ADDRWD, WITH ANY REQUIRED E OR F BANK SWITCHING DONE. ADDRESSES LESS
041006,000103: # 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.
041007,000104:
041008,000105:
041009,000106: 6161 66315 AD -ENDVAC # SEE IF ADDRESS RELATIVE TO WORK AREA.
041010,000107: 6162 10000 CCS A
041011,000108: 6163 66342 AD -ENDERAS # IF NOT, SEE IF IN GENERAL ERASABLE.
041012,000109: 6164 16171 TCF IERASTST
041013,000110:
041014,000111: 6165 30110 NETZERO CA FIXLOC # IF SO, LEAVE THE MODIFIED ADDRESS IN
041015,000112: 6166 26106 ADS ADDRWD # ADDRWD AND DISPATCH.
041016,000113: 6167 50020 ITR15 INDEX CYR # THIS INDEX MAKES THE NEXT INSTRUCTION
041017,000114: 6170 76342 7 INDJUMP -1 # TCF INDJUMP + OP, EDITING CYR.
041018,000115:
041019,000116: 6171 00006 IERASTST EXTEND
041020,000117: 6172 66202 BZMF GEADDR # GO PROCESS GENERAL-ERASABLE ADDRESS.
041021,000118:
041022,000119: 6173 75337 MASK LOW10 # FIXED BANK ADDRESS. RESTORE AND ADD B15.
041023,000120: 6174 65337 AD LOW10 # SWITCH BANKS AND LEAVE SUBADDRESS IN
041024,000121: 6175 56106 XCH ADDRWD # ADDRWD FOR OPERAND RETRIEVAL. (THIS
041025,000122: 6176 60105 AD INTBIT15 # METHOD PRECLUDES USE OF THE LAST
041026,000123: 6177 54004 TS FBANK # LOCATION IN EACH FBANK.)
041027,000124: 6200 50020 ITR12 INDEX CYR
041028,000125: 6201 76342 7 INDJUMP -1
041029,000126:
041030,000127: 6202 74564 GEADDR MASK LOW8
041031,000128: 6203 65352 AD OCT1400
041032,000129: 6204 56106 XCH ADDRWD
041033,000130: 6205 54003 TS EBANK
041034,000131: 6206 50020 ITR10 INDEX CYR
041035,000132: 6207 76342 7 INDJUMP -1
041036,000133:
Page 957 |
041038,000135: # THE FOLLOWING ROUTINE PROCESSES INTERPRETIVE INDEXED ADDRESSES. AN INTERPRETER INDEX REGISTER MAY
041039,000136: # CONTAIN THE ADDRESS OF ANY ERASABLE REGISTER (0-42 BEING RELATIVE TO THE VAC AREA) OR ANY INTERPRETIVE PROGRAM
041040,000137: # BANK, OR ANY INTEGER IN THAT RANGE.
041041,000138:
041042,000139: 6210 35346 DODLOAD* CAF DLOAD* # STODL* COMES HERE TO PROCESS LOAD ADR.
041043,000140: 6211 54020 TS CYR # (STOVL* ENTERS HERE).
041044,000141:
041045,000142: 6212 30110 INDEX CA FIXLOC # SET UP INDEX LOCATION.
041046,000143: 6213 54120 TS INDEXLOC
041047,000144: 6214 24154 INCR LOC # (ADDRESS ALWAYS GIVEN).
041048,000145: 6215 50154 INDEX LOC
041049,000146: 6216 40000 CS 0
041050,000147: 6217 10000 CCS A # INDEX 2 IF ADDRESS STORED COMPLEMENTED.
041051,000148: 6220 24120 INCR INDEXLOC
041052,000149: 6221 16222 NOOP
041053,000150:
041054,000151: 6222 54106 TS ADDRWD # 14 BIT ADDRESS TO ADDRWD.
041055,000152: 6223 75351 MASK HIGH4 # IF ADDRESS GREATER THAN 2K, ADD INTBIT15
041056,000153: 6224 00006 EXTEND
041057,000154: 6225 16230 BZF INDEX2
041058,000155: 6226 30105 CA INTBIT15
041059,000156: 6227 26106 ADS ADDRWD
041060,000157:
041061,000158: 6230 50120 INDEX2 INDEX INDEXLOC
041062,000159: 6231 40046 CS X1
041063,000160: 6232 26106 ADS ADDRWD # DO AUGMENT, IGNORING AND CORRECTING OVF.
041064,000161:
041065,000162: 6233 76340 MASK HIGH9 # SEE IF ADDRESS IS IN WORK AREA.
041066,000163: 6234 00006 EXTEND
041067,000164: 6235 16250 BZF INDWORK
041068,000165: 6236 75351 MASK HIGH4 # SEE IF IN FIXED BANK.
041069,000166: 6237 00006 EXTEND
041070,000167: 6240 16252 BZF INDERASE
041071,000168:
041072,000169: 6241 30106 CA ADDRWD # IN FIXED - SWITCH BANKS AND CREATE
041073,000170: 6242 54004 TS FBANK # SUB-ADDRESS.
041074,000171: 6243 75337 MASK LOW10
041075,000172: 6244 67751 AD 2K
041076,000173: 6245 54106 TS ADDRWD
041077,000174: 6246 50020 ITR11 INDEX CYR
041078,000175: 6247 36342 3 INDJUMP -1
041079,000176:
041080,000177: 6250 30110 INDWORK CA FIXLOC # MAKE ADDRWD RELATIVE TO WORK AREA.
041081,000178: 6251 16256 TCF ITR13 -1
041082,000179:
041083,000180: 6252 35352 INDERASE CA OCT1400
041084,000181: 6253 56106 XCH ADDRWD
041085,000182: 6254 54003 TS EBANK
041086,000183: 6255 74564 MASK LOW8
041087,000184: 6256 26106 -1 ADS ADDRWD
Page 958 |
041089,000186: 6257 50020 ITR13 INDEX CYR
041090,000187: 6260 36342 3 INDJUMP -1
041091,000188:
Page 959 |
041093,000190: # PUSH-UP ROUTINES. WHEN NO OPERAND ADDRESS IS GIVEN, THE APPROPRIATE OPERAND IS TAKEN FROM THE PUSH-DOWN
041094,000191: # LIST. IN MOST CASES THE MODE OF THE RESULT (VECTOR OR SCALAR) OF THE LAST ARITHMETIC OPERATION PERFORMED
041095,000192: # IS THE SAME AS THE TYPE OF OPERAND DESIRED (ALL ADD/SUBTRACT ETC.). EXCEPTIONS TO THIS GENERAL RULE ARE LISTED
041096,000193: # BELOW (NOTE THAT IN EVERY CASE THE MODE REGISTER IS LEFT INTACT):
041097,000194:
041098,000195: # 1. VXSC AND V/SC WANT THE OPPOSITE TYPE OF OPERAND, E.G., IF THE LAST OPERATION YIELDED A VECTOR
041099,000196: # RESULT, VXSC WANTS A SCALAR.
041100,000197:
041101,000198: # 2. THE LOAD CODES SHOULD LOAD THE ACCUMULATOR INDEPENDENT OF THE RESULT OF THE LAST OPERATION. THIS
041102,000199: # INCLUDES VLOAD, DLOAD, TLOAD, PDDL, AND PDVL (NO PUSHUP WITH SLOAD).
041103,000200:
041104,000201: # 3. SOME ARITHMETIC OPERATIONS REQUIRE A STANDARD TYPE OF OPERAND REGARDLESS OF THE PREVIOUS OPERATION.
041105,000202: # THIS INCLUDES SIGN WANTING DP AND TAD REQUIRING TP.
041106,000203:
041107,000204: 6261 34565 PUSHUP CAF OCT23 # IF THE LOW 5 BITS OF CYR ARE LESS THAN
041108,000205: 6262 70020 MASK CYR # 20, THIS OP REQUIRES SPECIAL ATTENTION.
041109,000206: 6263 66266 AD -OCT10 # (NO -0).
041110,000207: 6264 10000 CCS A
041111,000208: 6265 16277 TCF REGUP # FOR ALL CODES GREATER THAN OCT 7.
041112,000209:
041113,000210: 6266 77767 -OCT10 OCT -10
041114,000211:
041115,000212: 6267 66156 AD NEG4 # WE NOW HAVE 7 - OP CODE(MOD4). SEE IF
041116,000213: 6270 10000 CCS A # THE OP CODE (MOD4) IS THREE (REVERSE).
041117,000214: 6271 50000 INDEX A # NO - THE MODE IS DEFINITE. PICK UP THE
041118,000215: 6272 46310 CS NO.WDS
041119,000216: 6273 16301 TCF REGUP +2
041120,000217:
041121,000218: 6274 50153 INDEX MODE # FOR VXSC AND V/SC WE WANT THE REQUIRED
041122,000219: 6275 46306 CS REVCNT # PUSHLOC DECREMENT WITHOUT CHANGING THE
041123,000220: 6276 16301 TCF REGUP +2 # MODE AT THIS TIME.
041124,000221:
041125,000222: 6277 50153 REGUP INDEX MODE # MOST ALL OP CODES PUSHUP HERE.
041126,000223: 6300 46310 CS NO.WDS
041127,000224: 6301 26156 +2 ADS PUSHLOC
041128,000225: 6302 54106 TS ADDRWD
041129,000226: 6303 50020 ITR14 INDEX CYR
041130,000227: 6304 76342 7 INDJUMP -1 # (THE INDEX MAKES THIS A TCF.)
041131,000228:
041132,000229: 6305 00002 OCT 2 # REVERSE PUSHUP DECREMENT. VECTOR TAKES 2
041133,000230: 6306 00006 REVCNT OCT 6 # WORDS, SCALAR TAKES 6.
041134,000231: 6307 00006 OCT 6
041135,000232: 6310 00002 NO.WDS OCT 2 # CONVENTIONAL DECREMENT IS 6 WORDS VECTOR
041136,000233: 6311 00003 OCTAL3 OCT 3 # 2 IN DP, AND 3 IN TP.
041137,000234: 6312 00006 OCT 6
041138,000235:
Page 960 |
041140,000237: # TEST THE SECOND PREFIX BIT TO SEE IF THIS IS A MISCELLANEOUS OR A UNARY/SHORT SHIFT OPERATION.
041141,000238:
041142,000239: 6313 10020 OPJUMP2 CCS CYR # TEST SECOND PREFIX BIT.
041143,000240: 6314 16327 TCF OPJUMP3 # TEST THIRD BIT TO SEE IF UNARY OR SHIFT.
041144,000241:
041145,000242: 6315 77722 -ENDVAC DEC -45 B-14
041146,000243:
041147,000244: # THE FOLLOWING ROUTINE PROCESSES ADDRESSES OF SUFFIX CLASS 10. THEY ARE BASICALLY WORK AREA ADDRESSES
041148,000245: # IN THE RANGE 0 - 52, ERASABLE ECADR CONSTANTS FROM 100 - 3777, AND FCADRS ABOVE THAT. ALL 15 BITS ARE AVAILABLE
041149,000246: # IN CONTRAST TO SUFFIX 1, IN WHICH ONLY THE LOW ORDER 14 ARE AVAILABLE.
041150,000247:
041151,000248: 6316 24154 15BITADR INCR LOC # (ENTRY HERE FROM STCALL).
041152,000249: 6317 50154 INDEX LOC # PICK UP ADDRESS WORD.
041153,000250: 6320 30000 CA 0
041154,000251: 6321 54107 TS POLISH # WE MAY NEED A SUBADDRESS LATER.
041155,000252:
041156,000253: 6322 36337 CAF LOW7+2K # THESE INSTRUCTIONS ARE IN BANK 1.
041157,000254: 6323 54004 TS FBANK
041158,000255: 6324 70020 MASK CYR
041159,000256: 6325 50000 ITR7 INDEX A
041160,000257: 6326 16403 TCF MISCJUMP
041161,000258:
Page 961 |
041163,000260: # COMPLETE THE DISPATCHING OF UNARY AND SHORT SHIFT OPERATIONS.
041164,000261:
041165,000262: 6327 54004 OPJUMP3 TS FBANK # CALL IN BANK 0 (BIT5 11-15 OF A ARE 0.)
041166,000263: # ITRACE (6) REFERS TO "OPJUMP3".
041167,000264: 6330 10020 CCS CYR # TEST THIRD PREFIX BIT.
041168,000265: 6331 50000 INDEX A # THE DECREMENTED UNARY CODE IS IN BITS
041169,000266: 6332 12000 TCF UNAJUMP # 1-4 OF A (ZERO, EXIT, HAS BEEN DETECTED)
041170,000267:
041171,000268: 6333 10153 CCS MODE # ITS A SHORT SHIFT CODE. SEE IF PRESENT
041172,000269: 6334 12017 TCF SHORTT # SCALAR OR VECTOR.
041173,000270: 6335 12017 TCF SHORTT
041174,000271: 6336 12121 TCF SHORTV # CALLS THE APPROPRIATE ROUTINE.
041175,000272:
041176,000273:
041177,000274: 6337 4565 OCT23 = VD1
041178,000275: 6337 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
041179,000276: 6340 77700 HIGH9 OCT 77700
041180,000277: 6341 76000 BANKMASK OCT 76000 # FBANK MASK.
041181,000278: 6342 6341 FBANKMSK EQUALS BANKMASK
041182,000279: 6342 5655 B12T14 = PRIO34 # USED IN PROCESSING STORE CODES.
041183,000280: 6342 74056 -ENDERAS DEC -2001 B-14 # = -(2047 - 45 - 1)
041184,000281:
Page 962 |
041186,000283: # THE FOLLOWING IS THE JUMP TABLE FOR OP CODES WHICH MAY HAVE INDEXABLE ADDRESSES OR MAY PUSH UP.
041187,000284:
041188,000285: 6343 16563 INDJUMP TCF VLOAD # 00 - LOAD MPAC WITH A VECTOR.
041189,000286: 6344 17142 TCF TAD # 01 - TRIPLE PRECISION ADD TO MPAC.
041190,000287: 6345 17707 TCF SIGN # 02 - COMPLEMENT MPAC (V OR SC) IF X NEG.
041191,000288: 6346 17460 TCF VXSC # 03 - VECTOR TIMES SCALAR.
041192,000289: 6347 16761 TCF CGOTO # 04 - COMPUTED GO TO.
041193,000290: 6350 16546 TCF TLOAD # 05 - LOAD MPAC WITH TRIPLE PRECISION.
041194,000291: 6351 16537 TCF DLOAD # 06 - LOAD MPAC WITH A DP SCALAR.
041195,000292: 6352 17656 TCF V/SC # 07 - VECTOR DIVIDED BY SCALAR.
041196,000293:
041197,000294: 6353 16557 TCF SLOAD # 10 - LOAD MPAC IN SINGLE PRECISION.
041198,000295: 6354 16676 TCF SSP # 11 - SET SINGLE PRECISION INTO X.
041199,000296: 6355 16601 TCF PDDL # 12 - PUSH DOWN MPAC AND RE-LOAD IN DP.
041200,000297: 6356 17413 TCF MXV # 13 - MATRIX POST-MULTIPLIED BY VECTOR.
041201,000298: 6357 16635 TCF PDVL # 14 - PUSH DOWN AND VECTOR LOAD.
041202,000299: 6360 16704 TCF CCALL # 15 - COMPUTED CALL.
041203,000300: 6361 17416 TCF VXM # 16 - MATRIX PRE-MULTIPLIED BY VECTOR.
041204,000301: 6362 17650 TCF TSLC # 17 - NORMALIZE MPAC (SCALAR ONLY).
041205,000302:
041206,000303: 6363 17626 TCF DMPR # 20 - DP MULTIPLY AND ROUND.
041207,000304: 6364 17631 TCF DDV # 21 - DP DIVIDE BY.
041208,000305: 6365 17635 TCF BDDV # 22 - DP DIVIDE INTO.
041209,000306: 6366 17653 TCF GSHIFT # 23 - GENERAL SHIFT INSTRUCTION.
041210,000307: 6367 17025 TCF VAD # 24 - VECTOR ADD.
041211,000308: 6370 17053 TCF VSU # 25 - VECTOR SUBTRACT.
041212,000309: 6371 17103 TCF BVSU # 26 - VECTOR SUBTRACT FROM.
041213,000310: 6372 17410 TCF DOT # 27 - VECTOR DOT PRODUCT.
041214,000311:
041215,000312: 6373 17540 TCF VXV # 30 - VECTOR CROSS PRODUCT.
041216,000313: 6374 17504 TCF VPROJ # 31 - VECTOR PROJECTION.
041217,000314: 6375 17071 TCF DSU # 32 - DP SUBTRACT.
041218,000315: 6376 17127 TCF BDSU # 33 - DP SUBTRACT FROM.
041219,000316: 6377 17043 TCF DAD # 34 - DP ADD.
041220,000317: 6400 16400 TCF +0 # 35 - AVAILABLE
041221,000318: 6401 17624 TCF DMP1 # 36 - DP MULTIPLY.
041222,000319: 6402 17645 TCF SETPD # 37 - SET PUSH DOWN POINTER (DIRECT ONLY)
041223,000320:
041224,000321: # CODES 10 AND 14 MUST NOT PUSH UP. CODE 04 MAY BE USED FOR VECTOR DECLARE BEFORE PUSHUP IF DESIRED.
041225,000322:
Page 963 |
041227,000324: # THE FOLLOWING JUMP TABLE APPLIES TO INDEX, BRANCH, AND MISCELLANEOUS INSTRUCTIONS.
041228,000325:
041229,000326: 6403 12626 MISCJUMP TCF AXT # 00 - ADDRESS TO INDEX TRUE.
041230,000327: 6404 12633 TCF AXC # 01 - ADDRESS TO INDEX COMPLEMENTED.
041231,000328: 6405 12636 TCF LXA # 02 - LOAD INDEX FROM ERASABLE.
041232,000329: 6406 12642 TCF LXC # 03 - LOAD INDEX FROM COMPLEMENT OF ERAS.
041233,000330: 6407 12646 TCF SXA # 04 - STORE INDEX IN ERASABLE.
041234,000331: 6410 12654 TCF XCHX # 05 - EXCHANGE INDEX WITH ERASABLE.
041235,000332: 6411 12670 TCF INCR # 06 - INCREMENT INDEX REGISTER.
041236,000333: 6412 12677 TCF TIX # 07 - TRANSFER ON INDEX.
041237,000334:
041238,000335: 6413 12662 TCF XAD # 10 - INDEX REGISTER ADD FROM ERASABLE.
041239,000336: 6414 12673 TCF XSU # 11 - INDEX SUBTRACT FROM ERASABLE.
041240,000337: 6415 12751 TCF BZE/GOTO # 12 - BRANCH ZERO AND GOTO.
041241,000338: 6416 12756 TCF BPL/BMN # 13 - BRANCH PLUS AND BRANCH MINUS.
041242,000339: 6417 12731 TCF RTB/BHIZ # 14 - RETURN TO BASIC AND BRANCH HI ZERO.
041243,000340: 6420 12771 TCF CALL/ITA # 15 - CALL AND STORE QPRET.
041244,000341: 6421 13000 TCF SW/ # 16 - SWITCH INSTRUCTIONS AND AVAILABLE.
041245,000342: 6422 12741 TCF BOV(B) # 17 - BRANCH ON OVERFLOW TO BASIC OR INT.
041246,000343:
Page 964 |
041248,000345: # THE FOLLOWING JUMP TABLE APPIES TO UNARY INSTRUCTIONS.
041249,000346:
041250,000347: 00,2000 BANK 0 # 00 - EXIT - DETECTED EARLIER.
041251,000348: 00,2000 13167 UNAJUMP TCF SQRT # 01 - SQUARE ROOT.
041252,000349: 00,2001 13511 TCF SINE # 02 - SIN.
041253,000350: 00,2002 13500 TCF COSINE # 03 - COS.
041254,000351: 00,2003 13571 TCF ARCSIN # 04 - ARC SIN.
041255,000352: 00,2004 13573 TCF ARCCOS # 05 - ARC COS.
041256,000353: 00,2005 13154 TCF DSQ # 06 - DP SQUARE.
041257,000354: 00,2006 12116 TCF ROUND # 07 - ROUND TO DP.
041258,000355:
041259,000356: 00,2007 17722 TCF COMP # 10 - COMPLEMENT VECTOR OR SCALAR.
041260,000357: 00,2010 13212 TCF VDEF # 11 - VECTOR DEFINE.
041261,000358: 00,2011 13002 TCF UNIT # 12 - UNIT VECTOR.
041262,000359: 00,2012 13156 TCF ABVALABS # 13 - LENGTH OF VECTOR OR MAG OF SCALAR.
041263,000360: 00,2013 13226 TCF VSQ # 14 - SQUARE OF LENGTH OF VECTOR.
041264,000361: 00,2014 16423 TCF STADR # 15 - PUSH UP ON STORE CODE.
041265,000362: 00,2015 13256 TCF RVQ # 16 - RETURN VIA QPRET.
041266,000363: 00,2016 13231 TCF PUSH # 17 - PUSH MPAC DOWN.
041267,000364:
Page 965 |
041269,000366: # SECTION 2 LOAD AND STORE PACKAGE.
041270,000367:
041271,000368: # A SET OF EIGHT STORE CODES IS PROVIDED AS THE PRIMARY METHOD OF STORING THE MULTI-PURPOSE
041272,000369: # ACCUMULATOR (MPAC). IF IN THE DANZIG SECTION LOC REFERS TO AN ALGEBRAICALLY POSITIVE WORD, IT IS TAKEN AS A
041273,000370: # STORE CODE WITH A CORRESPONDING ERASABLE ADDRESS. MOST OF THESE CODES ARE TWO ADDRESS, SPECIFYING THAT THE WORD
041274,000371: # FOLLOWING THE STORE CODE IS TO BE USED AS AN ADDRESS FROM WHICH TO RE-LOAD MPAC. FOUR OPTIONS ARE AVAILABLE:
041275,000372:
041276,000373: # 1. STORE STORE MPAC. THE E ADDRESS MAY BE INDEXED.
041277,000374: # 2. STODL STORE MPAC AND RE-LOAD IT IN DP WITH THE NEXT ADDRESS (THE LOAD MAY BE INDEXED).
041278,000375: # 3. STOVL STORE MPAC AND RE-LOAD A VECTOR (AS ABOVE).
041279,000376: # 4. STCALL STORE AND DO A CALL (BOTH ADDRESSES MUST BE DIRECT HERE).
041280,000377:
041281,000378: # STODL AND STOVL WILL TAKE FROM THE PUSH-DOWN LIST IF NO LOAD ADDRESS IS GIVEN.
041282,000379:
041283,000380: 6423 BLOCK 3
041284,000381:
041285,000382: 6423 30155 STADR CA BANKSET # THE STADR CODE (PUSHUP UP ON STORE
041286,000383: 6424 54004 TS FBANK # ADDRESS) ENTERS HERE.
041287,000384: 6425 24154 INCR LOC
041288,000385: 6426 50154 ITR1 INDEX LOC # THE STORECODE WAS STORED COMPLEMENTED TO
041289,000386: 6427 40000 CS 0 # MAKE IT LOOK LIKE AN OPCODE PAIR.
041290,000387: 6430 67771 AD NEGONE # (YUL CANT REMOVE 1 BECAUSE OF EARLY CCS)
041291,000388:
041292,000389: 6431 54106 DOSTORE TS ADDRWD
041293,000390: 6432 74563 MASK LOW11 # ENTRY FROM DISPATCHER. SAVE THE ERASABLE
041294,000391: 6433 56106 XCH ADDRWD # ADDRESS AND JUMP ON THE STORE CODE NO.
041295,000392: 6434 75655 MASK B12T14
041296,000393: 6435 00006 EXTEND
041297,000394: 6436 77757 MP BIT5 # EACH TRANSFER VECTOR ENTRY IS TWO WORDS.
041298,000395: 6437 50000 ITR0 INDEX A
041299,000396: 6440 16441 TCF STORJUMP
041300,000397:
Page 966 |
041302,000399: # STORE CODE JUMP TABLE. CALLS THE APPROPRIATE STORING ROUTINE AND EXITS TO DANZIG OR TO ADDRESS WITH
041303,000400: # A SUPPLIED OPERATION CODE.
041304,000401:
041305,000402: 6441 06471 STORJUMP TC STORE # STORE.
041306,000403: 6442 16133 TCF NEWOPS -1 # PICK UP NEW OP CODE(S).
041307,000404: 6443 06463 TC STORE,1
041308,000405: 6444 16133 TCF NEWOPS -1
041309,000406: 6445 06466 TC STORE,2
041310,000407: 6446 16133 TCF NEWOPS -1
041311,000408:
041312,000409: 6447 06471 TC STORE # STODL.
041313,000410: 6450 16527 TCF DODLOAD
041314,000411:
041315,000412: 6451 06471 TC STORE # STODL WITH INDEXED LOAD ADDRESS.
041316,000413: 6452 16210 TCF DODLOAD*
041317,000414:
041318,000415: 6453 06471 TC STORE # STOVL.
041319,000416: 6454 16532 TCF DOVLOAD
041320,000417:
041321,000418: 6455 06471 TC STORE # STOVL WITH INDEXED LOAD ADDRESS.
041322,000419: 6456 16535 TCF DOVLOAD*
041323,000420: 6457 06471 TC STORE # STOTC.
041324,000421: 6460 35344 CAF CALLCODE
041325,000422: 6461 54020 TS CYR
041326,000423: 6462 16316 TCF 15BITADR # GET A 15 BIT ADDRESS.
041327,000424:
Page 967 |
041329,000426: # STORE CODE ADDRESS PROCESSOR.
041330,000427:
041331,000428: 6463 50110 STORE,1 INDEX FIXLOC
041332,000429: 6464 40046 CS X1
041333,000430: 6465 16470 TCF PRESTORE
041334,000431:
041335,000432: 6466 50110 STORE,2 INDEX FIXLOC
041336,000433: 6467 40047 CS X2
041337,000434: 6470 26106 PRESTORE ADS ADDRWD # RESULTANT ADDRESS IS IN ERASABLE.
041338,000435:
041339,000436: 6471 40106 STORE CS ADDRWD
041340,000437: 6472 65353 AD DEC45
041341,000438: 6473 10000 CCS A # DOES THE ADDRESS POINT TO THE WORK AREA?
041342,000439: 6474 30110 CA FIXLOC # YES.
041343,000440: 6475 16502 TCF AHEAD5
041344,000441: 6476 35352 CA OCT1400 # NO. SET EBANK & MAKE UP SUBADDRESS.
041345,000442: 6477 56106 XCH ADDRWD
041346,000443: 6500 54003 TS EBANK
041347,000444: 6501 74564 MASK LOW8
041348,000445: 6502 26106 AHEAD5 ADS ADDRWD
041349,000446:
Page 968 |
041351,000448: # STORING ROUTINES. STORE DP, TP, OR VECTOR AS INDICATED BY MODE.
041352,000449:
041353,000450: 6503 00006 STARTSTO EXTEND # MPAC,+1 MUST BE STORED IN ANY EVENT.
041354,000451: # ITRACE (5) REFERS TO "STARTSTO".
041355,000452: 6504 30145 DCA MPAC
041356,000453: 6505 50106 INDEX ADDRWD
041357,000454: 6506 52001 DXCH 0
041358,000455:
041359,000456: 6507 10153 CCS MODE
041360,000457: 6510 16523 TCF TSTORE
041361,000458: 6511 00002 TC Q
041362,000459:
041363,000460: 6512 00006 VSTORE EXTEND
041364,000461: 6513 30150 DCA MPAC +3
041365,000462: 6514 50106 INDEX ADDRWD
041366,000463: 6515 52003 DXCH 2
041367,000464:
041368,000465: 6516 00006 EXTEND
041369,000466: 6517 30152 DCA MPAC +5
041370,000467: 6520 50106 INDEX ADDRWD
041371,000468: 6521 52005 DXCH 4
041372,000469: 6522 00002 TC Q
041373,000470:
041374,000471: 6523 30146 TSTORE CA MPAC +2
041375,000472: 6524 50106 INDEX ADDRWD
041376,000473: 6525 54002 TS 2
041377,000474: 6526 00002 TC Q
041378,000475:
Page 969 |
041380,000477: # ROUTINES TO BEGIN PROCESSING OF THE SECOND ADDRESS ASSOCIATED WITH ALL STORE-TYPE CODES EXCEPT STORE
041381,000478: # ITSELF.
041382,000479:
041383,000480: 6527 35345 DODLOAD CAF DLOADCOD
041384,000481: 6530 54020 TS CYR
041385,000482: 6531 16152 TCF DIRADRES # GO GET A DIRECT ADDRESS.
041386,000483:
041387,000484: 6532 37745 DOVLOAD CAF VLOADCOD
041388,000485: 6533 54020 TS CYR
041389,000486: 6534 16152 TCF DIRADRES
041390,000487:
041391,000488: 6535 36153 DOVLOAD* CAF VLOAD*
041392,000489: 6536 16211 TCF DODLOAD* +1 # PROLOGUE TO INDEX ROUTINE.
041393,000490:
Page 970 |
041395,000492: # THE FOLLOWING LOAD INSTRUCTIONS ARE PROVIDED FOR LOADING THE MULTI-PURPOSE ACCUMULATOR MPAC.
041396,000493:
041397,000494: 6537 00006 DLOAD EXTEND
041398,000495: 6540 50106 INDEX ADDRWD
041399,000496: 6541 30001 DCA 0 # PICK UP DP ARGUMENT AND LEAVE IT IN
041400,000497: 6542 52145 SLOAD2 DXCH MPAC # MPAC,+1, SETTING MPAC +2 TO ZERO. THE
041401,000498: 6543 37767 CAF ZERO # CONTENTS OF THE OTHER FOUR REGISTERS OF
041402,000499: 6544 54146 TS MPAC +2 # MPAC ARE IRRELEVANT.
041403,000500: 6545 16124 TCF NEWMODE # DECLARE DOUBLE PRECISION MODE.
041404,000501:
041405,000502: 6546 50106 TLOAD INDEX ADDRWD
041406,000503: 6547 30002 CA 2 # LOAD A TRIPLE PRECISION ARGUMENT INTO
041407,000504: 6550 54146 TS MPAC +2 # THE FIRST THREE MPAC REGISTERS, WITH THE
041408,000505: 6551 00006 EXTEND # CONTENTS OF THE OTHER FOUR IRRELEVANT.
041409,000506: 6552 50106 INDEX ADDRWD
041410,000507: 6553 30001 DCA 0
041411,000508: 6554 52145 DXCH MPAC
041412,000509: 6555 37763 CAF ONE
041413,000510: 6556 16124 TCF NEWMODE # DECLARE TRIPLE PRECISION MODE.
041414,000511:
041415,000512: 6557 22007 SLOAD ZL # LOAD A SINGLE PRECISION NUMBER INTO
041416,000513: 6560 50106 INDEX ADDRWD # MPAC, SETTING MPAC+1,2 TO ZERO. THE
041417,000514: 6561 30000 CA 0 # CONTENTS OF THE REMAINING MPAC REGISTERS
041418,000515: 6562 16542 TCF SLOAD2 # ARE IRRELEVANT.
041419,000516:
041420,000517: 6563 00006 VLOAD EXTEND # LOAD A DOUBLE PRECISION VECTOR INTO
041421,000518: 6564 50106 INDEX ADDRWD # MPAC,+1, MPAC+3,4, AND MPAC+5,6. THE
041422,000519: 6565 30001 DCA 0 # CONTENTS OF MPAC +2 ARE IRRELEVANT.
041423,000520: 6566 52145 DXCH MPAC
041424,000521:
041425,000522: 6567 00006 ENDVLOAD EXTEND # PDVL COMES HERE TO FINISH UP FOR DP, TP.
041426,000523: 6570 50106 INDEX ADDRWD
041427,000524: 6571 30003 DCA 2
041428,000525: 6572 52150 DXCH MPAC +3
041429,000526:
041430,000527: 6573 00006 +4 EXTEND # TPDVL FINISHES HERE.
041431,000528: 6574 50106 INDEX ADDRWD
041432,000529: 6575 30005 DCA 4
041433,000530: 6576 52152 DXCH MPAC +5
041434,000531:
041435,000532: 6577 47763 CS ONE # DECLARE VECTOR MODE.
041436,000533: 6600 16124 TCF NEWMODE
041437,000534:
Page 971 |
041439,000536: # THE FOLLOWING INSTRUCTIONS ARE PROVIDED FOR STORING OPERANDS IN THE PUSHDOWN LIST:
041440,000537:
041441,000538: # 1. PUSH PUSHDOWN AND NO LOAD.
041442,000539: # 2. PDDL PUSHDOWN AND DOUBLE PRECISION LOAD.
041443,000540: # 3. PDVL PUSHDOWN AND VECTOR LOAD.
041444,000541:
041445,000542: 6601 00006 PDDL EXTEND
041446,000543: 6602 50106 INDEX ADDRWD # LOAD MPAC,+1, PUSHING THE FORMER
041447,000544: 6603 30001 DCA 0 # CONTENTS DOWN.
041448,000545: 6604 52145 DXCH MPAC
041449,000546: 6605 50156 INDEX PUSHLOC
041450,000547: 6606 52001 DXCH 0
041451,000548:
041452,000549: 6607 50153 INDEX MODE # ADVANCE THE PUSHDOWN POINTER APPRO-
041453,000550: 6610 36310 CAF NO.WDS # PRIATELY.
041454,000551: 6611 26156 ADS PUSHLOC
041455,000552:
041456,000553: 6612 10153 CCS MODE
041457,000554: 6613 16630 TCF ENDTPUSH
041458,000555: 6614 16626 TCF ENDDPUSH
041459,000556:
041460,000557: 6615 54153 TS MODE # NOW DP.
041461,000558: 6616 54146 ENDVPUSH TS MPAC +2
041462,000559: 6617 52150 DXCH MPAC +3 # PUSH DOWN THE REST OF THE VECTOR HERE.
041463,000560: 6620 50156 INDEX PUSHLOC
041464,000561: 6621 51775 DXCH 0 -4
041465,000562:
041466,000563: 6622 52152 DXCH MPAC +5
041467,000564: 6623 50156 INDEX PUSHLOC
041468,000565: 6624 51777 DXCH 0 -2
041469,000566:
041470,000567: 6625 16125 TCF DANZIG
041471,000568:
041472,000569: 6626 54146 ENDDPUSH TS MPAC +2 # SET MPAC +2 TO ZERO AND EXIT ON DP.
041473,000570: 6627 16125 TCF DANZIG
041474,000571:
041475,000572: 6630 54153 ENDTPUSH TS MODE
041476,000573: 6631 56146 XCH MPAC +2 # ON TRIPLE, SET MPAC +2 TO ZERO, PUSHING
041477,000574: 6632 50156 +2 INDEX PUSHLOC # DOWN THE OLD CONTENTS
041478,000575: 6633 53777 TS 0 -1
041479,000576: 6634 16125 TCF DANZIG
041480,000577:
Page 972 |
041482,000579: # PDVL - PUSHDOWN AND VECTOR LOAD.
041483,000580:
041484,000581: 6635 00006 PDVL EXTEND # RELOAD MPAC AND PUSH DOWN ITS CONTENTS.
041485,000582: 6636 50106 INDEX ADDRWD
041486,000583: 6637 30001 DCA 0
041487,000584: 6640 52145 DXCH MPAC
041488,000585: 6641 50156 INDEX PUSHLOC
041489,000586: 6642 52001 DXCH 0
041490,000587:
041491,000588: 6643 50153 INDEX MODE # ADVANCE THE PUSHDOWN POINTER.
041492,000589: 6644 36310 CAF NO.WDS
041493,000590: 6645 26156 ADS PUSHLOC
041494,000591:
041495,000592: 6646 10153 CCS MODE # TEST PAST MODE.
041496,000593: 6647 16666 TCF TPDVL
041497,000594: 6650 16567 TCF ENDVLOAD # JUST LOAD LAST FOUR REGISTERS ON DP.
041498,000595:
041499,000596: 6651 00006 VPDVL EXTEND # PUSHDOWN AND RE-LOAD LAST TWO COMPONENTS
041500,000597: 6652 50106 INDEX ADDRWD
041501,000598: 6653 30003 DCA 2
041502,000599: 6654 52150 DXCH MPAC +3
041503,000600: 6655 50156 INDEX PUSHLOC
041504,000601: 6656 51775 DXCH 0 -4
041505,000602:
041506,000603: 6657 00006 EXTEND
041507,000604: 6660 50106 INDEX ADDRWD
041508,000605: 6661 30005 DCA 4
041509,000606: 6662 52152 DXCH MPAC +5
041510,000607: 6663 50156 INDEX PUSHLOC
041511,000608: 6664 51777 DXCH 0 -2
041512,000609:
041513,000610: 6665 16125 TCF DANZIG
041514,000611:
041515,000612: 6666 00006 TPDVL EXTEND # ON TP, WE MUST LOAD THE Y COMPONENT
041516,000613: 6667 50106 INDEX ADDRWD # BEFORE STORING MPAC +2 INCASE THIS IS A
041517,000614: 6670 30003 DCA 2 # PUSHUP.
041518,000615: 6671 52150 DXCH MPAC +3
041519,000616:
041520,000617: 6672 30146 CA MPAC +2
041521,000618: 6673 50156 INDEX PUSHLOC # IN DP.
041522,000619: 6674 53777 TS 0 -1
041523,000620: 6675 16573 TCF ENDVLOAD +4
041524,000621:
041525,000622: # SSP (STORE SINGLE PRECISION) IS EXECUTED HERE.
041526,000623:
041527,000624: 6676 24154 SSP INCR LOC # PICK UP THE WORD FOLLOWING THE GIVEN
041528,000625: 6677 50154 INDEX LOC # ADDRESS AND STORE IT AT X.
041529,000626: 6700 30000 CA 0
041530,000627: 6701 50106 STORE1 INDEX ADDRWD # SOME INDEX AND MISCELLANEOUS OPS END
041531,000628: 6702 54000 TS 0 # HERE.
Page 973 |
041533,000630: 6703 16125 TCF DANZIG
041534,000631:
Page 974 |
041536,000633: # SEQUENCE CHANGING AND SUBROUTINE CALLING OPTIONS.
041537,000634:
041538,000635: # THE FOLLOWING OPERATIONS ARE AVAILABLE FOR SEQUENCING CHANGING, BRANCHING, AND CALLING SUBROUTINES:
041539,000636:
041540,000637: # 1. GOTO GO TO.
041541,000638: # 2. CALL CALL SUBROUTINE SETTING QPRET.
041542,000639: # 3. CGOTO COMPUTED GO TO.
041543,000640: # 4. CCALL COMPUTED CALL.
041544,000641: # 7. BPL BRANCH IF MPAC POSITIVE OR ZERO.
041545,000642: # 8. BZE BRANCH IF MPAC ZERO.
041546,000643: # 9. BMN BRANCH IF MPAC NEGATIVE NON-ZERO.
041547,000644:
041548,000645: 6704 24154 CCALL INCR LOC # MAINTAIN LOC FOR QPRET COMPUTATION.
041549,000646: 6705 50154 INDEX LOC
041550,000647: 6706 30000 CAF 0 # GET BASE ADDRESS OF CADR LIST.
041551,000648: 6707 50106 INDEX ADDRWD
041552,000649: 6710 60000 AD 0 # ADD INCREMENT.
041553,000650: 6711 54004 TS FBANK # SELECT DESIRED CADR.
041554,000651: 6712 75337 MASK LOW10
041555,000652: 6713 50000 INDEX A
041556,000653: 6714 32000 CAF 10000
041557,000654: 6715 54107 TS POLISH
041558,000655:
041559,000656: 6716 30155 CALL CA BANKSET # FOR ANY OF THE CALL OPTIONS, MAKE UP THE
041560,000657: 6717 76341 MASK BANKMASK # ADDRESS OF THE NEXT OP-CODE PAIR/STORE
041561,000658: 6720 66341 AD BANKMASK # CODE AND LEAVE IT IN QPRET. NOTE THAT
041562,000659: 6721 60154 AD LOC # BANKMASK = -(2000 - 1).
041563,000660: 6722 50110 INDEX FIXLOC
041564,000661: 6723 54052 TS QPRET
041565,000662:
041566,000663: 6724 30107 GOTO CA POLISH # BASIC BRANCHING SEQUENCE.
041567,000664: 6725 75351 +1 MASK HIGH4
041568,000665: 6726 00006 EXTEND
041569,000666: 6727 16740 BZF GOTOERS # SEE IF ADDRESS POINTS TO FIXED OR ERAS.
041570,000667: 6730 30155 +4 CA BANKSET # SET EBANK PART OF BBANK. NEXT, SET UP
041571,000668: 6731 54006 TS BBANK # FBANK. THE COMBINATION IS PICKED UP &
041572,000669: 6732 30107 CA POLISH # PUT INTO BANKSET AT INTPRET +2.
041573,000670: 6733 54004 TS FBANK
041574,000671: 6734 75337 MASK LOW10
041575,000672: 6735 67751 AD 2K
041576,000673: 6736 54154 TS LOC
041577,000674: 6737 16114 TCF INTPRET +2
041578,000675:
Page 975 |
041580,000677: 6740 E3,1400 EBANK= 1400 # SO YUL DOESN'T CUSS THE "CA 1400" BELOW.
041581,000678:
041582,000679: 6740 30107 GOTOERS CA POLISH # THE GIVEN ADDRESS IS IN ERASABLE - SEE
041583,000680: 6741 66315 AD -ENDVAC # IF RELATIVE TO THE WORK AREA.
041584,000681: 6742 10000 CCS A
041585,000682: 6743 30107 CA POLISH # GENERAL ERASABLE.
041586,000683: 6744 16753 TCF GOTOGE
041587,000684:
041588,000685: 6745 30110 CA FIXLOC # WORK AREA.
041589,000686: 6746 60107 AD POLISH
041590,000687: 6747 50000 INDEX A # USE THE GIVEN ADDRESS AS THE ADDRESS OF
041591,000688: 6750 30000 CA 0 # THE BRANCH ADDRESS.
041592,000689: 6751 54107 TS POLISH
041593,000690: 6752 16725 TCF GOTO +1 # ALLOWS ARBITRARY INDIRECTNESS LEVELS.
041594,000691:
041595,000692: 6753 54003 GOTOGE TS EBANK
041596,000693: 6754 74564 MASK LOW8
041597,000694: 6755 50000 INDEX A # USE THE GIVEN ADDRESS AS THE ADDRESS OF
041598,000695: 6756 31400 CA 1400 # THE BRANCH ADDRESS.
041599,000696: 6757 54107 TS POLISH
041600,000697: 6760 16725 TCF GOTO +1
041601,000698:
041602,000699: 6761 50154 CGOTO INDEX LOC # COMPUTED GO TO. PICK UP ADDRESS OF CADR
041603,000700: 6762 30001 CA 1 # LIST.
041604,000701: 6763 50106 INDEX ADDRWD # ADD MODIFIER.
041605,000702: 6764 60000 AD 0
041606,000703: 6765 54004 TS FBANK # SELECT GOTO ADDRESS.
041607,000704: 6766 75337 MASK LOW10
041608,000705: 6767 50000 INDEX A
041609,000706: 6770 32000 CA 10000
041610,000707: 6771 54107 TS POLISH
041611,000708: 6772 16725 TCF GOTO +1 # WITH ADDRESS IN A.
041612,000709:
041613,000710: 6773 30155 SWBRANCH CA BANKSET # SWITCH INSTRUCTIONS WHICH ELECT TO
041614,000711: 6774 54004 TS FBANK # BRANCH COME HERE TO DO SO.
041615,000712: 6775 50154 INDEX LOC
041616,000713: 6776 30001 CA 1
041617,000714: 6777 54107 TS POLISH
041618,000715: 7000 16725 TCF GOTO +1
041619,000716:
Page 976 |
041621,000718: # TRIPLE PRECISION BRANCHING ROUTINE. IF CALLING TC IS AT L, RETURN IS AS FOLLOWS:
041622,000719:
041623,000720: # L+1 IF MPAC IS GREATER THAN ZERO.
041624,000721: # L+2 IF MPAC IS EQUAL TO +0 OR -0.
041625,000722: # L+3 IF MPAC IS LESS THAN ZERO.
041626,000723:
041627,000724:
041628,000725: 7001 10144 BRANCH CCS MPAC
041629,000726: 7002 00002 TC Q
041630,000727: 7003 17005 TCF +2 # ON ZERO.
041631,000728: 7004 17017 TCF NEG
041632,000729:
041633,000730: 7005 10145 CCS MPAC +1
041634,000731: 7006 00002 TC Q
041635,000732: 7007 17011 TCF +2
041636,000733: 7010 17017 TCF NEG
041637,000734:
041638,000735: 7011 10146 CCS MPAC +2
041639,000736: 7012 00002 TC Q
041640,000737: 7013 17015 TCF +2
041641,000738: 7014 17017 TCF NEG
041642,000739:
041643,000740: 7015 50002 Q+1 INDEX Q
041644,000741: 7016 00001 TC 1
041645,000742:
041646,000743: 7017 50002 NEG INDEX Q # IF FIRST NON-ZERO REGISTER WAS NEGATIVE.
041647,000744: 7020 00002 TC 2
041648,000745:
041649,000746:
041650,000747: 7021 7017 Q+2 = NEG
041651,000748:
041652,000749: # ITRACE (3) REFERS TO "EXIT".
041653,000750: 7021 30155 EXIT CA BANKSET # RESTORE USER'S BANK SETTING, AND LEAVE
041654,000751: 7022 54006 TS BBANK # INTERPRETIVE MODE.
041655,000752: 7023 50154 INDEX LOC
041656,000753: 7024 00001 TC 1
041657,000754:
Page 977 |
041659,000756: # SECTION 3 - ADD/SUBTRACT PACKAGE.
041660,000757:
041661,000758: # THE FOLLOWING OPERATIONS ARE PROVIDED FOR ADDING TO AND SUBTRACTING FROM THE MULTI-PURPOSE ACCUMULATOR
041662,000759: # MPAC:
041663,000760:
041664,000761: # 1. DAD DOUBLE PRECISION ADD.
041665,000762: # 2. DSU DOUBLE PRECISION SUBTRACT.
041666,000763: # 3. BDSU DOUBLE PRECISION SUBTRACT FROM.
041667,000764:
041668,000765: # 4. TAD TRIPLE PRECISION ADD.
041669,000766:
041670,000767: # 5. VAD VECTOR ADD.
041671,000768: # 6. VSU VECTOR SUBTRACT.
041672,000769: # 7. BVSU VECTOR SUBTRACT FROM.
041673,000770:
041674,000771: # THE INTERPRETIVE OVERFLOW INDICATOR OVFIND IS SET NON-ZERO IF OVERFLOW OCCURS IN ANY OF THE ABOVE.
041675,000772:
041676,000773:
041677,000774: 7025 00006 VAD EXTEND
041678,000775: 7026 50106 INDEX ADDRWD
041679,000776: 7027 30003 DCA 2
041680,000777: 7030 20150 DAS MPAC +3
041681,000778: 7031 00006 EXTEND # CHECK OVERFLOW.
041682,000779: 7032 17034 BZF +2
041683,000780: 7033 07101 TC OVERFLOW
041684,000781:
041685,000782: 7034 00006 EXTEND
041686,000783: 7035 50106 INDEX ADDRWD
041687,000784: 7036 30005 DCA 4
041688,000785: 7037 20152 DAS MPAC +5
041689,000786: 7040 00006 EXTEND
041690,000787: 7041 17043 BZF +2
041691,000788: 7042 07101 TC OVERFLOW
041692,000789:
041693,000790: 7043 00006 DAD EXTEND
041694,000791: 7044 50106 INDEX ADDRWD
041695,000792: 7045 30001 DCA 0
041696,000793: 7046 20145 ENDVXV DAS MPAC # VXV FINISHES HERE.
041697,000794: 7047 00006 EXTEND
041698,000795: 7050 16125 BZF DANZIG
041699,000796: 7051 07101 TC OVERFLOW
041700,000797: 7052 16125 TCF DANZIG
041701,000798:
Page 978 |
041703,000800: 7053 00006 VSU EXTEND
041704,000801: 7054 50106 INDEX ADDRWD
041705,000802: 7055 40003 DCS 2
041706,000803: 7056 20150 DAS MPAC +3
041707,000804: 7057 00006 EXTEND
041708,000805: 7060 17062 BZF +2
041709,000806: 7061 07101 TC OVERFLOW
041710,000807:
041711,000808: 7062 00006 EXTEND
041712,000809: 7063 50106 INDEX ADDRWD
041713,000810: 7064 40005 DCS 4
041714,000811: 7065 20152 DAS MPAC +5
041715,000812: 7066 00006 EXTEND
041716,000813: 7067 17071 BZF +2
041717,000814: 7070 07101 TC OVERFLOW
041718,000815:
041719,000816: 7071 00006 DSU EXTEND
041720,000817: 7072 50106 INDEX ADDRWD
041721,000818: 7073 40001 DCS 0
041722,000819: 7074 20145 DAS MPAC
041723,000820: 7075 00006 EXTEND
041724,000821: 7076 16125 BZF DANZIG
041725,000822: 7077 07101 TC OVERFLOW
041726,000823: 7100 16125 TCF DANZIG
041727,000824:
041728,000825: 7101 37763 OVERFLOW CAF ONE # SUBROUTINE TO TURN OVFIND ON.
041729,000826: 7102 17224 TCF SETOVF2
041730,000827:
Page 979 |
041732,000829: 7103 00006 BVSU EXTEND
041733,000830: 7104 50106 INDEX ADDRWD
041734,000831: 7105 30003 DCA 2
041735,000832: 7106 52150 DXCH MPAC +3
041736,000833: 7107 00006 EXTEND
041737,000834: 7110 40001 DCOM
041738,000835: 7111 20150 DAS MPAC +3
041739,000836: 7112 00006 EXTEND
041740,000837: 7113 17115 BZF +2
041741,000838: 7114 07101 TC OVERFLOW
041742,000839:
041743,000840: 7115 00006 EXTEND
041744,000841: 7116 50106 INDEX ADDRWD
041745,000842: 7117 30005 DCA 4
041746,000843: 7120 52152 DXCH MPAC +5
041747,000844: 7121 00006 EXTEND
041748,000845: 7122 40001 DCOM
041749,000846: 7123 20152 DAS MPAC +5
041750,000847: 7124 00006 EXTEND
041751,000848: 7125 17127 BZF +2
041752,000849: 7126 07101 TC OVERFLOW
041753,000850:
041754,000851: 7127 00006 BDSU EXTEND
041755,000852: 7130 50106 INDEX ADDRWD
041756,000853: 7131 30001 DCA 0
041757,000854: 7132 52145 DXCH MPAC
041758,000855: 7133 00006 EXTEND
041759,000856: 7134 40001 DCOM
041760,000857: 7135 20145 DAS MPAC
041761,000858: 7136 00006 EXTEND
041762,000859: 7137 16125 BZF DANZIG
041763,000860: 7140 07101 TC OVERFLOW
041764,000861: 7141 16125 TCF DANZIG
041765,000862:
Page 980 |
041767,000864: # TRIPLE PRECISION ADD ROUTINE.
041768,000865:
041769,000866: 7142 00006 TAD EXTEND
041770,000867: 7143 50106 INDEX ADDRWD
041771,000868: 7144 30002 DCA 1 # ADD MINOR PARTS FIRST.
041772,000869: 7145 20146 DAS MPAC +1
041773,000870: 7146 50106 INDEX ADDRWD
041774,000871: 7147 60000 AD 0
041775,000872: 7150 60144 AD MPAC
041776,000873: 7151 54144 TS MPAC
041777,000874: 7152 16125 TCF DANZIG
041778,000875:
041779,000876: 7153 54111 SETOVF TS OVFIND # SET OVFIND IF SUCH OCCURS.
041780,000877: 7154 16125 TCF DANZIG
041781,000878:
Page 981 |
041783,000880: # ARITHMETIC SUBROUTINES REQUIRED IN FIXED-FIXED.
041784,000881: # 1. DMPSUB DOUBLE PRECISION MULTIPLY. MULTIPLY THE CONTENTS OF MPAC,+1 BY THE DP WORD WHOSE ADDRESS
041785,000882: # IS IN ADDRWD AND LEAVE A TRIPLE PRECISION RESULT IN MPAC.
041786,000883: # 2. ROUNDSUB ROUND THE TRIPLE PRECISON CONTENTS OF MPAC TO DOUBLE PRECISION.
041787,000884: # 3. DOTSUB TAKE THE DOT PRODUCT OF THE VECTOR IN MPAC AND THE VECTOR WHOSE ADDRESS IS IN ADDRWD
041788,000885: # AND LEAVE THE TRIPLE PRECISION RESULT IN MPAC.
041789,000886: # 4. POLY USING THE CONTENTS OF MPAC AS A DP ARGUMENT, EVALUATE THE POLYNOMIAL WHOSE DEGREE AND
041790,000887: # COEFFICIENTS IMMEDIATELY FOLLOW THE TC POLY INSTRUCTION (SEE ROUTINE FOR DETAILS.)
041791,000888:
041792,000889:
041793,000890: 7155 50002 DMP INDEX Q # BASIC SUBROUTINE FOR USE BY PINBALL, ETC
041794,000891: 7156 30000 CAF 0 # ADRES OF ARGUMENT FOLLOWS TC DMP .
041795,000892: 7157 24002 INCR Q
041796,000893: 7160 54106 -1 TS ADDRWD # (PROLOGUE FOR SETTING ADDRWD.)
041797,000894:
041798,000895: 7161 50106 DMPSUB INDEX ADDRWD # GET MINOR PART OF OPERAND AT C(ADDRWD).
041799,000896: 7162 30001 CA 1
041800,000897: 7163 54146 TS MPAC +2 # THIS WORKS FOR SQUARING MPAC AS WELL.
041801,000898: 7164 37767 CAF ZERO # SET MPAC +1 TO ZERO SO WE CAN ACCUMULATE
041802,000899: 7165 56145 XCH MPAC +1 # THE PARTIAL PRODUCTS WITH DAS
041803,000900: 7166 54125 TS MPTEMP # INSTRUCTIONS.
041804,000901: 7167 00006 EXTEND
041805,000902: 7170 70146 MP MPAC +2 # MINOR OF MPAC X MINOR OF C(ADDRWD).
041806,000903:
041807,000904: 7171 56146 XCH MPAC +2 # DISCARD MINOR PART OF ABOVE RESULT AND
041808,000905: 7172 00006 EXTEND # FORM MAJOR OF MPAC X MINOR OF C(ADDRWD).
041809,000906: 7173 70144 MP MPAC
041810,000907: 7174 20146 DAS MPAC +1 # GUARANTEED NO OVERFLOW.
041811,000908:
041812,000909: 7175 50106 INDEX ADDRWD # GET MAJOR PART OF ARGUMENT AT C(ADDRWD).
041813,000910: 7176 30000 CA 0
041814,000911: 7177 56125 XCH MPTEMP # SAVE AND BRING OUT MINOR OF MPAC.
041815,000912: 7200 00006 EXTEND
041816,000913: 7201 70125 MP MPTEMP # MAJOR OF C(ADDRWD) X MINOR OF MPAC.
041817,000914: 7202 20146 DAS MPAC +1 # ACCUMULATE, SETTING A TO NET OVERFLOW.
041818,000915:
041819,000916: 7203 56144 XCH MPAC # SETTING MPAC TO 0 OR +-1.
041820,000917: 7204 00006 EXTEND
041821,000918: 7205 70125 MP MPTEMP # MAJOR OF MPAC X MAJOR OF C(ADDRWD).
041822,000919: 7206 20145 DAS MPAC # GUARANTEED NO OVERFLOW.
041823,000920: 7207 00002 TC Q # 49 MCT = .573 MS. INCLUDING RETURN.
041824,000921:
Page 982 |
041826,000923: # ROUND MPAC TO DOUBLE PRECISION, SETTING OVFIND ON THE RARE EVENT OF OVERFLOW.
041827,000924:
041828,000925: 7210 37767 ROUNDSUB CAF ZERO # SET MPAC +2 = 0 FOR SCALARS AND CHANGE
041829,000926: 7211 54153 +1 TS MODE # MODE TO DP.
041830,000927:
041831,000928: 7212 56146 VROUND XCH MPAC +2 # BUT WE NEEDNT TAKE THE TIME FOR VECTORS.
041832,000929: 7213 60000 DOUBLE
041833,000930: 7214 54001 TS L
041834,000931: 7215 00002 TC Q
041835,000932:
041836,000933: 7216 60145 AD MPAC +1 # ADD ROUNDING BIT IF MPAC +2 WAS GREATER
041837,000934: 7217 54145 TS MPAC +1 # THAN .5 IN MAGNITUDE.
041838,000935: 7220 00002 TC Q
041839,000936:
041840,000937: 7221 60144 AD MPAC # PROPAGATE INTERFLOW.
041841,000938: 7222 54144 TS MPAC
041842,000939: 7223 00002 TC Q
041843,000940:
041844,000941: 7224 54111 SETOVF2 TS OVFIND # (RARE).
041845,000942: 7225 00002 TC Q
041846,000943:
Page 983 |
041848,000945: # THE DOT PRODUCT SUBROUTINE USUALLY FORMS THE DOT PRODUCT OF THE VECTOR IN MPAC WITH A STANDARD SIX
041849,000946: # REGISTER VECTOR WHOSE ADDRESS IS IN ADDRWD. IN THIS CASE C(DOTINC) ARE SET TO 2. VXM, HOWEVER, SETS C(DOTINC) TO
041850,000947: # 6 SO THAT DOTSUB DOTS MPAC WITH A COLUMN VECTOR OF THE MATRIX IN QUESTION IN THIS CASE.
041851,000948:
041852,000949:
041853,000950: 7226 37762 PREDOT CAF TWO # PROLOGUE TO SET DOTINC TO 2.
041854,000951: 7227 54126 TS DOTINC
041855,000952:
041856,000953: 7230 00006 DOTSUB EXTEND
041857,000954: 7231 22127 QXCH DOTRET # SAVE RETURN.
041858,000955: 7232 07161 TC DMPSUB # DOT X COMPONENTS.
041859,000956: 7233 52150 DXCH MPAC +3 # POSITION Y COMPONENT OF MPAC FOR
041860,000957: 7234 52145 DXCH MPAC # MULTIPLICATION WHILE SAVING RESULT IN
041861,000958: 7235 52121 DXCH BUF # THREE WORD BUFFER, BUF.
041862,000959: 7236 30146 CA MPAC +2
041863,000960: 7237 54122 TS BUF +2
041864,000961:
041865,000962: 7240 30126 CA DOTINC # ADVANCE ADDRWD TO Y COMPONENT OF
041866,000963: 7241 26106 ADS ADDRWD # OTHER ARGUMENT.
041867,000964: 7242 07161 TC DMPSUB
041868,000965: 7243 52146 DXCH MPAC +1 # ACCUMULATE PARTIAL PRODUCTS.
041869,000966: 7244 20122 DAS BUF +1
041870,000967: 7245 60144 AD MPAC
041871,000968: 7246 60120 AD BUF
041872,000969: 7247 54120 TS BUF
041873,000970: 7250 17252 TCF +2
041874,000971: 7251 54111 TS OVFIND # IF OVERFLOW OCCURS.
041875,000972:
041876,000973: 7252 52152 DXCH MPAC +5 # MULTIPLY Z COMPONENTS.
041877,000974: 7253 52145 DXCH MPAC
041878,000975: 7254 30126 CA DOTINC
041879,000976: 7255 26106 ADS ADDRWD
041880,000977: 7256 07161 TC DMPSUB
041881,000978: 7257 52122 ENDDOT DXCH BUF +1 # LEAVE FINAL ACCUMULATION IN MPAC.
041882,000979: 7260 20146 DAS MPAC +1
041883,000980: 7261 60144 AD MPAC
041884,000981: 7262 60120 AD BUF
041885,000982: 7263 54144 TS MPAC
041886,000983: 7264 00127 TC DOTRET
041887,000984:
041888,000985: 7265 54111 TS OVFIND # ON OVERFLOW HERE.
041889,000986: 7266 00127 TC DOTRET
041890,000987:
Page 984 |
041892,000989: # DOUBLE PRECISION POLYNOMIAL EVALUATOR
041893,000990: # N N-1
041894,000991: # THIS ROUTINE EVALUATES A X + A X + ... + A X + A LEAVING THE DP RESULT IN MPAC ON EXIT.
041895,000992: # N N-1 1 0
041896,000993:
041897,000994: # THE ROUTINE HAS TWO ENTRIES
041898,000995:
041899,000996: # 1. ENTRY THRU POWRSERS. THE COEFFICIENTS MAY BE EITHER IN FIXED OR ERASABLE, THE CALL IS BY
041900,000997: # TC POWRSERS, AND THE RETURN IS TO LOC(TC POWRSERS)+1. THE ENTERING DATA MUST BE AS FOLLOWS
041901,000998:
041902,000999: # A SP LOC-3 ADDRESS FOR REFERENCING COEF TABLE
041903,001000: # L SP N-1 N IS THE DEGREE OF THE POWER SERIES
041904,001001: # MPAC DP X ARGUMENT
041905,001002:
041906,001003: # LOC-2N DP A(0)
041907,001004: # ...
041908,001005: # LOC DP A(N)
041909,001006:
041910,001007: # 2. ENTRY THRU POLY. THE CALL TO POLY AND THE ENTERING DATA MUST BE AS FOLLOWS
041911,001008:
041912,001009: # MPAC DP X ARGUMENT
041913,001010:
041914,001011: # LOC TC POLY
041915,001012: # LOC+1 SP N-1
041916,001013: # LOC+2 DP A(0)
041917,001014: # ...
041918,001015: # LOC+2N+2 DP A(N) RETURN IS TO LOC+2N+4
041919,001016:
041920,001017: 7267 00006 POWRSERS EXTEND
041921,001018: 7270 22131 QXCH POLYRET # RETURN ADDRESS
041922,001019: 7271 54107 TS POLISH # POWER SERIES ADDRESS
041923,001020: 7272 22130 LXCH POLYCNT # N-1 TO COUNTER
041924,001021: 7273 17304 TCF POLYCOM # SKIP SET UP BY POLY
041925,001022:
041926,001023: 7274 50002 POLY INDEX Q
041927,001024: 7275 30000 CAF 0
041928,001025: 7276 54130 TS POLYCNT # N-1 TO COUNTER
041929,001026: 7277 60000 DOUBLE
041930,001027: 7300 60002 AD Q
041931,001028: 7301 54107 TS POLISH # L(A(N))-3 TO POLISH
041932,001029: 7302 67766 AD FIVE
041933,001030: 7303 54131 TS POLYRET # STORE RETURN ADDRESS
041934,001031:
041935,001032: 7304 35347 POLYCOM CAF LVBUF # INCOMING X WILL BE MOVED TO VBUF, SO
041936,001033: 7305 54106 TS ADDRWD # SET ADDRWD SO DMPSUB WILL MPY BY VBUF.
041937,001034:
041938,001035: 7306 00006 EXTEND
041939,001036: 7307 50107 INDEX POLISH
041940,001037: 7310 30004 DCA 3
041941,001038:
Page 985 |
041943,001040: 7311 52145 DXCH MPAC # LOAD A(N) INTO MPAC,
041944,001041: 7312 52113 DXCH VBUF # SAVING X IN VBUF
041945,001042: 7313 17317 TCF POLY2
041946,001043:
041947,001044: 7314 54130 POLYLOOP TS POLYCNT # SAVE DECREMENTED LOOP COUNTER
041948,001045: 7315 47762 CS TWO
041949,001046: 7316 26107 ADS POLISH # REGRESS COEFFICIENT POINTER
041950,001047:
041951,001048: 7317 07161 POLY2 TC DMPSUB # MULTIPLY BY X
041952,001049: 7320 00006 EXTEND
041953,001050: 7321 50107 INDEX POLISH
041954,001051: 7322 30002 DCA 1 # ADD IN NEXT COEFFICIENT
041955,001052: 7323 20145 DAS MPAC # USERS RESPONSIBILITY TO ASSURE NO OVFLOW
041956,001053:
041957,001054: 7324 10130 CCS POLYCNT
041958,001055: 7325 17314 TCF POLYLOOP
041959,001056: 7326 00131 TC POLYRET # RETURN CALLER
041960,001057:
Page 986 |
041962,001059: # MISCELLANEOUS MULTI-PRECISION ROUTINES REQUIRED IN FIXED-FIXED BUT NOT USED BY THE INTERPRETER.
041963,001060:
041964,001061: 7327 22002 TPAGREE LXCH Q # FORCE SIGN AGREEMENT AMONG THE TRIPLE
041965,001062: 7330 07001 TC BRANCH # PRECISION CONTENTS OF MPAC. RETURNING
041966,001063: 7331 17335 TCF ARG+ # WITH SIGNUM OF THE INPUT IN A.
041967,001064: 7332 17355 TCF ARGZERO
041968,001065:
041969,001066: 7333 47743 CS POSMAX # IF NEGATIVE.
041970,001067: 7334 17336 TCF +2
041971,001068:
041972,001069: 7335 37743 ARG+ CAF POSMAX
041973,001070: 7336 54002 TS Q
041974,001071: 7337 00006 EXTEND
041975,001072: 7340 24000 AUG A # FORMS +-1.0.
041976,001073: 7341 60146 AD MPAC +2
041977,001074: 7342 54146 TS MPAC +2
041978,001075: 7343 37767 CAF ZERO
041979,001076: 7344 60002 AD Q
041980,001077: 7345 60145 AD MPAC +1
041981,001078: 7346 54145 TS MPAC +1
041982,001079: 7347 37767 CAF ZERO
041983,001080: 7350 60002 AD Q # Q STILL HAS POSMAX OR NEGMAX IN IT.
041984,001081: 7351 60144 AD MPAC
041985,001082: 7352 54144 ARGZERO2 TS MPAC # ALWAYS SKIPPING UNLESS ARGZERO.
041986,001083: 7353 54145 TS MPAC +1
041987,001084: 7354 00001 TC L # RETURN VIA L.
041988,001085:
041989,001086: 7355 54146 ARGZERO TS MPAC +2 # SET ALL THREE MPAC REGISTERS TO ZERO.
041990,001087: 7356 17352 TCF ARGZERO2
041991,001088:
041992,001089: # SHORTMP MULTIPLIES THE TP CONTENTS OF MPAC BY THE SINGLE PRECISION NUMBER ARRIVING IN A.
041993,001090:
041994,001091: 7357 54125 SHORTMP TS MPTEMP
041995,001092: 7360 00006 EXTEND
041996,001093: 7361 70146 MP MPAC +2
041997,001094: 7362 54146 TS MPAC +2
041998,001095: 7363 37767 CAF ZERO # SO SUBSEQUENT DAS WILL WORK.
041999,001096: 7364 56145 XCH MPAC +1
042000,001097: 7365 00006 EXTEND
042001,001098: 7366 70125 MP MPTEMP
042002,001099: 7367 20146 DAS MPAC +1
042003,001100: 7370 56144 XCH MPAC # SETTING MPAC TO 0.
042004,001101: 7371 00006 EXTEND
042005,001102: 7372 70125 MP MPTEMP
042006,001103: 7373 20145 DAS MPAC
042007,001104: 7374 00002 TC Q
042008,001105:
Page 987 |
042010,001107: # DMPNSUB MULTIPLIES THE DP FRACTION ARRIVING IN MPAC BY THE SP
042011,001108: # INTEGER ARRIVING IN A. THE DP PRODUCT DEPARTS BOTH IN MPAC AND IN
042012,001109: # A AND L. NOTE THAT DMPNSUB NORMALLY INCREASES THE MAGNITUDE OF THE
042013,001110: # CONTENTS OF MPAC. THE CUSTOMER MUST INSURE THAT B(A) X B(MPAC,MPAC+1)
042014,001111: # AND B(A) X B(MPAC) ARE LESS THAN 1 IN MAGNITUDE, WHERE B, AS IS OBVIOUS,
042015,001112: # INDICATES THE ARRIVING CONTENTS.
042016,001113:
042017,001114: 7375 54125 DMPNSUB TS DMPNTEMP
042018,001115: 7376 00006 EXTEND
042019,001116: 7377 70145 MP MPAC +1
042020,001117: 7400 52145 DXCH MPAC # LOW PRODUCT TO MPAC, HIGH FACTOR TO A
042021,001118: 7401 00006 EXTEND
042022,001119: 7402 70125 MP DMPNTEMP
042023,001120: 7403 30001 CA L
042024,001121: 7404 26144 ADS MPAC # COMPLETING THE PRODUCT IN MPAC
042025,001122: 7405 00006 EXTEND
042026,001123: 7406 30145 DCA MPAC # BRINGING THE PRODUCT INTO A AND L
042027,001124: 7407 00002 TC Q
042028,001125:
Page 988 |
042030,001127: # MISCELLANEOUS VECTOR OPERATIONS. INCLUDED HERE ARE THE FOLLOWING:
042031,001128:
042032,001129: # 1. DOT DP VECTOR DOT PRODUCT.
042033,001130: # 2. VXV DP VECTOR CROSS PRODUCT.
042034,001131: # 3. VXSC DP VECTOR TIMES SCALAR.
042035,001132: # 4. V/SC DP VECTOR DIVIDED BY SCALAR.
042036,001133: # 5. VPROJ DP VECTOR PROJECTION. ( (MPAC.X)MPAC ).
042037,001134: # 6. VXM DP VECTOR POST-MULTIPLIED BY MATRIX.
042038,001135: # 7. MXV DP VECTOR PRE-MULTIPLIED BY MATRIX.
042039,001136:
042040,001137:
042041,001138: 7410 07226 DOT TC PREDOT # DO THE DOT PRODUCT AND EXIT, CHANGING
042042,001139: 7411 37767 CAF ZERO # THE MODE TO DP SCALAR.
042043,001140: 7412 16124 TCF NEWMODE
042044,001141:
042045,001142:
042046,001143: 7413 37762 MXV CAF TWO # SET UP MATINC AND DOTINC FOR ROW
042047,001144: 7414 54130 TS MATINC # VECTORS.
042048,001145: 7415 17421 TCF VXM/MXV # GO TO COMMON PORTION.
042049,001146:
042050,001147: 7416 44570 VXM CS TEN # SET MATINC AND DOTINC TO REFER TO MATRIX
042051,001148: 7417 54130 TS MATINC # AS THREE COLUMN VECTORS.
042052,001149: 7420 36306 CAF SIX
042053,001150:
Page 989 |
042055,001152: # COMMON PORTION OF MXV AND VXM.
042056,001153:
042057,001154: 7421 54126 VXM/MXV TS DOTINC
042058,001155: # ITRACE (2) REFERS TO "VXM/MXV".
042059,001156: 7422 07612 TC MPACVBUF # SAVE VECTOR IN MPAC FOR FURTHER USE.
042060,001157:
042061,001158: 7423 07230 TC DOTSUB # GO DOT TO GET X COMPONENT OF ANSWER.
042062,001159: 7424 00006 EXTEND
042063,001160: 7425 30113 DCA VBUF # MOVE MPAC VECTOR BACK INTO MPAC, SAVING
042064,001161: 7426 52145 DXCH MPAC # NEW X COMPONENT IN BUF2.
042065,001162: 7427 52124 DXCH BUF2
042066,001163: 7430 00006 EXTEND
042067,001164: 7431 30115 DCA VBUF +2
042068,001165: 7432 52150 DXCH MPAC +3
042069,001166: 7433 00006 EXTEND
042070,001167: 7434 30117 DCA VBUF +4
042071,001168: 7435 52152 DXCH MPAC +5
042072,001169: 7436 30130 CA MATINC # INITIALIZE ADDRWD FOR NEXT DOT PRODUCT.
042073,001170: 7437 26106 ADS ADDRWD # FORMS BASE ADDRESS OF NEXT COLUMN(ROW).
042074,001171:
042075,001172: 7440 07230 TC DOTSUB
042076,001173: 7441 52113 DXCH VBUF # MOVE GIVEN VECTOR BACK TO MPAC, SAVING Y
042077,001174: 7442 52145 DXCH MPAC # COMPONENT OF ANSWER IN VBUF +2.
042078,001175: 7443 52115 DXCH VBUF +2
042079,001176: 7444 52150 DXCH MPAC +3
042080,001177: 7445 52117 DXCH VBUF +4
042081,001178: 7446 52152 DXCH MPAC +5
042082,001179: 7447 30130 CA MATINC # FORM ADDRESS OF LAST COLUMN OR ROW.
042083,001180: 7450 26106 ADS ADDRWD
042084,001181:
042085,001182: 7451 07230 TC DOTSUB
042086,001183: 7452 52124 DXCH BUF2 # ANSWER NOW COMPLETE. PUT COMPONENTS INTO
042087,001184: 7453 52145 DXCH MPAC # PROPER MPAC REGISTERS.
042088,001185: 7454 52152 DXCH MPAC +5
042089,001186: 7455 52115 DXCH VBUF +2
042090,001187: 7456 52150 DXCH MPAC +3
042091,001188: 7457 16125 TCF DANZIG # EXIT.
042092,001189:
Page 990 |
042094,001191: # VXSC - VECTOR TIMES SCALAR.
042095,001192:
042096,001193: 7460 10153 VXSC CCS MODE # TEST PRESENT MODE.
042097,001194: 7461 17507 TCF DVXSC # SEPARATE ROUTINE WHEN SCALAR IS IN MPAC.
042098,001195: 7462 17507 TCF DVXSC
042099,001196:
042100,001197: 7463 07161 VVXSC TC DMPSUB # COMPUTE X COMPONENT
042101,001198: 7464 07212 TC VROUND # AND ROUND IT.
042102,001199: 7465 52150 DXCH MPAC +3 # PUT Y COMPONENT INTO MPAC SAVING MPAC IN
042103,001200: 7466 52145 DXCH MPAC # MPAC +3.
042104,001201: 7467 52150 DXCH MPAC +3
042105,001202:
042106,001203: 7470 07161 TC DMPSUB # DO SAME FOR Y AND Z COMPONENTS.
042107,001204: 7471 07212 TC VROUND
042108,001205: 7472 52152 DXCH MPAC +5
042109,001206: 7473 52145 DXCH MPAC
042110,001207: 7474 52152 DXCH MPAC +5
042111,001208:
042112,001209: 7475 07161 TC DMPSUB
042113,001210: 7476 07212 TC VROUND
042114,001211: 7477 52145 VROTATEX DXCH MPAC # EXIT USED TO RESTORE MPAC AFTER THIS
042115,001212: 7500 52152 DXCH MPAC +5 # TYPE OF ROTATION. CALLED BY VECTOR SHIFT
042116,001213: 7501 52150 DXCH MPAC +3 # RIGHT, V/SC, ETC.
042117,001214: 7502 52145 DXCH MPAC
042118,001215: 7503 16125 TCF DANZIG
042119,001216:
Page 991 |
042121,001218: # DP VECTOR PROJECTION ROUTINE.
042122,001219:
042123,001220: 7504 07226 VPROJ TC PREDOT # (MPAC.X)MPAC IS COMPUTED AND LEFT IN
042124,001221: 7505 47761 CS FOUR # MPAC. DO DOT AND FALL INTO DVXSC.
042125,001222: 7506 26106 ADS ADDRWD
042126,001223:
042127,001224: # VXSC WHEN SCALAR ARRIVES IN MPAC AND VECTOR IS AT X.
042128,001225:
042129,001226: 7507 00006 DVXSC EXTEND # SAVE SCALAR IN MPAC +3 AND GET X
042130,001227: 7510 30145 DCA MPAC # COMPONENT OF ANSWER.
042131,001228: 7511 52150 DXCH MPAC +3
042132,001229: 7512 07161 TC DMPSUB
042133,001230: 7513 07212 TC VROUND
042134,001231:
042135,001232: 7514 37762 CAF TWO # ADVANCE ADDRWD TO Y COMPONENT OF X.
042136,001233: 7515 26106 ADS ADDRWD
042137,001234: 7516 00006 EXTEND
042138,001235: 7517 30150 DCA MPAC +3 # PUT SCALAR BACK INTO MPAC AND SAVE
042139,001236: 7520 52145 DXCH MPAC # X RESULT IN MPAC +5.
042140,001237: 7521 52152 DXCH MPAC +5
042141,001238: 7522 07161 TC DMPSUB
042142,001239: 7523 07212 TC VROUND
042143,001240:
042144,001241: 7524 37762 CAF TWO
042145,001242: 7525 26106 ADS ADDRWD # TO Z COMPONENT.
042146,001243: 7526 52150 DXCH MPAC +3 # BRING SCALAR BACK, PUTTING Y RESULT IN
042147,001244: 7527 52145 DXCH MPAC # THE PROPER PLACE.
042148,001245: 7530 52150 DXCH MPAC +3
042149,001246: 7531 07161 TC DMPSUB
042150,001247: 7532 07212 TC VROUND
042151,001248:
042152,001249: 7533 52145 DXCH MPAC # PUT Z COMPONENT IN PROPER PLACE, ALSO
042153,001250: 7534 52152 DXCH MPAC +5 # POSITIONING X.
042154,001251: 7535 52145 DXCH MPAC
042155,001252:
042156,001253: 7536 47763 CS ONE # MODE HAS CHANGED TO VECTOR.
042157,001254: 7537 16124 TCF NEWMODE
042158,001255:
Page 992 |
042160,001257: # THE VECTOR CROSS PRODUCT ROUTINE CALCULATES (X M -X M ,X M -X M ,X M -X M ) WHERE M IS THE VECTOR IN
042161,001258: # 3 2 2 3 1 3 3 1 2 1 1 2
042162,001259: # MPAC AND X THE VECTOR AT THE GIVEN ADDRESS.
042163,001260:
042164,001261:
042165,001262: 7540 00006 VXV EXTEND
042166,001263: 7541 30152 DCA MPAC +5 # FORM UP M3X1, LEAVING M1 IN VBUF.
042167,001264: 7542 52145 DXCH MPAC
042168,001265: 7543 52113 DXCH VBUF
042169,001266: 7544 07161 TC DMPSUB # BY X1.
042170,001267:
042171,001268: 7545 00006 EXTEND
042172,001269: 7546 40150 DCS MPAC +3 # CALCULATE -X1M2, SAVING X1M3 IN VBUF +2.
042173,001270: 7547 52145 DXCH MPAC
042174,001271: 7550 52115 DXCH VBUF +2
042175,001272: 7551 07161 TC DMPSUB
042176,001273:
042177,001274: 7552 37762 CAF TWO # ADVANCE ADDRWD TO X2.
042178,001275: 7553 26106 ADS ADDRWD
042179,001276: 7554 00006 EXTEND
042180,001277: 7555 40152 DCS MPAC +5 # PREPARE TO GET -X2M3, SAVING -X1M2 IN
042181,001278: 7556 52145 DXCH MPAC # MPAC +5.
042182,001279: 7557 52152 DXCH MPAC +5
042183,001280: 7560 07161 TC DMPSUB
042184,001281:
042185,001282: 7561 00006 EXTEND
042186,001283: 7562 30113 DCA VBUF # GET X2M1, SAVING -X2M3 IN VBUF +4.
042187,001284: 7563 52145 DXCH MPAC
042188,001285: 7564 52117 DXCH VBUF +4
042189,001286: 7565 07161 TC DMPSUB
042190,001287:
042191,001288: 7566 37762 CAF TWO # ADVANCE ADDRWD TO X3.
042192,001289: 7567 26106 ADS ADDRWD
042193,001290: 7570 00006 EXTEND
042194,001291: 7571 40113 DCS VBUF # GET -X3M1, ADDING X2M1 TO MPAC +5 TO
042195,001292: 7572 52145 DXCH MPAC # COMPLETE THE Z COMPONENT OF THE ANSWER.
042196,001293: 7573 20152 DAS MPAC +5
042197,001294:
042198,001295: 7574 00006 EXTEND
042199,001296: 7575 17577 BZF +2
042200,001297: 7576 07101 TC OVERFLOW
Page 993 |
042202,001299: 7577 07161 TC DMPSUB
042203,001300: 7600 52115 DXCH VBUF +2 # MOVE X1M3 TO MPAC +3 SETTING UP FOR X3M2
042204,001301: 7601 52150 DXCH MPAC +3 # AND ADD -X3M1 TO MPAC +3 TO COMPLETE THE
042205,001302: 7602 52145 DXCH MPAC # Y COMPONENT OF THE RESULT.
042206,001303: 7603 20150 DAS MPAC +3
042207,001304:
042208,001305: 7604 00006 EXTEND
042209,001306: 7605 17607 BZF +2
042210,001307: 7606 07101 TC OVERFLOW
042211,001308:
042212,001309: 7607 07161 TC DMPSUB
042213,001310: 7610 52117 DXCH VBUF +4 # GO ADD -X2M3 TO X3M2 TO COMPLETE THE X
042214,001311: 7611 17046 TCF ENDVXV # COMPONENT (TAIL END OF DAD).
042215,001312:
042216,001313: # THE MPACVBUF SUBROUTINE SAVES THE VECTOR IN MPAC IN VBUF WITHOUT CLOBBERING MPAC.
042217,001314:
042218,001315: 7612 00006 MPACVBUF EXTEND # CALLED BY MXV, VXM, AND UNIT.
042219,001316: 7613 30145 DCA MPAC
042220,001317: 7614 52113 DXCH VBUF
042221,001318: 7615 00006 EXTEND
042222,001319: 7616 30150 DCA MPAC +3
042223,001320: 7617 52115 DXCH VBUF +2
042224,001321: 7620 00006 EXTEND
042225,001322: 7621 30152 DCA MPAC +5
042226,001323: 7622 52117 DXCH VBUF +4
042227,001324: 7623 00002 TC Q # RETURN TO CALLER.
042228,001325:
Page 994 |
042230,001327: # INTERPRETIVE INSTRUCTIONS WHOSE EXECUTION CONSISTS OF PRINCIPALLY CALLING SUBROUTINES.
042231,001328:
042232,001329: 7624 07161 DMP1 TC DMPSUB # DMP INSTRUCTION.
042233,001330: 7625 16125 TCF DANZIG
042234,001331:
042235,001332: 7626 07161 DMPR TC DMPSUB
042236,001333: 7627 07211 TC ROUNDSUB +1 # (C(A) = +0).
042237,001334: 7630 16125 TCF DANZIG
042238,001335:
042239,001336: 7631 00006 DDV EXTEND
042240,001337: 7632 50106 INDEX ADDRWD # MOVE DIVIDEND INTO BUF.
042241,001338: 7633 30001 DCA 0
042242,001339: 7634 17641 TCF BDDV +4
042243,001340:
042244,001341: 7635 00006 BDDV EXTEND # MOVE DIVISOR INTO MPAC SAVING MPAC, THE
042245,001342: 7636 50106 INDEX ADDRWD # DIVIDEND, IN BUF.
042246,001343: 7637 30001 DCA 0
042247,001344: 7640 52145 DXCH MPAC
042248,001345: 7641 52121 +4 DXCH BUF
042249,001346: 7642 37767 CAF ZERO # DIVIDE ROUTINES IN BANK 0.
042250,001347: 7643 54004 TS FBANK
042251,001348: 7644 12352 TCF DDV/BDDV
042252,001349:
042253,001350: 7645 30106 SETPD CA ADDRWD # MUST SET TO WORK AREA, OR EBANK TROUBLE.
042254,001351: 7646 54156 TS PUSHLOC
042255,001352: 7647 16127 TCF NOIBNKSW # NO FBANK SWITCH REQUIRED.
042256,001353:
042257,001354: 7650 37767 TSLC CAF ZERO # SHIFTING ROUTINES LOCATED IN BANK 00.
042258,001355: 7651 54004 TS FBANK
042259,001356: 7652 12172 TCF TSLC2
042260,001357:
042261,001358: 7653 35342 GSHIFT CAF LOW7 # USED AS MASK AT GENSHIFT. THIS PROCESSES
042262,001359: 7654 54004 TS FBANK # ANY SHIFT INSTRUCTION (EXCEPT TSLC) WITH
042263,001360: 7655 12214 TCF GENSHIFT # AN ADDRESS (ROUTINES IN BANK 0).
042264,001361:
Page 995 |
042266,001363: # THE FOLLOWING IS THE PROLOGUE TO V/SC. IF THE PRESENT MODE IS VECTOR, IT SAVES THE SCALAR AT X IN BUF
042267,001364: # AND CALLS THE V/SC ROUTINE IN BANK 0. IF THE PRESENT MODE IS SCALAR, IT MOVES THE VECTOR AT X INTO MPAC, SAVING
042268,001365: # THE SCALAR IN MPAC IN BUF BEFORE CALLING THE V/SC ROUTINE IN BANK 0.
042269,001366:
042270,001367:
042271,001368: 7656 10153 V/SC CCS MODE
042272,001369: 7657 17670 TCF DV/SC # MOVE VECTOR INTO MPAC.
042273,001370: 7660 17670 TCF DV/SC
042274,001371:
042275,001372: 7661 00006 VV/SC EXTEND
042276,001373: 7662 50106 INDEX ADDRWD
042277,001374: 7663 30001 DCA 0
042278,001375: 7664 52121 V/SC1 DXCH BUF # IN BOTH CASES, VECTOR IS NOW IN MPAC AND
042279,001376: 7665 37767 CAF ZERO # SCALAR IN BUF.
042280,001377: 7666 54004 TS FBANK
042281,001378: 7667 12630 TCF V/SC2
042282,001379:
042283,001380: 7670 00006 DV/SC EXTEND
042284,001381: 7671 50106 INDEX ADDRWD
042285,001382: 7672 30003 DCA 2
042286,001383: 7673 52150 DXCH MPAC +3
042287,001384: 7674 00006 EXTEND
042288,001385: 7675 50106 INDEX ADDRWD
042289,001386: 7676 30005 DCA 4
042290,001387: 7677 52152 DXCH MPAC +5
042291,001388:
042292,001389: 7700 47763 CS ONE # CHANGE MODE TO VECTOR.
042293,001390: 7701 54153 TS MODE
042294,001391:
042295,001392: 7702 00006 EXTEND
042296,001393: 7703 50106 INDEX ADDRWD
042297,001394: 7704 30001 DCA 0
042298,001395: 7705 52145 DXCH MPAC
042299,001396: 7706 17664 TCF V/SC1 # FINISH PROLOGUE AT COMMON SECTION.
042300,001397:
Page 996 |
042302,001399: # SIGN AND COMPLEMENT INSTRUCTIONS.
042303,001400:
042304,001401: 7707 50106 SIGN INDEX ADDRWD # CALL COMP INSTRUCTION IF WORD AT X IS
042305,001402: 7710 10000 CCS 0 # NEGATIVE NON-ZERO.
042306,001403: 7711 16125 TCF DANZIG
042307,001404: 7712 17714 TCF +2
042308,001405: 7713 17722 TCF COMP # DO THE COMPLEMENT.
042309,001406:
042310,001407: 7714 50106 INDEX ADDRWD
042311,001408: 7715 10001 CCS 1
042312,001409: 7716 16125 TCF DANZIG
042313,001410: 7717 16125 TCF DANZIG
042314,001411: 7720 17722 TCF COMP
042315,001412: 7721 16125 TCF DANZIG
042316,001413: 7722 00006 COMP EXTEND # COMPLEMENT DP MPAC IN EVERY CASE.
042317,001414: 7723 40145 DCS MPAC
042318,001415: 7724 52145 DXCH MPAC
042319,001416:
042320,001417: 7725 10153 CCS MODE # EITHER COMPLEMENT MPAC +3 OR THE REST OF
042321,001418: 7726 17737 TCF DCOMP # THE VECTOR ACCUMULATOR.
042322,001419: 7727 17737 TCF DCOMP
042323,001420:
042324,001421: 7730 00006 EXTEND # VECTOR COMPLEMENT.
042325,001422: 7731 40150 DCS MPAC +3
042326,001423: 7732 52150 DXCH MPAC +3
042327,001424: 7733 00006 EXTEND
042328,001425: 7734 40152 DCS MPAC +5
042329,001426: 7735 52152 DXCH MPAC +5
042330,001427: 7736 16125 TCF DANZIG
042331,001428:
042332,001429: 7737 40146 DCOMP CS MPAC +2
042333,001430: 7740 54146 TS MPAC +2
042334,001431: 7741 16125 TCF DANZIG
042335,001432:
Page 997 |
042337,001434: # CONSTANTS REQUIRED IN FIXED-FIXED.
042338,001435: 7742 37777 DPOSMAX OCT 37777
042339,001436: 7743 37777 POSMAX OCT 37777
042340,001437: 7744 7744 LIMITS EQUALS POSMAX +1
042341,001438: 7744 57777 NEG1/2 OCT -20000 # MUST BE TWO LOCATIONS AHEAD OF POS1/2.
042342,001439:
042343,001440: 7745 40000 BIT15 OCT 40000 # BIT TABLE FOLLOWS.
042344,001441: 7746 20000 BIT14 OCT 20000
042345,001442: 7747 10000 BIT13 OCT 10000
042346,001443: 7750 04000 BIT12 OCT 04000
042347,001444: 7751 02000 BIT11 OCT 02000
042348,001445: 7752 01000 BIT10 OCT 01000
042349,001446: 7753 00400 BIT9 OCT 00400
042350,001447: 7754 00200 BIT8 OCT 00200
042351,001448: 7755 00100 BIT7 OCT 00100
042352,001449: 7756 00040 BIT6 OCT 00040
042353,001450: 7757 00020 BIT5 OCT 00020
042354,001451: 7760 00010 BIT4 OCT 00010
042355,001452: 7761 00004 BIT3 OCT 00004
042356,001453: 7762 00002 BIT2 OCT 00002
042357,001454: 7763 00001 BIT1 OCT 00001
042358,001455:
042359,001456: 7764 7745 NEGMAX EQUALS BIT15
042360,001457: 7764 7746 HALF EQUALS BIT14
042361,001458: 7764 7746 POS1/2 EQUALS HALF
042362,001459: 7764 7747 QUARTER EQUALS BIT13
042363,001460: 7764 7751 2K EQUALS BIT11
042364,001461: 7764 00013 ELEVEN DEC 11 B-14
042365,001462: 7765 7764 NOUTCON = ELEVEN
042366,001463: 7765 4570 TEN = BINCON
042367,001464: 7765 4530 NINE = R2D1
042368,001465: 7765 7760 EIGHT EQUALS BIT4
042369,001466: 7765 00007 SEVEN OCT 7
042370,001467: 7766 6306 SIX EQUALS REVCNT
042371,001468: 7766 00005 FIVE OCT 5
042372,001469: 7767 7761 FOUR EQUALS BIT3
042373,001470: 7767 6311 THREE EQUALS OCTAL3
042374,001471: 7767 7762 TWO EQUALS BIT2
042375,001472: 7767 7763 ONE EQUALS BIT1
042376,001473: 7767 00000 ZERO OCT 0
042377,001474: 7770 77777 NEG0 OCT 77777
042378,001475: 7771 77776 NEGONE DEC -1 B-14
042379,001476:
042380,001477: 7772 7771 NEG1 = NEGONE
042381,001478: 7772 7771 MINUS1 EQUALS NEG1
042382,001479:
042383,001480: 5336 BLOCK 02
042384,001481:
042385,001482: 5336 77775 NEG2 OCT 77775
Page 998 |
042387,001484: 5337 01777 LOW10 OCT 1777
042388,001485: 5340 77774 NEG3 DEC -3 B-14
042389,001486: 5341 00777 LOW9 OCT 777
042390,001487: 5342 00177 LOW7 OCT 177
042391,001488: 5343 00017 LOW4 OCT 17
042392,001489: 5344 7765 LOW3 EQUALS SEVEN
042393,001490: 5344 6311 LOW2 EQUALS THREE
042394,001491:
042395,001492: 5344 00032 CALLCODE OCT 00032
042396,001493: 5345 40014 DLOADCOD OCT 40014
042397,001494: 5346 7745 VLOADCOD EQUALS BIT15
042398,001495: 5346 40015 DLOAD* OCT 40015
042399,001496: 5347 6153 VLOAD* EQUALS OCT40001
042400,001497: 5347 00112 LVBUF ADRES VBUF
042401,001498: 5350 5210 BIT13-14 = PRIO30
042402,001499: # THERE ARE FOUR POSSIBLE SETTINGS FOR CHANNEL 07 (WNACTV) FOR ACCESSING THE EVENTUALLY THREE AND ONE-HALF
042403,001500: # PRESENTLY ONE AND ONE-HALF SUPERBANKS.
042404,001501:
042405,001502: 5350 00060 SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011
042406,001503: 5351 7755 SUPER100 EQUALS BIT7 # BITS FOR SUPERBNK SETTING 100
042407,001504: # (LAST 4K OF ROPE)
042408,001505: # SUPER101 OCT 120 BITS FOR SUPERBNK SETTING 101
042409,001506: # (FIRST 8K OF ACM)
042410,001507: # SUPER110 OCT 140 BITS FOR SUPERBNK SETTING 110
042411,001508: # (LAST 8K OF ACM)
042412,001509: 5351 74000 HIGH4 OCT 74000
042413,001510: 5352 01400 OCT1400 OCT 01400
042414,001511: 5353 00055 DEC45 DEC 45 B-14
042415,001512:
Page 999 |
042417,001514: # THE FOLLOWING SHORT SHIFT CODES REQUIRE NO ADDRESS WORD:
042418,001515:
042419,001516: # 1. SR1 TO SR4 SCALAR SHIFT RIGHT.
042420,001517: # 2. SR1R TO SR4R SCALAR SHIFT RIGHT AND ROUND.
042421,001518: # 3. SL1 TO SL4 SCALAR SHIFT LEFT.
042422,001519: # 4. SL1R TO SL4R SCALAR SHIFT LEFT AND ROUND.
042423,001520:
042424,001521: # 5. VSR1 TO VSR8 VECTOR SHIFT RIGHT (ALWAYS ROUNDS).
042425,001522: # 6. VSL1 TO VSL8 VECTOR SHIFT LEFT (NEVER ROUNDS).
042426,001523:
042427,001524: # THE FOLLOWING CODES REQUIRE AN ADDRESS WHICH MAY BE INDEXED:*
042428,001525:
042429,001526: # 1. SR SCALAR SHIFT RIGHT.
042430,001527: # 2. SRR SCALAR SHIFT RIGHT AND ROUND.
042431,001528: # 3. SL SCALAR SHIFT LEFT.
042432,001529: # 4. SLR SCALAR SHIFT LEFT AND ROUND.
042433,001530:
042434,001531: # 5. VSR VECTOR SHIFT RIGHT.
042435,001532: # 6. VSL VECTOR SHIFT LEFT.
042436,001533:
042437,001534: # * IF THE ADDRESS IS INDEXED, AND THE INDEX MODIFICATION RESULTS IN A NEGATIVE SHIFT COUNT, A SHIFT OF THE
042438,001535: # ABSOLUTE VALUE OF THE COUNT IS DONE IN THE OPPOSITE DIRECTION.
042439,001536:
042440,001537: 00,2017 BANK 00
042441,001538:
042442,001539: 00,2017 36306 SHORTT CAF SIX # SCALAR SHORT SHIFTS COME HERE. THE SHIFT
042443,001540: 00,2020 70020 MASK CYR # COUNT-1 IS NOW IN BITS 2-3 OF CYR. THE
042444,001541: 00,2021 54021 TS SR # ROUNDING BIT IS IN BIT1 AT THIS POINT.
042445,001542:
042446,001543: 00,2022 10020 CCS CYR # SEE IF RIGHT OR LEFT SHIFT DESIRED.
042447,001544: 00,2023 12101 TCF TSSL # SHIFT LEFT.
042448,001545:
042449,001546: 00,2024 00024 SRDDV DEC 20 B-14 # MPTEMP SETTING FOR SR BEFORE DDV.
042450,001547:
042451,001548: 00,2025 50021 TSSR INDEX SR # GET SHIFTING BIT.
042452,001549: 00,2026 37746 CAF BIT14
042453,001550: 00,2027 54125 TS MPTEMP
042454,001551:
042455,001552: 00,2030 10020 CCS CYR # SEE IF A ROUND IS DESIRED.
042456,001553: 00,2031 02050 RIGHTR TC MPACSRND # YES - SHIFT RIGHT AND ROUND.
042457,001554: 00,2032 16124 TCF NEWMODE # SET MODE TO DP (C(A) = 0).
042458,001555: 00,2033 30125 MPACSHR CA MPTEMP # DO A TRIPLE PRECISION SHIFT RIGHT.
042459,001556: 00,2034 00006 EXTEND
042460,001557: 00,2035 70146 MP MPAC +2
042461,001558: 00,2036 54146 +3 TS MPAC +2 # (EXIT FROM SQRT AND ABVAL).
042462,001559: 00,2037 30125 CA MPTEMP
042463,001560: 00,2040 00006 EXTEND
042464,001561: 00,2041 70144 MP MPAC # SHIFT MAJOR PART INTO A,L AND PLACE IN
Page 1000 |
042466,001563: 00,2042 52145 DXCH MPAC # MPAC,+1.
042467,001564: 00,2043 30125 CA MPTEMP
042468,001565: 00,2044 00006 EXTEND
042469,001566: 00,2045 70001 MP L # ORIGINAL C(MPAC +1).
042470,001567: 00,2046 20146 DAS MPAC +1 # GUARANTEED NO OVERFLOW.
042471,001568: 00,2047 16125 TCF DANZIG
042472,001569:
042473,001570: # MPAC SHIFT RIGHT AND ROUND SUBROUTINES.
042474,001571:
042475,001572: 00,2050 30146 MPACSRND CA MPAC +2 # WE HAVE TO DO ALL THREE MULTIPLIES SINCE
042476,001573: 00,2051 00006 EXTEND # MPAC +1 AND MPAC +2 MIGHT HAVE SIGN
042477,001574: 00,2052 70125 MP MPTEMP # DISAGREEMENT WITH A SHIFT RIGHT OF 1.
042478,001575: 00,2053 56145 XCH MPAC +1
042479,001576: 00,2054 00006 EXTEND
042480,001577: 00,2055 70125 MP MPTEMP
042481,001578: 00,2056 56145 XCH MPAC +1 # TRIAL MINOR PART.
042482,001579: 00,2057 60001 AD L
042483,001580:
042484,001581: 00,2060 60000 VSHR2 DOUBLE # (FINISH VECTOR COMPONENT SHIFT RIGHT
042485,001582: 00,2061 54146 TS MPAC +2 # AND ROUND.
042486,001583: 00,2062 12064 TCF +2
042487,001584: 00,2063 26145 ADS MPAC +1 # GUARANTEED NO OVERFLOW.
042488,001585:
042489,001586: 00,2064 37767 CAF ZERO
042490,001587: 00,2065 54146 TS MPAC +2
042491,001588: 00,2066 56144 XCH MPAC # SETTING TO ZERO SO FOLLOWING DAS WORKS.
042492,001589: 00,2067 00006 EXTEND
042493,001590: 00,2070 70125 MP MPTEMP
042494,001591: 00,2071 20145 DAS MPAC # AGAIN NO OVERFLOW.
042495,001592: 00,2072 00002 TC Q
042496,001593:
042497,001594: 00,2073 30125 VSHRRND CA MPTEMP # ENTRY TO SHIFT RIGHT AND ROUND MPAC WHEN
042498,001595: 00,2074 00006 EXTEND # MPAC CONTAINS A VECTOR COMPONENT.
042499,001596: 00,2075 70145 MP MPAC +1
042500,001597: 00,2076 54145 TS MPAC +1
042501,001598: 00,2077 56001 XCH L
042502,001599: 00,2100 12060 TCF VSHR2 # GO ADD ONE IF NECESSARY AND FINISH.
042503,001600:
Page 1001 |
042505,001602: # ROUTINE FOR SHORT SCALAR SHIFT LEFT (AND MAYBE ROUND).
042506,001603:
042507,001604: 00,2101 30021 TSSL CA SR # GET SHIFT COUNT FOR SR.
042508,001605: 00,2102 54125 +1 TS MPTEMP
042509,001606:
042510,001607: 00,2103 00006 +2 EXTEND # ENTRY HERE FROM SL FOR SCALARS.
042511,001608: 00,2104 30146 DCA MPAC +1 # SHIFTING LEFT ONE PLACE AT A TIME IS
042512,001609: 00,2105 20146 DAS MPAC +1 # FASTER THAN DOING THE WHOLE SHIFT WITH
042513,001610: 00,2106 60144 AD MPAC # MULTIPLIES ASSUMING THAT FREQUENCY OF
042514,001611: 00,2107 60144 AD MPAC # SHIFT COUNTS GOES DOWN RAPIDLY AS A
042515,001612: 00,2110 54144 TS MPAC # FUNCTION OF THEIR MAGNITUDE.
042516,001613: 00,2111 12113 TCF +2
042517,001614: 00,2112 54111 TS OVFIND # OVERFLOW. (LEAVES OVERFLOW-CORRECTED
042518,001615: # RESULT ANYWAY).
042519,001616: 00,2113 10125 CCS MPTEMP # LOOP ON DECREMENTED SHIFT COUNT.
042520,001617: 00,2114 12102 TCF TSSL +1
042521,001618:
042522,001619: 00,2115 10020 CCS CYR # SEE IF ROUND WANTED.
042523,001620: 00,2116 07210 ROUND TC ROUNDSUB # YES - ROUND AND EXIT.
042524,001621: 00,2117 16125 TCF DANZIG # SL LEAVES A ZERO IN CYR FOR NO ROUND.
042525,001622: 00,2120 16125 TCF DANZIG # NO - EXIT IMMEDIATL
042526,001623:
Page 1002 |
042528,001625: # VECTOR SHIFTING ROUTINES.
042529,001626:
042530,001627: 00,2121 37765 SHORTV CAF LOW3 # SAVE 3 BIT SHIFT COUNT - 1 WITHOUT
042531,001628: 00,2122 70020 MASK CYR # EDITING CYR.
042532,001629: 00,2123 54125 TS MPTEMP
042533,001630: 00,2124 10020 CCS CYR # SEE IF LEFT OR RIGHT SHIFT.
042534,001631: 00,2125 12145 TCF VSSL # VECTOR SHIFT LEFT.
042535,001632: 00,2126 00176 OCT176 OCT 176 # USED IN PROCESSED SHIFTS WITH - COUNT.
042536,001633:
042537,001634: 00,2127 50125 VSSR INDEX MPTEMP # (ENTRY FROM SR). PICK UP SHIFTING BIT.
042538,001635: 00,2130 37746 CAF BIT14 # MPTEMP CONTAINS THE SHIFT COUNT - 1.
042539,001636: 00,2131 54125 TS MPTEMP
042540,001637: 00,2132 02073 TC VSHRRND # SHIFT X COMPONENT.
042541,001638:
042542,001639: 00,2133 52145 DXCH MPAC # SWAP X AND Y COMPONENTS.
042543,001640: 00,2134 52150 DXCH MPAC +3
042544,001641: 00,2135 52145 DXCH MPAC
042545,001642: 00,2136 02073 TC VSHRRND # SHIFT Y COMPONENT.
042546,001643:
042547,001644: 00,2137 52145 DXCH MPAC # SWAP Y AND Z COMPONENTS.
042548,001645: 00,2140 52152 DXCH MPAC +5
042549,001646: 00,2141 52145 DXCH MPAC
042550,001647: 00,2142 02073 TC VSHRRND # SHIFT Z COMPONENT.
042551,001648:
042552,001649: 00,2143 17477 TCF VROTATEX # RESTORE COMPONENTS TO PROPER PLACES.
042553,001650:
Page 1003 |
042555,001652: # VECTOR SHIFT LEFT - DONE ONE PLACE AT A TIME.
042556,001653:
042557,001654: 00,2144 54125 -1 TS MPTEMP # SHIFTING LOOP.
042558,001655:
042559,001656: 00,2145 00006 VSSL EXTEND
042560,001657: 00,2146 30145 DCA MPAC
042561,001658: 00,2147 20145 DAS MPAC
042562,001659: 00,2150 00006 EXTEND
042563,001660: 00,2151 12153 BZF +2
042564,001661: 00,2152 07101 TC OVERFLOW
042565,001662:
042566,001663: 00,2153 00006 EXTEND
042567,001664: 00,2154 30150 DCA MPAC +3
042568,001665: 00,2155 20150 DAS MPAC +3
042569,001666: 00,2156 00006 EXTEND
042570,001667: 00,2157 12161 BZF +2
042571,001668: 00,2160 07101 TC OVERFLOW
042572,001669:
042573,001670: 00,2161 00006 EXTEND
042574,001671: 00,2162 30152 DCA MPAC +5
042575,001672: 00,2163 20152 DAS MPAC +5
042576,001673: 00,2164 00006 EXTEND
042577,001674: 00,2165 12167 BZF +2
042578,001675: 00,2166 07101 TC OVERFLOW
042579,001676:
042580,001677: 00,2167 10125 CCS MPTEMP # LOOP ON DECREMENTED SHIFT COUNTER.
042581,001678: 00,2170 12144 TCF VSSL -1
042582,001679: 00,2171 16125 TCF DANZIG # EXIT.
042583,001680:
Page 1004 |
042585,001682: # TSLC - TRIPLE SHIFT LEFT AND COUNT. SHIFTS MPAC LEFT UNTIL GREATER THAN .5 IN MAGNITUDE, LEAVING
042586,001683: # THE COMPLEMENT OF THE NUMBER OF SHIFTS REQUIRED IN X.
042587,001684:
042588,001685: 00,2172 54125 TSLC2 TS MPTEMP # START BY ZEROING SHIFT COUNT (IN A NOW).
042589,001686: 00,2173 07001 TC BRANCH # EXIT WITH NO SHIFTING IF ARGUMENT ZERO.
042590,001687: 00,2174 12176 TCF +2
042591,001688: 00,2175 12212 TCF ENDTSLC # STORES ZERO SHIFT COUNT IN THIS CASE.
042592,001689:
042593,001690: 00,2176 07327 TC TPAGREE # MAY CAUSE UPSHIFT OF ONE EXTRA PLACE.
042594,001691:
042595,001692: 00,2177 30144 CA MPAC # BEGIN NORMALIZATION LOOP.
042596,001693: 00,2200 12207 TCF TSLCTEST
042597,001694:
042598,001695: 00,2201 24125 TSLCLOOP INCR MPTEMP # INCREMENT SHIFT COUNTER.
042599,001696: 00,2202 00006 EXTEND
042600,001697: 00,2203 30146 DCA MPAC +1
042601,001698: 00,2204 20146 DAS MPAC +1
042602,001699: 00,2205 60144 AD MPAC
042603,001700: 00,2206 26144 ADS MPAC
042604,001701: 00,2207 60000 TSLCTEST DOUBLE # SEE IF (ANOTHER) SHIFT IS REQUIRED.
042605,001702: 00,2210 54000 OVSK
042606,001703: 00,2211 12201 TCF TSLCLOOP # YES - INCREMENT COUNT AND SHIFT AGAIN.
042607,001704:
042608,001705: 00,2212 40125 ENDTSLC CS MPTEMP
042609,001706: 00,2213 16701 TCF STORE1 # STORE SHIFT COUNT AND RETURN TO DANZIG.
042610,001707:
Page 1005 |
042612,001709: # THE FOLLOWING ROUTINES PROCESSES THE GENERAL SHIFT INSTRUCTIONS SR, SRR, SL, AND SLR.
042613,001710: # THE GIVEN ADDRESS IS DECODED AS FOLLOWS:
042614,001711:
042615,001712: # BITS 1-7 SHIFT COUNT (SUBADDRESS) LESS THAN 125 DECIMAL.
042616,001713: # BIT 8 PSEUDO SIGN BIT (DETECTS CHANGE IN SIGN IN INDEXED SHIFTS).
042617,001714: # BIT 9 0 FOR LEFT SHIFT, AND 1 FOR RIGHT SHIFT.
042618,001715: # BIT 10 1 FOR TERMINAL ROUND ON SCALAR SHIFTS, 0 OTHERWISE.
042619,001716: # BITS 11-13 0.
042620,001717: # BIT 14 1.
042621,001718: # BIT 15 0.
042622,001719:
042623,001720: # THE ABOVE ENCODING IS DONE BY THE YUL SYSTEM.
042624,001721:
042625,001722:
042626,001723: 00,2214 70106 GENSHIFT MASK ADDRWD # GET SHIFT COUNT, TESTING FOR ZERO.
042627,001724: 00,2215 10000 CCS A # (ARRIVES WITH C(A) = LOW7).
042628,001725: 00,2216 12224 TCF GENSHFT2 # IF NON-ZERO, PROCEED WITH DECREMENTED CT
042629,001726:
042630,001727: 00,2217 37752 CAF BIT10 # ZERO SHIFT COUNT. NO SHIFTS NEEDED BUT
042631,001728: 00,2220 70106 MASK ADDRWD # WE MIGHT HAVE TO ROUND MPAC ON SLR AND
042632,001729: 00,2221 10000 CCS A # SRR (SCALAR ONLY).
042633,001730: 00,2222 07210 TC ROUNDSUB
042634,001731: 00,2223 16125 TCF DANZIG
042635,001732:
042636,001733: 00,2224 54125 GENSHFT2 TS MPTEMP # DECREMENTED SHIFT COUNT TO MPTEMP.
042637,001734: 00,2225 37754 CAF BIT8 # TEST MEANING OF LOW SEVEN BIT COUNT IN
042638,001735: 00,2226 00006 EXTEND # MPTEMP NOW.
042639,001736: 00,2227 70106 MP ADDRWD
042640,001737: 00,2230 76311 MASK LOW2 # JUMPS ON SHIFT DIRECTION (BIT8) AND
042641,001738: 00,2231 50000 INDEX A
042642,001739: 00,2232 12233 TCF +1 # ORIGINAL SHIFT DIRECTION (BIT 9).
042643,001740: 00,2233 12332 TCF RIGHT- # NEGATIVE SHIFT COUNT FOR SL OR SLR.
042644,001741: 00,2234 12341 TCF LEFT # SL OR SLR.
042645,001742: 00,2235 12336 TCF LEFT- # NEGATIVE SHIFT COUNT WITH SR OR SRR.
042646,001743:
Page 1006 |
042648,001745: # GENERAL SHIFT RIGHT.
042649,001746:
042650,001747: 00,2236 10153 RIGHT CCS MODE # SEE IF VECTOR OR SCALAR.
042651,001748: 00,2237 12277 TCF GENSCR
042652,001749: 00,2240 12277 TCF GENSCR
042653,001750:
042654,001751: 00,2241 30125 CA MPTEMP # SEE IF SHIFT COUNT LESS THAN 14D.
042655,001752: 00,2242 63710 VRIGHT2 AD NEG12
042656,001753: 00,2243 00006 EXTEND
042657,001754: 00,2244 62127 BZMF VSSR # IF SO, BRANCH AND SHIFT IMMEDIATELY.
042658,001755:
042659,001756: 00,2245 67771 AD NEGONE # IF NOT, REDUCE MPTEMP BY A TOTAL OF 14,
042660,001757: 00,2246 54125 TS MPTEMP # AND DO A SHIFT RIGHT AND ROUND BY 14.
042661,001758: 00,2247 37767 CAF ZERO # THE ROUND AT THIS STAGE MAY INTRODUCE A
042662,001759: 00,2250 54001 TS L # ONE BIT ERROR IN A SHIFT RIGHT 15D.
042663,001760: 00,2251 56144 XCH MPAC
042664,001761: 00,2252 56145 XCH MPAC +1
042665,001762: 00,2253 02272 TC SETROUND # X COMPONENT NOW SHIFTED, SO MAKE UP THE
042666,001763: 00,2254 20145 DAS MPAC # ROUNDING QUANTITY (0 IN A AND 0 OR +-1
042667,001764: # IN L).
042668,001765: 00,2255 56147 XCH MPAC +3 # REPEAT THE ABOVE PROCESS FOR Y AND Z.
042669,001766: 00,2256 56150 XCH MPAC +4
042670,001767: 00,2257 02272 TC SETROUND
042671,001768: 00,2260 20150 DAS MPAC +3 # NO OVERFLOW ON THESE ADDS.
042672,001769:
042673,001770: 00,2261 56151 XCH MPAC +5
042674,001771: 00,2262 56152 XCH MPAC +6
042675,001772: 00,2263 02272 TC SETROUND
042676,001773: 00,2264 20152 DAS MPAC +5
042677,001774:
042678,001775: 00,2265 10125 CCS MPTEMP # SEE IF DONE, DOING FINAL DECREMENT.
042679,001776: 00,2266 54125 TS MPTEMP
042680,001777: 00,2267 12242 TCF VRIGHT2
042681,001778: 00,2270 04604 BIASLO DEC .2974 B-1 # SQRT CONSTANT
042682,001779:
042683,001780: 00,2271 16125 TCF DANZIG
042684,001781:
042685,001782:
042686,001783: 00,2272 60000 SETROUND DOUBLE # MAKES UP ROUNDING QUANTITY FROM ARRIVING
042687,001784: 00,2273 54146 TS MPAC +2 # C(A). L IS ZERO INITIALLY.
042688,001785: 00,2274 37767 CAF ZERO
042689,001786: 00,2275 56001 XCH L
042690,001787: 00,2276 00002 TC Q # RETURN AND DO THE DAS, RESETTING L TO 0.
042691,001788:
Page 1007 |
042693,001790: # PROCESS SR AND SRR FOR SCALARS.
042694,001791:
042695,001792: 00,2277 30125 GENSCR CA MPTEMP # SEE IF THE ORIGINAL SHIFT COUNT WAS LESS
042696,001793: 00,2300 63710 +1 AD NEG12 # THAN 14D.
042697,001794: 00,2301 00006 EXTEND
042698,001795: 00,2302 62322 BZMF DOSSHFT # DO THE SHIFT IMMEDIATELY IF SO.
042699,001796:
042700,001797: 00,2303 67771 +4 AD NEGONE # IF NOT, DECREMENT SHIFT COUNT BY 14D AND
042701,001798: 00,2304 54125 TS MPTEMP # SHIFT MPAC RIGHT 14 PLACES.
042702,001799: 00,2305 37767 CAF ZERO
042703,001800: 00,2306 56144 XCH MPAC
042704,001801: 00,2307 56145 XCH MPAC +1
042705,001802: 00,2310 54146 TS MPAC +2
042706,001803: 00,2311 10125 CCS MPTEMP # SEE IF FINISHED, DO FINAL DECREMENT.
042707,001804: 00,2312 54125 TS MPTEMP
042708,001805: 00,2313 02300 TC GENSCR +1
042709,001806: 00,2314 22650 SLOPEHI DEC .5884 # SQRT CONSTANT.
042710,001807: 00,2315 37752 CAF BIT10 # FINISHED WITH SHIFT. SEE IF ROUND
042711,001808: 00,2316 70106 MASK ADDRWD # WANTED.
042712,001809: 00,2317 10000 CCS A
042713,001810: 00,2320 07210 TC ROUNDSUB
042714,001811: 00,2321 16125 TCF DANZIG # DO SO AND/OR EXIT.
042715,001812:
042716,001813: 00,2322 50125 DOSSHFT INDEX MPTEMP # PICK UP SHIFTING BIT.
042717,001814: 00,2323 37746 CAF BIT14
042718,001815: 00,2324 54125 TS MPTEMP
042719,001816: 00,2325 37752 CAF BIT10 # SEE IF TERMINAL ROUND DESIRED.
042720,001817: 00,2326 70106 MASK ADDRWD
042721,001818: 00,2327 10000 CCS A
042722,001819: 00,2330 12031 TCF RIGHTR # YES.
042723,001820: 00,2331 12033 TCF MPACSHR # JUST SHIFT RIGHT.
042724,001821:
Page 1008 |
042726,001823: # PROCESS THE RIGHT- (SL(R) WITH A NEGATIVE COUNT), LEFT-, AND LEFT OPTIONS.
042727,001824:
042728,001825: 00,2332 40125 RIGHT- CS MPTEMP # GET ABSOLUTE VALUE - 1 OF SHIFT COUNT
042729,001826: 00,2333 62126 AD OCT176 # UNDERSTANDING THAT BIT8 (PSEUDO-SIGN)
042730,001827: 00,2334 54125 TS MPTEMP # WAS 1 INITIALLY.
042731,001828: 00,2335 12236 TCF RIGHT # DO NORMAL SHIFT RIGHT.
042732,001829:
042733,001830: 00,2336 40125 LEFT- CS MPTEMP # SAME PROLOGUE TO LEFT FOR INDEXED RIGHT
042734,001831: 00,2337 62126 AD OCT176 # SHIFTS WHOSE NET SHIFT COUNT IS NEGATIVE
042735,001832: 00,2340 54125 TS MPTEMP
042736,001833:
042737,001834: 00,2341 10153 LEFT CCS MODE # SINCE LEFT SHIFTING IS SONE ONE PLACE AT
042738,001835: 00,2342 12345 TCF GENSCL # A TIME, NO COMPARISON WITH 14 NEED BE
042739,001836: 00,2343 12345 TCF GENSCL # DONE. FOR SCALARS, SEE IF TERMINAL ROUND
042740,001837: 00,2344 12145 TCF VSSL # DESIRED. FOR VECTORS, SHIFT IMMEDIATELY.
042741,001838:
042742,001839: 00,2345 37756 GENSCL CAF BIT6 # PUT ROUNDING BIT (BIT10 OF ADDRWD) INTO
042743,001840: 00,2346 00006 EXTEND # BIT 15 OF CYR WHERE THE ROUNDING BIT OF
042744,001841: 00,2347 70106 MP ADDRWD # A SHORT SHIFT LEFT WOULD BE.
042745,001842: 00,2350 54020 TS CYR
042746,001843: 00,2351 12103 TCF TSSL +2 # DO THE SHIFT.
042747,001844:
Page 1009 |
042749,001846: # SCALAR DIVISION INSTRUCTIONS, DDV AND BDDV, ARE EXECUTED HERE. AT THIS POINT, THE DIVIDEND IS IN MPAC
042750,001847: # AND THE DIVISOR IN BUF.
042751,001848:
042752,001849: 00,2352 47763 DDV/BDDV CS ONE # INITIALIZATION.
042753,001850: 00,2353 54126 TS DVSIGN # +-1 FOR POSITIVE QUOTIENT - -0 FOR NEG.
042754,001851: 00,2354 54127 TS DVNORMCT # DIVIDEND NORMALIZATION COUNT.
042755,001852: 00,2355 54130 TS MAXDVSW # NEAR-ONE DIVIDE FLAG.
042756,001853:
042757,001854: 00,2356 10120 CCS BUF # FORCE BUF POSITIVE WITH THE MAJOR PART
042758,001855: 00,2357 13712 TCF BUFPOS # NON-ZERO.
042759,001856: 00,2360 12362 TCF +2
042760,001857: 00,2361 13725 TCF BUFNEG
042761,001858:
042762,001859: 00,2362 54146 BUFZERO TS MPAC +2 # ZERO THIS.
042763,001860: 00,2363 07327 TC TPAGREE # FORCE SIGN AGREEMENT BEFORE OVERFLOW
042764,001861:
042765,001862: 00,2364 10144 CCS MPAC # TEST TO SEE IF MPAC NON-ZERO. (TOO BIG)
042766,001863: 00,2365 12412 TCF OVF+ # MAJOR PART OF DIVIDEND IS POSITIVE NON-0
042767,001864: 00,2366 12370 TCF +2
042768,001865: 00,2367 12411 TCF OVF+ -1 # MAJOR PART OF DIVIDEND IS NEG. NON-ZERO
042769,001866:
042770,001867: 00,2370 56121 XCH BUF +1 # SHIFT DIVIDEND AND DIVISOR LEFT 14.
042771,001868: 00,2371 56120 XCH BUF
042772,001869: 00,2372 56145 XCH MPAC +1
042773,001870: 00,2373 56144 XCH MPAC
042774,001871: 00,2374 10120 CCS BUF # TRY AGAIN ON FORMER MINOR PART.
042775,001872: 00,2375 12420 TCF BUF+
042776,001873: 00,2376 12400 TCF +2 # OVERFLOW ON ZERO DIVISOR.
042777,001874: 00,2377 12414 TCF BUF-
042778,001875:
042779,001876: 00,2400 40144 CS MPAC # SIGN OF MPAC DETERMINES SIGN OF RESULT.
042780,001877: 00,2401 00006 SGNDVOVF EXTEND
042781,001878: 00,2402 62404 BZMF +2
042782,001879: 00,2403 24126 INCR DVSIGN # NEGMAX IN MPAC PERHAPS.
042783,001880: 00,2404 37743 DVOVF CAF POSMAX # ON DIVISION OVERFLOW OF ANY SORT, SET
042784,001881: 00,2405 54144 TS MPAC # SET DP MPAC TO +-POSMAX.
042785,001882: 00,2406 02604 TC FINALDV +3
042786,001883: 00,2407 37763 CAF ONE # SET OVERFLOW INDICATOR AND EXIT.
042787,001884: 00,2410 17153 TCF SETOVF
042788,001885:
042789,001886: 00,2411 24126 -1 INCR DVSIGN
042790,001887: 00,2412 40121 OVF+ CS BUF +1 # LOAD LOWER ORDER PART OF DIVISOR.
042791,001888: 00,2413 12401 TCF SGNDVOVF # GET SIGN OF RESULT.
042792,001889:
042793,001890: 00,2414 00006 BUF- EXTEND # IF BUF IS NEGATIVE, COMPLEMENT IT AND
042794,001891: 00,2415 40121 DCS BUF # MAINTAIN DVSIGN FOR FINAL QUOTIENT SIGN.
042795,001892: 00,2416 52121 DXCH BUF
042796,001893: 00,2417 24126 INCR DVSIGN # NOW -0.
042797,001894:
042798,001895: 00,2420 10144 BUF+ CCS MPAC # FORCE MPAC POSITIVE, CHECKING FOR ZERO
Page 1010 |
042800,001897: 00,2421 12435 TCF MPAC+ # DIVIDEND IN THE PROCESS.
042801,001898: 00,2422 12424 TCF +2
042802,001899: 00,2423 12431 TCF MPAC-
042803,001900: 00,2424 10145 CCS MPAC +1
042804,001901: 00,2425 12435 TCF MPAC+
042805,001902: 00,2426 16125 TCF DANZIG # EXIT IMMEDIATELY ON ZERO DIVIDEND.
042806,001903: 00,2427 12431 TCF MPAC-
042807,001904: 00,2430 16125 TCF DANZIG
042808,001905:
042809,001906: 00,2431 00006 MPAC- EXTEND # FORCE MPAC POSITIVE AS BUF IN BUF-.
042810,001907: 00,2432 40145 DCS MPAC
042811,001908: 00,2433 52145 DXCH MPAC
042812,001909: 00,2434 24126 INCR DVSIGN # NOW +1 OR -0.
042813,001910:
Page 1011 |
042815,001912: 00,2435 40144 MPAC+ CS MPAC # CHECK FOR DIVISION OVERFLOW. IF THE
042816,001913: 00,2436 67771 AD NEGONE # MAJOR PART OF THE DIVIDEND IS LESS THAN
042817,001914: 00,2437 60120 AD BUF # THE MAJOR PART OF THE DIVISOR BY AT
042818,001915: 00,2440 10000 CCS A # LEAST TWO, WE CAN PROCEED IMMEDIATELY
042819,001916: 00,2441 12503 TCF DVNORM # WITHOUT NORMALIZATION PRODUCING A DVMAX.
042820,001917: 00,2442 60001 -1/2+2 OCT 60001 # USED IN SQRTSUB.
042821,001918:
042822,001919: 00,2443 12444 TCF +1 # IF THE ABOVE DOES NOT HOLD, FORCE SIGN
042823,001920: 00,2444 37746 CAF HALF # AGREEMENT IN NUMERATOR AND DENOMINATOR
042824,001921: 00,2445 60000 DOUBLE # TO FACILITATE OVERFLOW AND NEAR-ONE
042825,001922: 00,2446 60145 AD MPAC +1 # CHECKING.
042826,001923: 00,2447 54145 TS MPAC +1
042827,001924: 00,2450 37767 CAF ZERO
042828,001925: 00,2451 67743 AD POSMAX
042829,001926: 00,2452 26144 ADS MPAC
042830,001927:
042831,001928: 00,2453 37746 CAF HALF # SAME FOR BUF.
042832,001929: 00,2454 60000 DOUBLE
042833,001930: 00,2455 60121 AD BUF +1
042834,001931: 00,2456 54121 TS BUF +1
042835,001932: 00,2457 37767 CAF ZERO
042836,001933: 00,2460 67743 AD POSMAX
042837,001934: 00,2461 26120 ADS BUF
042838,001935:
042839,001936: 00,2462 40144 CS MPAC # CHECK MAGNITUDE OF SIGN-CORRECTED
042840,001937: 00,2463 60120 AD BUF # OPERANDS.
042841,001938: 00,2464 10000 CCS A
042842,001939: 00,2465 12503 TCF DVNORM # DIVIDE OK - WILL NOT BECOME MAXDV CASE.
042843,001940: 00,2466 00123 LBUF2 ADRES BUF2
042844,001941: 00,2467 12404 TCF DVOVF # DIVISOR NOT LESS THAN DIVIDEND - OVF.
042845,001942:
042846,001943: 00,2470 54130 TS MAXDVSW # IF THE MAJOR PARTS OF THE DIVIDEND AND
042847,001944: 00,2471 40145 CS MPAC +1 # DIVISOR ARE EQUAL, A SPECIAL APPROXIMA-
042848,001945: 00,2472 60121 AD BUF +1 # TION IS USED (PROVIDED THE DIVISION IS
042849,001946: 00,2473 00006 EXTEND # POSSIBLE, OF COURSE).
042850,001947: 00,2474 62404 BZMF DVOVF
042851,001948: 00,2475 12503 TCF DVNORM # IF NO OVERFLOW.
042852,001949:
Page 1012 |
042854,001951: 00,2476 00006 BUFNORM EXTEND # ADD -1 TO AUGMENT SHIFT COUNT AND SHIFT
042855,001952: 00,2477 24127 AUG DVNORMCT # LEFT ONE PLACE.
042856,001953: 00,2500 00006 EXTEND
042857,001954: 00,2501 30121 DCA BUF
042858,001955: 00,2502 20121 DAS BUF
042859,001956:
042860,001957: 00,2503 30120 DVNORM CA BUF # SEE IF DIVISOR NORMALIZED YET.
042861,001958: 00,2504 60000 DOUBLE
042862,001959: 00,2505 54000 OVSK
042863,001960: 00,2506 12476 TCF BUFNORM # NO - SHIFT LEFT ONE AND TRY AGAIN.
042864,001961:
042865,001962: 00,2507 52145 DXCH MPAC # CALL DIVIDEND NORMALIZATION SEQUENCE
042866,001963: 00,2510 50127 INDEX DVNORMCT # PRIOR TO DOING THE DIVIDE.
042867,001964: 00,2511 02541 TC MAXTEST
042868,001965:
042869,001966: 00,2512 54146 TS MPAC +2 # RETURNS WITH DIVISION DONE AND C(A) = 0.
042870,001967: 00,2513 16125 TCF DANZIG
042871,001968:
Page 1013 |
042873,001970: # THE FOLLOWING ARE PROLOGUES TO SHIFT THE DIVIDEND ARRIVING IN A AND L BEFORE THE DIVIDE.
042874,001971:
042875,001972: 00,2514 22021 -21D LXCH SR # SPECIAL PROLOGUE FOR UNIT WHEN THE
042876,001973: 00,2515 00006 EXTEND # LENGTH OF THE ARGUMENT WAS NOT LESS THAN
042877,001974: 00,2516 77746 MP HALF # .5. IN THIS CASE, EACH COMPONENT MUST BE
042878,001975: 00,2517 56001 XCH L # SHIFTED RIGHT ONE TO PRODUCE A HALF-UNIT
042879,001976: 00,2520 60021 AD SR # VECTOR.
042880,001977: 00,2521 56001 XCH L
042881,001978: 00,2522 12545 TCF GENDDV +1 # WITH DP DIVIDEND IN A,L.
042882,001979:
042883,001980: 00,2523 20001 DDOUBL # PROLOGUE WHICH NORMALIZES THE DIVIDEND
042884,001981: 00,2524 20001 DDOUBL # WHEN IT IS KNOWN THAT NO DIVISION
042885,001982: 00,2525 20001 DDOUBL # OVERFLOW WILL OCCUR.
042886,001983: 00,2526 20001 DDOUBL
042887,001984: 00,2527 20001 DDOUBL
042888,001985: 00,2530 20001 DDOUBL
042889,001986: 00,2531 20001 DDOUBL
042890,001987: 00,2532 20001 DDOUBL
042891,001988: 00,2533 20001 DDOUBL
042892,001989: 00,2534 20001 DDOUBL
042893,001990: 00,2535 20001 DDOUBL
042894,001991: 00,2536 20001 DDOUBL
042895,001992: 00,2537 20001 DDOUBL
042896,001993: 00,2540 52145 DXCH MPAC
042897,001994:
042898,001995: 00,2541 10130 MAXTEST CCS MAXDVSW # 0 IF MAJORS MIGHT BE =, -1 OTHERWISE.
042899,001996: 00,2542 06552 BIASHI DEC .4192 B-1 # SQRT CONSTANTS
042900,001997:
042901,001998: 00,2543 12616 TCF MAXDV # CHECK TO SEE IF THEY ARE NOW EQUAL.
042902,001999:
Page 1014 |
042904,002001: # THE FOLLOWING IS A GENERAL PURPOSE DOUBLE PRECISION DIVISION ROUTINE. IT DIVIDES MPAC BY BUF AND LEAVES
042905,002002: # THE RESULT IN MPAC. THE FOLLOWING CONDITIONS MUST BE SATISFIED:
042906,002003:
042907,002004: # 1. THE DIVISOR (BUF) MUST BE POSITIVE AND NOT LESS THAN .5.
042908,002005:
042909,002006: # 2. THE DIVIDEND (MPAC) MUST BE POSITIVE WITH THE MAJOR PART OF MPAC STRICTLY LESS THAN THAT OF BUF
042910,002007: # (A SPECIAL APPROXIMATION, MAXDV, IS USED WHEN THE MAJOR PARTS ARE EQUAL).
042911,002008:
042912,002009: # UNDERSTANDING THAT A/B = Q + S(R/B) WHERE S = 2(-14) AND Q AND R ARE QUOTIENT AND REMAINDER, RESPEC-
042913,002010: # TIVELY, THE FOLLOWING APPROXIMATION IS OBTAINED BY MULTIPLYING ABOVE AND BELOW BY C - SD AND NEGLECTING TERMS OF
042914,002011: # ORDER S-SQUARED (POSSIBLY INTRODUCING ERROR INTO THE LOW TWO BITS OF THE RESULT). SIGN AGREEMENT IS UNNECESSARY.
042915,002012:
042916,002013: # A + SB . (R - QD) A + SB
042917,002014: # ------ = Q + S(------) WHERE Q AND R ARE QUOTIENT AND REMAINDER OF ------ RESPECTIVELY.
042918,002015: # C + SD ( C ) C
042919,002016:
042920,002017:
042921,002018: 00,2544 52145 GENDDV DXCH MPAC # WE NEED A AND B ONLY FOR FIRST DV.
042922,002019: 00,2545 00006 +1 EXTEND # (SPECIAL UNIT PROLOGUE ENTERS HERE).
042923,002020: 00,2546 10120 DV BUF # A NOW CONTAINS Q AND L, R.
042924,002021: 00,2547 52145 DXCH MPAC
042925,002022:
042926,002023: 00,2550 40144 CS MPAC # FORM DIVIDEND FOR MINOR PART OF RESULT.
042927,002024: 00,2551 00006 EXTEND
042928,002025: 00,2552 70121 MP BUF +1
042929,002026: 00,2553 60145 AD MPAC +1 # OVERFLOW AT THIS POINT IS POSITIVE SINCE
042930,002027: 00,2554 54000 OVSK # R IS POSITIVE IN EVERY CASE.
042931,002028: 00,2555 12562 TCF +5
042932,002029:
042933,002030: 00,2556 00006 EXTEND # OVERFLOW CAN BE REMOVED BY SUBTRACTING C
042934,002031: 00,2557 60120 SU BUF # (BUF) ONCE SINCE R IS ALWAYS LESS THAN C
042935,002032: 00,2560 24144 INCR MPAC # IN THIS CASE. INCR COMPENSATES SUBTRACT.
042936,002033: 00,2561 12564 TCF +DOWN # (SINCE C(A) IS STILL POSITIVE).
042937,002034:
042938,002035: 00,2562 00006 +5 EXTEND # C(A) CAN BE MADE LESS THAN C IN MAGNI-
042939,002036: 00,2563 62574 BZMF -UP # TUDE BY DIMINISHING IT BY C (SINCE C IS
042940,002037: # NOT LESS THAN .5) UNLESS C(A) = 0.
042941,002038:
Page 1015 |
042943,002040: 00,2564 00006 +DOWN EXTEND
042944,002041: 00,2565 60120 SU BUF # IF POSITIVE, REDUCE ONLY IF NECESSARY
042945,002042: 00,2566 00006 EXTEND # SINCE THE COMPENSATING INCR MIGHT CAUSE
042946,002043: 00,2567 12572 BZF +3 # OVERFLOW.
042947,002044: 00,2570 00006 EXTEND # DONT SUBTRACT UNLESS RESULT IS POSITIVE
042948,002045: 00,2571 62600 BZMF ENDMAXDV # OR ZERO.
042949,002046:
042950,002047: 00,2572 24144 +3 INCR MPAC # KEEP SUBTRACT HERE AND COMPENSATE.
042951,002048: 00,2573 12601 TCF FINALDV
042952,002049:
042953,002050: 00,2574 00006 -UP EXTEND # IF ZERO, SET MINOR PART OF RESULT TO
042954,002051: 00,2575 12604 BZF FINALDV +3 # ZERO.
042955,002052:
042956,002053: 00,2576 00006 EXTEND # IF NEGATIVE, ADD C TO A, SUBTRACTING ONE
042957,002054: 00,2577 26144 DIM MPAC # TO COMPENSATE. DIM IS OK HERE SINCE THE
042958,002055: 00,2600 60120 ENDMAXDV AD BUF # MAJOR PART NEVER GOES NEGATIVE.
042959,002056:
Page 1016 |
042961,002058: 00,2601 22007 FINALDV ZL # DO DV TO OBTAIN MINOR PART OF RESULT.
042962,002059: 00,2602 00006 EXTEND
042963,002060: 00,2603 10120 DV BUF
042964,002061: 00,2604 54145 +3 TS MPAC +1
042965,002062:
042966,002063: 00,2605 10126 CCS DVSIGN # LEAVE RESULT POSITIVE UNLESS C(DVSIGN)=
042967,002064: 00,2606 00002 TC Q # -0.
042968,002065: 00,2607 00002 TC Q
042969,002066: 00,2610 00002 TC Q
042970,002067:
042971,002068: 00,2611 00006 EXTEND
042972,002069: 00,2612 40145 DCS MPAC
042973,002070: 00,2613 52145 DXCH MPAC
042974,002071: 00,2614 37767 CAF ZERO # SO WE ALWAYS RETURN WITH C(A) = 0.
042975,002072: 00,2615 00002 TC Q
042976,002073:
Page 1017 |
042978,002075: # IF THE MAJOR PARTS OF THE DIVISOR AND DIVIDEND ARE EQUAL, BUT THE MINOR PARTS ARE SUCH THAT THE
042979,002076: # DIVIDEND IS STRICTLY LESS THAN THE DIVISOR IN MAGNITUDE, THE FOLLOWING APPROXIMATION IS USED. THE ASSUMPTIONS
042980,002077: # ARE THE SAME AS THE GENERAL ROUTINE WITH THE ADDITION THAT SIGN AGREEMENT IS NECESSARY (B, C, & D POSITIVE).
042981,002078:
042982,002079: # C + SB . (C + B - D)
042983,002080: # ------ = 37777 + S(---------)
042984,002081: # C + SD ( C )
042985,002082:
042986,002083: # THE DIVISION MAY BE PERFORMED IMMEDIATELY SINCE B IS STRICTLY LESS THAN D AND C IS NOT LESS THAN .5.
042987,002084:
042988,002085:
042989,002086: 00,2616 40144 MAXDV CS MPAC # SEE IF MAXDV CASE STILL HOLDS AFTER
042990,002087: 00,2617 60120 AD BUF # NORMALIZATION.
042991,002088: 00,2620 00006 EXTEND
042992,002089: 00,2621 12623 BZF +2
042993,002090: 00,2622 12544 TCF GENDDV # MPAC NOW LESS THAN BUF - DIVIDE AS USUAL
042994,002091:
042995,002092: 00,2623 37743 +2 CAF POSMAX # SET MAJOR PART OF RESULT.
042996,002093: 00,2624 54144 TS MPAC
042997,002094:
042998,002095: 00,2625 40121 CS BUF +1 # FORM DIVIDEND OF MINOR PART OF RESULT.
042999,002096: 00,2626 60145 AD MPAC +1
043000,002097: 00,2627 12600 TCF ENDMAXDV # GO ADD C AND DO DIVIDE, ATTACHING SIGN
043001,002098: # BEFORE EXITING.
043002,002099:
Page 1018 |
043004,002101: # VECTOR DIVIDED BY SCALAR, V/SC, IS EXECUTED HERE. THE VECTOR IS NOW IN MPAC WITH SCALAR IN BUF.
043005,002102:
043006,002103: 00,2630 47763 V/SC2 CS ONE # INITIALIZE DIVIDEND NORMALIZATION COUNT
043007,002104: 00,2631 54127 TS DVNORMCT # AND DIVISION SIGN REGISTER.
043008,002105: 00,2632 54117 TS VBUF +5
043009,002106:
043010,002107: 00,2633 10120 CCS BUF # FORCE DIVISOR POSITIVE WITH MAJOR PART
043011,002108: 00,2634 12671 TCF /BUF+ # NON-ZERO (IF POSSIBLE).
043012,002109: 00,2635 12637 TCF +2
043013,002110: 00,2636 12665 TCF /BUF-
043014,002111:
043015,002112: 00,2637 56121 XCH BUF +1 # SHIFT VECTOR AND SCALAR LEFT 14.
043016,002113: 00,2640 56120 XCH BUF
043017,002114: 00,2641 56145 XCH MPAC +1
043018,002115: 00,2642 56144 XCH MPAC
043019,002116: 00,2643 00006 EXTEND # CHECK FOR OVERFLOW IN EACH CASE.
043020,002117: 00,2644 12646 BZF +2
043021,002118: 00,2645 12404 TCF DVOVF
043022,002119:
043023,002120: 00,2646 56150 XCH MPAC +4
043024,002121: 00,2647 56147 XCH MPAC +3
043025,002122: 00,2650 00006 EXTEND
043026,002123: 00,2651 12653 BZF +2
043027,002124: 00,2652 12404 TCF DVOVF
043028,002125:
043029,002126: 00,2653 56152 XCH MPAC +6
043030,002127: 00,2654 56151 XCH MPAC +5
043031,002128: 00,2655 00006 EXTEND
043032,002129: 00,2656 12660 BZF +2
043033,002130: 00,2657 12404 TCF DVOVF
043034,002131:
043035,002132: 00,2660 10120 CCS BUF
043036,002133: 00,2661 12671 TCF /BUF+
043037,002134: 00,2662 12404 TCF DVOVF # ZERO DIVISOR - OVERFLOW.
043038,002135: 00,2663 12665 TCF /BUF-
043039,002136: 00,2664 12404 TCF DVOVF
043040,002137:
043041,002138: 00,2665 00006 /BUF- EXTEND # ON NEGATIVE, COMPLEMENT BUF AND MAINTAIN
043042,002139: 00,2666 40121 DCS BUF # DVSIGN IN VBUF +5.
043043,002140: 00,2667 52121 DXCH BUF
043044,002141: 00,2670 24117 INCR VBUF +5
043045,002142:
Page 1019 |
043047,002144: 00,2671 37746 /BUF+ CAF HALF # FORCE SIGN AGREEMENT IN DIVISOR.
043048,002145: 00,2672 60000 DOUBLE
043049,002146: 00,2673 60121 AD BUF +1
043050,002147: 00,2674 54121 TS BUF +1
043051,002148: 00,2675 37767 CAF ZERO
043052,002149: 00,2676 67743 AD POSMAX
043053,002150: 00,2677 26120 ADS BUF
043054,002151:
043055,002152: 00,2700 56123 XCH BUF2 # LEAVE ABS(ORIGINAL DIVISOR) IN BUF2 FOR
043056,002153: 00,2701 30121 CA BUF +1 # OVERFLOW TESTING.
043057,002154: 00,2702 54124 TS BUF2 +1
043058,002155: 00,2703 12711 TCF /NORM # NORMALIZE DIVISOR IN BUF.
043059,002156:
043060,002157: 00,2704 00006 /NORM2 EXTEND # IF LESS THAN .5, AUGMENT DVNORMCT AND
043061,002158: 00,2705 24127 AUG DVNORMCT # DOUBLE DIVISOR.
043062,002159: 00,2706 00006 EXTEND
043063,002160: 00,2707 30121 DCA BUF
043064,002161: 00,2710 20121 DAS BUF
043065,002162:
043066,002163: 00,2711 30120 /NORM CA BUF # SEE IF DIVISOR NORMALIZED.
043067,002164: 00,2712 60000 DOUBLE
043068,002165: 00,2713 54000 OVSK
043069,002166: 00,2714 12704 TCF /NORM2 # DOUBLE AND TRY AGAIN IF NOT.
043070,002167:
043071,002168: 00,2715 02727 TC V/SCDV # DO X COMPONENT DIVIDE.
043072,002169: 00,2716 52150 DXCH MPAC +3 # SUPPLY ARGUMENTS IN USUAL SEQUENCE.
043073,002170: 00,2717 52145 DXCH MPAC
043074,002171: 00,2720 52150 DXCH MPAC +3
043075,002172:
043076,002173: 00,2721 02727 TC V/SCDV # Y COMPONENT.
043077,002174: 00,2722 52152 DXCH MPAC +5
043078,002175: 00,2723 52145 DXCH MPAC
043079,002176: 00,2724 52152 DXCH MPAC +5
043080,002177:
043081,002178: 00,2725 02727 TC V/SCDV # Z COMPONENT.
043082,002179: 00,2726 17477 TCF VROTATEX # GO RE-ARRANGE COMPONENTS BEFORE EXIT.
043083,002180:
Page 1020 |
043085,002182: # SUBROUTINE USED BY V/SC TO DIVIDE VECTOR COMPONENT IN MPAC,+1 BY THE SCALAR GIVEN IN BUF.
043086,002183:
043087,002184: 00,2727 30117 V/SCDV CA VBUF +5 # REFLECTS SIGN OF SCALAR.
043088,002185: 00,2730 54126 TS DVSIGN
043089,002186:
043090,002187: 00,2731 10144 CCS MPAC # FORCE MPAC POSITIVE, EXITING ON ZERO.
043091,002188: 00,2732 12746 TCF /MPAC+
043092,002189: 00,2733 12735 TCF +2
043093,002190: 00,2734 12742 TCF /MPAC-
043094,002191:
043095,002192: 00,2735 10145 CCS MPAC +1
043096,002193: 00,2736 12746 TCF /MPAC+
043097,002194: 00,2737 00002 TC Q
043098,002195: 00,2740 12742 TCF /MPAC-
043099,002196: 00,2741 00002 TC Q
043100,002197:
043101,002198: 00,2742 00006 /MPAC- EXTEND # USUAL COMPLEMENTING AND SETTING OF SIGN.
043102,002199: 00,2743 40145 DCS MPAC
043103,002200: 00,2744 52145 DXCH MPAC
043104,002201: 00,2745 24126 INCR DVSIGN
043105,002202:
043106,002203: 00,2746 47763 /MPAC+ CS ONE # INITIALIZE NEAR-ONE SWITCH.
043107,002204: 00,2747 54130 TS MAXDVSW
043108,002205:
043109,002206: 00,2750 40144 CS MPAC # CHECK POSSIBLE OVERFLOW.
043110,002207: 00,2751 60123 AD BUF2 # UNNORMALIZED INPUT DIVISOR.
043111,002208: 00,2752 00006 EXTEND
043112,002209: 00,2753 62757 BZMF /AGREE # CHECK FOR NEAR-ONE OR OVERFLOW.
043113,002210:
043114,002211: 00,2754 52145 DDVCALL DXCH MPAC # CALL PRE-DIVIDE NORMALIZATION.
043115,002212: 00,2755 50127 INDEX DVNORMCT
043116,002213: 00,2756 12541 TCF MAXTEST
043117,002214:
Page 1021 |
043119,002216: 00,2757 37746 /AGREE CAF HALF # FORCE SIGN AGREEMENT IN DIVIDEND
043120,002217: 00,2760 60000 DOUBLE # (ALREADY DONE FOR DIVISOR).
043121,002218: 00,2761 60145 AD MPAC +1
043122,002219: 00,2762 54145 TS MPAC +1
043123,002220: 00,2763 37767 CAF ZERO
043124,002221: 00,2764 67743 AD POSMAX
043125,002222: 00,2765 26144 ADS MPAC
043126,002223:
043127,002224: 00,2766 40144 CS MPAC # CHECK TO SEE IF OVERFLOW GONE OR IF
043128,002225: 00,2767 60123 AD BUF2 # NEAR-ONE CASE IS PRESENT.
043129,002226: 00,2770 10000 CCS A
043130,002227: 00,2771 12754 TCF DDVCALL # NOT NEAR-ONE.
043131,002228: 00,2772 32506 SLOPELO DEC .8324
043132,002229: 00,2773 12404 TCF DVOVF # NO HOPE.
043133,002230:
043134,002231: 00,2774 54130 TS MAXDVSW # SIGNAL POSSIBLE NEAR-ONE CASE.
043135,002232: 00,2775 40145 CS MPAC +1 # SEE IF DIVISION CAN BE DONE.
043136,002233: 00,2776 60124 AD BUF2 +1
043137,002234: 00,2777 00006 EXTEND
043138,002235: 00,3000 62404 BZMF DVOVF
043139,002236: 00,3001 12754 TCF DDVCALL # GOING TO MAXDV.
043140,002237:
Page 1022 |
043142,002239: # THE FOLLOWING ROUTINE EXECUTES THE UNIT INSTRUCTION, WHICH TAKES THE UNIT OF THE VECTOR IN MPAC.
043143,002240:
043144,002241: 00,3002 07612 UNIT TC MPACVBUF # SAVE THE ARGUMENT IN VBUF.
043145,002242: 00,3003 37767 CAF ZERO # MUST SENSE OVERFLOW IN FOLLOWING DOT.
043146,002243: 00,3004 56111 XCH OVFIND
043147,002244: 00,3005 54131 TS TEM1
043148,002245: 00,3006 03301 TC VSQSUB # DOT MPAC WITH ITSELF.
043149,002246: 00,3007 30131 CA TEM1
043150,002247: 00,3010 56111 XCH OVFIND
043151,002248: 00,3011 00006 EXTEND
043152,002249: 00,3012 13014 BZF +2
043153,002250: 00,3013 12404 TCF DVOVF
043154,002251: 00,3014 00006 EXTEND
043155,002252: 00,3015 30145 DCA MPAC # LEAVE THE SQUARE OF THE LENGTH OF THE
043156,002253: 00,3016 50110 INDEX FIXLOC # ARGUMENT IN LVSQUARE.
043157,002254: 00,3017 52043 DXCH LVSQUARE
043158,002255:
043159,002256: 00,3020 03325 TC SQRTSUB # GO TAKE THE NORMALIZED SQUARE ROOT.
043160,002257:
043161,002258: 00,3021 10144 CCS MPAC # CHECK FOR UNIT OVERFLOW.
043162,002259: 00,3022 13027 TCF +5 # MPAC IS NOT LESS THAN .5 UNLESS
043163,002260: 00,3023 54001 TS L
043164,002261: 00,3024 50110 INDEX FIXLOC
043165,002262: 00,3025 52045 DXCH LV
043166,002263: 00,3026 12404 TCF DVOVF # INPUT TO SQRTSUB WAS 0.
043167,002264:
043168,002265: 00,3027 43130 CS FOURTEEN # SEE IF THE INPUT WAS SO SMALL THE THE
043169,002266: 00,3030 60125 AD MPTEMP # FIRST TWO REGISTERS OF THE SQUARE WERE 0
043170,002267: 00,3031 10000 CCS A
043171,002268: 00,3032 40000 COM # IF SO, SAVE THE NEGATIVE OF THE SHIFT
043172,002269: 00,3033 13111 TCF SMALL # COUNT -15D.
043173,002270:
043174,002271: 00,3034 13043 TCF LARGE # (THIS IS USUALLY THE CASE.)
043175,002272:
043176,002273: 00,3035 43127 CS THIRTEEN # IF THE SHIFT COUNT WAS EXACTLY 14, SET
043177,002274: 00,3036 54125 TS MPTEMP # THE PRE-DIVIDE NORM COUNT TO -13D.
043178,002275:
043179,002276: 00,3037 30144 CA MPAC # SHIFT THE LENGTH RIGHT 14 BEFORE STORING
043180,002277: 00,3040 54001 SMALL2 TS L # (SMALL EXITS TO THIS POINT).
043181,002278: 00,3041 37767 CAF ZERO
043182,002279: 00,3042 13070 TCF LARGE2 # GO TO STORE LENGTH AND PROCEED.
043183,002280:
043184,002281: 00,3043 10125 LARGE CCS MPTEMP # MOST ALL CASES COME HERE.
043185,002282: 00,3044 13052 TCF LARGE3 # SEE IF NO NORMALIZATION WAS REQUIRED BY
043186,002283:
043187,002284: 00,3045 42024 CS SRDDV # SQRT, AND IF SO, SET UP FOR A SHIFT
043188,002285: 00,3046 54125 TS MPTEMP # RIGHT 1 BEFORE DIVIDING TO PRODUCE
043189,002286: 00,3047 00006 EXTEND # THE DESIRED HALF UNIT VECTOR.
043190,002287: 00,3050 30145 DCA MPAC
043191,002288: 00,3051 13070 TCF LARGE2
043192,002289:
Page 1023 |
043194,002291: 00,3052 40000 LARGE3 COM # LEAVE NEGATIVE OF SHIFT COUNT-1 FOR
043195,002292: 00,3053 54125 TS MPTEMP # PREDIVIDE LEFT SHIFT.
043196,002293:
043197,002294: 00,3054 40000 COM # PICK UP REQUIRED SHIFTING BIT TO UNNORM-
043198,002295: 00,3055 50000 INDEX A # ALIZE THE SQRT RESULT.
043199,002296: 00,3056 37746 CAF BIT14
043200,002297: 00,3057 54120 TS BUF
043201,002298: 00,3060 00006 EXTEND
043202,002299: 00,3061 70145 MP MPAC +1
043203,002300: 00,3062 56120 XCH BUF
043204,002301: 00,3063 00006 EXTEND # (UNNORMALIZE THE SQRT FOR LV).
043205,002302: 00,3064 70144 MP MPAC
043206,002303: 00,3065 56001 XCH L
043207,002304: 00,3066 60120 AD BUF
043208,002305: 00,3067 56001 XCH L
043209,002306:
043210,002307: 00,3070 50110 LARGE2 INDEX FIXLOC
043211,002308: 00,3071 52045 DXCH LV # LENGTH NOW STORED IN WORK AREA.
043212,002309:
043213,002310: 00,3072 47763 CS ONE
043214,002311: 00,3073 54130 TS MAXDVSW # NO MAXDV CASES IN UNIT.
043215,002312:
043216,002313: 00,3074 52113 DXCH VBUF # PREPARE X COMPONENT FOR DIVIDE, SETTING
043217,002314: 00,3075 52145 DXCH MPAC # LENGTH OF VECTOR AS DIVISOR IN BUF.
043218,002315: 00,3076 52121 DXCH BUF
043219,002316: 00,3077 03131 TC UNITDV
043220,002317:
043221,002318: 00,3100 52115 DXCH VBUF +2 # DO Y AND Z IN USUAL FASHION SO WE CAN
043222,002319: 00,3101 52145 DXCH MPAC # EXIT THROUGH VROTATEX.
043223,002320: 00,3102 52150 DXCH MPAC +3
043224,002321: 00,3103 03131 TC UNITDV
043225,002322:
043226,002323: 00,3104 52117 DXCH VBUF +4
043227,002324: 00,3105 52145 DXCH MPAC
043228,002325: 00,3106 52152 DXCH MPAC +5
043229,002326: 00,3107 03131 TC UNITDV
043230,002327: 00,3110 17477 TCF VROTATEX # AND EXIT.
043231,002328:
Page 1024 |
043233,002330: # IF THE LENGTH OF THE ARGUMENT VECTOR WAS LESS THAN 2(-28), EACH COMPONENT MUST BE SHIFTED LEFT AT LEAST
043234,002331: # 14 PLACES BEFORE THE DIVIDE. NOTE THAT IN THIS CASE, THE MAJOR PART OF EACH COMPONENT IS ZERO.
043235,002332:
043236,002333: 00,3111 54125 SMALL TS MPTEMP # NEGATIVE OF PRE-DIVIDE SHIFT COUNT.
043237,002334:
043238,002335: 00,3112 37767 CAF ZERO # SHIFT EACH COMPONENT LEFT 14.
043239,002336: 00,3113 56113 XCH VBUF +1
043240,002337: 00,3114 56112 XCH VBUF
043241,002338: 00,3115 56115 XCH VBUF +3
043242,002339: 00,3116 56114 XCH VBUF +2
043243,002340: 00,3117 56117 XCH VBUF +5
043244,002341: 00,3120 56116 XCH VBUF +4
043245,002342:
043246,002343: 00,3121 40125 CS MPTEMP
043247,002344: 00,3122 50000 INDEX A
043248,002345: 00,3123 37746 CAF BIT14
043249,002346: 00,3124 00006 EXTEND
043250,002347: 00,3125 70144 MP MPAC
043251,002348: 00,3126 13040 TCF SMALL2
043252,002349:
043253,002350: 00,3127 00015 THIRTEEN DEC 13 B-14
043254,002351: 00,3130 00016 FOURTEEN DEC 14 B-14
043255,002352:
Page 1025 |
043257,002354: # THE FOLLOWING ROUTINE SETS UP THE CALL TO THE DIVIDE ROUTINES.
043258,002355:
043259,002356: 00,3131 10144 UNITDV CCS MPAC # FORCE MPAC POSITIVE IF POSSIBLE, SETTING
043260,002357: 00,3132 13150 TCF UMPAC+ # DVSIGN ACCORDING TO THE SIGN OF MPAC
043261,002358: 00,3133 13135 TCF +2 # SINCE THE DIVISOR IS ALWAYS POSITIVE
043262,002359: 00,3134 13142 TCF UMPAC- # HERE.
043263,002360:
043264,002361: 00,3135 10145 CCS MPAC +1
043265,002362: 00,3136 13150 TCF UMPAC+
043266,002363: 00,3137 00002 TC Q # EXIT IMMEDIATELY ON ZERO.
043267,002364: 00,3140 13142 TCF UMPAC-
043268,002365: 00,3141 00002 TC Q
043269,002366:
043270,002367: 00,3142 47767 UMPAC- CS ZERO # IF NEGATIVE, SET -0 IN DVSIGN FOR FINAL
043271,002368: 00,3143 54126 TS DVSIGN # COMPLEMENT.
043272,002369: 00,3144 00006 EXTEND
043273,002370: 00,3145 40145 DCS MPAC # PICK UP ABSOLUTE VALUE OF ARG AND JUMP.
043274,002371: 00,3146 50125 INDEX MPTEMP
043275,002372: 00,3147 12540 TCF MAXTEST -1
043276,002373:
043277,002374: 00,3150 54126 UMPAC+ TS DVSIGN # SET DVSIGN FOR POSITIVE QUOTIENT.
043278,002375: 00,3151 52145 DXCH MPAC
043279,002376: 00,3152 50125 INDEX MPTEMP
043280,002377: 00,3153 12540 TCF MAXTEST -1
043281,002378:
Page 1026 |
043283,002380: # MISCELLANEOUS UNARY OPERATIONS.
043284,002381:
043285,002382: 00,3154 03262 DSQ TC DSQSUB # SQUARE THE DP CONTENTS OF MPAC.
043286,002383: 00,3155 16125 TCF DANZIG
043287,002384:
043288,002385: 00,3156 10153 ABVALABS CCS MODE # ABVAL OR ABS INSTRUCTION.
043289,002386: 00,3157 13206 TCF ABS # DO ABS ON SCALAR.
043290,002387: 00,3160 13206 TCF ABS
043291,002388:
043292,002389: 00,3161 03301 ABVAL TC VSQSUB # DOT MPAC WITH ITSELF.
043293,002390: 00,3162 22153 LXCH MODE # MODE IS NOW DP (L ZERO AFTER DAS).
043294,002391:
043295,002392: 00,3163 00006 EXTEND # STORE SQUARE OF LENGTH IN WORK AREA.
043296,002393: 00,3164 30145 DCA MPAC
043297,002394: 00,3165 50110 INDEX FIXLOC
043298,002395: 00,3166 52043 DXCH LVSQUARE
043299,002396:
043300,002397: 00,3167 03325 SQRT TC SQRTSUB # TAKE THE SQUARE ROOT OF MPAC.
043301,002398: 00,3170 10125 CCS MPTEMP # RETURNED NORMALIZED SQUARE ROOT. SEE IF
043302,002399: 00,3171 13173 TCF +2 # ANY UN-NORMALIZATION REQUIRED AND EXIT
043303,002400: 00,3172 16125 TCF DANZIG # IF NOT.
043304,002401:
043305,002402: 00,3173 63710 AD NEG12 # A RIGHT SHIFT OF MORE THAN 13 COULD BE
043306,002403: 00,3174 00006 EXTEND # REQUIRED IF INPUT WAS ZERO IN MPAC,+1.
043307,002404: 00,3175 63201 BZMF SQRTSHFT # GOES HERE IN MOST CASES.
043308,002405: 00,3176 22007 ZL # IF A LONG SHIFT IS REQUIRED, GO TO
043309,002406: 00,3177 22106 LXCH ADDRWD # GENERAL RIGHT SHIFT ROUTINES.
043310,002407: 00,3200 12303 TCF GENSCR +4 # ADDRWD WAS ZERO TO PREVENT ROUND.
043311,002408:
043312,002409: 00,3201 50125 SQRTSHFT INDEX MPTEMP # SELECT SHIFTING BIT AND EXIT THROUGH
043313,002410: 00,3202 37745 CAF BIT15 # SHIFT ROUTINES.
043314,002411: 00,3203 54125 TS MPTEMP
043315,002412: 00,3204 37767 CAF ZERO # TO ZERO MPAC +2 IN THE PROCESS.
043316,002413: 00,3205 12036 TCF MPACSHR +3
043317,002414:
043318,002415: 00,3206 07001 ABS TC BRANCH # TEST SIGN OF MPAC AND COMPLEMENT IF
043319,002416: 00,3207 16125 TCF DANZIG
043320,002417: 00,3210 16125 TCF DANZIG
043321,002418: 00,3211 17722 TCF COMP
043322,002419:
Page 1027 |
043324,002421: 00,3212 47761 VDEF CS FOUR # VECTOR DEFINE - ESSENTIALLY TREATS
043325,002422: 00,3213 26156 ADS PUSHLOC # SCALAR IN MPAC AS X COMPONENT, PUSHES UP
043326,002423: 00,3214 00006 EXTEND # FOR Y AND THEN AGAIN FOR Z.
043327,002424: 00,3215 50000 INDEX A
043328,002425: 00,3216 30003 DCA 2
043329,002426: 00,3217 52150 DXCH MPAC +3
043330,002427: 00,3220 00006 EXTEND
043331,002428: 00,3221 50156 INDEX PUSHLOC
043332,002429: 00,3222 30001 DCA 0
043333,002430: 00,3223 52152 DXCH MPAC +5
043334,002431: 00,3224 47763 CS ONE # MODE IS NOW VECTOR.
043335,002432: 00,3225 16124 TCF NEWMODE
043336,002433:
043337,002434: 00,3226 03301 VSQ TC VSQSUB # DOT MPAC WITH ITSELF.
043338,002435: 00,3227 37767 CAF ZERO
043339,002436: 00,3230 16124 TCF NEWMODE # MODE IS NOW DP.
043340,002437:
043341,002438: 00,3231 00006 PUSH EXTEND # PUSH DOWN MPAC LEAVING IT LOADED.
043342,002439: 00,3232 30145 DCA MPAC
043343,002440: 00,3233 50156 INDEX PUSHLOC # PUSH DOWN FIRST TWO REGISTERS IN EACH
043344,002441: 00,3234 52001 DXCH 0
043345,002442:
043346,002443: 00,3235 50153 INDEX MODE # INCREMENT PUSHDOWN POINTER.
043347,002444: 00,3236 36310 CAF NO.WDS
043348,002445: 00,3237 26156 ADS PUSHLOC
043349,002446:
043350,002447: 00,3240 10153 CCS MODE
043351,002448: 00,3241 13254 TCF TPUSH # PUSH DOWN MPAC +2.
043352,002449: 00,3242 16125 TCF DANZIG # DONE FOR DP.
043353,002450:
043354,002451: 00,3243 00006 EXTEND # ON VECTOR, PUSH DOWN Y AND Z COMPONENTS.
043355,002452: 00,3244 30150 DCA MPAC +3
043356,002453: 00,3245 50156 INDEX PUSHLOC
043357,002454: 00,3246 51775 DXCH 0 -4
043358,002455: 00,3247 00006 EXTEND
043359,002456: 00,3250 30152 DCA MPAC +5
043360,002457: 00,3251 50156 INDEX PUSHLOC
043361,002458: 00,3252 51777 DXCH 0 -2
043362,002459: 00,3253 16125 TCF DANZIG
043363,002460:
043364,002461: 00,3254 30146 TPUSH CA MPAC +2
043365,002462: 00,3255 16632 TCF ENDTPUSH +2
043366,002463:
043367,002464: 00,3256 50110 RVQ INDEX FIXLOC # RVQ - RETURN IVA QPRET.
043368,002465: 00,3257 30052 CA QPRET
043369,002466: 00,3260 54107 TS POLISH
043370,002467: 00,3261 16730 TCF GOTO +4 # (ASSUME QPRET POINTS TO FIXED ONLY.)
043371,002468:
Page 1028 |
043373,002470: # THE FOLLOWING SUBROUTINES ARE USED IN SQUARING MPAC, IN BOTH THE SCALAR AND VECTOR SENSE. THEY ARE
043374,002471: # SPECIAL CASES OF DMPSUB AND DOTSUB, PUT IN TO SAVE SOME TIME.
043375,002472:
043376,002473: 00,3262 30145 DSQSUB CA MPAC +1 # SQUARES THE SCALAR CONTENTS OF MPAC.
043377,002474: 00,3263 00006 EXTEND
043378,002475: 00,3264 70000 SQUARE
043379,002476: 00,3265 54146 TS MPAC +2
043380,002477: 00,3266 37767 CAF ZERO # FORM 2(CROSS TERM).
043381,002478: 00,3267 56145 XCH MPAC +1
043382,002479: 00,3270 00006 EXTEND
043383,002480: 00,3271 70144 MP MPAC
043384,002481: 00,3272 20001 DDOUBL # AND MAYBE OVERFLOW.
043385,002482: 00,3273 20146 DAS MPAC +1 # AND SET A TO NET OVERFLOW.
043386,002483: 00,3274 56144 XCH MPAC
043387,002484: 00,3275 00006 EXTEND
043388,002485: 00,3276 70000 SQUARE
043389,002486: 00,3277 20145 DAS MPAC
043390,002487: 00,3300 00002 TC Q
043391,002488:
043392,002489: 00,3301 00006 VSQSUB EXTEND # DOTS THE VECTOR IN MPAC WITH ITSELF.
043393,002490: 00,3302 22127 QXCH DOTRET
043394,002491: 00,3303 03262 TC DSQSUB # SQUARE THE X COMPONENT.
043395,002492: 00,3304 52150 DXCH MPAC +3
043396,002493: 00,3305 52145 DXCH MPAC
043397,002494: 00,3306 52121 DXCH BUF # SO WE CAN END IN DOTSUB.
043398,002495: 00,3307 30146 CA MPAC +2
043399,002496: 00,3310 54122 TS BUF +2
043400,002497:
043401,002498: 00,3311 03262 TC DSQSUB # SQUARE Y COMPONENT.
043402,002499: 00,3312 52146 DXCH MPAC +1
043403,002500: 00,3313 20122 DAS BUF +1
043404,002501: 00,3314 60144 AD MPAC
043405,002502: 00,3315 60120 AD BUF
043406,002503: 00,3316 54120 TS BUF
043407,002504: 00,3317 13321 TCF +2
043408,002505: 00,3320 54111 TS OVFIND # IF OVERFLOW.
043409,002506:
043410,002507: 00,3321 52152 DXCH MPAC +5
043411,002508: 00,3322 52145 DXCH MPAC
043412,002509: 00,3323 03262 TC DSQSUB # SQUARE Z COMPONENT.
043413,002510: 00,3324 17257 TCF ENDDOT # END AS IN DOTSUB.
043414,002511:
Page 1029 |
043416,002513: # DOUBLE PRECISION SQUARE ROOT ROUTINE. TAKE THE SQUARE ROOT OF THE TRIPLE PRECISION (MPAC +2 USED ONLY
043417,002514: # IN NORMALIZATION) CONTENTS OF MPAC AND LEAVE THE NORMALIZED RESULT IN MPAC (C(MPAC) GREATER THAN OR EQUAL TO
043418,002515: # .5). THE RIGHT SHIFT COUNT (TO UNNORMALIZE) IS LEFT IN MPTEMP.
043419,002516:
043420,002517:
043421,002518: 00,3325 37767 SQRTSUB CAF ZERO # START BY ZEROING RIGHT SHIFT COUNT.
043422,002519: 00,3326 54125 TS MPTEMP
043423,002520:
043424,002521: 00,3327 10144 CCS MPAC # CHECK FOR POSITIVE ARGUMENT, SHIFTING
043425,002522: 00,3330 13366 TCF SMPAC+ # FIRST SIGNIFICANT MPAC REGISTER INTO
043426,002523: 00,3331 13333 TCF +2 # MPAC ITSELF.
043427,002524: 00,3332 13355 TCF SQRTNEG # SEE IF MAG OF ARGUMENT LESS THAN 10(-4).
043428,002525:
043429,002526: 00,3333 56146 XCH MPAC +2 # MPAC IS ZERO - SHIFT LEFT 14.
043430,002527: 00,3334 56145 XCH MPAC +1
043431,002528: 00,3335 54144 TS MPAC
043432,002529: 00,3336 37765 CAF SEVEN # AUGMENT RIGHT SHIFT COUNTER.
043433,002530: 00,3337 54125 TS MPTEMP
043434,002531:
043435,002532: 00,3340 10144 CCS MPAC # SEE IF MPAC NOW PNZ.
043436,002533: 00,3341 13366 TCF SMPAC+
043437,002534: 00,3342 13344 TCF +2
043438,002535: 00,3343 13360 TCF ZEROANS # NEGATIVE BUT LESS THAN 10(-4) IN MAG.
043439,002536:
043440,002537: 00,3344 56145 XCH MPAC +1 # ZERO - SHIFT LEFT 14 AGAIN.
043441,002538: 00,3345 54144 TS MPAC
043442,002539: 00,3346 37765 CAF SEVEN # AUGMENT RIGHT SHIFT COUNTER.
043443,002540: 00,3347 26125 ADS MPTEMP
043444,002541:
043445,002542: 00,3350 10144 CCS MPAC
043446,002543: 00,3351 13366 TCF SMPAC+
043447,002544: 00,3352 00002 TC Q # SQRT(0) = 0.
043448,002545: 00,3353 13360 TCF ZEROANS
043449,002546: 00,3354 13434 TCF FIXROOT # DO NOT LEAVE SQRTSUB WITH -0 IN MPAC.
043450,002547:
043451,002548: 00,3355 10000 SQRTNEG CCS A # ARGUMENT IS NEGATIVE, BUT SEE IF SIGN-
043452,002549: 00,3356 13364 TCF SQRTABRT # CORRECTED ARGUMENT IS LESS THAN 10(-4)
043453,002550:
043454,002551: 00,3357 10145 CCS MPAC +1 # IN MAGNITUDE. IF SO, CALL ANSWER ZERO.
043455,002552: 00,3360 37767 ZEROANS CAF ZERO # FORCE ANSWER TO ZERO HERE.
043456,002553: 00,3361 13434 TCF FIXROOT
043457,002554: 00,3362 13364 TCF SQRTABRT
043458,002555: 00,3363 13434 TCF FIXROOT
043459,002556:
043460,002557: 00,3364 06000 SQRTABRT TC ABORT
043461,002558: 00,3365 01302 OCT 1302
043462,002559:
Page 1030 |
043464,002561: 00,3366 62442 SMPAC+ AD -1/2+2 # SEE IF ARGUMENT GREATER THAN OR EQUAL TO
043465,002562: 00,3367 00006 EXTEND # .5.
043466,002563: 00,3370 63437 BZMF SRTEST # IF SO, SEE IF LESS THAN .25.
043467,002564:
043468,002565: 00,3371 52145 DXCH MPAC # WE WILL TAKE THE SQUARE ROOT OF MPAC/2.
043469,002566: 00,3372 22021 LXCH SR # SHIFT RIGHT 1 AND GO TO THE SQRT ROUTINE
043470,002567: 00,3373 00006 EXTEND
043471,002568: 00,3374 77746 MP HALF
043472,002569: 00,3375 52145 DXCH MPAC
043473,002570: 00,3376 56021 XCH SR
043474,002571: 00,3377 26145 ADS MPAC +1 # GUARANTEED NO OVERFLOW.
043475,002572:
043476,002573: 00,3400 32314 ARGHI CAF SLOPEHI # ARGUMENT BETWEEN .25 AND .5. GET A
043477,002574: 00,3401 00006 EXTEND # LINEAR APPROXIMATION FOR THIS RANGE.
043478,002575: 00,3402 70144 MP MPAC
043479,002576: 00,3403 62542 AD BIASHI # X0/2 = (MPAC/2)(SLOPEHI) + BIASHI/2.
043480,002577:
043481,002578: 00,3404 54120 +4 TS BUF # X0/2 (ARGLO ENTERS HERE).
043482,002579: 00,3405 30144 CA MPAC # SINGLE-PRECISION THROUGHOUT.
043483,002580: 00,3406 22007 ZL
043484,002581: 00,3407 00006 EXTEND
043485,002582: 00,3410 10120 DV BUF # (MPAC/2)/(X0/2)
043486,002583: 00,3411 00006 EXTEND
043487,002584: 00,3412 77746 MP HALF
043488,002585: 00,3413 26120 ADS BUF # X1 = X0/2 + .5(MPAC/2)/(X0/2).
043489,002586:
043490,002587: 00,3414 00006 EXTEND
043491,002588: 00,3415 77746 MP HALF # FORM UP X1/2.
043492,002589: 00,3416 52145 DXCH MPAC # SAVE AND BRING OUT ARGUMENT.
043493,002590: 00,3417 00006 EXTEND # TAKE DP QUOTIENT WITH X1.
043494,002591: 00,3420 10120 DV BUF
043495,002592: 00,3421 54121 TS BUF +1 # SAVE MAJOR PART OF QUOTIENT.
043496,002593: 00,3422 37767 CAF ZERO # FORM MINOR PART OF QUOTIENT USING
043497,002594: 00,3423 56001 XCH L # (REMAINDER,0).
043498,002595: 00,3424 00006 EXTEND
043499,002596: 00,3425 10120 DV BUF
043500,002597: 00,3426 54001 TS L # IN PREPARATION FOR DAS.
043501,002598: 00,3427 30121 CA BUF +1
043502,002599: 00,3430 20145 DAS MPAC # X2 = X1/2 + (MPAC/2)X1
043503,002600:
043504,002601: 00,3431 00006 EXTEND # OVERFLOWS IF ARG. NEAR POSMAX.
043505,002602: 00,3432 13436 BZF TCQBNK00
043506,002603: 00,3433 37743 CAF POSMAX
043507,002604: 00,3434 54144 FIXROOT TS MPAC
043508,002605: 00,3435 54145 TS MPAC +1
043509,002606: 00,3436 00002 TCQBNK00 TC Q # RETURN TO CALLER TO UNNORMALIZE, ETC.
043510,002607:
Page 1031 |
043512,002609: 00,3437 67747 SRTEST AD QUARTER # ARGUMENT WAS LESS THAN .5, SEE IF LESS
043513,002610: 00,3440 00006 EXTEND # THAN .25.
043514,002611: 00,3441 63463 BZMF SQRTNORM # IF SO, BEGIN NORMALIZATION.
043515,002612:
043516,002613: 00,3442 52145 DXCH MPAC # IF BETWEEN .5 AND .25, SHIFT RIGHT 1 AND
043517,002614: 00,3443 22021 LXCH SR # START AT ARGLO.
043518,002615: 00,3444 00006 EXTEND
043519,002616: 00,3445 77746 MP HALF
043520,002617: 00,3446 52145 DXCH MPAC
043521,002618: 00,3447 56021 XCH SR
043522,002619: 00,3450 26145 ADS MPAC +1 # NO OVERFLOW.
043523,002620:
043524,002621: 00,3451 32772 ARGLO CAF SLOPELO # (NORMALIZED) ARGUMENT BETWEEN .125 AND
043525,002622: 00,3452 00006 EXTEND # .25
043526,002623: 00,3453 70144 MP MPAC
043527,002624: 00,3454 62270 AD BIASLO
043528,002625: 00,3455 13404 TCF ARGHI +4 # BEGIN SQUARE ROOT.
043529,002626:
043530,002627: 00,3456 00006 SQRTNM2 EXTEND # SHIFT LEFT 2 AND INCREMENT RIGHT SHIFT
043531,002628: 00,3457 30146 DCA MPAC +1 # COUNT (FOR TERMINAL UNNORMALIZATION).
043532,002629: 00,3460 20146 DAS MPAC +1
043533,002630: 00,3461 60144 AD MPAC
043534,002631: 00,3462 26144 ADS MPAC # (NO OVERFLOW).
043535,002632:
043536,002633: 00,3463 24125 SQRTNORM INCR MPTEMP # FIRST TIME THROUGH, JUST SHIFT LEFT 1
043537,002634: 00,3464 00006 EXTEND # (PUTS IN EFFECTIVE RIGHT SHIFT SINCE
043538,002635: 00,3465 30146 DCA MPAC +1 # WE WANT MPAC/2).
043539,002636: 00,3466 20146 DAS MPAC +1
043540,002637: 00,3467 60144 AD MPAC
043541,002638: 00,3470 26144 ADS MPAC # (AGAIN NO OVERFLOW).
043542,002639: 00,3471 60000 DOUBLE
043543,002640: 00,3472 54022 TS CYL
043544,002641:
043545,002642: 00,3473 10022 NORMTEST CCS CYL # SEE IF ARGUMENT NOW NORMALIZED AT
043546,002643: 00,3474 10022 CCS CYL # GREATER THAN .125.
043547,002644: 00,3475 13456 TCF SQRTNM2 # NO - SHIFT LEFT 2 MORE AND TRY AGAIN.
043548,002645: 00,3476 13400 TCF ARGHI # YES - NOW BETWEEN .5 AND .25.
043549,002646: 00,3477 13451 TCF ARGLO # ARGUMENT NOW BETWEEN .25 AND .125.
043550,002647:
Page 1032 |
043552,002649: # TRIGONOMETRIC FUNCTION PACKAGE.
043553,002650:
043554,002651: # THE FOLLOWING TRIGONOMETRIC FUNCTIONS ARE AVAILABLE AS INTERPRETIVE OPERATIONS:
043555,002652:
043556,002653: # 1. SIN COMPUTES (1/2)SINE(2 PI MPAC).
043557,002654: # 2. COS COMPUTES (1/2)COSINE(2 PI MPAC).
043558,002655:
043559,002656: # 3. ASIN COMPUTES (1/2PI)ARCSINE(2 MPAC).
043560,002657: # 4. ACOS COMPUTES (1/2PI)ARCCOSINE(2 MPAC).
043561,002658:
043562,002659: # SIN-ASIN AND COS-ACOS ARE MUTUALLY INVERSE, IE SIN(ASIN(X)) = X.
043563,002660:
043564,002661: 00,3500 07001 COSINE TC BRANCH # FINDS COSINE USING THE IDENTITY
043565,002662: 00,3501 13504 TCF +3 # COS(X) = SIN(PI/2 - ABS(X)).
043566,002663: 00,3502 13507 TCF PRESINE
043567,002664: 00,3503 13507 TCF PRESINE
043568,002665:
043569,002666: 00,3504 00006 +3 EXTEND
043570,002667: 00,3505 40145 DCS MPAC
043571,002668: 00,3506 52145 DXCH MPAC
043572,002669:
043573,002670: 00,3507 37747 PRESINE CAF QUARTER # PI/2 SCALED.
043574,002671: 00,3510 26144 ADS MPAC
043575,002672:
043576,002673:
043577,002674: 00,3511 52145 SINE DXCH MPAC # DOUBLE ARGUMENT.
043578,002675: 00,3512 20001 DDOUBL
043579,002676: 00,3513 54000 OVSK # SEE IF OVERFLOW PRESENT.
043580,002677: 00,3514 13517 TCF +3 # IF NOT, ARGUMENT OK AS IS.
043581,002678:
043582,002679: 00,3515 00006 EXTEND # IF SO, WE LOST (OR GAINED) PI, SO
043583,002680: 00,3516 40001 DCOM # COMPLEMENT MPAC USING THE IDENTITY
043584,002681: # SIN(X-(+)PI) = SIN(-X).
043585,002682: 00,3517 52145 +3 DXCH MPAC
043586,002683: 00,3520 30144 CA MPAC # SEE IF ARGUMENT GREATER THAN .5 IN
043587,002684: 00,3521 60000 DOUBLE # MAGNITUDE. IF SO, REDUCE IT TO LESS THAN
043588,002685: 00,3522 54001 TS L # .5 (+-PI/2 SCALED) AS FOLLOWS:
043589,002686: 00,3523 13534 TCF SN1
043590,002687:
043591,002688: 00,3524 50000 INDEX A # IF POSITIVE, FORM PI - X, IF NEGATIVE
043592,002689: 00,3525 37745 CAF NEG1/2 +1 # USE -PI -X.
043593,002690: 00,3526 60000 DOUBLE
043594,002691: 00,3527 00006 EXTEND
043595,002692: 00,3530 60144 SU MPAC # GUARANTEED NO OVERFLOW.
043596,002693: 00,3531 54144 TS MPAC
043597,002694: 00,3532 40145 CS MPAC +1
043598,002695: 00,3533 54145 TS MPAC +1
043599,002696:
Page 1033 |
043601,002698: 00,3534 00006 SN1 EXTEND # SET UP TO EVALUATE HASTINGS POLYNOMIAL
043602,002699: 00,3535 30145 DCA MPAC
043603,002700: 00,3536 52124 DXCH BUF2
043604,002701: 00,3537 03262 TC DSQSUB # SQUARE MPAC.
043605,002702:
043606,002703: 00,3540 07274 TC POLY # EVALUATE FOURTH ORDER POLYNOMIAL.
043607,002704: 00,3541 00003 DEC 3 B-14
043608,002705: 00,3542 14441 37325 2DEC +.3926990796
043609,002706:
043610,002707: 00,3544 53250 60764 2DEC -.6459637111
043611,002708:
043612,002709: 00,3546 12146 21276 2DEC +.318758717
043613,002710:
043614,002711: 00,3550 75466 71471 2DEC -.074780249
043615,002712:
043616,002713: 00,3552 00236 32757 2DEC +.009694988
043617,002714:
043618,002715: 00,3554 32466 CAF LBUF2 # MULTIPLY BY ARGUMENT AND SHIFT LEFT 2.
043619,002716: 00,3555 07160 TC DMPSUB -1
043620,002717:
043621,002718: 00,3556 00006 EXTEND
043622,002719: 00,3557 30146 DCA MPAC +1
043623,002720: 00,3560 20146 DAS MPAC +1
043624,002721: 00,3561 60144 AD MPAC
043625,002722: 00,3562 26144 ADS MPAC # NEITHER SHIFT OVERFLOWS.
043626,002723: 00,3563 00006 EXTEND
043627,002724: 00,3564 30146 DCA MPAC +1
043628,002725: 00,3565 20146 DAS MPAC +1
043629,002726: 00,3566 60144 AD MPAC
043630,002727: 00,3567 26144 ADS MPAC
043631,002728: 00,3570 16125 TCF DANZIG
043632,002729:
Page 1034 |
043634,002731: # ARCSIN/ARCCOS ROUTINE.
043635,002732:
043636,002733: 00,3571 33612 ARCSIN CAF LASINEX # COMPUTE ARCSIN BY USING THE IDENTITY
043637,002734: 00,3572 13574 TCF +2 # ARCSIN(X) = PI/2 - ARCCOS(X).
043638,002735:
043639,002736: 00,3573 33674 ARCCOS CAF LDANZIG # (EXITS IMMEDIATELY).
043640,002737: 00,3574 54126 TS ESCAPE
043641,002738: 00,3575 07001 TC BRANCH # TEST SIGN OF INPUT.
043642,002739: 00,3576 13606 TCF ACOSST # START IMMEDIATELY IF POSITIVE.
043643,002740: 00,3577 13706 TCF ACOSZERO # ARCCOS(0) = PI/2 = .25.
043644,002741: 00,3600 00006 EXTEND # IF NEGATIVE, USE THE IDENTITY
043645,002742: 00,3601 40145 DCS MPAC # ARCCOS(X) = PI - ARCCOS(-X), FORCING
043646,002743: 00,3602 52145 DXCH MPAC # ARGUMENT POSITIVE.
043647,002744: 00,3603 33711 CAF TCSUBTR # SET EXIT TO DO ABOVE BEFORE
043648,002745: 00,3604 56126 XCH ESCAPE # ARCSIN/ARCCOS CONSIDERATIONS.
043649,002746: 00,3605 54127 TS ESCAPE2
043650,002747:
043651,002748: 00,3606 47746 ACOSST CS HALF # TEST MAGNITUDE OF INPUT.
043652,002749: 00,3607 60144 AD MPAC
043653,002750: 00,3610 10000 CCS A
043654,002751: 00,3611 13702 TCF ACOSOVF # THIS IS PROBABLY AN OVERFLOW CASE.
043655,002752:
043656,002753: 00,3612 13670 LASINEX TCF ASINEX
043657,002754:
043658,002755: 00,3613 13623 TCF ACOSST2 # NO OVERFLOW - PROCEED.
043659,002756:
043660,002757: 00,3614 10145 CCS MPAC +1 # IF MAJOR PART IS .5, CALL ANSWER 0
043661,002758: 00,3615 37767 CAF ZERO # UNLESS MINOR PART NEGATIVE.
043662,002759: 00,3616 13620 TCF ACOS=0
043663,002760:
043664,002761: 00,3617 13623 TCF ACOSST2
043665,002762:
043666,002763: 00,3620 54145 ACOS=0 TS MPAC +1
043667,002764: 00,3621 54144 TS MPAC
043668,002765: 00,3622 00126 TC ESCAPE
043669,002766:
043670,002767: 00,3623 00006 ACOSST2 EXTEND # NOW THAT ARGUMENT IS IN PROPER RANGE,
043671,002768: 00,3624 40145 DCS MPAC # BEGIN COMPUTATION. USE HASTINGS
043672,002769: 00,3625 67746 AD HALF # APPROXIMATION ARCCOS(X) = SQRT(1-X)P(X)
043673,002770: 00,3626 52145 DXCH MPAC # IN A SCALED VERSION WHERE P(X) IS A
043674,002771: 00,3627 52124 DXCH BUF2 # SEVENTH ORDER POLYNOMIAL.
043675,002772:
043676,002773: 00,3630 03325 TC SQRTSUB # RETURNS WITH NORMALIZED SQUARE ROOT.
043677,002774:
043678,002775: 00,3631 10125 CCS MPTEMP # SEE IF UN-NORMALIZATION REQUIRED.
043679,002776: 00,3632 13675 TCF ACOSSHR # IF SO.
043680,002777:
Page 1035 |
043682,002779: 00,3633 52145 ACOS3 DXCH MPAC # SET UP FOR POLYNOMIAL EVALUATION.
043683,002780: 00,3634 52124 DXCH BUF2
043684,002781: 00,3635 52145 DXCH MPAC
043685,002782:
043686,002783: 00,3636 07274 TC POLY
043687,002784: 00,3637 00006 DEC 6 B-14
043688,002785: 00,3640 13240 23630 2DEC +.353553385 # COEFFICIENTS ARE C 2(+I)/PISQRT(2) WHERE
043689,002786:
043690,002787: 00,3642 74721 47775 2DEC* -.0483017006 B+1* # I
043691,002788:
043692,002789: 00,3644 02440 20237 2DEC* +.0200273085 B+2* # WHERE C STANDS FOR ORIGINAL COEFFS.
043693,002790:
043694,002791: 00,3646 75067 70742 2DEC* -.0112931863 B+3*
043695,002792:
043696,002793: 00,3650 03436 26756 2DEC* +.00695311612 B+4*
043697,002794:
043698,002795: 00,3652 74037 57640 2DEC* -.00384617957 B+5*
043699,002796:
043700,002797: 00,3654 03046 07143 2DEC* +.001501297736 B+6*
043701,002798:
043702,002799: 00,3656 76654 42244 2DEC* -.000284160334 B+7*
043703,002800:
043704,002801: 00,3660 32466 CAF LBUF2 # DO FINAL MULTIPLY AND GO TO ANY
043705,002802: 00,3661 07160 TC DMPSUB -1 # EPILOGUE SEQUENCES.
043706,002803: 00,3662 00126 TC ESCAPE
043707,002804:
043708,002805: 00,3663 00006 SUBTR EXTEND # EPILOGUE FOR NEGATIVE INPUTS TO ARCCOS.
043709,002806: 00,3664 40145 DCS MPAC
043710,002807: 00,3665 67746 AD HALF # FORMS PI - ARCCOS(-X) = ARCCOS(X).
043711,002808: 00,3666 52145 DXCH MPAC
043712,002809: 00,3667 00127 TC ESCAPE2 # GO TO POSSIBLE ARCSIN EPILOGUE.
043713,002810:
043714,002811: 00,3670 00006 ASINEX EXTEND
043715,002812: 00,3671 40145 DCS MPAC # ARCSIN EPILOGUE - GET ARCSIN(X)
043716,002813: 00,3672 67747 AD QUARTER # = PI/2 - ARCCOS(X).
043717,002814: 00,3673 52145 DXCH MPAC
043718,002815: 00,3674 16125 LDANZIG TCF DANZIG
043719,002816:
Page 1036 |
043721,002818: 00,3675 50000 ACOSSHR INDEX A # THE SHIFT RIGHT IS LESS THAN 14 SINCE
043722,002819: 00,3676 37746 CAF BIT14 # THE INPUT WAS NON-ZERO DP.
043723,002820: 00,3677 54125 TS MPTEMP
043724,002821: 00,3700 02073 TC VSHRRND # DP SHIFT RIGHT AND ROUND.
043725,002822: 00,3701 13633 TCF ACOS3 # PROCEED.
043726,002823:
043727,002824: 00,3702 00006 ACOSOVF EXTEND # IF MAJOR PART WAS ONLY 1 MORE THAN .5,
043728,002825: 00,3703 13620 BZF ACOS=0 # CALL ANSWER ZERO.
043729,002826:
043730,002827: 00,3704 06000 ACOSABRT TC ABORT
043731,002828: 00,3705 01301 OCT 1301
043732,002829:
043733,002830: 00,3706 37747 ACOSZERO CAF QUARTER # ACOS(0) = PI/2.
043734,002831: 00,3707 13621 TCF ACOS=0 +1 # SET MPAC AND EXIT VIA ESCAPE.
043735,002832:
043736,002833: 00,3710 77763 NEG12 DEC -12 B-14
043737,002834: 00,3711 13663 TCSUBTR TCF SUBTR
043738,002835:
Page 1037 |
043740,002837: # AUXILIARY CODING FOR DDV/BDDV:
043741,002838:
043742,002839:
043743,002840: 00,3712 10000 BUFPOS CCS A
043744,002841: 00,3713 12420 TCF BUF+ # TO BUF+ IF BUF IS GREATER THAN +1.
043745,002842:
043746,002843: 00,3714 40121 CS BUF +1 # IF BUF IS +1, FORCING SIGN AGREEMENT
043747,002844: 00,3715 00006 EXTEND # MAY CAUSE BUF TO BECOME ZERO.
043748,002845: 00,3716 62420 BZMF BUF+ # BRANCH IF SIGNS AGREE.
043749,002846:
043750,002847: 00,3717 37746 CA HALF # SIGNS DISAGREE. FORCE AGREEMENT.
043751,002848: 00,3720 60000 +6 DOUBLE
043752,002849: 00,3721 26121 ADS BUF +1
043753,002850: 00,3722 37767 CA ZERO
043754,002851: 00,3723 54120 TS BUF
043755,002852: 00,3724 12362 TCF BUFZERO
043756,002853:
043757,002854: 00,3725 10000 BUFNEG CCS A
043758,002855: 00,3726 12414 TCF BUF- # TO BUF- IF BUF IS LESS THAN -1.
043759,002856:
043760,002857: 00,3727 30121 CA BUF +1 # IF BUF IS -1, FORCING SIGN AGREEMENT
043761,002858: 00,3730 00006 EXTEND # MAY CAUSE BUF TO BECOME ZERO.
043762,002859: 00,3731 62414 BZMF BUF- # BRANCH IF SIGNS AGREE.
043763,002860:
043764,002861: 00,3732 47746 CS HALF # SIGNS DISAGREE. FORCE AGREEMENT.
043765,002862: 00,3733 13720 TCF BUFPOS +6
043766,002863:
Page 1038 |
043768,002865: # THE FOLLOWING INSTRUCTIONS ARE AVAILABLE FOR SETTING, MODIFYING, AND BRANCHING ON INDEX REGISTERS:
043769,002866:
043770,002867: # 1. AXT ADDRESS TO INDEX TRUE.
043771,002868: # 2. AXC ADDRESS TO INDEX COMPLEMENTED.
043772,002869: # 3. LXA LOAD INDEX FROM ERASABLE.
043773,002870: # 4. LXC LOAD INDEX COMPLEMENTED FROM ERASABLE.
043774,002871: # 5. SXA STORE INDEX IN ERASABLE.
043775,002872: # 6. XCHX EXCHANGE INDEX REIGSTER WITH ERASABLE.
043776,002873:
043777,002874: # 7. INCR INCREMENT INDEX REGISTER.
043778,002875: # 8. XAD ERASABLE ADD TO INDEX REGISTER.
043779,002876: # 9. XSU ERASABLE SUBTRACT FROM INDEX REGISTER.
043780,002877:
043781,002878: # 10. TIX BRANCH ON INDEX REGISTER AND DECREMENT.
043782,002879:
043783,002880:
043784,002881: 01,2626 BANK 01
043785,002882:
043786,002883: 01,2626 02723 AXT TC TAGSUB # SELECT APPROPRIATE INDEX REGISTER.
043787,002884: 01,2627 30107 CA POLISH
043788,002885: 01,2630 50120 XSTORE INDEX INDEXLOC # CONTAINS C(FIXLOC) OR C(FIXLOC)+1.
043789,002886: 01,2631 54046 TS X1
043790,002887: 01,2632 16125 TCF DANZIG
043791,002888:
043792,002889: 01,2633 02723 AXC TC TAGSUB
043793,002890: 01,2634 40107 CS POLISH
043794,002891: 01,2635 02630 TC XSTORE
043795,002892:
043796,002893: 01,2636 02711 LXA TC 15ADRERS # LOAD INDEX REGISTER FROM ERASABLE.
043797,002894: 01,2637 50107 INDEX POLISH
043798,002895: 01,2640 30000 CA 0
043799,002896: 01,2641 12630 TCF XSTORE
043800,002897:
043801,002898: 01,2642 02711 LXC TC 15ADRERS # LOAD NDX REG FROM ERASABLE COMPLEMENTED.
043802,002899: 01,2643 50107 INDEX POLISH
043803,002900: 01,2644 40000 CS 0
043804,002901: 01,2645 12630 TCF XSTORE
043805,002902:
043806,002903: 01,2646 02711 SXA TC 15ADRERS # STORE INDEX REGISTER IN ERASABLE.
043807,002904: 01,2647 50120 INDEX INDEXLOC
043808,002905: 01,2650 30046 CA X1
043809,002906: 01,2651 50107 MSTORE1 INDEX POLISH
043810,002907: 01,2652 54000 TS 0
043811,002908: 01,2653 16125 TCF DANZIG
043812,002909:
Page 1039 |
043814,002911: 01,2654 02711 XCHX TC 15ADRERS # EXCHANGE INDEX REGISTER WITH ERASABLE.
043815,002912: 01,2655 50107 INDEX POLISH
043816,002913: 01,2656 30000 CA 0
043817,002914: 01,2657 50120 INDEX INDEXLOC
043818,002915: 01,2660 56046 XCH X1
043819,002916: 01,2661 12651 TCF MSTORE1
043820,002917:
043821,002918: 01,2662 02711 XAD TC 15ADRERS # ADD ERASABLE TO INDEX REGISTER.
043822,002919: 01,2663 50107 INDEX POLISH
043823,002920: 01,2664 30000 CA 0
043824,002921: 01,2665 50120 XAD2 INDEX INDEXLOC
043825,002922: 01,2666 26046 ADS X1 # IGNORING OVERFLOWS.
043826,002923: 01,2667 16125 TCF DANZIG
043827,002924:
043828,002925: 01,2670 02723 INCR TC TAGSUB # INCREMENT INDEX REGISTER.
043829,002926: 01,2671 30107 CA POLISH
043830,002927: 01,2672 12665 TCF XAD2
043831,002928:
043832,002929: 01,2673 02711 XSU TC 15ADRERS # SUBTRACT ERASABLE FROM INDEX REGISTER.
043833,002930: 01,2674 50107 INDEX POLISH
043834,002931: 01,2675 40000 CS 0
043835,002932: 01,2676 12665 TCF XAD2
043836,002933:
043837,002934:
043838,002935: 01,2677 02723 TIX TC TAGSUB # BRANCH AND DECREMENT ON INDEX.
043839,002936: 01,2700 50120 INDEX INDEXLOC
043840,002937: 01,2701 40050 CS S1
043841,002938: 01,2702 50120 INDEX INDEXLOC
043842,002939: 01,2703 60046 AD X1
043843,002940: 01,2704 00006 EXTEND # NO OPERATION IF DECREMENTED INDEX IS
043844,002941: 01,2705 66125 BZMF DANZIG # NEGATIVE OR ZERO.
043845,002942:
043846,002943: 01,2706 50120 DOTIXBR INDEX INDEXLOC
043847,002944: 01,2707 56046 XCH X1 # IGNORING OVERFLOWS.
043848,002945:
043849,002946: 01,2710 16724 TCF GOTO # DO THE BRANCH USING THE CADR IN POLISH.
043850,002947:
Page 1040 |
043852,002949: # SUBROUTINE TO CONVERT AN ERASABLE ADDRESS (11 BITS) TO AN EBANK SETTING AND SUBADDRESS.
043853,002950:
043854,002951: 01,2711 40107 15ADRERS CS POLISH
043855,002952: 01,2712 65353 AD DEC45
043856,002953: 01,2713 10000 CCS A # DOES THE ADDRESS POINT TO THE WORK AREA?
043857,002954: 01,2714 30110 CA FIXLOC # YES. ADD FIXLOC. EBANK OK AS IS.
043858,002955: 01,2715 12722 TCF +5
043859,002956:
043860,002957: 01,2716 35352 CA OCT1400 # NO. SET EBANK & MAKE UP SUBADDRESS.
043861,002958: 01,2717 56107 XCH POLISH
043862,002959: 01,2720 54003 TS EBANK
043863,002960: 01,2721 74564 MASK LOW8
043864,002961: 01,2722 26107 +5 ADS POLISH # FALL INTO TAGSUB, AND RETURN VIA Q.
043865,002962:
043866,002963: # SUBROUTINE WHICH SETS THE ADDRESS OF THE SPECIFIED INDEX IN INDEXLOC. (ACTUALLY, THE ADDRESS -38D.)
043867,002964:
043868,002965: 01,2723 30110 TAGSUB CA FIXLOC
043869,002966: 01,2724 54120 TS INDEXLOC
043870,002967:
043871,002968: 01,2725 10020 CCS CYR # BIT 15 SPECIFIES INDEX.
043872,002969: 01,2726 24120 INCR INDEXLOC # 0 MEANS USE X2.
043873,002970: 01,2727 00002 TC Q
043874,002971: 01,2730 00002 TC Q # 1 FOR X1.
043875,002972:
Page 1041 |
043877,002974: # MISCELLANEOUS OPERATION CODES WITH DIRECT ADDRESSES. INCLUDED HERE ARE:
043878,002975:
043879,002976: # 1. ITA STORE QPRET (RETURN ADDRESS) IN ERASABLE.
043880,002977: # 2. CALL CALL A SUBROUTINE, LEAVING RETURN IN QPRET.
043881,002978: # 3. RTB RETURN TO BASIC LANGUAGE AT THE GIVEN ADDRESS.
043882,002979: # 4. BHIZ BRANCH IF THE HIGH ORDER OF MPAC IS ZERO (SINGLE PRECISION).
043883,002980: # 5. BOV BRANCH ON OVERFLOW.
043884,002981: # 6. GOTO SIMPLE SEQUENCE CHANGE.
043885,002982:
043886,002983: 01,2731 10020 RTB/BHIZ CCS CYR
043887,002984: 01,2732 30107 RTB CA POLISH
043888,002985: 01,2733 15230 TCF BANKJUMP # CALL BASIC ROUTINE.
043889,002986:
043890,002987: 01,2734 10144 BHIZ CCS MPAC
043891,002988: 01,2735 16125 TCF DANZIG
043892,002989: 01,2736 16724 TCF GOTO
043893,002990: 01,2737 16125 TCF DANZIG
043894,002991: 01,2740 16724 TCF GOTO
043895,002992:
043896,002993: 01,2741 10111 BOV(B) CCS OVFIND # BRANCH ON OVERFLOW TO BASIC OR INTERP.
043897,002994: 01,2742 12744 TCF +2
043898,002995: 01,2743 16125 TCF DANZIG
043899,002996: 01,2744 54111 TS OVFIND
043900,002997: 01,2745 10020 CCS CYR
043901,002998: 01,2746 12732 TCF RTB # IF BASIC.
043902,002999: 01,2747 00360 B5TOB8 OCT 360
043903,003000: 01,2750 16724 TCF GOTO
043904,003001:
Page 1042 |
043906,003003: 01,2751 10020 BZE/GOTO CCS CYR # SEE WHICH OP-CODE IS DESIRED.
043907,003004: 01,2752 07001 TC BRANCH # DO BZE.
043908,003005: 01,2753 16125 TCF DANZIG
043909,003006: 01,2754 16724 TCF GOTO # DO GOTO.
043910,003007: 01,2755 16125 TCF DANZIG
043911,003008:
043912,003009: 01,2756 10020 BPL/BMN CCS CYR
043913,003010: 01,2757 12765 TCF BPL
043914,003011: 01,2760 12000 5B10 DEC 5 B+10 # SHIFTS OP CODE IN SWITCH INSTRUCTION ADR
043915,003012:
043916,003013: 01,2761 07001 TC BRANCH # DO BMN.
043917,003014: 01,2762 16125 TCF DANZIG
043918,003015: 01,2763 16125 TCF DANZIG
043919,003016: 01,2764 16724 TCF GOTO # ONLY IF NNZ.
043920,003017:
043921,003018: 01,2765 07001 BPL TC BRANCH
043922,003019: 01,2766 16724 TCF GOTO # IF POSITIVE OR ZERO.
043923,003020: 01,2767 16724 TCF GOTO
043924,003021: 01,2770 16125 TCF DANZIG
043925,003022:
043926,003023: 01,2771 10020 CALL/ITA CCS CYR
043927,003024: 01,2772 16716 TCF CALL
043928,003025:
043929,003026: 01,2773 04736 TC CCSHOLE
043930,003027: 01,2774 02711 TC 15ADRERS # STORE QPRET. (TAGSUB AFTER 15ADRERS IS
043931,003028: 01,2775 50110 INDEX FIXLOC # SLOW IN THIS CASE, BUT SAVES STORAGE.)
043932,003029: 01,2776 30052 CA QPRET
043933,003030: 01,2777 12651 TCF MSTORE1
043934,003031:
Page 1043 |
043936,003033: # THE FOLLOWING OPERATIONS ARE AVAILABLE FOR ALTERING AND TESTING INTERPRETIVE SWITCHES:
043937,003034:
043938,003035: # 00 BONSET SET A SWITCH AND DO A GOTO IF IT WAS ON.
043939,003036: # 01 SETGO SET A SWITCH AND DO A GOTO.
043940,003037: # 02 BOFSET SET A SWITCH AND DO A GOTO IF IT WAS OFF
043941,003038: # 03 SET SET A SWITCH.
043942,003039:
043943,003040: # 04 BONINV INVERT A SWITCH AND BRANCH IF IT WAS ON.
043944,003041: # 05 INVGO INVERT A SWITCH AND DO A GOTO.
043945,003042: # 06 BOFINV INVERT A SWITCH AND BRANCH IF IT WAS OFF
043946,003043: # 07 INVERT INVERT A SWITCH.
043947,003044:
043948,003045: # 10 BONCLR CLEAR A SWITCH AND BRANCH IF IT WAS ON.
043949,003046: # 11 CLRGO CLEAR A SWITCH AND DO A GOTO.
043950,003047: # 12 BOFCLR CLEAR A SWITCH AND BRANCH IF IT WAS OFF.
043951,003048: # 13 CLEAR CLEAR A SWITCH.
043952,003049:
043953,003050: # 14 BON BRANCH IF A SWITCH WAS ON.
043954,003051: # 16 BOFF BRANCH IF A SWITCH WAS OFF.
043955,003052:
043956,003053: # THE ADDRESS SUPPLIED WITH THE SWITCH INSTRUCTION IS INTERPRETED AS FOLLOWS:
043957,003054:
043958,003055: # BITS 1-4 SWITCH BIT NUMBER (1-15).
043959,003056: # BITS 5-8 SWITCH OPERATION NUMBER.
043960,003057: # BITS 9- SWITCH WORD NUMBER (UP TO 64 SWITCH WORDS).
043961,003058:
043962,003059: # THE ADDRESS ITSELF IS MADE UP BY THE YUL SYSTEM ASSEMBLER. THE BRANCH INSTRUCTIONS REQUIRE TWO
043963,003060: # ADDRESSES, THE SECOND TAKEN AS THE DIRECT (OR INDIRECT IF IN ERASABLE) ADDRESS OF THE BRANCH.
043964,003061:
043965,003062:
043966,003063: 01,3000 35343 SWITCHES CAF LOW4 # LEAVE THE SWITCH BIT IN SWBIT .
043967,003064: 01,3001 70107 MASK POLISH
043968,003065: 01,3002 50000 INDEX A
043969,003066: 01,3003 37745 CAF BIT15 # (NUMBER FROM LEFT TO RIGHT.)
043970,003067: 01,3004 54121 TS SWBIT
043971,003068:
043972,003069: 01,3005 37755 CAF BIT7 # LEAVE THE SWITCH NUMBER IN SWWORD.
043973,003070: 01,3006 00006 EXTEND
043974,003071: 01,3007 70107 MP POLISH
043975,003072: 01,3010 54120 TS SWWORD
043976,003073:
043977,003074: 01,3011 00004 INHINT # DURING SWITCH CHANGE SO RUPT CAN USE TOO
043978,003075: 01,3012 50000 INDEX A # LEAVE THE SWITCH WORD ITSELF IN L.
043979,003076: 01,3013 30074 CA STATE
043980,003077: 01,3014 54002 TS Q # Q WILL BE USED AS A CHANNEL.
Page 1044 |
043982,003079: 01,3015 37751 CAF BIT11
043983,003080: 01,3016 00006 EXTEND # DISPATCH SWITCH BIT OPERATION AS IN BITS
043984,003081: 01,3017 70107 MP POLISH # 7-8 OF POLISH.
043985,003082: 01,3020 73060 MASK B3TOB4 # GETS 4X2-BIT CODE.
043986,003083: 01,3021 50000 INDEX A
043987,003084: 01,3022 13023 TCF +1
043988,003085:
043989,003086: 01,3023 30121 +1 CA SWBIT # 00 - SET SWITCH IN QUESTION.
043990,003087: 01,3024 00006 EXTEND
043991,003088: 01,3025 04002 ROR Q
043992,003089: 01,3026 13035 TCF SWSTORE
043993,003090:
043994,003091: 01,3027 30121 +5 CA SWBIT # 01 - INVERT SWITCH.
043995,003092: 01,3030 00006 EXTEND
043996,003093: 01,3031 06002 RXOR Q
043997,003094: 01,3032 13035 TCF SWSTORE
043998,003095:
043999,003096: 01,3033 40121 +9D CS SWBIT # 10 - CLEAR.
044000,003097: 01,3034 70002 MASK Q
044001,003098: 01,3035 50120 SWSTORE INDEX SWWORD
044002,003099: 01,3036 54074 TS STATE # NEW SWITCH WORD.
044003,003100:
Page 1045 |
044005,003102: 01,3037 00003 +13D RELINT # 11 - NOOP.
044006,003103: 01,3040 37747 CAF BIT13
044007,003104: 01,3041 00006 EXTEND # DISPATCH SEQUCE CHANGING OR BRANCHING
044008,003105: 01,3042 70107 MP POLISH # CODE.
044009,003106: 01,3043 73060 MASK B3TOB4
044010,003107: 01,3044 50000 INDEX A
044011,003108: 01,3045 13046 TCF +1 # ORIGINALLY STORED IN BITS 5-6.
044012,003109:
044013,003110: 01,3046 40002 +1 CS Q # 00 - BRANCH IF ON.
044014,003111: 01,3047 70121 TEST MASK SWBIT
044015,003112: 01,3050 10000 CCS A
044016,003113: 01,3051 13061 TCF SWSKIP
044017,003114:
044018,003115: 01,3052 16773 +5 TCF SWBRANCH # 01 - GO TO.
044019,003116:
044020,003117: 01,3053 13061 TCF SWSKIP # HERE ONLY ON BIT 15.
044021,003118:
044022,003119: 01,3054 04736 TC CCSHOLE
044023,003120: 01,3055 04736 TC CCSHOLE
044024,003121:
044025,003122: 01,3056 30002 +9D CA Q # 10 - BRANCH IF OFF.
044026,003123: 01,3057 13047 TCF TEST
044027,003124:
044028,003125: 01,3060 00014 B3TOB4 OCT 14
044029,003126:
044030,003127: 01,3061 24154 SWSKIP INCR LOC
044031,003128:
044032,003129: 01,3062 01,3000 SW/ EQUALS SWITCHES
044033,003130:
044034,003131: 01,3062 16125 +13D TCF DANZIG # 11 - NOOP.
End of include-file INTERPRETER.agc. Parent file is MAIN.agc