Source Code

003775,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 003776,000002: # 003777,000003: # This file is part of yaAGC. 003778,000004: 003779,000005: # yaAGC is free software; you can redistribute it and/or modify 003780,000006: # it under the terms of the GNU General Public License as published by 003781,000007: # the Free Software Foundation; either version 2 of the License, or 003782,000008: # (at your option) any later version. 003783,000009: 003784,000010: # yaAGC is distributed in the hope that it will be useful, 003785,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 003786,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 003787,000013: # GNU General Public License for more details. 003788,000014: 003789,000015: # You should have received a copy of the GNU General Public License 003790,000016: # along with yaAGC; if not, write to the Free Software 003791,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 003792,000018: 003793,000019: # Filename: SmallyDXCHDIM.agc 003794,000020: # Purpose: This is code written from the flowchart on p. 39 of 003795,000021: # E-2065, which is a document titled "Block II AGC 003796,000022: # Self-Check and Show-Banksum", by Edwin D. Smally. 003797,000023: # Mod history: 07/07/04 RSB. Began. 003798,000024: 003799,000025: # Similar code was apparently originally in Luminary and/or Colossus, 003800,000026: # but much of it was removed over the course of time to make more room. 003801,000027: # I don't know what the original code was like, but the flowcharts still 003802,000028: # exist, so I've rewritten the code from the flowcharts. 003803,000029: 003804,000030: # P. 39 of Smally 003805,000031: 003806,000032: 04,2307 37651 CA MAXP # 37777 003807,000033: 04,2310 67636 AD TWO 003808,000034: 003809,000035: 04,2311 24062 INCR ERRSUB # ERRSUB = 31 003810,000036: 04,2312 54071 TS SKEEP1 # Smally says SKEEP2, but must be SKEEP1. 003811,000037: 04,2313 12422 TCF DDERROR 003812,000038: 003813,000039: 04,2314 37631 CA NEGONE 003814,000040: 04,2315 54072 TS SKEEP2 003815,000041: 04,2316 37655 CA MAXN # 40000 003816,000042: 04,2317 54001 TS L 003817,000043: 04,2320 37651 CA MAXP # 37777 003818,000044: 003819,000045: 04,2321 24062 INCR ERRSUB # ERRSUB = 32 003820,000046: 04,2322 52072 DXCH SKEEP1 003821,000047: 04,2323 67631 AD NEGONE 003822,000048: 04,2324 00006 EXTEND 003823,000049: 04,2325 12327 BZF +2 003824,000050: 04,2326 12422 TCF DDERROR 003825,000051: 04,2327 30001 CA L 003826,000052: 04,2330 67635 AD ONE 003827,000053: 04,2331 00006 EXTEND 003828,000054: 04,2332 12334 BZF +2 003829,000055: 04,2333 12422 TCF DDERROR 003830,000056: 003831,000057: 04,2334 00006 EXTEND 003832,000058: 04,2335 26071 DIM SKEEP1 003833,000059: 04,2336 00006 EXTEND 003834,000060: 04,2337 26072 DIM SKEEP2 003835,000061: 003836,000062: 04,2340 24062 INCR ERRSUB # ERRSUB = 33 003837,000063: 04,2341 37652 CA MAXP-1 # 37776 003838,000064: 04,2342 40000 COM 003839,000065: 04,2343 60071 AD SKEEP1 003840,000066: 04,2344 00006 EXTEND 003841,000067: 04,2345 12347 BZF +2 003842,000068: 04,2346 12422 TCF DDERROR 003843,000069: 04,2347 37656 CA MAXN-1 # 40001 003844,000070: 04,2350 40000 COM 003845,000071: 04,2351 60072 AD SKEEP2 003846,000072: 04,2352 00006 EXTEND 003847,000073: 04,2353 12355 BZF +2 003848,000074: 04,2354 12422 TCF DDERROR 003849,000075: 003850,000076: 04,2355 24062 INCR ERRSUB # ERRSUB = 34 003851,000077: 04,2356 37635 CA ONE 003852,000078: 04,2357 00006 EXTEND 003853,000079: 04,2360 26000 DIM A 003854,000080: 04,2361 00006 EXTEND 003855,000081: 04,2362 26000 DIM A 003856,000082: # Note: The reason we're looking for -0 here instead of +0 is 003857,000083: # that 1 - 1 = -0. 003858,000084: 04,2363 10000 CCS A 003859,000085: 04,2364 12422 TCF DDERROR 003860,000086: 04,2365 12422 TCF DDERROR 003861,000087: 04,2366 12422 TCF DDERROR 003862,000088: 003863,000089: 04,2367 24062 INCR ERRSUB # ERRSUB = 35 003864,000090: 04,2370 30007 CA ZEROES 003865,000091: 04,2371 00006 EXTEND 003866,000092: 04,2372 26000 DIM A 003867,000093: 04,2373 10000 CCS A 003868,000094: 04,2374 12422 TCF DDERROR 003869,000095: 04,2375 12400 TCF +3 003870,000096: 04,2376 12422 TCF DDERROR 003871,000097: 04,2377 12422 TCF DDERROR 003872,000098: 04,2400 22007 ZL 003873,000099: 04,2401 00006 EXTEND 003874,000100: 04,2402 26001 DIM L 003875,000101: 04,2403 10001 CCS L 003876,000102: 04,2404 12422 TCF DDERROR 003877,000103: 04,2405 12410 TCF +3 003878,000104: 04,2406 12422 TCF DDERROR 003879,000105: 04,2407 12422 TCF DDERROR 003880,000106: 04,2410 00006 EXTEND 003881,000107: 04,2411 22007 ZQ 003882,000108: 04,2412 00006 EXTEND 003883,000109: 04,2413 26002 DIM Q 003884,000110: 04,2414 10002 CCS Q 003885,000111: 04,2415 12422 TCF DDERROR 003886,000112: 04,2416 12421 TCF +3 003887,000113: 04,2417 12422 TCF DDERROR 003888,000114: 04,2420 12422 TCF DDERROR 003889,000115: 003890,000116: 04,2421 12423 TCF +2 003891,000117: 04,2422 07437 DDERROR TC ERRORDSP 003892,000118: 04,2423 37637 CA THREE # Some downstream tests will expect Q==3. 003893,000119: 04,2424 54002 TS Q 003894,000120: End of include-file SmallyDXCHDIM.agc. Parent file is ValidateSmally.agc