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