diff --git a/src/main/fragment/cache/fragment-cache-csg65ce02.asm b/src/main/fragment/cache/fragment-cache-csg65ce02.asm index 3a5319161..22677bf70 100644 --- a/src/main/fragment/cache/fragment-cache-csg65ce02.asm +++ b/src/main/fragment/cache/fragment-cache-csg65ce02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE d8c3d291d d8c3d4dd4 +//KICKC FRAGMENT CACHE d528e7a15 d528e9ed4 //FRAGMENT vbuzz=vbuc1 ldz #{c1} //FRAGMENT vbuzz_lt_vbuc1_then_la1 diff --git a/src/main/fragment/cache/fragment-cache-mega45gs02.asm b/src/main/fragment/cache/fragment-cache-mega45gs02.asm index c2c92cc1c..0448423b4 100644 --- a/src/main/fragment/cache/fragment-cache-mega45gs02.asm +++ b/src/main/fragment/cache/fragment-cache-mega45gs02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE d8c3d291d d8c3d4dd4 +//KICKC FRAGMENT CACHE d528e7a15 d528e9ed4 //FRAGMENT _deref_pbuc1=vbuc2 ldz #{c2} stz {c1} @@ -1652,11 +1652,110 @@ tza sta {c1} lda #0 sta {c1}+1 +//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 +inc {c1} //FRAGMENT vwuz1=vbuc1 lda #<{c1} sta {z1} lda #>{c1} sta {z1}+1 +//FRAGMENT _deref_pbuc1_eq_vbuz1_then_la1 +lda {c1} +cmp {z1} +beq {la1} +//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 +dec {c1} +//FRAGMENT pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 +ldx {z1} +inc {c1},x +//FRAGMENT vbuz1=_byte0_vwuz2 +lda {z2} +sta {z1} +//FRAGMENT vbuz1=_byte1_vwuz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuz3 +lda {z2} +ora {z3} +sta {z1} +//FRAGMENT _deref_pbuc1_eq_vbuaa_then_la1 +cmp {c1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuaa=_inc_pbuc1_derefidx_vbuaa +tax +inc {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=_inc_pbuc1_derefidx_vbuxx +inc {c1},x +//FRAGMENT vbuaa=_byte1_vwuz1 +lda {z1}+1 +//FRAGMENT vbuxx=_byte1_vwuz1 +ldx {z1}+1 +//FRAGMENT vbuz1=vbuxx_bor_vbuz2 +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuyy_bor_vbuz2 +tya +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuzz_bor_vbuz2 +tza +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuaa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuaa +stx $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_bor_vbuaa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuzz_bor_vbuaa +tay +tza +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuxx +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuxx +stx {z1} +//FRAGMENT vbuyy=_byte1_vwuz1 +ldy {z1}+1 +//FRAGMENT vbuzz=_byte1_vwuz1 +lda {z1}+1 +taz +//FRAGMENT vbuz1=vbuz2_bor_vbuyy +tya +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuzz +tza +ora {z2} +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuyy=_inc_pbuc1_derefidx_vbuyy +lda {c1},y +inc +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=_inc_pbuc1_derefidx_vbuzz +tza +tax +inc {c1},x +//FRAGMENT _deref_pbuc1_eq_vbuxx_then_la1 +cpx {c1} +beq {la1} +//FRAGMENT _deref_pbuc1_eq_vbuyy_then_la1 +tya +cmp {c1} +beq {la1} +//FRAGMENT _deref_pbuc1_eq_vbuzz_then_la1 +cpz {c1} +beq {la1} //FRAGMENT vduz1=vduc1 lda #<{c1} sta {z1} @@ -1710,16 +1809,6 @@ lda {z2} sta {z1} lda {z2}+1 sta {z1}+1 -//FRAGMENT vbuz1=_byte0_vwuz2 -lda {z2} -sta {z1} -//FRAGMENT vbuz1=_byte1_vwuz2 -lda {z2}+1 -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuz3 -lda {z2} -ora {z3} -sta {z1} //FRAGMENT vduz1=vduz2_ror_4 lda {z2}+3 lsr @@ -2307,62 +2396,10 @@ dey bne !- !e: taz -//FRAGMENT vbuaa=_byte1_vwuz1 -lda {z1}+1 -//FRAGMENT vbuxx=_byte1_vwuz1 -ldx {z1}+1 -//FRAGMENT vbuz1=vbuxx_bor_vbuz2 -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuz2 -tya -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuzz_bor_vbuz2 -tza -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuaa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuaa -stx $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuaa -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuzz_bor_vbuaa -tay -tza -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuxx -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuxx -stx {z1} //FRAGMENT vbuaa=_byte1_vduz1 lda {z1}+1 //FRAGMENT vbuxx=_byte1_vduz1 ldx {z1}+1 -//FRAGMENT vbuz1=vbuz2_bor_vbuyy -tya -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuzz -tza -ora {z2} -sta {z1} -//FRAGMENT vbuyy=_byte1_vwuz1 -ldy {z1}+1 -//FRAGMENT vbuzz=_byte1_vwuz1 -lda {z1}+1 -taz //FRAGMENT vbuyy=_byte1_vduz1 ldy {z1}+1 //FRAGMENT vbuzz=_byte1_vduz1 @@ -2440,40 +2477,334 @@ sta {z1}+3 NO_SYNTHESIS //FRAGMENT vduz1=vwsc1 NO_SYNTHESIS -//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 -inc {c1} -//FRAGMENT _deref_pbuc1_eq_vbuz1_then_la1 -lda {c1} -cmp {z1} +//FRAGMENT _deref_pwuc1=vbuc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT _deref_pbuc1_neq_vbuc2_then_la1 +ldz #{c2} +cpz {c1} +bne {la1} +//FRAGMENT vbuz1=vbuz1_bxor_vbuc1 +lda #{c1} +eor {z1} +sta {z1} +//FRAGMENT vbuz1_eq_0_then_la1 +lda {z1} beq {la1} -//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 -dec {c1} -//FRAGMENT pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 -ldx {z1} -inc {c1},x -//FRAGMENT _deref_pbuc1_eq_vbuaa_then_la1 -cmp {c1} +//FRAGMENT pvoz1=pvoz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pwuz1=pwuc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1_lt_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vduz1=vduz2 +ldq {z2} +stq {z1} +//FRAGMENT vduz1=_inc_vduz2 +lda {z2} +clc +adc #1 +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vwuz1=_inc_vwuz1 +inw {z1} +//FRAGMENT vwuz1=vwuz2_rol_1 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +//FRAGMENT pwuz1=pwuc1_plus_vwuz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pwuz1=vwuz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT vbuz1=vwuz2_band_vbuc1 +lda #{c1} +and {z2} +sta {z1} +//FRAGMENT vwuz1=vwuz1_plus_1 +inw {z1} +//FRAGMENT vwuz1_le_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne !+ +lda {z1} +cmp #<{c1} +!: +bcc {la1} beq {la1} -//FRAGMENT pbuc1_derefidx_vbuaa=_inc_pbuc1_derefidx_vbuaa +//FRAGMENT vwuz1=vwuz1_minus_vwuc1 +lda {z1} +sec +sbc #<{c1} +sta {z1} +lda {z1}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_minus_1 +lda {z1} +sec +sbc #1 +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_plus_vwuc1 +lda {z1} +clc +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=_deref_pwuz2_plus__deref_pwuz3 +ldy #0 +clc +lda ({z2}),y +adc ({z3}),y +sta {z1} +iny +lda ({z2}),y +adc ({z3}),y +sta {z1}+1 +//FRAGMENT vbuz1=_deref_pbuz2_plus__deref_pbuz3 +ldy #0 +lda ({z2}),y +clc +ldy #0 +adc ({z3}),y +sta {z1} +//FRAGMENT vwuz1=vwuz1_minus_vbuc1 +sec +lda {z1} +sbc #{c1} +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus__deref_pwuz3 +ldy #0 +clc +lda {z2} +adc ({z3}),y +sta {z1} +iny +lda {z2}+1 +adc ({z3}),y +sta {z1}+1 +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuz3 +ldx {z3} +ldy {z2} +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT vbuaa=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +//FRAGMENT vbuxx=vwuz1_band_vbuc1 +lda #{c1} +and {z1} tax -inc {c1},x -//FRAGMENT pbuc1_derefidx_vbuxx=_inc_pbuc1_derefidx_vbuxx -inc {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=_inc_pbuc1_derefidx_vbuyy -lda {c1},y -inc -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuzz=_inc_pbuc1_derefidx_vbuzz +//FRAGMENT vbuyy=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +tay +//FRAGMENT vbuzz=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +taz +//FRAGMENT vbuaa=_deref_pbuz1_plus__deref_pbuz2 +ldy #0 +lda ({z1}),y +clc +ldy #0 +adc ({z2}),y +//FRAGMENT vbuxx=_deref_pbuz1_plus__deref_pbuz2 +ldy #0 +lda ({z1}),y +clc +ldy #0 +adc ({z2}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1_plus__deref_pbuz2 +ldy #0 +lda ({z1}),y +clc +ldy #0 +adc ({z2}),y +tay +//FRAGMENT vbuzz=_deref_pbuz1_plus__deref_pbuz2 +ldy #0 +lda ({z1}),y +clc +ldy #0 +adc ({z2}),y +taz +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuaa +ldy {z2} +tax +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuxx +ldy {z2} +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuyy +tya +ldy {z2} +tax +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuzz +ldy {z2} tza tax -inc {c1},x -//FRAGMENT _deref_pbuc1_eq_vbuxx_then_la1 -cpx {c1} -beq {la1} -//FRAGMENT _deref_pbuc1_eq_vbuyy_then_la1 -tya -cmp {c1} -beq {la1} -//FRAGMENT _deref_pbuc1_eq_vbuzz_then_la1 -cpz {c1} -beq {la1} +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuz2 +txa +ldx {z2} +tay +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuaa +tay +txa +ldx {c1},y +tay +lda ({z1}),y +stx $ff +ora $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuxx +txa +tay +lda ({z1}),y +stx $ff +ora {c1},x +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuyy +txa +ldx {c1},y +tay +lda ({z1}),y +stx $ff +ora $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuzz +txa +tay +tza +tax +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuzz=pbuz1_derefidx_vbuzz_bor_pbuc1_derefidx_vbuz2 +ldx {z2} +tza +tay +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuzz=pbuz1_derefidx_vbuzz_bor_pbuc1_derefidx_vbuaa +tax +tza +tay +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuzz=pbuz1_derefidx_vbuzz_bor_pbuc1_derefidx_vbuxx +tza +tay +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuzz=pbuz1_derefidx_vbuzz_bor_pbuc1_derefidx_vbuyy +lda ({z1}),z +stz $ff +ora {c1},y +ldz $ff +sta ({z1}),z +//FRAGMENT pbuz1_derefidx_vbuzz=pbuz1_derefidx_vbuzz_bor_pbuc1_derefidx_vbuzz +tza +tax +tza +tay +lda ({z1}),y +ora {c1},x +sta ({z1}),y +//FRAGMENT vduz1=_inc_vduz1 +inq {z1} +//FRAGMENT pwuz1=pwuc1_plus_vwuz1 +lda {z1} +clc +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=_deref_pwuz1_plus__deref_pwuz2 +ldy #0 +clc +lda ({z1}),y +adc ({z2}),y +pha +iny +lda ({z1}),y +adc ({z2}),y +sta {z1}+1 +pla +sta {z1} +//FRAGMENT pbuz1=pbuz2_plus__deref_pwuz1 +ldy #0 +clc +lda ({z1}),y +adc {z2} +pha +iny +lda ({z1}),y +adc {z2}+1 +sta {z1}+1 +pla +sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-mos6502.asm b/src/main/fragment/cache/fragment-cache-mos6502.asm index 560783e65..ed14e80b1 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE d8c3d291d d8c3d4dd4 +//KICKC FRAGMENT CACHE d528e7a15 d528e9ed4 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-mos6502x.asm b/src/main/fragment/cache/fragment-cache-mos6502x.asm index e8acc91b4..d00a8f7cb 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502x.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502x.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE d8c3d291d d8c3d4dd4 +//KICKC FRAGMENT CACHE d528e7a15 d528e9ed4 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-rom6502x.asm b/src/main/fragment/cache/fragment-cache-rom6502x.asm index b8ded4b00..fe153675d 100644 --- a/src/main/fragment/cache/fragment-cache-rom6502x.asm +++ b/src/main/fragment/cache/fragment-cache-rom6502x.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE d8c3d291d d8c3d4dd4 +//KICKC FRAGMENT CACHE d528e7a15 d528e9ed4 //FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 inc {c1} //FRAGMENT isr_hardware_all_entry diff --git a/src/main/fragment/cache/fragment-cache-wdc65c02.asm b/src/main/fragment/cache/fragment-cache-wdc65c02.asm index 3088d0cee..6adc50286 100644 --- a/src/main/fragment/cache/fragment-cache-wdc65c02.asm +++ b/src/main/fragment/cache/fragment-cache-wdc65c02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE d8c3d291d d8c3d4dd4 +//KICKC FRAGMENT CACHE d528e7a15 d528e9ed4 //FRAGMENT vbuz1=_deref_pbuc1 lda {c1} sta {z1} diff --git a/src/main/fragment/mega45gs02-common/vdum1=_inc_vdum1.asm b/src/main/fragment/mega45gs02-common/vdum1=_inc_vdum1.asm new file mode 100644 index 000000000..75534b021 --- /dev/null +++ b/src/main/fragment/mega45gs02-common/vdum1=_inc_vdum1.asm @@ -0,0 +1 @@ +inq {m1} \ 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 c2ec95128..0b5f8e813 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestProgramsThorough.java +++ b/src/test/java/dk/camelot64/kickc/test/TestProgramsThorough.java @@ -16,7 +16,7 @@ public class TestProgramsThorough extends TestPrograms { @Test public void testComplexSwinkiblues() throws IOException { - compileAndCompare("complex/swinkiblues/kielbasa.c", log()); + compileAndCompare("complex/swinkiblues_4/loader.c"); } @Test diff --git a/src/test/ref/examples/mega65/camelot-1536dots.asm b/src/test/ref/examples/mega65/camelot-1536dots.asm index 7d8f36237..1183f368e 100644 --- a/src/test/ref/examples/mega65/camelot-1536dots.asm +++ b/src/test/ref/examples/mega65/camelot-1536dots.asm @@ -418,9 +418,7 @@ graphics_mode: { __b1: // for(char y=0;y<25;y++) cpx #$19 - bcs !__b2+ - jmp __b2 - !__b2: + bcc __b2 lda #<$ff80000 sta.z cols lda #>$ff80000 @@ -471,14 +469,7 @@ graphics_mode: { stz.z lpoke.val jsr lpoke // lpoke(cols++, 0); - inc.z cols - bne !+ - inc.z cols+1 - bne !+ - inc.z cols+2 - bne !+ - inc.z cols+3 - !: + inq.z cols // lpoke(cols++, WHITE) ldq.z cols stq.z lpoke.addr @@ -487,14 +478,7 @@ graphics_mode: { // No extended attributes jsr lpoke // lpoke(cols++, WHITE); - inc.z cols - bne !+ - inc.z cols+1 - bne !+ - inc.z cols+2 - bne !+ - inc.z cols+3 - !: + inq.z cols // for( unsigned int i=0; i<1000;i++) inw.z i jmp __b6 diff --git a/src/test/ref/examples/mega65/camelot-1536dots.log b/src/test/ref/examples/mega65/camelot-1536dots.log index 6e7e5f857..7cd206812 100644 --- a/src/test/ref/examples/mega65/camelot-1536dots.log +++ b/src/test/ref/examples/mega65/camelot-1536dots.log @@ -3366,14 +3366,7 @@ graphics_mode: { // graphics_mode::@9 __b9: // [94] graphics_mode::cols#1 = ++ graphics_mode::cols#3 -- vduz1=_inc_vduz1 - inc.z cols - bne !+ - inc.z cols+1 - bne !+ - inc.z cols+2 - bne !+ - inc.z cols+3 - !: + inq.z cols // [95] lpoke::addr = graphics_mode::cols#1 -- vduz1=vduz2 ldq.z cols stq.z lpoke.addr @@ -3387,14 +3380,7 @@ graphics_mode: { // graphics_mode::@10 __b10: // [98] graphics_mode::cols#2 = ++ graphics_mode::cols#1 -- vduz1=_inc_vduz1 - inc.z cols - bne !+ - inc.z cols+1 - bne !+ - inc.z cols+2 - bne !+ - inc.z cols+3 - !: + inq.z cols // [99] graphics_mode::i#1 = ++ graphics_mode::i#2 -- vwuz1=_inc_vwuz1 inw.z i // [83] phi from graphics_mode::@10 to graphics_mode::@6 [phi:graphics_mode::@10->graphics_mode::@6] @@ -4308,7 +4294,6 @@ Succesful ASM optimization Pass5UnusedLabelElimination Relabelling long label __b8_from___b7 to __b4 Succesful ASM optimization Pass5RelabelLongLabels Replacing instruction lda #<0 with TZA -Fixing long branch [348] bcc __b2 to bcs FINAL SYMBOL TABLE __constant const char BLACK = 0 @@ -4549,7 +4534,7 @@ mem[12] [ memset_dma_command ] FINAL ASSEMBLER -Score: 52396 +Score: 52076 // File Comments // A pretty simple double sine plotter @@ -5089,9 +5074,7 @@ graphics_mode: { // for(char y=0;y<25;y++) // [82] if(graphics_mode::y#2<$19) goto graphics_mode::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #$19 - bcs !__b2+ - jmp __b2 - !__b2: + bcc __b2 // [83] phi from graphics_mode::@1 to graphics_mode::@6 [phi:graphics_mode::@1->graphics_mode::@6] // [83] phi graphics_mode::cols#3 = $ff80000 [phi:graphics_mode::@1->graphics_mode::@6#0] -- vduz1=vduc1 lda #<$ff80000 @@ -5166,14 +5149,7 @@ graphics_mode: { // graphics_mode::@9 // lpoke(cols++, 0); // [94] graphics_mode::cols#1 = ++ graphics_mode::cols#3 -- vduz1=_inc_vduz1 - inc.z cols - bne !+ - inc.z cols+1 - bne !+ - inc.z cols+2 - bne !+ - inc.z cols+3 - !: + inq.z cols // lpoke(cols++, WHITE) // [95] lpoke::addr = graphics_mode::cols#1 -- vduz1=vduz2 ldq.z cols @@ -5187,14 +5163,7 @@ graphics_mode: { // graphics_mode::@10 // lpoke(cols++, WHITE); // [98] graphics_mode::cols#2 = ++ graphics_mode::cols#1 -- vduz1=_inc_vduz1 - inc.z cols - bne !+ - inc.z cols+1 - bne !+ - inc.z cols+2 - bne !+ - inc.z cols+3 - !: + inq.z cols // for( unsigned int i=0; i<1000;i++) // [99] graphics_mode::i#1 = ++ graphics_mode::i#2 -- vwuz1=_inc_vwuz1 inw.z i