From a74a36df35dbb95055e20a45d63cceaf53da456d Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Thu, 14 Oct 2021 08:07:42 +0200 Subject: [PATCH] Added missing test. --- .../fragment/mos6502-common/0_eq_vdum1_then_la1.asm | 5 +++++ .../mos6502-common/0_neq_vdum1_then_la1.asm | 5 +++++ .../fragment/mos6502-common/vdsm1=vdsm2_plus_1.asm | 13 +++++++++++++ .../fragment/mos6502-common/vdsm1=vdsm2_ror_16.asm | 10 ++++++++++ .../fragment/mos6502-common/vdsm1=vdsm2_ror_24.asm | 10 ++++++++++ .../fragment/mos6502-common/vdsm1=vdsm2_ror_8.asm | 11 +++++++++++ .../mos6502-common/vdsm1_le_vdsm2_then_la1.asm | 12 ++++++++++++ .../fragment/mos6502-common/vdum1=vdum1_ror_16.asm | 7 +++++++ 8 files changed, 73 insertions(+) create mode 100644 src/main/fragment/mos6502-common/0_eq_vdum1_then_la1.asm create mode 100644 src/main/fragment/mos6502-common/0_neq_vdum1_then_la1.asm create mode 100644 src/main/fragment/mos6502-common/vdsm1=vdsm2_plus_1.asm create mode 100644 src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_16.asm create mode 100644 src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_24.asm create mode 100644 src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_8.asm create mode 100644 src/main/fragment/mos6502-common/vdsm1_le_vdsm2_then_la1.asm create mode 100644 src/main/fragment/mos6502-common/vdum1=vdum1_ror_16.asm diff --git a/src/main/fragment/mos6502-common/0_eq_vdum1_then_la1.asm b/src/main/fragment/mos6502-common/0_eq_vdum1_then_la1.asm new file mode 100644 index 000000000..d44d32652 --- /dev/null +++ b/src/main/fragment/mos6502-common/0_eq_vdum1_then_la1.asm @@ -0,0 +1,5 @@ +lda {m1} +ora {m1}+1 +ora {m1}+2 +ora {m1}+3 +beq {la1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/0_neq_vdum1_then_la1.asm b/src/main/fragment/mos6502-common/0_neq_vdum1_then_la1.asm new file mode 100644 index 000000000..10ee57403 --- /dev/null +++ b/src/main/fragment/mos6502-common/0_neq_vdum1_then_la1.asm @@ -0,0 +1,5 @@ +lda {m1} +ora {m1}+1 +ora {m1}+2 +ora {m1}+3 +bne {la1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdsm1=vdsm2_plus_1.asm b/src/main/fragment/mos6502-common/vdsm1=vdsm2_plus_1.asm new file mode 100644 index 000000000..c4dfc5055 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdsm1=vdsm2_plus_1.asm @@ -0,0 +1,13 @@ +clc +lda {m1} +adc #1 +sta {m2} +lda {m1}+1 +adc #0 +sta {m2}+1 +lda {m1}+2 +adc #0 +sta {m2}+2 +lda {m1}+3 +adc #0 +sta {m2}+3 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_16.asm b/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_16.asm new file mode 100644 index 000000000..f295c5316 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_16.asm @@ -0,0 +1,10 @@ +lda {m2}+2 +sta {m1} +lda {m2}+3 +sta {m1}+1 +and #$80 +beq !+ +lda #$ff +!: +sta {m1}+2 +sta {m1}+3 diff --git a/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_24.asm b/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_24.asm new file mode 100644 index 000000000..cb0c71939 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_24.asm @@ -0,0 +1,10 @@ +lda {m2}+3 +sta {m1} +and #$80 +beq !+ +lda #$ff +!: +sta {m1}+1 +sta {m1}+2 +sta {m1}+3 + diff --git a/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_8.asm b/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_8.asm new file mode 100644 index 000000000..e38bb882f --- /dev/null +++ b/src/main/fragment/mos6502-common/vdsm1=vdsm2_ror_8.asm @@ -0,0 +1,11 @@ +lda {m2}+1 +sta {m1} +lda {m2}+2 +sta {m1}+1 +lda {m2}+3 +sta {m1}+2 +and #$80 +beq !+ +lda #$ff +!: +sta {m1}+3 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdsm1_le_vdsm2_then_la1.asm b/src/main/fragment/mos6502-common/vdsm1_le_vdsm2_then_la1.asm new file mode 100644 index 000000000..bf79382f3 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdsm1_le_vdsm2_then_la1.asm @@ -0,0 +1,12 @@ +lda {m1} +cmp {m2} +lda {m1}+1 +sbc {m2}+1 +lda {m1}+2 +sbc {m2}+2 +lda {m1}+3 +sbc {m2}+3 +bvc !+ +eor #$80 +bmi {la1} +!: \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdum1=vdum1_ror_16.asm b/src/main/fragment/mos6502-common/vdum1=vdum1_ror_16.asm new file mode 100644 index 000000000..250767231 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdum1=vdum1_ror_16.asm @@ -0,0 +1,7 @@ +lda {m1}+2 +sta {m1} +lda {m1}+3 +sta {m1}+1 +lda #0 +sta {m1}+2 +sta {m1}+3 \ No newline at end of file