From 0b4a53ae1227ec59ab62e7403bc531d419bfb075 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Fri, 4 Feb 2022 07:06:02 +0100 Subject: [PATCH] Fixed new addressing modes. --- .../java/dk/camelot64/cpufamily6502/CpuAddressingMode.java | 4 ++-- .../cpufamily6502/TestCpuFamilyKickAssCompatibility.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/dk/camelot64/cpufamily6502/CpuAddressingMode.java b/src/main/java/dk/camelot64/cpufamily6502/CpuAddressingMode.java index 4eea59b61..9733503bc 100644 --- a/src/main/java/dk/camelot64/cpufamily6502/CpuAddressingMode.java +++ b/src/main/java/dk/camelot64/cpufamily6502/CpuAddressingMode.java @@ -182,13 +182,13 @@ public enum CpuAddressingMode { * #imm,zp Immediate, zeropage
* IMMEDIATE ADDRESSING, ZEROPAGE — Two parameters, one immediate the other a zeropage address. Only used by HUC6280 TST. */ - IMMANDZP("#imm,zp", "%i #%p,%q", 3), + IMMANDZP("#imm,zp", "%i #%p,%q", 2), /** * #imm,abs Immediate, absolute
* IMMEDIATE ADDRESSING, ABSOLUTE — Two parameters, one immediate the other an absolute address. Only used by HUC6280 TST. */ - IMMANDABS("#imm,abs", "%i #%p,%q", 4); + IMMANDABS("#imm,abs", "%i #%p,%q", 3); /** The short name of the addressing mode. */ diff --git a/src/test/java/dk/camelot64/cpufamily6502/TestCpuFamilyKickAssCompatibility.java b/src/test/java/dk/camelot64/cpufamily6502/TestCpuFamilyKickAssCompatibility.java index 91cdca55a..018b751af 100644 --- a/src/test/java/dk/camelot64/cpufamily6502/TestCpuFamilyKickAssCompatibility.java +++ b/src/test/java/dk/camelot64/cpufamily6502/TestCpuFamilyKickAssCompatibility.java @@ -139,6 +139,8 @@ public class TestCpuFamilyKickAssCompatibility { map.put(CpuAddressingMode.ISY, Collections.singletonList(_65xxArgType.indirectStackZeropageY)); map.put(CpuAddressingMode.REL, Arrays.asList(_65xxArgType.relative, _65xxArgType.relativeWord)); map.put(CpuAddressingMode.REZ, Collections.singletonList(_65xxArgType.zeropageRelative)); + map.put(CpuAddressingMode.IMMANDZP, Collections.singletonList(_65xxArgType.immediateAndZeropage)); + map.put(CpuAddressingMode.IMMANDABS, Collections.singletonList(_65xxArgType.immediateAndAbsolute)); return map; }