Source Code

003575,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 003576,000002: # 003577,000003: # This file is part of yaAGC. 003578,000004: 003579,000005: # yaAGC is free software; you can redistribute it and/or modify 003580,000006: # it under the terms of the GNU General Public License as published by 003581,000007: # the Free Software Foundation; either version 2 of the License, or 003582,000008: # (at your option) any later version. 003583,000009: 003584,000010: # yaAGC is distributed in the hope that it will be useful, 003585,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 003586,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 003587,000013: # GNU General Public License for more details. 003588,000014: 003589,000015: # You should have received a copy of the GNU General Public License 003590,000016: # along with yaAGC; if not, write to the Free Software 003591,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 003592,000018: 003593,000019: # Filename: SmallyDXCHDIM.agc 003594,000020: # Purpose: This is code written from the flowchart on p. 39 of 003595,000021: # E-2065, which is a document titled "Block II AGC 003596,000022: # Self-Check and Show-Banksum", by Edwin D. Smally. 003597,000023: # Mod history: 07/07/04 RSB. Began. 003598,000024: 003599,000025: # Similar code was apparently originally in Luminary and/or Colossus, 003600,000026: # but much of it was removed over the course of time to make more room. 003601,000027: # I don't know what the original code was like, but the flowcharts still 003602,000028: # exist, so I've rewritten the code from the flowcharts. 003603,000029: 003604,000030: # P. 39 of Smally 003605,000031: 003606,000032: 04,2307 37443 CA MAXP # 37777 003607,000033: 04,2310 67431 AD TWO 003608,000034: 003609,000035: 04,2311 24062 INCR ERRSUB # ERRSUB = 31 003610,000036: 04,2312 54066 TS SKEEP1 # Smally says SKEEP2, but must be SKEEP1. 003611,000037: 04,2313 12422 TCF DDERROR 003612,000038: 003613,000039: 04,2314 37424 CA NEGONE 003614,000040: 04,2315 54067 TS SKEEP2 003615,000041: 04,2316 37447 CA MAXN # 40000 003616,000042: 04,2317 54001 TS L 003617,000043: 04,2320 37443 CA MAXP # 37777 003618,000044: 003619,000045: 04,2321 24062 INCR ERRSUB # ERRSUB = 32 003620,000046: 04,2322 52067 DXCH SKEEP1 003621,000047: 04,2323 67424 AD NEGONE 003622,000048: 04,2324 00006 EXTEND 003623,000049: 04,2325 12327 BZF +2 003624,000050: 04,2326 12422 TCF DDERROR 003625,000051: 04,2327 30001 CA L 003626,000052: 04,2330 67430 AD ONE 003627,000053: 04,2331 00006 EXTEND 003628,000054: 04,2332 12334 BZF +2 003629,000055: 04,2333 12422 TCF DDERROR 003630,000056: 003631,000057: 04,2334 00006 EXTEND 003632,000058: 04,2335 26066 DIM SKEEP1 003633,000059: 04,2336 00006 EXTEND 003634,000060: 04,2337 26067 DIM SKEEP2 003635,000061: 003636,000062: 04,2340 24062 INCR ERRSUB # ERRSUB = 33 003637,000063: 04,2341 37444 CA MAXP-1 # 37776 003638,000064: 04,2342 40000 COM 003639,000065: 04,2343 60066 AD SKEEP1 003640,000066: 04,2344 00006 EXTEND 003641,000067: 04,2345 12347 BZF +2 003642,000068: 04,2346 12422 TCF DDERROR 003643,000069: 04,2347 37450 CA MAXN-1 # 40001 003644,000070: 04,2350 40000 COM 003645,000071: 04,2351 60067 AD SKEEP2 003646,000072: 04,2352 00006 EXTEND 003647,000073: 04,2353 12355 BZF +2 003648,000074: 04,2354 12422 TCF DDERROR 003649,000075: 003650,000076: 04,2355 24062 INCR ERRSUB # ERRSUB = 34 003651,000077: 04,2356 37430 CA ONE 003652,000078: 04,2357 00006 EXTEND 003653,000079: 04,2360 26000 DIM A 003654,000080: 04,2361 00006 EXTEND 003655,000081: 04,2362 26000 DIM A 003656,000082: # Note: The reason we're looking for -0 here instead of +0 is 003657,000083: # that 1 - 1 = -0. 003658,000084: 04,2363 10000 CCS A 003659,000085: 04,2364 12422 TCF DDERROR 003660,000086: 04,2365 12422 TCF DDERROR 003661,000087: 04,2366 12422 TCF DDERROR 003662,000088: 003663,000089: 04,2367 24062 INCR ERRSUB # ERRSUB = 35 003664,000090: 04,2370 30007 CA ZEROES 003665,000091: 04,2371 00006 EXTEND 003666,000092: 04,2372 26000 DIM A 003667,000093: 04,2373 10000 CCS A 003668,000094: 04,2374 12422 TCF DDERROR 003669,000095: 04,2375 12400 TCF +3 003670,000096: 04,2376 12422 TCF DDERROR 003671,000097: 04,2377 12422 TCF DDERROR 003672,000098: 04,2400 22007 ZL 003673,000099: 04,2401 00006 EXTEND 003674,000100: 04,2402 26001 DIM L 003675,000101: 04,2403 10001 CCS L 003676,000102: 04,2404 12422 TCF DDERROR 003677,000103: 04,2405 12410 TCF +3 003678,000104: 04,2406 12422 TCF DDERROR 003679,000105: 04,2407 12422 TCF DDERROR 003680,000106: 04,2410 00006 EXTEND 003681,000107: 04,2411 22007 ZQ 003682,000108: 04,2412 00006 EXTEND 003683,000109: 04,2413 26002 DIM Q 003684,000110: 04,2414 10002 CCS Q 003685,000111: 04,2415 12422 TCF DDERROR 003686,000112: 04,2416 12421 TCF +3 003687,000113: 04,2417 12422 TCF DDERROR 003688,000114: 04,2420 12422 TCF DDERROR 003689,000115: 003690,000116: 04,2421 12423 TCF +2 003691,000117: 04,2422 07240 DDERROR TC ERRORDSP 003692,000118: 04,2423 37432 CA THREE # Some downstream tests will expect Q==3. 003693,000119: 04,2424 54002 TS Q 003694,000120: End of include-file SmallyDXCHDIM.agc. Parent file is ValidateSmally.agc