From 8a560a294ba26fecf905c5620ae8a98439cbbaa6 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Mon, 11 Mar 2019 07:49:41 +0100 Subject: [PATCH] Added two missing signed word fragments. --- ...sc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vwsc2.asm | 7 +++++++ ...sc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vwsc2.asm | 7 +++++++ src/test/java/dk/camelot64/kickc/test/TestFragments.java | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 src/main/fragment/pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vwsc2.asm create mode 100644 src/main/fragment/pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vwsc2.asm diff --git a/src/main/fragment/pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vwsc2.asm b/src/main/fragment/pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vwsc2.asm new file mode 100644 index 000000000..330f65bf5 --- /dev/null +++ b/src/main/fragment/pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vwsc2.asm @@ -0,0 +1,7 @@ +sec +lda {c1},x +sbc #<{c2} +sta {c1},x +lda {c1}+1,x +sbc #>{c2} +sta {c1}+1,x \ No newline at end of file diff --git a/src/main/fragment/pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vwsc2.asm b/src/main/fragment/pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vwsc2.asm new file mode 100644 index 000000000..614aaf379 --- /dev/null +++ b/src/main/fragment/pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vwsc2.asm @@ -0,0 +1,7 @@ +sec +lda {c1},y +sbc #<{c2} +sta {c1},y +lda {c1}+1,y +sbc #>{c2} +sta {c1}+1,y \ No newline at end of file diff --git a/src/test/java/dk/camelot64/kickc/test/TestFragments.java b/src/test/java/dk/camelot64/kickc/test/TestFragments.java index ee6093ee5..33d1787a6 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestFragments.java +++ b/src/test/java/dk/camelot64/kickc/test/TestFragments.java @@ -139,6 +139,8 @@ public class TestFragments { public void testFragmentsExist() { testFragmentExists("pwsc1_derefidx_vbuxx=vwsc2"); testFragmentExists("pwsc1_derefidx_vbuyy=vwsc2"); + testFragmentExists("pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vbuc2"); + testFragmentExists("pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vbuc2"); } /**