From fbb15ea4a362584f4ebc1c5aa617c06add6a1b77 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Tue, 12 Oct 2021 08:26:15 +0200 Subject: [PATCH] Added fragments from @Majikeyric --- .../_stackidxbool_vbuc1=vbom1.asm | 3 +++ .../_stackidxsdword_vbuc1=vdsc2.asm | 9 +++++++ .../mos6502-common/_stackpullbyte_9.asm | 9 +++++++ .../_stackpushsdword_=vdsm1.asm | 8 +++++++ .../pbom1_derefidx_vbuyy=vboc1.asm | 6 +++++ .../pbsm1_derefidx_vbuyy=vbsc1.asm | 6 +++++ ...fidx_vbuyy=pbum1_derefidx_vbuyy_plus_1.asm | 8 +++++++ .../pdsc1_derefidx_vbuxx=vdsc2.asm | 8 +++++++ .../pdsc1_derefidx_vbuxx=vdsm1.asm | 8 +++++++ .../pdsc1_derefidx_vbuyy=vdsc2.asm | 8 +++++++ .../pdsc1_derefidx_vbuyy=vdsm1.asm | 8 +++++++ ...m1_derefidx_vbuc1=pdsm1_derefidx_vbuc2.asm | 20 ++++++++++++++++ ...m1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm | 24 +++++++++++++++++++ ...vbuyy=pdsm1_derefidx_vbuyy_minus_vdsc1.asm | 20 ++++++++++++++++ ..._vbuyy=pdsm1_derefidx_vbuyy_plus_vdsc1.asm | 20 ++++++++++++++++ .../pdsm1_derefidx_vbuyy=vbsaa.asm | 17 +++++++++++++ .../pdsm1_derefidx_vbuyy=vbsc1.asm | 16 +++++++++++++ .../pdsm1_derefidx_vbuyy=vdsc2.asm | 15 ++++++++++++ .../pdsm1_derefidx_vbuyy=vdsm2.asm | 15 ++++++++++++ ...z1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm | 20 ++++++++++++++++ ...z1_derefidx_vbuc1=pdsz1_derefidx_vbuc2.asm | 16 +++++++++++++ ...z1_derefidx_vbuc1=pdsz2_derefidx_vbuc2.asm | 16 +++++++++++++ ...vbuyy=pdsz1_derefidx_vbuyy_minus_vdsc1.asm | 16 +++++++++++++ ..._vbuyy=pdsz1_derefidx_vbuyy_plus_vdsc1.asm | 16 +++++++++++++ .../mos6502-common/vbom1=_stackpullbool_.asm | 2 ++ .../vdsm1=_stackidxsdword_vbuc1.asm | 9 +++++++ ...refidx_vbuc1_plus_pdsz2_derefidx_vbuc2.asm | 21 ++++++++++++++++ .../mos6502-common/vdum1=vdum2_bxor_vduc1.asm | 12 ++++++++++ .../mos6502-common/vdum1_eq_0_then_la1.asm | 5 ++++ .../mos6502-common/vdum1_neq_0_then_la1.asm | 5 ++++ .../kickc/test/TestProgramsThorough.java | 8 +++---- 31 files changed, 370 insertions(+), 4 deletions(-) create mode 100644 src/main/fragment/mos6502-common/_stackidxbool_vbuc1=vbom1.asm create mode 100644 src/main/fragment/mos6502-common/_stackidxsdword_vbuc1=vdsc2.asm create mode 100644 src/main/fragment/mos6502-common/_stackpullbyte_9.asm create mode 100644 src/main/fragment/mos6502-common/_stackpushsdword_=vdsm1.asm create mode 100644 src/main/fragment/mos6502-common/pbom1_derefidx_vbuyy=vboc1.asm create mode 100644 src/main/fragment/mos6502-common/pbsm1_derefidx_vbuyy=vbsc1.asm create mode 100644 src/main/fragment/mos6502-common/pbum1_derefidx_vbuyy=pbum1_derefidx_vbuyy_plus_1.asm create mode 100644 src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsm1.asm create mode 100644 src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsm1.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm1_derefidx_vbuc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_minus_vdsc1.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_plus_vdsc1.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsaa.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsc1.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsm2.asm create mode 100644 src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz1_derefidx_vbuc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz2_derefidx_vbuc2.asm create mode 100644 src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_minus_vdsc1.asm create mode 100644 src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_plus_vdsc1.asm create mode 100644 src/main/fragment/mos6502-common/vbom1=_stackpullbool_.asm create mode 100644 src/main/fragment/mos6502-common/vdsm1=_stackidxsdword_vbuc1.asm create mode 100644 src/main/fragment/mos6502-common/vdsm1=pdsz2_derefidx_vbuc1_plus_pdsz2_derefidx_vbuc2.asm create mode 100644 src/main/fragment/mos6502-common/vdum1=vdum2_bxor_vduc1.asm create mode 100644 src/main/fragment/mos6502-common/vdum1_eq_0_then_la1.asm create mode 100644 src/main/fragment/mos6502-common/vdum1_neq_0_then_la1.asm diff --git a/src/main/fragment/mos6502-common/_stackidxbool_vbuc1=vbom1.asm b/src/main/fragment/mos6502-common/_stackidxbool_vbuc1=vbom1.asm new file mode 100644 index 000000000..49deaaf0d --- /dev/null +++ b/src/main/fragment/mos6502-common/_stackidxbool_vbuc1=vbom1.asm @@ -0,0 +1,3 @@ +tsx +lda {m1} +sta STACK_BASE+{c1},x \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_stackidxsdword_vbuc1=vdsc2.asm b/src/main/fragment/mos6502-common/_stackidxsdword_vbuc1=vdsc2.asm new file mode 100644 index 000000000..49d1223f6 --- /dev/null +++ b/src/main/fragment/mos6502-common/_stackidxsdword_vbuc1=vdsc2.asm @@ -0,0 +1,9 @@ +tsx +lda #<{c2} +sta STACK_BASE+{c1},x +lda #>{c2} +sta STACK_BASE+{c1}+1,x +lda #<{c2}>>$10 +sta STACK_BASE+{c1}+2,x +lda #>{c2}>>$10 +sta STACK_BASE+{c1}+3,x \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_stackpullbyte_9.asm b/src/main/fragment/mos6502-common/_stackpullbyte_9.asm new file mode 100644 index 000000000..bc3902a6c --- /dev/null +++ b/src/main/fragment/mos6502-common/_stackpullbyte_9.asm @@ -0,0 +1,9 @@ +pla +pla +pla +pla +pla +pla +pla +pla +pla \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_stackpushsdword_=vdsm1.asm b/src/main/fragment/mos6502-common/_stackpushsdword_=vdsm1.asm new file mode 100644 index 000000000..81c35b07a --- /dev/null +++ b/src/main/fragment/mos6502-common/_stackpushsdword_=vdsm1.asm @@ -0,0 +1,8 @@ +lda {m1}+3 +pha +lda {m1}+2 +pha +lda {m1}+1 +pha +lda {m1} +pha \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pbom1_derefidx_vbuyy=vboc1.asm b/src/main/fragment/mos6502-common/pbom1_derefidx_vbuyy=vboc1.asm new file mode 100644 index 000000000..ce2a2cd6e --- /dev/null +++ b/src/main/fragment/mos6502-common/pbom1_derefidx_vbuyy=vboc1.asm @@ -0,0 +1,6 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +lda #{c1} +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pbsm1_derefidx_vbuyy=vbsc1.asm b/src/main/fragment/mos6502-common/pbsm1_derefidx_vbuyy=vbsc1.asm new file mode 100644 index 000000000..ce2a2cd6e --- /dev/null +++ b/src/main/fragment/mos6502-common/pbsm1_derefidx_vbuyy=vbsc1.asm @@ -0,0 +1,6 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +lda #{c1} +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pbum1_derefidx_vbuyy=pbum1_derefidx_vbuyy_plus_1.asm b/src/main/fragment/mos6502-common/pbum1_derefidx_vbuyy=pbum1_derefidx_vbuyy_plus_1.asm new file mode 100644 index 000000000..1347ef161 --- /dev/null +++ b/src/main/fragment/mos6502-common/pbum1_derefidx_vbuyy=pbum1_derefidx_vbuyy_plus_1.asm @@ -0,0 +1,8 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +lda ($fe),y +clc +adc #1 +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsc2.asm b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsc2.asm new file mode 100644 index 000000000..5286b2e77 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsc2.asm @@ -0,0 +1,8 @@ +lda #<{c2} +sta {c1},x +lda #>{c2} +sta {c1}+1,x +lda #<{c2}>>16 +sta {c1}+2,x +lda #>{c2}>>16 +sta {c1}+3,x \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsm1.asm b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsm1.asm new file mode 100644 index 000000000..e8e02f5c6 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuxx=vdsm1.asm @@ -0,0 +1,8 @@ +lda m1} +sta {c1},x +lda {m1}+1 +sta {c1}+1,x +lda {m1}+2 +sta {c1}+2,x +lda {m1}+3 +sta {c1}+3,x \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsc2.asm b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsc2.asm new file mode 100644 index 000000000..bb7de7902 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsc2.asm @@ -0,0 +1,8 @@ +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +lda #<{c2}>>16 +sta {c1}+2,y +lda #>{c2}>>16 +sta {c1}+3,y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsm1.asm b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsm1.asm new file mode 100644 index 000000000..8e3ba2cf3 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsc1_derefidx_vbuyy=vdsm1.asm @@ -0,0 +1,8 @@ +lda m1} +sta {c1},y +lda {m1}+1 +sta {c1}+1,y +lda {m1}+2 +sta {c1}+2,y +lda {m1}+3 +sta {c1}+3,y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm1_derefidx_vbuc2.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm1_derefidx_vbuc2.asm new file mode 100644 index 000000000..f8afa5b44 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm1_derefidx_vbuc2.asm @@ -0,0 +1,20 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +ldy #{c2} +lda ($fe),y +ldy #{c1} +sta ($fe),y +ldy #{c2}+1 +lda ($fe),y +ldy #{c1}+1 +sta ($fe),y +ldy #{c2}+2 +lda ($fe),y +ldy #{c1}+2 +sta ($fe),y +ldy #{c2}+3 +lda ($fe),y +ldy #{c1}+3 +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm new file mode 100644 index 000000000..d4639da83 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm @@ -0,0 +1,24 @@ +lda {m2} +sta $fc +lda {m2}+1 +sta $fd +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +ldy #{c2} +lda ($fc),y +ldy #{c1} +sta ($fe),y +ldy #{c2}+1 +lda ($fc),y +ldy #{c1}+1 +sta ($fe),y +ldy #{c2}+2 +lda ($fc),y +ldy #{c1}+2 +sta ($fe),y +ldy #{c2}+3 +lda ($fc),y +ldy #{c1}+3 +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_minus_vdsc1.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_minus_vdsc1.asm new file mode 100644 index 000000000..624bd212f --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_minus_vdsc1.asm @@ -0,0 +1,20 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +sec +lda ($fe),y +sbc #<{c1} +sta ($fe),y +iny +lda ($fe),y +sbc #>{c1} +sta ($fe),y +iny +lda ($fe),y +sbc #<{c1}>>$10 +sta ($fe),y +iny +lda ($fe),y +sbc #>{c1}>>$10 +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_plus_vdsc1.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_plus_vdsc1.asm new file mode 100644 index 000000000..cbad018f1 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=pdsm1_derefidx_vbuyy_plus_vdsc1.asm @@ -0,0 +1,20 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +clc +lda ($fe),y +adc #<{c1} +sta ($fe),y +iny +lda ($fe),y +adc #>{c1} +sta ($fe),y +iny +lda ($fe),y +adc #<{c1}>>$10 +sta ($fe),y +iny +lda ($fe),y +adc #>{c1}>>$10 +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsaa.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsaa.asm new file mode 100644 index 000000000..439a38d22 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsaa.asm @@ -0,0 +1,17 @@ +pha +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +pla +sta ($fe),y +and #$80 +beq !+ +lda #$ff +!: +iny +sta ($fe),y +iny +sta ($fe),y +iny +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsc1.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsc1.asm new file mode 100644 index 000000000..b27de2311 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vbsc1.asm @@ -0,0 +1,16 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +lda #{c1} +sta ($fe),y +and #$80 +beq !+ +lda #$ff +!: +iny +sta ($fe),y +iny +sta ($fe),y +iny +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsc2.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsc2.asm new file mode 100644 index 000000000..25d744686 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsc2.asm @@ -0,0 +1,15 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +lda #<{c2} +sta ($fe),y +iny +lda #>{c2} +sta ($fe),y +iny +lda #<{c2}>>16 +sta ($fe),y +iny +lda #>{c2}>>16 +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsm2.asm b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsm2.asm new file mode 100644 index 000000000..2b42273be --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsm1_derefidx_vbuyy=vdsm2.asm @@ -0,0 +1,15 @@ +lda {m1} +sta $fe +lda {m1}+1 +sta $ff +lda {m2} +sta ($fe),y +iny +lda {m2}+1 +sta ($fe),y +iny +lda {m2}+2 +sta ($fe),y +iny +lda {m2}+3 +sta ($fe),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm new file mode 100644 index 000000000..f9bdcd796 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsm2_derefidx_vbuc2.asm @@ -0,0 +1,20 @@ +lda {m2} +sta $fe +lda {m2}+1 +sta $ff +ldy #{c2} +lda ($fe),y +ldy #{c1} +sta ({z1}),y +ldy #{c2}+1 +lda ($fe),y +ldy #{c1}+1 +sta ({z1}),y +ldy #{c2}+2 +lda ($fe),y +ldy #{c1}+2 +sta ({z1}),y +ldy #{c2}+3 +lda ($fe),y +ldy #{c1}+3 +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz1_derefidx_vbuc2.asm b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz1_derefidx_vbuc2.asm new file mode 100644 index 000000000..1989f6b7f --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz1_derefidx_vbuc2.asm @@ -0,0 +1,16 @@ +ldy #{c2} +lda ({z1}),y +ldy #{c1} +sta ({z1}),y +ldy #{c2}+1 +lda ({z1}),y +ldy #{c1}+1 +sta ({z1}),y +ldy #{c2}+2 +lda ({z1}),y +ldy #{c1}+2 +sta ({z1}),y +ldy #{c2}+3 +lda ({z1}),y +ldy #{c1}+3 +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz2_derefidx_vbuc2.asm b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz2_derefidx_vbuc2.asm new file mode 100644 index 000000000..0d7a4c070 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuc1=pdsz2_derefidx_vbuc2.asm @@ -0,0 +1,16 @@ +ldy #{c2} +lda ({z2}),y +ldy #{c1} +sta ({z1}),y +ldy #{c2}+1 +lda ({z2}),y +ldy #{c1}+1 +sta ({z1}),y +ldy #{c2}+2 +lda ({z2}),y +ldy #{c1}+2 +sta ({z1}),y +ldy #{c2}+3 +lda ({z2}),y +ldy #{c1}+3 +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_minus_vdsc1.asm b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_minus_vdsc1.asm new file mode 100644 index 000000000..3566184a0 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_minus_vdsc1.asm @@ -0,0 +1,16 @@ +sec +lda ({z1}),y +sbc #<{c1} +sta ({z1}),y +iny +lda ({z1}),y +sbc #>{c1} +sta ({z1}),y +iny +lda ({z1}),y +sbc #<{c1}>>$10 +sta ({z1}),y +iny +lda ({z1}),y +sbc #>{c1}>>$10 +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_plus_vdsc1.asm b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_plus_vdsc1.asm new file mode 100644 index 000000000..65d60f3e3 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdsz1_derefidx_vbuyy=pdsz1_derefidx_vbuyy_plus_vdsc1.asm @@ -0,0 +1,16 @@ +clc +lda ({z1}),y +adc #<{c1} +sta ({z1}),y +iny +lda ({z1}),y +adc #>{c1} +sta ({z1}),y +iny +lda ({z1}),y +adc #<{c1}>>$10 +sta ({z1}),y +iny +lda ({z1}),y +adc #>{c1}>>$10 +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vbom1=_stackpullbool_.asm b/src/main/fragment/mos6502-common/vbom1=_stackpullbool_.asm new file mode 100644 index 000000000..66c22a6c1 --- /dev/null +++ b/src/main/fragment/mos6502-common/vbom1=_stackpullbool_.asm @@ -0,0 +1,2 @@ +pla +sta {m1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdsm1=_stackidxsdword_vbuc1.asm b/src/main/fragment/mos6502-common/vdsm1=_stackidxsdword_vbuc1.asm new file mode 100644 index 000000000..31fad1e8d --- /dev/null +++ b/src/main/fragment/mos6502-common/vdsm1=_stackidxsdword_vbuc1.asm @@ -0,0 +1,9 @@ +tsx +lda STACK_BASE+{c1},x +sta {m1} +lda STACK_BASE+{c1}+1,x +sta {m1}+1 +lda STACK_BASE+{c1}+2,x +sta {m1}+2 +lda STACK_BASE+{c1}+3,x +sta {m1}+3 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdsm1=pdsz2_derefidx_vbuc1_plus_pdsz2_derefidx_vbuc2.asm b/src/main/fragment/mos6502-common/vdsm1=pdsz2_derefidx_vbuc1_plus_pdsz2_derefidx_vbuc2.asm new file mode 100644 index 000000000..501b29622 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdsm1=pdsz2_derefidx_vbuc1_plus_pdsz2_derefidx_vbuc2.asm @@ -0,0 +1,21 @@ +clc +ldy #{c2} +lda ({z2}),y +ldy #{c1} +adc ({z2}),y +sta {m1} +ldy #{c2}+1 +lda ({z2}),y +ldy #{c1}+1 +adc ({z2}),y +sta {m1}+1 +ldy #{c2}+2 +lda ({z2}),y +ldy #{c1}+2 +adc ({z2}),y +sta {m1}+2 +ldy #{c2}+3 +lda ({z2}),y +ldy #{c1}+3 +adc ({z2}),y +sta {m1}+3 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdum1=vdum2_bxor_vduc1.asm b/src/main/fragment/mos6502-common/vdum1=vdum2_bxor_vduc1.asm new file mode 100644 index 000000000..d8d4dcecd --- /dev/null +++ b/src/main/fragment/mos6502-common/vdum1=vdum2_bxor_vduc1.asm @@ -0,0 +1,12 @@ +lda #<{c1} +eor {m2} +sta {m1} +lda #>{c1} +eor {m2}+1 +sta {m1}+1 +lda #<{c1}>>$10 +eor {m2}+2 +sta {m1}+2 +lda #>{c1}>>$10 +eor {m2}+3 +sta {m1}+3 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vdum1_eq_0_then_la1.asm b/src/main/fragment/mos6502-common/vdum1_eq_0_then_la1.asm new file mode 100644 index 000000000..d44d32652 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdum1_eq_0_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/vdum1_neq_0_then_la1.asm b/src/main/fragment/mos6502-common/vdum1_neq_0_then_la1.asm new file mode 100644 index 000000000..10ee57403 --- /dev/null +++ b/src/main/fragment/mos6502-common/vdum1_neq_0_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/test/java/dk/camelot64/kickc/test/TestProgramsThorough.java b/src/test/java/dk/camelot64/kickc/test/TestProgramsThorough.java index c96375e7b..a7962695e 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestProgramsThorough.java +++ b/src/test/java/dk/camelot64/kickc/test/TestProgramsThorough.java @@ -9,10 +9,10 @@ import java.io.IOException; */ public class TestProgramsThorough extends TestPrograms { - //@Test - //public void testComplexSwinkiblues() throws IOException { - // compileAndCompare("complex/swinkiblues/kielbasa.c", log()); - //} + @Test + public void testComplexSwinkiblues() throws IOException { + compileAndCompare("complex/swinkiblues/kielbasa.c", log()); + } @Test public void testCx16VeralibTilemap8bpp8() throws IOException {