Source Code

001393,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 001394,000002: # 001395,000003: # This file is part of yaAGC. 001396,000004: 001397,000005: # yaAGC is free software; you can redistribute it and/or modify 001398,000006: # it under the terms of the GNU General Public License as published by 001399,000007: # the Free Software Foundation; either version 2 of the License, or 001400,000008: # (at your option) any later version. 001401,000009: 001402,000010: # yaAGC is distributed in the hope that it will be useful, 001403,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 001404,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 001405,000013: # GNU General Public License for more details. 001406,000014: 001407,000015: # You should have received a copy of the GNU General Public License 001408,000016: # along with yaAGC; if not, write to the Free Software 001409,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 001410,000018: 001411,000019: # Filename: ValidateINDEX.agc 001412,000020: # Purpose: This is the part of the Validation program that validates 001413,000021: # just the INDEX instruction. 001414,000022: # Mod history: 07/05/04 RSB. Began. 001415,000023: 001416,000024: 5566 24061 INCR ERRNUM 001417,000025: 001418,000026: # First do the "basic" (non-Extracode) INDEX instruction. 001419,000027: # Just load values from the table and check them. 001420,000028: 5567 15575 TCF AFTERTAB 001421,000029: 5570 77772 DEC -5 B-14 001422,000030: 5571 77766 DEC -9 B-14 001423,000031: 5572 77765 TABLE DEC -10 B-14 001424,000032: 5573 77776 DEC -1 B-14 001425,000033: 5574 00001 DEC 1 B-14 001426,000034: 5575 AFTERTAB 001427,000035: 5575 37635 CA ONE 001428,000036: 5576 67635 AD ONE 001429,000037: 5577 40000 COM 001430,000038: 5600 54063 TS TEMPI # TEMPI is -2. 001431,000039: 001432,000040: 5601 24062 INCR ERRSUB # 1 001433,000041: 5602 50063 INDEX TEMPI 001434,000042: 5603 35572 CA TABLE 001435,000043: 5604 67640 AD FIVE 001436,000044: 5605 00006 EXTEND 001437,000045: 5606 15610 BZF INDEX1 001438,000046: 5607 15731 TCF VNDERROR 001439,000047: 5610 INDEX1 001440,000048: 5610 24062 INCR ERRSUB # 2 001441,000049: 5611 24063 INCR TEMPI 001442,000050: 5612 50063 INDEX TEMPI 001443,000051: 5613 35572 CA TABLE 001444,000052: 5614 67641 AD NINE 001445,000053: 5615 00006 EXTEND 001446,000054: 5616 15620 BZF INDEX2 001447,000055: 5617 15731 TCF VNDERROR 001448,000056: 5620 INDEX2 001449,000057: 5620 24062 INCR ERRSUB # 3 001450,000058: 5621 24063 INCR TEMPI 001451,000059: 5622 50063 INDEX TEMPI 001452,000060: 5623 35572 CA TABLE 001453,000061: 5624 67642 AD TEN 001454,000062: 5625 00006 EXTEND 001455,000063: 5626 15630 BZF INDEX3 001456,000064: 5627 15731 TCF VNDERROR 001457,000065: 5630 INDEX3 001458,000066: 5630 24062 INCR ERRSUB # 4 001459,000067: 5631 24063 INCR TEMPI 001460,000068: 5632 50063 INDEX TEMPI 001461,000069: 5633 35572 CA TABLE 001462,000070: 5634 67635 AD ONE 001463,000071: 5635 00006 EXTEND 001464,000072: 5636 15640 BZF INDEX4 001465,000073: 5637 15731 TCF VNDERROR 001466,000074: 5640 INDEX4 001467,000075: 5640 24062 INCR ERRSUB # 5 001468,000076: 5641 24063 INCR TEMPI 001469,000077: 5642 50063 INDEX TEMPI 001470,000078: 5643 35572 CA TABLE 001471,000079: 5644 67631 AD NEGONE 001472,000080: 5645 00006 EXTEND 001473,000081: 5646 15650 BZF INDEX5 001474,000082: 5647 15731 TCF VNDERROR 001475,000083: 5650 INDEX5 001476,000084: 001477,000085: # The test of the Extracode version is done the same way, 001478,000086: # except that we use DCA rather than CA to load the values. 001479,000087: # (We discard the extra word loaded into L without checking. 001480,000088: 5650 37635 CA ONE 001481,000089: 5651 67635 AD ONE 001482,000090: 5652 40000 COM 001483,000091: 5653 54063 TS TEMPI # TEMPI is -2. 001484,000092: 001485,000093: 5654 24062 INCR ERRSUB # 6 001486,000094: 5655 00006 EXTEND 001487,000095: 5656 50063 INDEX TEMPI 001488,000096: 5657 35573 DCA TABLE 001489,000097: 5660 67640 AD FIVE 001490,000098: 5661 00006 EXTEND 001491,000099: 5662 15664 BZF INDEX6 001492,000100: 5663 15731 TCF VNDERROR 001493,000101: 5664 INDEX6 001494,000102: 5664 24062 INCR ERRSUB # 7 001495,000103: 5665 24063 INCR TEMPI 001496,000104: 5666 00006 EXTEND 001497,000105: 5667 50063 INDEX TEMPI 001498,000106: 5670 35573 DCA TABLE 001499,000107: 5671 67641 AD NINE 001500,000108: 5672 00006 EXTEND 001501,000109: 5673 15675 BZF INDEX7 001502,000110: 5674 15731 TCF VNDERROR 001503,000111: 5675 INDEX7 001504,000112: 5675 24062 INCR ERRSUB # 10 octal 001505,000113: 5676 24063 INCR TEMPI 001506,000114: 5677 00006 EXTEND 001507,000115: 5700 50063 INDEX TEMPI 001508,000116: 5701 35573 DCA TABLE 001509,000117: 5702 67642 AD TEN 001510,000118: 5703 00006 EXTEND 001511,000119: 5704 15706 BZF INDEX8 001512,000120: 5705 15731 TCF VNDERROR 001513,000121: 5706 INDEX8 001514,000122: 5706 24062 INCR ERRSUB # 11 001515,000123: 5707 24063 INCR TEMPI 001516,000124: 5710 00006 EXTEND 001517,000125: 5711 50063 INDEX TEMPI 001518,000126: 5712 35573 DCA TABLE 001519,000127: 5713 67635 AD ONE 001520,000128: 5714 00006 EXTEND 001521,000129: 5715 15717 BZF INDEX9 001522,000130: 5716 15731 TCF VNDERROR 001523,000131: 5717 INDEX9 001524,000132: 5717 24062 INCR ERRSUB # 12 001525,000133: 5720 24063 INCR TEMPI 001526,000134: 5721 00006 EXTEND 001527,000135: 5722 50063 INDEX TEMPI 001528,000136: 5723 35573 DCA TABLE 001529,000137: 5724 67631 AD NEGONE 001530,000138: 5725 00006 EXTEND 001531,000139: 5726 15730 BZF INDEX10 001532,000140: 5727 15731 TCF VNDERROR 001533,000141: 5730 INDEX10 001534,000142: 001535,000143: # We also need to check that if the following instructions 001536,000144: # are created by indexing, that they are treated as real, 001537,000145: # rather than as the special codes RELINT, INHINT, EXTEND, 001538,000146: # and RESUME: 001539,000147: # TC 3 001540,000148: # TC 4 001541,000149: # TC 6 001542,000150: # INDEX 17 001543,000151: # However, we DON'T actually check that now, since that's 001544,000152: # not the way yaAGC is implemented currently. 001545,000153: 001546,000154: 5730 15732 TCF +2 001547,000155: 5731 07437 VNDERROR TC ERRORDSP 001548,000156: 5732 30007 CA ZEROES 001549,000157: 5733 54062 TS ERRSUB 001550,000158: End of include-file ValidateINDEX.agc. Parent file is Validation.agc