Source Code

003934,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 003935,000002: # 003936,000003: # This file is part of yaAGC. 003937,000004: 003938,000005: # yaAGC is free software; you can redistribute it and/or modify 003939,000006: # it under the terms of the GNU General Public License as published by 003940,000007: # the Free Software Foundation; either version 2 of the License, or 003941,000008: # (at your option) any later version. 003942,000009: 003943,000010: # yaAGC is distributed in the hope that it will be useful, 003944,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 003945,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 003946,000013: # GNU General Public License for more details. 003947,000014: 003948,000015: # You should have received a copy of the GNU General Public License 003949,000016: # along with yaAGC; if not, write to the Free Software 003950,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 003951,000018: 003952,000019: # Filename: SmallyDVCHK.agc 003953,000020: # Purpose: This is code written from the flowchart on p. 43 of 003954,000021: # E-2065, which is a document titled "Block II AGC 003955,000022: # Self-Check and Show-Banksum", by Edwin D. Smally. 003956,000023: # Mod history: 07/07/04 RSB. Began. 003957,000024: 003958,000025: # Similar code was apparently originally in Luminary and/or Colossus, 003959,000026: # but much of it was removed over the course of time to make more room. 003960,000027: # I don't know what the original code was like, but the flowcharts still 003961,000028: # exist, so I've rewritten the code from the flowcharts. 003962,000029: 003963,000030: # P. 43 of Smally 003964,000031: 003965,000032: 04,2654 37443 CA MAXP 003966,000033: 04,2655 24000 INCR A 003967,000034: 04,2656 54001 TS L 003968,000035: 04,2657 13025 TCF DVCERROR 003969,000036: 003970,000037: 04,2660 24062 INCR ERRSUB # 51 003971,000038: 04,2661 37447 CA MAXN 003972,000039: 04,2662 67424 AD NEGONE 003973,000040: 04,2663 54067 TS SKEEP2 003974,000041: 04,2664 13025 TCF DVCERROR 003975,000042: 003976,000043: 04,2665 24062 INCR ERRSUB # 52 003977,000044: 04,2666 37430 CA ONE 003978,000045: 04,2667 54063 TS TEMPI 003979,000046: 04,2670 37405 CA O20000 003980,000047: 04,2671 54001 TS L 003981,000048: 04,2672 37423 CA NEGZERO 003982,000049: 04,2673 00006 EXTEND 003983,000050: 04,2674 10063 DV TEMPI 003984,000051: 04,2675 10001 CCS L 003985,000052: 04,2676 13025 TCF DVCERROR 003986,000053: 04,2677 12702 TCF +3 003987,000054: 04,2700 13025 TCF DVCERROR 003988,000055: 04,2701 13025 TCF DVCERROR 003989,000056: 003990,000057: 04,2702 24062 INCR ERRSUB # 53 003991,000058: 04,2703 37424 CA NEGONE 003992,000059: 04,2704 54063 TS TEMPI 003993,000060: 04,2705 37420 CA O-20000 003994,000061: 04,2706 54001 TS L 003995,000062: 04,2707 30007 CA ZEROES 003996,000063: 04,2710 00006 EXTEND 003997,000064: 04,2711 10063 DV TEMPI 003998,000065: 04,2712 67420 AD O-20000 003999,000066: 04,2713 00006 EXTEND 004000,000067: 04,2714 12716 BZF +2 004001,000068: 04,2715 13025 TCF DVCERROR 004002,000069: 04,2716 10001 CCS L 004003,000070: 04,2717 13025 TCF DVCERROR 004004,000071: 04,2720 13025 TCF DVCERROR 004005,000072: 04,2721 13025 TCF DVCERROR 004006,000073: 004007,000074: # Smally says in the following to divide +17777+37777 by -20000. 004008,000075: # This is inconsistent with the sign of the remainder he seems 004009,000076: # to imply. I assume he means -17777-37777 / +20000. 004010,000077: 04,2722 37420 CA O-20000 004011,000078: 04,2723 54063 TS TEMPI 004012,000079: 04,2724 37405 CA O20000 004013,000080: 04,2725 54064 TS TEMPJ 004014,000081: 04,2726 37447 CA MAXN 004015,000082: 04,2727 54001 TS L 004016,000083: 04,2730 37417 CA O-17777 004017,000084: 04,2731 00006 EXTEND 004018,000085: 04,2732 10064 DV TEMPJ 004019,000086: 004020,000087: 04,2733 24062 INCR ERRSUB # 54 004021,000088: 04,2734 56001 XCH L 004022,000089: 04,2735 00006 EXTEND 004023,000090: 04,2736 10064 DV TEMPJ 004024,000091: 04,2737 67443 AD MAXP 004025,000092: 04,2740 00006 EXTEND 004026,000093: 04,2741 12743 BZF +2 004027,000094: 04,2742 13025 TCF DVCERROR 004028,000095: 04,2743 30001 CA L 004029,000096: 04,2744 67404 AD O17777 004030,000097: 04,2745 00006 EXTEND 004031,000098: 04,2746 12750 BZF +2 004032,000099: 04,2747 13025 TCF DVCERROR 004033,000100: 004034,000101: 04,2750 24062 INCR ERRSUB # 55 004035,000102: 04,2751 37443 CA MAXP 004036,000103: 04,2752 54001 TS L 004037,000104: 04,2753 37417 CA O-17777 004038,000105: 04,2754 00006 EXTEND 004039,000106: 04,2755 10064 DV TEMPJ 004040,000107: 04,2756 67446 AD MAXP-3 004041,000108: 04,2757 00006 EXTEND 004042,000109: 04,2760 12762 BZF +2 004043,000110: 04,2761 13025 TCF DVCERROR 004044,000111: 04,2762 30001 CA L 004045,000112: 04,2763 67430 AD ONE 004046,000113: 04,2764 00006 EXTEND 004047,000114: 04,2765 12767 BZF +2 004048,000115: 04,2766 13025 TCF DVCERROR 004049,000116: 004050,000117: # Note that Q still contains +3 from prior tests, and that SKEEP1 004051,000118: # should still contain -1 (Smally says +1). 004052,000119: 04,2767 37450 CA MAXN-1 004053,000120: 04,2770 54065 TS TEMPK 004054,000121: 04,2771 22007 ZL 004055,000122: 04,2772 37444 CA MAXP-1 004056,000123: 04,2773 00006 EXTEND 004057,000124: 04,2774 10065 DV TEMPK 004058,000125: # QXCH L 004059,000126: 004060,000127: 04,2775 24062 INCR ERRSUB # 56 004061,000128: 04,2776 67443 AD MAXP 004062,000129: 04,2777 00006 EXTEND 004063,000130: 04,3000 13002 BZF +2 004064,000131: 04,3001 13025 TCF DVCERROR 004065,000132: 04,3002 30001 CA L 004066,000133: 04,3003 67444 AD MAXP-1 004067,000134: 04,3004 00006 EXTEND 004068,000135: 04,3005 13007 BZF +2 004069,000136: 04,3006 13025 TCF DVCERROR 004070,000137: 004071,000138: 04,3007 24062 INCR ERRSUB # ERRSUB = 57 004072,000139: 04,3010 00006 EXTEND 004073,000140: 04,3011 22066 QXCH SKEEP1 004074,000141: 04,3012 30002 CA Q 004075,000142: 04,3013 67430 AD ONE 004076,000143: 04,3014 00006 EXTEND 004077,000144: 04,3015 13017 BZF +2 004078,000145: 04,3016 13025 TCF DVCERROR 004079,000146: 04,3017 30066 CA SKEEP1 004080,000147: 04,3020 67426 AD NEGTHREE 004081,000148: 04,3021 00006 EXTEND 004082,000149: 04,3022 13024 BZF +2 004083,000150: 04,3023 13025 TCF DVCERROR 004084,000151: 004085,000152: 04,3024 13026 TCF +2 004086,000153: 04,3025 07240 DVCERROR TC ERRORDSP 004087,000154: End of include-file SmallyDVCHK.agc. Parent file is ValidateSmally.agc