diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java index f224f5345..f77bce4dc 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentManager.java @@ -7,8 +7,7 @@ import org.antlr.v4.runtime.*; import java.io.IOException; import java.io.InputStream; import java.net.URL; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -102,166 +101,53 @@ public class AsmFragmentManager { } } - if (signature.startsWith("xby=")) { - String subSignature = "aby=" + signature.substring(4); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString(subCharStream.toString() + "\ntax\n"); - return result; - } - } - if (signature.startsWith("yby=")) { - String subSignature = "aby=" + signature.substring(4); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString(subCharStream.toString() + "\ntay\n"); - return result; - } - } - if (signature.startsWith("zpby1=")) { - String subSignature = "aby=" + signature.substring(6).replace("zpby1", "aby").replace("zpby2", "zpby1").replace("zpby3", "zpby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString(subCharStream.toString().replace("zpby2", "zpby3").replace("zpby1", "zpby2") + "\nsta {zpby1}\n"); - return result; - } - } - if (signature.startsWith("zpsby1=")) { - String subSignature = regexpRewriteSignature(signature, "zpsby1=(.*)", "asby=$1").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString(subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpbsy2") + "\nsta {zpsby1}\n"); - return result; - } - } - if (signature.startsWith("_deref_zpptrby1=")) { - String subSignature = regexpRewriteSignature(signature, "_deref_zpptrby1=(.*)", "aby=$1").replace("zpptrby2", "zpptrby1").replace("zpptrby3", "zpptrby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString(subCharStream.toString().replace("zpptrby2", "zpptrby3").replace("zpptrby1", "zpptrby2") + "\n"+"ldy #0\n" + "sta ({zpptrby1}),y\n"); - return result; - } - } - if (signature.startsWith("_deref_cowo1=")) { - String subSignature = regexpRewriteSignature(signature, "_deref_cowo1=(.*)", "aby=$1").replace("cowo2", "cowo1").replace("cowo3", "cowo2").replace("coby2", "coby1").replace("coby3", "coby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString(subCharStream.toString().replace("cowo2", "cowo3").replace("cowo1", "cowo2").replace("coby2", "coby3").replace("coby1", "coby2") + "\nsta {cowo1}\n"); - return result; - } - } - if (signature.contains("=zpby1_") && !signature.matches(".*=.*aby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=zpby1_(.*)", "$1=aby_$2").replace("zpby2", "zpby1").replace("zpby3", "zpby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {zpby1}\n"+subCharStream.toString().replace("zpby2", "zpby3").replace("zpby1", "zpby2")); - return result; - } - } - if (signature.contains("=zpsby1_") && !signature.matches(".*=.*asby.*") && !signature.matches(".*=.*aby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=zpsby1_(.*)", "$1=asby_$2").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {zpsby1}\n"+subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpsby2")); - return result; - } - } - if (signature.contains("=zpsby1") && !signature.matches(".*=.*asby") && !signature.matches(".*=.*aby")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=zpsby1", "$1=asby").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {zpsby1}\n"+subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpsby2")); - return result; - } - } - if (signature.contains("=xby_") && !signature.matches(".*=.*aby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=xby_(.*)", "$1=aby_$2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("txa\n"+subCharStream.toString()); - return result; - } - } - if (signature.contains("=yby_") && !signature.matches(".*=.*aby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=yby_(.*)", "$1=aby_$2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("tya\n"+subCharStream.toString()); - return result; - } - } - if (signature.contains("=_deref_cowo1") && !signature.matches(".*=.*aby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=_deref_cowo1_(.*)", "$1=aby_$2").replace("cowo2", "cowo1").replace("cowo3", "cowo2").replace("coby2", "coby1").replace("coby3", "coby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {cowo1}\n"+subCharStream.toString().replace("cowo2", "cowo3").replace("cowo1", "cowo2").replace("coby2", "coby3").replace("coby1", "coby2")); - return result; - } - } - if (signature.contains("=_deref_zpptrby1") && !signature.matches(".*=.*aby.*")&& !signature.matches(".*=.*yby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=_deref_zpptrby1(.*)", "$1=aby$2").replace("zpptrby2", "zpptrby1").replace("zpptrby3", "zpptrby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("ldy #0\n"+"lda ({zpptrby1}),y\n"+subCharStream.toString().replace("zpptrby2", "zpptrby3").replace("zpptrby1", "zpptrby2")); - return result; - } - } - if (signature.endsWith("_derefidx_aby") && !signature.matches(".*=.*yby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=(.*)_derefidx_aby", "$1=$2_derefidx_yby"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("tay\n"+subCharStream.toString()); - return result; - } - } - if (signature.endsWith("_derefidx_aby") && !signature.matches(".*=.*xby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=(.*)_derefidx_aby", "$1=$2_derefidx_xby"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("tax\n"+subCharStream.toString()); - return result; - } - } - if (signature.endsWith("_derefidx_zpby1") && !signature.matches(".*=.*yby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=(.*)_derefidx_zpby1", "$1=$2_derefidx_yby").replace("zpby2", "zpby1").replace("zpby3", "zpby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("ldy {zpby1}\n"+subCharStream.toString().replace("zpby2", "zpby3").replace("zpby1", "zpby2")); - return result; - } - } - if (signature.endsWith("_derefidx_zpby1") && !signature.matches(".*=.*xby.*")) { - String subSignature = regexpRewriteSignature(signature, "(.*)=(.*)_derefidx_zpby1", "$1=$2_derefidx_xby").replace("zpby2", "zpby1").replace("zpby3", "zpby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("ldx {zpby1}\n"+subCharStream.toString().replace("zpby2", "zpby3").replace("zpby1", "zpby2")); - return result; - } - } + Map mapZpsby = new LinkedHashMap<>(); + mapZpsby.put("zpsby2", "zpsby1"); + mapZpsby.put("zpsby3", "zpsby2"); + Map mapZpby = new LinkedHashMap<>(); + mapZpby.put("zpby2", "zpby1"); + mapZpby.put("zpby3", "zpby2"); + Map mapZpptrby = new LinkedHashMap<>(); + mapZpptrby.put("zpptrby2", "zpptrby1"); + mapZpptrby.put("zpptrby3", "zpptrby2"); + Map mapConst = new LinkedHashMap<>(); + mapConst.put("cowo2", "cowo1"); + mapConst.put("cowo3", "cowo2"); + mapConst.put("coby2", "coby1"); + mapConst.put("coby3", "coby2"); - // TODO: Find a more general replacement method for comparators! - if (signature.startsWith("_deref_cowo1_neq_") && !signature.contains("aby")) { - String subSignature = regexpRewriteSignature(signature, "_deref_cowo1_neq_(.*)", "aby_neq_$1").replace("cowo2", "cowo1").replace("cowo3", "cowo2").replace("coby2", "coby1").replace("coby3", "coby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {cowo1}\n"+subCharStream.toString().replace("cowo2", "cowo3").replace("cowo1", "cowo2").replace("coby2", "coby3").replace("coby1", "coby2")); - return result; - } - } - if (signature.startsWith("zpsby1_lt_") && !signature.contains("aby") && !signature.contains("asby")) { - String subSignature = regexpRewriteSignature(signature, "zpsby1_lt_(.*)", "asby_lt_$1").replace("zpsby2", "zpsby1").replace("zpsby3", "zpsby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {zpsby1}\n"+subCharStream.toString().replace("zpsby2", "zpsby3").replace("zpsby1", "zpbsy2")); - return result; - } - } - if (signature.startsWith("zpby1_lt_") && !signature.contains("aby") && !signature.contains("asby")) { - String subSignature = regexpRewriteSignature(signature, "zpby1_lt_(.*)", "aby_lt_$1").replace("zpby2", "zpby1").replace("zpby3", "zpby2"); - CharStream subCharStream = loadOrSynthesizeFragment(subSignature); - if (subCharStream != null) { - CharStream result = CharStreams.fromString("lda {zpby1}\n"+subCharStream.toString().replace("zpby2", "zpby3").replace("zpby1", "zpby2")); - return result; + List synths = new ArrayList<>(); + synths.add(new FragmentSynthesis("xby=(.*)", null, null, "aby=$1", "tax\n", null)); + synths.add(new FragmentSynthesis("yby=(.*)", null, null, "aby=$1", "tay\n", null)); + synths.add(new FragmentSynthesis("zpby1=(.*)", ".*=.*zps?by1.*", null, "aby=$1", "sta {zpby1}\n", mapZpby)); + synths.add(new FragmentSynthesis("zpsby1=(.*)", ".*=.*zps?by1.*", null, "asby=$1", "sta {zpsby1}\n", mapZpsby)); + synths.add(new FragmentSynthesis("_deref_cowo1=(.*)", null, null, "aby=$1", "sta {cowo1}\n", mapConst)); + synths.add(new FragmentSynthesis("_deref_zpptrby1=(.*)", ".*=.*zpptrs?by1.*", null, "aby=$1", "ldy #0\n" + "sta ({zpptrby1}),y\n", mapZpptrby)); + + synths.add(new FragmentSynthesis("(.*)=xby(.*)", ".*=.*as?by.*", "txa\n", "$1=aby$2", null, null)); + synths.add(new FragmentSynthesis("(.*)=yby(.*)", ".*=.*as?by.*", "tya\n", "$1=aby$2", null, null)); + synths.add(new FragmentSynthesis("(.*)=zpby1(.*)", ".*=.*as?by.*|zps?by1=.*", "lda {zpby1}\n", "$1=aby$2", null, mapZpby)); + synths.add(new FragmentSynthesis("(.*)=zpsby1(.*)", ".*=.*as?by.*|zps?by1=.*", "lda {zpsby1}\n", "$1=aby$2", null, mapZpsby)); + synths.add(new FragmentSynthesis("(.*)=_deref_cowo1(.*)", ".*=.*as?by.*", "lda {cowo1}\n", "$1=aby$2", null, mapConst)); + synths.add(new FragmentSynthesis("(.*)=_deref_zpptrby1(.*)", ".*=.*as?by.*|.*=.*ys?by.*", "ldy #0\n"+"lda ({zpptrby1}),y\n", "$1=aby$2", null, mapZpptrby)); + + synths.add(new FragmentSynthesis("zpby1=zpby1(.*)", ".*=.*as?by.*", "lda {zpby1}\n", "aby=aby$1", "sta {zpby1}\n", mapZpby)); + synths.add(new FragmentSynthesis("zpsby1=zpsby1(.*)", ".*=.*as?by.*", "lda {zpsby1}\n", "aby=aby$1", "sta {zpsby1}\n", mapZpby)); + + synths.add(new FragmentSynthesis("(.*)=(.*)_derefidx_aby", ".*=.*ys?by.*", "tay\n", "$1=$2_derefidx_yby", null, null)); + synths.add(new FragmentSynthesis("(.*)=(.*)_derefidx_aby", ".*=.*xs?by.*", "tax\n", "$1=$2_derefidx_xby", null, null)); + synths.add(new FragmentSynthesis("(.*)=(.*)_derefidx_zpby1", ".*=.*ys?by.*", "ldy {zpby1}\n", "$1=$2_derefidx_yby", null, mapZpby)); + synths.add(new FragmentSynthesis("(.*)=(.*)_derefidx_zpby1", ".*=.*xs?by.*", "ldx {zpby1}\n", "$1=$2_derefidx_xby", null, mapZpby)); + + synths.add(new FragmentSynthesis("zpby1_(lt|gt|le|ge|eq|neq)_(.*)", ".*as?by.*", "lda {zpby1}\n", "aby_$1_$2", null, mapZpby)); + synths.add(new FragmentSynthesis("zpsby1_(lt|gt|le|ge|eq|neq)_(.*)", ".*as?by.*", "lda {zpsby1}\n", "asby_$1_$2", null, mapZpsby)); + synths.add(new FragmentSynthesis("_deref_cowo1_(lt|gt|le|ge|eq|neq)_(.*)", ".*as?by.*", "lda {cowo1}\n", "aby_$1_$2", null, mapConst)); + synths.add(new FragmentSynthesis("_deref_zpptrby1_(lt|gt|le|ge|eq|neq)_(.*)", ".*=.*as?by.*|.*=.*ys?by.*", "ldy #0\n"+"lda ({zpptrby1}),y\n", "aby_$1_$2", null, mapZpptrby)); + + for (FragmentSynthesis synth : synths) { + CharStream synthesized = synth.synthesize(signature); + if(synthesized!=null) { + return synthesized; } } @@ -269,6 +155,63 @@ public class AsmFragmentManager { } + /** AsmFragment synthesis based on matching fragment signature and reusing another fragment with added prefix/postfix and some bind-mappings*/ + private static class FragmentSynthesis { + + private String sigMatch; + private String sigAvoid; + private String asmPrefix; + private String sigReplace; + private String asmPostfix; + private Map bindMappings; + + public FragmentSynthesis(String sigMatch, String sigAvoid, String asmPrefix, String sigReplace, String asmPostfix, Map bindMappings) { + this.sigMatch = sigMatch; + this.sigAvoid = sigAvoid; + this.asmPrefix = asmPrefix; + this.sigReplace = sigReplace; + this.asmPostfix = asmPostfix; + this.bindMappings = bindMappings; + } + + public CharStream synthesize(String signature) { + if (signature.matches(sigMatch) ) { + if (sigAvoid == null || !signature.matches(sigAvoid)) { + String subSignature = regexpRewriteSignature(signature, sigMatch, sigReplace); + if(bindMappings!=null) { + for (String bound : bindMappings.keySet()) { + subSignature = subSignature.replace(bound, bindMappings.get(bound)); + } + } + CharStream subCharStream = loadOrSynthesizeFragment(subSignature); + if (subCharStream != null) { + StringBuilder newFragment = new StringBuilder(); + if(asmPrefix!=null) { + newFragment.append(asmPrefix); + } + String subFragment = subCharStream.toString(); + if(bindMappings!=null) { + List reverse = new ArrayList<>(bindMappings.keySet()); + Collections.reverse(reverse); + for (String bound : reverse) { + subFragment = subFragment.replace(bindMappings.get(bound), bound); + } + } + newFragment.append(subFragment); + if(asmPostfix!=null) { + newFragment.append("\n"); + newFragment.append(asmPostfix); + } + return CharStreams.fromString(newFragment.toString()); + } + } + } + return null; + } + + } + + private static String regexpRewriteSignature(String signature, String match, String replace) { Pattern p = Pattern.compile(match); Matcher m = p.matcher(signature); diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/aby=aby_bor__deref_zpptrby1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/aby=aby_bor__deref_zpptrby1.asm new file mode 100644 index 000000000..4faff4c29 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/aby=aby_bor__deref_zpptrby1.asm @@ -0,0 +1,2 @@ +ldy #0 +ora ({zpptrby1}),y \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpby1=zpby1_minus_aby.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpby1=zpby1_minus_aby.asm new file mode 100644 index 000000000..398b5c04c --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpby1=zpby1_minus_aby.asm @@ -0,0 +1,5 @@ +sta $ff +lda {zpby1} +sec +sbc $ff +sta {zpby1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpby1=zpby1_ror_1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpby1=zpby1_ror_1.asm new file mode 100644 index 000000000..958760424 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpby1=zpby1_ror_1.asm @@ -0,0 +1 @@ +lsr {zpby1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm index 65db375f5..57f1e5f47 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm @@ -260,9 +260,9 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 + lda plot_bit,x ldy #0 - lda (plotter),y - ora plot_bit,x + ora (plotter),y sta (plotter),y rts } diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log index f414f7838..9f2f2e9ba 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log @@ -16788,8 +16788,7 @@ init_plot_tables: { ldx x sta plot_bit,x //SEG308 [166] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte) 1 [ init_plot_tables::x#2 init_plot_tables::bits#1 ] ( main:0::init_plot_tables:6 [ init_plot_tables::x#2 init_plot_tables::bits#1 ] ) -- zpby1=zpby1_ror_1 - lsr - sta bits + lsr bits //SEG309 [167] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@10 [ init_plot_tables::x#2 ] ( main:0::init_plot_tables:6 [ init_plot_tables::x#2 ] ) -- zpby1_neq_0_then_la1 lda bits bne b10 @@ -17010,31 +17009,6 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ l Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] Statement [109] (byte*) plot::plotter_y#2 ← (byte*) plot::plotter_y#1 lo= (byte~) plot::$3 [ plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] ) always clobbers reg byte a Statement [110] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (byte*) plot::plotter_y#2 [ plot::x#4 plot::plotter#0 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter#0 ] ) always clobbers reg byte a -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte y [ plot::$6 ] -MISSING FRAGMENTS - zpby1=_deref_zpptrby1_bor_aby - zpby1=_deref_zpptrby1_bor_xby - zpby1=_deref_zpptrby1_bor_yby - aby=_deref_zpptrby1_bor_aby - aby=_deref_zpptrby1_bor_xby - aby=_deref_zpptrby1_bor_yby - xby=_deref_zpptrby1_bor_aby - xby=_deref_zpptrby1_bor_xby - xby=_deref_zpptrby1_bor_yby - yby=_deref_zpptrby1_bor_aby - yby=_deref_zpptrby1_bor_xby - yby=_deref_zpptrby1_bor_yby Statement [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] @@ -17101,31 +17075,6 @@ Statement [96] (byte) line_ydxi::e#2 ← (byte) line_ydxi::e#1 - (byte) line_ydx Statement [105] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$1 [ plot::x#4 plot::y#4 plot::plotter_x#2 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::y#4 plot::plotter_x#2 ] ) always clobbers reg byte a Statement [109] (byte*) plot::plotter_y#2 ← (byte*) plot::plotter_y#1 lo= (byte~) plot::$3 [ plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter_x#2 plot::plotter_y#2 ] ) always clobbers reg byte a Statement [110] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (byte*) plot::plotter_y#2 [ plot::x#4 plot::plotter#0 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter#0 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::plotter#0 ] ) always clobbers reg byte a -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [112] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte y [ plot::$6 ] -MISSING FRAGMENTS - zpby1=_deref_zpptrby1_bor_aby - zpby1=_deref_zpptrby1_bor_xby - zpby1=_deref_zpptrby1_bor_yby - aby=_deref_zpptrby1_bor_aby - aby=_deref_zpptrby1_bor_xby - aby=_deref_zpptrby1_bor_yby - xby=_deref_zpptrby1_bor_aby - xby=_deref_zpptrby1_bor_xby - xby=_deref_zpptrby1_bor_yby - yby=_deref_zpptrby1_bor_aby - yby=_deref_zpptrby1_bor_xby - yby=_deref_zpptrby1_bor_yby Statement [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) always clobbers reg byte a reg byte y Statement [113] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] ) always clobbers reg byte y Statement [116] (byte) line_xdyi::e#0 ← (byte) line_xdyi::yd#2 >> (byte) 1 [ line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] ( main:0::lines:7::line:20::line_xdyi:34 [ lines::l#2 line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] main:0::lines:7::line:20::line_xdyi:79 [ lines::l#2 line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] ) always clobbers reg byte a @@ -17235,97 +17184,94 @@ Uplift attempts [init_plot_tables] 10000/138240 (limiting to 10000) Uplifting [init_plot_tables] best 16146 combination reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] zp ZP_PTR_BYTE:32 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ] reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ] reg byte a [ init_plot_tables::$0 ] reg byte a [ init_plot_tables::$7 ] reg byte a [ init_plot_tables::$8 ] reg byte a [ init_plot_tables::$9 ] zp ZP_BYTE:77 [ init_plot_tables::$10 ] zp ZP_BYTE:73 [ init_plot_tables::$6 ] Limited combination testing to 10000 combinations of 138240 possible. Uplift attempts [plot] 10000/46080 (limiting to 10000) -Uplifting [plot] best 15862 combination reg byte y [ plot::y#4 plot::y#1 plot::y#0 plot::y#3 plot::y#2 ] reg byte x [ plot::x#4 plot::x#1 plot::x#0 plot::x#3 plot::x#2 ] reg byte a [ plot::$0 ] reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] reg byte a [ plot::$3 ] zp ZP_PTR_BYTE:63 [ plot::plotter_y#2 ] reg byte alu [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] zp ZP_PTR_BYTE:54 [ plot::plotter_x#1 ] zp ZP_PTR_BYTE:60 [ plot::plotter_y#1 ] zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] zp ZP_PTR_BYTE:57 [ plot::plotter_x#2 ] +Uplifting [plot] best 15861 combination reg byte y [ plot::y#4 plot::y#1 plot::y#0 plot::y#3 plot::y#2 ] reg byte x [ plot::x#4 plot::x#1 plot::x#0 plot::x#3 plot::x#2 ] reg byte a [ plot::$0 ] reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] reg byte a [ plot::$3 ] zp ZP_PTR_BYTE:63 [ plot::plotter_y#2 ] reg byte a [ plot::$5 ] zp ZP_BYTE:68 [ plot::$6 ] zp ZP_PTR_BYTE:54 [ plot::plotter_x#1 ] zp ZP_PTR_BYTE:60 [ plot::plotter_y#1 ] zp ZP_PTR_BYTE:65 [ plot::plotter#0 ] zp ZP_PTR_BYTE:57 [ plot::plotter_x#2 ] Limited combination testing to 10000 combinations of 46080 possible. -Uplifting [line_xdyi] best 15766 combination zp ZP_BYTE:16 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] zp ZP_BYTE:15 [ line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] zp ZP_BYTE:69 [ line_xdyi::$8 ] reg byte x [ line_xdyi::x#3 line_xdyi::x#6 line_xdyi::x#0 line_xdyi::x#1 line_xdyi::x#2 ] zp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] zp ZP_BYTE:12 [ line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] zp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] -Uplifting [line_xdyd] best 15670 combination zp ZP_BYTE:28 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] zp ZP_BYTE:27 [ line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] zp ZP_BYTE:71 [ line_xdyd::$8 ] reg byte x [ line_xdyd::x#3 line_xdyd::x#6 line_xdyd::x#0 line_xdyd::x#1 line_xdyd::x#2 ] zp ZP_BYTE:23 [ line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] zp ZP_BYTE:24 [ line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] zp ZP_BYTE:25 [ line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] -Uplifting [line_ydxi] best 15544 combination zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] reg byte x [ line_ydxi::x#3 line_ydxi::x#5 line_ydxi::x#1 line_ydxi::x#0 line_ydxi::x#6 line_ydxi::x#2 ] reg byte a [ line_ydxi::$8 ] zp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 ] zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 ] -Uplifting [line_ydxd] best 15418 combination zp ZP_BYTE:22 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] reg byte x [ line_ydxd::x#3 line_ydxd::x#5 line_ydxd::x#1 line_ydxd::x#0 line_ydxd::x#6 line_ydxd::x#2 ] reg byte a [ line_ydxd::$8 ] zp ZP_BYTE:21 [ line_ydxd::y#3 line_ydxd::y#6 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#2 ] zp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] zp ZP_BYTE:19 [ line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] -Uplifting [init_screen] best 15418 combination zp ZP_PTR_BYTE:34 [ init_screen::b#2 init_screen::b#1 ] zp ZP_PTR_BYTE:36 [ init_screen::c#2 init_screen::c#1 ] +Uplifting [line_xdyi] best 15765 combination zp ZP_BYTE:16 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] zp ZP_BYTE:15 [ line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] zp ZP_BYTE:69 [ line_xdyi::$8 ] reg byte x [ line_xdyi::x#3 line_xdyi::x#6 line_xdyi::x#0 line_xdyi::x#1 line_xdyi::x#2 ] zp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] zp ZP_BYTE:12 [ line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] zp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] +Uplifting [line_xdyd] best 15669 combination zp ZP_BYTE:28 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] zp ZP_BYTE:27 [ line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] zp ZP_BYTE:71 [ line_xdyd::$8 ] reg byte x [ line_xdyd::x#3 line_xdyd::x#6 line_xdyd::x#0 line_xdyd::x#1 line_xdyd::x#2 ] zp ZP_BYTE:23 [ line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] zp ZP_BYTE:24 [ line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] zp ZP_BYTE:25 [ line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] +Uplifting [line_ydxi] best 15543 combination zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] reg byte x [ line_ydxi::x#3 line_ydxi::x#5 line_ydxi::x#1 line_ydxi::x#0 line_ydxi::x#6 line_ydxi::x#2 ] reg byte a [ line_ydxi::$8 ] zp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 ] zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 ] +Uplifting [line_ydxd] best 15417 combination zp ZP_BYTE:22 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] reg byte x [ line_ydxd::x#3 line_ydxd::x#5 line_ydxd::x#1 line_ydxd::x#0 line_ydxd::x#6 line_ydxd::x#2 ] reg byte a [ line_ydxd::$8 ] zp ZP_BYTE:21 [ line_ydxd::y#3 line_ydxd::y#6 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#2 ] zp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] zp ZP_BYTE:19 [ line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] +Uplifting [init_screen] best 15417 combination zp ZP_PTR_BYTE:34 [ init_screen::b#2 init_screen::b#1 ] zp ZP_PTR_BYTE:36 [ init_screen::c#2 init_screen::c#1 ] Uplift attempts [line] 10000/186624 (limiting to 10000) -Uplifting [line] best 15098 combination zp ZP_BYTE:45 [ line::y1#0 ] reg byte y [ line::y0#0 ] zp ZP_BYTE:43 [ line::x1#0 ] zp ZP_BYTE:42 [ line::x0#0 ] zp ZP_BYTE:47 [ line::yd#1 ] zp ZP_BYTE:48 [ line::yd#0 ] zp ZP_BYTE:50 [ line::yd#3 ] zp ZP_BYTE:51 [ line::yd#10 ] zp ZP_BYTE:46 [ line::xd#1 ] zp ZP_BYTE:49 [ line::xd#0 ] +Uplifting [line] best 15097 combination zp ZP_BYTE:45 [ line::y1#0 ] reg byte y [ line::y0#0 ] zp ZP_BYTE:43 [ line::x1#0 ] zp ZP_BYTE:42 [ line::x0#0 ] zp ZP_BYTE:47 [ line::yd#1 ] zp ZP_BYTE:48 [ line::yd#0 ] zp ZP_BYTE:50 [ line::yd#3 ] zp ZP_BYTE:51 [ line::yd#10 ] zp ZP_BYTE:46 [ line::xd#1 ] zp ZP_BYTE:49 [ line::xd#0 ] Limited combination testing to 10000 combinations of 186624 possible. -Uplifting [main] best 15098 combination -Uplifting [] best 15098 combination +Uplifting [main] best 15097 combination +Uplifting [] best 15097 combination MISSING FRAGMENTS - zpby1=_deref_zpptrby1_bor_aby - zpby1=_deref_zpptrby1_bor_xby - zpby1=_deref_zpptrby1_bor_yby zpby1=_deref_zpptrby1_bor_cowo1_derefidx_yby Attempting to uplift remaining variables inzp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] -Uplifting [lines] best 15098 combination zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] +Uplifting [lines] best 15097 combination zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] -Uplifting [line_ydxi] best 15098 combination zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] +Uplifting [line_ydxi] best 15097 combination zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:16 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] -Uplifting [line_xdyi] best 15098 combination zp ZP_BYTE:16 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] +Uplifting [line_xdyi] best 15097 combination zp ZP_BYTE:16 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:22 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] -Uplifting [line_ydxd] best 15098 combination zp ZP_BYTE:22 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] +Uplifting [line_ydxd] best 15097 combination zp ZP_BYTE:22 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:28 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] -Uplifting [line_xdyd] best 15098 combination zp ZP_BYTE:28 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] +Uplifting [line_xdyd] best 15097 combination zp ZP_BYTE:28 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:39 [ lines::$2 ] -Uplifting [lines] best 15098 combination zp ZP_BYTE:39 [ lines::$2 ] +Uplifting [lines] best 15097 combination zp ZP_BYTE:39 [ lines::$2 ] Attempting to uplift remaining variables inzp ZP_BYTE:40 [ lines::$3 ] -Uplifting [lines] best 15098 combination zp ZP_BYTE:40 [ lines::$3 ] +Uplifting [lines] best 15097 combination zp ZP_BYTE:40 [ lines::$3 ] Attempting to uplift remaining variables inzp ZP_BYTE:15 [ line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] -Uplifting [line_xdyi] best 15098 combination zp ZP_BYTE:15 [ line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] +Uplifting [line_xdyi] best 15097 combination zp ZP_BYTE:15 [ line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:27 [ line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] -Uplifting [line_xdyd] best 15098 combination zp ZP_BYTE:27 [ line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] +Uplifting [line_xdyd] best 15097 combination zp ZP_BYTE:27 [ line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:69 [ line_xdyi::$8 ] -Uplifting [line_xdyi] best 15098 combination zp ZP_BYTE:69 [ line_xdyi::$8 ] +Uplifting [line_xdyi] best 15097 combination zp ZP_BYTE:69 [ line_xdyi::$8 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ line_xdyd::$8 ] -Uplifting [line_xdyd] best 15098 combination zp ZP_BYTE:71 [ line_xdyd::$8 ] +Uplifting [line_xdyd] best 15097 combination zp ZP_BYTE:71 [ line_xdyd::$8 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ init_plot_tables::$10 ] -Uplifting [init_plot_tables] best 15038 combination reg byte a [ init_plot_tables::$10 ] +Uplifting [init_plot_tables] best 15037 combination reg byte a [ init_plot_tables::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] -Uplifting [line_ydxi] best 15038 combination zp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] +Uplifting [line_ydxi] best 15037 combination zp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ line_ydxd::y#3 line_ydxd::y#6 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#2 ] -Uplifting [line_ydxd] best 15038 combination zp ZP_BYTE:21 [ line_ydxd::y#3 line_ydxd::y#6 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#2 ] +Uplifting [line_ydxd] best 15037 combination zp ZP_BYTE:21 [ line_ydxd::y#3 line_ydxd::y#6 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ init_plot_tables::$6 ] -Uplifting [init_plot_tables] best 15038 combination zp ZP_BYTE:73 [ init_plot_tables::$6 ] +Uplifting [init_plot_tables] best 15037 combination zp ZP_BYTE:73 [ init_plot_tables::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] -Uplifting [line_ydxi] best 15038 combination zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] +Uplifting [line_ydxi] best 15037 combination zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] -Uplifting [line_xdyi] best 15038 combination zp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] +Uplifting [line_xdyi] best 15037 combination zp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] -Uplifting [line_ydxd] best 15038 combination zp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] +Uplifting [line_ydxd] best 15037 combination zp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:23 [ line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] -Uplifting [line_xdyd] best 15038 combination zp ZP_BYTE:23 [ line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] +Uplifting [line_xdyd] best 15037 combination zp ZP_BYTE:23 [ line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:45 [ line::y1#0 ] -Uplifting [line] best 15038 combination zp ZP_BYTE:45 [ line::y1#0 ] +Uplifting [line] best 15037 combination zp ZP_BYTE:45 [ line::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 ] -Uplifting [line_ydxi] best 15038 combination zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 ] +Uplifting [line_ydxi] best 15037 combination zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] -Uplifting [line_xdyi] best 15038 combination zp ZP_BYTE:12 [ line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] +Uplifting [line_xdyi] best 15037 combination zp ZP_BYTE:12 [ line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] -Uplifting [line_ydxd] best 15038 combination zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] +Uplifting [line_ydxd] best 15037 combination zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:24 [ line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] -Uplifting [line_xdyd] best 15038 combination zp ZP_BYTE:24 [ line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] +Uplifting [line_xdyd] best 15037 combination zp ZP_BYTE:24 [ line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:43 [ line::x1#0 ] -Uplifting [line] best 15038 combination zp ZP_BYTE:43 [ line::x1#0 ] +Uplifting [line] best 15037 combination zp ZP_BYTE:43 [ line::x1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:42 [ line::x0#0 ] -Uplifting [line] best 15038 combination zp ZP_BYTE:42 [ line::x0#0 ] +Uplifting [line] best 15037 combination zp ZP_BYTE:42 [ line::x0#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:68 [ plot::$6 ] -Uplifting [plot] best 15032 combination reg byte a [ plot::$6 ] +Uplifting [plot] best 15031 combination reg byte a [ plot::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 ] -Uplifting [line_ydxi] best 15032 combination zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 ] +Uplifting [line_ydxi] best 15031 combination zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] -Uplifting [line_xdyi] best 15032 combination zp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] +Uplifting [line_xdyi] best 15031 combination zp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] -Uplifting [line_ydxd] best 15032 combination zp ZP_BYTE:19 [ line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] +Uplifting [line_ydxd] best 15031 combination zp ZP_BYTE:19 [ line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:25 [ line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] -Uplifting [line_xdyd] best 15032 combination zp ZP_BYTE:25 [ line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] +Uplifting [line_xdyd] best 15031 combination zp ZP_BYTE:25 [ line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:47 [ line::yd#1 ] -Uplifting [line] best 15032 combination zp ZP_BYTE:47 [ line::yd#1 ] +Uplifting [line] best 15031 combination zp ZP_BYTE:47 [ line::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:48 [ line::yd#0 ] -Uplifting [line] best 15032 combination zp ZP_BYTE:48 [ line::yd#0 ] +Uplifting [line] best 15031 combination zp ZP_BYTE:48 [ line::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:50 [ line::yd#3 ] -Uplifting [line] best 15032 combination zp ZP_BYTE:50 [ line::yd#3 ] +Uplifting [line] best 15031 combination zp ZP_BYTE:50 [ line::yd#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:51 [ line::yd#10 ] -Uplifting [line] best 15032 combination zp ZP_BYTE:51 [ line::yd#10 ] +Uplifting [line] best 15031 combination zp ZP_BYTE:51 [ line::yd#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:46 [ line::xd#1 ] -Uplifting [line] best 15032 combination zp ZP_BYTE:46 [ line::xd#1 ] +Uplifting [line] best 15031 combination zp ZP_BYTE:46 [ line::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:49 [ line::xd#0 ] -Uplifting [line] best 15032 combination zp ZP_BYTE:49 [ line::xd#0 ] +Uplifting [line] best 15031 combination zp ZP_BYTE:49 [ line::xd#0 ] Coalescing zero page register [ zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] ] with [ zp ZP_BYTE:73 [ init_plot_tables::$6 ] ] Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] ] with [ zp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] ] Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] ] with [ zp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] ] @@ -17929,12 +17875,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) - // [111] plot::$5 ← plot_bit#0 *idx plot::x#4 // ALU - //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_cowo1_derefidx_xby + //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_xby + lda plot_bit,x + //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora plot_bit,x + ora (plotter),y //SEG209 [113] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] ) -- _deref_zpptrby1=aby ldy #0 sta (plotter),y @@ -18860,12 +18805,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) - // [111] plot::$5 ← plot_bit#0 *idx plot::x#4 // ALU - //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_cowo1_derefidx_xby + //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_xby + lda plot_bit,x + //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora plot_bit,x + ora (plotter),y //SEG209 [113] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG210 plot::@return @@ -19815,12 +19759,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) - // [111] plot::$5 ← plot_bit#0 *idx plot::x#4 // ALU - //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_cowo1_derefidx_xby + //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_xby + lda plot_bit,x + //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora plot_bit,x + ora (plotter),y //SEG209 [113] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG210 plot::@return @@ -20729,12 +20672,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) - // [111] plot::$5 ← plot_bit#0 *idx plot::x#4 // ALU - //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_cowo1_derefidx_xby + //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_xby + lda plot_bit,x + //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora plot_bit,x + ora (plotter),y //SEG209 [113] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG210 plot::@return @@ -21577,12 +21519,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) - // [111] plot::$5 ← plot_bit#0 *idx plot::x#4 // ALU - //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_cowo1_derefidx_xby + //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_xby + lda plot_bit,x + //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora plot_bit,x + ora (plotter),y //SEG209 [113] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG210 plot::@return @@ -22226,7 +22167,7 @@ FINAL SYMBOL TABLE (byte~) plot::$1 reg byte a 4.0 (byte~) plot::$2 reg byte a 4.0 (byte~) plot::$3 reg byte a 4.0 -(byte~) plot::$5 reg byte alu 4.0 +(byte~) plot::$5 reg byte a 4.0 (byte~) plot::$6 reg byte a 4.0 (label) plot::@return (byte*) plot::plotter @@ -22286,7 +22227,7 @@ reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] zp ZP_PTR_BYTE:11 [ plot::plotter_y#1 plot::plotter_y#2 ] reg byte a [ plot::$3 ] -reg byte alu [ plot::$5 ] +reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] reg byte a [ line_ydxd::$8 ] reg byte a [ init_plot_tables::$0 ] @@ -22769,12 +22710,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) - // [111] plot::$5 ← plot_bit#0 *idx plot::x#4 // ALU - //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_cowo1_derefidx_xby + //SEG207 [111] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#4 [ plot::plotter#0 plot::$5 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_xby + lda plot_bit,x + //SEG208 [112] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora plot_bit,x + ora (plotter),y //SEG209 [113] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::lines:7::line:20::line_ydxi:41::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_ydxi:85::plot:91 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 ] main:0::lines:7::line:20::line_xdyi:34::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_xdyi:79::plot:120 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 ] main:0::lines:7::line:20::line_ydxd:55::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_ydxd:71::plot:135 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#3 line_ydxd::e#3 ] main:0::lines:7::line:20::line_xdyd:49::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] main:0::lines:7::line:20::line_xdyd:65::plot:150 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG210 plot::@return diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.sym b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.sym index a9ae824c1..a94d1e4b1 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.sym +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.sym @@ -282,7 +282,7 @@ (byte~) plot::$1 reg byte a 4.0 (byte~) plot::$2 reg byte a 4.0 (byte~) plot::$3 reg byte a 4.0 -(byte~) plot::$5 reg byte alu 4.0 +(byte~) plot::$5 reg byte a 4.0 (byte~) plot::$6 reg byte a 4.0 (label) plot::@return (byte*) plot::plotter @@ -342,7 +342,7 @@ reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] zp ZP_PTR_BYTE:11 [ plot::plotter_y#1 plot::plotter_y#2 ] reg byte a [ plot::$3 ] -reg byte alu [ plot::$5 ] +reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] reg byte a [ line_ydxd::$8 ] reg byte a [ init_plot_tables::$0 ] diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.asm b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.asm index 806ecc276..2098d96a1 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.asm +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.asm @@ -65,7 +65,6 @@ plots: { rts } plot: { - .label _5 = 7 .label plotter_x = 3 .label plotter_y = 5 .label plotter = 3 @@ -89,10 +88,8 @@ plot: { adc plotter_y+1 sta plotter+1 lda plot_bit,y - sta _5 ldy #0 - lda (plotter),y - ora _5 + ora (plotter),y sta (plotter),y rts } diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log index f843e70d3..917e3259c 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log @@ -6180,8 +6180,7 @@ init_plot_tables: { ldx x sta plot_bit,x //SEG70 [42] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte) 1 [ init_plot_tables::x#2 init_plot_tables::bits#1 ] ( main:0::init_plot_tables:6 [ init_plot_tables::x#2 init_plot_tables::bits#1 ] ) -- zpby1=zpby1_ror_1 - lsr - sta bits + lsr bits //SEG71 [43] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@10 [ init_plot_tables::x#2 ] ( main:0::init_plot_tables:6 [ init_plot_tables::x#2 ] ) -- zpby1_neq_0_then_la1 lda bits bne b10 @@ -6366,31 +6365,6 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ p Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ plot::y#0 ] Statement [30] (byte*) plot::plotter_y#2 ← (byte*) plot::plotter_y#1 lo= (byte~) plot::$3 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ) always clobbers reg byte a Statement [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (byte*) plot::plotter_y#2 [ plot::x#0 plot::plotter#0 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::x#0 plot::plotter#0 ] ) always clobbers reg byte a -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte y [ plot::$6 ] -MISSING FRAGMENTS - zpby1=_deref_zpptrby1_bor_aby - zpby1=_deref_zpptrby1_bor_xby - zpby1=_deref_zpptrby1_bor_yby - aby=_deref_zpptrby1_bor_aby - aby=_deref_zpptrby1_bor_xby - aby=_deref_zpptrby1_bor_yby - xby=_deref_zpptrby1_bor_aby - xby=_deref_zpptrby1_bor_xby - xby=_deref_zpptrby1_bor_yby - yby=_deref_zpptrby1_bor_aby - yby=_deref_zpptrby1_bor_xby - yby=_deref_zpptrby1_bor_yby Statement [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ plots::i#2 plots::i#1 ] Statement [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) always clobbers reg byte y @@ -6416,31 +6390,6 @@ Statement [7] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@2 [ ] ( main Statement [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::plotter_x#2 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::x#0 plot::y#0 plot::plotter_x#2 ] ) always clobbers reg byte a Statement [30] (byte*) plot::plotter_y#2 ← (byte*) plot::plotter_y#1 lo= (byte~) plot::$3 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ) always clobbers reg byte a Statement [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (byte*) plot::plotter_y#2 [ plot::x#0 plot::plotter#0 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::x#0 plot::plotter#0 ] ) always clobbers reg byte a -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment zpby1=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment aby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte a [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment xby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte x [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_aby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte a [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_xby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte x [ plot::$5 ] reg byte y [ plot::$6 ] -Potential register analysis [33] plot::$6 ← *(plot::plotter#0) | plot::$5 missing fragment yby=_deref_zpptrby1_bor_yby allocation: zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] reg byte y [ plot::$5 ] reg byte y [ plot::$6 ] -MISSING FRAGMENTS - zpby1=_deref_zpptrby1_bor_aby - zpby1=_deref_zpptrby1_bor_xby - zpby1=_deref_zpptrby1_bor_yby - aby=_deref_zpptrby1_bor_aby - aby=_deref_zpptrby1_bor_xby - aby=_deref_zpptrby1_bor_yby - xby=_deref_zpptrby1_bor_aby - xby=_deref_zpptrby1_bor_xby - xby=_deref_zpptrby1_bor_yby - yby=_deref_zpptrby1_bor_aby - yby=_deref_zpptrby1_bor_xby - yby=_deref_zpptrby1_bor_yby Statement [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) always clobbers reg byte a reg byte y Statement [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) always clobbers reg byte y Statement [38] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) 248 [ init_plot_tables::x#2 init_plot_tables::bits#3 init_plot_tables::$0 ] ( main:0::init_plot_tables:6 [ init_plot_tables::x#2 init_plot_tables::bits#3 init_plot_tables::$0 ] ) always clobbers reg byte a @@ -6497,30 +6446,20 @@ Uplifting [init_plot_tables] best 10043 combination reg byte y [ init_plot_table Limited combination testing to 10000 combinations of 138240 possible. Uplifting [init_screen] best 10043 combination zp ZP_PTR_BYTE:8 [ init_screen::b#2 init_screen::b#1 ] zp ZP_PTR_BYTE:10 [ init_screen::c#2 init_screen::c#1 ] Uplift attempts [plot] 10000/46080 (limiting to 10000) -Uplifting [plot] best 9604 combination reg byte x [ plot::y#0 ] reg byte y [ plot::x#0 ] reg byte a [ plot::$0 ] reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] reg byte a [ plot::$3 ] zp ZP_PTR_BYTE:26 [ plot::plotter_y#2 ] zp ZP_BYTE:30 [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] zp ZP_PTR_BYTE:17 [ plot::plotter_x#1 ] zp ZP_PTR_BYTE:23 [ plot::plotter_y#1 ] zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] zp ZP_PTR_BYTE:20 [ plot::plotter_x#2 ] +Uplifting [plot] best 9598 combination reg byte x [ plot::y#0 ] reg byte y [ plot::x#0 ] reg byte a [ plot::$0 ] reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] reg byte a [ plot::$3 ] zp ZP_PTR_BYTE:26 [ plot::plotter_y#2 ] reg byte a [ plot::$5 ] zp ZP_BYTE:31 [ plot::$6 ] zp ZP_PTR_BYTE:17 [ plot::plotter_x#1 ] zp ZP_PTR_BYTE:23 [ plot::plotter_y#1 ] zp ZP_PTR_BYTE:28 [ plot::plotter#0 ] zp ZP_PTR_BYTE:20 [ plot::plotter_x#2 ] Limited combination testing to 10000 combinations of 46080 possible. -Uplifting [main] best 9604 combination -Uplifting [] best 9604 combination +Uplifting [main] best 9598 combination +Uplifting [] best 9598 combination MISSING FRAGMENTS - zpby1=_deref_zpptrby1_bor_aby - zpby1=_deref_zpptrby1_bor_xby - zpby1=_deref_zpptrby1_bor_yby zpby1=_deref_zpptrby1_bor_cowo1_derefidx_yby Attempting to uplift remaining variables inzp ZP_BYTE:2 [ plots::i#2 plots::i#1 ] -Uplifting [plots] best 9604 combination zp ZP_BYTE:2 [ plots::i#2 plots::i#1 ] +Uplifting [plots] best 9598 combination zp ZP_BYTE:2 [ plots::i#2 plots::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:37 [ init_plot_tables::$10 ] -Uplifting [init_plot_tables] best 9544 combination reg byte a [ init_plot_tables::$10 ] +Uplifting [init_plot_tables] best 9538 combination reg byte a [ init_plot_tables::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ init_plot_tables::$6 ] -Uplifting [init_plot_tables] best 9544 combination zp ZP_BYTE:33 [ init_plot_tables::$6 ] -Attempting to uplift remaining variables inzp ZP_BYTE:30 [ plot::$5 ] -Uplifting [plot] best 9544 combination zp ZP_BYTE:30 [ plot::$5 ] +Uplifting [init_plot_tables] best 9538 combination zp ZP_BYTE:33 [ init_plot_tables::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:31 [ plot::$6 ] -Uplifting [plot] best 9538 combination reg byte a [ plot::$6 ] -MISSING FRAGMENTS - zpby1=_deref_zpptrby1_bor_aby - zpby1=_deref_zpptrby1_bor_xby - zpby1=_deref_zpptrby1_bor_yby - zpby1=_deref_zpptrby1_bor_cowo1_derefidx_yby +Uplifting [plot] best 9532 combination reg byte a [ plot::$6 ] Coalescing zero page register [ zp ZP_BYTE:2 [ plots::i#2 plots::i#1 ] ] with [ zp ZP_BYTE:33 [ init_plot_tables::$6 ] ] Coalescing zero page register [ zp ZP_PTR_BYTE:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] ] with [ zp ZP_PTR_BYTE:8 [ init_screen::b#2 init_screen::b#1 ] ] Coalescing zero page register [ zp ZP_PTR_BYTE:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 ] ] with [ zp ZP_PTR_BYTE:10 [ init_screen::c#2 init_screen::c#1 ] ] @@ -6530,7 +6469,6 @@ Coalescing zero page register [ zp ZP_PTR_BYTE:6 [ init_plot_tables::yoffs#2 ini Coalescing zero page register [ zp ZP_PTR_BYTE:23 [ plot::plotter_y#1 ] ] with [ zp ZP_PTR_BYTE:26 [ plot::plotter_y#2 ] ] Allocated (was zp ZP_PTR_BYTE:6) zp ZP_PTR_BYTE:3 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ] Allocated (was zp ZP_PTR_BYTE:23) zp ZP_PTR_BYTE:5 [ plot::plotter_y#1 plot::plotter_y#2 ] -Allocated (was zp ZP_BYTE:30) zp ZP_BYTE:7 [ plot::$5 ] Removing instruction jmp b5 Removing instruction jmp bend Removing instruction jmp b5 @@ -6681,7 +6619,6 @@ plots: { } //SEG43 plot plot: { - .label _5 = 7 .label plotter_x = 3 .label plotter_y = 5 .label plotter = 3 @@ -6713,13 +6650,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- zpby1=cowo1_derefidx_yby + //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_yby lda plot_bit,y - sta _5 - //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_zpby1 + //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora _5 + ora (plotter),y //SEG55 [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) -- _deref_zpptrby1=aby ldy #0 sta (plotter),y @@ -7044,7 +6979,6 @@ plots: { } //SEG43 plot plot: { - .label _5 = 7 .label plotter_x = 3 .label plotter_y = 5 .label plotter = 3 @@ -7076,13 +7010,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- zpby1=cowo1_derefidx_yby + //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_yby lda plot_bit,y - sta _5 - //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_zpby1 + //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora _5 + ora (plotter),y //SEG55 [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG56 plot::@return @@ -7415,7 +7347,6 @@ plots: { } //SEG43 plot plot: { - .label _5 = 7 .label plotter_x = 3 .label plotter_y = 5 .label plotter = 3 @@ -7447,13 +7378,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- zpby1=cowo1_derefidx_yby + //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_yby lda plot_bit,y - sta _5 - //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_zpby1 + //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora _5 + ora (plotter),y //SEG55 [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG56 plot::@return @@ -7770,7 +7699,6 @@ plots: { } //SEG43 plot plot: { - .label _5 = 7 .label plotter_x = 3 .label plotter_y = 5 .label plotter = 3 @@ -7802,13 +7730,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- zpby1=cowo1_derefidx_yby + //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_yby lda plot_bit,y - sta _5 - //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_zpby1 + //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora _5 + ora (plotter),y //SEG55 [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG56 plot::@return @@ -8100,7 +8026,6 @@ plots: { } //SEG43 plot plot: { - .label _5 = 7 .label plotter_x = 3 .label plotter_y = 5 .label plotter = 3 @@ -8132,13 +8057,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- zpby1=cowo1_derefidx_yby + //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_yby lda plot_bit,y - sta _5 - //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_zpby1 + //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora _5 + ora (plotter),y //SEG55 [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG56 plot::@return @@ -8392,7 +8315,7 @@ FINAL SYMBOL TABLE (byte~) plot::$1 reg byte a 4.0 (byte~) plot::$2 reg byte a 4.0 (byte~) plot::$3 reg byte a 4.0 -(byte~) plot::$5 $5 zp ZP_BYTE:7 4.0 +(byte~) plot::$5 reg byte a 4.0 (byte~) plot::$6 reg byte a 4.0 (label) plot::@return (byte*) plot::plotter @@ -8447,7 +8370,7 @@ reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] zp ZP_PTR_BYTE:5 [ plot::plotter_y#1 plot::plotter_y#2 ] reg byte a [ plot::$3 ] -zp ZP_BYTE:7 [ plot::$5 ] +reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] reg byte a [ init_plot_tables::$0 ] reg byte a [ init_plot_tables::$7 ] @@ -8568,7 +8491,6 @@ plots: { } //SEG43 plot plot: { - .label _5 = 7 .label plotter_x = 3 .label plotter_y = 5 .label plotter = 3 @@ -8600,13 +8522,11 @@ plot: { lda plotter+1 adc plotter_y+1 sta plotter+1 - //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- zpby1=cowo1_derefidx_yby + //SEG53 [32] (byte~) plot::$5 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$5 ] ) -- aby=cowo1_derefidx_yby lda plot_bit,y - sta _5 - //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_zpby1 + //SEG54 [33] (byte~) plot::$6 ← *((byte*) plot::plotter#0) | (byte~) plot::$5 [ plot::plotter#0 plot::$6 ] ( main:0::plots:9::plot:19 [ plots::i#2 plot::plotter#0 plot::$6 ] ) -- aby=_deref_zpptrby1_bor_aby ldy #0 - lda (plotter),y - ora _5 + ora (plotter),y //SEG55 [34] *((byte*) plot::plotter#0) ← (byte~) plot::$6 [ ] ( main:0::plots:9::plot:19 [ plots::i#2 ] ) -- _deref_zpptrby1=aby sta (plotter),y //SEG56 plot::@return diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.sym b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.sym index e1d0ef2eb..e652f70e9 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.sym +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.sym @@ -82,7 +82,7 @@ (byte~) plot::$1 reg byte a 4.0 (byte~) plot::$2 reg byte a 4.0 (byte~) plot::$3 reg byte a 4.0 -(byte~) plot::$5 $5 zp ZP_BYTE:7 4.0 +(byte~) plot::$5 reg byte a 4.0 (byte~) plot::$6 reg byte a 4.0 (label) plot::@return (byte*) plot::plotter @@ -137,7 +137,7 @@ reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] zp ZP_PTR_BYTE:5 [ plot::plotter_y#1 plot::plotter_y#2 ] reg byte a [ plot::$3 ] -zp ZP_BYTE:7 [ plot::$5 ] +reg byte a [ plot::$5 ] reg byte a [ plot::$6 ] reg byte a [ init_plot_tables::$0 ] reg byte a [ init_plot_tables::$7 ] diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bresenham.asm b/src/main/java/dk/camelot64/kickc/test/ref/bresenham.asm index eb69c2574..4ad715264 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bresenham.asm +++ b/src/main/java/dk/camelot64/kickc/test/ref/bresenham.asm @@ -9,14 +9,13 @@ main: { .const y1 = $18 .const xd = x1-4 .const yd = y1-4 + .label x = 4 .label cursor = 2 - .label e = 4 .label y = 5 lda #4 sta y - lda #yd/2 - sta e - ldx #4 + ldx #yd/2 + sta x lda #SCREEN+4*$28+4 @@ -25,18 +24,17 @@ main: { ldy #0 lda #STAR sta (cursor),y - inx + inc x inc cursor bne !+ inc cursor+1 !: - lda e + txa clc adc #yd - sta e - lda #xd - cmp e - bcs b2 + tax + cpx #xd + bcc b2 inc y lda cursor clc @@ -45,11 +43,13 @@ main: { bcc !+ inc cursor+1 !: + txa sec sbc #xd - sta e + tax b2: - cpx #x1+1 + lda x + cmp #x1+1 bcc b1 rts } diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bresenham.log b/src/main/java/dk/camelot64/kickc/test/ref/bresenham.log index d2bfd3803..761b55d18 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bresenham.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/bresenham.log @@ -1647,6 +1647,7 @@ main: { inc cursor+1 !: //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- zpby1=zpby1_minus_coby1 + lda e sec sbc #xd sta e @@ -1694,13 +1695,12 @@ REGISTER UPLIFT SCOPES Uplift Scope [main] 55: zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ] 46.75: zp ZP_PTR_BYTE:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ] 29.33: zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ] 14.67: zp ZP_BYTE:4 [ main::x#2 main::x#1 ] Uplift Scope [] -Uplifting [main] best 1175 combination zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ] zp ZP_PTR_BYTE:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ] zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ] reg byte x [ main::x#2 main::x#1 ] -Uplifting [] best 1175 combination -Attempting to uplift remaining variables inzp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ] -Uplifting [main] best 1175 combination zp ZP_BYTE:5 [ main::e#3 main::e#5 main::e#1 main::e#2 ] +Uplifting [main] best 1195 combination reg byte x [ main::e#3 main::e#5 main::e#1 main::e#2 ] zp ZP_PTR_BYTE:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ] zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ] zp ZP_BYTE:4 [ main::x#2 main::x#1 ] +Uplifting [] best 1195 combination Attempting to uplift remaining variables inzp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ] -Uplifting [main] best 1175 combination zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ] -Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ main::e#3 main::e#5 main::e#1 main::e#2 ] +Uplifting [main] best 1195 combination zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::x#2 main::x#1 ] +Uplifting [main] best 1195 combination zp ZP_BYTE:4 [ main::x#2 main::x#1 ] Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:5 [ main::y#2 main::y#4 main::y#1 ] Removing instruction jmp b1 Removing instruction jmp bend @@ -1733,19 +1733,19 @@ main: { .const y1 = $18 .const xd = x1-4 .const yd = y1-4 + .label x = 4 .label cursor = 2 - .label e = 4 .label y = 5 //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] b1_from_main: //SEG9 [2] phi (byte) main::y#2 = (byte) 4 [phi:main->main::@1#0] -- zpby1=coby1 lda #4 sta y - //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- zpby1=coby1 - lda #yd/2 - sta e - //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- xby=coby1 - ldx #4 + //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- xby=coby1 + ldx #yd/2 + //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- zpby1=coby1 + lda #4 + sta x //SEG12 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 [phi:main->main::@1#3] -- zpptrby1=cowo1 lda #=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_zpby1_then_la1 - lda #xd - cmp e - bcs b2_from_b1 + tax + //SEG23 [7] if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_xby_then_la1 + cpx #xd + bcc b2_from_b1 //SEG24 main::@3 b3: //SEG25 [8] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ( main:0 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ) -- zpby1=zpby1_plus_1 @@ -1792,10 +1791,11 @@ main: { bcc !+ inc cursor+1 !: - //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- zpby1=zpby1_minus_coby1 + //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- xby=xby_minus_coby1 + txa sec sbc #xd - sta e + tax //SEG28 [11] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] b2_from_b1: b2_from_b3: @@ -1804,8 +1804,115 @@ main: { //SEG31 [11] phi (byte*) main::cursor#5 = (byte*) main::cursor#1 [phi:main::@1/main::@3->main::@2#2] -- register_copy //SEG32 main::@2 b2: - //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- xby_lt_coby1_then_la1 - cpx #x1+1 + //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- zpby1_lt_coby1_then_la1 + lda x + cmp #x1+1 + bcc b1_from_b2 + //SEG34 main::@return + breturn: + //SEG35 [13] return [ ] ( main:0 [ ] ) + rts +} + +Removing instruction lda #4 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +ASSEMBLER +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .const STAR = $51 + .const SCREEN = $400 +//SEG2 @begin +bbegin: +//SEG3 @1 +b1: +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG6 @end +bend: +//SEG7 main +main: { + .const x1 = $27 + .const y1 = $18 + .const xd = x1-4 + .const yd = y1-4 + .label x = 4 + .label cursor = 2 + .label y = 5 + //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG9 [2] phi (byte) main::y#2 = (byte) 4 [phi:main->main::@1#0] -- zpby1=coby1 + lda #4 + sta y + //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- xby=coby1 + ldx #yd/2 + //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- zpby1=coby1 + sta x + //SEG12 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 [phi:main->main::@1#3] -- zpptrby1=cowo1 + lda #SCREEN+4*$28+4 + sta cursor+1 + jmp b1 + //SEG13 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + b1_from_b2: + //SEG14 [2] phi (byte) main::y#2 = (byte) main::y#4 [phi:main::@2->main::@1#0] -- register_copy + //SEG15 [2] phi (byte) main::e#3 = (byte) main::e#5 [phi:main::@2->main::@1#1] -- register_copy + //SEG16 [2] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@2->main::@1#2] -- register_copy + //SEG17 [2] phi (byte*) main::cursor#3 = (byte*) main::cursor#5 [phi:main::@2->main::@1#3] -- register_copy + //SEG18 main::@1 + b1: + //SEG19 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ( main:0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #STAR + sta (cursor),y + //SEG20 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] ( main:0 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] ) -- zpby1=zpby1_plus_1 + inc x + //SEG21 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] ( main:0 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] ) -- zpptrby1=zpptrby1_plus_1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG22 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- xby=xby_plus_coby1 + txa + clc + adc #yd + tax + //SEG23 [7] if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_xby_then_la1 + cpx #xd + bcc b2_from_b1 + //SEG24 main::@3 + b3: + //SEG25 [8] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ( main:0 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ) -- zpby1=zpby1_plus_1 + inc y + //SEG26 [9] (byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40 [ main::x#1 main::e#1 main::y#1 main::cursor#2 ] ( main:0 [ main::x#1 main::e#1 main::y#1 main::cursor#2 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda cursor + clc + adc #$28 + sta cursor + bcc !+ + inc cursor+1 + !: + //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- xby=xby_minus_coby1 + txa + sec + sbc #xd + tax + //SEG28 [11] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] + b2_from_b1: + b2_from_b3: + //SEG29 [11] phi (byte) main::y#4 = (byte) main::y#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy + //SEG30 [11] phi (byte) main::e#5 = (byte) main::e#1 [phi:main::@1/main::@3->main::@2#1] -- register_copy + //SEG31 [11] phi (byte*) main::cursor#5 = (byte*) main::cursor#1 [phi:main::@1/main::@3->main::@2#2] -- register_copy + //SEG32 main::@2 + b2: + //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- zpby1_lt_coby1_then_la1 + lda x + cmp #x1+1 bcc b1_from_b2 //SEG34 main::@return breturn: @@ -1843,19 +1950,18 @@ main: { .const y1 = $18 .const xd = x1-4 .const yd = y1-4 + .label x = 4 .label cursor = 2 - .label e = 4 .label y = 5 //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] b1_from_main: //SEG9 [2] phi (byte) main::y#2 = (byte) 4 [phi:main->main::@1#0] -- zpby1=coby1 lda #4 sta y - //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- zpby1=coby1 - lda #yd/2 - sta e - //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- xby=coby1 - ldx #4 + //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- xby=coby1 + ldx #yd/2 + //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- zpby1=coby1 + sta x //SEG12 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 [phi:main->main::@1#3] -- zpptrby1=cowo1 lda #=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_zpby1_then_la1 - lda #xd - cmp e - bcs b2 + tax + //SEG23 [7] if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_xby_then_la1 + cpx #xd + bcc b2 //SEG24 main::@3 b3: //SEG25 [8] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ( main:0 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ) -- zpby1=zpby1_plus_1 @@ -1901,18 +2006,20 @@ main: { bcc !+ inc cursor+1 !: - //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- zpby1=zpby1_minus_coby1 + //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- xby=xby_minus_coby1 + txa sec sbc #xd - sta e + tax //SEG28 [11] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] //SEG29 [11] phi (byte) main::y#4 = (byte) main::y#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy //SEG30 [11] phi (byte) main::e#5 = (byte) main::e#1 [phi:main::@1/main::@3->main::@2#1] -- register_copy //SEG31 [11] phi (byte*) main::cursor#5 = (byte*) main::cursor#1 [phi:main::@1/main::@3->main::@2#2] -- register_copy //SEG32 main::@2 b2: - //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- xby_lt_coby1_then_la1 - cpx #x1+1 + //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- zpby1_lt_coby1_then_la1 + lda x + cmp #x1+1 bcc b1 //SEG34 main::@return breturn: @@ -1946,18 +2053,17 @@ main: { .const y1 = $18 .const xd = x1-4 .const yd = y1-4 + .label x = 4 .label cursor = 2 - .label e = 4 .label y = 5 //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] //SEG9 [2] phi (byte) main::y#2 = (byte) 4 [phi:main->main::@1#0] -- zpby1=coby1 lda #4 sta y - //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- zpby1=coby1 - lda #yd/2 - sta e - //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- xby=coby1 - ldx #4 + //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- xby=coby1 + ldx #yd/2 + //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- zpby1=coby1 + sta x //SEG12 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 [phi:main->main::@1#3] -- zpptrby1=cowo1 lda #=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_zpby1_then_la1 - lda #xd - cmp e - bcs b2 + tax + //SEG23 [7] if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_xby_then_la1 + cpx #xd + bcc b2 //SEG24 main::@3 //SEG25 [8] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ( main:0 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ) -- zpby1=zpby1_plus_1 inc y @@ -2002,18 +2107,20 @@ main: { bcc !+ inc cursor+1 !: - //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- zpby1=zpby1_minus_coby1 + //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- xby=xby_minus_coby1 + txa sec sbc #xd - sta e + tax //SEG28 [11] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] //SEG29 [11] phi (byte) main::y#4 = (byte) main::y#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy //SEG30 [11] phi (byte) main::e#5 = (byte) main::e#1 [phi:main::@1/main::@3->main::@2#1] -- register_copy //SEG31 [11] phi (byte*) main::cursor#5 = (byte*) main::cursor#1 [phi:main::@1/main::@3->main::@2#2] -- register_copy //SEG32 main::@2 b2: - //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- xby_lt_coby1_then_la1 - cpx #x1+1 + //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- zpby1_lt_coby1_then_la1 + lda x + cmp #x1+1 bcc b1 //SEG34 main::@return //SEG35 [13] return [ ] ( main:0 [ ] ) @@ -2042,18 +2149,17 @@ main: { .const y1 = $18 .const xd = x1-4 .const yd = y1-4 + .label x = 4 .label cursor = 2 - .label e = 4 .label y = 5 //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] //SEG9 [2] phi (byte) main::y#2 = (byte) 4 [phi:main->main::@1#0] -- zpby1=coby1 lda #4 sta y - //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- zpby1=coby1 - lda #yd/2 - sta e - //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- xby=coby1 - ldx #4 + //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- xby=coby1 + ldx #yd/2 + //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- zpby1=coby1 + sta x //SEG12 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 [phi:main->main::@1#3] -- zpptrby1=cowo1 lda #=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_zpby1_then_la1 - lda #xd - cmp e - bcs b2 + tax + //SEG23 [7] if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_xby_then_la1 + cpx #xd + bcc b2 //SEG24 main::@3 //SEG25 [8] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ( main:0 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ) -- zpby1=zpby1_plus_1 inc y @@ -2097,18 +2202,20 @@ main: { bcc !+ inc cursor+1 !: - //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- zpby1=zpby1_minus_coby1 + //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- xby=xby_minus_coby1 + txa sec sbc #xd - sta e + tax //SEG28 [11] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] //SEG29 [11] phi (byte) main::y#4 = (byte) main::y#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy //SEG30 [11] phi (byte) main::e#5 = (byte) main::e#1 [phi:main::@1/main::@3->main::@2#1] -- register_copy //SEG31 [11] phi (byte*) main::cursor#5 = (byte*) main::cursor#1 [phi:main::@1/main::@3->main::@2#2] -- register_copy //SEG32 main::@2 b2: - //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- xby_lt_coby1_then_la1 - cpx #x1+1 + //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- zpby1_lt_coby1_then_la1 + lda x + cmp #x1+1 bcc b1 //SEG34 main::@return //SEG35 [13] return [ ] ( main:0 [ ] ) @@ -2134,13 +2241,13 @@ FINAL SYMBOL TABLE (byte*) main::cursor#3 cursor zp ZP_PTR_BYTE:2 11.0 (byte*) main::cursor#5 cursor zp ZP_PTR_BYTE:2 16.5 (byte) main::e -(byte) main::e#1 e zp ZP_BYTE:4 11.0 -(byte) main::e#2 e zp ZP_BYTE:4 22.0 -(byte) main::e#3 e zp ZP_BYTE:4 5.5 -(byte) main::e#5 e zp ZP_BYTE:4 16.5 +(byte) main::e#1 reg byte x 11.0 +(byte) main::e#2 reg byte x 22.0 +(byte) main::e#3 reg byte x 5.5 +(byte) main::e#5 reg byte x 16.5 (byte) main::x -(byte) main::x#1 reg byte x 3.666666666666667 -(byte) main::x#2 reg byte x 11.0 +(byte) main::x#1 x zp ZP_BYTE:4 3.666666666666667 +(byte) main::x#2 x zp ZP_BYTE:4 11.0 (byte) main::x0 (byte) main::x1 (const byte) main::x1#0 x1 = (byte) 39 @@ -2157,8 +2264,8 @@ FINAL SYMBOL TABLE (const byte) main::yd#0 yd = (const byte) main::y1#0-(byte) 4 zp ZP_PTR_BYTE:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ] -reg byte x [ main::x#2 main::x#1 ] -zp ZP_BYTE:4 [ main::e#3 main::e#5 main::e#1 main::e#2 ] +zp ZP_BYTE:4 [ main::x#2 main::x#1 ] +reg byte x [ main::e#3 main::e#5 main::e#1 main::e#2 ] zp ZP_BYTE:5 [ main::y#2 main::y#4 main::y#1 ] FINAL CODE @@ -2181,18 +2288,17 @@ main: { .const y1 = $18 .const xd = x1-4 .const yd = y1-4 + .label x = 4 .label cursor = 2 - .label e = 4 .label y = 5 //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] //SEG9 [2] phi (byte) main::y#2 = (byte) 4 [phi:main->main::@1#0] -- zpby1=coby1 lda #4 sta y - //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- zpby1=coby1 - lda #yd/2 - sta e - //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- xby=coby1 - ldx #4 + //SEG10 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 [phi:main->main::@1#1] -- xby=coby1 + ldx #yd/2 + //SEG11 [2] phi (byte) main::x#2 = (byte) 4 [phi:main->main::@1#2] -- zpby1=coby1 + sta x //SEG12 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 [phi:main->main::@1#3] -- zpptrby1=cowo1 lda #=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_zpby1_then_la1 - lda #xd - cmp e - bcs b2 + tax + //SEG23 [7] if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ( main:0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] ) -- coby1_ge_xby_then_la1 + cpx #xd + bcc b2 //SEG24 main::@3 //SEG25 [8] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ( main:0 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] ) -- zpby1=zpby1_plus_1 inc y @@ -2236,18 +2341,20 @@ main: { bcc !+ inc cursor+1 !: - //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- zpby1=zpby1_minus_coby1 + //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] ) -- xby=xby_minus_coby1 + txa sec sbc #xd - sta e + tax //SEG28 [11] phi from main::@1 main::@3 to main::@2 [phi:main::@1/main::@3->main::@2] //SEG29 [11] phi (byte) main::y#4 = (byte) main::y#2 [phi:main::@1/main::@3->main::@2#0] -- register_copy //SEG30 [11] phi (byte) main::e#5 = (byte) main::e#1 [phi:main::@1/main::@3->main::@2#1] -- register_copy //SEG31 [11] phi (byte*) main::cursor#5 = (byte*) main::cursor#1 [phi:main::@1/main::@3->main::@2#2] -- register_copy //SEG32 main::@2 b2: - //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- xby_lt_coby1_then_la1 - cpx #x1+1 + //SEG33 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ( main:0 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] ) -- zpby1_lt_coby1_then_la1 + lda x + cmp #x1+1 bcc b1 //SEG34 main::@return //SEG35 [13] return [ ] ( main:0 [ ] ) diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bresenham.sym b/src/main/java/dk/camelot64/kickc/test/ref/bresenham.sym index acf8252e4..9d23de3e0 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bresenham.sym +++ b/src/main/java/dk/camelot64/kickc/test/ref/bresenham.sym @@ -16,13 +16,13 @@ (byte*) main::cursor#3 cursor zp ZP_PTR_BYTE:2 11.0 (byte*) main::cursor#5 cursor zp ZP_PTR_BYTE:2 16.5 (byte) main::e -(byte) main::e#1 e zp ZP_BYTE:4 11.0 -(byte) main::e#2 e zp ZP_BYTE:4 22.0 -(byte) main::e#3 e zp ZP_BYTE:4 5.5 -(byte) main::e#5 e zp ZP_BYTE:4 16.5 +(byte) main::e#1 reg byte x 11.0 +(byte) main::e#2 reg byte x 22.0 +(byte) main::e#3 reg byte x 5.5 +(byte) main::e#5 reg byte x 16.5 (byte) main::x -(byte) main::x#1 reg byte x 3.666666666666667 -(byte) main::x#2 reg byte x 11.0 +(byte) main::x#1 x zp ZP_BYTE:4 3.666666666666667 +(byte) main::x#2 x zp ZP_BYTE:4 11.0 (byte) main::x0 (byte) main::x1 (const byte) main::x1#0 x1 = (byte) 39 @@ -39,6 +39,6 @@ (const byte) main::yd#0 yd = (const byte) main::y1#0-(byte) 4 zp ZP_PTR_BYTE:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ] -reg byte x [ main::x#2 main::x#1 ] -zp ZP_BYTE:4 [ main::e#3 main::e#5 main::e#1 main::e#2 ] +zp ZP_BYTE:4 [ main::x#2 main::x#1 ] +reg byte x [ main::e#3 main::e#5 main::e#1 main::e#2 ] zp ZP_BYTE:5 [ main::y#2 main::y#4 main::y#1 ] diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bresenhamarr.log b/src/main/java/dk/camelot64/kickc/test/ref/bresenhamarr.log index 748cf668e..fa01820dc 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/bresenhamarr.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/bresenhamarr.log @@ -1599,6 +1599,7 @@ main: { inc idx+1 !: //SEG27 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ( main:0 [ main::x#1 main::y#1 main::idx#2 main::e#2 ] ) -- zpby1=zpby1_minus_coby1 + lda e sec sbc #xd sta e diff --git a/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.asm b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.asm new file mode 100644 index 000000000..29ab55af0 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.asm @@ -0,0 +1,26 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + jsr main +main: { + .const screen = $400 + .label i = 2 + ldx #0 + lda #-$7f + sta i + b1: + lda i + sec + sbc #$7f + bvc !+ + eor #$80 + !: + bmi b2 + rts + b2: + lda i + sta screen,x + inc i + inx + jmp b1 +} diff --git a/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.cfg b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.cfg new file mode 100644 index 000000000..de5365426 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.cfg @@ -0,0 +1,22 @@ +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @1 +main: scope:[main] from @1 + [1] phi() [ ] ( main:0 [ ] ) + to:main::@1 +main::@1: scope:[main] from main main::@2 + [2] (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte) main::j#1 ) [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + [2] (signed byte) main::i#2 ← phi( main/-(byte) 127 main::@2/(signed byte) main::i#1 ) [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + to:main::@return +main::@return: scope:[main] from main::@1 + [4] return [ ] ( main:0 [ ] ) + to:@return +main::@2: scope:[main] from main::@1 + [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] ( main:0 [ main::j#2 main::i#1 ] ) + [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] ( main:0 [ main::i#1 main::j#1 ] ) + to:main::@1 diff --git a/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.log b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.log new file mode 100644 index 000000000..42b1f1933 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.log @@ -0,0 +1,960 @@ + +void main() { + byte[] screen = $0400; + byte j = 0; + signed byte i = -127; + while(i<127) { + screen[j] = i; + i++; + j++; + } + +} +Adding pre/post-modifier (signed byte) main::i ← ++ (signed byte) main::i +Adding pre/post-modifier (byte) main::j ← ++ (byte) main::j +PROGRAM +proc (void()) main() + (byte[]) main::screen ← (word) 1024 + (byte) main::j ← (byte) 0 + (byte~) main::$0 ← - (byte) 127 + (signed byte) main::i ← (byte~) main::$0 +main::@1: + (boolean~) main::$1 ← (signed byte) main::i < (byte) 127 + if((boolean~) main::$1) goto main::@2 + goto main::@3 +main::@2: + *((byte[]) main::screen + (byte) main::j) ← (signed byte) main::i + (signed byte) main::i ← ++ (signed byte) main::i + (byte) main::j ← ++ (byte) main::j + goto main::@1 +main::@3: +main::@return: + return +endproc // main() + call main + +SYMBOLS +(void()) main() +(byte~) main::$0 +(boolean~) main::$1 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(signed byte) main::i +(byte) main::j +(byte[]) main::screen + +INITIAL CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from + (byte[]) main::screen ← (word) 1024 + (byte) main::j ← (byte) 0 + (byte~) main::$0 ← - (byte) 127 + (signed byte) main::i ← (byte~) main::$0 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (boolean~) main::$1 ← (signed byte) main::i < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@4 +main::@2: scope:[main] from main::@1 main::@5 + *((byte[]) main::screen + (byte) main::j) ← (signed byte) main::i + (signed byte) main::i ← ++ (signed byte) main::i + (byte) main::j ← ++ (byte) main::j + to:main::@1 +main::@4: scope:[main] from main::@1 + to:main::@3 +main::@3: scope:[main] from main::@4 main::@6 + to:main::@return +main::@5: scope:[main] from + to:main::@2 +main::@6: scope:[main] from + to:main::@3 +main::@return: scope:[main] from main::@3 + return + to:@return +@1: scope:[] from @begin + call main + to:@end +@end: scope:[] from @1 + +Removing empty block main::@4 +Removing empty block main::@3 +Removing empty block main::@5 +Removing empty block main::@6 +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from + (byte[]) main::screen ← (word) 1024 + (byte) main::j ← (byte) 0 + (byte~) main::$0 ← - (byte) 127 + (signed byte) main::i ← (byte~) main::$0 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (boolean~) main::$1 ← (signed byte) main::i < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((byte[]) main::screen + (byte) main::j) ← (signed byte) main::i + (signed byte) main::i ← ++ (signed byte) main::i + (byte) main::j ← ++ (byte) main::j + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main + to:@end +@end: scope:[] from @1 + +PROCEDURE MODIFY VARIABLE ANALYSIS + +CONTROL FLOW GRAPH WITH ASSIGNMENT CALL +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen ← (word) 1024 + (byte) main::j ← (byte) 0 + (byte~) main::$0 ← - (byte) 127 + (signed byte) main::i ← (byte~) main::$0 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (boolean~) main::$1 ← (signed byte) main::i < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((byte[]) main::screen + (byte) main::j) ← (signed byte) main::i + (signed byte) main::i ← ++ (signed byte) main::i + (byte) main::j ← ++ (byte) main::j + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +Completing Phi functions... +Completing Phi functions... +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen#0 ← (word) 1024 + (byte) main::j#0 ← (byte) 0 + (byte~) main::$0 ← - (byte) 127 + (signed byte) main::i#0 ← (byte~) main::$0 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#3 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#1 ) + (byte[]) main::screen#2 ← phi( main/(byte[]) main::screen#0 main::@2/(byte[]) main::screen#1 ) + (signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + (boolean~) main::$1 ← (signed byte) main::i#2 < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte) main::j#2 ← phi( main::@1/(byte) main::j#3 ) + (byte[]) main::screen#1 ← phi( main::@1/(byte[]) main::screen#2 ) + (signed byte) main::i#3 ← phi( main::@1/(signed byte) main::i#2 ) + *((byte[]) main::screen#1 + (byte) main::j#2) ← (signed byte) main::i#3 + (signed byte) main::i#1 ← ++ (signed byte) main::i#3 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +CONTROL FLOW GRAPH WITH ASSIGNMENT CALL & RETURN +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen#0 ← (word) 1024 + (byte) main::j#0 ← (byte) 0 + (byte~) main::$0 ← - (byte) 127 + (signed byte) main::i#0 ← (byte~) main::$0 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#3 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#1 ) + (byte[]) main::screen#2 ← phi( main/(byte[]) main::screen#0 main::@2/(byte[]) main::screen#1 ) + (signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + (boolean~) main::$1 ← (signed byte) main::i#2 < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte) main::j#2 ← phi( main::@1/(byte) main::j#3 ) + (byte[]) main::screen#1 ← phi( main::@1/(byte[]) main::screen#2 ) + (signed byte) main::i#3 ← phi( main::@1/(signed byte) main::i#2 ) + *((byte[]) main::screen#1 + (byte) main::j#2) ← (signed byte) main::i#3 + (signed byte) main::i#1 ← ++ (signed byte) main::i#3 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +INITIAL SSA SYMBOL TABLE +(label) @1 +(label) @2 +(label) @begin +(label) @end +(void()) main() +(byte~) main::$0 +(boolean~) main::$1 +(label) main::@1 +(label) main::@2 +(label) main::@return +(signed byte) main::i +(signed byte) main::i#0 +(signed byte) main::i#1 +(signed byte) main::i#2 +(signed byte) main::i#3 +(byte) main::j +(byte) main::j#0 +(byte) main::j#1 +(byte) main::j#2 +(byte) main::j#3 +(byte[]) main::screen +(byte[]) main::screen#0 +(byte[]) main::screen#1 +(byte[]) main::screen#2 + +Culled Empty Block (label) @2 +Succesful SSA optimization Pass2CullEmptyBlocks +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen#0 ← (word) 1024 + (byte) main::j#0 ← (byte) 0 + (byte~) main::$0 ← - (byte) 127 + (signed byte) main::i#0 ← (byte~) main::$0 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#3 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#1 ) + (byte[]) main::screen#2 ← phi( main/(byte[]) main::screen#0 main::@2/(byte[]) main::screen#1 ) + (signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + (boolean~) main::$1 ← (signed byte) main::i#2 < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte) main::j#2 ← phi( main::@1/(byte) main::j#3 ) + (byte[]) main::screen#1 ← phi( main::@1/(byte[]) main::screen#2 ) + (signed byte) main::i#3 ← phi( main::@1/(signed byte) main::i#2 ) + *((byte[]) main::screen#1 + (byte) main::j#2) ← (signed byte) main::i#3 + (signed byte) main::i#1 ← ++ (signed byte) main::i#3 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 + +Alias (signed byte) main::i#0 = (byte~) main::$0 +Alias (signed byte) main::i#2 = (signed byte) main::i#3 +Alias (byte[]) main::screen#1 = (byte[]) main::screen#2 +Alias (byte) main::j#2 = (byte) main::j#3 +Succesful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen#0 ← (word) 1024 + (byte) main::j#0 ← (byte) 0 + (signed byte) main::i#0 ← - (byte) 127 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#2 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#1 ) + (byte[]) main::screen#1 ← phi( main/(byte[]) main::screen#0 main::@2/(byte[]) main::screen#1 ) + (signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + (boolean~) main::$1 ← (signed byte) main::i#2 < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((byte[]) main::screen#1 + (byte) main::j#2) ← (signed byte) main::i#2 + (signed byte) main::i#1 ← ++ (signed byte) main::i#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 + +Self Phi Eliminated (byte[]) main::screen#1 +Succesful SSA optimization Pass2SelfPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen#0 ← (word) 1024 + (byte) main::j#0 ← (byte) 0 + (signed byte) main::i#0 ← - (byte) 127 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#2 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#1 ) + (byte[]) main::screen#1 ← phi( main/(byte[]) main::screen#0 ) + (signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + (boolean~) main::$1 ← (signed byte) main::i#2 < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((byte[]) main::screen#1 + (byte) main::j#2) ← (signed byte) main::i#2 + (signed byte) main::i#1 ← ++ (signed byte) main::i#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 + +Redundant Phi (byte[]) main::screen#1 (byte[]) main::screen#0 +Succesful SSA optimization Pass2RedundantPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen#0 ← (word) 1024 + (byte) main::j#0 ← (byte) 0 + (signed byte) main::i#0 ← - (byte) 127 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#2 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#1 ) + (signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + (boolean~) main::$1 ← (signed byte) main::i#2 < (byte) 127 + if((boolean~) main::$1) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 + (signed byte) main::i#1 ← ++ (signed byte) main::i#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 + +Simple Condition (boolean~) main::$1 if((signed byte) main::i#2<(byte) 127) goto main::@2 +Succesful SSA optimization Pass2ConditionalJumpSimplification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte[]) main::screen#0 ← (word) 1024 + (byte) main::j#0 ← (byte) 0 + (signed byte) main::i#0 ← - (byte) 127 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#2 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#1 ) + (signed byte) main::i#2 ← phi( main/(signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + if((signed byte) main::i#2<(byte) 127) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 + (signed byte) main::i#1 ← ++ (signed byte) main::i#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 + +Constant (const byte[]) main::screen#0 = 1024 +Constant (const byte) main::j#0 = 0 +Constant (const signed byte) main::i#0 = -127 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#2 ← phi( main/(const byte) main::j#0 main::@2/(byte) main::j#1 ) + (signed byte) main::i#2 ← phi( main/(const signed byte) main::i#0 main::@2/(signed byte) main::i#1 ) + if((signed byte) main::i#2<(byte) 127) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 + (signed byte) main::i#1 ← ++ (signed byte) main::i#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 + +Inlining constant with var siblings (const byte) main::j#0 +Inlining constant with var siblings (const byte) main::j#0 +Inlining constant with var siblings (const signed byte) main::i#0 +Inlining constant with var siblings (const signed byte) main::i#0 +Constant inlined main::j#0 = (byte) 0 +Constant inlined main::i#0 = -(byte) 127 +Succesful SSA optimization Pass2ConstantInlining +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte) main::j#1 ) + (signed byte) main::i#2 ← phi( main/-(byte) 127 main::@2/(signed byte) main::i#1 ) + if((signed byte) main::i#2<(byte) 127) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 + (signed byte) main::i#1 ← ++ (signed byte) main::i#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@return +(signed byte) main::i +(signed byte) main::i#1 +(signed byte) main::i#2 +(byte) main::j +(byte) main::j#1 +(byte) main::j#2 +(byte[]) main::screen +(const byte[]) main::screen#0 = (word) 1024 + +Block Sequence Planned @begin @1 @end main main::@1 main::@return main::@2 +Block Sequence Planned @begin @1 @end main main::@1 main::@return main::@2 +CONTROL FLOW GRAPH - PHI LIFTED +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@2 + (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte~) main::j#4 ) + (signed byte) main::i#2 ← phi( main/-(byte) 127 main::@2/(signed byte~) main::i#4 ) + if((signed byte) main::i#2<(byte) 127) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@1 + return + to:@return +main::@2: scope:[main] from main::@1 + *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 + (signed byte) main::i#1 ← ++ (signed byte) main::i#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + (signed byte~) main::i#4 ← (signed byte) main::i#1 + (byte~) main::j#4 ← (byte) main::j#1 + to:main::@1 + +Adding NOP phi() at start of main +CALL GRAPH +Calls in [] to main:0 + +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +CONTROL FLOW GRAPH - LIVE RANGES FOUND +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main param-assignment [ ] + to:@end +@end: scope:[] from @1 +main: scope:[main] from @1 + [1] phi() [ ] + to:main::@1 +main::@1: scope:[main] from main main::@2 + [2] (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte~) main::j#4 ) [ main::i#2 main::j#2 ] + [2] (signed byte) main::i#2 ← phi( main/-(byte) 127 main::@2/(signed byte~) main::i#4 ) [ main::i#2 main::j#2 ] + [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] + to:main::@return +main::@return: scope:[main] from main::@1 + [4] return [ ] + to:@return +main::@2: scope:[main] from main::@1 + [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] + [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] + [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] + [8] (signed byte~) main::i#4 ← (signed byte) main::i#1 [ main::i#4 main::j#1 ] + [9] (byte~) main::j#4 ← (byte) main::j#1 [ main::i#4 main::j#4 ] + to:main::@1 + +Created 2 initial phi equivalence classes +Coalesced [8] main::i#4 ← main::i#1 +Coalesced [9] main::j#4 ← main::j#1 +Coalesced down to 2 phi equivalence classes +Block Sequence Planned @begin @1 @end main main::@1 main::@return main::@2 +Adding NOP phi() at start of main +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +CONTROL FLOW GRAPH - BEFORE EFFECTIVE LIVE RANGES +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main param-assignment [ ] + to:@end +@end: scope:[] from @1 +main: scope:[main] from @1 + [1] phi() [ ] + to:main::@1 +main::@1: scope:[main] from main main::@2 + [2] (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte) main::j#1 ) [ main::i#2 main::j#2 ] + [2] (signed byte) main::i#2 ← phi( main/-(byte) 127 main::@2/(signed byte) main::i#1 ) [ main::i#2 main::j#2 ] + [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] + to:main::@return +main::@return: scope:[main] from main::@1 + [4] return [ ] + to:@return +main::@2: scope:[main] from main::@1 + [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] + [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] + [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] + to:main::@1 + +CONTROL FLOW GRAPH - PHI MEM COALESCED +@begin: scope:[] from + to:@1 +@1: scope:[] from @begin + [0] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @1 +main: scope:[main] from @1 + [1] phi() [ ] ( main:0 [ ] ) + to:main::@1 +main::@1: scope:[main] from main main::@2 + [2] (byte) main::j#2 ← phi( main/(byte) 0 main::@2/(byte) main::j#1 ) [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + [2] (signed byte) main::i#2 ← phi( main/-(byte) 127 main::@2/(signed byte) main::i#1 ) [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + to:main::@return +main::@return: scope:[main] from main::@1 + [4] return [ ] ( main:0 [ ] ) + to:@return +main::@2: scope:[main] from main::@1 + [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) + [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] ( main:0 [ main::j#2 main::i#1 ] ) + [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] ( main:0 [ main::i#1 main::j#1 ] ) + to:main::@1 + +DOMINATORS +@begin dominated by @begin +@1 dominated by @1 @begin +@end dominated by @1 @end @begin +main dominated by @1 @begin main +main::@1 dominated by @1 @begin main::@1 main +main::@return dominated by @1 main::@return @begin main::@1 main +main::@2 dominated by @1 @begin main::@2 main::@1 main + +Found back edge: Loop head: main::@1 tails: main::@2 blocks: null +Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 +NATURAL LOOPS +Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 + +Found 0 loops in scope [] +Found 1 loops in scope [main] + Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 +NATURAL LOOPS WITH DEPTH +Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 depth: 1 + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(signed byte) main::i +(signed byte) main::i#1 11.0 +(signed byte) main::i#2 14.666666666666666 +(byte) main::j +(byte) main::j#1 22.0 +(byte) main::j#2 8.25 +(byte[]) main::screen + +Initial phi equivalence classes +[ main::i#2 main::i#1 ] +[ main::j#2 main::j#1 ] +Complete equivalence classes +[ main::i#2 main::i#1 ] +[ main::j#2 main::j#1 ] +Allocated zp ZP_SBYTE:2 [ main::i#2 main::i#1 ] +Allocated zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +INITIAL ASM +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +bbegin: + jmp b1 +//SEG3 @1 +b1: +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main + jmp bend +//SEG6 @end +bend: +//SEG7 main +main: { + .const screen = $400 + .label i = 2 + .label j = 3 + //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG9 [2] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- zpby1=coby1 + lda #0 + sta j + //SEG10 [2] phi (signed byte) main::i#2 = -(byte) 127 [phi:main->main::@1#1] -- zpsby1=coby1 + lda #-$7f + sta i + jmp b1 + //SEG11 main::@1 + b1: + //SEG12 [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- zpsby1_lt_coby1_then_la1 + lda i + sec + sbc #$7f + bvc !+ + eor #$80 + !: + bmi b2 + jmp breturn + //SEG13 main::@return + breturn: + //SEG14 [4] return [ ] ( main:0 [ ] ) + rts + //SEG15 main::@2 + b2: + //SEG16 [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- cowo1_derefidx_zpby1=zpsby1 + lda i + ldx j + sta screen,x + //SEG17 [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] ( main:0 [ main::j#2 main::i#1 ] ) -- zpsby1=_inc_zpsby1 + inc i + //SEG18 [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] ( main:0 [ main::i#1 main::j#1 ] ) -- zpby1=_inc_zpby1 + inc j + //SEG19 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + b1_from_b2: + //SEG20 [2] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy + //SEG21 [2] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy + jmp b1 +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Potential register analysis [3] if(main::i#2<127) goto main::@2 missing fragment xsby_lt_coby1_then_la1 allocation: reg sbyte x [ main::i#2 main::i#1 ] +Potential register analysis [3] if(main::i#2<127) goto main::@2 missing fragment ysby_lt_coby1_then_la1 allocation: reg sbyte y [ main::i#2 main::i#1 ] +MISSING FRAGMENTS + xsby_lt_coby1_then_la1 + ysby_lt_coby1_then_la1 +Statement [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +Potential register analysis [3] if(main::i#2<127) goto main::@2 missing fragment xsby_lt_coby1_then_la1 allocation: reg sbyte x [ main::i#2 main::i#1 ] +Potential register analysis [3] if(main::i#2<127) goto main::@2 missing fragment ysby_lt_coby1_then_la1 allocation: reg sbyte y [ main::i#2 main::i#1 ] +MISSING FRAGMENTS + xsby_lt_coby1_then_la1 + ysby_lt_coby1_then_la1 +Statement [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) always clobbers reg byte a +Potential registers zp ZP_SBYTE:2 [ main::i#2 main::i#1 ] : zp ZP_SBYTE:2 , reg sbyte a , reg sbyte x , reg sbyte y , +Potential registers zp ZP_BYTE:3 [ main::j#2 main::j#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 30.25: zp ZP_BYTE:3 [ main::j#2 main::j#1 ] 25.67: zp ZP_SBYTE:2 [ main::i#2 main::i#1 ] +Uplift Scope [] + +Uplifting [main] best 495 combination reg byte x [ main::j#2 main::j#1 ] zp ZP_SBYTE:2 [ main::i#2 main::i#1 ] +Uplifting [] best 495 combination +MISSING FRAGMENTS + asby=_inc_asby + cowo1_derefidx_xby=asby + cowo1_derefidx_yby=asby + xsby=coby1 + ysby=coby1 +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +ASSEMBLER +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +bbegin: +//SEG3 @1 +b1: +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG6 @end +bend: +//SEG7 main +main: { + .const screen = $400 + .label i = 2 + //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG9 [2] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1 + ldx #0 + //SEG10 [2] phi (signed byte) main::i#2 = -(byte) 127 [phi:main->main::@1#1] -- zpsby1=coby1 + lda #-$7f + sta i + //SEG11 main::@1 + b1: + //SEG12 [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- zpsby1_lt_coby1_then_la1 + lda i + sec + sbc #$7f + bvc !+ + eor #$80 + !: + bmi b2 + //SEG13 main::@return + breturn: + //SEG14 [4] return [ ] ( main:0 [ ] ) + rts + //SEG15 main::@2 + b2: + //SEG16 [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- cowo1_derefidx_xby=zpsby1 + lda i + sta screen,x + //SEG17 [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] ( main:0 [ main::j#2 main::i#1 ] ) -- zpsby1=_inc_zpsby1 + inc i + //SEG18 [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] ( main:0 [ main::i#1 main::j#1 ] ) -- xby=_inc_xby + inx + //SEG19 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + b1_from_b2: + //SEG20 [2] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy + //SEG21 [2] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy + jmp b1 +} + +Removing instruction bbegin: +Removing instruction main_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +ASSEMBLER +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +//SEG3 @1 +b1: +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @1 to main [phi:@1->main] + jsr main +//SEG6 @end +bend: +//SEG7 main +main: { + .const screen = $400 + .label i = 2 + //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG9 [2] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1 + ldx #0 + //SEG10 [2] phi (signed byte) main::i#2 = -(byte) 127 [phi:main->main::@1#1] -- zpsby1=coby1 + lda #-$7f + sta i + //SEG11 main::@1 + b1: + //SEG12 [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- zpsby1_lt_coby1_then_la1 + lda i + sec + sbc #$7f + bvc !+ + eor #$80 + !: + bmi b2 + //SEG13 main::@return + breturn: + //SEG14 [4] return [ ] ( main:0 [ ] ) + rts + //SEG15 main::@2 + b2: + //SEG16 [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- cowo1_derefidx_xby=zpsby1 + lda i + sta screen,x + //SEG17 [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] ( main:0 [ main::j#2 main::i#1 ] ) -- zpsby1=_inc_zpsby1 + inc i + //SEG18 [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] ( main:0 [ main::i#1 main::j#1 ] ) -- xby=_inc_xby + inx + //SEG19 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + b1_from_b2: + //SEG20 [2] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy + //SEG21 [2] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy + jmp b1 +} + +Removing instruction b1: +Removing instruction bend: +Removing instruction b1_from_main: +Removing instruction breturn: +Removing instruction b1_from_b2: +Succesful ASM optimization Pass5UnusedLabelElimination +ASSEMBLER +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +//SEG3 @1 +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @1 to main [phi:@1->main] + jsr main +//SEG6 @end +//SEG7 main +main: { + .const screen = $400 + .label i = 2 + //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] + //SEG9 [2] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1 + ldx #0 + //SEG10 [2] phi (signed byte) main::i#2 = -(byte) 127 [phi:main->main::@1#1] -- zpsby1=coby1 + lda #-$7f + sta i + //SEG11 main::@1 + b1: + //SEG12 [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- zpsby1_lt_coby1_then_la1 + lda i + sec + sbc #$7f + bvc !+ + eor #$80 + !: + bmi b2 + //SEG13 main::@return + //SEG14 [4] return [ ] ( main:0 [ ] ) + rts + //SEG15 main::@2 + b2: + //SEG16 [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- cowo1_derefidx_xby=zpsby1 + lda i + sta screen,x + //SEG17 [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] ( main:0 [ main::j#2 main::i#1 ] ) -- zpsby1=_inc_zpsby1 + inc i + //SEG18 [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] ( main:0 [ main::i#1 main::j#1 ] ) -- xby=_inc_xby + inx + //SEG19 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + //SEG20 [2] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy + //SEG21 [2] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy + jmp b1 +} + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@return +(signed byte) main::i +(signed byte) main::i#1 i zp ZP_SBYTE:2 11.0 +(signed byte) main::i#2 i zp ZP_SBYTE:2 14.666666666666666 +(byte) main::j +(byte) main::j#1 reg byte x 22.0 +(byte) main::j#2 reg byte x 8.25 +(byte[]) main::screen +(const byte[]) main::screen#0 screen = (word) 1024 + +zp ZP_SBYTE:2 [ main::i#2 main::i#1 ] +reg byte x [ main::j#2 main::j#1 ] + +FINAL CODE +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +//SEG3 @1 +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @1 to main [phi:@1->main] + jsr main +//SEG6 @end +//SEG7 main +main: { + .const screen = $400 + .label i = 2 + //SEG8 [2] phi from main to main::@1 [phi:main->main::@1] + //SEG9 [2] phi (byte) main::j#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1 + ldx #0 + //SEG10 [2] phi (signed byte) main::i#2 = -(byte) 127 [phi:main->main::@1#1] -- zpsby1=coby1 + lda #-$7f + sta i + //SEG11 main::@1 + b1: + //SEG12 [3] if((signed byte) main::i#2<(byte) 127) goto main::@2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- zpsby1_lt_coby1_then_la1 + lda i + sec + sbc #$7f + bvc !+ + eor #$80 + !: + bmi b2 + //SEG13 main::@return + //SEG14 [4] return [ ] ( main:0 [ ] ) + rts + //SEG15 main::@2 + b2: + //SEG16 [5] *((const byte[]) main::screen#0 + (byte) main::j#2) ← (signed byte) main::i#2 [ main::i#2 main::j#2 ] ( main:0 [ main::i#2 main::j#2 ] ) -- cowo1_derefidx_xby=zpsby1 + lda i + sta screen,x + //SEG17 [6] (signed byte) main::i#1 ← ++ (signed byte) main::i#2 [ main::j#2 main::i#1 ] ( main:0 [ main::j#2 main::i#1 ] ) -- zpsby1=_inc_zpsby1 + inc i + //SEG18 [7] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::i#1 main::j#1 ] ( main:0 [ main::i#1 main::j#1 ] ) -- xby=_inc_xby + inx + //SEG19 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1] + //SEG20 [2] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@1#0] -- register_copy + //SEG21 [2] phi (signed byte) main::i#2 = (signed byte) main::i#1 [phi:main::@2->main::@1#1] -- register_copy + jmp b1 +} + diff --git a/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.sym b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.sym new file mode 100644 index 000000000..cf8c15c36 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/signed-bytes.sym @@ -0,0 +1,18 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@return +(signed byte) main::i +(signed byte) main::i#1 i zp ZP_SBYTE:2 11.0 +(signed byte) main::i#2 i zp ZP_SBYTE:2 14.666666666666666 +(byte) main::j +(byte) main::j#1 reg byte x 22.0 +(byte) main::j#2 reg byte x 8.25 +(byte[]) main::screen +(const byte[]) main::screen#0 screen = (word) 1024 + +zp ZP_SBYTE:2 [ main::i#2 main::i#1 ] +reg byte x [ main::j#2 main::j#1 ]