From ea70f7a6f46bc9631f2d4aa6c07f800e320231c6 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 18 Aug 2019 13:51:49 +0200 Subject: [PATCH] Added some signed word fragments --- src/main/fragment/vwsz1=vwsz2_rol_2.asm | 8 +++++++ src/main/fragment/vwsz1=vwsz2_rol_4.asm | 12 +++++++++++ src/main/fragment/vwsz1=vwsz2_rol_5.asm | 14 +++++++++++++ src/main/fragment/vwsz1=vwsz2_rol_6.asm | 21 +------------------ src/main/fragment/vwsz1=vwsz2_rol_7.asm | 18 ++++++++++++++++ src/main/fragment/vwsz1_gt_vwsc1_then_la1.asm | 10 +++++++++ 6 files changed, 63 insertions(+), 20 deletions(-) create mode 100644 src/main/fragment/vwsz1=vwsz2_rol_2.asm create mode 100644 src/main/fragment/vwsz1=vwsz2_rol_4.asm create mode 100644 src/main/fragment/vwsz1=vwsz2_rol_5.asm create mode 100644 src/main/fragment/vwsz1=vwsz2_rol_7.asm create mode 100644 src/main/fragment/vwsz1_gt_vwsc1_then_la1.asm diff --git a/src/main/fragment/vwsz1=vwsz2_rol_2.asm b/src/main/fragment/vwsz1=vwsz2_rol_2.asm new file mode 100644 index 000000000..7e103105b --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz2_rol_2.asm @@ -0,0 +1,8 @@ +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1=vwsz2_rol_4.asm b/src/main/fragment/vwsz1=vwsz2_rol_4.asm new file mode 100644 index 000000000..8eaad2573 --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz2_rol_4.asm @@ -0,0 +1,12 @@ +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1=vwsz2_rol_5.asm b/src/main/fragment/vwsz1=vwsz2_rol_5.asm new file mode 100644 index 000000000..49ba8760b --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz2_rol_5.asm @@ -0,0 +1,14 @@ +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1=vwsz2_rol_6.asm b/src/main/fragment/vwsz1=vwsz2_rol_6.asm index d89caea72..1f1badc13 100644 --- a/src/main/fragment/vwsz1=vwsz2_rol_6.asm +++ b/src/main/fragment/vwsz1=vwsz2_rol_6.asm @@ -1,22 +1,3 @@ -// ROL twice instead of RORing 6 times -lda {z1} -sta $ff -lda {z1}+1 -sta {z1} -lda #0 -bit {z1}+1 -bpl !+ -lda #$ff -!: -sta {z1}+1 -rol $ff -rol {z1} -rol {z1}+1 -rol $ff -rol {z1} -rol {z1}+1 // 64 - - lda {z2} asl sta {z1} @@ -32,4 +13,4 @@ rol {z1}+1 asl {z1} rol {z1}+1 asl {z1} -rol {z1}+1 // 66 \ No newline at end of file +rol {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1=vwsz2_rol_7.asm b/src/main/fragment/vwsz1=vwsz2_rol_7.asm new file mode 100644 index 000000000..ee921c4b5 --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz2_rol_7.asm @@ -0,0 +1,18 @@ +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1_gt_vwsc1_then_la1.asm b/src/main/fragment/vwsz1_gt_vwsc1_then_la1.asm new file mode 100644 index 000000000..abbfc9313 --- /dev/null +++ b/src/main/fragment/vwsz1_gt_vwsc1_then_la1.asm @@ -0,0 +1,10 @@ +lda {z1} +cmp #<{c1} +lda {z1}+1 +sbc #>{c1} +bvc !+ +eor #$80 +!: +beq !e+ +bpl {la1} +!e: