Source Code
These source-code files are part of a reconstructed copy of Sunrise 69, the
final release of the Block I Command Module (CM) Apollo Guidance Computer
(AGC) system test software.
They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 1003133-18, 1003133-19, 1003133-20, and 1003733-071. Corresponding portions of code have been copied from Solarium 55 where applicable. Extensive use was also made of the AGC Information Series documents, which were specifically written about the Sunrise software. Since only binary dumps (rather than listings) of Sunrise are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
001953,000002: ## Copyright: Public domain.
001954,000003: ## Filename: BANK_03_INTERPRETER_SECTION.agc
001955,000004: ## Purpose: A section of Sunrise 69.
001956,000005: ## It is part of the reconstructed source code for the final
001957,000006: ## release of the Block I Command Module system test software. No
001958,000007: ## original listings of this program are available; instead, this
001959,000008: ## file was created via disassembly of dumps of Sunrise core rope
001960,000009: ## memory modules and comparison with the later Block I program
001961,000010: ## Solarium 55.
001962,000011: ## Assembler: yaYUL --block1
001963,000012: ## Contact: Ron Burkey <info@sandroid.org>.
001964,000013: ## Website: www.ibiblio.org/apollo/index.html
001965,000014: ## Mod history: 2023-06-19 MAS Created from Sunrise 45.
001966,000015:
001967,000016: 03,6000 SETLOC 6000
001968,000017:
001969,000018: 03,6000 06021 BMN1 TC BRANCH # BRANCH MINUS
001970,000019: 03,6001 04702 TC RE-ENTER
001971,000020: 03,6002 04702 TC RE-ENTER
001972,000021: 03,6003 04566 TC DOBR
001973,000022:
001974,000023: 03,6004 06021 BPL1 TC BRANCH # BRANCH PLUS
001975,000024: 03,6005 04566 TC DOBR
001976,000025: 03,6006 04566 TC DOBR
001977,000026: 03,6007 04702 TC RE-ENTER
001978,000027:
001979,000028: 03,6010 06021 BZE1 TC BRANCH # BRANCH ZERO
001980,000029: 03,6011 04702 TC RE-ENTER
001981,000030: 03,6012 04566 TC DOBR
001982,000031: 03,6013 04702 TC RE-ENTER
001983,000032:
001984,000033: 03,6014 10114 BHIZ1 CCS MPAC # BRANCH ON HIGH ORDER ZERO
001985,000034: 03,6015 04702 TC RE-ENTER # PNZ
001986,000035: 03,6016 04566 TC DOBR
001987,000036: 03,6017 04702 TC RE-ENTER
001988,000037: 03,6020 04566 TC DOBR
001989,000038:
001990,000039: 03,6021 30001 BRANCH XCH Q
001991,000040: 03,6022 50110 TS BRANCHQ
001992,000041: 03,6023 10114 CCS MPAC
001993,000042: 03,6024 00110 TC BRANCHQ
001994,000043: 03,6025 06027 TC +2
001995,000044: 03,6026 06036 TC MINUS
001996,000045:
001997,000046: 03,6027 10115 CCS MPAC +1
001998,000047: 03,6030 00110 TC BRANCHQ
001999,000048: 03,6031 06033 TC +2
002000,000049: 03,6032 06036 TC MINUS
002001,000050:
002002,000051: 03,6033 10116 CCS MPAC +2
002003,000052: 03,6034 00110 TC BRANCHQ
002004,000053: 03,6035 06037 TC +2
002005,000054: 03,6036 34516 MINUS CAF ONE
002006,000055: 03,6037 64516 AD ONE
002007,000056: 03,6040 60110 AD BRANCHQ
002008,000057: 03,6041 00000 XAQ
002009,000058:
002010,000059:
002011,000060: 03,6042 40066 TRUE2 CS FIXLOC # RESTORES INTEGER ADDRESSES
002012,000061: 03,6043 60061 AD ADDRWD
002013,000062: 03,6044 50061 TS ADDRWD
002014,000063: 03,6045 10000 CCS A # WE MUST ELIMINATE THE MINUS ZERO CASE
002015,000064: 03,6046 00001 TC Q # OK HERE
002016,000065: 03,6050 LOC +1
002017,000066: 03,6050 06052 TC +2 # IF ADDRESS WAS NEGATIVE
002018,000067: 03,6051 04024 TC DANZIG # FAST EXIT FOR ZERO SHIFT COUNTS
002019,000068: 03,6052 20064 INDEX MODE # RIGHT SHIFT INSTEAD OF A LEFT ONE
002020,000069: 03,6053 06056 TC +3 # CCS FOLLOWED BY ADD LEFT THE COUNT POS.
002021,000070: 03,6054 05077 TC SHIFTR1 +3 # SO WE NEED ONLY CALL THE APPROPRIATE
002022,000071: 03,6055 05077 TC SHIFTR1 +3 # SHIFT RIGHT INSTRUCTION.
002023,000072: 03,6056 40061 CS ADDRWD # PUT POSITIVE COUNT IN ADDRWD.
002024,000073: 03,6057 50061 TS ADDRWD
002025,000074: 03,6060 64335 AD NEG1 # DECREMENT LIKE CCS BEFORE RETURNING.
002026,000075: 03,6061 05636 TC VSRT1 +4
002027,000076:
002028,000077: 03,6062 04721 AST TC TAG
002029,000078: 03,6063 40075 CS POLISH
002030,000079: 03,6064 20074 SSTORE INDEX TAG1
002031,000080: 03,6065 30050 XCH 40D # STEP REGISTER
002032,000081: 03,6066 04702 TC RE-ENTER
002033,000082:
002034,000083: 03,6067 04721 AXC TC TAG # ADDRESS TO INDEX COMPLEMENTED
002035,000084: 03,6070 30075 XCH POLISH
002036,000085: 03,6071 06074 TC XSTORE
002037,000086:
002038,000087: 03,6072 04721 AXT TC TAG
002039,000088: 03,6073 40075 CS POLISH
002040,000089: 03,6074 20074 XSTORE INDEX TAG1
002041,000090: 03,6075 30046 XCH 38D # MAY HAVE OVERFLOWED
002042,000091: 03,6076 04702 TC RE-ENTER
002043,000092:
002044,000093: 03,6077 04721 LXA TC TAG
002045,000094: 03,6100 20061 INDEX ADDRWD # MUST BE ERASABLE - NOT NEEDED OTHERWISE
002046,000095: 03,6101 40000 CS 0
002047,000096: 03,6102 40000 +3 CS A
002048,000097: 03,6103 06074 TC XSTORE
002049,000098:
002050,000099: 03,6104 04721 LXC TC TAG # LOAD INDEX FROM ADDRESS COMPLEMENTED
002051,000100: 03,6105 20061 INDEX ADDRWD
002052,000101: 03,6106 40000 CS 0
002053,000102: 03,6107 06074 TC XSTORE
002054,000103:
002055,000104: 03,6110 04721 SXA TC TAG
002056,000105: 03,6111 20074 INDEX TAG1
002057,000106: 03,6112 40046 CS 38D # GET INDEX
002058,000107: 03,6113 40000 CS A
002059,000108: 03,6114 04700 TC STOR1
002060,000109:
002061,000110:
002062,000111: 03,6115 04721 TIX TC TAG
002063,000112: 03,6116 20074 INDEX TAG1 # GET APPROPRIATE STEP REGISTER
002064,000113: 03,6117 40050 CS 40D # STEP REGISTER
002065,000114: 03,6120 20074 INDEX TAG1
002066,000115: 03,6121 60046 AD 38D
002067,000116: 03,6122 50101 TS TEM2 # TO TEMPORARY
002068,000117: 03,6123 10000 CCS A
002069,000118: 03,6124 30101 XCH TEM2 # DECREMENT INDEX AND BRANCH
002070,000119: 03,6125 06130 TC TIXBR
002071,000120: 03,6126 04702 TC RE-ENTER # INDEX LEFT ALONE AND NO BRANCH
002072,000121: 03,6127 04702 LNOBR TC RE-ENTER
002073,000122:
002074,000123: 03,6130 20074 TIXBR INDEX TAG1
002075,000124: 03,6131 50046 TS 38D
002076,000125: 03,6132 40075 CS POLISH
002077,000126: 03,6133 04601 TC DOBR2
002078,000127:
002079,000128: 03,6134 04721 INCR TC TAG
002080,000129: 03,6135 40075 CS POLISH
002081,000130: 03,6136 20074 INDEX TAG1
002082,000131: 03,6137 60046 AD 38D
002083,000132: 03,6140 06074 TC XSTORE
002084,000133:
002085,000134: 03,6141 04721 XCHX TC TAG
002086,000135: 03,6142 20061 INDEX ADDRWD
002087,000136: 03,6143 30000 XCH 0
002088,000137: 03,6144 20074 INDEX TAG1
002089,000138: 03,6145 30046 XCH 38D
002090,000139: 03,6146 04700 TC STOR1
002091,000140:
002092,000141: 03,6147 04721 XSU TC TAG # INDEX REGISTER SUBTRACT FROM ERASABLE
002093,000142: 03,6150 20061 INDEX ADDRWD
002094,000143: 03,6151 40000 CS 0
002095,000144: 03,6152 06136 TC INCR +2
002096,000145:
002097,000146: 03,6153 04721 XAD TC TAG # INDEX REGISTER ADD FROM ERASABLE
002098,000147: 03,6154 20061 INDEX ADDRWD
002099,000148: 03,6155 40000 CS 0
002100,000149: 03,6156 40000 COM
002101,000150: 03,6157 06136 TC INCR +2
002102,000151:
002103,000152:
002104,000153: 03,6160 35500 VDEF CAF ZERO
002105,000154: 03,6161 60067 AD VACLOC # USES MPAC AS V0, PUSHES UP FOR V1, AND
002106,000155: 03,6162 50101 TS TEM2 # PUSHES UP AGAIN FOR V2. THE RESULTING
002107,000156: 03,6163 34771 CAF DAD2 +4 # VECTOR IS LEFT IN VAC
002108,000157: 03,6164 05040 TC 8TO2
002109,000158: 03,6165 05411 TC INCRT2
002110,000159: 03,6166 04326 TC PUSHUP1
002111,000160: 03,6167 05040 TC 8TO2
002112,000161: 03,6170 05411 TC INCRT2
002113,000162: 03,6171 04326 TC PUSHUP1
002114,000163: 03,6172 05040 TC 8TO2
002115,000164: 03,6173 05407 TC ZEROEXIT # T0 DECLAIN MO45 IS VECTOR
002116,000165:
002117,000166: 03,6174 10020 ITA1 CCS CYR
002118,000167: 03,6175 06203 TC +6 # FOR ITA
002119,000168: 03,6177 LOC +1
002120,000169: 03,6177 20061 INDEX ADDRWD # PICK UP ADDRESS
002121,000170: 03,6200 40000 CS 0
002122,000171: 03,6201 40000 COM
002123,000172: 03,6202 04601 TC DOBR2 # AND DO THE BRANCH
002124,000173:
002125,000174: 03,6203 20066 +6 INDEX FIXLOC
002126,000175: 03,6204 40052 CS QPRET
002127,000176: 03,6205 06113 TC SXA +3 # COMPLEMENT AND DEPOSIT
002128,000177:
002129,000178: 03,6206 10020 EXIT CCS CYR # RETURN TO BASIC
002130,000179: 03,6207 04570 TC EXIT2 # EXIT.
002131,000180:
002132,000181: 03,6211 LOC +1
002133,000182:
002134,000183: 03,6211 40075 CS POLISH # HERE TO RETURN TO BASIC AT X
002135,000184: 03,6212 02524 TC SWCALL
002136,000185:
002137,000186: 03,6213 20061 SIGN INDEX ADDRWD # AFFIX SIGN OF X TO MPAC OR VAC
002138,000187: 03,6214 10000 CCS 0 # MUST BE NON-ZERO
002139,000188: 03,6215 04024 TC DANZIG
002140,000189: 03,6216 06220 TC +2 # EXAMINE MINOR PART
002141,000190: 03,6217 06325 TC COMP # COMPLEMENT VECTOR OR SCALAR.
002142,000191:
002143,000192: 03,6220 20061 INDEX ADDRWD
002144,000193: 03,6221 10001 CCS 1
002145,000194: 03,6222 04024 TC DANZIG
002146,000195: 03,6223 04024 TC DANZIG # NO OPERATION IF C(ADDRWD,ADDRWD+1) = 0
002147,000196: 03,6224 06325 TC COMP
002148,000197: 03,6225 04024 TC DANZIG
002149,000198:
002150,000199:
002151,000200: 03,6226 40067 VSQ CS VACLOC # TAKE SQUARE OF LENGTH OF VECTOR IN VAC.
002152,000201: 03,6227 40000 COM
002153,000202: 03,6230 50061 TS ADDRWD
002154,000203: 03,6231 05234 TC DOT1 +1 # FINISH IN DOT PRODUCT ROUTINE.
002155,000204:
002156,000205: 03,6232 64516 AD ONE # FROM TRUE2
002157,000206:
002158,000207: 03,6233 30001 SHIFTR XCH Q
002159,000208: 03,6234 50103 TS TEM5 # SHIFT TP MPAC RIGHT ACCORDING TO INTEGER
002160,000209: 03,6235 10001 CCS Q # PICK UP COUNT, SUBTRACTING ONE
002161,000210: 03,6236 62130 +3 AD NEG13 # RETURNS HERE FROM SR14
002162,000211: 03,6237 10000 CCS A
002163,000212: 03,6240 64516 AD ONE # SHIFT COUNT MORE THAN 14 - DECREMENT BY
002164,000213: 03,6241 06251 TC SR14 # 14 AND EXCHANGE
002165,000214: 03,6242 06244 TC +2 # REMAINING SHIFT COUNT BETWEEN 1 AND 13
002166,000215: 03,6243 06251 TC SR14 # MULTIPLES OF 14 END UP HERE
002167,000216: 03,6244 40000 COM
002168,000217: 03,6245 20000 INDEX A # PICK UP PROPER SHIFTING BIT
002169,000218: 03,6246 34515 CAF BIT2
002170,000219: 03,6247 05415 TC SHORTMP # DO SHIFT BY MULTIPLICATION
002171,000220: 03,6250 00103 TC TEM5 # (TEM5 CONTAINS SQRT RETURN IF SQRT CALL)
002172,000221:
002173,000222: 03,6251 30114 SR14 XCH MPAC # SAVE REDUCED COUNT
002174,000223: 03,6252 30115 XCH MPAC +1
002175,000224: 03,6253 30116 XCH MPAC +2
002176,000225: 03,6254 35500 CAF ZERO
002177,000226: 03,6255 30114 XCH MPAC # NOW BRING IT BACK
002178,000227: 03,6256 10000 CCS A # SEE IF REMAINING COUNT IS ZERO
002179,000228: 03,6257 06236 TC SHIFTR +3 # NON-ZERO - BACK TO SHIFT LOOP
002180,000229: 03,6260 00103 TC TEM5 # FINISHED
002181,000230:
002182,000231:
002183,000232: 03,6261 06263 ABVAL1 TC ABVAL
002184,000233: 03,6262 05236 TC DPEXIT # MODE IS NOW DP
002185,000234:
002186,000235: 03,6263 30001 ABVAL XCH Q # TAKES HALF THE LENGTH OF THE VECTOR IN
002187,000236: 03,6264 50106 TS TEM10 # VAC
002188,000237: 03,6265 06275 TC VSR1 # SHIFT VECTOR RIGHT ONE
002189,000238: 03,6266 05245 TC DOT2 # TAKE THE SQUARE OF ITS LENGTH
002190,000239: 03,6267 45501 CS FOUR # STORE SQUARE OF LENGTH IN REGISTERS 28
002191,000240: 03,6270 60067 AD VACLOC # AND 29 OF VAC AREA.
002192,000241: 03,6271 05346 TC STORDAC
002193,000242: 03,6272 04737 TC MPACCOM
002194,000243: 03,6273 07300 TC SQRT3 # TAKE A TRIPLE-PRECISION SQRT (DP ANSWER)
002195,000244: 03,6274 00106 TC TEM10 # AND EXIT
002196,000245:
002197,000246: 03,6275 30001 VSR1 XCH Q # SUBROUTINE WHICH SHIFTS VECTOR IN VAC
002198,000247: 03,6276 50105 TS TEM9 # RIGHT ONE PLACE, USED BY ABVAL AND UNIT
002199,000248: 03,6277 35501 CAF FOUR
002200,000249: 03,6300 60067 AD VACLOC # USED BY ABVAL AND UNIT
002201,000250: 03,6301 07257 TC SR1 # VECTOR IS SHIFTED RIGHT SO DOT PRODUCT
002202,000251: 03,6302 30063 XCH TEM11 # WONT OVERFLOW.
002203,000252: 03,6303 64340 AD MINUS2
002204,000253: 03,6304 07257 TC SR1
002205,000254: 03,6305 30063 XCH TEM11
002206,000255: 03,6306 64340 AD MINUS2
002207,000256: 03,6307 50061 TS ADDRWD # FOR THE DOT ROUTINE.
002208,000257: 03,6310 07257 TC SR1 # VECTOR IS NOW SHIFTED RIGHT
002209,000258:
002210,000259: 03,6311 00105 TC TEM9
002211,000260:
002212,000261: 03,6312 06021 SSM TC BRANCH # SET SIGN OF MPAC,MPAC+1 MINUS, USED BY
002213,000262: 03,6313 04737 TC MPACCOM # SIGN INSTRUCTION
002214,000263: 03,6314 04024 TC DANZIG
002215,000264: 03,6315 04024 TC DANZIG
002216,000265:
002217,000266: 03,6316 06021 SSP TC BRANCH
002218,000267: 03,6317 04024 TC DANZIG
002219,000268: 03,6320 04024 TC DANZIG
002220,000269: 03,6321 04737 TC MPACCOM
002221,000270: 03,6322 04024 TC DANZIG
002222,000271:
002223,000272:
002224,000273: 03,6323 34231 SQUARE CAF BUGMPAC # SQUARE MPAC AND LEAVE RESULT IN MPAC, +2
002225,000274: 03,6324 05063 TC DSQ2 # CONTINUE AS IN DMP.
002226,000275:
002227,000276: 03,6325 40064 COMP CS MODE
002228,000277: 03,6326 60000 DOUBLE
002229,000278: 03,6327 20000 INDEX A
002230,000279: 03,6330 06331 TC +1
002231,000280: 03,6331 05201 TC VACCOM
002232,000281: 03,6332 04024 TC DANZIG
002233,000282: 03,6333 04737 TC MPACCOM # FOR TP
002234,000283: 03,6334 04024 TC DANZIG
002235,000284: 03,6335 06333 TC -2
002236,000285:
002237,000286: 03,6336 35500 SMOVE CAF ZERO
002238,000287: 03,6337 50115 TS MPAC +1
002239,000288: 03,6340 04024 TC DANZIG
002240,000289:
002241,000290: 03,6341 10020 NEXT CCS CYR # NEXT AND ITCQ OPERATORS
002242,000291: 03,6342 10120 CCS ADRLOC # NEXT - KNOCK DOWN ADRLOC BY ONE
002243,000292: 03,6343 06347 TC +4 # AND BEGIN NEXT EQUN IMMEDIATELY
002244,000293: 03,6344 20066 INDEX FIXLOC # ITCQ - PICK UP QPRET AND BRANCH
002245,000294: 03,6345 30052 XCH QPRET
002246,000295: 03,6346 04601 TC DOBR2
002247,000296:
002248,000297: 03,6347 50120 +4 TS ADRLOC
002249,000298: 03,6350 34516 CAF ONE # TURN ON LOAD INDICATOR
002250,000299: 03,6351 06362 TC SWLODIND
002251,000300:
002252,000301: 03,6352 10120 NOLOAD CCS ADRLOC # NOLOD AND ROUND OPERATORS. DECREMENT
002253,000302: 03,6353 50120 TS ADRLOC # ADRLOC SINCE WE SHOULDNT HAVE TAKEN AN
002254,000303: 03,6354 10020 CCS CYR # ADDRESS. SEE IF NOLOD OR ROUND
002255,000304: 03,6355 35500 CAF ZERO # NOLOD - SET NEWEQIND TO ZERO
002256,000305: 03,6356 06362 TC +4
002257,000306: 03,6357 44516 CS ONE # MODE IS NOW DP
002258,000307: 03,6360 50064 TS MODE
002259,000308: 03,6361 05071 TC MPACRND # GO ROUND MPAC AND RETURN TO DANZIG
002260,000309:
002261,000310: 03,6362 50065 SWLODIND TS NEWEQIND
002262,000311: 03,6363 04024 TC DANZIG
002263,000312:
002264,000313:
002265,000314: 03,6364 30116 SL1 XCH MPAC +2 # ROUTINE WHICH SHIFTS TRIPLE ACCUMULATOR
002266,000315: 03,6365 60000 DOUBLE # LEFT ONE PLACE. IT IS USED BY TSLT AND
002267,000316: 03,6366 50116 TS MPAC +2 # TSLC
002268,000317: 03,6367 35500 CAF ZERO
002269,000318: 03,6370 60115 AD MPAC +1
002270,000319: 03,6371 60115 AD MPAC +1
002271,000320: 03,6372 50115 TS MPAC +1
002272,000321: 03,6373 35500 CAF ZERO
002273,000322: 03,6374 60114 AD MPAC
002274,000323: 03,6375 60114 AD MPAC
002275,000324: 03,6376 50114 TS MPAC
002276,000325: 03,6377 00001 TC Q
002277,000326: 03,6400 50121 TS OVFIND # SET OVFIND IF ENTIRE WORD OVERFLOWS
002278,000327: 03,6401 00001 TC Q
002279,000328:
002280,000329: 03,6402 06042 SHIFTL TC TRUE2 # TP LEFT SHIFT - GET INTEGER ADDRESS
002281,000330: 03,6403 06406 TC +3
002282,000331: 03,6404 50061 LEFTLOOP TS ADDRWD
002283,000332: 03,6405 06364 TC SL1
002284,000333: 03,6406 10061 +3 CCS ADDRWD
002285,000334: 03,6407 06404 TC LEFTLOOP
002286,000335: 03,6410 04024 TC DANZIG
002287,000336:
002288,000337: 03,6411 35500 TSLC CAF ZERO # NORMALIZATION - START BY SETTING COUNT
002289,000338: 03,6412 50101 TS TEM2 # TO ZERO
002290,000339: 03,6413 06021 TC BRANCH
002291,000340: 03,6414 06416 TC +2
002292,000341: 03,6415 06430 TC SLCANS
002293,000342:
002294,000343: 03,6416 40114 RETRN CS MPAC # HERE FOR NON-ZERO
002295,000344: 03,6417 60000 DOUBLE
002296,000345: 03,6420 50000 OVSK # SKIP ON OVERFLOW
002297,000346: 03,6421 06423 TC +2 # NO OVERFLOW - SHIFT AGAIN
002298,000347: 03,6422 06430 TC SLCANS # DONE - WE OVERFLOWED
002299,000348: 03,6423 30101 XCH TEM2
002300,000349: 03,6424 64516 AD ONE
002301,000350: 03,6425 50101 TS TEM2
002302,000351: 03,6426 06364 TC SL1 # DO THE SHIFT
002303,000352: 03,6427 06416 TC RETRN # AND LOOP
002304,000353:
002305,000354: 03,6430 40101 SLCANS CS TEM2 # STORE COMPLEMENT OF COUNT
002306,000355: 03,6431 20061 INDEX ADDRWD
002307,000356: 03,6432 50000 TS 0
002308,000357: 03,6433 04024 TC DANZIG
002309,000358:
002310,000359:
002311,000360: 03,6434 06042 SWITCHEM TC TRUE2 # SWITCH AND TEST INSTRUCTIONS.
002312,000361:
002313,000362: 03,6435 20061 INDEX ADDRWD # PICK UP A 1 IN SPECIFIED SWITCH POS.
002314,000363: 03,6436 34477 CAF BIT15 -1 # SWITCHES ARE NUMBERED 1 - 15 D.
002315,000364: 03,6437 50102 TS TEM4
002316,000365: 03,6440 70652 MASK STATE # GET BS WHERE B IS BIT AND S IS *STATE*
002317,000366: 03,6441 50103 TS TEM5 # - THE WORD CONTAINING THE 15 SWITCHES
002318,000367:
002319,000368: 03,6442 10020 CCS CYR # DECIDE WHETHER INST. IS *SWITCH* OR TEST
002320,000369: 03,6443 04364 TC INCADR # TO PICK UP NEXT ADDRESS
002321,000370: 03,6444 06447 TC +3
002322,000371: 03,6445 40102 CS TEM4
002323,000372: 03,6446 06453 TC SWITCHIT # SWITCH BIT.
002324,000373:
002325,000374: 03,6447 10103 CCS TEM5 # TEST SWITCH
002326,000375: 03,6450 04702 TC RE-ENTER # IT WAS ON - DONT BRANCH
002327,000376: 03,6451 04573 TC SWF/F # OFF - GO TO FIXED-FIXED TO PICK UP ADR.
002328,000377: 03,6452 04702 TC RE-ENTER # COMES HERE IF BIT 15 WAS ON
002329,000378:
002330,000379: 03,6453 30652 SWITCHIT XCH STATE # WE DESIRE THE LOGICAL EXCLUSIVE OR OF B
002331,000380: 03,6454 40000 COM
002332,000381: 03,6455 70652 MASK STATE
002333,000382: 03,6456 60103 AD TEM5
002334,000383: 03,6457 40000 COM
002335,000384: 03,6460 50652 TS STATE
002336,000385: 03,6461 04702 TC RE-ENTER # DONT PUSH-DOWN IF AT END.
002337,000386:
002338,000387:
002339,000388: 03,6462 50115 VSLT2 TS MPAC +1 # SET TO ZERO IN CASE OF RIGHT SHIFT.
002340,000389: 03,6463 06042 TC TRUE2 # RETURNS TO CALLER IF COUNT PNZ.
002341,000390:
002342,000391: 03,6464 06476 TC VSLTEST
002343,000392: 03,6465 50061 VSLTLOOP TS ADDRWD
002344,000393: 03,6466 35500 CAF ZERO
002345,000394: 03,6467 60067 AD VACLOC
002346,000395: 03,6470 50101 TS TEM2
002347,000396: 03,6471 06501 TC VSL1
002348,000397: 03,6472 05411 TC INCRT2
002349,000398: 03,6473 06501 TC VSL1
002350,000399: 03,6474 05411 TC INCRT2
002351,000400: 03,6475 06501 TC VSL1
002352,000401: 03,6476 10061 VSLTEST CCS ADDRWD
002353,000402: 03,6477 06465 TC VSLTLOOP
002354,000403: 03,6500 04024 TC DANZIG
002355,000404:
002356,000405: 03,6501 20101 VSL1 INDEX TEM2
002357,000406: 03,6502 30001 XCH 1
002358,000407: 03,6503 60000 DOUBLE
002359,000408: 03,6504 20101 INDEX TEM2
002360,000409: 03,6505 50001 TS 1
002361,000410: 03,6506 35500 CAF ZERO
002362,000411: 03,6507 20101 INDEX TEM2
002363,000412: 03,6510 60000 AD 0
002364,000413: 03,6511 20101 INDEX TEM2
002365,000414: 03,6512 60000 AD 0
002366,000415: 03,6513 20101 INDEX TEM2
002367,000416: 03,6514 50000 TS 0
002368,000417: 03,6515 00001 TC Q
002369,000418: 03,6516 50121 TS OVFIND
002370,000419: 03,6517 00001 TC Q
002371,000420:
002372,000421:
002373,000422: # DOUBLE-PRECISION SINE-COSINE ROUTINES.
002374,000423:
002375,000424: # THESE PROGRAMS ARE ENTERED AND EXIT IN THE INTERPRETIVE MODE, WITH
002376,000425: # THE ARGUMENT IN MPAC AT ENTRY AND THE ANSWER IN MPAC AT EXIT. THEY
002377,000426: # COMPUTE, RESPECTIVELY, (1/2) COS (PI X) AND (1/2) SIN (PI X) WHERE
002378,000427: # X = C(MPAC) RANGES OVER THE INTERVAL (-1, +1).
002379,000428:
002380,000429: # PROGRAM USES THE SERIES
002381,000430: # 3 5 7 9
002382,000431: # (1/2) SIN(PI X) = C X + 4C X + 16C X + 64C X + 256C X .
002383,000432: # 1 3 5 7 9
002384,000433: # WHERE THE C COEFFICIENTS ARE FROM HASTINGS SERIES
002385,000434: # 3 5 7 9
002386,000435: # SIN(PI X/2) = C X + C X + C X + C X + C X .
002387,000436: # 1 3 5 7 9
002388,000437:
002389,000438: 03,6520 30001 COSINE XCH Q # CLOSED COSINE ROUTINE
002390,000439: 03,6521 50104 TS TEM8
002391,000440: 03,6522 07121 TC TSGNABS # FORM 1/2 - (ABS(X)) AND COMPUTE SINE
002392,000441: 03,6523 06743 TC DACCOM+
002393,000442: 03,6524 06527 TC SINE +2
002394,000443:
002395,000444: 03,6525 30001 SINE XCH Q # CLOSED SINE ROUTINE
002396,000445: 03,6526 50104 TS TEM8
002397,000446: 03,6527 06713 TC PARTSL1 # DOUBLE ARGUMENT
002398,000447: 03,6530 50114 TS MPAC
002399,000448: 03,6531 06533 TC +2 # IF DIDNT SKIP
002400,000449: 03,6532 04741 TC DACCOM # IF SO, WE WANT -SIN(X) = SIN(-X)
002401,000450:
002402,000451: 03,6533 40114 CS MPAC
002403,000452: 03,6534 50072 TS VBUF +2 # SAVE NEGATIVE OF ARGUMENT
002404,000453: 03,6535 50101 TS TEM2
002405,000454: 03,6536 60000 DOUBLE
002406,000455: 03,6537 50001 TS Q
002407,000456: 03,6540 06553 TC SN1 # IF ABS(X) LESS THAN 1/2
002408,000457:
002409,000458: 03,6541 20000 INDEX A # CONTAINS +-1
002410,000459: 03,6542 44520 CS NEG1/2 +1
002411,000460: 03,6543 30101 XCH TEM2
002412,000461: 03,6544 60101 AD TEM2
002413,000462: 03,6545 60101 AD TEM2 # (ADD +-1/2 TWICE TO MAKE +-1.0)
002414,000463: 03,6546 50114 TS MPAC
002415,000464: 03,6547 40115 CS MPAC +1
002416,000465: 03,6550 50115 TS MPAC +1
002417,000466: 03,6551 40114 CS MPAC
002418,000467: 03,6552 50072 TS VBUF +2
002419,000468:
002420,000469:
002421,000470: 03,6553 40115 SN1 CS MPAC +1 # SAVE REST OF ARGUMENT
002422,000471: 03,6554 50073 TS VBUF +3
002423,000472: 03,6555 34231 CAF BUGMPAC # ADDRESS OF MPAC WITH MP BITS
002424,000473: 03,6556 50102 TS TEM4
002425,000474: 03,6557 34771 CAF DAD2 +4 # SQUARE MPAC
002426,000475: 03,6560 05101 TC DMP1
002427,000476: 03,6561 04525 TC TCS1 +2
002428,000477:
002429,000478: 03,6562 05553 TC POLY
002430,000479: 03,6563 00010 DEC 8 B-14
002431,000480: 03,6564 63336 40452 2DEC -0.3926990796 # ( C /4)
002432,000481: # 1
002433,000482:
002434,000483: 03,6566 24527 17013 2DEC +0.6459637111 # ( 4C /4)
002435,000484: # 3
002436,000485:
002437,000486: 03,6570 65631 56501 2DEC -0.318758717 # ( 16C /4)
002438,000487: # 5
002439,000488:
002440,000489: 03,6572 02311 06306 2DEC +0.074780249 # ( 64C /4)
002441,000490: # 7
002442,000491:
002443,000492: 03,6574 77541 45020 2DEC -0.009694988 # (256C /4)
002444,000493: # 9
002445,000494:
002446,000495: 03,6576 05156 TC DMP # DMP BY X
002447,000496: 03,6577 50071 XCADR VBUF +2
002448,000497: 03,6600 06364 TC SL1 # AND SHIFT LEFT 2
002449,000498: 03,6601 06364 TC SL1
002450,000499: 03,6602 00104 TC TEM8 # DONE
002451,000500:
002452,000501: 03,6603 06525 SIN1 TC SINE # INTERPRETER LINKAGE
002453,000502: 03,6604 04024 TC DANZIG
002454,000503:
002455,000504: 03,6605 06520 COS1 TC COSINE
002456,000505: 03,6606 04024 TC DANZIG
002457,000506:
002458,000507:
002459,000508: 03,6607 36735 ARCSIN CAF TCTAG+1 # PICK UP ARCSIN BRANCH
002460,000509: 03,6610 64476 AD POSMAX # TO FORCE OVERFLOW
002461,000510: 03,6611 50000 OVSK # SKIP AND RESTORE NON-OVERFLOW
002462,000511:
002463,000512: 03,6612 36735 ARCCOS CAF TCEX # SET ARCCOS SWITCH
002464,000513: 03,6613 30113 XCH ESCAPE # NO SKIP, PLEASE
002465,000514: 03,6614 30001 XCH Q # ONLY HAVE TO SAVE Q IN ONE PLACE
002466,000515: 03,6615 50112 TS ARETURN
002467,000516: 03,6616 06021 TC BRANCH
002468,000517: 03,6617 06625 TC ACOSST # POSITIVE
002469,000518: 03,6620 06622 TC +2 # ARCCOS = PI/2
002470,000519: 03,6621 06722 TC NEGARGU
002471,000520:
002472,000521: 03,6622 34502 CAF QUARTER # ARCCOS(0) = .25(2PI).
002473,000522: 03,6623 50114 TS MPAC # (MPAC +1 IS ALREADY ZERO).
002474,000523: 03,6624 00113 TC ESCAPE
002475,000524:
002476,000525: 03,6625 06713 ACOSST TC PARTSL1 # DOUBLE ARGUMENT
002477,000526: 03,6626 30114 XCH MPAC # NO SKIP, BUT EXAMINE ORIGINAL MPAC
002478,000527: 03,6627 64517 AD NEG1/2 # MUST BE LESS THAN OR EQUAL TO 1/2
002479,000528: 03,6630 10000 CCS A
002480,000529: 03,6631 06631 TC -0 # MAJOR PART GREATER THAN 1/2. NOTE THAT
002481,000530: 03,6633 LOC +1 # MPAC+1 IS NOT CHECKED SO A MARGIN EXISTS
002482,000531:
002483,000532: 03,6633 06637 TC +4 # NORMAL CASE
002484,000533: 03,6634 50114 TS MPAC # ARGUMENT WAS 1 (SCALED). LEAVE ZERO
002485,000534: 03,6635 50115 TS MPAC +1 # AS RESULT AND EXIT
002486,000535: 03,6636 00113 TC ESCAPE
002487,000536:
002488,000537:
002489,000538: 03,6637 40115 +4 CS MPAC +1
002490,000539: 03,6640 50115 TS MPAC +1
002491,000540: 03,6641 50073 TS B +1
002492,000541: 03,6642 40114 CS MPAC
002493,000542: 03,6643 50072 TS B
002494,000543: 03,6644 64521 AD HALF
002495,000544: 03,6645 64521 AD HALF
002496,000545: 03,6646 50114 TS MPAC # SQRT ARGUMENT IS NOW READY
002497,000546:
002498,000547: 03,6647 06655 TC +6 # NORMAL PATH.
002499,000548:
002500,000549: 03,6650 34476 CAF POSMAX # WE HAVE FALSE OVERFLOW PRESENT AND IT
002501,000550: 03,6651 50114 TS MPAC # MUST BE CORRECTED. MAJOR PART WAS ZERO
002502,000551: 03,6652 60115 AD MPAC +1 # AND MINOR PART PNZ, SO FORM 1.0 - MPAC
002503,000552: 03,6653 64516 AD ONE # PROPERLY FOR THIS CASE.
002504,000553: 03,6654 50115 TS MPAC +1 # GUARANTEED NO OVERFLOW.
002505,000554:
002506,000555: 03,6655 07276 +6 TC SQRT2 # GO TAKE THE SQUARE ROOT.
002507,000556:
002508,000557: 03,6656 40073 CS B +1
002509,000558: 03,6657 30115 XCH MPAC +1
002510,000559: 03,6660 50073 TS B +1
002511,000560: 03,6661 40072 CS B
002512,000561: 03,6662 30114 XCH MPAC
002513,000562: 03,6663 50072 TS B
002514,000563: 03,6664 05553 TC POLY # EVALUATE HASTINGS POLYNOMIAL/2PI
002515,000564: 03,6665 00016 DEC 14 B-14
002516,000565: 03,6666 07777 37777 2DEC* .4999999920 B-1* # HASTINGS COEFFICIENTS/2PI
002517,000566: 03,6670 76720 55163 2DEC* -.0683089201 B-1*
002518,000567: 03,6672 00350 00532 2DEC* .0283228913 B-1*
002519,000568: 03,6674 77575 45233 2DEC* -.0159709772 B-1*
002520,000569: 03,6676 00120 21555 2DEC* .0098331911 B-1*
002521,000570: 03,6700 77723 56072 2DEC* -.0054393193 B-1*
002522,000571: 03,6702 00021 14445 2DEC* .0021231556 B-1*
002523,000572: 03,6704 77774 66516 2DEC* -.0004018634 B-1*
002524,000573:
002525,000574: 03,6706 05156 TC DMP # INTERPRETER SUBROUTINE ONLY
002526,000575: 03,6707 50071 XCADR B
002527,000576: 03,6710 00113 TC ESCAPE # GO TO ARCSIN/ARCCOS SWITCH (OR NEGARGU)
002528,000577:
002529,000578: 03,6711 06743 TAGIT TC DACCOM+
002530,000579: 03,6712 00112 TC ARETURN
002531,000580: 03,6713 30115 PARTSL1 XCH MPAC +1 # DOES A DOUBLE SHIFT LEFT EXCEPT FOR THE
002532,000581: 03,6714 60000 DOUBLE # FINAL TS. USED BY SIN, COS, ASIN, AND
002533,000582: 03,6715 50115 TS MPAC +1 # ACOS.
002534,000583: 03,6716 35500 CAF ZERO
002535,000584: 03,6717 60114 AD MPAC
002536,000585: 03,6720 60114 AD MPAC
002537,000586: 03,6721 00001 TC Q # POSSIBLY WITH OVERLOW PRESENT
002538,000587:
002539,000588: 03,6722 04741 NEGARGU TC DACCOM # ARCCOS(-X)=PI-ARCCOS(X)
002540,000589: 03,6723 36736 CAF TCSUBTR # SET SWITCH TO PERFORM ABOVE
002541,000590: 03,6724 30113 XCH ESCAPE
002542,000591: 03,6725 50074 TS ESCAPE2 # ADDITIONAL SWITCH HERE.
002543,000592: 03,6726 06625 TC ACOSST
002544,000593:
002545,000594:
002546,000595: 03,6727 40114 SUBTR CS MPAC
002547,000596: 03,6730 64521 AD HALF
002548,000597: 03,6731 50114 TS MPAC
002549,000598: 03,6732 40115 CS MPAC +1
002550,000599: 03,6733 50115 TS MPAC +1
002551,000600: 03,6734 00074 TC ESCAPE2 # THIS IS NOW THE ARCSIN/ARCCOS SWITCH
002552,000601:
002553,000602:
002554,000603:
002555,000604: 03,6735 06712 TCTAG+1 TC TAGIT +1
002556,000605: 03,6736 03,6735 TCEX EQUALS TCTAG+1
002557,000606: 03,6736 06727 TCSUBTR TC SUBTR
002558,000607:
002559,000608: 03,6737 06607 ARCSIN1 TC ARCSIN
002560,000609: 03,6740 04024 TC DANZIG
002561,000610:
002562,000611: 03,6741 06612 ARCCOS1 TC ARCCOS
002563,000612: 03,6742 04024 TC DANZIG
002564,000613:
002565,000614: 03,6743 40115 DACCOM+ CS MPAC +1 # USED BY SIN-COS AND ARCSIN-ARCCOS
002566,000615: 03,6744 50115 TS MPAC +1
002567,000616: 03,6745 40114 CS MPAC
002568,000617: 03,6746 64502 AD QUARTER
002569,000618: 03,6747 50114 TS MPAC
002570,000619: 03,6750 00001 TC Q
002571,000620:
002572,000621:
002573,000622: 03,6751 30076 MBXCH XCH BUF # TO EXCHANGE MPAC AND BUF
002574,000623: 03,6752 30114 XCH MPAC
002575,000624: 03,6753 50076 TS BUF
002576,000625: 03,6754 30077 XCH BUF +1
002577,000626: 03,6755 30115 XCH MPAC +1
002578,000627: 03,6756 50077 TS BUF +1
002579,000628: 03,6757 00001 TC Q
002580,000629:
002581,000630: 03,6760 50116 DDV0 TS MPAC +2 # SET MPAC+2 TO ZERO TO RESUME DDV
002582,000631: 03,6761 07121 TC TSGNABS # SIGN AGGREMENT ETC
002583,000632: 03,6762 50101 TS TEM2 # SAVE SGN
002584,000633: 03,6763 06751 TC MBXCH # SWITCH CONTENTS
002585,000634: 03,6764 07121 TC TSGNABS # SAME FOR ARGUMENT
002586,000635: 03,6765 60101 AD TEM2
002587,000636: 03,6766 10000 CCS A # TO GET SIGN OF RESULT
002588,000637: 03,6767 06772 TC +3
002589,000638: 03,6770 07115 TC DPDOFLO +1 # HERE FOR 0/0 CASE
002590,000639: 03,6771 06772 TC +1
002591,000640: 03,6772 50101 TS TEM2
002592,000641: 03,6773 10107 CCS DVSW
002593,000642: 03,6774 06751 TC MBXCH # INTERCHANGE OLD DIVISOR AND DIVIDEND
002594,000643:
002595,000644: 03,6775 40076 CS BUF # CHECK TO SEE IF C(BUF,BUF+1) LESS
002596,000645: 03,6776 60114 AD MPAC # THAN C(MPAC,MPAC+1). OVERFLOW CONDITION
002597,000646: 03,6777 10000 CCS A # IF NOT
002598,000647: 03,7000 07012 TC DDVOK # SCALING OK
002599,000648: 03,7002 LOC +1
002600,000649: 03,7002 07114 TC DPDOFLO # TROUBLE HERE
002601,000650: 03,7003 40077 CS BUF +1 # CHECK MINOR PARTS IF MAJORS EQUAL
002602,000651: 03,7004 60115 AD MPAC +1
002603,000652: 03,7005 10000 CCS A
002604,000653: 03,7006 07012 TC DDVOK
002605,000654: 03,7010 LOC +1
002606,000655: 03,7010 07114 TC DPDOFLO # TROUBLE HERE
002607,000656: 03,7011 07114 TC DPDOFLO # AS WELL AS WHEN C(BUF,BUF+1)=C(MPAC,+1)
002608,000657:
002609,000658: 03,7012 35500 DDVOK CAF ZERO
002610,000659: 03,7013 60114 AD MPAC
002611,000660: 03,7014 07030 TC DPDNORT # TO NORMALIZE
002612,000661:
002613,000662:
002614,000663: 03,7015 30001 SQRTDIV XCH Q # ENTRY FROM SQRT ROUTINE
002615,000664: 03,7016 50075 TS TEMQ3
002616,000665: 03,7017 07042 TC DVSTART
002617,000666:
002618,000667: 03,7020 30077 DPDNORM XCH BUF +1
002619,000668: 03,7021 60000 DOUBLE
002620,000669: 03,7022 50077 TS BUF +1
002621,000670: 03,7023 35500 CAF ZERO
002622,000671: 03,7024 60076 AD BUF
002623,000672: 03,7025 60076 AD BUF
002624,000673: 03,7026 50076 TS BUF
002625,000674: 03,7027 06367 TC SL1 +3 # TO DOUBLE MPAC
002626,000675:
002627,000676: 03,7030 50022 DPDNORT TS CYL # TO LOOK AT BIT 14
002628,000677: 03,7031 10022 CCS CYL
002629,000678: 03,7032 07020 TC DPDNORM
002630,000679: 03,7033 07035 TC +2
002631,000680: 03,7034 07042 TC DVSTART
002632,000681: 03,7035 30077 XCH BUF +1 # HIGH ORDER ZERO
002633,000682: 03,7036 30076 XCH BUF
002634,000683: 03,7037 30115 XCH MPAC +1 # SET MPAC +1 TO ZERO
002635,000684: 03,7040 50114 TS MPAC
002636,000685: 03,7041 07030 TC DPDNORT # AND TRY AGAIN
002637,000686:
002638,000687:
002639,000688: 03,7042 30076 DVSTART XCH BUF # OK
002640,000689: 03,7043 25777 INDEX OPOVF
002641,000690: 03,7044 50114 DV MPAC
002642,000691: 03,7045 50034 TS OVCTR
002643,000692: 03,7046 25777 INDEX OPOVF
002644,000693: 03,7047 40115 MP MPAC +1
002645,000694: 03,7050 60001 -1/2+2 AD Q # COMPLIMENT OF REMAINDER.
002646,000695: 03,7051 40000 CS A
002647,000696: 03,7052 60077 AD BUF +1
002648,000697: 03,7053 50000 OVSK
002649,000698: 03,7054 07057 TC +3 # IF NOT
002650,000699: 03,7055 25777 INDEX OPOVF # IF OVERFLEW
002651,000700: 03,7056 60114 SU MPAC
002652,000701: 03,7057 50076 +3 TS BUF
002653,000702: 03,7060 10000 CCS A
002654,000703: 03,7061 64516 AD ONE
002655,000704: 03,7062 07064 TC +2
002656,000705: 03,7063 64516 AD ONE
002657,000706: 03,7064 25777 +2 EXTEND # WE NOW HAVE ABS(CORRECT BUF)
002658,000707: 03,7065 60114 SU MPAC
002659,000708: 03,7066 10000 CCS A
002660,000709: 03,7067 64516 AD ONE
002661,000710: 03,7070 07072 TC +2
002662,000711: 03,7071 07075 TC +4
002663,000712: 03,7072 30076 +2 XCH BUF
002664,000713: 03,7073 60000 DOUBLE
002665,000714: 03,7074 10000 CCS A
002666,000715: 03,7075 30076 +4 XCH BUF
002667,000716: 03,7076 07100 TC +2
002668,000717: 03,7077 40076 CS BUF
002669,000718: 03,7100 25777 INDEX OPOVF
002670,000719: 03,7101 50114 DV MPAC
002671,000720:
002672,000721:
002673,000722: 03,7102 50115 DPDSGNT TS MPAC +1
002674,000723: 03,7103 10101 CCS TEM2
002675,000724: 03,7104 07112 TC POSQUOT
002676,000725: 03,7105 40115 CS MPAC +1
002677,000726: 03,7106 50115 TS MPAC +1
002678,000727: 03,7107 40034 CS OVCTR
002679,000728: 03,7110 50114 TS MPAC
002680,000729: 03,7111 00075 TC TEMQ3
002681,000730:
002682,000731: 03,7112 30034 POSQUOT XCH OVCTR
002683,000732: 03,7113 07110 TC -3
002684,000733:
002685,000734: 03,7114 10101 DPDOFLO CCS TEM2
002686,000735: 03,7115 45502 CS TWO
002687,000736: 03,7116 64516 AD ONE
002688,000737: 03,7117 50121 TS OVFIND
002689,000738: 03,7120 00075 TC TEMQ3
002690,000739:
002691,000740:
002692,000741: 03,7121 30001 TSGNABS XCH Q # SIGNUM AND ABSOLUTE VALUE
002693,000742: 03,7122 50103 TS TEMQ2
002694,000743: 03,7123 07132 TC TPAGREE
002695,000744:
002696,000745: 03,7124 10000 CCS A # TEST SIGNUM
002697,000746: 03,7125 64516 AD ONE
002698,000747: 03,7126 00103 TC TEMQ2
002699,000748:
002700,000749: 03,7127 04737 TC MPACCOM # COMPLEMENT IF NEGATIVE
002701,000750: 03,7130 44516 CS ONE
002702,000751: 03,7131 00103 TC TEMQ2
002703,000752:
002704,000753: 03,7132 30001 TPAGREE XCH Q # FORCE SIGN AGREEMENT IN TP WORD IN MPAC
002705,000754: 03,7133 50102 TS TEMQ
002706,000755: 03,7134 06021 TC BRANCH
002707,000756: 03,7135 07150 TC SGN=+
002708,000757: 03,7136 07143 TC SGN=0
002709,000758:
002710,000759: 03,7137 44476 CS POSMAX
002711,000760: 03,7140 50100 TS SGNDMAX
002712,000761: 03,7141 44516 CS ONE
002713,000762: 03,7142 07153 TC SGFORCE
002714,000763:
002715,000764: 03,7143 35500 SGN=0 CAF ZERO
002716,000765: 03,7144 50114 TS MPAC
002717,000766: 03,7145 50115 TS MPAC +1
002718,000767: 03,7146 50116 TS MPAC +2
002719,000768: 03,7147 00102 TC TEMQ
002720,000769:
002721,000770: 03,7150 34476 SGN=+ CAF POSMAX
002722,000771: 03,7151 50100 TS SGNDMAX
002723,000772: 03,7152 34516 CAF ONE
002724,000773:
002725,000774:
002726,000775: 03,7153 60116 SGFORCE AD MPAC +2
002727,000776: 03,7154 60100 AD SGNDMAX
002728,000777: 03,7155 50116 TS MPAC +2
002729,000778: 03,7156 35500 CAF ZERO
002730,000779:
002731,000780: 03,7157 60115 AD MPAC +1
002732,000781: 03,7160 60100 AD SGNDMAX
002733,000782: 03,7161 50115 TS MPAC +1
002734,000783: 03,7162 35500 CAF ZERO
002735,000784:
002736,000785: 03,7163 60114 AD MPAC
002737,000786: 03,7164 60100 AD SGNDMAX
002738,000787: 03,7165 50114 TS MPAC
002739,000788: 03,7167 LOC +1
002740,000789: 03,7167 00102 TC TEMQ
002741,000790:
002742,000791:
002743,000792: 03,7170 06263 UNIT TC ABVAL # UNIT VECTOR ROUTINE - START BY GETTING
002744,000793: # LENGTH
002745,000794: 03,7171 06275 TC VSR1 # LEAVES 1/2 UNIT VECTORS
002746,000795:
002747,000796: 03,7172 10550 CCS NEWJOB # ALLOW FOR INTERRUPTS
002748,000797: 03,7173 07241 TC UNITRUPT # SO WE CAN RETURN IN BASIC
002749,000798:
002750,000799: 03,7174 60067 UNITRSM AD VACLOC # RETURNS HERE FROM BREAKPOINT IF CALLED.
002751,000800: 03,7175 50061 TS ADDRWD
002752,000801: 03,7176 35502 CAF TWO
002753,000802: 03,7177 50107 TS DVSW # NON-ZERO FOR BACKWARDS DIVIDE
002754,000803: 03,7200 50111 UNITLOOP TS COMPON
002755,000804: 03,7201 40114 CS MPAC
002756,000805: 03,7202 40000 CS A
002757,000806: 03,7203 20061 INDEX ADDRWD
002758,000807: 03,7204 30000 XCH 0 # LENGTH TO COMPONENT AND COMPONENT TO BUF
002759,000808: 03,7205 50076 TS BUF
002760,000809: 03,7206 40115 CS MPAC +1
002761,000810: 03,7207 40000 CS A
002762,000811: 03,7210 20061 INDEX ADDRWD
002763,000812: 03,7211 30001 XCH 1
002764,000813: 03,7212 50077 TS BUF +1
002765,000814:
002766,000815: 03,7213 37217 CAF +4 # CALL BACKWARDS DIVIDE
002767,000816: 03,7214 50075 TS TEMQ3
002768,000817: 03,7215 35500 CAF ZERO
002769,000818: 03,7216 06760 TC DDV0
002770,000819: 03,7217 07220 TC +1
002771,000820:
002772,000821: 03,7220 30114 XCH MPAC # RESULT BACK TO COMPONENT BRINGING BACK
002773,000822: 03,7221 20061 INDEX ADDRWD # LENGTH
002774,000823: 03,7222 30000 XCH 0
002775,000824: 03,7223 50114 TS MPAC
002776,000825: 03,7224 30115 XCH MPAC +1
002777,000826: 03,7225 20061 INDEX ADDRWD
002778,000827: 03,7226 30001 XCH 1
002779,000828: 03,7227 50115 TS MPAC +1
002780,000829:
002781,000830: 03,7230 05241 TC AD2 # INCREMENT ADDRWD
002782,000831: 03,7231 10111 CCS COMPON
002783,000832: 03,7232 07200 TC UNITLOOP
002784,000833: 03,7233 45502 CS TWO # STORE LENGTH OF ARGUMENT IN REGISTERS 30
002785,000834: 03,7234 60067 AD VACLOC
002786,000835: 03,7235 50101 TS TEM2 # AND 31 OF VAC AREA.
002787,000836: 03,7236 34771 CAF DAD2 +4
002788,000837: 03,7237 05040 TC 8TO2
002789,000838: 03,7240 04024 TC DANZIG
002790,000839:
002791,000840:
002792,000841: 03,7241 40060 UNITRUPT CS BANKSET # REQUESTS FOR INTERPRETIVE INTERRUPT
002793,000842: 03,7242 50116 TS MPAC +2 # COME HERE DURING THE UNIT OPERATION.
002794,000843: 03,7243 30117 XCH LOC # SINCE WE DESIRE TO RETURN IN BASIC BUT
002795,000844: 03,7244 20066 INDEX FIXLOC # BUT STILL SAVE THE INTERPRETER CENTRALS
002796,000845: 03,7245 50036 TS 30D # (BANKSET AND LOC)
002797,000846: 03,7246 02072 TC CHANG1
002798,000847:
002799,000848: 03,7247 40116 CS MPAC +2 # ON RETURN, RESTORE AS BEFORE
002800,000849: 03,7250 50060 TS BANKSET
002801,000850: 03,7251 20066 INDEX FIXLOC
002802,000851: 03,7252 30036 XCH 30D
002803,000852: 03,7253 50117 TS LOC
002804,000853: 03,7254 35500 CAF ZERO
002805,000854: 03,7255 07174 TC UNITRSM # ENTER UNIT DIVIDE LOOP.
002806,000855: 03,7256 34771 MPACSR1 CAF DAD2 +4
002807,000856:
002808,000857: 03,7257 50063 SR1 TS TEM11 # SHIFTS RIGHT ONE USING ADDRESS IN A
002809,000858: 03,7260 20000 INDEX A
002810,000859: 03,7261 30000 XCH 0
002811,000860: 03,7262 25777 INDEX OPOVF
002812,000861: 03,7263 44521 MP HALF
002813,000862: 03,7264 20063 INDEX TEM11
002814,000863: 03,7265 50000 TS 0
002815,000864: 03,7266 20063 INDEX TEM11
002816,000865: 03,7267 30001 XCH 1
002817,000866: 03,7270 50021 TS SR
002818,000867: 03,7271 30021 XCH SR
002819,000868: 03,7272 60003 AD LP
002820,000869: 03,7273 20063 INDEX TEM11
002821,000870: 03,7274 50001 TS 1
002822,000871: 03,7275 00001 TC Q
002823,000872:
002824,000873:
002825,000874: 03,7276 35500 SQRT2 CAF ZERO # ENTRY TO IGNORE C(MPAC+2)
002826,000875: 03,7277 50116 TS MPAC +2
002827,000876:
002828,000877: 03,7300 30001 SQRT3 XCH Q # HERE TO TREAT TRIPLE-PRECISION CASES
002829,000878: 03,7301 50103 TS TEMQ2
002830,000879: 03,7302 07132 TC TPAGREE # FORCE SIGN AGREEMENT
002831,000880: 03,7303 10000 CCS A # TEST SIGNUM
002832,000881: 03,7304 07307 TC SETNORM # PNZ - OK.
002833,000882: 03,7305 00103 TC TEMQ2 # FAST EXIT FOR ZERO ARGUMENT
002834,000883:
002835,000884: 03,7306 07306 TC -0 # NEGATIVE - ABORT.
002836,000885:
002837,000886: 03,7307 50061 SETNORM TS ADDRWD # SET NORMALIZATION COUNT TO ZERO
002838,000887: 03,7310 60114 AD MPAC
002839,000888: 03,7311 50022 TS CYL # WE WILL USE A/2, SO MUST CHECK FOR
002840,000889: 03,7312 10022 CCS CYL # NORMALIZATION FIRST
002841,000890: 03,7313 07317 TC SRTEST # LESS THAN 1/2 - SEE IF AT LEAST 1/8.
002842,000891: 03,7314 07324 TC A0=0 # MAJOR PART (POSSIBLY MINOR PART) = 0.
002843,000892:
002844,000893: 03,7315 07256 TC MPACSR1 # NORMALIZED - SHIFT RIGHT ONE.
002845,000894:
002846,000895: 03,7316 07356 TC ARGHI
002847,000896:
002848,000897: 03,7317 67050 SRTEST AD -1/2+2 # SEE IF ARG GREATER THAN OR EQUAL TO 1/4.
002849,000898: 03,7320 10000 CCS A
002850,000899: 03,7321 07256 TC MPACSR1 # IT IS - SHIFT RIGHT ONE AND GO TO ARGLO.
002851,000900: 03,7322 07345 TC ARGLO # (+0 WAS IMPOSSIBLE THIS CCS.)
002852,000901:
002853,000902: 03,7323 07333 TC SQRTNORM +1 # LESS THAN 1/4 - PUT IN EFFECTIVE RIGHT
002854,000903: # BY SHIFTING LEFT ONLY ONCE WHEN ADDING
002855,000904: # ONE TO THE RIGHT SHIFT COUNT.
002856,000905:
002857,000906:
002858,000907: 03,7324 30116 A0=0 XCH MPAC +2 # MOVE ARGUMENT UP
002859,000908: 03,7325 30115 XCH MPAC +1
002860,000909: 03,7326 30114 XCH MPAC
002861,000910: 03,7327 60061 AD ADDRWD
002862,000911: 03,7330 65361 AD SEVEN # INCREASE SHIFT COUNT BY 14/2 = 7
002863,000912: 03,7331 07307 TC SETNORM
002864,000913:
002865,000914: 03,7332 06364 SQRTNORM TC SL1
002866,000915: 03,7333 34516 CAF ONE # ARGUMENT LESS THAN 1/8, SO SHIFT IT LEFT
002867,000916: 03,7334 60061 AD ADDRWD # TWO PLACES AND INCREASE SHIFT COUNT FOR
002868,000917: 03,7335 50061 TS ADDRWD # RESULT
002869,000918: 03,7336 06364 TC SL1
002870,000919: 03,7337 50022 TS CYL
002871,000920: 03,7340 40022 CS CYL
002872,000921:
002873,000922:
002874,000923: 03,7341 10022 NORMTEST CCS CYL
002875,000924: 03,7342 10022 CCS CYL
002876,000925: 03,7343 07332 TC SQRTNORM # HERE IF LESS THAN 1/8
002877,000926: 03,7344 07356 TC ARGHI # HERE IF AT LEAST 1/4, LESS THAN 1/2
002878,000927:
002879,000928: 03,7345 37352 ARGLO CAF SLOPELO # HERE IF AT LEAST 1/8, LESS THAN 1/4
002880,000929: 03,7346 25777 INDEX OPOVF
002881,000930: 03,7347 40114 MP MPAC
002882,000931: 03,7350 67353 AD BIASLO # X0/2 = .8324(A0/2) + .2974/2
002883,000932: 03,7351 07362 TC ARGHI +4
002884,000933:
002885,000934: 03,7352 32506 SLOPELO DEC .8324
002886,000935: 03,7353 04604 BIASLO DEC .2974 B-1
002887,000936: 03,7354 22650 SLOPEHI DEC .5884
002888,000937: 03,7355 06552 BIASHI DEC .4192 B-1
002889,000938:
002890,000939: 03,7356 37354 ARGHI CAF SLOPEHI
002891,000940: 03,7357 25777 INDEX OPOVF
002892,000941: 03,7360 40114 MP MPAC
002893,000942: 03,7361 67355 AD BIASHI
002894,000943: 03,7362 30114 +4 XCH MPAC # X0/2 TO MPAC
002895,000944: 03,7363 50076 TS BUF # A0/2 TO BUF
002896,000945: 03,7364 50101 TS TEM2 # SET UP POSITIVE QUOTIENT SIGNAL AND
002897,000946: 03,7365 35500 CAF ZERO
002898,000947: 03,7366 30115 XCH MPAC +1 # ZERO LOW-ORDER DIVIDEND FOR DP DIVIDE
002899,000948: 03,7367 50077 TS BUF +1 # A1/2 TO BUF+1. A2 NOW DISCARDED
002900,000949: 03,7370 40076 CS BUF
002901,000950: 03,7371 25777 INDEX OPOVF
002902,000951: 03,7372 50114 DV MPAC # -(A0/2)/(X0/2).
002903,000952: 03,7373 50021 TS SR
002904,000953: 03,7374 40021 CS SR
002905,000954: 03,7375 60114 AD MPAC # X1 IS GOOD TO 14 BITS
002906,000955: 03,7376 50114 TS MPAC # X1 = X0/2 + ((A0/2)/(X0/2))/2
002907,000956: 03,7377 50100 TS TEM3 # SAVE X1 FOR ADDITION
002908,000957: 03,7400 07015 TC SQRTDIV # GO TO FORM DP QUOTIENT OF A0/2, A1/2
002909,000958: 03,7401 30100 XCH TEM3 # OVER X1, 0. RESULT IN MPAC, MPAC +1
002910,000959: 03,7402 25777 INDEX OPOVF
002911,000960: 03,7403 44521 MP HALF
002912,000961: 03,7404 60114 AD MPAC
002913,000962: 03,7405 50034 TS OVCTR # AND MAYBE SKIP, IF ARG WAS NEAR POSMAX
002914,000963: 03,7406 07412 TC +4 # IF NO OVERFLOW
002915,000964: 03,7407 34476 CAF POSMAX
002916,000965: 03,7410 50115 TS MPAC +1
002917,000966: 03,7411 07416 TC +5
002918,000967:
002919,000968: 03,7412 30003 +4 XCH LP # FOR NORMAL CASES
002920,000969: 03,7413 60115 AD MPAC +1 # ABOVE AND X1/2
002921,000970: 03,7414 30115 XCH MPAC +1
002922,000971: 03,7415 30034 XCH OVCTR
002923,000972: 03,7416 50114 +5 TS MPAC
002924,000973:
002925,000974: 03,7417 35500 CAF ZERO # ZERO MPAC+2 SO SHIFT LEFT MAKES SENSE.
002926,000975: 03,7420 50116 TS MPAC +2
002927,000976:
002928,000977: 03,7421 10061 CCS ADDRWD # RE-NORMALIZE IF COUNT NON-ZERO
002929,000978: 03,7422 06236 TC SHIFTR +3 # FITS IN WITH MAIN SHIFT LOOP
002930,000979: 03,7423 00103 TC TEMQ2 # NO RE-SCALING REQUIRED
002931,000980:
002932,000981: 03,7424 40064 SQRTS CS MODE # INTERPRETER LINKAGE
002933,000982: 03,7425 60000 DOUBLE # TAKE APPROPRIATE SQRT
002934,000983: 03,7426 20000 INDEX A
002935,000984: 03,7427 07426 TC -1
002936,000985:
002937,000986: 03,7430 07276 TC SQRT2 # FOR DP
002938,000987: 03,7431 04024 TC DANZIG
002939,000988:
002940,000989: 03,7432 07300 TC SQRT3
002941,000990: 03,7433 04024 TC DANZIG
002942,000991:
002943,000992: 03,7434 4024 DMOVE EQUALS DANZIG # LOADING ONLY
002944,000993: 03,7434 4024 VMOVE EQUALS DANZIG
002945,000994: 03,7434 45502 TMOVE CS TWO # SET MODE TO TRIPLE FOR TP OPERATIONS
002946,000995: 03,7435 05237 TC DPEXIT +1
End of include-file BANK_03_INTERPRETER_SECTION.agc. Parent file is MAIN.agc