diff --git a/src/main/fragment/mos6502-common/_deref_pwuc1=_deref_pwuc1_minus_vwum1.asm b/src/main/fragment/mos6502-common/_deref_pwuc1=_deref_pwuc1_minus_vwum1.asm new file mode 100644 index 000000000..76d6020f1 --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuc1=_deref_pwuc1_minus_vwum1.asm @@ -0,0 +1,7 @@ +sec +lda {c1} +sbc {m1} +sta {c1} +lda {c1}+1 +sbc {m1}+1 +sta {c1}+1 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_deref_pwuc1_neq_vwuc2_then_la1.asm b/src/main/fragment/mos6502-common/_deref_pwuc1_neq_vwuc2_then_la1.asm new file mode 100644 index 000000000..8ff2a2972 --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuc1_neq_vwuc2_then_la1.asm @@ -0,0 +1,6 @@ +lda {c1}+1 +cmp #>{c2} +bne {la1} +lda {c1} +cmp #<{c2} +bne {la1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuc1.asm b/src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuc1.asm new file mode 100644 index 000000000..553c14e62 --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuc1.asm @@ -0,0 +1,6 @@ +ldy #0 +lda {c1} +sta ({z1}),y +iny +lda {c1}+1 +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuz1_minus_vwuz2.asm b/src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuz1_minus_vwuz2.asm new file mode 100644 index 000000000..ee5a65c89 --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuz1_minus_vwuz2.asm @@ -0,0 +1,9 @@ +sec +ldy #0 +lda ({z1}),y +sbc {z2} +sta ({z1}),y +iny +lda ({z1}),y +sbc {z2}+1 +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_deref_pwuz1=pwuz2_derefidx_vbuyy.asm b/src/main/fragment/mos6502-common/_deref_pwuz1=pwuz2_derefidx_vbuyy.asm new file mode 100644 index 000000000..c0b7c9269 --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuz1=pwuz2_derefidx_vbuyy.asm @@ -0,0 +1,9 @@ +lda ({z2}),y +pha +iny +lda ({z2}),y +ldy #1 +sta ({z1}),y +dey +pla +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_deref_pwuz1_neq_pwuz2_derefidx_vbuyy_then_la1.asm b/src/main/fragment/mos6502-common/_deref_pwuz1_neq_pwuz2_derefidx_vbuyy_then_la1.asm new file mode 100644 index 000000000..7484462fb --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuz1_neq_pwuz2_derefidx_vbuyy_then_la1.asm @@ -0,0 +1,11 @@ +sty $ff +lda ({z2}),y +ldy #0 +cmp ({z1}),y +bne {la1} +iny +lda ({z1}),y +ldy $ff +iny +cmp ({z2}),y +bne {la1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/_deref_pwuz1_neq_vwuc1_then_la1.asm b/src/main/fragment/mos6502-common/_deref_pwuz1_neq_vwuc1_then_la1.asm new file mode 100644 index 000000000..3c30f3905 --- /dev/null +++ b/src/main/fragment/mos6502-common/_deref_pwuz1_neq_vwuc1_then_la1.asm @@ -0,0 +1,8 @@ +ldy #0 +lda ({z1}),y +cmp #<{c1} +bne {la1} +iny +lda ({z1}),y +cmp #>{c1} +bne {la1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=_deref_pwuz2.asm b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=_deref_pwuz2.asm new file mode 100644 index 000000000..402f1879e --- /dev/null +++ b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=_deref_pwuz2.asm @@ -0,0 +1,11 @@ +sty $ff +ldy #1 +lda ({z2}),y +pha +dey +lda ({z2}),y +ldy $ff +sta ({z1}),y +iny +pla +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz2.asm b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz2.asm new file mode 100644 index 000000000..402f1879e --- /dev/null +++ b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz2.asm @@ -0,0 +1,11 @@ +sty $ff +ldy #1 +lda ({z2}),y +pha +dey +lda ({z2}),y +ldy $ff +sta ({z1}),y +iny +pla +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz2_derefidx_vbuyy.asm b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz2_derefidx_vbuyy.asm new file mode 100644 index 000000000..66ee03e0b --- /dev/null +++ b/src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz2_derefidx_vbuyy.asm @@ -0,0 +1,5 @@ +lda ({z2}),y +sta ({z1}),y +iny +lda ({z2}),y +sta ({z1}),y diff --git a/src/main/fragment/mos6502-common/vwuz1=_deref_pwuz1_plus_vwuc1.asm b/src/main/fragment/mos6502-common/vwuz1=_deref_pwuz1_plus_vwuc1.asm new file mode 100644 index 000000000..8d9398e50 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwuz1=_deref_pwuz1_plus_vwuc1.asm @@ -0,0 +1,11 @@ +clc +ldy #0 +lda ({z1}),y +adc #<{c1} +pha +iny +lda ({z1}),y +adc #>{c1} +sta {z1}+1 +pla +sta {z1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vwuz1=_deref_pwuz2_plus_vwuc1.asm b/src/main/fragment/mos6502-common/vwuz1=_deref_pwuz2_plus_vwuc1.asm new file mode 100644 index 000000000..6633d6314 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwuz1=_deref_pwuz2_plus_vwuc1.asm @@ -0,0 +1,9 @@ +clc +ldy #0 +lda ({z2}),y +adc #<{c1} +sta {z1} +iny +lda ({z2}),y +adc #>{c1} +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vwuz1=pwuz1_derefidx_vbuyy_minus_vwuc2.asm b/src/main/fragment/mos6502-common/vwuz1=pwuz1_derefidx_vbuyy_minus_vwuc2.asm new file mode 100644 index 000000000..0366d9ce5 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwuz1=pwuz1_derefidx_vbuyy_minus_vwuc2.asm @@ -0,0 +1,10 @@ +sec +lda ({z1}),y +sbc #<{c2} +pha +iny +lda ({z1}),y +sbc #>{c2} +sta {z1}+1 +pla +sta {z1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vwuz1=pwuz2_derefidx_vbuyy_minus_vwuz1.asm b/src/main/fragment/mos6502-common/vwuz1=pwuz2_derefidx_vbuyy_minus_vwuz1.asm new file mode 100644 index 000000000..b3d39f866 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwuz1=pwuz2_derefidx_vbuyy_minus_vwuz1.asm @@ -0,0 +1,8 @@ +sec +lda ({z2}),y +sbc {z1} +sta {z1} +iny +lda ({z2}),y +sbc {z1}+1 +sta {z1}+1 \ No newline at end of file