Source Code

001521,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 001522,000002: # 001523,000003: # This file is part of yaAGC. 001524,000004: 001525,000005: # yaAGC is free software; you can redistribute it and/or modify 001526,000006: # it under the terms of the GNU General Public License as published by 001527,000007: # the Free Software Foundation; either version 2 of the License, or 001528,000008: # (at your option) any later version. 001529,000009: 001530,000010: # yaAGC is distributed in the hope that it will be useful, 001531,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 001532,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 001533,000013: # GNU General Public License for more details. 001534,000014: 001535,000015: # You should have received a copy of the GNU General Public License 001536,000016: # along with yaAGC; if not, write to the Free Software 001537,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 001538,000018: 001539,000019: # Filename: ValidateDXCH.agc 001540,000020: # Purpose: This is the part of the Validation program that validates 001541,000021: # just the DXCH instruction. 001542,000022: # Mod history: 07/05/04 RSB. Began. 001543,000023: 001544,000024: 6000 24061 INCR ERRNUM 001545,000025: 001546,000026: # Well, exchange something. 001547,000027: 6001 37430 CA ONE 001548,000028: 6002 54064 TS TEMPJ 001549,000029: 6003 37424 CA NEGONE 001550,000030: 6004 54065 TS TEMPK 001551,000031: 6005 37433 CA FIVE 001552,000032: 6006 54001 TS L 001553,000033: 6007 37435 CA TEN 001554,000034: 6010 52065 DXCH TEMPJ 001555,000035: # Compare to see if right. 001556,000036: 6011 67424 AD NEGONE 001557,000037: 6012 00006 EXTEND 001558,000038: 6013 16015 BZF DXCH1 001559,000039: 6014 07240 TC ERRORDSP 001560,000040: 6015 30001 DXCH1 CA L 001561,000041: 6016 67430 AD ONE 001562,000042: 6017 00006 EXTEND 001563,000043: 6020 16022 BZF DXCH2 001564,000044: 6021 07240 TC ERRORDSP 001565,000045: 6022 37433 DXCH2 CA FIVE 001566,000046: 6023 40000 COM 001567,000047: 6024 60065 AD TEMPK 001568,000048: 6025 00006 EXTEND 001569,000049: 6026 16030 BZF DXCH3 001570,000050: 6027 07240 TC ERRORDSP 001571,000051: 6030 37435 DXCH3 CA TEN 001572,000052: 6031 40000 COM 001573,000053: 6032 60064 AD TEMPJ 001574,000054: 6033 00006 EXTEND 001575,000055: 6034 16036 BZF DXCH4 001576,000056: 6035 07240 TC ERRORDSP 001577,000057: 6036 DXCH4 001578,000058: 001579,000059: # Now do something similar, but with initial overflow. 001580,000060: 6036 37430 CA ONE 001581,000061: 6037 54064 TS TEMPJ 001582,000062: 6040 37424 CA NEGONE 001583,000063: 6041 54065 TS TEMPK 001584,000064: 6042 37433 CA FIVE 001585,000065: 6043 54001 TS L 001586,000066: 6044 37443 CA MAXP 001587,000067: 6045 67435 AD TEN # Causes overflow. 001588,000068: 6046 52065 DXCH TEMPJ 001589,000069: 6047 54000 OVSK 001590,000070: 6050 16052 TCF DXCH5 001591,000071: 6051 07240 TC ERRORDSP 001592,000072: 6052 DXCH5 001593,000073: # Compare to see if right. 001594,000074: 6052 67424 AD NEGONE 001595,000075: 6053 00006 EXTEND 001596,000076: 6054 16056 BZF DXCH6 001597,000077: 6055 07240 TC ERRORDSP 001598,000078: 6056 30001 DXCH6 CA L 001599,000079: 6057 67430 AD ONE 001600,000080: 6060 00006 EXTEND 001601,000081: 6061 16063 BZF DXCH7 001602,000082: 6062 07240 TC ERRORDSP 001603,000083: 6063 37433 DXCH7 CA FIVE 001604,000084: 6064 40000 COM 001605,000085: 6065 60065 AD TEMPK 001606,000086: 6066 00006 EXTEND 001607,000087: 6067 16071 BZF DXCH8 001608,000088: 6070 07240 TC ERRORDSP 001609,000089: 6071 37435 DXCH8 CA TEN 001610,000090: 6072 40000 COM 001611,000091: 6073 24000 INCR A 001612,000092: 6074 60064 AD TEMPJ 001613,000093: 6075 00006 EXTEND 001614,000094: 6076 16100 BZF DXCH9 001615,000095: 6077 07240 TC ERRORDSP 001616,000096: 6100 DXCH9 001617,000097: 001618,000098: # There shouldn't be any sensible reason for "DXCH A", 001619,000099: # but let's check it anyhow. 001620,000100: 6100 37435 CA TEN 001621,000101: 6101 54001 TS L 001622,000102: 6102 37433 CA FIVE 001623,000103: 6103 52001 DXCH A 001624,000104: 6104 40000 COM 001625,000105: 6105 67433 AD FIVE 001626,000106: 6106 00006 EXTEND 001627,000107: 6107 16111 BZF DXCH10 001628,000108: 6110 07240 TC ERRORDSP 001629,000109: 6111 30001 DXCH10 CA L 001630,000110: 6112 40000 COM 001631,000111: 6113 67435 AD TEN 001632,000112: 6114 00006 EXTEND 001633,000113: 6115 16117 BZF DXCH11 001634,000114: 6116 07240 TC ERRORDSP 001635,000115: 6117 DXCH11 001636,000116: 001637,000117: # Finally, check "DXCH L". (This wacky, undocumented 001638,000118: # case sends A to L, L to Q, and Q to A. Before you 001639,000119: # say "of course!" note that the opposite direction 001640,000120: # is equally sensible.) 001641,000121: 6117 37435 CA TEN 001642,000122: 6120 54002 TS Q 001643,000123: 6121 37433 CA FIVE 001644,000124: 6122 54001 TS L 001645,000125: 6123 37430 CA ONE 001646,000126: 6124 52002 DXCH L 001647,000127: 6125 40000 COM 001648,000128: 6126 67435 AD TEN 001649,000129: 6127 00006 EXTEND 001650,000130: 6130 16132 BZF DXCH12 001651,000131: 6131 07240 TC ERRORDSP 001652,000132: 6132 30002 DXCH12 CA Q 001653,000133: 6133 40000 COM 001654,000134: 6134 67433 AD FIVE 001655,000135: 6135 00006 EXTEND 001656,000136: 6136 16140 BZF DXCH13 001657,000137: 6137 07240 TC ERRORDSP 001658,000138: 6140 30001 DXCH13 CA L 001659,000139: 6141 67424 AD NEGONE 001660,000140: 6142 00006 EXTEND 001661,000141: 6143 16145 BZF DXCH14 001662,000142: 6144 07240 TC ERRORDSP 001663,000143: 6145 DXCH14 001664,000144: End of include-file ValidateDXCH.agc. Parent file is Validation.agc