Source Code
004134,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org>
004135,000002: #
004136,000003: # This file is part of yaAGC.
004137,000004:
004138,000005: # yaAGC is free software; you can redistribute it and/or modify
004139,000006: # it under the terms of the GNU General Public License as published by
004140,000007: # the Free Software Foundation; either version 2 of the License, or
004141,000008: # (at your option) any later version.
004142,000009:
004143,000010: # yaAGC is distributed in the hope that it will be useful,
004144,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of
004145,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
004146,000013: # GNU General Public License for more details.
004147,000014:
004148,000015: # You should have received a copy of the GNU General Public License
004149,000016: # along with yaAGC; if not, write to the Free Software
004150,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
004151,000018:
004152,000019: # Filename: SmallyDVCHK.agc
004153,000020: # Purpose: This is code written from the flowchart on p. 43 of
004154,000021: # E-2065, which is a document titled "Block II AGC
004155,000022: # Self-Check and Show-Banksum", by Edwin D. Smally.
004156,000023: # Mod history: 07/07/04 RSB. Began.
004157,000024:
004158,000025: # Similar code was apparently originally in Luminary and/or Colossus,
004159,000026: # but much of it was removed over the course of time to make more room.
004160,000027: # I don't know what the original code was like, but the flowcharts still
004161,000028: # exist, so I've rewritten the code from the flowcharts.
004162,000029:
004163,000030: # P. 43 of Smally
004164,000031:
004165,000032: 04,2654 37651 CA MAXP
004166,000033: 04,2655 24000 INCR A
004167,000034: 04,2656 54001 TS L
004168,000035: 04,2657 13025 TCF DVCERROR
004169,000036:
004170,000037: 04,2660 24062 INCR ERRSUB # 51
004171,000038: 04,2661 37655 CA MAXN
004172,000039: 04,2662 67631 AD NEGONE
004173,000040: 04,2663 54072 TS SKEEP2
004174,000041: 04,2664 13025 TCF DVCERROR
004175,000042:
004176,000043: 04,2665 24062 INCR ERRSUB # 52
004177,000044: 04,2666 37635 CA ONE
004178,000045: 04,2667 54063 TS TEMPI
004179,000046: 04,2670 37612 CA O20000
004180,000047: 04,2671 54001 TS L
004181,000048: 04,2672 37630 CA NEGZERO
004182,000049: 04,2673 00006 EXTEND
004183,000050: 04,2674 10063 DV TEMPI
004184,000051: 04,2675 10001 CCS L
004185,000052: 04,2676 13025 TCF DVCERROR
004186,000053: 04,2677 12702 TCF +3
004187,000054: 04,2700 13025 TCF DVCERROR
004188,000055: 04,2701 13025 TCF DVCERROR
004189,000056:
004190,000057: 04,2702 24062 INCR ERRSUB # 53
004191,000058: 04,2703 37631 CA NEGONE
004192,000059: 04,2704 54063 TS TEMPI
004193,000060: 04,2705 37625 CA O-20000
004194,000061: 04,2706 54001 TS L
004195,000062: 04,2707 30007 CA ZEROES
004196,000063: 04,2710 00006 EXTEND
004197,000064: 04,2711 10063 DV TEMPI
004198,000065: 04,2712 67625 AD O-20000
004199,000066: 04,2713 00006 EXTEND
004200,000067: 04,2714 12716 BZF +2
004201,000068: 04,2715 13025 TCF DVCERROR
004202,000069: 04,2716 10001 CCS L
004203,000070: 04,2717 13025 TCF DVCERROR
004204,000071: 04,2720 13025 TCF DVCERROR
004205,000072: 04,2721 13025 TCF DVCERROR
004206,000073:
004207,000074: # Smally says in the following to divide +17777+37777 by -20000.
004208,000075: # This is inconsistent with the sign of the remainder he seems
004209,000076: # to imply. I assume he means -17777-37777 / +20000.
004210,000077: 04,2722 37625 CA O-20000
004211,000078: 04,2723 54063 TS TEMPI
004212,000079: 04,2724 37612 CA O20000
004213,000080: 04,2725 54064 TS TEMPJ
004214,000081: 04,2726 37655 CA MAXN
004215,000082: 04,2727 54001 TS L
004216,000083: 04,2730 37624 CA O-17777
004217,000084: 04,2731 00006 EXTEND
004218,000085: 04,2732 10064 DV TEMPJ
004219,000086:
004220,000087: 04,2733 24062 INCR ERRSUB # 54
004221,000088: 04,2734 56001 XCH L
004222,000089: 04,2735 00006 EXTEND
004223,000090: 04,2736 10064 DV TEMPJ
004224,000091: 04,2737 67651 AD MAXP
004225,000092: 04,2740 00006 EXTEND
004226,000093: 04,2741 12743 BZF +2
004227,000094: 04,2742 13025 TCF DVCERROR
004228,000095: 04,2743 30001 CA L
004229,000096: 04,2744 67611 AD O17777
004230,000097: 04,2745 00006 EXTEND
004231,000098: 04,2746 12750 BZF +2
004232,000099: 04,2747 13025 TCF DVCERROR
004233,000100:
004234,000101: 04,2750 24062 INCR ERRSUB # 55
004235,000102: 04,2751 37651 CA MAXP
004236,000103: 04,2752 54001 TS L
004237,000104: 04,2753 37624 CA O-17777
004238,000105: 04,2754 00006 EXTEND
004239,000106: 04,2755 10064 DV TEMPJ
004240,000107: 04,2756 67654 AD MAXP-3
004241,000108: 04,2757 00006 EXTEND
004242,000109: 04,2760 12762 BZF +2
004243,000110: 04,2761 13025 TCF DVCERROR
004244,000111: 04,2762 30001 CA L
004245,000112: 04,2763 67635 AD ONE
004246,000113: 04,2764 00006 EXTEND
004247,000114: 04,2765 12767 BZF +2
004248,000115: 04,2766 13025 TCF DVCERROR
004249,000116:
004250,000117: # Note that Q still contains +3 from prior tests, and that SKEEP1
004251,000118: # should still contain -1 (Smally says +1).
004252,000119: 04,2767 37656 CA MAXN-1
004253,000120: 04,2770 54065 TS TEMPK
004254,000121: 04,2771 22007 ZL
004255,000122: 04,2772 37652 CA MAXP-1
004256,000123: 04,2773 00006 EXTEND
004257,000124: 04,2774 10065 DV TEMPK
004258,000125: # QXCH L
004259,000126:
004260,000127: 04,2775 24062 INCR ERRSUB # 56
004261,000128: 04,2776 67651 AD MAXP
004262,000129: 04,2777 00006 EXTEND
004263,000130: 04,3000 13002 BZF +2
004264,000131: 04,3001 13025 TCF DVCERROR
004265,000132: 04,3002 40001 CS L
004266,000133: 04,3003 67652 AD MAXP-1
004267,000134: 04,3004 00006 EXTEND
004268,000135: 04,3005 13007 BZF +2
004269,000136: 04,3006 13025 TCF DVCERROR
004270,000137:
004271,000138: 04,3007 24062 INCR ERRSUB # ERRSUB = 57
004272,000139: 04,3010 00006 EXTEND
004273,000140: 04,3011 22071 QXCH SKEEP1
004274,000141: 04,3012 30002 CA Q
004275,000142: 04,3013 67635 AD ONE
004276,000143: 04,3014 00006 EXTEND
004277,000144: 04,3015 13017 BZF +2
004278,000145: 04,3016 13025 TCF DVCERROR
004279,000146: 04,3017 30071 CA SKEEP1
004280,000147: 04,3020 67633 AD NEGTHREE
004281,000148: 04,3021 00006 EXTEND
004282,000149: 04,3022 13024 BZF +2
004283,000150: 04,3023 13025 TCF DVCERROR
004284,000151:
004285,000152: 04,3024 13026 TCF +2
004286,000153: 04,3025 07437 DVCERROR TC ERRORDSP
004287,000154:
End of include-file SmallyDVCHK.agc. Parent file is ValidateSmally.agc