Add disassembled instructions to breakpoints
This commit is contained in:
1 parent
6b5976be8f
commit
634ea933f1
12 files changed
+460
-410
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package com.loomcom.symon;
|
||||
|
||||
import com.loomcom.symon.util.Utils;
|
||||
import junit.framework.*;
|
||||
|
||||
import com.loomcom.symon.devices.*;
|
||||
@@ -537,11 +538,11 @@ public class CpuTest extends TestCase {
|
||||
|
||||
|
||||
public void testAddress() {
|
||||
assertEquals(0xf1ea, cpu.address(0xea, 0xf1));
|
||||
assertEquals(0x00ea, cpu.address(0xea, 0x00));
|
||||
assertEquals(0xf100, cpu.address(0x00, 0xf1));
|
||||
assertEquals(0x1234, cpu.address(0x34, 0x12));
|
||||
assertEquals(0xffff, cpu.address(0xff, 0xff));
|
||||
assertEquals(0xf1ea, Utils.address(0xea, 0xf1));
|
||||
assertEquals(0x00ea, Utils.address(0xea, 0x00));
|
||||
assertEquals(0xf100, Utils.address(0x00, 0xf1));
|
||||
assertEquals(0x1234, Utils.address(0x34, 0x12));
|
||||
assertEquals(0xffff, Utils.address(0xff, 0xff));
|
||||
}
|
||||
|
||||
public void testZpxAddress() {
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.loomcom.symon;
|
||||
|
||||
import com.loomcom.symon.util.HexUtil;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class HexUtilTest extends TestCase {
|
||||
public void testByteToHex() {
|
||||
assertEquals("FE", HexUtil.byteToHex(0xfe));
|
||||
assertEquals("00", HexUtil.byteToHex(0));
|
||||
assertEquals("0A", HexUtil.byteToHex(10));
|
||||
}
|
||||
|
||||
public void testByteToHexIgnoresSign() {
|
||||
assertEquals("FF", HexUtil.byteToHex(-1));
|
||||
}
|
||||
|
||||
public void testByteToHexMasksLowByte() {
|
||||
assertEquals("FE", HexUtil.byteToHex(0xfffe));
|
||||
assertEquals("00", HexUtil.byteToHex(0xff00));
|
||||
}
|
||||
|
||||
public void testWordToHex() {
|
||||
assertEquals("0000", HexUtil.wordToHex(0));
|
||||
assertEquals("FFFF", HexUtil.wordToHex(65535));
|
||||
assertEquals("FFFE", HexUtil.wordToHex(65534));
|
||||
}
|
||||
|
||||
public void testWordToHexIgnoresSign() {
|
||||
assertEquals("FFFF", HexUtil.wordToHex(-1));
|
||||
}
|
||||
|
||||
public void testWordToHexMasksTwoLowBytes() {
|
||||
assertEquals("FFFE", HexUtil.wordToHex(0xfffffe));
|
||||
assertEquals("FF00", HexUtil.wordToHex(0xffff00));
|
||||
}
|
||||
|
||||
public void testAllBytesAreCorrect() {
|
||||
for (int i = 0; i <= 0xff; i++) {
|
||||
assertEquals(String.format("%02X", i), HexUtil.byteToHex(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.loomcom.symon;
|
||||
|
||||
import com.loomcom.symon.util.Utils;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class UtilsTest extends TestCase {
|
||||
public void testByteToHex() {
|
||||
assertEquals("FE", Utils.byteToHex(0xfe));
|
||||
assertEquals("00", Utils.byteToHex(0));
|
||||
assertEquals("0A", Utils.byteToHex(10));
|
||||
}
|
||||
|
||||
public void testByteToHexIgnoresSign() {
|
||||
assertEquals("FF", Utils.byteToHex(-1));
|
||||
}
|
||||
|
||||
public void testByteToHexMasksLowByte() {
|
||||
assertEquals("FE", Utils.byteToHex(0xfffe));
|
||||
assertEquals("00", Utils.byteToHex(0xff00));
|
||||
}
|
||||
|
||||
public void testWordToHex() {
|
||||
assertEquals("0000", Utils.wordToHex(0));
|
||||
assertEquals("FFFF", Utils.wordToHex(65535));
|
||||
assertEquals("FFFE", Utils.wordToHex(65534));
|
||||
}
|
||||
|
||||
public void testWordToHexIgnoresSign() {
|
||||
assertEquals("FFFF", Utils.wordToHex(-1));
|
||||
}
|
||||
|
||||
public void testWordToHexMasksTwoLowBytes() {
|
||||
assertEquals("FFFE", Utils.wordToHex(0xfffffe));
|
||||
assertEquals("FF00", Utils.wordToHex(0xffff00));
|
||||
}
|
||||
|
||||
public void testAllBytesAreCorrect() {
|
||||
for (int i = 0; i <= 0xff; i++) {
|
||||
assertEquals(String.format("%02X", i), Utils.byteToHex(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user