From 1d092962b38a87adfb1afc8e84654a1c2f012472 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 7 Jul 2019 00:17:00 +0200 Subject: [PATCH] Added center-based plasma, some fragments and some synth rules. --- ...us_pbuz3_derefidx_pbuz4_derefidx_vbuyy.asm | 8 + ...us_pbuz2_derefidx_pbuz3_derefidx_vbuyy.asm | 7 + .../kickc/fragment/AsmFragmentTemplate.java | 10 + .../AsmFragmentTemplateSynthesisRule.java | 80 +- src/main/kc/stdlib/string.kc | 22 +- .../camelot64/kickc/test/TestFragments.java | 5 +- .../dk/camelot64/kickc/test/TestPrograms.java | 7 +- src/test/kc/examples/plasma/plasma.kc | 54 +- src/test/kc/plasma-center.kc | 133 + src/test/kc/sid.kc | 27 + src/test/ref/examples/plasma/plasma.asm | 2 +- src/test/ref/examples/plasma/plasma.log | 12 +- src/test/ref/examples/plasma/plasma.sym | 2 +- src/test/ref/plasma-center.asm | 940 ++ src/test/ref/plasma-center.cfg | 511 + src/test/ref/plasma-center.log | 11650 ++++++++++++++++ src/test/ref/plasma-center.sym | 532 + 17 files changed, 13930 insertions(+), 72 deletions(-) create mode 100644 src/main/fragment/vbuaa=pbuz1_derefidx_pbuz2_derefidx_vbuyy_plus_pbuz3_derefidx_pbuz4_derefidx_vbuyy.asm create mode 100644 src/main/fragment/vbuaa=pbuz1_derefidx_vbuyy_plus_pbuz2_derefidx_pbuz3_derefidx_vbuyy.asm create mode 100644 src/test/kc/plasma-center.kc create mode 100644 src/test/kc/sid.kc create mode 100644 src/test/ref/plasma-center.asm create mode 100644 src/test/ref/plasma-center.cfg create mode 100644 src/test/ref/plasma-center.log create mode 100644 src/test/ref/plasma-center.sym diff --git a/src/main/fragment/vbuaa=pbuz1_derefidx_pbuz2_derefidx_vbuyy_plus_pbuz3_derefidx_pbuz4_derefidx_vbuyy.asm b/src/main/fragment/vbuaa=pbuz1_derefidx_pbuz2_derefidx_vbuyy_plus_pbuz3_derefidx_pbuz4_derefidx_vbuyy.asm new file mode 100644 index 000000000..427b593d3 --- /dev/null +++ b/src/main/fragment/vbuaa=pbuz1_derefidx_pbuz2_derefidx_vbuyy_plus_pbuz3_derefidx_pbuz4_derefidx_vbuyy.asm @@ -0,0 +1,8 @@ +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y \ No newline at end of file diff --git a/src/main/fragment/vbuaa=pbuz1_derefidx_vbuyy_plus_pbuz2_derefidx_pbuz3_derefidx_vbuyy.asm b/src/main/fragment/vbuaa=pbuz1_derefidx_vbuyy_plus_pbuz2_derefidx_pbuz3_derefidx_vbuyy.asm new file mode 100644 index 000000000..a619b6f2e --- /dev/null +++ b/src/main/fragment/vbuaa=pbuz1_derefidx_vbuyy_plus_pbuz2_derefidx_pbuz3_derefidx_vbuyy.asm @@ -0,0 +1,7 @@ +lda ({z1}),y +sta $ff +lda ({z3}),y +tay +lda ({z2}),y +clc +adc $ff \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java index 1b2514a12..d0312dcf7 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java @@ -89,22 +89,32 @@ public class AsmFragmentTemplate { VariableVersion v2 = new VariableVersion("$tmp2", SymbolType.BYTE, null); VariableVersion v3 = new VariableVersion("$tmp3", SymbolType.BYTE, null); VariableVersion v4 = new VariableVersion("$tmp4", SymbolType.BYTE, null); + VariableVersion v5 = new VariableVersion("$tmp5", SymbolType.BYTE, null); + VariableVersion v6 = new VariableVersion("$tmp6", SymbolType.BYTE, null); v1.setScope(scope); v2.setScope(scope); v3.setScope(scope); v4.setScope(scope); + v5.setScope(scope); + v6.setScope(scope); v1.setAllocation(new Registers.RegisterZpByte(2)); v2.setAllocation(new Registers.RegisterZpByte(4)); v3.setAllocation(new Registers.RegisterZpByte(6)); v4.setAllocation(new Registers.RegisterZpByte(8)); + v5.setAllocation(new Registers.RegisterZpByte(9)); + v6.setAllocation(new Registers.RegisterZpByte(10)); if(signature.contains("z1")) bindings.put("z1", v1); if(signature.contains("z2")) bindings.put("z2", v2); if(signature.contains("z3")) bindings.put("z3", v3); if(signature.contains("z4")) bindings.put("z4", v4); + if(signature.contains("z5")) bindings.put("z5", v5); + if(signature.contains("z6")) bindings.put("z6", v6); if(signature.contains("c1")) bindings.put("c1", new ConstantInteger(10L)); if(signature.contains("c2")) bindings.put("c2", new ConstantInteger(20L)); if(signature.contains("c3")) bindings.put("c3", new ConstantInteger(30L)); if(signature.contains("c4")) bindings.put("c4", new ConstantInteger(40L)); + if(signature.contains("c5")) bindings.put("c5", new ConstantInteger(50L)); + if(signature.contains("c6")) bindings.put("c6", new ConstantInteger(60L)); if(signature.contains("la1")) bindings.put("la1", new Label("@1", scope, true)); AsmFragmentInstance fragmentInstance = new AsmFragmentInstance(new Program(), signature, ScopeRef.ROOT, this, bindings); diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java index 28b78ddb5..aac692569 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java @@ -200,26 +200,52 @@ class AsmFragmentTemplateSynthesisRule { } private static List initFragmentSyntheses() { + // Z1 is replaced by something non-ZP - all above are moved down Map mapZ1 = new LinkedHashMap<>(); mapZ1.put("z2", "z1"); mapZ1.put("z3", "z2"); mapZ1.put("z4", "z3"); + mapZ1.put("z5", "z4"); + mapZ1.put("z6", "z5"); + // Z2 is replaced by something non-ZP - all above are moved down Map mapZ2 = new LinkedHashMap<>(); - mapZ2.put("z3", "z1"); + mapZ2.put("z3", "z2"); + mapZ2.put("z4", "z3"); + mapZ2.put("z5", "z4"); + mapZ2.put("z6", "z5"); + // Z3 is replaced by something non-ZP - all above are moved down Map mapZ3 = new LinkedHashMap<>(); - mapZ3.put("z3", "z2"); - Map mapZ4 = new LinkedHashMap<>(); mapZ3.put("z4", "z3"); + mapZ3.put("z5", "z4"); + mapZ3.put("z6", "z5"); + // Z4 is replaced by something non-ZP - all above are moved down + Map mapZ4 = new LinkedHashMap<>(); + mapZ4.put("z5", "z4"); + mapZ4.put("z6", "z5"); + // C1 is replaced by something non-C - all above are moved down Map mapC1 = new LinkedHashMap<>(); mapC1.put("c2", "c1"); mapC1.put("c3", "c2"); mapC1.put("c4", "c3"); + mapC1.put("c5", "c4"); + mapC1.put("c6", "c5"); + // C2 is replaced by something non-C - all above are moved down Map mapC2 = new LinkedHashMap<>(); mapC2.put("c3", "c2"); mapC2.put("c4", "c3"); - Map mapZC = new LinkedHashMap<>(); - mapZC.putAll(mapZ1); - mapZC.putAll(mapC1); + mapC2.put("c5", "c4"); + mapC2.put("c6", "c5"); + // Z1 and Z2 are replaced by something non-ZP - all above are moved down + Map mapZ12 = new LinkedHashMap<>(); + mapZ12.put("z3", "z1"); + mapZ12.put("z4", "z2"); + mapZ12.put("z5", "z3"); + mapZ12.put("z6", "z4"); + // Z1 and C1 are replaced by something non-ZP - all above are moved down + Map mapZ1C1 = new LinkedHashMap<>(); + mapZ1C1.putAll(mapZ1); + mapZ1C1.putAll(mapC1); + // Use unsigned in place of a signed Map mapSToU = new LinkedHashMap<>(); mapSToU.put("vbsz1", "vbuz1"); mapSToU.put("vbsz2", "vbuz2"); @@ -254,10 +280,12 @@ class AsmFragmentTemplateSynthesisRule { mapSToU.put("pwsc1", "pwuc1"); mapSToU.put("pwsc2", "pwuc2"); mapSToU.put("pwsc3", "pwuc3"); + // Swap z1 and z2 Map mapZ2Swap = new LinkedHashMap<>(); mapZ2Swap.put("z2", "zn"); mapZ2Swap.put("z1", "z2"); mapZ2Swap.put("zn", "z1"); + // Swap z2 and z3 Map mapZ3Swap = new LinkedHashMap<>(); mapZ3Swap.put("z3", "zn"); mapZ3Swap.put("z2", "z3"); @@ -276,6 +304,8 @@ class AsmFragmentTemplateSynthesisRule { String lvalDerefIdxAa = ".*_derefidx_...aa=.*"; String lvalDerefIdxZ1 = ".*_derefidx_...z1=.*"; String lvalDerefIdxZ2 = ".*_derefidx_...z2=.*"; + String lvalDerefIdxZ3 = ".*_derefidx_...z3=.*"; + String lvalDerefIdxZ4 = ".*_derefidx_...z4=.*"; // AA/XX/YY/Z1 is an LValue String lvalAa = "...aa=.*"; String lvalXx = "...xx=.*"; @@ -292,6 +322,8 @@ class AsmFragmentTemplateSynthesisRule { String threeC1 = ".*c1.*c1.*c1.*"; String threeZ1 = ".*z1.*z1.*z1.*"; String threeZ2 = ".*z2.*z2.*z2.*"; + String threeZ3 = ".*z3.*z3.*z3.*"; + String threeZ4 = ".*z4.*z4.*z4.*"; String threeAa = ".*aa.*aa.*aa.*"; // Presence of unwanted single symbols @@ -380,38 +412,38 @@ class AsmFragmentTemplateSynthesisRule { synths.add(new AsmFragmentTemplateSynthesisRule("(vb.)z1=(.*)", twoZ1, null, "$1xx=$2", "stx {z1}", mapZ1)); // Replace Z2 with AA (only one) - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)", lvalZ2+"|"+rvalAa+"|"+twoZ2, "lda {z2}", "$1aa$2", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)", lvalZ2+"|"+rvalAa+"|"+twoZ2, "lda {z2}", "$1aa$2", null, mapZ2)); // Replace two Z2s with AA - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalAa+"|"+threeZ2, "lda {z2}", "$1aa$2aa$3", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalAa+"|"+threeZ2, "lda {z2}", "$1aa$2aa$3", null, mapZ2)); // Replace first (of 2) Z2 with AA synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)z2(.*)", lvalZ2+"|"+rvalAa, "lda {z2}", "$1aa$2z2$3", null, null)); // Replace second (of 2) Z2 with AA synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalAa, "lda {z2}", "$1z2$2aa$3", null, null)); // Replace Z2 with YY (only one) - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)", lvalZ2+"|"+rvalYy+"|"+twoZ2, "ldy {z2}", "$1yy$2", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)", lvalZ2+"|"+rvalYy+"|"+twoZ2, "ldy {z2}", "$1yy$2", null, mapZ2)); // Replace two Z2s with YY - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalYy+"|"+threeZ2, "ldy {z2}", "$1yy$2yy$3", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalYy+"|"+threeZ2, "ldy {z2}", "$1yy$2yy$3", null, mapZ2)); // Replace first (of 2) Z2 with YY synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)z2(.*)", lvalZ2+"|"+rvalYy, "ldy {z2}", "$1yy$2z2$3", null, null)); // Replace second (of 2) Z2 with YY synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalYy, "ldy {z2}", "$1z2$2yy$3", null, null)); // Replace Z2 with XX(only one) - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)", lvalZ2+"|"+rvalXx+"|"+twoZ2, "ldx {z2}", "$1xx$2", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)", lvalZ2+"|"+rvalXx+"|"+twoZ2, "ldx {z2}", "$1xx$2", null, mapZ2)); // Replace two Z2s with XX - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalXx+"|"+threeZ2, "ldx {z2}", "$1xx$2xx$3", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalXx+"|"+threeZ2, "ldx {z2}", "$1xx$2xx$3", null, mapZ2)); // Replace first (of 2) Z2 with XX synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)z2(.*)", lvalZ2+"|"+rvalXx, "ldx {z2}", "$1xx$2z2$3", null, null)); // Replace second (of 2) Z2 with XX synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*vb.)z2(.*)", lvalZ2+"|"+rvalXx, "ldx {z2}", "$1z2$2xx$3", null, null)); // Replace Z3 with AA (only one) - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalAa, "lda {z3}", "$1aa$2", null, mapZ4)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalAa, "lda {z3}", "$1aa$2", null, mapZ3)); // Replace Z3 with YY (only one) - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalYy, "ldy {z3}", "$1yy$2", null, mapZ4)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalYy, "ldy {z3}", "$1yy$2", null, mapZ3)); // Replace Z3 with XX (only one) - synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalXx, "ldx {z3}", "$1xx$2", null, mapZ4)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalXx, "ldx {z3}", "$1xx$2", null, mapZ3)); // Correct wrong ordered Z2/Z1 synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*)z1(.*)", twoZ1+"|"+twoZ2, null, "$1z1$2z2$3", null, mapZ2Swap, false)); @@ -553,8 +585,8 @@ class AsmFragmentTemplateSynthesisRule { // OLD STYLE REWRITES - written when only one rule could be taken - synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*)", twoZ1+"|"+twoC1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapZC)); - synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuz2=(.*)", twoZ1+"|"+twoZ2, null, "vb$1aa=$2", "ldy {z2}\n" + "sta ({z1}),y", mapZ2)); + synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*)", twoZ1+"|"+twoC1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapZ1C1)); + synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuz2=(.*)", twoZ1+"|"+twoZ2, null, "vb$1aa=$2", "ldy {z2}\n" + "sta ({z1}),y", mapZ12)); // Convert array indexing with A register to X/Y register by prefixing tax/tay (..._derefidx_vbuaa... -> ..._derefidx_vbuxx... /... _derefidx_vbuyy... ) synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuaa(.*)", rvalXx, "tax", "$1=$2_derefidx_vbuxx$3", null, null)); @@ -565,8 +597,8 @@ class AsmFragmentTemplateSynthesisRule { // Convert array indexing with zero page to x/y register by prefixing ldx z1 / ldy z1 ( ..._derefidx_vbuzn... -> ..._derefidx_vbuxx... / ..._derefidx_vbuyy... ) synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz1(.*)", rvalXx+"|"+twoZ1, "ldx {z1}", "$1=$2_derefidx_vbuxx$3", null, mapZ1)); synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz1(.*)", rvalYy+"|"+twoZ1, "ldy {z1}", "$1=$2_derefidx_vbuyy$3", null, mapZ1)); - synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz2(.*)", rvalXx+"|"+twoZ2, "ldx {z2}", "$1=$2_derefidx_vbuxx$3", null, mapZ3)); - synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz2(.*)", rvalYy+"|"+twoZ2, "ldy {z2}", "$1=$2_derefidx_vbuyy$3", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz2(.*)", rvalXx+"|"+twoZ2, "ldx {z2}", "$1=$2_derefidx_vbuxx$3", null, mapZ2)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz2(.*)", rvalYy+"|"+twoZ2, "ldy {z2}", "$1=$2_derefidx_vbuyy$3", null, mapZ2)); synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz3(.*)", rvalYy, "ldy {z3}", "$1=$2_derefidx_vbuyy$3", null, null)); synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz3(.*)", rvalXx, "ldx {z3}", "$1=$2_derefidx_vbuxx$3", null, null)); @@ -575,9 +607,13 @@ class AsmFragmentTemplateSynthesisRule { synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuaa(.*)_derefidx_vbuaa(.*)", threeAa+"|"+rvalYy+"|"+lvalDerefIdxAa, "tay", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, null)); synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1(.*)_derefidx_vbuz1(.*)", threeZ1+"|"+rvalXx+"|"+lvalDerefIdxZ1, "ldx {z1}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ1)); synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1(.*)_derefidx_vbuz1(.*)", threeZ1+"|"+rvalYy+"|"+lvalDerefIdxZ1, "ldy {z1}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ1)); - synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalXx+"|"+lvalDerefIdxZ2, "ldx {z2}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ1)); - synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalYy+"|"+lvalDerefIdxZ2, "ldy {z2}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ1)); - + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalXx+"|"+lvalDerefIdxZ2, "ldx {z2}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ2)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalYy+"|"+lvalDerefIdxZ2, "ldy {z2}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ2)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz3(.*)_derefidx_vbuz3(.*)", threeZ3+"|"+rvalXx+"|"+lvalDerefIdxZ3, "ldx {z3}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz3(.*)_derefidx_vbuz3(.*)", threeZ3+"|"+rvalYy+"|"+lvalDerefIdxZ3, "ldy {z3}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ3)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz4(.*)_derefidx_vbuz4(.*)", threeZ4+"|"+rvalXx+"|"+lvalDerefIdxZ4, "ldx {z4}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ4)); + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz4(.*)_derefidx_vbuz4(.*)", threeZ4+"|"+rvalYy+"|"+lvalDerefIdxZ4, "ldy {z4}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ4)); + synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*c1.*)", twoZ1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapZ1)); synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*z1.*)", twoC1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapC1)); diff --git a/src/main/kc/stdlib/string.kc b/src/main/kc/stdlib/string.kc index 1839e51b2..12c3b6a85 100644 --- a/src/main/kc/stdlib/string.kc +++ b/src/main/kc/stdlib/string.kc @@ -5,9 +5,9 @@ typedef word size_t ; // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. void* memcpy( void* destination, void* source, size_t num ) { - byte* src = source; - byte* dst = destination; - byte* src_end = (byte*)source+num; + char* src = source; + char* dst = destination; + char* src_end = (char*)source+num; while(src!=src_end) *dst++ = *src++; return destination; } @@ -19,25 +19,25 @@ void* memmove( void* destination, void* source, size_t num ) { memcpy(destination, source, num); } else { // copy backwards - byte* src = (byte*)source+num; - byte* dst = (byte*)destination+num; + char* src = (char*)source+num; + char* dst = (char*)destination+num; for( size_t i=0; i s) { b |= bittab[ii]; } diff --git a/src/test/kc/plasma-center.kc b/src/test/kc/plasma-center.kc new file mode 100644 index 000000000..5d66b204a --- /dev/null +++ b/src/test/kc/plasma-center.kc @@ -0,0 +1,133 @@ +// Plasma based on the distance/angle to the screen center + +import "c64" +import "stdlib" +import "string" +import "sqr" +import "atan2" +import "print" +import "sid" + + +const char[0x200] align(0x100) SINTABLE = kickasm {{ + .for(var i=0;i<$200;i++) + .byte round(127.5+127.5*sin(2*PI*i/256)) +}}; + +// Screen containing distance to center +const byte* SCREEN_DIST = malloc(1000); +// Screen containing angle to center +const byte* SCREEN_ANGLE = malloc(1000); +// Plasma charset +const char* CHARSET = 0x2000; +// Plasma screen 1 +const char* SCREEN1 = 0x2800; +// Plasma screen 2 +const char* SCREEN2 = 0x2c00; + +void main() { + init_dist_screen(SCREEN_DIST); + init_angle_screen(SCREEN_ANGLE); + make_plasma_charset(CHARSET); + memset(COLS, BLACK, 1000); + // Show double-buffered plasma + while(true) { + doplasma(SCREEN1); + *D018 = toD018(SCREEN1, CHARSET); + doplasma(SCREEN2); + *D018 = toD018(SCREEN2, CHARSET); + } +} + +// Offsets for the sines +byte sin_offset_x = 0; +byte sin_offset_y = 0; + +// Render plasma to the passed screen +void doplasma (char* screen) { + char* angle = SCREEN_ANGLE; + char* dist = SCREEN_DIST; + byte* sin_x = SINTABLE+sin_offset_x; + byte* sin_y = SINTABLE+sin_offset_y; + for( char y: 0..25) { + for( char x: 0..39) { + screen[x] = sin_x[angle[x]] + sin_y[dist[x]]; + } + screen += 40; + angle += 40; + dist += 40; + } + sin_offset_x -= 3; + sin_offset_y -= 7; +} + + +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +void init_angle_screen(byte* screen) { + byte* screen_topline = screen+40*12; + byte *screen_bottomline = screen+40*12; + for(byte y: 0..12) { + for( byte x=0,xb=39; x<=19; x++, xb--) { + signed word xw = (signed word)(word){ 39-x*2, 0 }; + signed word yw = (signed word)(word){ y*2, 0 }; + word angle_w = atan2_16(xw, yw); + byte ang_w = >(angle_w+0x0080); + screen_bottomline[xb] = ang_w; + screen_topline[xb] = -ang_w; + screen_topline[x] = 0x80+ang_w; + screen_bottomline[x] = 0x80-ang_w; + } + screen_topline -= 40; + screen_bottomline += 40; + } +} + +// Populates 1000 bytes (a screen) with values representing the distance to the center. +// The actual value stored is distance*2 to increase precision +void init_dist_screen(byte* screen) { + NUM_SQUARES = 0x30; + init_squares(); + byte* screen_topline = screen; + byte *screen_bottomline = screen+40*24; + for(byte y: 0..12) { + byte y2 = y*2; + byte yd = (y2>=24)?(y2-24):(24-y2); + word yds = sqr(yd); + for( byte x=0,xb=39; x<=19; x++, xb--) { + byte x2 = x*2; + byte xd = (x2>=39)?(x2-39):(39-x2); + word xds = sqr(xd); + word ds = xds+yds; + byte d = sqrt(ds); + screen_topline[x] = d; + screen_bottomline[x] = d; + screen_topline[xb] = d; + screen_bottomline[xb] = d; + } + screen_topline += 40; + screen_bottomline -= 40; + } +} + +// Make a plasma-friendly charset where the chars are randomly filled +void make_plasma_charset(char* charset) { + const char[8] bittab = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; + sid_rnd_init(); + print_cls(); + for (unsigned int c = 0; c < 0x100; ++c) { + char s = SINTABLE[ s) { + b |= bittab[ii]; + } + } + charset[(c*8) + i] = b; + } + if ((c & 0x07) == 0) { + print_char('.'); + } + } +} \ No newline at end of file diff --git a/src/test/kc/sid.kc b/src/test/kc/sid.kc new file mode 100644 index 000000000..6713cd2fc --- /dev/null +++ b/src/test/kc/sid.kc @@ -0,0 +1,27 @@ +// SID registers for random number generation +const word* SID_VOICE3_FREQ = $d40e; +const byte* SID_VOICE3_FREQ_LOW = $d40e; +const byte* SID_VOICE3_FREQ_HIGH = $d40f; +const byte* SID_VOICE3_CONTROL = $d412; +const byte SID_CONTROL_NOISE = $80; +const byte SID_CONTROL_PULSE = $40; +const byte SID_CONTROL_SAWTOOTH = $20; +const byte SID_CONTROL_TRIANGLE = $10; +const byte SID_CONTROL_TEST = $08; +const byte SID_CONTROL_RING = $04; +const byte SID_CONTROL_SYNC = $02; +const byte SID_CONTROL_GATE = $01; +const byte* SID_VOICE3_OSC = $d41b; + +// Initialize SID voice 3 for random number generation +void sid_rnd_init() { + *SID_VOICE3_FREQ = $ffff; + *SID_VOICE3_CONTROL = SID_CONTROL_NOISE; +} + +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +byte sid_rnd() { + return *SID_VOICE3_OSC; +} + diff --git a/src/test/ref/examples/plasma/plasma.asm b/src/test/ref/examples/plasma/plasma.asm index d5aaa43cd..f08ca4975 100644 --- a/src/test/ref/examples/plasma/plasma.asm +++ b/src/test/ref/examples/plasma/plasma.asm @@ -322,5 +322,5 @@ sid_rnd_init: { .align $100 SINTABLE: .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) diff --git a/src/test/ref/examples/plasma/plasma.log b/src/test/ref/examples/plasma/plasma.log index d2c392ccf..e4dd9b165 100644 --- a/src/test/ref/examples/plasma/plasma.log +++ b/src/test/ref/examples/plasma/plasma.log @@ -118,7 +118,7 @@ sid_rnd::@return: scope:[sid_rnd] from sid_rnd (byte*) SCREEN2#0 ← ((byte*)) (number) $2c00 (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte[$100]) SINTABLE#0 ← kickasm {{ .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) }} to:@28 main: scope:[main] from @30 @@ -1614,7 +1614,7 @@ Constant (const byte*) SCREEN1#0 = (byte*) 10240 Constant (const byte*) SCREEN2#0 = (byte*) 11264 Constant (const byte*) CHARSET#0 = (byte*) 8192 Constant (const byte[$100]) SINTABLE#0 = kickasm {{ .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) }} Constant (const byte) c1A#19 = 0 Constant (const byte) c1B#19 = 0 @@ -3037,7 +3037,7 @@ sid_rnd_init: { .align $100 SINTABLE: .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) REGISTER UPLIFT POTENTIAL REGISTERS @@ -3862,7 +3862,7 @@ sid_rnd_init: { .align $100 SINTABLE: .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) ASSEMBLER OPTIMIZATIONS @@ -4032,7 +4032,7 @@ FINAL SYMBOL TABLE (const byte*) SID_VOICE3_OSC#0 SID_VOICE3_OSC = (byte*) 54299 (byte[$100]) SINTABLE (const byte[$100]) SINTABLE#0 SINTABLE = kickasm {{ .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) }} (byte) c1A (byte) c1A#10 c1A zp ZP_BYTE:4 2.6000000000000005 @@ -4768,6 +4768,6 @@ sid_rnd_init: { .align $100 SINTABLE: .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) diff --git a/src/test/ref/examples/plasma/plasma.sym b/src/test/ref/examples/plasma/plasma.sym index 14896481e..5879199e1 100644 --- a/src/test/ref/examples/plasma/plasma.sym +++ b/src/test/ref/examples/plasma/plasma.sym @@ -29,7 +29,7 @@ (const byte*) SID_VOICE3_OSC#0 SID_VOICE3_OSC = (byte*) 54299 (byte[$100]) SINTABLE (const byte[$100]) SINTABLE#0 SINTABLE = kickasm {{ .for(var i=0;i<$100;i++) - .byte round(127.5+127.5*sin(toRadians(360*i/256))) + .byte round(127.5+127.5*sin(2*PI*i/256)) }} (byte) c1A (byte) c1A#10 c1A zp ZP_BYTE:4 2.6000000000000005 diff --git a/src/test/ref/plasma-center.asm b/src/test/ref/plasma-center.asm new file mode 100644 index 000000000..af9c2e521 --- /dev/null +++ b/src/test/ref/plasma-center.asm @@ -0,0 +1,940 @@ +// Plasma based on the distance/angle to the screen center +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" + .const SIZEOF_WORD = 2 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + // Start of the heap used by malloc() + .label HEAP_START = $c000 + // The number of iterations performed during 16-bit CORDIC atan2 calculation + .const CORDIC_ITERATIONS_16 = $f + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + // Plasma charset + .label CHARSET = $2000 + // Plasma screen 1 + .label SCREEN1 = $2800 + // Plasma screen 2 + .label SCREEN2 = $2c00 + .const NUM_SQUARES = $30 + .label heap_head = $32 + .label SQUARES = $4f + .label print_char_cursor = $f + // Screen containing distance to center + .label SCREEN_DIST = $36 + // Screen containing angle to center + .label SCREEN_ANGLE = $38 + .label sin_offset_x = 2 + .label sin_offset_y = 3 +bbegin: + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 + lda #HEAP_START + sta heap_head+1 + jsr malloc + lda malloc.mem + sta SCREEN_DIST + lda malloc.mem+1 + sta SCREEN_DIST+1 + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 + jsr malloc + lda malloc.mem + sta SCREEN_ANGLE + lda malloc.mem+1 + sta SCREEN_ANGLE+1 + jsr main + rts +main: { + .const toD0181_return = (>(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(SCREEN2&$3fff)*4)|(>CHARSET)/4&$f + lda SCREEN_DIST + sta init_dist_screen.screen + lda SCREEN_DIST+1 + sta init_dist_screen.screen+1 + jsr init_dist_screen + lda SCREEN_ANGLE + sta init_angle_screen.screen + lda SCREEN_ANGLE+1 + sta init_angle_screen.screen+1 + jsr init_angle_screen + jsr make_plasma_charset + jsr memset + lda #0 + sta sin_offset_y + sta sin_offset_x + // Show double-buffered plasma + b2: + lda #SCREEN1 + sta doplasma.screen+1 + jsr doplasma + lda #toD0181_return + sta D018 + lda #SCREEN2 + sta doplasma.screen+1 + jsr doplasma + lda #toD0182_return + sta D018 + jmp b2 +} +// Render plasma to the passed screen +// doplasma(byte* zeropage(8) screen) +doplasma: { + .label angle = 4 + .label dist = 6 + .label sin_x = $3a + .label sin_y = $3c + .label screen = 8 + .label y = $a + lda SCREEN_ANGLE + sta angle + lda SCREEN_ANGLE+1 + sta angle+1 + lda SCREEN_DIST + sta dist + lda SCREEN_DIST+1 + sta dist+1 + lda sin_offset_x + clc + adc #SINTABLE + adc #0 + sta sin_x+1 + lda sin_offset_y + clc + adc #SINTABLE + adc #0 + sta sin_y+1 + lda #0 + sta y + b1: + ldx #0 + b2: + txa + tay + lda (dist),y + sta $ff + lda (angle),y + tay + lda (sin_x),y + ldy $ff + clc + adc (sin_y),y + stx $ff + ldy $ff + sta (screen),y + inx + cpx #$28 + bne b2 + lda #$28 + clc + adc screen + sta screen + bcc !+ + inc screen+1 + !: + lda #$28 + clc + adc angle + sta angle + bcc !+ + inc angle+1 + !: + lda #$28 + clc + adc dist + sta dist + bcc !+ + inc dist+1 + !: + inc y + lda #$1a + cmp y + bne b1 + lax sin_offset_x + axs #3 + stx sin_offset_x + lax sin_offset_y + axs #7 + stx sin_offset_y + rts +} +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .const num = $3e8 + .label str = COLS + .label end = str+num + .label dst = $b + lda #str + sta dst+1 + b1: + lda #BLACK + ldy #0 + sta (dst),y + inc dst + bne !+ + inc dst+1 + !: + lda dst+1 + cmp #>end + bne b1 + lda dst + cmp #print_line_cursor + sta print_char_cursor+1 + lda #0 + sta c + sta c+1 + b1: + lda c + tay + lda SINTABLE,y + sta s + lda #0 + sta i + b2: + ldy #0 + ldx #0 + b3: + jsr sid_rnd + and #$ff + sta _4 + lda s + cmp _4 + bcs b4 + tya + ora bittab,x + tay + b4: + inx + cpx #8 + bcc b3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + lda i + clc + adc _9 + sta _9 + bcc !+ + inc _9+1 + !: + clc + lda _16 + adc #CHARSET + sta _16+1 + tya + ldy #0 + sta (_16),y + inc i + lda i + cmp #8 + bcc b2 + lda c + and #7 + cmp #0 + bne b9 + jsr print_char + b9: + inc c + bne !+ + inc c+1 + !: + lda c+1 + cmp #>$100 + bcc b1 + bne !+ + lda c + cmp #<$100 + bcc b1 + !: + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +// Print a single char +print_char: { + .const ch = '.' + lda #ch + ldy #0 + sta (print_char_cursor),y + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + rts +} +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + lda SID_VOICE3_OSC + rts +} +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = $12 + lda #print_line_cursor + sta sc+1 + b1: + lda #' ' + ldy #0 + sta (sc),y + inc sc + bne !+ + inc sc+1 + !: + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + rts +} +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($15) screen) +init_angle_screen: { + .label _10 = $1f + .label screen = $15 + .label screen_topline = $17 + .label screen_bottomline = $15 + .label xw = $42 + .label yw = $44 + .label angle_w = $1f + .label ang_w = $46 + .label x = $19 + .label xb = $1a + .label y = $14 + lda screen + clc + adc #<$28*$c + sta screen_topline + lda screen+1 + adc #>$28*$c + sta screen_topline+1 + clc + lda screen_bottomline + adc #<$28*$c + sta screen_bottomline + lda screen_bottomline+1 + adc #>$28*$c + sta screen_bottomline+1 + lda #0 + sta y + b1: + lda #$27 + sta xb + lda #0 + sta x + b2: + lda x + asl + eor #$ff + clc + adc #$27+1 + ldy #0 + sta xw+1 + sty xw + lda y + asl + sta yw+1 + sty yw + jsr atan2_16 + lda #$80 + clc + adc _10 + sta _10 + bcc !+ + inc _10+1 + !: + lda _10+1 + sta ang_w + ldy xb + sta (screen_bottomline),y + eor #$ff + clc + adc #1 + sta (screen_topline),y + lda #$80 + clc + adc ang_w + ldy x + sta (screen_topline),y + lda #$80 + sec + sbc ang_w + sta (screen_bottomline),y + inc x + dec xb + lda x + cmp #$13+1 + bcc b2 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + inc y + lda #$d + cmp y + bne b1 + rts +} +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($42) x, signed word zeropage($44) y) +atan2_16: { + .label _2 = $1b + .label _7 = $1d + .label yi = $1b + .label xi = $1d + .label angle = $1f + .label xd = $23 + .label yd = $21 + .label return = $1f + .label x = $42 + .label y = $44 + lda y+1 + bmi !b1+ + jmp b1 + !b1: + sec + lda #0 + sbc y + sta _2 + lda #0 + sbc y+1 + sta _2+1 + b3: + lda x+1 + bmi !b4+ + jmp b4 + !b4: + sec + lda #0 + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + b6: + lda #0 + sta angle + sta angle+1 + tax + b10: + lda yi+1 + bne b11 + lda yi + bne b11 + b12: + lsr angle+1 + ror angle + lda x+1 + bpl b7 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + b7: + lda y+1 + bpl b8 + sec + lda #0 + sbc angle + sta angle + lda #0 + sbc angle+1 + sta angle+1 + b8: + rts + b11: + txa + tay + lda xi + sta xd + lda xi+1 + sta xd+1 + lda yi + sta yd + lda yi+1 + sta yd+1 + b13: + cpy #2 + bcs b14 + cpy #0 + beq b17 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + b17: + lda yi+1 + bpl b18 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + lda yi + clc + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + txa + asl + tay + sec + lda angle + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + b19: + inx + cpx #CORDIC_ITERATIONS_16-1+1 + bne !b12+ + jmp b12 + !b12: + jmp b10 + b18: + lda xi + clc + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 + txa + asl + tay + clc + lda angle + adc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + jmp b19 + b14: + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + dey + dey + jmp b13 + b4: + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6 + b1: + lda y + sta yi + lda y+1 + sta yi+1 + jmp b3 +} +// Populates 1000 bytes (a screen) with values representing the distance to the center. +// The actual value stored is distance*2 to increase precision +// init_dist_screen(byte* zeropage($26) screen) +init_dist_screen: { + .label screen = $26 + .label screen_bottomline = $28 + .label yds = $47 + .label xds = $49 + .label ds = $49 + .label x = $2a + .label xb = $2b + .label screen_topline = $26 + .label y = $25 + jsr init_squares + lda screen + clc + adc #<$28*$18 + sta screen_bottomline + lda screen+1 + adc #>$28*$18 + sta screen_bottomline+1 + lda #0 + sta y + b1: + lda y + asl + cmp #$18 + bcs b2 + eor #$ff + clc + adc #$18+1 + b4: + jsr sqr + lda sqr.return + sta sqr.return_2 + lda sqr.return+1 + sta sqr.return_2+1 + lda #$27 + sta xb + lda #0 + sta x + b5: + lda x + asl + cmp #$27 + bcs b6 + eor #$ff + clc + adc #$27+1 + b8: + jsr sqr + lda ds + clc + adc yds + sta ds + lda ds+1 + adc yds+1 + sta ds+1 + jsr sqrt + ldy x + sta (screen_topline),y + sta (screen_bottomline),y + ldy xb + sta (screen_topline),y + sta (screen_bottomline),y + inc x + dec xb + lda x + cmp #$13+1 + bcc b5 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 + !: + lda screen_bottomline + sec + sbc #<$28 + sta screen_bottomline + lda screen_bottomline+1 + sbc #>$28 + sta screen_bottomline+1 + inc y + lda #$d + cmp y + bne b1 + rts + b6: + sec + sbc #$27 + jmp b8 + b2: + sec + sbc #$18 + jmp b4 +} +// Find the (integer) square root of a word value +// If the square is not an integer then it returns the largest integer N where N*N <= val +// Uses a table of squares that must be initialized by calling init_squares() +// sqrt(word zeropage($49) val) +sqrt: { + .label _1 = $2c + .label _3 = $2c + .label found = $2c + .label val = $49 + lda SQUARES + sta bsearch16u.items + lda SQUARES+1 + sta bsearch16u.items+1 + jsr bsearch16u + lda _3 + sec + sbc SQUARES + sta _3 + lda _3+1 + sbc SQUARES+1 + sta _3+1 + lsr _1+1 + ror _1 + lda _1 + rts +} +// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. +// - key - The value to look for +// - items - Pointer to the start of the array to search in +// - num - The number of items in the array +// Returns pointer to an entry in the array that matches the search key +// bsearch16u(word zeropage($49) key, word* zeropage($2c) items, byte register(X) num) +bsearch16u: { + .label _2 = $2c + .label pivot = $4b + .label result = $4d + .label return = $2c + .label items = $2c + .label key = $49 + ldx #NUM_SQUARES + b3: + cpx #0 + bne b4 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq b2 + !: + bcc b2 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + b2: + rts + b4: + txa + lsr + asl + clc + adc items + sta pivot + lda #0 + adc items+1 + sta pivot+1 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + bne b6 + lda result + bne b6 + lda pivot + sta return + lda pivot+1 + sta return+1 + rts + b6: + lda result+1 + bmi b7 + bne !+ + lda result + beq b7 + !: + lda #1*SIZEOF_WORD + clc + adc pivot + sta items + lda #0 + adc pivot+1 + sta items+1 + dex + b7: + txa + lsr + tax + jmp b3 +} +// Find the square of a byte value +// Uses a table of squares that must be initialized by calling init_squares() +// sqr(byte register(A) val) +sqr: { + .label return = $49 + .label return_2 = $47 + asl + tay + lda (SQUARES),y + sta return + iny + lda (SQUARES),y + sta return+1 + rts +} +// Initialize squares table +// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 +init_squares: { + .label squares = $30 + .label sqr = $2e + lda #NUM_SQUARES*SIZEOF_WORD + sta malloc.size + lda #0 + sta malloc.size+1 + jsr malloc + lda SQUARES + sta squares + lda SQUARES+1 + sta squares+1 + ldx #0 + txa + sta sqr + sta sqr+1 + b1: + ldy #0 + lda sqr + sta (squares),y + iny + lda sqr+1 + sta (squares),y + lda #SIZEOF_WORD + clc + adc squares + sta squares + bcc !+ + inc squares+1 + !: + txa + asl + clc + adc #1 + clc + adc sqr + sta sqr + bcc !+ + inc sqr+1 + !: + inx + cpx #NUM_SQUARES-1+1 + bne b1 + rts +} +// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. +// The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. +// malloc(word zeropage($34) size) +malloc: { + .label mem = $4f + .label size = $34 + lda heap_head + sta mem + lda heap_head+1 + sta mem+1 + lda heap_head + clc + adc size + sta heap_head + lda heap_head+1 + adc size+1 + sta heap_head+1 + rts +} + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i (word~) init_angle_screen::$10 + [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [119] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [120] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [121] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 + [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [124] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [125] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [126] return + to:@return +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [129] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) + [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [132] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) + to:atan2_16::@10 +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [133] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [133] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [133] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [133] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + to:atan2_16::@12 +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [135] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 + [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 + [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [139] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) + [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@9 +atan2_16::@9: scope:[atan2_16] from atan2_16::@7 + [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 + [142] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [143] return + to:@return +atan2_16::@11: scope:[atan2_16] from atan2_16::@10 + [144] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 + [147] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) + [147] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) + [147] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) + [148] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [152] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [152] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [158] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [158] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [158] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [159] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [160] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 + to:atan2_16::@10 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [167] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@1: scope:[atan2_16] from atan2_16 + [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 + to:atan2_16::@3 +init_dist_screen: scope:[init_dist_screen] from main + [170] phi() + [171] call init_squares + to:init_dist_screen::@10 +init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen + [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@9 + [173] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#0 ) + [173] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen#0 ) + [173] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen::@10/(byte) 0 ) + [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 + [175] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [177] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [178] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [179] call sqr + [180] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@4 + [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@13 + [182] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@11/(byte) $27 init_dist_screen::@13/(byte) init_dist_screen::xb#1 ) + [182] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@13/(byte) init_dist_screen::x#1 ) + [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 + [184] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [186] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [187] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [188] call sqr + [189] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@12 +init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@8 + [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [193] call sqrt + [194] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@13 +init_dist_screen::@13: scope:[init_dist_screen] from init_dist_screen::@12 + [195] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [196] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [197] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [198] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [199] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [200] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [201] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [202] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 + to:init_dist_screen::@9 +init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@13 + [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [205] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [206] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 + [207] return + to:@return +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [208] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +sqrt: scope:[sqrt] from init_dist_screen::@12 + [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 + [212] call bsearch16u + [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@1 +sqrt::@1: scope:[sqrt] from sqrt + [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 + [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 + [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@1 + [218] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + [219] phi() + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 + [220] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) + [220] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) + [221] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 + to:bsearch16u::@5 +bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 + [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + to:bsearch16u::@1 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 + [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + to:bsearch16u::@2 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 + [224] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 + [225] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [226] return + to:@return +bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 + [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 + [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 + [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 + to:bsearch16u::@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 + to:bsearch16u::@9 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 + [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [235] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 + [236] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) + [236] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) + [237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@3 +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [238] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [241] return + to:@return +init_squares: scope:[init_squares] from init_dist_screen + [242] phi() + [243] call malloc + to:init_squares::@2 +init_squares::@2: scope:[init_squares] from init_squares + [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 + [246] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [246] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [246] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [254] return + to:@return +malloc: scope:[malloc] from @1 @3 init_squares + [255] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [255] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_START#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 + [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [258] return + to:@return diff --git a/src/test/ref/plasma-center.log b/src/test/ref/plasma-center.log new file mode 100644 index 000000000..8367be34e --- /dev/null +++ b/src/test/ref/plasma-center.log @@ -0,0 +1,11650 @@ +Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6 +Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1 +Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1 +Fixing pointer increment (word*) init_squares::squares ← ++ (word*) init_squares::squares +Fixing pointer addition (word~) sqrt::$1 ← (word*) sqrt::found - (word*) SQUARES +Fixing pointer array-indexing *((word*) SQUARES + (byte) sqr::val) +Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) +Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift +Identified constant variable (byte*) HEAP_START +Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx +Inlined call (byte~) main::$5 ← call toD018 (byte*) SCREEN1 (byte*) CHARSET +Inlined call (byte~) main::$7 ← call toD018 (byte*) SCREEN2 (byte*) CHARSET +Culled Empty Block (label) @1 +Culled Empty Block (label) @2 +Culled Empty Block (label) @3 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) bsearch16u::@11 +Culled Empty Block (label) bsearch16u::@12 +Culled Empty Block (label) bsearch16u::@14 +Culled Empty Block (label) bsearch16u::@16 +Culled Empty Block (label) bsearch16u::@17 +Culled Empty Block (label) bsearch16u::@4 +Culled Empty Block (label) bsearch16u::@5 +Culled Empty Block (label) @7 +Culled Empty Block (label) @8 +Culled Empty Block (label) @9 +Culled Empty Block (label) memset::@3 +Culled Empty Block (label) @10 +Culled Empty Block (label) init_squares::@2 +Culled Empty Block (label) @12 +Culled Empty Block (label) sqr::@1 +Culled Empty Block (label) @13 +Culled Empty Block (label) sqrt::@1 +Culled Empty Block (label) atan2_16::@9 +Culled Empty Block (label) atan2_16::@10 +Culled Empty Block (label) atan2_16::@11 +Culled Empty Block (label) atan2_16::@12 +Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@29 +Culled Empty Block (label) atan2_16::@21 +Culled Empty Block (label) atan2_16::@22 +Culled Empty Block (label) atan2_16::@23 +Culled Empty Block (label) atan2_16::@31 +Culled Empty Block (label) atan2_16::@32 +Culled Empty Block (label) atan2_16::@14 +Culled Empty Block (label) @15 +Culled Empty Block (label) @17 +Culled Empty Block (label) @18 +Culled Empty Block (label) @19 +Culled Empty Block (label) @20 +Culled Empty Block (label) @21 +Culled Empty Block (label) @22 +Culled Empty Block (label) @23 +Culled Empty Block (label) @24 +Culled Empty Block (label) @25 +Culled Empty Block (label) @26 +Culled Empty Block (label) @27 +Culled Empty Block (label) @28 +Culled Empty Block (label) @29 +Culled Empty Block (label) @30 +Culled Empty Block (label) @31 +Culled Empty Block (label) @32 +Culled Empty Block (label) @33 +Culled Empty Block (label) @34 +Culled Empty Block (label) @35 +Culled Empty Block (label) @36 +Culled Empty Block (label) @38 +Culled Empty Block (label) sid_rnd::@1 +Culled Empty Block (label) main::toD0181_@1 +Culled Empty Block (label) main::toD0182_@1 +Culled Empty Block (label) main::@4 +Culled Empty Block (label) main::@3 +Culled Empty Block (label) main::@5 +Culled Empty Block (label) main::@6 +Culled Empty Block (label) @41 +Culled Empty Block (label) init_angle_screen::@4 +Culled Empty Block (label) @42 +Culled Empty Block (label) init_dist_screen::@13 +Culled Empty Block (label) init_dist_screen::@14 +Culled Empty Block (label) init_dist_screen::@9 +Culled Empty Block (label) init_dist_screen::@10 +Culled Empty Block (label) init_dist_screen::@12 +Culled Empty Block (label) @43 +Culled Empty Block (label) make_plasma_charset::@10 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) D018#0 ← ((byte*)) (number) $d018 + (byte*) COLS#0 ← ((byte*)) (number) $d800 + (byte) BLACK#0 ← (number) 0 + to:@4 +@4: scope:[] from @begin + (byte*) HEAP_START#0 ← ((byte*)) (number) $c000 + (byte*) heap_head#0 ← (byte*) HEAP_START#0 + to:@11 +malloc: scope:[malloc] from @39 @45 init_squares + (word) malloc::size#3 ← phi( @39/(word) malloc::size#1 @45/(word) malloc::size#2 init_squares/(word) malloc::size#0 ) + (byte*) heap_head#12 ← phi( @39/(byte*) heap_head#23 @45/(byte*) heap_head#5 init_squares/(byte*) heap_head#24 ) + (byte*) malloc::mem#0 ← (byte*) heap_head#12 + (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 + (void*) malloc::return#0 ← ((void*)) (byte*) malloc::mem#0 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + (byte*) heap_head#13 ← phi( malloc/(byte*) heap_head#1 ) + (void*) malloc::return#5 ← phi( malloc/(void*) malloc::return#0 ) + (void*) malloc::return#1 ← (void*) malloc::return#5 + (byte*) heap_head#2 ← (byte*) heap_head#13 + return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + (word) bsearch16u::key#4 ← phi( sqrt/(word) bsearch16u::key#0 ) + (word*) bsearch16u::items#7 ← phi( sqrt/(word*) bsearch16u::items#1 ) + (byte) bsearch16u::num#7 ← phi( sqrt/(byte) bsearch16u::num#2 ) + to:bsearch16u::@6 +bsearch16u::@6: scope:[bsearch16u] from bsearch16u bsearch16u::@10 + (word) bsearch16u::key#3 ← phi( bsearch16u/(word) bsearch16u::key#4 bsearch16u::@10/(word) bsearch16u::key#5 ) + (word*) bsearch16u::items#6 ← phi( bsearch16u/(word*) bsearch16u::items#7 bsearch16u::@10/(word*) bsearch16u::items#8 ) + (byte) bsearch16u::num#3 ← phi( bsearch16u/(byte) bsearch16u::num#7 bsearch16u::@10/(byte) bsearch16u::num#0 ) + (bool~) bsearch16u::$5 ← (byte) bsearch16u::num#3 > (number) 0 + if((bool~) bsearch16u::$5) goto bsearch16u::@7 + to:bsearch16u::@8 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 + (word) bsearch16u::key#1 ← phi( bsearch16u::@6/(word) bsearch16u::key#3 ) + (word*) bsearch16u::items#2 ← phi( bsearch16u::@6/(word*) bsearch16u::items#6 ) + (byte) bsearch16u::num#4 ← phi( bsearch16u::@6/(byte) bsearch16u::num#3 ) + (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#4 >> (number) 1 + (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD + (word*~) bsearch16u::$7 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + (word*) bsearch16u::pivot#0 ← (word*~) bsearch16u::$7 + (signed word~) bsearch16u::$8 ← ((signed word)) (word) bsearch16u::key#1 + (signed word~) bsearch16u::$9 ← ((signed word)) *((word*) bsearch16u::pivot#0) + (signed word~) bsearch16u::$10 ← (signed word~) bsearch16u::$8 - (signed word~) bsearch16u::$9 + (signed word) bsearch16u::result#0 ← (signed word~) bsearch16u::$10 + (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (number) 0 + (bool~) bsearch16u::$12 ← ! (bool~) bsearch16u::$11 + if((bool~) bsearch16u::$12) goto bsearch16u::@9 + to:bsearch16u::@13 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@6 + (word) bsearch16u::key#2 ← phi( bsearch16u::@6/(word) bsearch16u::key#3 ) + (word*) bsearch16u::items#3 ← phi( bsearch16u::@6/(word*) bsearch16u::items#6 ) + (bool~) bsearch16u::$0 ← *((word*) bsearch16u::items#3) <= (word) bsearch16u::key#2 + if((bool~) bsearch16u::$0) goto bsearch16u::@1 + to:bsearch16u::@2 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@7 + (word) bsearch16u::key#7 ← phi( bsearch16u::@7/(word) bsearch16u::key#1 ) + (word*) bsearch16u::items#9 ← phi( bsearch16u::@7/(word*) bsearch16u::items#2 ) + (word*) bsearch16u::pivot#3 ← phi( bsearch16u::@7/(word*) bsearch16u::pivot#0 ) + (byte) bsearch16u::num#8 ← phi( bsearch16u::@7/(byte) bsearch16u::num#4 ) + (signed word) bsearch16u::result#1 ← phi( bsearch16u::@7/(signed word) bsearch16u::result#0 ) + (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (number) 0 + (bool~) bsearch16u::$14 ← ! (bool~) bsearch16u::$13 + if((bool~) bsearch16u::$14) goto bsearch16u::@10 + to:bsearch16u::@15 +bsearch16u::@13: scope:[bsearch16u] from bsearch16u::@7 + (word*) bsearch16u::pivot#1 ← phi( bsearch16u::@7/(word*) bsearch16u::pivot#0 ) + (word*) bsearch16u::return#0 ← (word*) bsearch16u::pivot#1 + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@13 bsearch16u::@3 + (word*) bsearch16u::return#4 ← phi( bsearch16u::@13/(word*) bsearch16u::return#0 bsearch16u::@3/(word*) bsearch16u::return#2 ) + (word*) bsearch16u::return#1 ← (word*) bsearch16u::return#4 + return + to:@return +bsearch16u::@10: scope:[bsearch16u] from bsearch16u::@15 bsearch16u::@9 + (word) bsearch16u::key#5 ← phi( bsearch16u::@15/(word) bsearch16u::key#6 bsearch16u::@9/(word) bsearch16u::key#7 ) + (word*) bsearch16u::items#8 ← phi( bsearch16u::@15/(word*) bsearch16u::items#0 bsearch16u::@9/(word*) bsearch16u::items#9 ) + (byte) bsearch16u::num#5 ← phi( bsearch16u::@15/(byte) bsearch16u::num#1 bsearch16u::@9/(byte) bsearch16u::num#8 ) + (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (number) 1 + to:bsearch16u::@6 +bsearch16u::@15: scope:[bsearch16u] from bsearch16u::@9 + (word) bsearch16u::key#6 ← phi( bsearch16u::@9/(word) bsearch16u::key#7 ) + (byte) bsearch16u::num#6 ← phi( bsearch16u::@9/(byte) bsearch16u::num#8 ) + (word*) bsearch16u::pivot#2 ← phi( bsearch16u::@9/(word*) bsearch16u::pivot#3 ) + (number~) bsearch16u::$17 ← (number) 1 * (const byte) SIZEOF_WORD + (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot#2 + (number~) bsearch16u::$17 + (word*) bsearch16u::items#0 ← (word*~) bsearch16u::$15 + (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#6 + to:bsearch16u::@10 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#4 ← phi( bsearch16u::@8/(word*) bsearch16u::items#3 ) + (word*~) bsearch16u::$3 ← (word*) bsearch16u::items#4 + to:bsearch16u::@3 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@8 + (word*) bsearch16u::items#5 ← phi( bsearch16u::@8/(word*) bsearch16u::items#3 ) + (number~) bsearch16u::$18 ← (number) 1 * (const byte) SIZEOF_WORD + (word*~) bsearch16u::$1 ← (word*) bsearch16u::items#5 - (number~) bsearch16u::$18 + (word*~) bsearch16u::$2 ← (word*~) bsearch16u::$1 + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 + (word*~) bsearch16u::$4 ← phi( bsearch16u::@1/(word*~) bsearch16u::$3 bsearch16u::@2/(word*~) bsearch16u::$2 ) + (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 + to:bsearch16u::@return +memset: scope:[memset] from main::@11 + (byte) memset::c#2 ← phi( main::@11/(byte) memset::c#0 ) + (word) memset::num#1 ← phi( main::@11/(word) memset::num#0 ) + (void*) memset::str#1 ← phi( main::@11/(void*) memset::str#0 ) + (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#1 + (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#1 + (byte*) memset::end#0 ← (byte*~) memset::$1 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#1 + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@1 + (void*) memset::str#3 ← phi( memset/(void*) memset::str#1 memset::@1/(void*) memset::str#3 ) + (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) + (byte) memset::c#1 ← phi( memset/(byte) memset::c#2 memset::@1/(byte) memset::c#1 ) + *((byte*) memset::dst#2) ← (byte) memset::c#1 + (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$2) goto memset::@1 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 + (void*) memset::str#2 ← phi( memset::@1/(void*) memset::str#3 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@return: scope:[memset] from memset::@2 + (void*) memset::return#3 ← phi( memset::@2/(void*) memset::return#0 ) + (void*) memset::return#1 ← (void*) memset::return#3 + return + to:@return +@11: scope:[] from @4 + (byte*) heap_head#44 ← phi( @4/(byte*) heap_head#0 ) + (byte) NUM_SQUARES#0 ← (number) $ff + (word*) SQUARES#0 ← (word*) 0 + to:@14 +init_squares: scope:[init_squares] from init_dist_screen + (byte*) heap_head#24 ← phi( init_dist_screen/(byte*) heap_head#28 ) + (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) + (byte~) init_squares::$0 ← (byte) NUM_SQUARES#6 * (const byte) SIZEOF_WORD + (word) malloc::size#0 ← (byte~) init_squares::$0 + call malloc + (void*) malloc::return#2 ← (void*) malloc::return#1 + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares + (byte) NUM_SQUARES#7 ← phi( init_squares/(byte) NUM_SQUARES#6 ) + (byte*) heap_head#14 ← phi( init_squares/(byte*) heap_head#2 ) + (void*) malloc::return#6 ← phi( init_squares/(void*) malloc::return#2 ) + (void*~) init_squares::$1 ← (void*) malloc::return#6 + (byte*) heap_head#3 ← (byte*) heap_head#14 + (word*) SQUARES#1 ← ((word*)) (void*~) init_squares::$1 + (word*) init_squares::squares#0 ← (word*) SQUARES#1 + (word) init_squares::sqr#0 ← (number) 0 + (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 + (byte) init_squares::i#0 ← (byte) 0 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 + (word*) SQUARES#17 ← phi( init_squares::@1/(word*) SQUARES#17 init_squares::@3/(word*) SQUARES#1 ) + (byte*) heap_head#25 ← phi( init_squares::@1/(byte*) heap_head#25 init_squares::@3/(byte*) heap_head#3 ) + (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(byte) init_squares::i#0 ) + (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(word) init_squares::sqr#0 ) + *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 + (number~) init_squares::$4 ← (number~) init_squares::$3 + (number) 1 + (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (number~) init_squares::$4 + (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) + (bool~) init_squares::$5 ← (byte) init_squares::i#1 != rangelast(0,init_squares::$2) + if((bool~) init_squares::$5) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + (word*) SQUARES#8 ← phi( init_squares::@1/(word*) SQUARES#17 ) + (byte*) heap_head#15 ← phi( init_squares::@1/(byte*) heap_head#25 ) + (byte*) heap_head#4 ← (byte*) heap_head#15 + (word*) SQUARES#2 ← (word*) SQUARES#8 + return + to:@return +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + (word*) SQUARES#9 ← phi( init_dist_screen::@4/(word*) SQUARES#18 init_dist_screen::@8/(word*) SQUARES#19 ) + (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD + (word) sqr::return#0 ← *((word*) SQUARES#9 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + (word) sqr::return#4 ← phi( sqr/(word) sqr::return#0 ) + (word) sqr::return#1 ← (word) sqr::return#4 + return + to:@return +sqrt: scope:[sqrt] from init_dist_screen::@17 + (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@17/(byte) NUM_SQUARES#13 ) + (word*) SQUARES#10 ← phi( init_dist_screen::@17/(word*) SQUARES#20 ) + (word) sqrt::val#1 ← phi( init_dist_screen::@17/(word) sqrt::val#0 ) + (word) bsearch16u::key#0 ← (word) sqrt::val#1 + (word*) bsearch16u::items#1 ← (word*) SQUARES#10 + (byte) bsearch16u::num#2 ← (byte) NUM_SQUARES#8 + call bsearch16u + (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@2 +sqrt::@2: scope:[sqrt] from sqrt + (word*) SQUARES#11 ← phi( sqrt/(word*) SQUARES#10 ) + (word*) bsearch16u::return#5 ← phi( sqrt/(word*) bsearch16u::return#3 ) + (word*~) sqrt::$0 ← (word*) bsearch16u::return#5 + (word*) sqrt::found#0 ← (word*~) sqrt::$0 + (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*) SQUARES#11 + (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD + (byte~) sqrt::$2 ← ((byte)) (word~) sqrt::$1 + (byte) sqrt::sq#0 ← (byte~) sqrt::$2 + (byte) sqrt::return#0 ← (byte) sqrt::sq#0 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@2 + (byte) sqrt::return#3 ← phi( sqrt::@2/(byte) sqrt::return#0 ) + (byte) sqrt::return#1 ← (byte) sqrt::return#3 + return + to:@return +@14: scope:[] from @11 + (word*) SQUARES#49 ← phi( @11/(word*) SQUARES#0 ) + (byte) NUM_SQUARES#42 ← phi( @11/(byte) NUM_SQUARES#0 ) + (byte*) heap_head#40 ← phi( @11/(byte*) heap_head#44 ) + (byte) CORDIC_ITERATIONS_16#0 ← (number) $f + (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i= (number) 0 + if((bool~) atan2_16::$0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@1: scope:[atan2_16] from atan2_16 + (signed word) atan2_16::x#5 ← phi( atan2_16/(signed word) atan2_16::x#9 ) + (signed word) atan2_16::y#2 ← phi( atan2_16/(signed word) atan2_16::y#1 ) + (signed word~) atan2_16::$3 ← (signed word) atan2_16::y#2 + to:atan2_16::@3 +atan2_16::@2: scope:[atan2_16] from atan2_16 + (signed word) atan2_16::x#6 ← phi( atan2_16/(signed word) atan2_16::x#9 ) + (signed word) atan2_16::y#3 ← phi( atan2_16/(signed word) atan2_16::y#1 ) + (signed word~) atan2_16::$1 ← - (signed word) atan2_16::y#3 + (signed word~) atan2_16::$2 ← (signed word~) atan2_16::$1 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + (signed word) atan2_16::y#15 ← phi( atan2_16::@1/(signed word) atan2_16::y#2 atan2_16::@2/(signed word) atan2_16::y#3 ) + (signed word) atan2_16::x#1 ← phi( atan2_16::@1/(signed word) atan2_16::x#5 atan2_16::@2/(signed word) atan2_16::x#6 ) + (signed word~) atan2_16::$4 ← phi( atan2_16::@1/(signed word~) atan2_16::$3 atan2_16::@2/(signed word~) atan2_16::$2 ) + (signed word) atan2_16::yi#0 ← (signed word~) atan2_16::$4 + (bool~) atan2_16::$5 ← (signed word) atan2_16::x#1 >= (number) 0 + if((bool~) atan2_16::$5) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + (signed word) atan2_16::y#12 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) + (signed word) atan2_16::yi#12 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::x#2 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) + (signed word~) atan2_16::$8 ← (signed word) atan2_16::x#2 + to:atan2_16::@6 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + (signed word) atan2_16::y#13 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) + (signed word) atan2_16::yi#13 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::x#3 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) + (signed word~) atan2_16::$6 ← - (signed word) atan2_16::x#3 + (signed word~) atan2_16::$7 ← (signed word~) atan2_16::$6 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + (signed word) atan2_16::y#9 ← phi( atan2_16::@4/(signed word) atan2_16::y#12 atan2_16::@5/(signed word) atan2_16::y#13 ) + (signed word) atan2_16::x#10 ← phi( atan2_16::@4/(signed word) atan2_16::x#2 atan2_16::@5/(signed word) atan2_16::x#3 ) + (signed word) atan2_16::yi#9 ← phi( atan2_16::@4/(signed word) atan2_16::yi#12 atan2_16::@5/(signed word) atan2_16::yi#13 ) + (signed word~) atan2_16::$9 ← phi( atan2_16::@4/(signed word~) atan2_16::$8 atan2_16::@5/(signed word~) atan2_16::$7 ) + (signed word) atan2_16::xi#0 ← (signed word~) atan2_16::$9 + (word) atan2_16::angle#0 ← (number) 0 + (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 + (byte) atan2_16::i#0 ← (byte) 0 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + (signed word) atan2_16::y#7 ← phi( atan2_16::@27/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) + (signed word) atan2_16::x#7 ← phi( atan2_16::@27/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) + (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) + (byte) atan2_16::i#6 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) + (signed word) atan2_16::xi#6 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#9 ) + (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 + (bool~) atan2_16::$18 ← ! (bool~) atan2_16::$17 + if((bool~) atan2_16::$18) goto atan2_16::@16 + to:atan2_16::@17 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + (signed word) atan2_16::y#19 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) + (signed word) atan2_16::x#17 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) + (word) atan2_16::angle#19 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) + (byte) atan2_16::i#2 ← phi( atan2_16::@15/(byte) atan2_16::i#6 ) + (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) + (signed word) atan2_16::xi#3 ← phi( atan2_16::@15/(signed word) atan2_16::xi#6 ) + (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#4 + (byte) atan2_16::shift#0 ← (byte) atan2_16::i#2 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@27/(signed word) atan2_16::y#8 ) + (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@27/(signed word) atan2_16::x#8 ) + (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) + (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 + (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 + (bool~) atan2_16::$11 ← ! (bool~) atan2_16::$10 + if((bool~) atan2_16::$11) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + (signed word) atan2_16::y#18 ← phi( atan2_16::@16/(signed word) atan2_16::y#19 atan2_16::@19/(signed word) atan2_16::y#20 ) + (signed word) atan2_16::x#16 ← phi( atan2_16::@16/(signed word) atan2_16::x#17 atan2_16::@19/(signed word) atan2_16::x#18 ) + (word) atan2_16::angle#18 ← phi( atan2_16::@16/(word) atan2_16::angle#19 atan2_16::@19/(word) atan2_16::angle#20 ) + (byte) atan2_16::i#10 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::i#11 ) + (signed word) atan2_16::xi#11 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xi#12 ) + (signed word) atan2_16::yi#14 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 atan2_16::@19/(signed word) atan2_16::yi#15 ) + (signed word) atan2_16::yd#7 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 atan2_16::@19/(signed word) atan2_16::yd#1 ) + (signed word) atan2_16::xd#7 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 atan2_16::@19/(signed word) atan2_16::xd#1 ) + (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::shift#0 atan2_16::@19/(byte) atan2_16::shift#1 ) + (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 + if((bool~) atan2_16::$19) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#20 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#18 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#20 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#11 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#12 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yi#15 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#3 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (signed word) atan2_16::yd#3 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#3 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 + (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 + (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#16 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#14 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#16 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#8 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#9 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yd#8 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#8 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::yi#10 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#4 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 + (bool~) atan2_16::$20 ← ! (bool~) atan2_16::$25 + if((bool~) atan2_16::$20) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + (signed word) atan2_16::y#14 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 atan2_16::@24/(signed word) atan2_16::y#17 ) + (signed word) atan2_16::x#13 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 atan2_16::@24/(signed word) atan2_16::x#15 ) + (word) atan2_16::angle#14 ← phi( atan2_16::@20/(word) atan2_16::angle#16 atan2_16::@24/(word) atan2_16::angle#17 ) + (byte) atan2_16::i#7 ← phi( atan2_16::@20/(byte) atan2_16::i#8 atan2_16::@24/(byte) atan2_16::i#9 ) + (signed word) atan2_16::xd#9 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 atan2_16::@24/(signed word) atan2_16::xd#2 ) + (signed word) atan2_16::yd#9 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 atan2_16::@24/(signed word) atan2_16::yd#2 ) + (signed word) atan2_16::xi#7 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 atan2_16::@24/(signed word) atan2_16::xi#10 ) + (signed word) atan2_16::yi#5 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 atan2_16::@24/(signed word) atan2_16::yi#11 ) + (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 + if((bool~) atan2_16::$21) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + (signed word) atan2_16::y#17 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 ) + (signed word) atan2_16::x#15 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 ) + (word) atan2_16::angle#17 ← phi( atan2_16::@20/(word) atan2_16::angle#16 ) + (byte) atan2_16::i#9 ← phi( atan2_16::@20/(byte) atan2_16::i#8 ) + (signed word) atan2_16::xi#10 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 ) + (signed word) atan2_16::yi#11 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yd#4 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 ) + (signed word) atan2_16::xd#4 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 ) + (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 + (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 + to:atan2_16::@25 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#10 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#11 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#7 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#3 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#5 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#6 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#5 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#4 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#5 + (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#6 - (signed word) atan2_16::xd#5 + (byte~) atan2_16::$23 ← (byte) atan2_16::i#3 * (const byte) SIZEOF_WORD + (word) atan2_16::angle#2 ← (word) atan2_16::angle#7 + *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#11 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#12 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#8 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#4 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#6 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#7 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#6 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#5 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#6 + (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#7 + (signed word) atan2_16::xd#6 + (byte~) atan2_16::$24 ← (byte) atan2_16::i#4 * (const byte) SIZEOF_WORD + (word) atan2_16::angle#3 ← (word) atan2_16::angle#8 - *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + (signed word) atan2_16::y#8 ← phi( atan2_16::@26/(signed word) atan2_16::y#10 atan2_16::@30/(signed word) atan2_16::y#11 ) + (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + (signed word) atan2_16::x#8 ← phi( atan2_16::@26/(signed word) atan2_16::x#11 atan2_16::@30/(signed word) atan2_16::x#12 ) + (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + (byte) atan2_16::i#5 ← phi( atan2_16::@26/(byte) atan2_16::i#3 atan2_16::@30/(byte) atan2_16::i#4 ) + (byte) atan2_16::i#1 ← (byte) atan2_16::i#5 + rangenext(0,atan2_16::$16) + (bool~) atan2_16::$22 ← (byte) atan2_16::i#1 != rangelast(0,atan2_16::$16) + if((bool~) atan2_16::$22) goto atan2_16::@15 + to:atan2_16::@17 +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@33/(signed word) atan2_16::y#6 ) + (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 + (bool~) atan2_16::$14 ← ! (bool~) atan2_16::$13 + if((bool~) atan2_16::$14) goto atan2_16::@8 + to:atan2_16::@13 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 + (signed word) atan2_16::y#6 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 ) + (word) atan2_16::angle#9 ← phi( atan2_16::@17/(word) atan2_16::angle#1 ) + (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 + (word) atan2_16::angle#4 ← (number~) atan2_16::$12 + to:atan2_16::@7 +atan2_16::@8: scope:[atan2_16] from atan2_16::@13 atan2_16::@7 + (word) atan2_16::angle#10 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#15 ) + (word) atan2_16::return#0 ← (word) atan2_16::angle#10 + to:atan2_16::@return +atan2_16::@13: scope:[atan2_16] from atan2_16::@7 + (word) atan2_16::angle#11 ← phi( atan2_16::@7/(word) atan2_16::angle#15 ) + (word~) atan2_16::$15 ← - (word) atan2_16::angle#11 + (word) atan2_16::angle#5 ← (word~) atan2_16::$15 + to:atan2_16::@8 +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + (word) atan2_16::return#3 ← phi( atan2_16::@8/(word) atan2_16::return#0 ) + (word) atan2_16::return#1 ← (word) atan2_16::return#3 + return + to:@return +@16: scope:[] from @14 + (word*) SQUARES#47 ← phi( @14/(word*) SQUARES#49 ) + (byte) NUM_SQUARES#38 ← phi( @14/(byte) NUM_SQUARES#42 ) + (byte*) heap_head#36 ← phi( @14/(byte*) heap_head#40 ) + (byte*) print_screen#0 ← ((byte*)) (number) $400 + (byte*) print_line_cursor#0 ← (byte*) print_screen#0 + (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 + to:@37 +print_char: scope:[print_char] from make_plasma_charset::@8 + (byte*) print_char_cursor#11 ← phi( make_plasma_charset::@8/(byte*) print_char_cursor#20 ) + (byte) print_char::ch#1 ← phi( make_plasma_charset::@8/(byte) print_char::ch#0 ) + *((byte*) print_char_cursor#11) ← (byte) print_char::ch#1 + (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#11 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + (byte*) print_char_cursor#12 ← phi( print_char/(byte*) print_char_cursor#1 ) + (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#12 + return + to:@return +print_cls: scope:[print_cls] from make_plasma_charset::@11 + (byte*) print_screen#1 ← phi( make_plasma_charset::@11/(byte*) print_screen#4 ) + (byte*) print_cls::sc#0 ← (byte*) print_screen#1 + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + (byte*) print_screen#2 ← phi( print_cls/(byte*) print_screen#1 print_cls::@1/(byte*) print_screen#2 ) + (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) print_cls::sc#0 print_cls::@1/(byte*) print_cls::sc#1 ) + *((byte*) print_cls::sc#2) ← (byte) ' ' + (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + (byte*~) print_cls::$0 ← (byte*) print_screen#2 + (number) $3e8 + (bool~) print_cls::$1 ← (byte*) print_cls::sc#1 != (byte*~) print_cls::$0 + if((bool~) print_cls::$1) goto print_cls::@1 + to:print_cls::@2 +print_cls::@2: scope:[print_cls] from print_cls::@1 + (byte*) print_screen#3 ← phi( print_cls::@1/(byte*) print_screen#2 ) + (byte*) print_line_cursor#1 ← (byte*) print_screen#3 + (byte*) print_char_cursor#3 ← (byte*) print_line_cursor#1 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@2 + (byte*) print_char_cursor#13 ← phi( print_cls::@2/(byte*) print_char_cursor#3 ) + (byte*) print_line_cursor#8 ← phi( print_cls::@2/(byte*) print_line_cursor#1 ) + (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#8 + (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#13 + return + to:@return +@37: scope:[] from @16 + (byte*) print_screen#14 ← phi( @16/(byte*) print_screen#0 ) + (byte*) print_char_cursor#43 ← phi( @16/(byte*) print_char_cursor#0 ) + (byte*) print_line_cursor#38 ← phi( @16/(byte*) print_line_cursor#0 ) + (word*) SQUARES#45 ← phi( @16/(word*) SQUARES#47 ) + (byte) NUM_SQUARES#35 ← phi( @16/(byte) NUM_SQUARES#38 ) + (byte*) heap_head#31 ← phi( @16/(byte*) heap_head#36 ) + (word*) SID_VOICE3_FREQ#0 ← ((word*)) (number) $d40e + (byte*) SID_VOICE3_CONTROL#0 ← ((byte*)) (number) $d412 + (byte) SID_CONTROL_NOISE#0 ← (number) $80 + (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (number) $d41b + to:@39 +sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset + *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff + *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + return + to:@return +sid_rnd: scope:[sid_rnd] from make_plasma_charset::@3 + (byte) sid_rnd::return#0 ← *((byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + (byte) sid_rnd::return#3 ← phi( sid_rnd/(byte) sid_rnd::return#0 ) + (byte) sid_rnd::return#1 ← (byte) sid_rnd::return#3 + return + to:@return +@39: scope:[] from @37 + (byte*) print_screen#13 ← phi( @37/(byte*) print_screen#14 ) + (byte*) print_char_cursor#39 ← phi( @37/(byte*) print_char_cursor#43 ) + (byte*) print_line_cursor#34 ← phi( @37/(byte*) print_line_cursor#38 ) + (word*) SQUARES#43 ← phi( @37/(word*) SQUARES#45 ) + (byte) NUM_SQUARES#32 ← phi( @37/(byte) NUM_SQUARES#35 ) + (byte*) heap_head#23 ← phi( @37/(byte*) heap_head#31 ) + (byte[$200]) SINTABLE#0 ← kickasm {{ .for(var i=0;i<$200;i++) + .byte round(127.5+127.5*sin(2*PI*i/256)) + }} + (word) malloc::size#1 ← (number) $3e8 + call malloc + (void*) malloc::return#3 ← (void*) malloc::return#1 + to:@45 +@45: scope:[] from @39 + (byte*) print_screen#12 ← phi( @39/(byte*) print_screen#13 ) + (byte*) print_char_cursor#36 ← phi( @39/(byte*) print_char_cursor#39 ) + (byte*) print_line_cursor#31 ← phi( @39/(byte*) print_line_cursor#34 ) + (word*) SQUARES#39 ← phi( @39/(word*) SQUARES#43 ) + (byte) NUM_SQUARES#28 ← phi( @39/(byte) NUM_SQUARES#32 ) + (byte*) heap_head#16 ← phi( @39/(byte*) heap_head#2 ) + (void*) malloc::return#7 ← phi( @39/(void*) malloc::return#3 ) + (void*~) $0 ← (void*) malloc::return#7 + (byte*) heap_head#5 ← (byte*) heap_head#16 + (byte*) SCREEN_DIST#0 ← ((byte*)) (void*~) $0 + (word) malloc::size#2 ← (number) $3e8 + call malloc + (void*) malloc::return#4 ← (void*) malloc::return#1 + to:@46 +@46: scope:[] from @45 + (byte*) print_screen#11 ← phi( @45/(byte*) print_screen#12 ) + (byte*) print_char_cursor#34 ← phi( @45/(byte*) print_char_cursor#36 ) + (byte*) print_line_cursor#28 ← phi( @45/(byte*) print_line_cursor#31 ) + (word*) SQUARES#36 ← phi( @45/(word*) SQUARES#39 ) + (byte) NUM_SQUARES#25 ← phi( @45/(byte) NUM_SQUARES#28 ) + (byte*) heap_head#17 ← phi( @45/(byte*) heap_head#2 ) + (void*) malloc::return#8 ← phi( @45/(void*) malloc::return#4 ) + (void*~) $1 ← (void*) malloc::return#8 + (byte*) heap_head#6 ← (byte*) heap_head#17 + (byte*) SCREEN_ANGLE#0 ← ((byte*)) (void*~) $1 + (byte*) CHARSET#0 ← ((byte*)) (number) $2000 + (byte*) SCREEN1#0 ← ((byte*)) (number) $2800 + (byte*) SCREEN2#0 ← ((byte*)) (number) $2c00 + to:@40 +main: scope:[main] from @44 + (byte) sin_offset_y#30 ← phi( @44/(byte) sin_offset_y#18 ) + (byte) sin_offset_x#30 ← phi( @44/(byte) sin_offset_x#18 ) + (byte*) print_screen#8 ← phi( @44/(byte*) print_screen#9 ) + (byte*) print_char_cursor#32 ← phi( @44/(byte*) print_char_cursor#25 ) + (byte*) print_line_cursor#26 ← phi( @44/(byte*) print_line_cursor#18 ) + (word*) SQUARES#21 ← phi( @44/(word*) SQUARES#25 ) + (byte*) heap_head#26 ← phi( @44/(byte*) heap_head#30 ) + (byte) NUM_SQUARES#14 ← phi( @44/(byte) NUM_SQUARES#17 ) + (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#0 + call init_dist_screen + to:main::@9 +main::@9: scope:[main] from main + (byte) sin_offset_y#29 ← phi( main/(byte) sin_offset_y#30 ) + (byte) sin_offset_x#29 ← phi( main/(byte) sin_offset_x#30 ) + (byte*) print_screen#7 ← phi( main/(byte*) print_screen#8 ) + (byte*) print_char_cursor#26 ← phi( main/(byte*) print_char_cursor#32 ) + (byte*) print_line_cursor#19 ← phi( main/(byte*) print_line_cursor#26 ) + (word*) SQUARES#12 ← phi( main/(word*) SQUARES#6 ) + (byte*) heap_head#18 ← phi( main/(byte*) heap_head#10 ) + (byte) NUM_SQUARES#9 ← phi( main/(byte) NUM_SQUARES#4 ) + (byte) NUM_SQUARES#1 ← (byte) NUM_SQUARES#9 + (byte*) heap_head#7 ← (byte*) heap_head#18 + (word*) SQUARES#3 ← (word*) SQUARES#12 + (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN_ANGLE#0 + call init_angle_screen + to:main::@10 +main::@10: scope:[main] from main::@9 + (byte) sin_offset_y#27 ← phi( main::@9/(byte) sin_offset_y#29 ) + (byte) sin_offset_x#27 ← phi( main::@9/(byte) sin_offset_x#29 ) + (word*) SQUARES#40 ← phi( main::@9/(word*) SQUARES#3 ) + (byte*) heap_head#41 ← phi( main::@9/(byte*) heap_head#7 ) + (byte) NUM_SQUARES#29 ← phi( main::@9/(byte) NUM_SQUARES#1 ) + (byte*) print_screen#6 ← phi( main::@9/(byte*) print_screen#7 ) + (byte*) print_char_cursor#21 ← phi( main::@9/(byte*) print_char_cursor#26 ) + (byte*) print_line_cursor#14 ← phi( main::@9/(byte*) print_line_cursor#19 ) + (byte*) make_plasma_charset::charset#0 ← (byte*) CHARSET#0 + call make_plasma_charset + to:main::@11 +main::@11: scope:[main] from main::@10 + (byte) sin_offset_y#23 ← phi( main::@10/(byte) sin_offset_y#27 ) + (byte) sin_offset_x#23 ← phi( main::@10/(byte) sin_offset_x#27 ) + (word*) SQUARES#34 ← phi( main::@10/(word*) SQUARES#40 ) + (byte*) heap_head#37 ← phi( main::@10/(byte*) heap_head#41 ) + (byte) NUM_SQUARES#23 ← phi( main::@10/(byte) NUM_SQUARES#29 ) + (byte*) print_char_cursor#14 ← phi( main::@10/(byte*) print_char_cursor#9 ) + (byte*) print_line_cursor#9 ← phi( main::@10/(byte*) print_line_cursor#6 ) + (byte*) print_line_cursor#3 ← (byte*) print_line_cursor#9 + (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#14 + (void*) memset::str#0 ← (void*)(byte*) COLS#0 + (byte) memset::c#0 ← (byte) BLACK#0 + (word) memset::num#0 ← (number) $3e8 + call memset + (void*) memset::return#2 ← (void*) memset::return#1 + to:main::@12 +main::@12: scope:[main] from main::@11 + (byte) sin_offset_y#19 ← phi( main::@11/(byte) sin_offset_y#23 ) + (byte) sin_offset_x#19 ← phi( main::@11/(byte) sin_offset_x#23 ) + (byte*) print_char_cursor#27 ← phi( main::@11/(byte*) print_char_cursor#5 ) + (byte*) print_line_cursor#20 ← phi( main::@11/(byte*) print_line_cursor#3 ) + (word*) SQUARES#26 ← phi( main::@11/(word*) SQUARES#34 ) + (byte*) heap_head#32 ← phi( main::@11/(byte*) heap_head#37 ) + (byte) NUM_SQUARES#18 ← phi( main::@11/(byte) NUM_SQUARES#23 ) + to:main::@1 +main::@1: scope:[main] from main::@12 main::@8 + (byte) sin_offset_y#16 ← phi( main::@12/(byte) sin_offset_y#19 main::@8/(byte) sin_offset_y#20 ) + (byte) sin_offset_x#16 ← phi( main::@12/(byte) sin_offset_x#19 main::@8/(byte) sin_offset_x#20 ) + (byte*) print_char_cursor#22 ← phi( main::@12/(byte*) print_char_cursor#27 main::@8/(byte*) print_char_cursor#28 ) + (byte*) print_line_cursor#15 ← phi( main::@12/(byte*) print_line_cursor#20 main::@8/(byte*) print_line_cursor#21 ) + (word*) SQUARES#22 ← phi( main::@12/(word*) SQUARES#26 main::@8/(word*) SQUARES#27 ) + (byte*) heap_head#27 ← phi( main::@12/(byte*) heap_head#32 main::@8/(byte*) heap_head#33 ) + (byte) NUM_SQUARES#15 ← phi( main::@12/(byte) NUM_SQUARES#18 main::@8/(byte) NUM_SQUARES#19 ) + if(true) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + (byte*) print_char_cursor#51 ← phi( main::@1/(byte*) print_char_cursor#22 ) + (byte*) print_line_cursor#46 ← phi( main::@1/(byte*) print_line_cursor#15 ) + (word*) SQUARES#52 ← phi( main::@1/(word*) SQUARES#22 ) + (byte*) heap_head#57 ← phi( main::@1/(byte*) heap_head#27 ) + (byte) NUM_SQUARES#47 ← phi( main::@1/(byte) NUM_SQUARES#15 ) + (byte) sin_offset_y#14 ← phi( main::@1/(byte) sin_offset_y#16 ) + (byte) sin_offset_x#14 ← phi( main::@1/(byte) sin_offset_x#16 ) + (byte*) doplasma::screen#0 ← (byte*) SCREEN1#0 + call doplasma + to:main::@13 +main::@13: scope:[main] from main::@2 + (byte*) print_char_cursor#50 ← phi( main::@2/(byte*) print_char_cursor#51 ) + (byte*) print_line_cursor#45 ← phi( main::@2/(byte*) print_line_cursor#46 ) + (word*) SQUARES#51 ← phi( main::@2/(word*) SQUARES#52 ) + (byte*) heap_head#54 ← phi( main::@2/(byte*) heap_head#57 ) + (byte) NUM_SQUARES#45 ← phi( main::@2/(byte) NUM_SQUARES#47 ) + (byte) sin_offset_y#7 ← phi( main::@2/(byte) sin_offset_y#5 ) + (byte) sin_offset_x#7 ← phi( main::@2/(byte) sin_offset_x#5 ) + (byte) sin_offset_x#0 ← (byte) sin_offset_x#7 + (byte) sin_offset_y#0 ← (byte) sin_offset_y#7 + (byte*) main::toD0181_screen#0 ← (byte*) SCREEN1#0 + (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0 + to:main::toD0181 +main::toD0181: scope:[main] from main::@13 + (byte*) print_char_cursor#48 ← phi( main::@13/(byte*) print_char_cursor#50 ) + (byte*) print_line_cursor#43 ← phi( main::@13/(byte*) print_line_cursor#45 ) + (word*) SQUARES#50 ← phi( main::@13/(word*) SQUARES#51 ) + (byte*) heap_head#52 ← phi( main::@13/(byte*) heap_head#54 ) + (byte) NUM_SQUARES#43 ← phi( main::@13/(byte) NUM_SQUARES#45 ) + (byte) sin_offset_y#24 ← phi( main::@13/(byte) sin_offset_y#0 ) + (byte) sin_offset_x#24 ← phi( main::@13/(byte) sin_offset_x#0 ) + (byte*) main::toD0181_gfx#1 ← phi( main::@13/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main::@13/(byte*) main::toD0181_screen#0 ) + (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 + (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff + (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4 + (number~) main::toD0181_$3#0 ← > (number~) main::toD0181_$2#0 + (word~) main::toD0181_$4#0 ← ((word)) (byte*) main::toD0181_gfx#1 + (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4 + (number~) main::toD0181_$7#0 ← (number~) main::toD0181_$6#0 & (number) $f + (number~) main::toD0181_$8#0 ← (number~) main::toD0181_$3#0 | (number~) main::toD0181_$7#0 + (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + (byte*) print_char_cursor#46 ← phi( main::toD0181/(byte*) print_char_cursor#48 ) + (byte*) print_line_cursor#41 ← phi( main::toD0181/(byte*) print_line_cursor#43 ) + (word*) SQUARES#48 ← phi( main::toD0181/(word*) SQUARES#50 ) + (byte*) heap_head#50 ← phi( main::toD0181/(byte*) heap_head#52 ) + (byte) NUM_SQUARES#39 ← phi( main::toD0181/(byte) NUM_SQUARES#43 ) + (byte) sin_offset_y#21 ← phi( main::toD0181/(byte) sin_offset_y#24 ) + (byte) sin_offset_x#21 ← phi( main::toD0181/(byte) sin_offset_x#24 ) + (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) + (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 + to:main::@7 +main::@7: scope:[main] from main::toD0181_@return + (byte*) print_char_cursor#44 ← phi( main::toD0181_@return/(byte*) print_char_cursor#46 ) + (byte*) print_line_cursor#39 ← phi( main::toD0181_@return/(byte*) print_line_cursor#41 ) + (word*) SQUARES#46 ← phi( main::toD0181_@return/(word*) SQUARES#48 ) + (byte*) heap_head#48 ← phi( main::toD0181_@return/(byte*) heap_head#50 ) + (byte) NUM_SQUARES#36 ← phi( main::toD0181_@return/(byte) NUM_SQUARES#39 ) + (byte) sin_offset_y#15 ← phi( main::toD0181_@return/(byte) sin_offset_y#21 ) + (byte) sin_offset_x#15 ← phi( main::toD0181_@return/(byte) sin_offset_x#21 ) + (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) + (byte~) main::$5 ← (byte) main::toD0181_return#3 + *((byte*) D018#0) ← (byte~) main::$5 + (byte*) doplasma::screen#1 ← (byte*) SCREEN2#0 + call doplasma + to:main::@14 +main::@14: scope:[main] from main::@7 + (byte*) print_char_cursor#40 ← phi( main::@7/(byte*) print_char_cursor#44 ) + (byte*) print_line_cursor#35 ← phi( main::@7/(byte*) print_line_cursor#39 ) + (word*) SQUARES#44 ← phi( main::@7/(word*) SQUARES#46 ) + (byte*) heap_head#45 ← phi( main::@7/(byte*) heap_head#48 ) + (byte) NUM_SQUARES#33 ← phi( main::@7/(byte) NUM_SQUARES#36 ) + (byte) sin_offset_y#8 ← phi( main::@7/(byte) sin_offset_y#5 ) + (byte) sin_offset_x#8 ← phi( main::@7/(byte) sin_offset_x#5 ) + (byte) sin_offset_x#1 ← (byte) sin_offset_x#8 + (byte) sin_offset_y#1 ← (byte) sin_offset_y#8 + (byte*) main::toD0182_screen#0 ← (byte*) SCREEN2#0 + (byte*) main::toD0182_gfx#0 ← (byte*) CHARSET#0 + to:main::toD0182 +main::toD0182: scope:[main] from main::@14 + (byte) sin_offset_y#28 ← phi( main::@14/(byte) sin_offset_y#1 ) + (byte) sin_offset_x#28 ← phi( main::@14/(byte) sin_offset_x#1 ) + (byte*) print_char_cursor#37 ← phi( main::@14/(byte*) print_char_cursor#40 ) + (byte*) print_line_cursor#32 ← phi( main::@14/(byte*) print_line_cursor#35 ) + (word*) SQUARES#41 ← phi( main::@14/(word*) SQUARES#44 ) + (byte*) heap_head#42 ← phi( main::@14/(byte*) heap_head#45 ) + (byte) NUM_SQUARES#30 ← phi( main::@14/(byte) NUM_SQUARES#33 ) + (byte*) main::toD0182_gfx#1 ← phi( main::@14/(byte*) main::toD0182_gfx#0 ) + (byte*) main::toD0182_screen#1 ← phi( main::@14/(byte*) main::toD0182_screen#0 ) + (word~) main::toD0182_$0#0 ← ((word)) (byte*) main::toD0182_screen#1 + (number~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (number) $3fff + (number~) main::toD0182_$2#0 ← (number~) main::toD0182_$1#0 * (number) 4 + (number~) main::toD0182_$3#0 ← > (number~) main::toD0182_$2#0 + (word~) main::toD0182_$4#0 ← ((word)) (byte*) main::toD0182_gfx#1 + (byte~) main::toD0182_$5#0 ← > (word~) main::toD0182_$4#0 + (number~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (number) 4 + (number~) main::toD0182_$7#0 ← (number~) main::toD0182_$6#0 & (number) $f + (number~) main::toD0182_$8#0 ← (number~) main::toD0182_$3#0 | (number~) main::toD0182_$7#0 + (byte) main::toD0182_return#0 ← (number~) main::toD0182_$8#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + (byte) sin_offset_y#25 ← phi( main::toD0182/(byte) sin_offset_y#28 ) + (byte) sin_offset_x#25 ← phi( main::toD0182/(byte) sin_offset_x#28 ) + (byte*) print_char_cursor#33 ← phi( main::toD0182/(byte*) print_char_cursor#37 ) + (byte*) print_line_cursor#27 ← phi( main::toD0182/(byte*) print_line_cursor#32 ) + (word*) SQUARES#35 ← phi( main::toD0182/(word*) SQUARES#41 ) + (byte*) heap_head#38 ← phi( main::toD0182/(byte*) heap_head#42 ) + (byte) NUM_SQUARES#24 ← phi( main::toD0182/(byte) NUM_SQUARES#30 ) + (byte) main::toD0182_return#2 ← phi( main::toD0182/(byte) main::toD0182_return#0 ) + (byte) main::toD0182_return#1 ← (byte) main::toD0182_return#2 + to:main::@8 +main::@8: scope:[main] from main::toD0182_@return + (byte) sin_offset_y#20 ← phi( main::toD0182_@return/(byte) sin_offset_y#25 ) + (byte) sin_offset_x#20 ← phi( main::toD0182_@return/(byte) sin_offset_x#25 ) + (byte*) print_char_cursor#28 ← phi( main::toD0182_@return/(byte*) print_char_cursor#33 ) + (byte*) print_line_cursor#21 ← phi( main::toD0182_@return/(byte*) print_line_cursor#27 ) + (word*) SQUARES#27 ← phi( main::toD0182_@return/(word*) SQUARES#35 ) + (byte*) heap_head#33 ← phi( main::toD0182_@return/(byte*) heap_head#38 ) + (byte) NUM_SQUARES#19 ← phi( main::toD0182_@return/(byte) NUM_SQUARES#24 ) + (byte) main::toD0182_return#3 ← phi( main::toD0182_@return/(byte) main::toD0182_return#1 ) + (byte~) main::$7 ← (byte) main::toD0182_return#3 + *((byte*) D018#0) ← (byte~) main::$7 + to:main::@1 +main::@return: scope:[main] from main::@1 + (byte) sin_offset_y#9 ← phi( main::@1/(byte) sin_offset_y#16 ) + (byte) sin_offset_x#9 ← phi( main::@1/(byte) sin_offset_x#16 ) + (byte*) print_char_cursor#15 ← phi( main::@1/(byte*) print_char_cursor#22 ) + (byte*) print_line_cursor#10 ← phi( main::@1/(byte*) print_line_cursor#15 ) + (word*) SQUARES#13 ← phi( main::@1/(word*) SQUARES#22 ) + (byte*) heap_head#19 ← phi( main::@1/(byte*) heap_head#27 ) + (byte) NUM_SQUARES#10 ← phi( main::@1/(byte) NUM_SQUARES#15 ) + (byte) NUM_SQUARES#2 ← (byte) NUM_SQUARES#10 + (byte*) heap_head#8 ← (byte*) heap_head#19 + (word*) SQUARES#4 ← (word*) SQUARES#13 + (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#10 + (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#15 + (byte) sin_offset_x#2 ← (byte) sin_offset_x#9 + (byte) sin_offset_y#2 ← (byte) sin_offset_y#9 + return + to:@return +@40: scope:[] from @46 + (byte*) print_screen#10 ← phi( @46/(byte*) print_screen#11 ) + (byte*) print_char_cursor#31 ← phi( @46/(byte*) print_char_cursor#34 ) + (byte*) print_line_cursor#25 ← phi( @46/(byte*) print_line_cursor#28 ) + (word*) SQUARES#33 ← phi( @46/(word*) SQUARES#36 ) + (byte*) heap_head#35 ← phi( @46/(byte*) heap_head#6 ) + (byte) NUM_SQUARES#22 ← phi( @46/(byte) NUM_SQUARES#25 ) + (byte) sin_offset_x#3 ← (number) 0 + (byte) sin_offset_y#3 ← (number) 0 + to:@44 +doplasma: scope:[doplasma] from main::@2 main::@7 + (byte*) doplasma::screen#6 ← phi( main::@2/(byte*) doplasma::screen#0 main::@7/(byte*) doplasma::screen#1 ) + (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@7/(byte) sin_offset_y#15 ) + (byte) sin_offset_x#10 ← phi( main::@2/(byte) sin_offset_x#14 main::@7/(byte) sin_offset_x#15 ) + (byte*) doplasma::angle#0 ← (byte*) SCREEN_ANGLE#0 + (byte*) doplasma::dist#0 ← (byte*) SCREEN_DIST#0 + (byte*~) doplasma::$0 ← (byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 + (byte*) doplasma::sin_x#0 ← (byte*~) doplasma::$0 + (byte*~) doplasma::$1 ← (byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 + (byte*) doplasma::sin_y#0 ← (byte*~) doplasma::$1 + (byte) doplasma::y#0 ← (byte) 0 + to:doplasma::@1 +doplasma::@1: scope:[doplasma] from doplasma doplasma::@3 + (byte) sin_offset_y#26 ← phi( doplasma/(byte) sin_offset_y#10 doplasma::@3/(byte) sin_offset_y#17 ) + (byte) sin_offset_x#26 ← phi( doplasma/(byte) sin_offset_x#10 doplasma::@3/(byte) sin_offset_x#17 ) + (byte) doplasma::y#4 ← phi( doplasma/(byte) doplasma::y#0 doplasma::@3/(byte) doplasma::y#1 ) + (byte*) doplasma::screen#5 ← phi( doplasma/(byte*) doplasma::screen#6 doplasma::@3/(byte*) doplasma::screen#2 ) + (byte*) doplasma::dist#4 ← phi( doplasma/(byte*) doplasma::dist#0 doplasma::@3/(byte*) doplasma::dist#1 ) + (byte*) doplasma::sin_y#2 ← phi( doplasma/(byte*) doplasma::sin_y#0 doplasma::@3/(byte*) doplasma::sin_y#3 ) + (byte*) doplasma::angle#4 ← phi( doplasma/(byte*) doplasma::angle#0 doplasma::@3/(byte*) doplasma::angle#1 ) + (byte*) doplasma::sin_x#2 ← phi( doplasma/(byte*) doplasma::sin_x#0 doplasma::@3/(byte*) doplasma::sin_x#3 ) + (byte) doplasma::x#0 ← (byte) 0 + to:doplasma::@2 +doplasma::@2: scope:[doplasma] from doplasma::@1 doplasma::@2 + (byte) sin_offset_y#22 ← phi( doplasma::@1/(byte) sin_offset_y#26 doplasma::@2/(byte) sin_offset_y#22 ) + (byte) sin_offset_x#22 ← phi( doplasma::@1/(byte) sin_offset_x#26 doplasma::@2/(byte) sin_offset_x#22 ) + (byte) doplasma::y#3 ← phi( doplasma::@1/(byte) doplasma::y#4 doplasma::@2/(byte) doplasma::y#3 ) + (byte*) doplasma::screen#3 ← phi( doplasma::@1/(byte*) doplasma::screen#5 doplasma::@2/(byte*) doplasma::screen#3 ) + (byte*) doplasma::dist#2 ← phi( doplasma::@1/(byte*) doplasma::dist#4 doplasma::@2/(byte*) doplasma::dist#2 ) + (byte*) doplasma::sin_y#1 ← phi( doplasma::@1/(byte*) doplasma::sin_y#2 doplasma::@2/(byte*) doplasma::sin_y#1 ) + (byte) doplasma::x#2 ← phi( doplasma::@1/(byte) doplasma::x#0 doplasma::@2/(byte) doplasma::x#1 ) + (byte*) doplasma::angle#2 ← phi( doplasma::@1/(byte*) doplasma::angle#4 doplasma::@2/(byte*) doplasma::angle#2 ) + (byte*) doplasma::sin_x#1 ← phi( doplasma::@1/(byte*) doplasma::sin_x#2 doplasma::@2/(byte*) doplasma::sin_x#1 ) + (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#1 + *((byte*) doplasma::angle#2 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#1 + *((byte*) doplasma::dist#2 + (byte) doplasma::x#2)) + *((byte*) doplasma::screen#3 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 + (byte) doplasma::x#1 ← (byte) doplasma::x#2 + rangenext(0,$27) + (bool~) doplasma::$3 ← (byte) doplasma::x#1 != rangelast(0,$27) + if((bool~) doplasma::$3) goto doplasma::@2 + to:doplasma::@3 +doplasma::@3: scope:[doplasma] from doplasma::@2 + (byte*) doplasma::sin_y#3 ← phi( doplasma::@2/(byte*) doplasma::sin_y#1 ) + (byte*) doplasma::sin_x#3 ← phi( doplasma::@2/(byte*) doplasma::sin_x#1 ) + (byte) sin_offset_y#17 ← phi( doplasma::@2/(byte) sin_offset_y#22 ) + (byte) sin_offset_x#17 ← phi( doplasma::@2/(byte) sin_offset_x#22 ) + (byte) doplasma::y#2 ← phi( doplasma::@2/(byte) doplasma::y#3 ) + (byte*) doplasma::dist#3 ← phi( doplasma::@2/(byte*) doplasma::dist#2 ) + (byte*) doplasma::angle#3 ← phi( doplasma::@2/(byte*) doplasma::angle#2 ) + (byte*) doplasma::screen#4 ← phi( doplasma::@2/(byte*) doplasma::screen#3 ) + (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#4 + (number) $28 + (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#3 + (number) $28 + (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#3 + (number) $28 + (byte) doplasma::y#1 ← (byte) doplasma::y#2 + rangenext(0,$19) + (bool~) doplasma::$4 ← (byte) doplasma::y#1 != rangelast(0,$19) + if((bool~) doplasma::$4) goto doplasma::@1 + to:doplasma::@4 +doplasma::@4: scope:[doplasma] from doplasma::@3 + (byte) sin_offset_y#11 ← phi( doplasma::@3/(byte) sin_offset_y#17 ) + (byte) sin_offset_x#11 ← phi( doplasma::@3/(byte) sin_offset_x#17 ) + (byte) sin_offset_x#4 ← (byte) sin_offset_x#11 - (number) 3 + (byte) sin_offset_y#4 ← (byte) sin_offset_y#11 - (number) 7 + to:doplasma::@return +doplasma::@return: scope:[doplasma] from doplasma::@4 + (byte) sin_offset_y#12 ← phi( doplasma::@4/(byte) sin_offset_y#4 ) + (byte) sin_offset_x#12 ← phi( doplasma::@4/(byte) sin_offset_x#4 ) + (byte) sin_offset_x#5 ← (byte) sin_offset_x#12 + (byte) sin_offset_y#5 ← (byte) sin_offset_y#12 + return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@9 + (byte*) init_angle_screen::screen#1 ← phi( main::@9/(byte*) init_angle_screen::screen#0 ) + (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_topline#0 ← (byte*~) init_angle_screen::$0 + (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_bottomline#0 ← (byte*~) init_angle_screen::$1 + (byte) init_angle_screen::y#0 ← (byte) 0 + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + (byte) init_angle_screen::x#0 ← (number) 0 + (byte) init_angle_screen::xb#0 ← (number) $27 + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + (byte*) init_angle_screen::screen_topline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_topline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte) init_angle_screen::xb#3 ← phi( init_angle_screen::@1/(byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + (byte*) init_angle_screen::screen_bottomline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_bottomline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte) init_angle_screen::y#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::y#4 init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 + (number~) init_angle_screen::$3 ← (number) $27 - (number~) init_angle_screen::$2 + (word~) init_angle_screen::$4 ← ((word)) { (number~) init_angle_screen::$3, (number) 0 } + (signed word~) init_angle_screen::$5 ← ((signed word)) (word~) init_angle_screen::$4 + (signed word) init_angle_screen::xw#0 ← (signed word~) init_angle_screen::$5 + (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 + (word~) init_angle_screen::$7 ← ((word)) { (number~) init_angle_screen::$6, (number) 0 } + (signed word~) init_angle_screen::$8 ← ((signed word)) (word~) init_angle_screen::$7 + (signed word) init_angle_screen::yw#0 ← (signed word~) init_angle_screen::$8 + (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 + call atan2_16 + (word) atan2_16::return#2 ← (word) atan2_16::return#1 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + (byte) init_angle_screen::y#5 ← phi( init_angle_screen::@2/(byte) init_angle_screen::y#2 ) + (byte) init_angle_screen::x#3 ← phi( init_angle_screen::@2/(byte) init_angle_screen::x#2 ) + (byte*) init_angle_screen::screen_topline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_topline#4 ) + (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@2/(byte) init_angle_screen::xb#3 ) + (byte*) init_angle_screen::screen_bottomline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_bottomline#4 ) + (word) atan2_16::return#4 ← phi( init_angle_screen::@2/(word) atan2_16::return#2 ) + (word~) init_angle_screen::$9 ← (word) atan2_16::return#4 + (word) init_angle_screen::angle_w#0 ← (word~) init_angle_screen::$9 + (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 + (number~) init_angle_screen::$11 ← > (number~) init_angle_screen::$10 + (byte) init_angle_screen::ang_w#0 ← (number~) init_angle_screen::$11 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + (number~) init_angle_screen::$13 ← (number) $80 + (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$13 + (number~) init_angle_screen::$14 ← (number) $80 - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$14 + (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#3 + (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 + if((bool~) init_angle_screen::$15) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + (byte) init_angle_screen::y#3 ← phi( init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte*) init_angle_screen::screen_bottomline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte*) init_angle_screen::screen_topline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 + (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 + (byte) init_angle_screen::y#1 ← (byte) init_angle_screen::y#3 + rangenext(0,$c) + (bool~) init_angle_screen::$16 ← (byte) init_angle_screen::y#1 != rangelast(0,$c) + if((bool~) init_angle_screen::$16) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + return + to:@return +init_dist_screen: scope:[init_dist_screen] from main + (byte*) init_dist_screen::screen#2 ← phi( main/(byte*) init_dist_screen::screen#0 ) + (word*) SQUARES#23 ← phi( main/(word*) SQUARES#21 ) + (byte*) heap_head#28 ← phi( main/(byte*) heap_head#26 ) + (byte) NUM_SQUARES#3 ← (number) $30 + call init_squares + to:init_dist_screen::@15 +init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen + (byte) NUM_SQUARES#46 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) + (byte*) init_dist_screen::screen#1 ← phi( init_dist_screen/(byte*) init_dist_screen::screen#2 ) + (word*) SQUARES#14 ← phi( init_dist_screen/(word*) SQUARES#2 ) + (byte*) heap_head#20 ← phi( init_dist_screen/(byte*) heap_head#4 ) + (byte*) heap_head#9 ← (byte*) heap_head#20 + (word*) SQUARES#5 ← (word*) SQUARES#14 + (byte*) init_dist_screen::screen_topline#0 ← (byte*) init_dist_screen::screen#1 + (byte*~) init_dist_screen::$1 ← (byte*) init_dist_screen::screen#1 + (number) $28*(number) $18 + (byte*) init_dist_screen::screen_bottomline#0 ← (byte*~) init_dist_screen::$1 + (byte) init_dist_screen::y#0 ← (byte) 0 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 + (byte*) heap_head#58 ← phi( init_dist_screen::@11/(byte*) heap_head#29 init_dist_screen::@15/(byte*) heap_head#9 ) + (byte*) init_dist_screen::screen_bottomline#13 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) + (byte*) init_dist_screen::screen_topline#13 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_topline#0 ) + (byte) NUM_SQUARES#44 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#16 init_dist_screen::@15/(byte) NUM_SQUARES#46 ) + (word*) SQUARES#37 ← phi( init_dist_screen::@11/(word*) SQUARES#24 init_dist_screen::@15/(word*) SQUARES#5 ) + (byte) init_dist_screen::y#2 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(byte) init_dist_screen::y#0 ) + (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 + (byte) init_dist_screen::y2#0 ← (number~) init_dist_screen::$2 + (bool~) init_dist_screen::$3 ← (byte) init_dist_screen::y2#0 >= (number) $18 + if((bool~) init_dist_screen::$3) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + (byte*) heap_head#55 ← phi( init_dist_screen::@1/(byte*) heap_head#58 ) + (byte) init_dist_screen::y#12 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) + (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#13 ) + (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#13 ) + (byte) NUM_SQUARES#40 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#44 ) + (word*) SQUARES#28 ← phi( init_dist_screen::@1/(word*) SQUARES#37 ) + (byte) init_dist_screen::y2#1 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) + (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 + (number~) init_dist_screen::$7 ← (number~) init_dist_screen::$6 + to:init_dist_screen::@4 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + (byte*) heap_head#56 ← phi( init_dist_screen::@1/(byte*) heap_head#58 ) + (byte) init_dist_screen::y#13 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) + (byte*) init_dist_screen::screen_bottomline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#13 ) + (byte*) init_dist_screen::screen_topline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#13 ) + (byte) NUM_SQUARES#41 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#44 ) + (word*) SQUARES#29 ← phi( init_dist_screen::@1/(word*) SQUARES#37 ) + (byte) init_dist_screen::y2#2 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) + (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 + (number~) init_dist_screen::$5 ← (number~) init_dist_screen::$4 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + (byte*) heap_head#53 ← phi( init_dist_screen::@2/(byte*) heap_head#55 init_dist_screen::@3/(byte*) heap_head#56 ) + (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#12 init_dist_screen::@3/(byte) init_dist_screen::y#13 ) + (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) + (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) + (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#40 init_dist_screen::@3/(byte) NUM_SQUARES#41 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#28 init_dist_screen::@3/(word*) SQUARES#29 ) + (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(number~) init_dist_screen::$7 init_dist_screen::@3/(number~) init_dist_screen::$5 ) + (byte) init_dist_screen::yd#0 ← (number~) init_dist_screen::$8 + (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + call sqr + (word) sqr::return#2 ← (word) sqr::return#1 + to:init_dist_screen::@16 +init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 + (byte*) heap_head#51 ← phi( init_dist_screen::@4/(byte*) heap_head#53 ) + (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@4/(byte) init_dist_screen::y#11 ) + (byte*) init_dist_screen::screen_bottomline#9 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_bottomline#10 ) + (byte*) init_dist_screen::screen_topline#9 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_topline#10 ) + (byte) NUM_SQUARES#34 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#37 ) + (word*) SQUARES#42 ← phi( init_dist_screen::@4/(word*) SQUARES#18 ) + (word) sqr::return#5 ← phi( init_dist_screen::@4/(word) sqr::return#2 ) + (word~) init_dist_screen::$9 ← (word) sqr::return#5 + (word) init_dist_screen::yds#0 ← (word~) init_dist_screen::$9 + (byte) init_dist_screen::x#0 ← (number) 0 + (byte) init_dist_screen::xb#0 ← (number) $27 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 + (byte*) heap_head#49 ← phi( init_dist_screen::@16/(byte*) heap_head#51 init_dist_screen::@18/(byte*) heap_head#34 ) + (byte) init_dist_screen::y#9 ← phi( init_dist_screen::@16/(byte) init_dist_screen::y#10 init_dist_screen::@18/(byte) init_dist_screen::y#4 ) + (byte) init_dist_screen::xb#7 ← phi( init_dist_screen::@16/(byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) + (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@16/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@18/(byte*) init_dist_screen::screen_bottomline#2 ) + (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@16/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@18/(byte*) init_dist_screen::screen_topline#2 ) + (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@16/(byte) NUM_SQUARES#34 init_dist_screen::@18/(byte) NUM_SQUARES#21 ) + (word) init_dist_screen::yds#5 ← phi( init_dist_screen::@16/(word) init_dist_screen::yds#0 init_dist_screen::@18/(word) init_dist_screen::yds#6 ) + (word*) SQUARES#38 ← phi( init_dist_screen::@16/(word*) SQUARES#42 init_dist_screen::@18/(word*) SQUARES#32 ) + (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) + (number~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (number) 2 + (byte) init_dist_screen::x2#0 ← (number~) init_dist_screen::$10 + (bool~) init_dist_screen::$11 ← (byte) init_dist_screen::x2#0 >= (number) $27 + if((bool~) init_dist_screen::$11) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + (byte*) heap_head#46 ← phi( init_dist_screen::@5/(byte*) heap_head#49 ) + (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#9 ) + (byte) init_dist_screen::xb#5 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#7 ) + (byte*) init_dist_screen::screen_bottomline#6 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#8 ) + (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) + (byte*) init_dist_screen::screen_topline#6 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#8 ) + (byte) NUM_SQUARES#26 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#31 ) + (word) init_dist_screen::yds#3 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#5 ) + (word*) SQUARES#30 ← phi( init_dist_screen::@5/(word*) SQUARES#38 ) + (byte) init_dist_screen::x2#1 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x2#0 ) + (number~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (number) $27 + (number~) init_dist_screen::$15 ← (number~) init_dist_screen::$14 + to:init_dist_screen::@8 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + (byte*) heap_head#47 ← phi( init_dist_screen::@5/(byte*) heap_head#49 ) + (byte) init_dist_screen::y#8 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#9 ) + (byte) init_dist_screen::xb#6 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#7 ) + (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#8 ) + (byte) init_dist_screen::x#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) + (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#8 ) + (byte) NUM_SQUARES#27 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#31 ) + (word) init_dist_screen::yds#4 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#5 ) + (word*) SQUARES#31 ← phi( init_dist_screen::@5/(word*) SQUARES#38 ) + (byte) init_dist_screen::x2#2 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x2#0 ) + (number~) init_dist_screen::$12 ← (number) $27 - (byte) init_dist_screen::x2#2 + (number~) init_dist_screen::$13 ← (number~) init_dist_screen::$12 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + (byte*) heap_head#43 ← phi( init_dist_screen::@6/(byte*) heap_head#46 init_dist_screen::@7/(byte*) heap_head#47 ) + (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#7 init_dist_screen::@7/(byte) init_dist_screen::y#8 ) + (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#5 init_dist_screen::@7/(byte) init_dist_screen::xb#6 ) + (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#7 ) + (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#6 init_dist_screen::@7/(byte) init_dist_screen::x#7 ) + (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#7 ) + (byte) NUM_SQUARES#20 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#26 init_dist_screen::@7/(byte) NUM_SQUARES#27 ) + (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#3 init_dist_screen::@7/(word) init_dist_screen::yds#4 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#30 init_dist_screen::@7/(word*) SQUARES#31 ) + (number~) init_dist_screen::$16 ← phi( init_dist_screen::@6/(number~) init_dist_screen::$15 init_dist_screen::@7/(number~) init_dist_screen::$13 ) + (byte) init_dist_screen::xd#0 ← (number~) init_dist_screen::$16 + (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + call sqr + (word) sqr::return#3 ← (word) sqr::return#1 + to:init_dist_screen::@17 +init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 + (byte*) heap_head#39 ← phi( init_dist_screen::@8/(byte*) heap_head#43 ) + (byte) init_dist_screen::y#5 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#6 ) + (byte) init_dist_screen::xb#3 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#4 ) + (byte*) init_dist_screen::screen_bottomline#4 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#5 ) + (byte) init_dist_screen::x#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#5 ) + (byte*) init_dist_screen::screen_topline#4 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#5 ) + (byte) NUM_SQUARES#13 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#20 ) + (word*) SQUARES#20 ← phi( init_dist_screen::@8/(word*) SQUARES#19 ) + (word) init_dist_screen::yds#1 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#2 ) + (word) sqr::return#6 ← phi( init_dist_screen::@8/(word) sqr::return#3 ) + (word~) init_dist_screen::$17 ← (word) sqr::return#6 + (word) init_dist_screen::xds#0 ← (word~) init_dist_screen::$17 + (word~) init_dist_screen::$18 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#1 + (word) init_dist_screen::ds#0 ← (word~) init_dist_screen::$18 + (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + call sqrt + (byte) sqrt::return#2 ← (byte) sqrt::return#1 + to:init_dist_screen::@18 +init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 + (word) init_dist_screen::yds#6 ← phi( init_dist_screen::@17/(word) init_dist_screen::yds#1 ) + (word*) SQUARES#32 ← phi( init_dist_screen::@17/(word*) SQUARES#20 ) + (byte*) heap_head#34 ← phi( init_dist_screen::@17/(byte*) heap_head#39 ) + (byte) NUM_SQUARES#21 ← phi( init_dist_screen::@17/(byte) NUM_SQUARES#13 ) + (byte) init_dist_screen::y#4 ← phi( init_dist_screen::@17/(byte) init_dist_screen::y#5 ) + (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@17/(byte) init_dist_screen::xb#3 ) + (byte*) init_dist_screen::screen_bottomline#2 ← phi( init_dist_screen::@17/(byte*) init_dist_screen::screen_bottomline#4 ) + (byte) init_dist_screen::x#3 ← phi( init_dist_screen::@17/(byte) init_dist_screen::x#4 ) + (byte*) init_dist_screen::screen_topline#2 ← phi( init_dist_screen::@17/(byte*) init_dist_screen::screen_topline#4 ) + (byte) sqrt::return#4 ← phi( init_dist_screen::@17/(byte) sqrt::return#2 ) + (byte~) init_dist_screen::$19 ← (byte) sqrt::return#4 + (byte) init_dist_screen::d#0 ← (byte~) init_dist_screen::$19 + *((byte*) init_dist_screen::screen_topline#2 + (byte) init_dist_screen::x#3) ← (byte) init_dist_screen::d#0 + *((byte*) init_dist_screen::screen_bottomline#2 + (byte) init_dist_screen::x#3) ← (byte) init_dist_screen::d#0 + *((byte*) init_dist_screen::screen_topline#2 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + *((byte*) init_dist_screen::screen_bottomline#2 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#3 + (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + (bool~) init_dist_screen::$20 ← (byte) init_dist_screen::x#1 <= (number) $13 + if((bool~) init_dist_screen::$20) goto init_dist_screen::@5 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 + (word*) SQUARES#24 ← phi( init_dist_screen::@18/(word*) SQUARES#32 ) + (byte*) heap_head#29 ← phi( init_dist_screen::@18/(byte*) heap_head#34 ) + (byte) NUM_SQUARES#16 ← phi( init_dist_screen::@18/(byte) NUM_SQUARES#21 ) + (byte) init_dist_screen::y#3 ← phi( init_dist_screen::@18/(byte) init_dist_screen::y#4 ) + (byte*) init_dist_screen::screen_bottomline#3 ← phi( init_dist_screen::@18/(byte*) init_dist_screen::screen_bottomline#2 ) + (byte*) init_dist_screen::screen_topline#3 ← phi( init_dist_screen::@18/(byte*) init_dist_screen::screen_topline#2 ) + (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#3 + (number) $28 + (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#3 - (number) $28 + (byte) init_dist_screen::y#1 ← (byte) init_dist_screen::y#3 + rangenext(0,$c) + (bool~) init_dist_screen::$21 ← (byte) init_dist_screen::y#1 != rangelast(0,$c) + if((bool~) init_dist_screen::$21) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 + (word*) SQUARES#15 ← phi( init_dist_screen::@11/(word*) SQUARES#24 ) + (byte*) heap_head#21 ← phi( init_dist_screen::@11/(byte*) heap_head#29 ) + (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#16 ) + (byte) NUM_SQUARES#4 ← (byte) NUM_SQUARES#11 + (byte*) heap_head#10 ← (byte*) heap_head#21 + (word*) SQUARES#6 ← (word*) SQUARES#15 + return + to:@return +make_plasma_charset: scope:[make_plasma_charset] from main::@10 + (byte*) make_plasma_charset::charset#13 ← phi( main::@10/(byte*) make_plasma_charset::charset#0 ) + (byte*) print_char_cursor#29 ← phi( main::@10/(byte*) print_char_cursor#21 ) + (byte*) print_line_cursor#22 ← phi( main::@10/(byte*) print_line_cursor#14 ) + (byte*) print_screen#5 ← phi( main::@10/(byte*) print_screen#6 ) + (byte[8]) make_plasma_charset::bittab#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } + call sid_rnd_init + to:make_plasma_charset::@11 +make_plasma_charset::@11: scope:[make_plasma_charset] from make_plasma_charset + (byte*) make_plasma_charset::charset#10 ← phi( make_plasma_charset/(byte*) make_plasma_charset::charset#13 ) + (byte*) print_char_cursor#23 ← phi( make_plasma_charset/(byte*) print_char_cursor#29 ) + (byte*) print_line_cursor#16 ← phi( make_plasma_charset/(byte*) print_line_cursor#22 ) + (byte*) print_screen#4 ← phi( make_plasma_charset/(byte*) print_screen#5 ) + call print_cls + to:make_plasma_charset::@12 +make_plasma_charset::@12: scope:[make_plasma_charset] from make_plasma_charset::@11 + (byte*) make_plasma_charset::charset#8 ← phi( make_plasma_charset::@11/(byte*) make_plasma_charset::charset#10 ) + (byte*) print_char_cursor#16 ← phi( make_plasma_charset::@11/(byte*) print_char_cursor#4 ) + (byte*) print_line_cursor#11 ← phi( make_plasma_charset::@11/(byte*) print_line_cursor#2 ) + (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#11 + (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#16 + (word) make_plasma_charset::c#0 ← (number) 0 + to:make_plasma_charset::@1 +make_plasma_charset::@1: scope:[make_plasma_charset] from make_plasma_charset::@12 make_plasma_charset::@9 + (byte*) print_char_cursor#49 ← phi( make_plasma_charset::@12/(byte*) print_char_cursor#7 make_plasma_charset::@9/(byte*) print_char_cursor#24 ) + (byte*) print_line_cursor#44 ← phi( make_plasma_charset::@12/(byte*) print_line_cursor#5 make_plasma_charset::@9/(byte*) print_line_cursor#17 ) + (byte*) make_plasma_charset::charset#7 ← phi( make_plasma_charset::@12/(byte*) make_plasma_charset::charset#8 make_plasma_charset::@9/(byte*) make_plasma_charset::charset#9 ) + (word) make_plasma_charset::c#2 ← phi( make_plasma_charset::@12/(word) make_plasma_charset::c#0 make_plasma_charset::@9/(word) make_plasma_charset::c#1 ) + (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 + (byte) make_plasma_charset::s#0 ← *((byte[$200]) SINTABLE#0 + (byte~) make_plasma_charset::$2) + (byte) make_plasma_charset::i#0 ← (number) 0 + to:make_plasma_charset::@2 +make_plasma_charset::@2: scope:[make_plasma_charset] from make_plasma_charset::@1 make_plasma_charset::@6 + (byte*) print_char_cursor#47 ← phi( make_plasma_charset::@1/(byte*) print_char_cursor#49 make_plasma_charset::@6/(byte*) print_char_cursor#35 ) + (byte*) print_line_cursor#42 ← phi( make_plasma_charset::@1/(byte*) print_line_cursor#44 make_plasma_charset::@6/(byte*) print_line_cursor#29 ) + (byte*) make_plasma_charset::charset#6 ← phi( make_plasma_charset::@1/(byte*) make_plasma_charset::charset#7 make_plasma_charset::@6/(byte*) make_plasma_charset::charset#1 ) + (byte) make_plasma_charset::i#7 ← phi( make_plasma_charset::@1/(byte) make_plasma_charset::i#0 make_plasma_charset::@6/(byte) make_plasma_charset::i#1 ) + (word) make_plasma_charset::c#12 ← phi( make_plasma_charset::@1/(word) make_plasma_charset::c#2 make_plasma_charset::@6/(word) make_plasma_charset::c#3 ) + (byte) make_plasma_charset::s#3 ← phi( make_plasma_charset::@1/(byte) make_plasma_charset::s#0 make_plasma_charset::@6/(byte) make_plasma_charset::s#5 ) + (byte) make_plasma_charset::b#0 ← (number) 0 + (byte) make_plasma_charset::ii#0 ← (number) 0 + to:make_plasma_charset::@3 +make_plasma_charset::@3: scope:[make_plasma_charset] from make_plasma_charset::@2 make_plasma_charset::@4 + (byte*) print_char_cursor#45 ← phi( make_plasma_charset::@2/(byte*) print_char_cursor#47 make_plasma_charset::@4/(byte*) print_char_cursor#38 ) + (byte*) print_line_cursor#40 ← phi( make_plasma_charset::@2/(byte*) print_line_cursor#42 make_plasma_charset::@4/(byte*) print_line_cursor#33 ) + (byte*) make_plasma_charset::charset#5 ← phi( make_plasma_charset::@2/(byte*) make_plasma_charset::charset#6 make_plasma_charset::@4/(byte*) make_plasma_charset::charset#2 ) + (byte) make_plasma_charset::i#6 ← phi( make_plasma_charset::@2/(byte) make_plasma_charset::i#7 make_plasma_charset::@4/(byte) make_plasma_charset::i#3 ) + (word) make_plasma_charset::c#11 ← phi( make_plasma_charset::@2/(word) make_plasma_charset::c#12 make_plasma_charset::@4/(word) make_plasma_charset::c#6 ) + (byte) make_plasma_charset::b#6 ← phi( make_plasma_charset::@2/(byte) make_plasma_charset::b#0 make_plasma_charset::@4/(byte) make_plasma_charset::b#5 ) + (byte) make_plasma_charset::ii#5 ← phi( make_plasma_charset::@2/(byte) make_plasma_charset::ii#0 make_plasma_charset::@4/(byte) make_plasma_charset::ii#1 ) + (byte) make_plasma_charset::s#2 ← phi( make_plasma_charset::@2/(byte) make_plasma_charset::s#3 make_plasma_charset::@4/(byte) make_plasma_charset::s#4 ) + call sid_rnd + (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#1 + to:make_plasma_charset::@13 +make_plasma_charset::@13: scope:[make_plasma_charset] from make_plasma_charset::@3 + (byte*) print_char_cursor#41 ← phi( make_plasma_charset::@3/(byte*) print_char_cursor#45 ) + (byte*) print_line_cursor#36 ← phi( make_plasma_charset::@3/(byte*) print_line_cursor#40 ) + (byte*) make_plasma_charset::charset#3 ← phi( make_plasma_charset::@3/(byte*) make_plasma_charset::charset#5 ) + (byte) make_plasma_charset::i#4 ← phi( make_plasma_charset::@3/(byte) make_plasma_charset::i#6 ) + (word) make_plasma_charset::c#8 ← phi( make_plasma_charset::@3/(word) make_plasma_charset::c#11 ) + (byte) make_plasma_charset::b#4 ← phi( make_plasma_charset::@3/(byte) make_plasma_charset::b#6 ) + (byte) make_plasma_charset::ii#4 ← phi( make_plasma_charset::@3/(byte) make_plasma_charset::ii#5 ) + (byte) make_plasma_charset::s#1 ← phi( make_plasma_charset::@3/(byte) make_plasma_charset::s#2 ) + (byte) sid_rnd::return#4 ← phi( make_plasma_charset::@3/(byte) sid_rnd::return#2 ) + (byte~) make_plasma_charset::$3 ← (byte) sid_rnd::return#4 + (number~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (number) $ff + (bool~) make_plasma_charset::$5 ← (number~) make_plasma_charset::$4 > (byte) make_plasma_charset::s#1 + (bool~) make_plasma_charset::$6 ← ! (bool~) make_plasma_charset::$5 + if((bool~) make_plasma_charset::$6) goto make_plasma_charset::@4 + to:make_plasma_charset::@5 +make_plasma_charset::@4: scope:[make_plasma_charset] from make_plasma_charset::@13 make_plasma_charset::@5 + (byte*) print_char_cursor#38 ← phi( make_plasma_charset::@13/(byte*) print_char_cursor#41 make_plasma_charset::@5/(byte*) print_char_cursor#42 ) + (byte*) print_line_cursor#33 ← phi( make_plasma_charset::@13/(byte*) print_line_cursor#36 make_plasma_charset::@5/(byte*) print_line_cursor#37 ) + (byte) make_plasma_charset::s#4 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::s#1 make_plasma_charset::@5/(byte) make_plasma_charset::s#6 ) + (byte*) make_plasma_charset::charset#2 ← phi( make_plasma_charset::@13/(byte*) make_plasma_charset::charset#3 make_plasma_charset::@5/(byte*) make_plasma_charset::charset#4 ) + (byte) make_plasma_charset::b#5 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::b#4 make_plasma_charset::@5/(byte) make_plasma_charset::b#1 ) + (byte) make_plasma_charset::i#3 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::i#4 make_plasma_charset::@5/(byte) make_plasma_charset::i#5 ) + (word) make_plasma_charset::c#6 ← phi( make_plasma_charset::@13/(word) make_plasma_charset::c#8 make_plasma_charset::@5/(word) make_plasma_charset::c#9 ) + (byte) make_plasma_charset::ii#2 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::ii#4 make_plasma_charset::@5/(byte) make_plasma_charset::ii#3 ) + (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 + (bool~) make_plasma_charset::$7 ← (byte) make_plasma_charset::ii#1 < (number) 8 + if((bool~) make_plasma_charset::$7) goto make_plasma_charset::@3 + to:make_plasma_charset::@6 +make_plasma_charset::@5: scope:[make_plasma_charset] from make_plasma_charset::@13 + (byte*) print_char_cursor#42 ← phi( make_plasma_charset::@13/(byte*) print_char_cursor#41 ) + (byte*) print_line_cursor#37 ← phi( make_plasma_charset::@13/(byte*) print_line_cursor#36 ) + (byte) make_plasma_charset::s#6 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::s#1 ) + (byte*) make_plasma_charset::charset#4 ← phi( make_plasma_charset::@13/(byte*) make_plasma_charset::charset#3 ) + (byte) make_plasma_charset::i#5 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::i#4 ) + (word) make_plasma_charset::c#9 ← phi( make_plasma_charset::@13/(word) make_plasma_charset::c#8 ) + (byte) make_plasma_charset::ii#3 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::ii#4 ) + (byte) make_plasma_charset::b#2 ← phi( make_plasma_charset::@13/(byte) make_plasma_charset::b#4 ) + (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#3) + to:make_plasma_charset::@4 +make_plasma_charset::@6: scope:[make_plasma_charset] from make_plasma_charset::@4 + (byte*) print_char_cursor#35 ← phi( make_plasma_charset::@4/(byte*) print_char_cursor#38 ) + (byte*) print_line_cursor#29 ← phi( make_plasma_charset::@4/(byte*) print_line_cursor#33 ) + (byte) make_plasma_charset::s#5 ← phi( make_plasma_charset::@4/(byte) make_plasma_charset::s#4 ) + (byte*) make_plasma_charset::charset#1 ← phi( make_plasma_charset::@4/(byte*) make_plasma_charset::charset#2 ) + (byte) make_plasma_charset::b#3 ← phi( make_plasma_charset::@4/(byte) make_plasma_charset::b#5 ) + (byte) make_plasma_charset::i#2 ← phi( make_plasma_charset::@4/(byte) make_plasma_charset::i#3 ) + (word) make_plasma_charset::c#3 ← phi( make_plasma_charset::@4/(word) make_plasma_charset::c#6 ) + (number~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#3 * (number) 8 + (number~) make_plasma_charset::$9 ← (number~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#2 + *((byte*) make_plasma_charset::charset#1 + (number~) make_plasma_charset::$9) ← (byte) make_plasma_charset::b#3 + (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#2 + (bool~) make_plasma_charset::$10 ← (byte) make_plasma_charset::i#1 < (number) 8 + if((bool~) make_plasma_charset::$10) goto make_plasma_charset::@2 + to:make_plasma_charset::@7 +make_plasma_charset::@7: scope:[make_plasma_charset] from make_plasma_charset::@6 + (byte*) make_plasma_charset::charset#12 ← phi( make_plasma_charset::@6/(byte*) make_plasma_charset::charset#1 ) + (byte*) print_char_cursor#30 ← phi( make_plasma_charset::@6/(byte*) print_char_cursor#35 ) + (byte*) print_line_cursor#24 ← phi( make_plasma_charset::@6/(byte*) print_line_cursor#29 ) + (word) make_plasma_charset::c#4 ← phi( make_plasma_charset::@6/(word) make_plasma_charset::c#3 ) + (number~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#4 & (number) 7 + (bool~) make_plasma_charset::$12 ← (number~) make_plasma_charset::$11 == (number) 0 + (bool~) make_plasma_charset::$13 ← ! (bool~) make_plasma_charset::$12 + if((bool~) make_plasma_charset::$13) goto make_plasma_charset::@9 + to:make_plasma_charset::@8 +make_plasma_charset::@9: scope:[make_plasma_charset] from make_plasma_charset::@14 make_plasma_charset::@7 + (byte*) make_plasma_charset::charset#9 ← phi( make_plasma_charset::@14/(byte*) make_plasma_charset::charset#11 make_plasma_charset::@7/(byte*) make_plasma_charset::charset#12 ) + (byte*) print_char_cursor#24 ← phi( make_plasma_charset::@14/(byte*) print_char_cursor#8 make_plasma_charset::@7/(byte*) print_char_cursor#30 ) + (byte*) print_line_cursor#17 ← phi( make_plasma_charset::@14/(byte*) print_line_cursor#23 make_plasma_charset::@7/(byte*) print_line_cursor#24 ) + (word) make_plasma_charset::c#5 ← phi( make_plasma_charset::@14/(word) make_plasma_charset::c#7 make_plasma_charset::@7/(word) make_plasma_charset::c#4 ) + (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#5 + (bool~) make_plasma_charset::$15 ← (word) make_plasma_charset::c#1 < (number) $100 + if((bool~) make_plasma_charset::$15) goto make_plasma_charset::@1 + to:make_plasma_charset::@return +make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset::@7 + (byte*) make_plasma_charset::charset#14 ← phi( make_plasma_charset::@7/(byte*) make_plasma_charset::charset#12 ) + (byte*) print_line_cursor#30 ← phi( make_plasma_charset::@7/(byte*) print_line_cursor#24 ) + (word) make_plasma_charset::c#10 ← phi( make_plasma_charset::@7/(word) make_plasma_charset::c#4 ) + (byte*) print_char_cursor#20 ← phi( make_plasma_charset::@7/(byte*) print_char_cursor#30 ) + (byte) print_char::ch#0 ← (byte) '.' + call print_char + to:make_plasma_charset::@14 +make_plasma_charset::@14: scope:[make_plasma_charset] from make_plasma_charset::@8 + (byte*) make_plasma_charset::charset#11 ← phi( make_plasma_charset::@8/(byte*) make_plasma_charset::charset#14 ) + (byte*) print_line_cursor#23 ← phi( make_plasma_charset::@8/(byte*) print_line_cursor#30 ) + (word) make_plasma_charset::c#7 ← phi( make_plasma_charset::@8/(word) make_plasma_charset::c#10 ) + (byte*) print_char_cursor#17 ← phi( make_plasma_charset::@8/(byte*) print_char_cursor#2 ) + (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#17 + to:make_plasma_charset::@9 +make_plasma_charset::@return: scope:[make_plasma_charset] from make_plasma_charset::@9 + (byte*) print_char_cursor#18 ← phi( make_plasma_charset::@9/(byte*) print_char_cursor#24 ) + (byte*) print_line_cursor#12 ← phi( make_plasma_charset::@9/(byte*) print_line_cursor#17 ) + (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#12 + (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#18 + return + to:@return +@44: scope:[] from @40 + (byte*) print_screen#9 ← phi( @40/(byte*) print_screen#10 ) + (byte) sin_offset_y#18 ← phi( @40/(byte) sin_offset_y#3 ) + (byte) sin_offset_x#18 ← phi( @40/(byte) sin_offset_x#3 ) + (byte*) print_char_cursor#25 ← phi( @40/(byte*) print_char_cursor#31 ) + (byte*) print_line_cursor#18 ← phi( @40/(byte*) print_line_cursor#25 ) + (word*) SQUARES#25 ← phi( @40/(word*) SQUARES#33 ) + (byte*) heap_head#30 ← phi( @40/(byte*) heap_head#35 ) + (byte) NUM_SQUARES#17 ← phi( @40/(byte) NUM_SQUARES#22 ) + call main + to:@47 +@47: scope:[] from @44 + (byte) sin_offset_y#13 ← phi( @44/(byte) sin_offset_y#2 ) + (byte) sin_offset_x#13 ← phi( @44/(byte) sin_offset_x#2 ) + (byte*) print_char_cursor#19 ← phi( @44/(byte*) print_char_cursor#6 ) + (byte*) print_line_cursor#13 ← phi( @44/(byte*) print_line_cursor#4 ) + (word*) SQUARES#16 ← phi( @44/(word*) SQUARES#4 ) + (byte*) heap_head#22 ← phi( @44/(byte*) heap_head#8 ) + (byte) NUM_SQUARES#12 ← phi( @44/(byte) NUM_SQUARES#2 ) + (byte) NUM_SQUARES#5 ← (byte) NUM_SQUARES#12 + (byte*) heap_head#11 ← (byte*) heap_head#22 + (word*) SQUARES#7 ← (word*) SQUARES#16 + (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#13 + (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#19 + (byte) sin_offset_x#6 ← (byte) sin_offset_x#13 + (byte) sin_offset_y#6 ← (byte) sin_offset_y#13 + to:@end +@end: scope:[] from @47 + +SYMBOL TABLE SSA +(void*~) $0 +(void*~) $1 +(label) @11 +(label) @14 +(label) @16 +(label) @37 +(label) @39 +(label) @4 +(label) @40 +(label) @44 +(label) @45 +(label) @46 +(label) @47 +(label) @begin +(label) @end +(byte) BLACK +(byte) BLACK#0 +(byte*) CHARSET +(byte*) CHARSET#0 +(byte*) COLS +(byte*) COLS#0 +(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16 +(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 +(byte) CORDIC_ITERATIONS_16 +(byte) CORDIC_ITERATIONS_16#0 +(byte*) D018 +(byte*) D018#0 +(byte*) HEAP_START +(byte*) HEAP_START#0 +(byte) NUM_SQUARES +(byte) NUM_SQUARES#0 +(byte) NUM_SQUARES#1 +(byte) NUM_SQUARES#10 +(byte) NUM_SQUARES#11 +(byte) NUM_SQUARES#12 +(byte) NUM_SQUARES#13 +(byte) NUM_SQUARES#14 +(byte) NUM_SQUARES#15 +(byte) NUM_SQUARES#16 +(byte) NUM_SQUARES#17 +(byte) NUM_SQUARES#18 +(byte) NUM_SQUARES#19 +(byte) NUM_SQUARES#2 +(byte) NUM_SQUARES#20 +(byte) NUM_SQUARES#21 +(byte) NUM_SQUARES#22 +(byte) NUM_SQUARES#23 +(byte) NUM_SQUARES#24 +(byte) NUM_SQUARES#25 +(byte) NUM_SQUARES#26 +(byte) NUM_SQUARES#27 +(byte) NUM_SQUARES#28 +(byte) NUM_SQUARES#29 +(byte) NUM_SQUARES#3 +(byte) NUM_SQUARES#30 +(byte) NUM_SQUARES#31 +(byte) NUM_SQUARES#32 +(byte) NUM_SQUARES#33 +(byte) NUM_SQUARES#34 +(byte) NUM_SQUARES#35 +(byte) NUM_SQUARES#36 +(byte) NUM_SQUARES#37 +(byte) NUM_SQUARES#38 +(byte) NUM_SQUARES#39 +(byte) NUM_SQUARES#4 +(byte) NUM_SQUARES#40 +(byte) NUM_SQUARES#41 +(byte) NUM_SQUARES#42 +(byte) NUM_SQUARES#43 +(byte) NUM_SQUARES#44 +(byte) NUM_SQUARES#45 +(byte) NUM_SQUARES#46 +(byte) NUM_SQUARES#47 +(byte) NUM_SQUARES#5 +(byte) NUM_SQUARES#6 +(byte) NUM_SQUARES#7 +(byte) NUM_SQUARES#8 +(byte) NUM_SQUARES#9 +(byte*) SCREEN1 +(byte*) SCREEN1#0 +(byte*) SCREEN2 +(byte*) SCREEN2#0 +(byte*) SCREEN_ANGLE +(byte*) SCREEN_ANGLE#0 +(byte*) SCREEN_DIST +(byte*) SCREEN_DIST#0 +(byte) SID_CONTROL_NOISE +(byte) SID_CONTROL_NOISE#0 +(byte*) SID_VOICE3_CONTROL +(byte*) SID_VOICE3_CONTROL#0 +(word*) SID_VOICE3_FREQ +(word*) SID_VOICE3_FREQ#0 +(byte*) SID_VOICE3_OSC +(byte*) SID_VOICE3_OSC#0 +(byte[$200]) SINTABLE +(byte[$200]) SINTABLE#0 +(const byte) SIZEOF_WORD = (byte) 2 +(word*) SQUARES +(word*) SQUARES#0 +(word*) SQUARES#1 +(word*) SQUARES#10 +(word*) SQUARES#11 +(word*) SQUARES#12 +(word*) SQUARES#13 +(word*) SQUARES#14 +(word*) SQUARES#15 +(word*) SQUARES#16 +(word*) SQUARES#17 +(word*) SQUARES#18 +(word*) SQUARES#19 +(word*) SQUARES#2 +(word*) SQUARES#20 +(word*) SQUARES#21 +(word*) SQUARES#22 +(word*) SQUARES#23 +(word*) SQUARES#24 +(word*) SQUARES#25 +(word*) SQUARES#26 +(word*) SQUARES#27 +(word*) SQUARES#28 +(word*) SQUARES#29 +(word*) SQUARES#3 +(word*) SQUARES#30 +(word*) SQUARES#31 +(word*) SQUARES#32 +(word*) SQUARES#33 +(word*) SQUARES#34 +(word*) SQUARES#35 +(word*) SQUARES#36 +(word*) SQUARES#37 +(word*) SQUARES#38 +(word*) SQUARES#39 +(word*) SQUARES#4 +(word*) SQUARES#40 +(word*) SQUARES#41 +(word*) SQUARES#42 +(word*) SQUARES#43 +(word*) SQUARES#44 +(word*) SQUARES#45 +(word*) SQUARES#46 +(word*) SQUARES#47 +(word*) SQUARES#48 +(word*) SQUARES#49 +(word*) SQUARES#5 +(word*) SQUARES#50 +(word*) SQUARES#51 +(word*) SQUARES#52 +(word*) SQUARES#6 +(word*) SQUARES#7 +(word*) SQUARES#8 +(word*) SQUARES#9 +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) +(bool~) atan2_16::$0 +(signed word~) atan2_16::$1 +(bool~) atan2_16::$10 +(bool~) atan2_16::$11 +(number~) atan2_16::$12 +(bool~) atan2_16::$13 +(bool~) atan2_16::$14 +(word~) atan2_16::$15 +(number~) atan2_16::$16 +(bool~) atan2_16::$17 +(bool~) atan2_16::$18 +(bool~) atan2_16::$19 +(signed word~) atan2_16::$2 +(bool~) atan2_16::$20 +(bool~) atan2_16::$21 +(bool~) atan2_16::$22 +(byte~) atan2_16::$23 +(byte~) atan2_16::$24 +(bool~) atan2_16::$25 +(signed word~) atan2_16::$3 +(signed word~) atan2_16::$4 +(bool~) atan2_16::$5 +(signed word~) atan2_16::$6 +(signed word~) atan2_16::$7 +(signed word~) atan2_16::$8 +(signed word~) atan2_16::$9 +(label) atan2_16::@1 +(label) atan2_16::@13 +(label) atan2_16::@15 +(label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 +(label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@24 +(label) atan2_16::@25 +(label) atan2_16::@26 +(label) atan2_16::@27 +(label) atan2_16::@3 +(label) atan2_16::@30 +(label) atan2_16::@33 +(label) atan2_16::@4 +(label) atan2_16::@5 +(label) atan2_16::@6 +(label) atan2_16::@7 +(label) atan2_16::@8 +(label) atan2_16::@return +(word) atan2_16::angle +(word) atan2_16::angle#0 +(word) atan2_16::angle#1 +(word) atan2_16::angle#10 +(word) atan2_16::angle#11 +(word) atan2_16::angle#12 +(word) atan2_16::angle#13 +(word) atan2_16::angle#14 +(word) atan2_16::angle#15 +(word) atan2_16::angle#16 +(word) atan2_16::angle#17 +(word) atan2_16::angle#18 +(word) atan2_16::angle#19 +(word) atan2_16::angle#2 +(word) atan2_16::angle#20 +(word) atan2_16::angle#3 +(word) atan2_16::angle#4 +(word) atan2_16::angle#5 +(word) atan2_16::angle#6 +(word) atan2_16::angle#7 +(word) atan2_16::angle#8 +(word) atan2_16::angle#9 +(byte) atan2_16::i +(byte) atan2_16::i#0 +(byte) atan2_16::i#1 +(byte) atan2_16::i#10 +(byte) atan2_16::i#11 +(byte) atan2_16::i#2 +(byte) atan2_16::i#3 +(byte) atan2_16::i#4 +(byte) atan2_16::i#5 +(byte) atan2_16::i#6 +(byte) atan2_16::i#7 +(byte) atan2_16::i#8 +(byte) atan2_16::i#9 +(word) atan2_16::return +(word) atan2_16::return#0 +(word) atan2_16::return#1 +(word) atan2_16::return#2 +(word) atan2_16::return#3 +(word) atan2_16::return#4 +(byte) atan2_16::shift +(byte) atan2_16::shift#0 +(byte) atan2_16::shift#1 +(byte) atan2_16::shift#2 +(byte) atan2_16::shift#3 +(byte) atan2_16::shift#4 +(signed word) atan2_16::x +(signed word) atan2_16::x#0 +(signed word) atan2_16::x#1 +(signed word) atan2_16::x#10 +(signed word) atan2_16::x#11 +(signed word) atan2_16::x#12 +(signed word) atan2_16::x#13 +(signed word) atan2_16::x#14 +(signed word) atan2_16::x#15 +(signed word) atan2_16::x#16 +(signed word) atan2_16::x#17 +(signed word) atan2_16::x#18 +(signed word) atan2_16::x#2 +(signed word) atan2_16::x#3 +(signed word) atan2_16::x#4 +(signed word) atan2_16::x#5 +(signed word) atan2_16::x#6 +(signed word) atan2_16::x#7 +(signed word) atan2_16::x#8 +(signed word) atan2_16::x#9 +(signed word) atan2_16::xd +(signed word) atan2_16::xd#0 +(signed word) atan2_16::xd#1 +(signed word) atan2_16::xd#2 +(signed word) atan2_16::xd#3 +(signed word) atan2_16::xd#4 +(signed word) atan2_16::xd#5 +(signed word) atan2_16::xd#6 +(signed word) atan2_16::xd#7 +(signed word) atan2_16::xd#8 +(signed word) atan2_16::xd#9 +(signed word) atan2_16::xi +(signed word) atan2_16::xi#0 +(signed word) atan2_16::xi#1 +(signed word) atan2_16::xi#10 +(signed word) atan2_16::xi#11 +(signed word) atan2_16::xi#12 +(signed word) atan2_16::xi#2 +(signed word) atan2_16::xi#3 +(signed word) atan2_16::xi#4 +(signed word) atan2_16::xi#5 +(signed word) atan2_16::xi#6 +(signed word) atan2_16::xi#7 +(signed word) atan2_16::xi#8 +(signed word) atan2_16::xi#9 +(signed word) atan2_16::y +(signed word) atan2_16::y#0 +(signed word) atan2_16::y#1 +(signed word) atan2_16::y#10 +(signed word) atan2_16::y#11 +(signed word) atan2_16::y#12 +(signed word) atan2_16::y#13 +(signed word) atan2_16::y#14 +(signed word) atan2_16::y#15 +(signed word) atan2_16::y#16 +(signed word) atan2_16::y#17 +(signed word) atan2_16::y#18 +(signed word) atan2_16::y#19 +(signed word) atan2_16::y#2 +(signed word) atan2_16::y#20 +(signed word) atan2_16::y#3 +(signed word) atan2_16::y#4 +(signed word) atan2_16::y#5 +(signed word) atan2_16::y#6 +(signed word) atan2_16::y#7 +(signed word) atan2_16::y#8 +(signed word) atan2_16::y#9 +(signed word) atan2_16::yd +(signed word) atan2_16::yd#0 +(signed word) atan2_16::yd#1 +(signed word) atan2_16::yd#2 +(signed word) atan2_16::yd#3 +(signed word) atan2_16::yd#4 +(signed word) atan2_16::yd#5 +(signed word) atan2_16::yd#6 +(signed word) atan2_16::yd#7 +(signed word) atan2_16::yd#8 +(signed word) atan2_16::yd#9 +(signed word) atan2_16::yi +(signed word) atan2_16::yi#0 +(signed word) atan2_16::yi#1 +(signed word) atan2_16::yi#10 +(signed word) atan2_16::yi#11 +(signed word) atan2_16::yi#12 +(signed word) atan2_16::yi#13 +(signed word) atan2_16::yi#14 +(signed word) atan2_16::yi#15 +(signed word) atan2_16::yi#2 +(signed word) atan2_16::yi#3 +(signed word) atan2_16::yi#4 +(signed word) atan2_16::yi#5 +(signed word) atan2_16::yi#6 +(signed word) atan2_16::yi#7 +(signed word) atan2_16::yi#8 +(signed word) atan2_16::yi#9 +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) +(bool~) bsearch16u::$0 +(word*~) bsearch16u::$1 +(signed word~) bsearch16u::$10 +(bool~) bsearch16u::$11 +(bool~) bsearch16u::$12 +(bool~) bsearch16u::$13 +(bool~) bsearch16u::$14 +(word*~) bsearch16u::$15 +(byte~) bsearch16u::$16 +(number~) bsearch16u::$17 +(number~) bsearch16u::$18 +(word*~) bsearch16u::$2 +(word*~) bsearch16u::$3 +(word*~) bsearch16u::$4 +(bool~) bsearch16u::$5 +(byte~) bsearch16u::$6 +(word*~) bsearch16u::$7 +(signed word~) bsearch16u::$8 +(signed word~) bsearch16u::$9 +(label) bsearch16u::@1 +(label) bsearch16u::@10 +(label) bsearch16u::@13 +(label) bsearch16u::@15 +(label) bsearch16u::@2 +(label) bsearch16u::@3 +(label) bsearch16u::@6 +(label) bsearch16u::@7 +(label) bsearch16u::@8 +(label) bsearch16u::@9 +(label) bsearch16u::@return +(word*) bsearch16u::items +(word*) bsearch16u::items#0 +(word*) bsearch16u::items#1 +(word*) bsearch16u::items#2 +(word*) bsearch16u::items#3 +(word*) bsearch16u::items#4 +(word*) bsearch16u::items#5 +(word*) bsearch16u::items#6 +(word*) bsearch16u::items#7 +(word*) bsearch16u::items#8 +(word*) bsearch16u::items#9 +(word) bsearch16u::key +(word) bsearch16u::key#0 +(word) bsearch16u::key#1 +(word) bsearch16u::key#2 +(word) bsearch16u::key#3 +(word) bsearch16u::key#4 +(word) bsearch16u::key#5 +(word) bsearch16u::key#6 +(word) bsearch16u::key#7 +(byte) bsearch16u::num +(byte) bsearch16u::num#0 +(byte) bsearch16u::num#1 +(byte) bsearch16u::num#2 +(byte) bsearch16u::num#3 +(byte) bsearch16u::num#4 +(byte) bsearch16u::num#5 +(byte) bsearch16u::num#6 +(byte) bsearch16u::num#7 +(byte) bsearch16u::num#8 +(word*) bsearch16u::pivot +(word*) bsearch16u::pivot#0 +(word*) bsearch16u::pivot#1 +(word*) bsearch16u::pivot#2 +(word*) bsearch16u::pivot#3 +(signed word) bsearch16u::result +(signed word) bsearch16u::result#0 +(signed word) bsearch16u::result#1 +(word*) bsearch16u::return +(word*) bsearch16u::return#0 +(word*) bsearch16u::return#1 +(word*) bsearch16u::return#2 +(word*) bsearch16u::return#3 +(word*) bsearch16u::return#4 +(word*) bsearch16u::return#5 +(void()) doplasma((byte*) doplasma::screen) +(byte*~) doplasma::$0 +(byte*~) doplasma::$1 +(byte~) doplasma::$2 +(bool~) doplasma::$3 +(bool~) doplasma::$4 +(label) doplasma::@1 +(label) doplasma::@2 +(label) doplasma::@3 +(label) doplasma::@4 +(label) doplasma::@return +(byte*) doplasma::angle +(byte*) doplasma::angle#0 +(byte*) doplasma::angle#1 +(byte*) doplasma::angle#2 +(byte*) doplasma::angle#3 +(byte*) doplasma::angle#4 +(byte*) doplasma::dist +(byte*) doplasma::dist#0 +(byte*) doplasma::dist#1 +(byte*) doplasma::dist#2 +(byte*) doplasma::dist#3 +(byte*) doplasma::dist#4 +(byte*) doplasma::screen +(byte*) doplasma::screen#0 +(byte*) doplasma::screen#1 +(byte*) doplasma::screen#2 +(byte*) doplasma::screen#3 +(byte*) doplasma::screen#4 +(byte*) doplasma::screen#5 +(byte*) doplasma::screen#6 +(byte*) doplasma::sin_x +(byte*) doplasma::sin_x#0 +(byte*) doplasma::sin_x#1 +(byte*) doplasma::sin_x#2 +(byte*) doplasma::sin_x#3 +(byte*) doplasma::sin_y +(byte*) doplasma::sin_y#0 +(byte*) doplasma::sin_y#1 +(byte*) doplasma::sin_y#2 +(byte*) doplasma::sin_y#3 +(byte) doplasma::x +(byte) doplasma::x#0 +(byte) doplasma::x#1 +(byte) doplasma::x#2 +(byte) doplasma::y +(byte) doplasma::y#0 +(byte) doplasma::y#1 +(byte) doplasma::y#2 +(byte) doplasma::y#3 +(byte) doplasma::y#4 +(byte*) heap_head +(byte*) heap_head#0 +(byte*) heap_head#1 +(byte*) heap_head#10 +(byte*) heap_head#11 +(byte*) heap_head#12 +(byte*) heap_head#13 +(byte*) heap_head#14 +(byte*) heap_head#15 +(byte*) heap_head#16 +(byte*) heap_head#17 +(byte*) heap_head#18 +(byte*) heap_head#19 +(byte*) heap_head#2 +(byte*) heap_head#20 +(byte*) heap_head#21 +(byte*) heap_head#22 +(byte*) heap_head#23 +(byte*) heap_head#24 +(byte*) heap_head#25 +(byte*) heap_head#26 +(byte*) heap_head#27 +(byte*) heap_head#28 +(byte*) heap_head#29 +(byte*) heap_head#3 +(byte*) heap_head#30 +(byte*) heap_head#31 +(byte*) heap_head#32 +(byte*) heap_head#33 +(byte*) heap_head#34 +(byte*) heap_head#35 +(byte*) heap_head#36 +(byte*) heap_head#37 +(byte*) heap_head#38 +(byte*) heap_head#39 +(byte*) heap_head#4 +(byte*) heap_head#40 +(byte*) heap_head#41 +(byte*) heap_head#42 +(byte*) heap_head#43 +(byte*) heap_head#44 +(byte*) heap_head#45 +(byte*) heap_head#46 +(byte*) heap_head#47 +(byte*) heap_head#48 +(byte*) heap_head#49 +(byte*) heap_head#5 +(byte*) heap_head#50 +(byte*) heap_head#51 +(byte*) heap_head#52 +(byte*) heap_head#53 +(byte*) heap_head#54 +(byte*) heap_head#55 +(byte*) heap_head#56 +(byte*) heap_head#57 +(byte*) heap_head#58 +(byte*) heap_head#6 +(byte*) heap_head#7 +(byte*) heap_head#8 +(byte*) heap_head#9 +(void()) init_angle_screen((byte*) init_angle_screen::screen) +(byte*~) init_angle_screen::$0 +(byte*~) init_angle_screen::$1 +(number~) init_angle_screen::$10 +(number~) init_angle_screen::$11 +(byte~) init_angle_screen::$12 +(number~) init_angle_screen::$13 +(number~) init_angle_screen::$14 +(bool~) init_angle_screen::$15 +(bool~) init_angle_screen::$16 +(number~) init_angle_screen::$2 +(number~) init_angle_screen::$3 +(word~) init_angle_screen::$4 +(signed word~) init_angle_screen::$5 +(number~) init_angle_screen::$6 +(word~) init_angle_screen::$7 +(signed word~) init_angle_screen::$8 +(word~) init_angle_screen::$9 +(label) init_angle_screen::@1 +(label) init_angle_screen::@2 +(label) init_angle_screen::@3 +(label) init_angle_screen::@5 +(label) init_angle_screen::@return +(byte) init_angle_screen::ang_w +(byte) init_angle_screen::ang_w#0 +(word) init_angle_screen::angle_w +(word) init_angle_screen::angle_w#0 +(byte*) init_angle_screen::screen +(byte*) init_angle_screen::screen#0 +(byte*) init_angle_screen::screen#1 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#0 +(byte*) init_angle_screen::screen_bottomline#1 +(byte*) init_angle_screen::screen_bottomline#2 +(byte*) init_angle_screen::screen_bottomline#3 +(byte*) init_angle_screen::screen_bottomline#4 +(byte*) init_angle_screen::screen_bottomline#5 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#0 +(byte*) init_angle_screen::screen_topline#1 +(byte*) init_angle_screen::screen_topline#2 +(byte*) init_angle_screen::screen_topline#3 +(byte*) init_angle_screen::screen_topline#4 +(byte*) init_angle_screen::screen_topline#5 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#0 +(byte) init_angle_screen::x#1 +(byte) init_angle_screen::x#2 +(byte) init_angle_screen::x#3 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#0 +(byte) init_angle_screen::xb#1 +(byte) init_angle_screen::xb#2 +(byte) init_angle_screen::xb#3 +(signed word) init_angle_screen::xw +(signed word) init_angle_screen::xw#0 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#0 +(byte) init_angle_screen::y#1 +(byte) init_angle_screen::y#2 +(byte) init_angle_screen::y#3 +(byte) init_angle_screen::y#4 +(byte) init_angle_screen::y#5 +(signed word) init_angle_screen::yw +(signed word) init_angle_screen::yw#0 +(void()) init_dist_screen((byte*) init_dist_screen::screen) +(byte*~) init_dist_screen::$1 +(number~) init_dist_screen::$10 +(bool~) init_dist_screen::$11 +(number~) init_dist_screen::$12 +(number~) init_dist_screen::$13 +(number~) init_dist_screen::$14 +(number~) init_dist_screen::$15 +(number~) init_dist_screen::$16 +(word~) init_dist_screen::$17 +(word~) init_dist_screen::$18 +(byte~) init_dist_screen::$19 +(number~) init_dist_screen::$2 +(bool~) init_dist_screen::$20 +(bool~) init_dist_screen::$21 +(bool~) init_dist_screen::$3 +(number~) init_dist_screen::$4 +(number~) init_dist_screen::$5 +(number~) init_dist_screen::$6 +(number~) init_dist_screen::$7 +(number~) init_dist_screen::$8 +(word~) init_dist_screen::$9 +(label) init_dist_screen::@1 +(label) init_dist_screen::@11 +(label) init_dist_screen::@15 +(label) init_dist_screen::@16 +(label) init_dist_screen::@17 +(label) init_dist_screen::@18 +(label) init_dist_screen::@2 +(label) init_dist_screen::@3 +(label) init_dist_screen::@4 +(label) init_dist_screen::@5 +(label) init_dist_screen::@6 +(label) init_dist_screen::@7 +(label) init_dist_screen::@8 +(label) init_dist_screen::@return +(byte) init_dist_screen::d +(byte) init_dist_screen::d#0 +(word) init_dist_screen::ds +(word) init_dist_screen::ds#0 +(byte*) init_dist_screen::screen +(byte*) init_dist_screen::screen#0 +(byte*) init_dist_screen::screen#1 +(byte*) init_dist_screen::screen#2 +(byte*) init_dist_screen::screen_bottomline +(byte*) init_dist_screen::screen_bottomline#0 +(byte*) init_dist_screen::screen_bottomline#1 +(byte*) init_dist_screen::screen_bottomline#10 +(byte*) init_dist_screen::screen_bottomline#11 +(byte*) init_dist_screen::screen_bottomline#12 +(byte*) init_dist_screen::screen_bottomline#13 +(byte*) init_dist_screen::screen_bottomline#2 +(byte*) init_dist_screen::screen_bottomline#3 +(byte*) init_dist_screen::screen_bottomline#4 +(byte*) init_dist_screen::screen_bottomline#5 +(byte*) init_dist_screen::screen_bottomline#6 +(byte*) init_dist_screen::screen_bottomline#7 +(byte*) init_dist_screen::screen_bottomline#8 +(byte*) init_dist_screen::screen_bottomline#9 +(byte*) init_dist_screen::screen_topline +(byte*) init_dist_screen::screen_topline#0 +(byte*) init_dist_screen::screen_topline#1 +(byte*) init_dist_screen::screen_topline#10 +(byte*) init_dist_screen::screen_topline#11 +(byte*) init_dist_screen::screen_topline#12 +(byte*) init_dist_screen::screen_topline#13 +(byte*) init_dist_screen::screen_topline#2 +(byte*) init_dist_screen::screen_topline#3 +(byte*) init_dist_screen::screen_topline#4 +(byte*) init_dist_screen::screen_topline#5 +(byte*) init_dist_screen::screen_topline#6 +(byte*) init_dist_screen::screen_topline#7 +(byte*) init_dist_screen::screen_topline#8 +(byte*) init_dist_screen::screen_topline#9 +(byte) init_dist_screen::x +(byte) init_dist_screen::x#0 +(byte) init_dist_screen::x#1 +(byte) init_dist_screen::x#2 +(byte) init_dist_screen::x#3 +(byte) init_dist_screen::x#4 +(byte) init_dist_screen::x#5 +(byte) init_dist_screen::x#6 +(byte) init_dist_screen::x#7 +(byte) init_dist_screen::x2 +(byte) init_dist_screen::x2#0 +(byte) init_dist_screen::x2#1 +(byte) init_dist_screen::x2#2 +(byte) init_dist_screen::xb +(byte) init_dist_screen::xb#0 +(byte) init_dist_screen::xb#1 +(byte) init_dist_screen::xb#2 +(byte) init_dist_screen::xb#3 +(byte) init_dist_screen::xb#4 +(byte) init_dist_screen::xb#5 +(byte) init_dist_screen::xb#6 +(byte) init_dist_screen::xb#7 +(byte) init_dist_screen::xd +(byte) init_dist_screen::xd#0 +(word) init_dist_screen::xds +(word) init_dist_screen::xds#0 +(byte) init_dist_screen::y +(byte) init_dist_screen::y#0 +(byte) init_dist_screen::y#1 +(byte) init_dist_screen::y#10 +(byte) init_dist_screen::y#11 +(byte) init_dist_screen::y#12 +(byte) init_dist_screen::y#13 +(byte) init_dist_screen::y#2 +(byte) init_dist_screen::y#3 +(byte) init_dist_screen::y#4 +(byte) init_dist_screen::y#5 +(byte) init_dist_screen::y#6 +(byte) init_dist_screen::y#7 +(byte) init_dist_screen::y#8 +(byte) init_dist_screen::y#9 +(byte) init_dist_screen::y2 +(byte) init_dist_screen::y2#0 +(byte) init_dist_screen::y2#1 +(byte) init_dist_screen::y2#2 +(byte) init_dist_screen::yd +(byte) init_dist_screen::yd#0 +(word) init_dist_screen::yds +(word) init_dist_screen::yds#0 +(word) init_dist_screen::yds#1 +(word) init_dist_screen::yds#2 +(word) init_dist_screen::yds#3 +(word) init_dist_screen::yds#4 +(word) init_dist_screen::yds#5 +(word) init_dist_screen::yds#6 +(void()) init_squares() +(byte~) init_squares::$0 +(void*~) init_squares::$1 +(number~) init_squares::$2 +(number~) init_squares::$3 +(number~) init_squares::$4 +(bool~) init_squares::$5 +(label) init_squares::@1 +(label) init_squares::@3 +(label) init_squares::@return +(byte) init_squares::i +(byte) init_squares::i#0 +(byte) init_squares::i#1 +(byte) init_squares::i#2 +(word) init_squares::sqr +(word) init_squares::sqr#0 +(word) init_squares::sqr#1 +(word) init_squares::sqr#2 +(word*) init_squares::squares +(word*) init_squares::squares#0 +(word*) init_squares::squares#1 +(word*) init_squares::squares#2 +(void()) main() +(byte~) main::$5 +(byte~) main::$7 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@2 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(label) main::@return +(label) main::toD0181 +(word~) main::toD0181_$0 +(word~) main::toD0181_$0#0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$1#0 +(number~) main::toD0181_$2 +(number~) main::toD0181_$2#0 +(number~) main::toD0181_$3 +(number~) main::toD0181_$3#0 +(word~) main::toD0181_$4 +(word~) main::toD0181_$4#0 +(byte~) main::toD0181_$5 +(byte~) main::toD0181_$5#0 +(number~) main::toD0181_$6 +(number~) main::toD0181_$6#0 +(number~) main::toD0181_$7 +(number~) main::toD0181_$7#0 +(number~) main::toD0181_$8 +(number~) main::toD0181_$8#0 +(label) main::toD0181_@return +(byte*) main::toD0181_gfx +(byte*) main::toD0181_gfx#0 +(byte*) main::toD0181_gfx#1 +(byte) main::toD0181_return +(byte) main::toD0181_return#0 +(byte) main::toD0181_return#1 +(byte) main::toD0181_return#2 +(byte) main::toD0181_return#3 +(byte*) main::toD0181_screen +(byte*) main::toD0181_screen#0 +(byte*) main::toD0181_screen#1 +(label) main::toD0182 +(word~) main::toD0182_$0 +(word~) main::toD0182_$0#0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$1#0 +(number~) main::toD0182_$2 +(number~) main::toD0182_$2#0 +(number~) main::toD0182_$3 +(number~) main::toD0182_$3#0 +(word~) main::toD0182_$4 +(word~) main::toD0182_$4#0 +(byte~) main::toD0182_$5 +(byte~) main::toD0182_$5#0 +(number~) main::toD0182_$6 +(number~) main::toD0182_$6#0 +(number~) main::toD0182_$7 +(number~) main::toD0182_$7#0 +(number~) main::toD0182_$8 +(number~) main::toD0182_$8#0 +(label) main::toD0182_@return +(byte*) main::toD0182_gfx +(byte*) main::toD0182_gfx#0 +(byte*) main::toD0182_gfx#1 +(byte) main::toD0182_return +(byte) main::toD0182_return#0 +(byte) main::toD0182_return#1 +(byte) main::toD0182_return#2 +(byte) main::toD0182_return#3 +(byte*) main::toD0182_screen +(byte*) main::toD0182_screen#0 +(byte*) main::toD0182_screen#1 +(void()) make_plasma_charset((byte*) make_plasma_charset::charset) +(bool~) make_plasma_charset::$10 +(number~) make_plasma_charset::$11 +(bool~) make_plasma_charset::$12 +(bool~) make_plasma_charset::$13 +(bool~) make_plasma_charset::$15 +(byte~) make_plasma_charset::$2 +(byte~) make_plasma_charset::$3 +(number~) make_plasma_charset::$4 +(bool~) make_plasma_charset::$5 +(bool~) make_plasma_charset::$6 +(bool~) make_plasma_charset::$7 +(number~) make_plasma_charset::$8 +(number~) make_plasma_charset::$9 +(label) make_plasma_charset::@1 +(label) make_plasma_charset::@11 +(label) make_plasma_charset::@12 +(label) make_plasma_charset::@13 +(label) make_plasma_charset::@14 +(label) make_plasma_charset::@2 +(label) make_plasma_charset::@3 +(label) make_plasma_charset::@4 +(label) make_plasma_charset::@5 +(label) make_plasma_charset::@6 +(label) make_plasma_charset::@7 +(label) make_plasma_charset::@8 +(label) make_plasma_charset::@9 +(label) make_plasma_charset::@return +(byte) make_plasma_charset::b +(byte) make_plasma_charset::b#0 +(byte) make_plasma_charset::b#1 +(byte) make_plasma_charset::b#2 +(byte) make_plasma_charset::b#3 +(byte) make_plasma_charset::b#4 +(byte) make_plasma_charset::b#5 +(byte) make_plasma_charset::b#6 +(byte[8]) make_plasma_charset::bittab +(byte[8]) make_plasma_charset::bittab#0 +(word) make_plasma_charset::c +(word) make_plasma_charset::c#0 +(word) make_plasma_charset::c#1 +(word) make_plasma_charset::c#10 +(word) make_plasma_charset::c#11 +(word) make_plasma_charset::c#12 +(word) make_plasma_charset::c#2 +(word) make_plasma_charset::c#3 +(word) make_plasma_charset::c#4 +(word) make_plasma_charset::c#5 +(word) make_plasma_charset::c#6 +(word) make_plasma_charset::c#7 +(word) make_plasma_charset::c#8 +(word) make_plasma_charset::c#9 +(byte*) make_plasma_charset::charset +(byte*) make_plasma_charset::charset#0 +(byte*) make_plasma_charset::charset#1 +(byte*) make_plasma_charset::charset#10 +(byte*) make_plasma_charset::charset#11 +(byte*) make_plasma_charset::charset#12 +(byte*) make_plasma_charset::charset#13 +(byte*) make_plasma_charset::charset#14 +(byte*) make_plasma_charset::charset#2 +(byte*) make_plasma_charset::charset#3 +(byte*) make_plasma_charset::charset#4 +(byte*) make_plasma_charset::charset#5 +(byte*) make_plasma_charset::charset#6 +(byte*) make_plasma_charset::charset#7 +(byte*) make_plasma_charset::charset#8 +(byte*) make_plasma_charset::charset#9 +(byte) make_plasma_charset::i +(byte) make_plasma_charset::i#0 +(byte) make_plasma_charset::i#1 +(byte) make_plasma_charset::i#2 +(byte) make_plasma_charset::i#3 +(byte) make_plasma_charset::i#4 +(byte) make_plasma_charset::i#5 +(byte) make_plasma_charset::i#6 +(byte) make_plasma_charset::i#7 +(byte) make_plasma_charset::ii +(byte) make_plasma_charset::ii#0 +(byte) make_plasma_charset::ii#1 +(byte) make_plasma_charset::ii#2 +(byte) make_plasma_charset::ii#3 +(byte) make_plasma_charset::ii#4 +(byte) make_plasma_charset::ii#5 +(byte) make_plasma_charset::s +(byte) make_plasma_charset::s#0 +(byte) make_plasma_charset::s#1 +(byte) make_plasma_charset::s#2 +(byte) make_plasma_charset::s#3 +(byte) make_plasma_charset::s#4 +(byte) make_plasma_charset::s#5 +(byte) make_plasma_charset::s#6 +(void*()) malloc((word) malloc::size) +(label) malloc::@return +(byte*) malloc::mem +(byte*) malloc::mem#0 +(void*) malloc::return +(void*) malloc::return#0 +(void*) malloc::return#1 +(void*) malloc::return#2 +(void*) malloc::return#3 +(void*) malloc::return#4 +(void*) malloc::return#5 +(void*) malloc::return#6 +(void*) malloc::return#7 +(void*) malloc::return#8 +(word) malloc::size +(word) malloc::size#0 +(word) malloc::size#1 +(word) malloc::size#2 +(word) malloc::size#3 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(byte*~) memset::$0 +(byte*~) memset::$1 +(bool~) memset::$2 +(label) memset::@1 +(label) memset::@2 +(label) memset::@return +(byte) memset::c +(byte) memset::c#0 +(byte) memset::c#1 +(byte) memset::c#2 +(byte*) memset::dst +(byte*) memset::dst#0 +(byte*) memset::dst#1 +(byte*) memset::dst#2 +(byte*) memset::end +(byte*) memset::end#0 +(byte*) memset::end#1 +(word) memset::num +(word) memset::num#0 +(word) memset::num#1 +(void*) memset::return +(void*) memset::return#0 +(void*) memset::return#1 +(void*) memset::return#2 +(void*) memset::return#3 +(void*) memset::str +(void*) memset::str#0 +(void*) memset::str#1 +(void*) memset::str#2 +(void*) memset::str#3 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(byte) print_char::ch#0 +(byte) print_char::ch#1 +(byte*) print_char_cursor +(byte*) print_char_cursor#0 +(byte*) print_char_cursor#1 +(byte*) print_char_cursor#10 +(byte*) print_char_cursor#11 +(byte*) print_char_cursor#12 +(byte*) print_char_cursor#13 +(byte*) print_char_cursor#14 +(byte*) print_char_cursor#15 +(byte*) print_char_cursor#16 +(byte*) print_char_cursor#17 +(byte*) print_char_cursor#18 +(byte*) print_char_cursor#19 +(byte*) print_char_cursor#2 +(byte*) print_char_cursor#20 +(byte*) print_char_cursor#21 +(byte*) print_char_cursor#22 +(byte*) print_char_cursor#23 +(byte*) print_char_cursor#24 +(byte*) print_char_cursor#25 +(byte*) print_char_cursor#26 +(byte*) print_char_cursor#27 +(byte*) print_char_cursor#28 +(byte*) print_char_cursor#29 +(byte*) print_char_cursor#3 +(byte*) print_char_cursor#30 +(byte*) print_char_cursor#31 +(byte*) print_char_cursor#32 +(byte*) print_char_cursor#33 +(byte*) print_char_cursor#34 +(byte*) print_char_cursor#35 +(byte*) print_char_cursor#36 +(byte*) print_char_cursor#37 +(byte*) print_char_cursor#38 +(byte*) print_char_cursor#39 +(byte*) print_char_cursor#4 +(byte*) print_char_cursor#40 +(byte*) print_char_cursor#41 +(byte*) print_char_cursor#42 +(byte*) print_char_cursor#43 +(byte*) print_char_cursor#44 +(byte*) print_char_cursor#45 +(byte*) print_char_cursor#46 +(byte*) print_char_cursor#47 +(byte*) print_char_cursor#48 +(byte*) print_char_cursor#49 +(byte*) print_char_cursor#5 +(byte*) print_char_cursor#50 +(byte*) print_char_cursor#51 +(byte*) print_char_cursor#6 +(byte*) print_char_cursor#7 +(byte*) print_char_cursor#8 +(byte*) print_char_cursor#9 +(void()) print_cls() +(byte*~) print_cls::$0 +(bool~) print_cls::$1 +(label) print_cls::@1 +(label) print_cls::@2 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#0 +(byte*) print_cls::sc#1 +(byte*) print_cls::sc#2 +(byte*) print_line_cursor +(byte*) print_line_cursor#0 +(byte*) print_line_cursor#1 +(byte*) print_line_cursor#10 +(byte*) print_line_cursor#11 +(byte*) print_line_cursor#12 +(byte*) print_line_cursor#13 +(byte*) print_line_cursor#14 +(byte*) print_line_cursor#15 +(byte*) print_line_cursor#16 +(byte*) print_line_cursor#17 +(byte*) print_line_cursor#18 +(byte*) print_line_cursor#19 +(byte*) print_line_cursor#2 +(byte*) print_line_cursor#20 +(byte*) print_line_cursor#21 +(byte*) print_line_cursor#22 +(byte*) print_line_cursor#23 +(byte*) print_line_cursor#24 +(byte*) print_line_cursor#25 +(byte*) print_line_cursor#26 +(byte*) print_line_cursor#27 +(byte*) print_line_cursor#28 +(byte*) print_line_cursor#29 +(byte*) print_line_cursor#3 +(byte*) print_line_cursor#30 +(byte*) print_line_cursor#31 +(byte*) print_line_cursor#32 +(byte*) print_line_cursor#33 +(byte*) print_line_cursor#34 +(byte*) print_line_cursor#35 +(byte*) print_line_cursor#36 +(byte*) print_line_cursor#37 +(byte*) print_line_cursor#38 +(byte*) print_line_cursor#39 +(byte*) print_line_cursor#4 +(byte*) print_line_cursor#40 +(byte*) print_line_cursor#41 +(byte*) print_line_cursor#42 +(byte*) print_line_cursor#43 +(byte*) print_line_cursor#44 +(byte*) print_line_cursor#45 +(byte*) print_line_cursor#46 +(byte*) print_line_cursor#5 +(byte*) print_line_cursor#6 +(byte*) print_line_cursor#7 +(byte*) print_line_cursor#8 +(byte*) print_line_cursor#9 +(byte*) print_screen +(byte*) print_screen#0 +(byte*) print_screen#1 +(byte*) print_screen#10 +(byte*) print_screen#11 +(byte*) print_screen#12 +(byte*) print_screen#13 +(byte*) print_screen#14 +(byte*) print_screen#2 +(byte*) print_screen#3 +(byte*) print_screen#4 +(byte*) print_screen#5 +(byte*) print_screen#6 +(byte*) print_screen#7 +(byte*) print_screen#8 +(byte*) print_screen#9 +(byte()) sid_rnd() +(label) sid_rnd::@return +(byte) sid_rnd::return +(byte) sid_rnd::return#0 +(byte) sid_rnd::return#1 +(byte) sid_rnd::return#2 +(byte) sid_rnd::return#3 +(byte) sid_rnd::return#4 +(void()) sid_rnd_init() +(label) sid_rnd_init::@return +(byte) sin_offset_x +(byte) sin_offset_x#0 +(byte) sin_offset_x#1 +(byte) sin_offset_x#10 +(byte) sin_offset_x#11 +(byte) sin_offset_x#12 +(byte) sin_offset_x#13 +(byte) sin_offset_x#14 +(byte) sin_offset_x#15 +(byte) sin_offset_x#16 +(byte) sin_offset_x#17 +(byte) sin_offset_x#18 +(byte) sin_offset_x#19 +(byte) sin_offset_x#2 +(byte) sin_offset_x#20 +(byte) sin_offset_x#21 +(byte) sin_offset_x#22 +(byte) sin_offset_x#23 +(byte) sin_offset_x#24 +(byte) sin_offset_x#25 +(byte) sin_offset_x#26 +(byte) sin_offset_x#27 +(byte) sin_offset_x#28 +(byte) sin_offset_x#29 +(byte) sin_offset_x#3 +(byte) sin_offset_x#30 +(byte) sin_offset_x#4 +(byte) sin_offset_x#5 +(byte) sin_offset_x#6 +(byte) sin_offset_x#7 +(byte) sin_offset_x#8 +(byte) sin_offset_x#9 +(byte) sin_offset_y +(byte) sin_offset_y#0 +(byte) sin_offset_y#1 +(byte) sin_offset_y#10 +(byte) sin_offset_y#11 +(byte) sin_offset_y#12 +(byte) sin_offset_y#13 +(byte) sin_offset_y#14 +(byte) sin_offset_y#15 +(byte) sin_offset_y#16 +(byte) sin_offset_y#17 +(byte) sin_offset_y#18 +(byte) sin_offset_y#19 +(byte) sin_offset_y#2 +(byte) sin_offset_y#20 +(byte) sin_offset_y#21 +(byte) sin_offset_y#22 +(byte) sin_offset_y#23 +(byte) sin_offset_y#24 +(byte) sin_offset_y#25 +(byte) sin_offset_y#26 +(byte) sin_offset_y#27 +(byte) sin_offset_y#28 +(byte) sin_offset_y#29 +(byte) sin_offset_y#3 +(byte) sin_offset_y#30 +(byte) sin_offset_y#4 +(byte) sin_offset_y#5 +(byte) sin_offset_y#6 +(byte) sin_offset_y#7 +(byte) sin_offset_y#8 +(byte) sin_offset_y#9 +(word()) sqr((byte) sqr::val) +(byte~) sqr::$0 +(label) sqr::@return +(word) sqr::return +(word) sqr::return#0 +(word) sqr::return#1 +(word) sqr::return#2 +(word) sqr::return#3 +(word) sqr::return#4 +(word) sqr::return#5 +(word) sqr::return#6 +(byte) sqr::val +(byte) sqr::val#0 +(byte) sqr::val#1 +(byte) sqr::val#2 +(byte()) sqrt((word) sqrt::val) +(word*~) sqrt::$0 +(word~) sqrt::$1 +(byte~) sqrt::$2 +(word~) sqrt::$3 +(label) sqrt::@2 +(label) sqrt::@return +(word*) sqrt::found +(word*) sqrt::found#0 +(byte) sqrt::return +(byte) sqrt::return#0 +(byte) sqrt::return#1 +(byte) sqrt::return#2 +(byte) sqrt::return#3 +(byte) sqrt::return#4 +(byte) sqrt::sq +(byte) sqrt::sq#0 +(word) sqrt::val +(word) sqrt::val#0 +(word) sqrt::val#1 + +Fixing inline constructor with init_angle_screen::$17 ← (byte)init_angle_screen::$3 w= (byte)0 +Fixing inline constructor with init_angle_screen::$18 ← (byte)init_angle_screen::$6 w= (byte)0 +Successful SSA optimization Pass2FixInlineConstructorsNew +Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) bsearch16u::$5 ← (byte) bsearch16u::num#3 > (number) 0 +Adding number conversion cast (unumber) 1 in (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#4 >> (number) 1 +Adding number conversion cast (snumber) 0 in (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (number) 0 +Adding number conversion cast (snumber) 0 in (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (number) 0 +Adding number conversion cast (unumber) 1 in (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (number) 1 +Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$17 ← (number) 1 * (const byte) SIZEOF_WORD +Adding number conversion cast (unumber) bsearch16u::$17 in (number~) bsearch16u::$17 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD +Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$18 ← (number) 1 * (const byte) SIZEOF_WORD +Adding number conversion cast (unumber) bsearch16u::$18 in (number~) bsearch16u::$18 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD +Adding number conversion cast (unumber) $ff in (byte) NUM_SQUARES#0 ← (number) $ff +Adding number conversion cast (unumber) 0 in (word) init_squares::sqr#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 +Adding number conversion cast (unumber) init_squares::$2 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (unumber)(number) 1 +Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 +Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) 1 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (number) 1 +Adding number conversion cast (unumber) init_squares::$4 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (unumber)(number) 1 +Adding number conversion cast (unumber) $f in (byte) CORDIC_ITERATIONS_16#0 ← (number) $f +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$0 ← (signed word) atan2_16::y#1 >= (number) 0 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$5 ← (signed word) atan2_16::x#1 >= (number) 0 +Adding number conversion cast (unumber) 0 in (word) atan2_16::angle#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 +Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (unumber)(number) 1 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 +Adding number conversion cast (unumber) 2 in (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 +Adding number conversion cast (unumber) 2 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 +Adding number conversion cast (snumber) 2 in (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 +Adding number conversion cast (snumber) 2 in (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 +Adding number conversion cast (unumber) 2 in (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 +Adding number conversion cast (unumber) 0 in (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 +Adding number conversion cast (unumber) $8000 in (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 +Adding number conversion cast (unumber) atan2_16::$12 in (number~) atan2_16::$12 ← (unumber)(number) $8000 - (word) atan2_16::angle#9 +Adding number conversion cast (unumber) $3e8 in (byte*~) print_cls::$0 ← (byte*) print_screen#2 + (number) $3e8 +Adding number conversion cast (unumber) $80 in (byte) SID_CONTROL_NOISE#0 ← (number) $80 +Adding number conversion cast (unumber) $ffff in *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff +Adding number conversion cast (unumber) $3e8 in (word) malloc::size#1 ← (number) $3e8 +Adding number conversion cast (unumber) $3e8 in (word) malloc::size#2 ← (number) $3e8 +Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8 +Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff +Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4 +Adding number conversion cast (unumber) main::toD0181_$2#0 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (unumber)(number) 4 +Adding number conversion cast (unumber) main::toD0181_$3#0 in (number~) main::toD0181_$3#0 ← > (unumber~) main::toD0181_$2#0 +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4 +Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (unumber)(number) 4 +Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f +Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f +Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0 +Adding number conversion cast (unumber) $3fff in (number~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (number) $3fff +Adding number conversion cast (unumber) main::toD0182_$1#0 in (number~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (unumber)(number) $3fff +Adding number conversion cast (unumber) 4 in (number~) main::toD0182_$2#0 ← (unumber~) main::toD0182_$1#0 * (number) 4 +Adding number conversion cast (unumber) main::toD0182_$2#0 in (number~) main::toD0182_$2#0 ← (unumber~) main::toD0182_$1#0 * (unumber)(number) 4 +Adding number conversion cast (unumber) main::toD0182_$3#0 in (number~) main::toD0182_$3#0 ← > (unumber~) main::toD0182_$2#0 +Adding number conversion cast (unumber) 4 in (number~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (number) 4 +Adding number conversion cast (unumber) main::toD0182_$6#0 in (number~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (unumber)(number) 4 +Adding number conversion cast (unumber) $f in (number~) main::toD0182_$7#0 ← (unumber~) main::toD0182_$6#0 & (number) $f +Adding number conversion cast (unumber) main::toD0182_$7#0 in (number~) main::toD0182_$7#0 ← (unumber~) main::toD0182_$6#0 & (unumber)(number) $f +Adding number conversion cast (unumber) main::toD0182_$8#0 in (number~) main::toD0182_$8#0 ← (unumber~) main::toD0182_$3#0 | (unumber~) main::toD0182_$7#0 +Adding number conversion cast (unumber) 0 in (byte) sin_offset_x#3 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) sin_offset_y#3 ← (number) 0 +Adding number conversion cast (unumber) $28 in (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#4 + (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#3 + (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#3 + (number) $28 +Adding number conversion cast (unumber) 3 in (byte) sin_offset_x#4 ← (byte) sin_offset_x#11 - (number) 3 +Adding number conversion cast (unumber) 7 in (byte) sin_offset_y#4 ← (byte) sin_offset_y#11 - (number) 7 +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) 0 in (byte) init_angle_screen::x#0 ← (number) 0 +Adding number conversion cast (unumber) $27 in (byte) init_angle_screen::xb#0 ← (number) $27 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $27 in (number~) init_angle_screen::$3 ← (number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) init_angle_screen::$3 in (number~) init_angle_screen::$3 ← (unumber)(number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$6 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 +Adding number conversion cast (unumber) init_angle_screen::$10 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (unumber)(number) $80 +Adding number conversion cast (unumber) init_angle_screen::$11 in (number~) init_angle_screen::$11 ← > (unumber~) init_angle_screen::$10 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$13 ← (number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$13 in (number~) init_angle_screen::$13 ← (unumber)(number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$14 ← (number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$14 in (number~) init_angle_screen::$14 ← (unumber)(number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $13 in (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 +Adding number conversion cast (unumber) $30 in (byte) NUM_SQUARES#3 ← (number) $30 +Adding number conversion cast (unumber) $28*$18 in (byte*~) init_dist_screen::$1 ← (byte*) init_dist_screen::screen#1 + (number) $28*(number) $18 +Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 +Adding number conversion cast (unumber) init_dist_screen::$2 in (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $18 in (bool~) init_dist_screen::$3 ← (byte) init_dist_screen::y2#0 >= (number) $18 +Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 +Adding number conversion cast (unumber) init_dist_screen::$6 in (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (unumber)(number) $18 +Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_dist_screen::$7 ← (unumber~) init_dist_screen::$6 +Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 +Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2 +Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4 +Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#53 ← phi( init_dist_screen::@2/(byte*) heap_head#55 init_dist_screen::@3/(byte*) heap_head#56 ) + (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#12 init_dist_screen::@3/(byte) init_dist_screen::y#13 ) + (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) + (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) + (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#40 init_dist_screen::@3/(byte) NUM_SQUARES#41 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#28 init_dist_screen::@3/(word*) SQUARES#29 ) + (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(unumber~) init_dist_screen::$7 init_dist_screen::@3/(unumber~) init_dist_screen::$5 ) +Adding number conversion cast (unumber) 0 in (byte) init_dist_screen::x#0 ← (number) 0 +Adding number conversion cast (unumber) $27 in (byte) init_dist_screen::xb#0 ← (number) $27 +Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (number) 2 +Adding number conversion cast (unumber) init_dist_screen::$10 in (number~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $27 in (bool~) init_dist_screen::$11 ← (byte) init_dist_screen::x2#0 >= (number) $27 +Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (number) $27 +Adding number conversion cast (unumber) init_dist_screen::$14 in (number~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (unumber)(number) $27 +Adding number conversion cast (unumber) init_dist_screen::$15 in (number~) init_dist_screen::$15 ← (unumber~) init_dist_screen::$14 +Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$12 ← (number) $27 - (byte) init_dist_screen::x2#2 +Adding number conversion cast (unumber) init_dist_screen::$12 in (number~) init_dist_screen::$12 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2 +Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber~) init_dist_screen::$12 +Adding number conversion cast (unumber) init_dist_screen::$16 in (byte*) heap_head#43 ← phi( init_dist_screen::@6/(byte*) heap_head#46 init_dist_screen::@7/(byte*) heap_head#47 ) + (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#7 init_dist_screen::@7/(byte) init_dist_screen::y#8 ) + (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#5 init_dist_screen::@7/(byte) init_dist_screen::xb#6 ) + (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#7 ) + (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#6 init_dist_screen::@7/(byte) init_dist_screen::x#7 ) + (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#7 ) + (byte) NUM_SQUARES#20 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#26 init_dist_screen::@7/(byte) NUM_SQUARES#27 ) + (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#3 init_dist_screen::@7/(word) init_dist_screen::yds#4 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#30 init_dist_screen::@7/(word*) SQUARES#31 ) + (number~) init_dist_screen::$16 ← phi( init_dist_screen::@6/(unumber~) init_dist_screen::$15 init_dist_screen::@7/(unumber~) init_dist_screen::$13 ) +Adding number conversion cast (unumber) $13 in (bool~) init_dist_screen::$20 ← (byte) init_dist_screen::x#1 <= (number) $13 +Adding number conversion cast (unumber) $28 in (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#3 + (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#3 - (number) $28 +Adding number conversion cast (unumber) 0 in (word) make_plasma_charset::c#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) make_plasma_charset::i#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) make_plasma_charset::b#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) make_plasma_charset::ii#0 ← (number) 0 +Adding number conversion cast (unumber) $ff in (number~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (number) $ff +Adding number conversion cast (unumber) make_plasma_charset::$4 in (number~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (unumber)(number) $ff +Adding number conversion cast (unumber) 8 in (bool~) make_plasma_charset::$7 ← (byte) make_plasma_charset::ii#1 < (number) 8 +Adding number conversion cast (unumber) 8 in (number~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#3 * (number) 8 +Adding number conversion cast (unumber) make_plasma_charset::$8 in (number~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#3 * (unumber)(number) 8 +Adding number conversion cast (unumber) make_plasma_charset::$9 in (number~) make_plasma_charset::$9 ← (unumber~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#2 +Adding number conversion cast (unumber) 8 in (bool~) make_plasma_charset::$10 ← (byte) make_plasma_charset::i#1 < (number) 8 +Adding number conversion cast (unumber) 7 in (number~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#4 & (number) 7 +Adding number conversion cast (unumber) make_plasma_charset::$11 in (number~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#4 & (unumber)(number) 7 +Adding number conversion cast (unumber) 0 in (bool~) make_plasma_charset::$12 ← (unumber~) make_plasma_charset::$11 == (number) 0 +Adding number conversion cast (unumber) $100 in (bool~) make_plasma_charset::$15 ← (word) make_plasma_charset::c#1 < (number) $100 +Successful SSA optimization PassNAddNumberTypeConversions +Adding number conversion cast (byte) to elements in (byte[8]) make_plasma_charset::bittab#0 ← { (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 8, (byte)(number) $10, (byte)(number) $20, (byte)(number) $40, (byte)(number) $80 } +Successful SSA optimization PassNAddArrayNumberTypeConversions +Inlining cast (byte*) D018#0 ← (byte*)(number) $d018 +Inlining cast (byte*) COLS#0 ← (byte*)(number) $d800 +Inlining cast (byte) BLACK#0 ← (unumber)(number) 0 +Inlining cast (byte*) HEAP_START#0 ← (byte*)(number) $c000 +Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 +Inlining cast (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#1 +Inlining cast (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) +Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#1 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#1 +Inlining cast (byte) NUM_SQUARES#0 ← (unumber)(number) $ff +Inlining cast (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 +Inlining cast (word) init_squares::sqr#0 ← (unumber)(number) 0 +Inlining cast (byte~) sqrt::$2 ← (byte)(word~) sqrt::$1 +Inlining cast (byte) CORDIC_ITERATIONS_16#0 ← (unumber)(number) $f +Inlining cast (word) atan2_16::angle#0 ← (unumber)(number) 0 +Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400 +Inlining cast (word*) SID_VOICE3_FREQ#0 ← (word*)(number) $d40e +Inlining cast (byte*) SID_VOICE3_CONTROL#0 ← (byte*)(number) $d412 +Inlining cast (byte) SID_CONTROL_NOISE#0 ← (unumber)(number) $80 +Inlining cast (byte*) SID_VOICE3_OSC#0 ← (byte*)(number) $d41b +Inlining cast *((word*) SID_VOICE3_FREQ#0) ← (unumber)(number) $ffff +Inlining cast (word) malloc::size#1 ← (unumber)(number) $3e8 +Inlining cast (byte*) SCREEN_DIST#0 ← (byte*)(void*~) $0 +Inlining cast (word) malloc::size#2 ← (unumber)(number) $3e8 +Inlining cast (byte*) SCREEN_ANGLE#0 ← (byte*)(void*~) $1 +Inlining cast (byte*) CHARSET#0 ← (byte*)(number) $2000 +Inlining cast (byte*) SCREEN1#0 ← (byte*)(number) $2800 +Inlining cast (byte*) SCREEN2#0 ← (byte*)(number) $2c00 +Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 +Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 +Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 +Inlining cast (word~) main::toD0182_$0#0 ← (word)(byte*) main::toD0182_screen#1 +Inlining cast (word~) main::toD0182_$4#0 ← (word)(byte*) main::toD0182_gfx#1 +Inlining cast (byte) sin_offset_x#3 ← (unumber)(number) 0 +Inlining cast (byte) sin_offset_y#3 ← (unumber)(number) 0 +Inlining cast (byte) init_angle_screen::x#0 ← (unumber)(number) 0 +Inlining cast (byte) init_angle_screen::xb#0 ← (unumber)(number) $27 +Inlining cast (signed word~) init_angle_screen::$5 ← (signed word)(word~) init_angle_screen::$4 +Inlining cast (signed word~) init_angle_screen::$8 ← (signed word)(word~) init_angle_screen::$7 +Inlining cast (byte) NUM_SQUARES#3 ← (unumber)(number) $30 +Inlining cast (byte) init_dist_screen::x#0 ← (unumber)(number) 0 +Inlining cast (byte) init_dist_screen::xb#0 ← (unumber)(number) $27 +Inlining cast (word) make_plasma_charset::c#0 ← (unumber)(number) 0 +Inlining cast (byte) make_plasma_charset::i#0 ← (unumber)(number) 0 +Inlining cast (byte) make_plasma_charset::b#0 ← (unumber)(number) 0 +Inlining cast (byte) make_plasma_charset::ii#0 ← (unumber)(number) 0 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 53272 +Simplifying constant pointer cast (byte*) 55296 +Simplifying constant integer cast 0 +Simplifying constant pointer cast (byte*) 49152 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast $ff +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 2 +Simplifying constant integer cast 1 +Simplifying constant integer cast $f +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $8000 +Simplifying constant pointer cast (byte*) 1024 +Simplifying constant integer cast $3e8 +Simplifying constant pointer cast (word*) 54286 +Simplifying constant pointer cast (byte*) 54290 +Simplifying constant integer cast $80 +Simplifying constant pointer cast (byte*) 54299 +Simplifying constant integer cast $ffff +Simplifying constant integer cast $3e8 +Simplifying constant integer cast $3e8 +Simplifying constant pointer cast (byte*) 8192 +Simplifying constant pointer cast (byte*) 10240 +Simplifying constant pointer cast (byte*) 11264 +Simplifying constant integer cast $3e8 +Simplifying constant integer cast $3fff +Simplifying constant integer cast 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast $f +Simplifying constant integer cast $3fff +Simplifying constant integer cast 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast $f +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $28 +Simplifying constant integer cast $28 +Simplifying constant integer cast $28 +Simplifying constant integer cast 3 +Simplifying constant integer cast 7 +Simplifying constant integer cast 0 +Simplifying constant integer cast $27 +Simplifying constant integer cast 2 +Simplifying constant integer cast $27 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast $13 +Simplifying constant integer cast $28 +Simplifying constant integer cast $28 +Simplifying constant integer cast $30 +Simplifying constant integer cast 2 +Simplifying constant integer cast $18 +Simplifying constant integer cast $18 +Simplifying constant integer cast $18 +Simplifying constant integer cast 0 +Simplifying constant integer cast $27 +Simplifying constant integer cast 2 +Simplifying constant integer cast $27 +Simplifying constant integer cast $27 +Simplifying constant integer cast $27 +Simplifying constant integer cast $13 +Simplifying constant integer cast $28 +Simplifying constant integer cast $28 +Simplifying constant integer cast 1 +Simplifying constant integer cast 2 +Simplifying constant integer cast 4 +Simplifying constant integer cast 8 +Simplifying constant integer cast $10 +Simplifying constant integer cast $20 +Simplifying constant integer cast $40 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $ff +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 +Simplifying constant integer cast 7 +Simplifying constant integer cast 0 +Simplifying constant integer cast $100 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $f +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (byte) 2 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (byte) 2 +Finalized signed number type (signed byte) 2 +Finalized signed number type (signed byte) 2 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (word) $8000 +Finalized unsigned number type (word) $3e8 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (word) $ffff +Finalized unsigned number type (word) $3e8 +Finalized unsigned number type (word) $3e8 +Finalized unsigned number type (word) $3e8 +Finalized unsigned number type (word) $3fff +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $f +Finalized unsigned number type (word) $3fff +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $f +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $13 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) $30 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) $13 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $100 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to byte in (unumber~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD +Inferred type updated to byte in (unumber~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD +Inferred type updated to byte in (unumber~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (byte) 1 +Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 +Inferred type updated to byte in (unumber~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (byte) 1 +Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9 +Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff +Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 +Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f +Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 +Inferred type updated to word in (unumber~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (word) $3fff +Inferred type updated to word in (unumber~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 +Inferred type updated to byte in (unumber~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f +Inferred type updated to byte in (unumber~) main::toD0182_$8#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 +Inferred type updated to byte in (unumber~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 +Inferred type updated to byte in (unumber~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (byte) 2 +Inferred type updated to word in (unumber~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 +Inferred type updated to byte in (unumber~) init_angle_screen::$11 ← > (word~) init_angle_screen::$10 +Inferred type updated to byte in (unumber~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 +Inferred type updated to byte in (unumber~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 +Inferred type updated to byte in (unumber~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (byte) $18 +Inferred type updated to byte in (unumber~) init_dist_screen::$7 ← (byte~) init_dist_screen::$6 +Inferred type updated to byte in (unumber~) init_dist_screen::$4 ← (byte) $18 - (byte) init_dist_screen::y2#2 +Inferred type updated to byte in (unumber~) init_dist_screen::$5 ← (byte~) init_dist_screen::$4 +Inferred type updated to byte for (unumber~) init_dist_screen::$8 +Inferred type updated to byte in (unumber~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (byte) $27 +Inferred type updated to byte in (unumber~) init_dist_screen::$15 ← (byte~) init_dist_screen::$14 +Inferred type updated to byte in (unumber~) init_dist_screen::$12 ← (byte) $27 - (byte) init_dist_screen::x2#2 +Inferred type updated to byte in (unumber~) init_dist_screen::$13 ← (byte~) init_dist_screen::$12 +Inferred type updated to byte for (unumber~) init_dist_screen::$16 +Inferred type updated to byte in (unumber~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (byte) $ff +Inferred type updated to word in (unumber~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#3 * (byte) 8 +Inferred type updated to word in (unumber~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#2 +Inferred type updated to byte in (unumber~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#4 & (byte) 7 +Inversing boolean not [27] (bool~) bsearch16u::$12 ← (signed word) bsearch16u::result#0 != (signed byte) 0 from [26] (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (signed byte) 0 +Inversing boolean not [34] (bool~) bsearch16u::$14 ← (signed word) bsearch16u::result#1 <= (signed byte) 0 from [33] (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (signed byte) 0 +Inversing boolean not [150] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [149] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 +Inversing boolean not [159] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [158] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 +Inversing boolean not [170] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [169] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 +Inversing boolean not [194] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [193] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 +Inversing boolean not [524] (bool~) make_plasma_charset::$6 ← (byte~) make_plasma_charset::$4 <= (byte) make_plasma_charset::s#1 from [523] (bool~) make_plasma_charset::$5 ← (byte~) make_plasma_charset::$4 > (byte) make_plasma_charset::s#1 +Inversing boolean not [542] (bool~) make_plasma_charset::$13 ← (byte~) make_plasma_charset::$11 != (byte) 0 from [541] (bool~) make_plasma_charset::$12 ← (byte~) make_plasma_charset::$11 == (byte) 0 +Successful SSA optimization Pass2UnaryNotSimplification +Alias (byte*) HEAP_START#0 = (byte*) heap_head#0 (byte*) heap_head#44 (byte*) heap_head#40 (byte*) heap_head#36 (byte*) heap_head#31 (byte*) heap_head#23 +Alias (void*) malloc::return#0 = (void*) malloc::return#5 (void*) malloc::return#1 +Alias (byte*) heap_head#1 = (byte*) heap_head#13 (byte*) heap_head#2 +Alias (byte) bsearch16u::num#3 = (byte) bsearch16u::num#4 (byte) bsearch16u::num#8 (byte) bsearch16u::num#6 +Alias (word*) bsearch16u::items#2 = (word*) bsearch16u::items#6 (word*) bsearch16u::items#3 (word*) bsearch16u::items#9 (word*) bsearch16u::items#4 (word*~) bsearch16u::$3 (word*) bsearch16u::items#5 +Alias (word) bsearch16u::key#1 = (word) bsearch16u::key#3 (word) bsearch16u::key#2 (word) bsearch16u::key#7 (word) bsearch16u::key#6 +Alias (word*) bsearch16u::pivot#0 = (word*~) bsearch16u::$7 (word*) bsearch16u::pivot#3 (word*) bsearch16u::pivot#1 (word*) bsearch16u::return#0 (word*) bsearch16u::pivot#2 +Alias (signed word) bsearch16u::result#0 = (signed word~) bsearch16u::$10 (signed word) bsearch16u::result#1 +Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4 +Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15 +Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1 +Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4 +Alias (byte*) memset::end#0 = (byte*~) memset::$1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::str#3 (void*) memset::return#3 (void*) memset::return#1 +Alias (word) malloc::size#0 = (byte~) init_squares::$0 +Alias (void*) malloc::return#2 = (void*) malloc::return#6 +Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7 +Alias (byte*) heap_head#14 = (byte*) heap_head#3 +Alias (byte*) heap_head#15 = (byte*) heap_head#25 (byte*) heap_head#4 +Alias (word*) SQUARES#17 = (word*) SQUARES#8 (word*) SQUARES#2 +Alias (word) sqr::return#0 = (word) sqr::return#4 (word) sqr::return#1 +Alias (word*) bsearch16u::return#3 = (word*) bsearch16u::return#5 +Alias (word*) SQUARES#10 = (word*) SQUARES#11 +Alias (word*) sqrt::found#0 = (word*~) sqrt::$0 +Alias (byte) sqrt::return#0 = (byte) sqrt::sq#0 (byte~) sqrt::$2 (byte) sqrt::return#3 (byte) sqrt::return#1 +Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#42 (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#35 (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#17 +Alias (word*) SQUARES#0 = (word*) SQUARES#49 (word*) SQUARES#47 (word*) SQUARES#45 (word*) SQUARES#43 (word*) SQUARES#39 (word*) SQUARES#36 (word*) SQUARES#33 (word*) SQUARES#25 +Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#2 (signed word~) atan2_16::$3 (signed word) atan2_16::y#3 +Alias (signed word) atan2_16::x#5 = (signed word) atan2_16::x#9 (signed word) atan2_16::x#6 +Alias (signed word~) atan2_16::$2 = (signed word~) atan2_16::$1 +Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#12 (signed word) atan2_16::yi#13 +Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#2 (signed word~) atan2_16::$8 (signed word) atan2_16::x#3 +Alias (signed word) atan2_16::y#12 = (signed word) atan2_16::y#15 (signed word) atan2_16::y#13 +Alias (signed word~) atan2_16::$7 = (signed word~) atan2_16::$6 +Alias (signed word) atan2_16::xi#0 = (signed word~) atan2_16::$9 +Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xd#0 +Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yd#0 +Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::shift#0 +Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#19 +Alias (signed word) atan2_16::x#17 = (signed word) atan2_16::x#7 +Alias (signed word) atan2_16::y#19 = (signed word) atan2_16::y#7 +Alias (signed word) atan2_16::xd#3 = (signed word) atan2_16::xd#7 (signed word) atan2_16::xd#8 (signed word) atan2_16::xd#4 +Alias (signed word) atan2_16::yd#3 = (signed word) atan2_16::yd#7 (signed word) atan2_16::yd#8 (signed word) atan2_16::yd#4 +Alias (byte) atan2_16::shift#2 = (byte) atan2_16::shift#3 (byte) atan2_16::shift#4 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#15 (signed word) atan2_16::yi#14 (signed word) atan2_16::yi#11 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#12 (signed word) atan2_16::xi#11 (signed word) atan2_16::xi#9 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#11 (byte) atan2_16::i#8 (byte) atan2_16::i#9 +Alias (word) atan2_16::angle#16 = (word) atan2_16::angle#20 (word) atan2_16::angle#18 (word) atan2_16::angle#17 +Alias (signed word) atan2_16::x#14 = (signed word) atan2_16::x#18 (signed word) atan2_16::x#16 (signed word) atan2_16::x#15 +Alias (signed word) atan2_16::y#16 = (signed word) atan2_16::y#20 (signed word) atan2_16::y#18 (signed word) atan2_16::y#17 +Alias (signed word) atan2_16::xi#4 = (signed word) atan2_16::xi#7 (signed word) atan2_16::xi#5 +Alias (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#9 (signed word) atan2_16::yd#6 +Alias (signed word) atan2_16::yi#5 = (signed word) atan2_16::yi#6 (signed word) atan2_16::yi#7 +Alias (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#9 (signed word) atan2_16::xd#6 +Alias (byte) atan2_16::i#3 = (byte) atan2_16::i#7 (byte) atan2_16::i#4 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#7 (word) atan2_16::angle#8 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#12 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#11 +Alias (word) atan2_16::angle#1 = (word) atan2_16::angle#9 +Alias (signed word) atan2_16::y#5 = (signed word) atan2_16::y#6 +Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 +Alias (word) atan2_16::return#0 = (word) atan2_16::angle#10 (word) atan2_16::return#3 (word) atan2_16::return#1 +Alias (word) atan2_16::angle#11 = (word) atan2_16::angle#15 +Alias (word) atan2_16::angle#5 = (word~) atan2_16::$15 +Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#38 (byte*) print_char_cursor#43 (byte*) print_screen#14 (byte*) print_line_cursor#34 (byte*) print_char_cursor#39 (byte*) print_screen#13 (byte*) print_line_cursor#31 (byte*) print_char_cursor#36 (byte*) print_screen#12 (byte*) print_line_cursor#28 (byte*) print_char_cursor#34 (byte*) print_screen#11 (byte*) print_line_cursor#25 (byte*) print_char_cursor#31 (byte*) print_screen#10 (byte*) print_line_cursor#18 (byte*) print_char_cursor#25 (byte*) print_screen#9 +Alias (byte*) print_char_cursor#1 = (byte*) print_char_cursor#12 (byte*) print_char_cursor#2 +Alias (byte*) print_line_cursor#1 = (byte*) print_screen#3 (byte*) print_screen#2 (byte*) print_char_cursor#3 (byte*) print_line_cursor#8 (byte*) print_char_cursor#13 (byte*) print_line_cursor#2 (byte*) print_char_cursor#4 +Alias (byte) sid_rnd::return#0 = (byte) sid_rnd::return#3 (byte) sid_rnd::return#1 +Alias (void*) malloc::return#3 = (void*) malloc::return#7 +Alias (byte*) heap_head#16 = (byte*) heap_head#5 +Alias (void*) malloc::return#4 = (void*) malloc::return#8 +Alias (byte*) heap_head#17 = (byte*) heap_head#6 (byte*) heap_head#35 (byte*) heap_head#30 +Alias (byte*) print_line_cursor#14 = (byte*) print_line_cursor#19 (byte*) print_line_cursor#26 +Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#26 (byte*) print_char_cursor#32 +Alias (byte*) print_screen#6 = (byte*) print_screen#7 (byte*) print_screen#8 +Alias (byte) sin_offset_x#19 = (byte) sin_offset_x#29 (byte) sin_offset_x#30 (byte) sin_offset_x#27 (byte) sin_offset_x#23 +Alias (byte) sin_offset_y#19 = (byte) sin_offset_y#29 (byte) sin_offset_y#30 (byte) sin_offset_y#27 (byte) sin_offset_y#23 +Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#18 +Alias (byte*) heap_head#18 = (byte*) heap_head#7 (byte*) heap_head#41 (byte*) heap_head#37 (byte*) heap_head#32 +Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#40 (word*) SQUARES#34 (word*) SQUARES#26 +Alias (byte*) print_line_cursor#20 = (byte*) print_line_cursor#3 (byte*) print_line_cursor#9 +Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#5 (byte*) print_char_cursor#27 +Alias (byte) sin_offset_x#14 = (byte) sin_offset_x#16 (byte) sin_offset_x#9 (byte) sin_offset_x#2 +Alias (byte) sin_offset_y#14 = (byte) sin_offset_y#16 (byte) sin_offset_y#9 (byte) sin_offset_y#2 +Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#47 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#45 (byte) NUM_SQUARES#43 (byte) NUM_SQUARES#39 (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#30 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#2 +Alias (byte*) heap_head#19 = (byte*) heap_head#57 (byte*) heap_head#27 (byte*) heap_head#54 (byte*) heap_head#52 (byte*) heap_head#50 (byte*) heap_head#48 (byte*) heap_head#45 (byte*) heap_head#42 (byte*) heap_head#38 (byte*) heap_head#33 (byte*) heap_head#8 +Alias (word*) SQUARES#13 = (word*) SQUARES#52 (word*) SQUARES#22 (word*) SQUARES#51 (word*) SQUARES#50 (word*) SQUARES#48 (word*) SQUARES#46 (word*) SQUARES#44 (word*) SQUARES#41 (word*) SQUARES#35 (word*) SQUARES#27 (word*) SQUARES#4 +Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#46 (byte*) print_line_cursor#15 (byte*) print_line_cursor#45 (byte*) print_line_cursor#43 (byte*) print_line_cursor#41 (byte*) print_line_cursor#39 (byte*) print_line_cursor#35 (byte*) print_line_cursor#32 (byte*) print_line_cursor#27 (byte*) print_line_cursor#21 (byte*) print_line_cursor#4 +Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#51 (byte*) print_char_cursor#22 (byte*) print_char_cursor#50 (byte*) print_char_cursor#48 (byte*) print_char_cursor#46 (byte*) print_char_cursor#44 (byte*) print_char_cursor#40 (byte*) print_char_cursor#37 (byte*) print_char_cursor#33 (byte*) print_char_cursor#28 (byte*) print_char_cursor#6 +Alias (byte) sin_offset_x#0 = (byte) sin_offset_x#7 (byte) sin_offset_x#24 (byte) sin_offset_x#21 (byte) sin_offset_x#15 +Alias (byte) sin_offset_y#0 = (byte) sin_offset_y#7 (byte) sin_offset_y#24 (byte) sin_offset_y#21 (byte) sin_offset_y#15 +Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 +Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 +Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$5 +Alias (byte) sin_offset_x#1 = (byte) sin_offset_x#8 (byte) sin_offset_x#28 (byte) sin_offset_x#25 (byte) sin_offset_x#20 +Alias (byte) sin_offset_y#1 = (byte) sin_offset_y#8 (byte) sin_offset_y#28 (byte) sin_offset_y#25 (byte) sin_offset_y#20 +Alias (byte*) main::toD0182_screen#0 = (byte*) main::toD0182_screen#1 +Alias (byte*) main::toD0182_gfx#0 = (byte*) main::toD0182_gfx#1 +Alias (byte) main::toD0182_return#0 = (byte~) main::toD0182_$8#0 (byte) main::toD0182_return#2 (byte) main::toD0182_return#1 (byte) main::toD0182_return#3 (byte~) main::$7 +Alias (byte*) doplasma::sin_x#0 = (byte*~) doplasma::$0 +Alias (byte*) doplasma::sin_y#0 = (byte*~) doplasma::$1 +Alias (byte*) doplasma::screen#3 = (byte*) doplasma::screen#4 +Alias (byte*) doplasma::angle#2 = (byte*) doplasma::angle#3 +Alias (byte*) doplasma::dist#2 = (byte*) doplasma::dist#3 +Alias (byte) doplasma::y#2 = (byte) doplasma::y#3 +Alias (byte) sin_offset_x#11 = (byte) sin_offset_x#17 (byte) sin_offset_x#22 +Alias (byte) sin_offset_y#11 = (byte) sin_offset_y#17 (byte) sin_offset_y#22 +Alias (byte*) doplasma::sin_x#1 = (byte*) doplasma::sin_x#3 +Alias (byte*) doplasma::sin_y#1 = (byte*) doplasma::sin_y#3 +Alias (byte) sin_offset_x#12 = (byte) sin_offset_x#4 (byte) sin_offset_x#5 +Alias (byte) sin_offset_y#12 = (byte) sin_offset_y#4 (byte) sin_offset_y#5 +Alias (byte*) init_angle_screen::screen_topline#0 = (byte*~) init_angle_screen::$0 +Alias (byte*) init_angle_screen::screen_bottomline#0 = (byte*~) init_angle_screen::$1 +Alias (word~) init_angle_screen::$4 = (word~) init_angle_screen::$17 +Alias (signed word) init_angle_screen::xw#0 = (signed word~) init_angle_screen::$5 +Alias (word~) init_angle_screen::$7 = (word~) init_angle_screen::$18 +Alias (signed word) init_angle_screen::yw#0 = (signed word~) init_angle_screen::$8 +Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 +Alias (byte*) init_angle_screen::screen_bottomline#2 = (byte*) init_angle_screen::screen_bottomline#4 (byte*) init_angle_screen::screen_bottomline#3 +Alias (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#3 +Alias (byte*) init_angle_screen::screen_topline#2 = (byte*) init_angle_screen::screen_topline#4 (byte*) init_angle_screen::screen_topline#3 +Alias (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#3 +Alias (byte) init_angle_screen::y#2 = (byte) init_angle_screen::y#5 (byte) init_angle_screen::y#3 +Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$9 +Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$11 +Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0 +Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#46 +Alias (byte*) heap_head#20 = (byte*) heap_head#9 +Alias (word*) SQUARES#14 = (word*) SQUARES#5 +Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1 +Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2 +Alias (word*) SQUARES#28 = (word*) SQUARES#37 (word*) SQUARES#29 +Alias (byte) NUM_SQUARES#40 = (byte) NUM_SQUARES#44 (byte) NUM_SQUARES#41 +Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#12 +Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#12 +Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#2 (byte) init_dist_screen::y#13 +Alias (byte*) heap_head#55 = (byte*) heap_head#58 (byte*) heap_head#56 +Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6 +Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4 +Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8 +Alias (word) sqr::return#2 = (word) sqr::return#5 +Alias (word*) SQUARES#18 = (word*) SQUARES#42 +Alias (byte) NUM_SQUARES#34 = (byte) NUM_SQUARES#37 +Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#9 +Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#9 +Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#11 +Alias (byte*) heap_head#51 = (byte*) heap_head#53 +Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9 +Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$10 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2 +Alias (word*) SQUARES#30 = (word*) SQUARES#38 (word*) SQUARES#31 +Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#4 +Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#27 +Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8 (byte*) init_dist_screen::screen_topline#7 +Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#6 (byte) init_dist_screen::x#7 +Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8 (byte*) init_dist_screen::screen_bottomline#7 +Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#6 +Alias (byte) init_dist_screen::y#7 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#8 +Alias (byte*) heap_head#46 = (byte*) heap_head#49 (byte*) heap_head#47 +Alias (byte~) init_dist_screen::$15 = (byte~) init_dist_screen::$14 +Alias (byte~) init_dist_screen::$13 = (byte~) init_dist_screen::$12 +Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$16 +Alias (word) sqr::return#3 = (word) sqr::return#6 +Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#6 +Alias (word*) SQUARES#15 = (word*) SQUARES#20 (word*) SQUARES#19 (word*) SQUARES#32 (word*) SQUARES#24 (word*) SQUARES#6 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#4 +Alias (byte*) init_dist_screen::screen_topline#2 = (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#3 +Alias (byte) init_dist_screen::x#3 = (byte) init_dist_screen::x#4 (byte) init_dist_screen::x#5 +Alias (byte*) init_dist_screen::screen_bottomline#2 = (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#3 +Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4 +Alias (byte) init_dist_screen::y#3 = (byte) init_dist_screen::y#5 (byte) init_dist_screen::y#6 (byte) init_dist_screen::y#4 +Alias (byte*) heap_head#10 = (byte*) heap_head#39 (byte*) heap_head#43 (byte*) heap_head#34 (byte*) heap_head#29 (byte*) heap_head#21 +Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$17 +Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$18 +Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 +Alias (byte) init_dist_screen::d#0 = (byte~) init_dist_screen::$19 +Alias (byte*) print_screen#4 = (byte*) print_screen#5 +Alias (byte*) print_line_cursor#16 = (byte*) print_line_cursor#22 +Alias (byte*) print_char_cursor#23 = (byte*) print_char_cursor#29 +Alias (byte*) make_plasma_charset::charset#10 = (byte*) make_plasma_charset::charset#13 (byte*) make_plasma_charset::charset#8 +Alias (byte*) print_line_cursor#11 = (byte*) print_line_cursor#5 +Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#7 +Alias (byte) sid_rnd::return#2 = (byte) sid_rnd::return#4 +Alias (byte) make_plasma_charset::s#1 = (byte) make_plasma_charset::s#2 (byte) make_plasma_charset::s#6 +Alias (byte) make_plasma_charset::ii#3 = (byte) make_plasma_charset::ii#4 (byte) make_plasma_charset::ii#5 +Alias (byte) make_plasma_charset::b#2 = (byte) make_plasma_charset::b#4 (byte) make_plasma_charset::b#6 +Alias (word) make_plasma_charset::c#11 = (word) make_plasma_charset::c#8 (word) make_plasma_charset::c#9 +Alias (byte) make_plasma_charset::i#4 = (byte) make_plasma_charset::i#6 (byte) make_plasma_charset::i#5 +Alias (byte*) make_plasma_charset::charset#3 = (byte*) make_plasma_charset::charset#5 (byte*) make_plasma_charset::charset#4 +Alias (byte*) print_line_cursor#36 = (byte*) print_line_cursor#40 (byte*) print_line_cursor#37 +Alias (byte*) print_char_cursor#41 = (byte*) print_char_cursor#45 (byte*) print_char_cursor#42 +Alias (word) make_plasma_charset::c#10 = (word) make_plasma_charset::c#3 (word) make_plasma_charset::c#6 (word) make_plasma_charset::c#4 (word) make_plasma_charset::c#7 +Alias (byte) make_plasma_charset::i#2 = (byte) make_plasma_charset::i#3 +Alias (byte) make_plasma_charset::b#3 = (byte) make_plasma_charset::b#5 +Alias (byte*) make_plasma_charset::charset#1 = (byte*) make_plasma_charset::charset#2 (byte*) make_plasma_charset::charset#12 (byte*) make_plasma_charset::charset#14 (byte*) make_plasma_charset::charset#11 +Alias (byte) make_plasma_charset::s#4 = (byte) make_plasma_charset::s#5 +Alias (byte*) print_line_cursor#23 = (byte*) print_line_cursor#29 (byte*) print_line_cursor#33 (byte*) print_line_cursor#24 (byte*) print_line_cursor#30 +Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#35 (byte*) print_char_cursor#38 (byte*) print_char_cursor#30 +Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#8 +Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#17 (byte*) print_line_cursor#6 +Alias (byte*) print_char_cursor#18 = (byte*) print_char_cursor#24 (byte*) print_char_cursor#9 +Alias (byte) sin_offset_x#18 = (byte) sin_offset_x#3 +Alias (byte) sin_offset_y#18 = (byte) sin_offset_y#3 +Alias (byte) NUM_SQUARES#12 = (byte) NUM_SQUARES#5 +Alias (byte*) heap_head#11 = (byte*) heap_head#22 +Alias (word*) SQUARES#16 = (word*) SQUARES#7 +Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#7 +Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#19 +Alias (byte) sin_offset_x#13 = (byte) sin_offset_x#6 +Alias (byte) sin_offset_y#13 = (byte) sin_offset_y#6 +Successful SSA optimization Pass2AliasElimination +Alias (word) bsearch16u::key#1 = (word) bsearch16u::key#5 +Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#5 (signed word) atan2_16::x#10 +Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#12 (signed word) atan2_16::y#9 +Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#9 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#5 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#4 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#3 (byte) atan2_16::i#5 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 +Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 +Alias (word*) SQUARES#18 = (word*) SQUARES#28 +Alias (byte) NUM_SQUARES#34 = (byte) NUM_SQUARES#40 +Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#11 +Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#11 +Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#12 +Alias (byte*) heap_head#51 = (byte*) heap_head#55 +Alias (word*) SQUARES#15 = (word*) SQUARES#30 +Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#26 +Alias (byte*) init_dist_screen::screen_topline#2 = (byte*) init_dist_screen::screen_topline#6 +Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 +Alias (byte*) init_dist_screen::screen_bottomline#2 = (byte*) init_dist_screen::screen_bottomline#6 +Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5 +Alias (byte) init_dist_screen::y#3 = (byte) init_dist_screen::y#7 +Alias (byte*) heap_head#10 = (byte*) heap_head#46 +Alias (byte) make_plasma_charset::ii#2 = (byte) make_plasma_charset::ii#3 +Alias (word) make_plasma_charset::c#10 = (word) make_plasma_charset::c#11 (word) make_plasma_charset::c#5 +Alias (byte) make_plasma_charset::i#2 = (byte) make_plasma_charset::i#4 +Alias (byte*) make_plasma_charset::charset#1 = (byte*) make_plasma_charset::charset#3 (byte*) make_plasma_charset::charset#9 +Alias (byte) make_plasma_charset::s#1 = (byte) make_plasma_charset::s#4 +Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#23 (byte*) print_line_cursor#36 +Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#41 +Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (word) bsearch16u::key#1 +Self Phi Eliminated (byte) memset::c#1 +Self Phi Eliminated (byte*) memset::end#1 +Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (byte*) heap_head#15 +Self Phi Eliminated (word*) SQUARES#17 +Self Phi Eliminated (signed word) atan2_16::yi#10 +Self Phi Eliminated (signed word) atan2_16::xi#10 +Self Phi Eliminated (byte) atan2_16::i#10 +Self Phi Eliminated (word) atan2_16::angle#14 +Self Phi Eliminated (signed word) atan2_16::x#11 +Self Phi Eliminated (signed word) atan2_16::y#10 +Self Phi Eliminated (byte*) print_line_cursor#1 +Self Phi Eliminated (byte) NUM_SQUARES#10 +Self Phi Eliminated (byte*) heap_head#19 +Self Phi Eliminated (word*) SQUARES#13 +Self Phi Eliminated (byte*) print_line_cursor#10 +Self Phi Eliminated (byte*) print_char_cursor#15 +Self Phi Eliminated (byte*) doplasma::sin_x#1 +Self Phi Eliminated (byte*) doplasma::angle#2 +Self Phi Eliminated (byte*) doplasma::sin_y#1 +Self Phi Eliminated (byte*) doplasma::dist#2 +Self Phi Eliminated (byte*) doplasma::screen#3 +Self Phi Eliminated (byte) doplasma::y#2 +Self Phi Eliminated (byte) sin_offset_x#11 +Self Phi Eliminated (byte) sin_offset_y#11 +Self Phi Eliminated (byte) init_angle_screen::y#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_bottomline#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2 +Self Phi Eliminated (word*) SQUARES#15 +Self Phi Eliminated (word) init_dist_screen::yds#1 +Self Phi Eliminated (byte) NUM_SQUARES#11 +Self Phi Eliminated (byte*) init_dist_screen::screen_topline#2 +Self Phi Eliminated (byte*) init_dist_screen::screen_bottomline#2 +Self Phi Eliminated (byte) init_dist_screen::y#3 +Self Phi Eliminated (byte*) heap_head#10 +Self Phi Eliminated (byte) make_plasma_charset::s#1 +Self Phi Eliminated (word) make_plasma_charset::c#10 +Self Phi Eliminated (byte) make_plasma_charset::i#2 +Self Phi Eliminated (byte*) make_plasma_charset::charset#1 +Self Phi Eliminated (byte*) print_line_cursor#12 +Self Phi Eliminated (byte*) print_char_cursor#20 +Successful SSA optimization Pass2SelfPhiElimination +Identical Phi Values (byte) bsearch16u::num#7 (byte) bsearch16u::num#2 +Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 +Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 +Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 +Identical Phi Values (void*) memset::str#1 (void*) memset::str#0 +Identical Phi Values (word) memset::num#1 (word) memset::num#0 +Identical Phi Values (byte) memset::c#2 (byte) memset::c#0 +Identical Phi Values (byte) memset::c#1 (byte) memset::c#2 +Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#1 +Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 +Identical Phi Values (byte*) heap_head#24 (byte*) heap_head#28 +Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#1 +Identical Phi Values (byte*) heap_head#15 (byte*) heap_head#14 +Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#1 +Identical Phi Values (word) sqrt::val#1 (word) sqrt::val#0 +Identical Phi Values (word*) SQUARES#10 (word*) SQUARES#15 +Identical Phi Values (byte) NUM_SQUARES#8 (byte) NUM_SQUARES#11 +Identical Phi Values (signed word) atan2_16::y#1 (signed word) atan2_16::y#0 +Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0 +Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3 +Identical Phi Values (signed word) atan2_16::xi#10 (signed word) atan2_16::xi#3 +Identical Phi Values (byte) atan2_16::i#10 (byte) atan2_16::i#2 +Identical Phi Values (word) atan2_16::angle#14 (word) atan2_16::angle#12 +Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19 +Identical Phi Values (byte) print_char::ch#1 (byte) print_char::ch#0 +Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#20 +Identical Phi Values (byte*) print_screen#1 (byte*) print_screen#4 +Identical Phi Values (byte*) print_line_cursor#1 (byte*) print_screen#1 +Identical Phi Values (byte*) heap_head#16 (byte*) heap_head#1 +Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#0 +Identical Phi Values (byte*) heap_head#26 (byte*) heap_head#17 +Identical Phi Values (word*) SQUARES#21 (word*) SQUARES#0 +Identical Phi Values (byte*) print_line_cursor#14 (byte*) print_line_cursor#0 +Identical Phi Values (byte*) print_char_cursor#21 (byte*) print_line_cursor#0 +Identical Phi Values (byte*) print_screen#6 (byte*) print_line_cursor#0 +Identical Phi Values (byte) sin_offset_x#19 (byte) sin_offset_x#18 +Identical Phi Values (byte) sin_offset_y#19 (byte) sin_offset_y#18 +Identical Phi Values (byte) NUM_SQUARES#1 (byte) NUM_SQUARES#11 +Identical Phi Values (byte*) heap_head#18 (byte*) heap_head#10 +Identical Phi Values (word*) SQUARES#12 (word*) SQUARES#15 +Identical Phi Values (byte*) print_line_cursor#20 (byte*) print_line_cursor#12 +Identical Phi Values (byte*) print_char_cursor#14 (byte*) print_char_cursor#18 +Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#1 +Identical Phi Values (byte*) heap_head#19 (byte*) heap_head#18 +Identical Phi Values (word*) SQUARES#13 (word*) SQUARES#12 +Identical Phi Values (byte*) print_line_cursor#10 (byte*) print_line_cursor#20 +Identical Phi Values (byte*) print_char_cursor#15 (byte*) print_char_cursor#14 +Identical Phi Values (byte) sin_offset_x#0 (byte) sin_offset_x#12 +Identical Phi Values (byte) sin_offset_y#0 (byte) sin_offset_y#12 +Identical Phi Values (byte) sin_offset_x#1 (byte) sin_offset_x#12 +Identical Phi Values (byte) sin_offset_y#1 (byte) sin_offset_y#12 +Identical Phi Values (byte*) doplasma::sin_x#1 (byte*) doplasma::sin_x#2 +Identical Phi Values (byte*) doplasma::angle#2 (byte*) doplasma::angle#4 +Identical Phi Values (byte*) doplasma::sin_y#1 (byte*) doplasma::sin_y#2 +Identical Phi Values (byte*) doplasma::dist#2 (byte*) doplasma::dist#4 +Identical Phi Values (byte*) doplasma::screen#3 (byte*) doplasma::screen#5 +Identical Phi Values (byte) doplasma::y#2 (byte) doplasma::y#4 +Identical Phi Values (byte) sin_offset_x#11 (byte) sin_offset_x#26 +Identical Phi Values (byte) sin_offset_y#11 (byte) sin_offset_y#26 +Identical Phi Values (byte*) init_angle_screen::screen#1 (byte*) init_angle_screen::screen#0 +Identical Phi Values (byte) init_angle_screen::y#2 (byte) init_angle_screen::y#4 +Identical Phi Values (byte*) init_angle_screen::screen_bottomline#2 (byte*) init_angle_screen::screen_bottomline#5 +Identical Phi Values (byte*) init_angle_screen::screen_topline#2 (byte*) init_angle_screen::screen_topline#5 +Identical Phi Values (byte*) heap_head#28 (byte*) heap_head#26 +Identical Phi Values (word*) SQUARES#23 (word*) SQUARES#21 +Identical Phi Values (byte*) init_dist_screen::screen#1 (byte*) init_dist_screen::screen#0 +Identical Phi Values (byte*) heap_head#20 (byte*) heap_head#15 +Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17 +Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#18 +Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0 +Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#34 +Identical Phi Values (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#10 +Identical Phi Values (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#10 +Identical Phi Values (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#10 +Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#51 +Identical Phi Values (byte*) print_screen#4 (byte*) print_screen#6 +Identical Phi Values (byte*) print_line_cursor#16 (byte*) print_line_cursor#14 +Identical Phi Values (byte*) print_char_cursor#23 (byte*) print_char_cursor#21 +Identical Phi Values (byte*) make_plasma_charset::charset#10 (byte*) make_plasma_charset::charset#0 +Identical Phi Values (byte*) print_line_cursor#11 (byte*) print_line_cursor#1 +Identical Phi Values (byte*) print_char_cursor#16 (byte*) print_line_cursor#1 +Identical Phi Values (byte) make_plasma_charset::s#1 (byte) make_plasma_charset::s#3 +Identical Phi Values (word) make_plasma_charset::c#10 (word) make_plasma_charset::c#12 +Identical Phi Values (byte) make_plasma_charset::i#2 (byte) make_plasma_charset::i#7 +Identical Phi Values (byte*) make_plasma_charset::charset#1 (byte*) make_plasma_charset::charset#6 +Identical Phi Values (byte*) print_line_cursor#12 (byte*) print_line_cursor#42 +Identical Phi Values (byte*) print_char_cursor#20 (byte*) print_char_cursor#47 +Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_char_cursor#1 +Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#10 +Identical Phi Values (byte*) heap_head#11 (byte*) heap_head#19 +Identical Phi Values (word*) SQUARES#16 (word*) SQUARES#13 +Identical Phi Values (byte*) print_line_cursor#13 (byte*) print_line_cursor#10 +Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_char_cursor#15 +Identical Phi Values (byte) sin_offset_x#13 (byte) sin_offset_x#14 +Identical Phi Values (byte) sin_offset_y#13 (byte) sin_offset_y#14 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values (word*) SQUARES#9 (word*) SQUARES#18 +Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) bsearch16u::$5 [16] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 +Simple Condition (bool~) bsearch16u::$12 [28] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 +Simple Condition (bool~) bsearch16u::$0 [31] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 +Simple Condition (bool~) bsearch16u::$14 [35] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 +Simple Condition (bool~) memset::$2 [65] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +Simple Condition (bool~) init_squares::$5 [95] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 +Simple Condition (bool~) atan2_16::$0 [128] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$18 [151] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [160] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$19 [163] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$20 [171] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$21 [174] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$22 [191] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [195] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) print_cls::$1 [224] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) doplasma::$3 [360] if((byte) doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 +Simple Condition (bool~) doplasma::$4 [367] if((byte) doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 +Simple Condition (bool~) init_angle_screen::$15 [416] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +Simple Condition (bool~) init_angle_screen::$16 [422] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) init_dist_screen::$3 [438] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 +Simple Condition (bool~) init_dist_screen::$11 [459] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 +Simple Condition (bool~) init_dist_screen::$20 [489] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 +Simple Condition (bool~) init_dist_screen::$21 [495] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 +Simple Condition (bool~) make_plasma_charset::$6 [525] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#3) goto make_plasma_charset::@4 +Simple Condition (bool~) make_plasma_charset::$7 [529] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 +Simple Condition (bool~) make_plasma_charset::$10 [538] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 +Simple Condition (bool~) make_plasma_charset::$13 [543] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 +Simple Condition (bool~) make_plasma_charset::$15 [547] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Negating conditional jump and destination [191] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +Constant right-side identified [44] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [51] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [502] (byte[8]) make_plasma_charset::bittab#0 ← { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 } +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) D018#0 = (byte*) 53272 +Constant (const byte*) COLS#0 = (byte*) 55296 +Constant (const byte) BLACK#0 = 0 +Constant (const byte*) HEAP_START#0 = (byte*) 49152 +Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD +Constant (const byte) bsearch16u::$18 = 1*SIZEOF_WORD +Constant (const byte) NUM_SQUARES#0 = $ff +Constant (const word*) SQUARES#0 = (word*) 0 +Constant (const word) init_squares::sqr#0 = 0 +Constant (const byte) init_squares::i#0 = 0 +Constant (const byte) CORDIC_ITERATIONS_16#0 = $f +Constant (const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 = kickasm {{ .for (var i=0; i (const word) main::toD0181_$4#0 +Constant right-side identified [135] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff +Constant right-side identified [138] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) memset::$0 = (byte*)memset::str#0 +Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 +Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff +Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 +Constant (const word) main::toD0182_$1#0 = main::toD0182_$0#0&$3fff +Constant (const byte) main::toD0182_$5#0 = >main::toD0182_$4#0 +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [24] (byte*) memset::end#0 ← (const byte*) memset::$0 + (const word) memset::num#0 +Constant right-side identified [124] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [126] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [131] (word~) main::toD0182_$2#0 ← (const word) main::toD0182_$1#0 * (byte) 4 +Constant right-side identified [133] (byte~) main::toD0182_$6#0 ← (const byte) main::toD0182_$5#0 / (byte) 4 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) memset::end#0 = memset::$0+memset::num#0 +Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 +Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 +Constant (const word) main::toD0182_$2#0 = main::toD0182_$1#0*4 +Constant (const byte) main::toD0182_$6#0 = main::toD0182_$5#0/4 +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [123] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [124] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [128] (byte~) main::toD0182_$3#0 ← > (const word) main::toD0182_$2#0 +Constant right-side identified [129] (byte~) main::toD0182_$7#0 ← (const byte) main::toD0182_$6#0 & (byte) $f +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 +Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f +Constant (const byte) main::toD0182_$3#0 = >main::toD0182_$2#0 +Constant (const byte) main::toD0182_$7#0 = main::toD0182_$6#0&$f +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [123] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [126] (byte) main::toD0182_return#0 ← (const byte) main::toD0182_$3#0 | (const byte) main::toD0182_$7#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 +Constant (const byte) main::toD0182_return#0 = main::toD0182_$3#0|main::toD0182_$7#0 +Successful SSA optimization Pass2ConstantIdentification +Inlining Noop Cast [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 +Inlining Noop Cast [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 +Inlining Noop Cast [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) +Successful SSA optimization Pass2NopCastInlining +Inlining Noop Cast [30] (void*) malloc::return#2 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 +Inlining Noop Cast [108] (void*) malloc::return#3 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 +Inlining Noop Cast [112] (void*) malloc::return#4 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 +Successful SSA optimization Pass2NopCastInlining +Inlining Noop Cast [32] (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 keeping SQUARES#1 +Inlining Noop Cast [110] (byte*) SCREEN_DIST#0 ← (byte*)(void*~) $0 keeping SCREEN_DIST#0 +Inlining Noop Cast [114] (byte*) SCREEN_ANGLE#0 ← (byte*)(void*~) $1 keeping SCREEN_ANGLE#0 +Inlining Noop Cast [152] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 keeping init_angle_screen::xw#0 +Inlining Noop Cast [155] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 keeping init_angle_screen::yw#0 +Successful SSA optimization Pass2NopCastInlining +Rewriting multiplication to use shift [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [37] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Rewriting multiplication to use shift [44] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD +Rewriting division to use shift [53] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD +Rewriting division to use shift [65] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 +Rewriting multiplication to use shift [79] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [83] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [149] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 +Rewriting multiplication to use shift [153] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 +Rewriting multiplication to use shift [181] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 +Rewriting multiplication to use shift [191] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 +Rewriting multiplication to use shift [233] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 * (byte) 8 +Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings (const word) malloc::size#1 +Inlining constant with var siblings (const word) malloc::size#2 +Inlining constant with var siblings (const word) malloc::size#0 +Inlining constant with var siblings (const byte) bsearch16u::num#2 +Inlining constant with var siblings (const byte*) memset::dst#0 +Inlining constant with var siblings (const word) init_squares::sqr#0 +Inlining constant with var siblings (const byte) init_squares::i#0 +Inlining constant with var siblings (const word) atan2_16::angle#0 +Inlining constant with var siblings (const byte) atan2_16::i#0 +Inlining constant with var siblings (const byte*) print_cls::sc#0 +Inlining constant with var siblings (const byte) doplasma::y#0 +Inlining constant with var siblings (const byte) doplasma::x#0 +Inlining constant with var siblings (const byte*) doplasma::screen#0 +Inlining constant with var siblings (const byte*) doplasma::screen#1 +Inlining constant with var siblings (const byte) init_angle_screen::y#0 +Inlining constant with var siblings (const byte) init_angle_screen::x#0 +Inlining constant with var siblings (const byte) init_angle_screen::xb#0 +Inlining constant with var siblings (const byte) init_dist_screen::y#0 +Inlining constant with var siblings (const byte) init_dist_screen::x#0 +Inlining constant with var siblings (const byte) init_dist_screen::xb#0 +Inlining constant with var siblings (const word) make_plasma_charset::c#0 +Inlining constant with var siblings (const byte) make_plasma_charset::i#0 +Inlining constant with var siblings (const byte) make_plasma_charset::b#0 +Inlining constant with var siblings (const byte) make_plasma_charset::ii#0 +Inlining constant with var siblings (const byte) sin_offset_x#18 +Inlining constant with var siblings (const byte) sin_offset_y#18 +Constant inlined sin_offset_x#18 = (byte) 0 +Constant inlined init_angle_screen::y#0 = (byte) 0 +Constant inlined atan2_16::angle#0 = (byte) 0 +Constant inlined init_dist_screen::x#0 = (byte) 0 +Constant inlined doplasma::x#0 = (byte) 0 +Constant inlined atan2_16::$16 = (const byte) CORDIC_ITERATIONS_16#0-(byte) 1 +Constant inlined make_plasma_charset::ii#0 = (byte) 0 +Constant inlined bsearch16u::num#2 = (const byte) NUM_SQUARES#3 +Constant inlined main::toD0182_gfx#0 = (const byte*) CHARSET#0 +Constant inlined init_angle_screen::xb#0 = (byte) $27 +Constant inlined main::toD0182_$4#0 = (word)(const byte*) CHARSET#0 +Constant inlined main::toD0182_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4 +Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN1#0&(word) $3fff +Constant inlined main::toD0181_$7#0 = >(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +Constant inlined doplasma::screen#0 = (const byte*) SCREEN1#0 +Constant inlined main::toD0182_$0#0 = (word)(const byte*) SCREEN2#0 +Constant inlined init_squares::i#0 = (byte) 0 +Constant inlined doplasma::screen#1 = (const byte*) SCREEN2#0 +Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN1#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0182_$2#0 = (word)(const byte*) SCREEN2#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$5#0 = >(word)(const byte*) CHARSET#0 +Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0 +Constant inlined make_plasma_charset::b#0 = (byte) 0 +Constant inlined memset::c#0 = (const byte) BLACK#0 +Constant inlined make_plasma_charset::charset#0 = (const byte*) CHARSET#0 +Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN1#0 +Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 +Constant inlined init_squares::sqr#0 = (byte) 0 +Constant inlined print_cls::$0 = (const byte*) print_line_cursor#0+(word) $3e8 +Constant inlined init_angle_screen::x#0 = (byte) 0 +Constant inlined init_dist_screen::y#0 = (byte) 0 +Constant inlined init_dist_screen::xb#0 = (byte) $27 +Constant inlined memset::$0 = (byte*)(const void*) memset::str#0 +Constant inlined doplasma::y#0 = (byte) 0 +Constant inlined malloc::size#2 = (word) $3e8 +Constant inlined make_plasma_charset::i#0 = (byte) 0 +Constant inlined make_plasma_charset::c#0 = (byte) 0 +Constant inlined sin_offset_y#18 = (byte) 0 +Constant inlined atan2_16::i#0 = (byte) 0 +Constant inlined main::toD0182_$3#0 = >(word)(const byte*) SCREEN2#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN1#0 +Constant inlined main::toD0182_$5#0 = >(word)(const byte*) CHARSET#0 +Constant inlined print_cls::sc#0 = (const byte*) print_line_cursor#0 +Constant inlined malloc::size#1 = (word) $3e8 +Constant inlined main::toD0182_$7#0 = >(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +Constant inlined malloc::size#0 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD +Constant inlined bsearch16u::$17 = (byte) 1*(const byte) SIZEOF_WORD +Constant inlined bsearch16u::$18 = (byte) 1*(const byte) SIZEOF_WORD +Constant inlined main::toD0181_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4 +Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN1#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0182_screen#0 = (const byte*) SCREEN2#0 +Constant inlined main::toD0181_$4#0 = (word)(const byte*) CHARSET#0 +Constant inlined main::toD0182_$1#0 = (word)(const byte*) SCREEN2#0&(word) $3fff +Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 +Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) +Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) +Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) +Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) +Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) +Added new block during phi lifting atan2_16::@37(between atan2_16::@20 and atan2_16::@25) +Added new block during phi lifting atan2_16::@38(between atan2_16::@17 and atan2_16::@7) +Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_16::@8) +Added new block during phi lifting print_cls::@3(between print_cls::@1 and print_cls::@1) +Added new block during phi lifting doplasma::@5(between doplasma::@3 and doplasma::@1) +Added new block during phi lifting doplasma::@6(between doplasma::@2 and doplasma::@2) +Added new block during phi lifting init_angle_screen::@6(between init_angle_screen::@3 and init_angle_screen::@1) +Added new block during phi lifting init_angle_screen::@7(between init_angle_screen::@5 and init_angle_screen::@2) +Added new block during phi lifting init_dist_screen::@19(between init_dist_screen::@11 and init_dist_screen::@1) +Added new block during phi lifting init_dist_screen::@20(between init_dist_screen::@18 and init_dist_screen::@5) +Added new block during phi lifting make_plasma_charset::@15(between make_plasma_charset::@9 and make_plasma_charset::@1) +Added new block during phi lifting make_plasma_charset::@16(between make_plasma_charset::@6 and make_plasma_charset::@2) +Added new block during phi lifting make_plasma_charset::@17(between make_plasma_charset::@4 and make_plasma_charset::@3) +Added new block during phi lifting make_plasma_charset::@18(between make_plasma_charset::@13 and make_plasma_charset::@4) +Added new block during phi lifting make_plasma_charset::@19(between make_plasma_charset::@7 and make_plasma_charset::@9) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @4 +Adding NOP phi() at start of @11 +Adding NOP phi() at start of @14 +Adding NOP phi() at start of @16 +Adding NOP phi() at start of @37 +Adding NOP phi() at start of @39 +Adding NOP phi() at start of @40 +Adding NOP phi() at start of @44 +Adding NOP phi() at start of @47 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main::@10 +Adding NOP phi() at start of main::@11 +Adding NOP phi() at start of main::@12 +Adding NOP phi() at start of main::@13 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::toD0181_@return +Adding NOP phi() at start of main::@14 +Adding NOP phi() at start of main::toD0182 +Adding NOP phi() at start of main::toD0182_@return +Adding NOP phi() at start of memset +Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of make_plasma_charset +Adding NOP phi() at start of make_plasma_charset::@11 +Adding NOP phi() at start of make_plasma_charset::@12 +Adding NOP phi() at start of make_plasma_charset::@8 +Adding NOP phi() at start of print_cls +Adding NOP phi() at start of print_cls::@2 +Adding NOP phi() at start of init_dist_screen +CALL GRAPH +Calls in [] to malloc:7 malloc:10 main:14 +Calls in [main] to init_dist_screen:18 init_angle_screen:20 make_plasma_charset:22 memset:24 doplasma:29 doplasma:36 +Calls in [make_plasma_charset] to sid_rnd_init:79 print_cls:81 sid_rnd:88 print_char:107 +Calls in [init_angle_screen] to atan2_16:149 +Calls in [init_dist_screen] to init_squares:245 sqr:257 sqr:268 sqrt:273 +Calls in [sqrt] to bsearch16u:299 +Calls in [init_squares] to malloc:339 + +Created 60 initial phi equivalence classes +Coalesced [9] heap_head#59 ← heap_head#1 +Coalesced [27] sin_offset_x#32 ← sin_offset_x#14 +Coalesced [28] sin_offset_y#32 ← sin_offset_y#14 +Coalesced [34] sin_offset_x#33 ← sin_offset_x#12 +Coalesced [35] sin_offset_y#33 ← sin_offset_y#12 +Coalesced (already) [41] sin_offset_x#31 ← sin_offset_x#12 +Coalesced (already) [42] sin_offset_y#31 ← sin_offset_y#12 +Coalesced [48] doplasma::angle#5 ← doplasma::angle#0 +Coalesced [49] doplasma::dist#5 ← doplasma::dist#0 +Coalesced [50] doplasma::screen#7 ← doplasma::screen#6 +Coalesced [65] doplasma::angle#6 ← doplasma::angle#1 +Coalesced [66] doplasma::dist#6 ← doplasma::dist#1 +Coalesced [67] doplasma::screen#8 ← doplasma::screen#2 +Coalesced [68] doplasma::y#5 ← doplasma::y#1 +Coalesced [69] doplasma::x#3 ← doplasma::x#1 +Coalesced [77] memset::dst#3 ← memset::dst#1 +Coalesced [94] make_plasma_charset::b#9 ← make_plasma_charset::b#1 +Coalesced [108] print_char_cursor#53 ← print_char_cursor#1 +Coalesced [113] make_plasma_charset::c#13 ← make_plasma_charset::c#1 +Coalesced [114] print_char_cursor#52 ← print_char_cursor#18 +Coalesced (already) [115] print_char_cursor#54 ← print_char_cursor#49 +Coalesced [116] make_plasma_charset::i#8 ← make_plasma_charset::i#1 +Coalesced [117] make_plasma_charset::ii#6 ← make_plasma_charset::ii#1 +Coalesced [118] make_plasma_charset::b#7 ← make_plasma_charset::b#3 +Coalesced (already) [119] make_plasma_charset::b#8 ← make_plasma_charset::b#2 +Coalesced [132] print_cls::sc#3 ← print_cls::sc#1 +Coalesced [138] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#0 +Coalesced [139] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#0 +Coalesced [169] init_angle_screen::y#6 ← init_angle_screen::y#1 +Coalesced [170] init_angle_screen::screen_bottomline#7 ← init_angle_screen::screen_bottomline#1 +Coalesced [171] init_angle_screen::screen_topline#7 ← init_angle_screen::screen_topline#1 +Coalesced [172] init_angle_screen::x#4 ← init_angle_screen::x#1 +Coalesced [173] init_angle_screen::xb#4 ← init_angle_screen::xb#1 +Coalesced [176] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [180] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [182] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [183] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [186] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [191] atan2_16::angle#27 ← atan2_16::angle#4 +Coalesced [195] atan2_16::return#5 ← atan2_16::angle#5 +Coalesced [198] atan2_16::return#6 ← atan2_16::angle#11 +Coalesced [199] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [200] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [201] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [202] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [208] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [209] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [216] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [217] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [218] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [222] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [223] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [224] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [225] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [226] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [231] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [232] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [233] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [234] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [235] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [239] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [240] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [241] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [242] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [243] atan2_16::yi#16 ← atan2_16::y#0 +Coalesced [247] init_dist_screen::screen_topline#15 ← init_dist_screen::screen#0 +Coalesced [248] init_dist_screen::screen_bottomline#15 ← init_dist_screen::screen_bottomline#0 +Coalesced [253] init_dist_screen::yd#2 ← init_dist_screen::$5 +Coalesced [256] sqr::val#3 ← sqr::val#0 +Coalesced [264] init_dist_screen::xd#2 ← init_dist_screen::$13 +Coalesced [267] sqr::val#4 ← sqr::val#1 +Coalesced [288] init_dist_screen::y#14 ← init_dist_screen::y#1 +Coalesced [289] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 +Coalesced [290] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 +Coalesced [291] init_dist_screen::x#8 ← init_dist_screen::x#1 +Coalesced [292] init_dist_screen::xb#8 ← init_dist_screen::xb#1 +Coalesced [294] init_dist_screen::xd#1 ← init_dist_screen::$15 +Coalesced [296] init_dist_screen::yd#1 ← init_dist_screen::$7 +Coalesced [306] bsearch16u::items#10 ← bsearch16u::items#1 +Coalesced [311] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [313] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [316] bsearch16u::return#8 ← bsearch16u::items#2 +Not coalescing [322] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [326] bsearch16u::num#10 ← bsearch16u::num#1 +Coalesced [327] bsearch16u::items#12 ← bsearch16u::items#0 +Coalesced [330] bsearch16u::num#9 ← bsearch16u::num#0 +Coalesced [331] bsearch16u::items#11 ← bsearch16u::items#8 +Coalesced [332] bsearch16u::num#11 ← bsearch16u::num#3 +Coalesced (already) [333] bsearch16u::items#13 ← bsearch16u::items#2 +Coalesced (already) [338] heap_head#60 ← heap_head#1 +Coalesced [342] init_squares::squares#4 ← init_squares::squares#0 +Coalesced [352] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [353] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [354] init_squares::i#3 ← init_squares::i#1 +Coalesced down to 45 phi equivalence classes +Culled Empty Block (label) @4 +Culled Empty Block (label) @11 +Culled Empty Block (label) @14 +Culled Empty Block (label) @16 +Culled Empty Block (label) @37 +Culled Empty Block (label) @40 +Culled Empty Block (label) @47 +Culled Empty Block (label) main::@12 +Culled Empty Block (label) main::@13 +Culled Empty Block (label) main::toD0181_@return +Culled Empty Block (label) main::@14 +Culled Empty Block (label) main::toD0182_@return +Culled Empty Block (label) doplasma::@5 +Culled Empty Block (label) doplasma::@6 +Culled Empty Block (label) memset::@2 +Culled Empty Block (label) memset::@4 +Culled Empty Block (label) make_plasma_charset::@12 +Culled Empty Block (label) make_plasma_charset::@14 +Culled Empty Block (label) make_plasma_charset::@15 +Culled Empty Block (label) make_plasma_charset::@19 +Culled Empty Block (label) make_plasma_charset::@16 +Culled Empty Block (label) make_plasma_charset::@17 +Culled Empty Block (label) make_plasma_charset::@18 +Culled Empty Block (label) print_cls::@2 +Culled Empty Block (label) print_cls::@3 +Culled Empty Block (label) init_angle_screen::@6 +Culled Empty Block (label) init_angle_screen::@7 +Culled Empty Block (label) atan2_16::@35 +Culled Empty Block (label) atan2_16::@39 +Culled Empty Block (label) atan2_16::@38 +Culled Empty Block (label) atan2_16::@34 +Culled Empty Block (label) atan2_16::@36 +Culled Empty Block (label) atan2_16::@37 +Culled Empty Block (label) init_dist_screen::@19 +Culled Empty Block (label) init_dist_screen::@20 +Culled Empty Block (label) bsearch16u::@1 +Culled Empty Block (label) bsearch16u::@18 +Culled Empty Block (label) init_squares::@4 +Renumbering block @39 to @1 +Renumbering block @44 to @2 +Renumbering block @45 to @3 +Renumbering block @46 to @4 +Renumbering block bsearch16u::@2 to bsearch16u::@1 +Renumbering block bsearch16u::@3 to bsearch16u::@2 +Renumbering block bsearch16u::@6 to bsearch16u::@3 +Renumbering block bsearch16u::@7 to bsearch16u::@4 +Renumbering block bsearch16u::@8 to bsearch16u::@5 +Renumbering block bsearch16u::@9 to bsearch16u::@6 +Renumbering block bsearch16u::@10 to bsearch16u::@7 +Renumbering block bsearch16u::@13 to bsearch16u::@8 +Renumbering block bsearch16u::@15 to bsearch16u::@9 +Renumbering block init_squares::@3 to init_squares::@2 +Renumbering block sqrt::@2 to sqrt::@1 +Renumbering block atan2_16::@13 to atan2_16::@9 +Renumbering block atan2_16::@15 to atan2_16::@10 +Renumbering block atan2_16::@16 to atan2_16::@11 +Renumbering block atan2_16::@17 to atan2_16::@12 +Renumbering block atan2_16::@18 to atan2_16::@13 +Renumbering block atan2_16::@19 to atan2_16::@14 +Renumbering block atan2_16::@20 to atan2_16::@15 +Renumbering block atan2_16::@24 to atan2_16::@16 +Renumbering block atan2_16::@25 to atan2_16::@17 +Renumbering block atan2_16::@26 to atan2_16::@18 +Renumbering block atan2_16::@27 to atan2_16::@19 +Renumbering block atan2_16::@30 to atan2_16::@20 +Renumbering block atan2_16::@33 to atan2_16::@21 +Renumbering block main::@7 to main::@3 +Renumbering block main::@8 to main::@4 +Renumbering block main::@9 to main::@5 +Renumbering block main::@10 to main::@6 +Renumbering block main::@11 to main::@7 +Renumbering block init_angle_screen::@5 to init_angle_screen::@4 +Renumbering block init_dist_screen::@11 to init_dist_screen::@9 +Renumbering block init_dist_screen::@15 to init_dist_screen::@10 +Renumbering block init_dist_screen::@16 to init_dist_screen::@11 +Renumbering block init_dist_screen::@17 to init_dist_screen::@12 +Renumbering block init_dist_screen::@18 to init_dist_screen::@13 +Renumbering block make_plasma_charset::@11 to make_plasma_charset::@10 +Renumbering block make_plasma_charset::@13 to make_plasma_charset::@11 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main::@6 +Adding NOP phi() at start of main::@7 +Adding NOP phi() at start of main::@2 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::toD0182 +Adding NOP phi() at start of memset +Adding NOP phi() at start of make_plasma_charset +Adding NOP phi() at start of make_plasma_charset::@10 +Adding NOP phi() at start of make_plasma_charset::@8 +Adding NOP phi() at start of print_cls +Adding NOP phi() at start of init_dist_screen +Adding NOP phi() at start of bsearch16u +Adding NOP phi() at start of init_squares + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call malloc + to:@3 +@3: scope:[] from @1 + [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 + [4] call malloc + to:@4 +@4: scope:[] from @3 + [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 + to:@2 +@2: scope:[] from @4 + [6] phi() + [7] call main + to:@end +@end: scope:[] from @2 + [8] phi() +main: scope:[main] from @2 + [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 + [10] call init_dist_screen + to:main::@5 +main::@5: scope:[main] from main + [11] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0 + [12] call init_angle_screen + to:main::@6 +main::@6: scope:[main] from main::@5 + [13] phi() + [14] call make_plasma_charset + to:main::@7 +main::@7: scope:[main] from main::@6 + [15] phi() + [16] call memset + to:main::@1 +main::@1: scope:[main] from main::@4 main::@7 + [17] (byte) sin_offset_y#14 ← phi( main::@7/(byte) 0 main::@4/(byte) sin_offset_y#12 ) + [17] (byte) sin_offset_x#14 ← phi( main::@7/(byte) 0 main::@4/(byte) sin_offset_x#12 ) + to:main::@2 +main::@2: scope:[main] from main::@1 + [18] phi() + [19] call doplasma + to:main::toD0181 +main::toD0181: scope:[main] from main::@2 + [20] phi() + to:main::@3 +main::@3: scope:[main] from main::toD0181 + [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 + [22] call doplasma + to:main::toD0182 +main::toD0182: scope:[main] from main::@3 + [23] phi() + to:main::@4 +main::@4: scope:[main] from main::toD0182 + [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 + to:main::@1 +doplasma: scope:[doplasma] from main::@2 main::@3 + [25] (byte*) doplasma::screen#6 ← phi( main::@2/(const byte*) SCREEN1#0 main::@3/(const byte*) SCREEN2#0 ) + [25] (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@3/(byte) sin_offset_y#12 ) + [25] (byte) sin_offset_x#10 ← phi( main::@2/(byte) sin_offset_x#14 main::@3/(byte) sin_offset_x#12 ) + [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 + [27] (byte*) doplasma::dist#0 ← (byte*)(void*) SCREEN_DIST#0 + [28] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 + [29] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 + to:doplasma::@1 +doplasma::@1: scope:[doplasma] from doplasma doplasma::@3 + [30] (byte) doplasma::y#4 ← phi( doplasma/(byte) 0 doplasma::@3/(byte) doplasma::y#1 ) + [30] (byte*) doplasma::screen#5 ← phi( doplasma/(byte*) doplasma::screen#6 doplasma::@3/(byte*) doplasma::screen#2 ) + [30] (byte*) doplasma::dist#4 ← phi( doplasma/(byte*) doplasma::dist#0 doplasma::@3/(byte*) doplasma::dist#1 ) + [30] (byte*) doplasma::angle#4 ← phi( doplasma/(byte*) doplasma::angle#0 doplasma::@3/(byte*) doplasma::angle#1 ) + to:doplasma::@2 +doplasma::@2: scope:[doplasma] from doplasma::@1 doplasma::@2 + [31] (byte) doplasma::x#2 ← phi( doplasma::@1/(byte) 0 doplasma::@2/(byte) doplasma::x#1 ) + [32] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) + [33] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 + [34] (byte) doplasma::x#1 ← ++ (byte) doplasma::x#2 + [35] if((byte) doplasma::x#1!=(byte) $28) goto doplasma::@2 + to:doplasma::@3 +doplasma::@3: scope:[doplasma] from doplasma::@2 + [36] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 + [37] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 + [38] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 + [39] (byte) doplasma::y#1 ← ++ (byte) doplasma::y#4 + [40] if((byte) doplasma::y#1!=(byte) $1a) goto doplasma::@1 + to:doplasma::@4 +doplasma::@4: scope:[doplasma] from doplasma::@3 + [41] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 + [42] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 + to:doplasma::@return +doplasma::@return: scope:[doplasma] from doplasma::@4 + [43] return + to:@return +memset: scope:[memset] from main::@7 + [44] phi() + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@1 + [45] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@1/(byte*) memset::dst#1 ) + [46] *((byte*) memset::dst#2) ← (const byte) BLACK#0 + [47] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [48] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 + to:memset::@return +memset::@return: scope:[memset] from memset::@1 + [49] return + to:@return +make_plasma_charset: scope:[make_plasma_charset] from main::@6 + [50] phi() + [51] call sid_rnd_init + to:make_plasma_charset::@10 +make_plasma_charset::@10: scope:[make_plasma_charset] from make_plasma_charset + [52] phi() + [53] call print_cls + to:make_plasma_charset::@1 +make_plasma_charset::@1: scope:[make_plasma_charset] from make_plasma_charset::@10 make_plasma_charset::@9 + [54] (byte*) print_char_cursor#49 ← phi( make_plasma_charset::@10/(const byte*) print_line_cursor#0 make_plasma_charset::@9/(byte*) print_char_cursor#18 ) + [54] (word) make_plasma_charset::c#2 ← phi( make_plasma_charset::@10/(byte) 0 make_plasma_charset::@9/(word) make_plasma_charset::c#1 ) + [55] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 + [56] (byte) make_plasma_charset::s#0 ← *((const byte[$200]) SINTABLE#0 + (byte~) make_plasma_charset::$2) + to:make_plasma_charset::@2 +make_plasma_charset::@2: scope:[make_plasma_charset] from make_plasma_charset::@1 make_plasma_charset::@6 + [57] (byte) make_plasma_charset::i#7 ← phi( make_plasma_charset::@1/(byte) 0 make_plasma_charset::@6/(byte) make_plasma_charset::i#1 ) + to:make_plasma_charset::@3 +make_plasma_charset::@3: scope:[make_plasma_charset] from make_plasma_charset::@2 make_plasma_charset::@4 + [58] (byte) make_plasma_charset::b#2 ← phi( make_plasma_charset::@2/(byte) 0 make_plasma_charset::@4/(byte) make_plasma_charset::b#3 ) + [58] (byte) make_plasma_charset::ii#2 ← phi( make_plasma_charset::@2/(byte) 0 make_plasma_charset::@4/(byte) make_plasma_charset::ii#1 ) + [59] call sid_rnd + [60] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:make_plasma_charset::@11 +make_plasma_charset::@11: scope:[make_plasma_charset] from make_plasma_charset::@3 + [61] (byte~) make_plasma_charset::$3 ← (byte) sid_rnd::return#2 + [62] (byte~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (byte) $ff + [63] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@4 + to:make_plasma_charset::@5 +make_plasma_charset::@5: scope:[make_plasma_charset] from make_plasma_charset::@11 + [64] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) + to:make_plasma_charset::@4 +make_plasma_charset::@4: scope:[make_plasma_charset] from make_plasma_charset::@11 make_plasma_charset::@5 + [65] (byte) make_plasma_charset::b#3 ← phi( make_plasma_charset::@11/(byte) make_plasma_charset::b#2 make_plasma_charset::@5/(byte) make_plasma_charset::b#1 ) + [66] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 + [67] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 + to:make_plasma_charset::@6 +make_plasma_charset::@6: scope:[make_plasma_charset] from make_plasma_charset::@4 + [68] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 << (byte) 3 + [69] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 + [70] (byte*~) make_plasma_charset::$16 ← (const byte*) CHARSET#0 + (word~) make_plasma_charset::$9 + [71] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 + [72] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#7 + [73] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 + to:make_plasma_charset::@7 +make_plasma_charset::@7: scope:[make_plasma_charset] from make_plasma_charset::@6 + [74] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 + [75] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 + to:make_plasma_charset::@8 +make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset::@7 + [76] phi() + [77] call print_char + to:make_plasma_charset::@9 +make_plasma_charset::@9: scope:[make_plasma_charset] from make_plasma_charset::@7 make_plasma_charset::@8 + [78] (byte*) print_char_cursor#18 ← phi( make_plasma_charset::@8/(byte*) print_char_cursor#1 make_plasma_charset::@7/(byte*) print_char_cursor#49 ) + [79] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2 + [80] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 + to:make_plasma_charset::@return +make_plasma_charset::@return: scope:[make_plasma_charset] from make_plasma_charset::@9 + [81] return + to:@return +print_char: scope:[print_char] from make_plasma_charset::@8 + [82] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 + [83] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#49 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [84] return + to:@return +sid_rnd: scope:[sid_rnd] from make_plasma_charset::@3 + [85] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + [86] return + to:@return +print_cls: scope:[print_cls] from make_plasma_charset::@10 + [87] phi() + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + [88] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) print_line_cursor#0 print_cls::@1/(byte*) print_cls::sc#1 ) + [89] *((byte*) print_cls::sc#2) ← (byte) ' ' + [90] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + [91] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word) $3e8) goto print_cls::@1 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [92] return + to:@return +sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset + [93] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff + [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [95] return + to:@return +init_angle_screen: scope:[init_angle_screen] from main::@5 + [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [98] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [98] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [98] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 + [99] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 ) + [99] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 ) + [100] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 + [101] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [102] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 + [103] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 + [104] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 + [105] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + [106] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + [107] call atan2_16 + [108] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@4 +init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 + [109] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [110] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [111] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 + [119] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [120] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [121] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 + [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [124] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [125] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [126] return + to:@return +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + to:atan2_16::@2 +atan2_16::@2: scope:[atan2_16] from atan2_16 + [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + to:atan2_16::@3 +atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 + [129] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) + [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + to:atan2_16::@5 +atan2_16::@5: scope:[atan2_16] from atan2_16::@3 + [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 + [132] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) + to:atan2_16::@10 +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [133] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [133] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [133] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [133] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) + [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + to:atan2_16::@12 +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [135] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 + [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 + [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + to:atan2_16::@7 +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [139] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) + [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + to:atan2_16::@9 +atan2_16::@9: scope:[atan2_16] from atan2_16::@7 + [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + to:atan2_16::@8 +atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 + [142] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + to:atan2_16::@return +atan2_16::@return: scope:[atan2_16] from atan2_16::@8 + [143] return + to:@return +atan2_16::@11: scope:[atan2_16] from atan2_16::@10 + [144] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 + [147] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) + [147] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) + [147] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) + [148] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 + to:atan2_16::@15 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [152] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [152] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [158] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [158] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [158] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [159] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [160] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 + to:atan2_16::@10 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [167] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 +atan2_16::@4: scope:[atan2_16] from atan2_16::@3 + [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 + to:atan2_16::@6 +atan2_16::@1: scope:[atan2_16] from atan2_16 + [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 + to:atan2_16::@3 +init_dist_screen: scope:[init_dist_screen] from main + [170] phi() + [171] call init_squares + to:init_dist_screen::@10 +init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen + [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@9 + [173] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#0 ) + [173] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen#0 ) + [173] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen::@10/(byte) 0 ) + [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 + [175] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [177] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [178] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [179] call sqr + [180] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@4 + [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@13 + [182] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@11/(byte) $27 init_dist_screen::@13/(byte) init_dist_screen::xb#1 ) + [182] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@13/(byte) init_dist_screen::x#1 ) + [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 + [184] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [186] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [187] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [188] call sqr + [189] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@12 +init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@8 + [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [193] call sqrt + [194] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@13 +init_dist_screen::@13: scope:[init_dist_screen] from init_dist_screen::@12 + [195] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [196] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [197] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [198] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [199] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [200] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [201] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [202] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 + to:init_dist_screen::@9 +init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@13 + [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [205] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [206] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 + [207] return + to:@return +init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 + [208] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + to:init_dist_screen::@8 +init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 + [209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + to:init_dist_screen::@4 +sqrt: scope:[sqrt] from init_dist_screen::@12 + [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 + [212] call bsearch16u + [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + to:sqrt::@1 +sqrt::@1: scope:[sqrt] from sqrt + [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 + [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 + [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + to:sqrt::@return +sqrt::@return: scope:[sqrt] from sqrt::@1 + [218] return + to:@return +bsearch16u: scope:[bsearch16u] from sqrt + [219] phi() + to:bsearch16u::@3 +bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 + [220] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) + [220] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) + [221] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 + to:bsearch16u::@5 +bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 + [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + to:bsearch16u::@1 +bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 + [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + to:bsearch16u::@2 +bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 + [224] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + to:bsearch16u::@return +bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 + [225] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [226] return + to:@return +bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 + [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 + [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + to:bsearch16u::@8 +bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 + [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 + to:bsearch16u::@return +bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 + [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 + to:bsearch16u::@9 +bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 + [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [235] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 + to:bsearch16u::@7 +bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 + [236] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) + [236] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) + [237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + to:bsearch16u::@3 +sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 + [238] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) + to:sqr::@return +sqr::@return: scope:[sqr] from sqr + [241] return + to:@return +init_squares: scope:[init_squares] from init_dist_screen + [242] phi() + [243] call malloc + to:init_squares::@2 +init_squares::@2: scope:[init_squares] from init_squares + [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 + to:init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 + [246] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) + [246] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) + [246] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 ) + [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + to:init_squares::@return +init_squares::@return: scope:[init_squares] from init_squares::@1 + [254] return + to:@return +malloc: scope:[malloc] from @1 @3 init_squares + [255] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [255] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_START#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) + [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 + [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 + to:malloc::@return +malloc::@return: scope:[malloc] from malloc + [258] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(byte) BLACK +(byte*) CHARSET +(byte*) COLS +(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16 +(byte) CORDIC_ITERATIONS_16 +(byte*) D018 +(byte*) HEAP_START +(byte) NUM_SQUARES +(byte*) SCREEN1 +(byte*) SCREEN2 +(byte*) SCREEN_ANGLE +(void*) SCREEN_ANGLE#0 0.05405405405405406 +(byte*) SCREEN_DIST +(void*) SCREEN_DIST#0 0.05128205128205128 +(byte) SID_CONTROL_NOISE +(byte*) SID_VOICE3_CONTROL +(word*) SID_VOICE3_FREQ +(byte*) SID_VOICE3_OSC +(byte[$200]) SINTABLE +(word*) SQUARES +(void*) SQUARES#1 0.03225806451612903 +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) +(signed word~) atan2_16::$2 4.0 +(byte~) atan2_16::$23 2002.0 +(byte~) atan2_16::$24 2002.0 +(signed word~) atan2_16::$7 4.0 +(word) atan2_16::angle +(word) atan2_16::angle#1 3.0 +(word) atan2_16::angle#11 4.0 +(word) atan2_16::angle#12 190.66666666666666 +(word) atan2_16::angle#13 1334.6666666666667 +(word) atan2_16::angle#2 2002.0 +(word) atan2_16::angle#3 2002.0 +(word) atan2_16::angle#4 4.0 +(word) atan2_16::angle#5 4.0 +(word) atan2_16::angle#6 2004.0 +(byte) atan2_16::i +(byte) atan2_16::i#1 1501.5 +(byte) atan2_16::i#2 208.54166666666669 +(word) atan2_16::return +(word) atan2_16::return#0 34.99999999999999 +(word) atan2_16::return#2 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 20002.0 +(byte) atan2_16::shift#2 8001.25 +(byte~) atan2_16::shift#5 667.3333333333334 +(signed word) atan2_16::x +(signed word) atan2_16::x#0 2.8684210526315796 +(signed word) atan2_16::xd +(signed word) atan2_16::xd#1 6667.333333333333 +(signed word~) atan2_16::xd#10 1001.0 +(signed word) atan2_16::xd#2 1001.0 +(signed word) atan2_16::xd#3 7668.333333333332 +(signed word) atan2_16::xd#5 1001.0 +(signed word) atan2_16::xi +(signed word) atan2_16::xi#0 6.0 +(signed word) atan2_16::xi#1 500.5 +(signed word~) atan2_16::xi#13 4.0 +(signed word) atan2_16::xi#2 500.5 +(signed word) atan2_16::xi#3 267.0666666666667 +(signed word) atan2_16::xi#8 1001.0 +(signed word) atan2_16::y +(signed word) atan2_16::y#0 2.724999999999999 +(signed word) atan2_16::yd +(signed word) atan2_16::yd#1 10001.0 +(signed word~) atan2_16::yd#10 2002.0 +(signed word) atan2_16::yd#2 2002.0 +(signed word) atan2_16::yd#3 4601.0 +(signed word) atan2_16::yd#5 2002.0 +(signed word) atan2_16::yi +(signed word) atan2_16::yi#0 1.2000000000000002 +(signed word) atan2_16::yi#1 667.3333333333334 +(signed word~) atan2_16::yi#16 4.0 +(signed word) atan2_16::yi#2 667.3333333333334 +(signed word) atan2_16::yi#3 353.4117647058823 +(signed word) atan2_16::yi#8 1001.0 +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) +(byte~) bsearch16u::$16 2002.0 +(word*~) bsearch16u::$2 4.0 +(byte~) bsearch16u::$6 2002.0 +(word*) bsearch16u::items +(word*) bsearch16u::items#0 1001.0 +(word*) bsearch16u::items#1 2.0 +(word*) bsearch16u::items#2 334.5555555555556 +(word*) bsearch16u::items#8 1501.5 +(word) bsearch16u::key +(word) bsearch16u::key#0 0.26666666666666666 +(byte) bsearch16u::num +(byte) bsearch16u::num#0 2002.0 +(byte) bsearch16u::num#1 2002.0 +(byte) bsearch16u::num#3 556.1111111111111 +(byte) bsearch16u::num#5 3003.0 +(word*) bsearch16u::pivot +(word*) bsearch16u::pivot#0 501.0 +(signed word) bsearch16u::result +(signed word) bsearch16u::result#0 1501.5 +(word*) bsearch16u::return +(word*) bsearch16u::return#1 2.0 +(word*) bsearch16u::return#2 6.0 +(word*) bsearch16u::return#3 4.0 +(word*~) bsearch16u::return#6 4.0 +(void()) doplasma((byte*) doplasma::screen) +(byte~) doplasma::$2 2002.0 +(byte*) doplasma::angle +(byte*) doplasma::angle#0 1.0 +(byte*) doplasma::angle#1 50.5 +(byte*) doplasma::angle#4 172.14285714285714 +(byte*) doplasma::dist +(byte*) doplasma::dist#0 1.3333333333333333 +(byte*) doplasma::dist#1 67.33333333333333 +(byte*) doplasma::dist#4 150.625 +(byte*) doplasma::screen +(byte*) doplasma::screen#2 40.4 +(byte*) doplasma::screen#5 200.83333333333334 +(byte*) doplasma::screen#6 0.4 +(byte*) doplasma::sin_x +(byte*) doplasma::sin_x#0 77.15384615384616 +(byte*) doplasma::sin_y +(byte*) doplasma::sin_y#0 83.58333333333334 +(byte) doplasma::x +(byte) doplasma::x#1 1501.5 +(byte) doplasma::x#2 1668.3333333333335 +(byte) doplasma::y +(byte) doplasma::y#1 151.5 +(byte) doplasma::y#4 22.444444444444443 +(byte*) heap_head +(byte*) heap_head#1 0.6000000000000001 +(byte*) heap_head#12 4.0 +(void()) init_angle_screen((byte*) init_angle_screen::screen) +(word~) init_angle_screen::$10 202.0 +(byte~) init_angle_screen::$12 202.0 +(byte~) init_angle_screen::$13 202.0 +(byte~) init_angle_screen::$14 202.0 +(byte~) init_angle_screen::$2 202.0 +(byte~) init_angle_screen::$3 202.0 +(byte~) init_angle_screen::$6 202.0 +(byte) init_angle_screen::ang_w +(byte) init_angle_screen::ang_w#0 84.16666666666666 +(word) init_angle_screen::angle_w +(word) init_angle_screen::angle_w#0 202.0 +(byte*) init_angle_screen::screen +(byte*) init_angle_screen::screen#0 3.0 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#0 4.0 +(byte*) init_angle_screen::screen_bottomline#1 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 9.040000000000001 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#0 2.0 +(byte*) init_angle_screen::screen_topline#1 5.5 +(byte*) init_angle_screen::screen_topline#5 9.416666666666666 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#1 101.0 +(byte) init_angle_screen::x#2 25.25 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#1 101.0 +(byte) init_angle_screen::xb#2 19.238095238095237 +(signed word) init_angle_screen::xw +(word) init_angle_screen::xw#0 33.666666666666664 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#1 16.5 +(byte) init_angle_screen::y#4 4.730769230769231 +(signed word) init_angle_screen::yw +(word) init_angle_screen::yw#0 50.5 +(void()) init_dist_screen((byte*) init_dist_screen::screen) +(byte~) init_dist_screen::$13 202.0 +(byte~) init_dist_screen::$15 202.0 +(byte~) init_dist_screen::$5 22.0 +(byte~) init_dist_screen::$7 22.0 +(byte) init_dist_screen::d +(byte) init_dist_screen::d#0 126.25 +(word) init_dist_screen::ds +(word) init_dist_screen::ds#0 202.0 +(byte*) init_dist_screen::screen +(byte*) init_dist_screen::screen#0 1.5 +(byte*) init_dist_screen::screen_bottomline +(byte*) init_dist_screen::screen_bottomline#0 4.0 +(byte*) init_dist_screen::screen_bottomline#1 7.333333333333333 +(byte*) init_dist_screen::screen_bottomline#10 6.848484848484849 +(byte*) init_dist_screen::screen_topline +(byte*) init_dist_screen::screen_topline#1 5.5 +(byte*) init_dist_screen::screen_topline#10 7.0625 +(byte) init_dist_screen::x +(byte) init_dist_screen::x#1 101.0 +(byte) init_dist_screen::x#2 26.578947368421055 +(byte) init_dist_screen::x2 +(byte) init_dist_screen::x2#0 202.0 +(byte) init_dist_screen::xb +(byte) init_dist_screen::xb#1 101.0 +(byte) init_dist_screen::xb#2 20.2 +(byte) init_dist_screen::xd +(byte) init_dist_screen::xd#0 303.0 +(word) init_dist_screen::xds +(word) init_dist_screen::xds#0 202.0 +(byte) init_dist_screen::y +(byte) init_dist_screen::y#1 16.5 +(byte) init_dist_screen::y#10 0.9705882352941178 +(byte) init_dist_screen::y2 +(byte) init_dist_screen::y2#0 22.0 +(byte) init_dist_screen::yd +(byte) init_dist_screen::yd#0 33.0 +(word) init_dist_screen::yds +(word) init_dist_screen::yds#0 4.869565217391305 +(void()) init_squares() +(byte~) init_squares::$3 22.0 +(byte~) init_squares::$4 22.0 +(byte) init_squares::i +(byte) init_squares::i#1 16.5 +(byte) init_squares::i#2 5.5 +(word) init_squares::sqr +(word) init_squares::sqr#1 7.333333333333333 +(word) init_squares::sqr#2 6.6000000000000005 +(word*) init_squares::squares +(word*) init_squares::squares#0 4.0 +(word*) init_squares::squares#1 3.6666666666666665 +(word*) init_squares::squares#2 17.5 +(void()) main() +(word~) main::toD0181_$0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$2 +(number~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(number~) main::toD0181_$6 +(number~) main::toD0181_$7 +(number~) main::toD0181_$8 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(byte*) main::toD0181_screen +(word~) main::toD0182_$0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$2 +(number~) main::toD0182_$3 +(word~) main::toD0182_$4 +(byte~) main::toD0182_$5 +(number~) main::toD0182_$6 +(number~) main::toD0182_$7 +(number~) main::toD0182_$8 +(byte*) main::toD0182_gfx +(byte) main::toD0182_return +(byte*) main::toD0182_screen +(void()) make_plasma_charset((byte*) make_plasma_charset::charset) +(byte~) make_plasma_charset::$11 22.0 +(byte*~) make_plasma_charset::$16 202.0 +(byte~) make_plasma_charset::$2 22.0 +(byte~) make_plasma_charset::$3 2002.0 +(byte~) make_plasma_charset::$4 2002.0 +(word~) make_plasma_charset::$8 202.0 +(word~) make_plasma_charset::$9 202.0 +(byte) make_plasma_charset::b +(byte) make_plasma_charset::b#1 2002.0 +(byte) make_plasma_charset::b#2 500.5 +(byte) make_plasma_charset::b#3 517.3333333333334 +(byte[8]) make_plasma_charset::bittab +(word) make_plasma_charset::c +(word) make_plasma_charset::c#1 16.5 +(word) make_plasma_charset::c#2 5.800000000000001 +(byte*) make_plasma_charset::charset +(byte) make_plasma_charset::i +(byte) make_plasma_charset::i#1 151.5 +(byte) make_plasma_charset::i#7 20.2 +(byte) make_plasma_charset::ii +(byte) make_plasma_charset::ii#1 1501.5 +(byte) make_plasma_charset::ii#2 375.375 +(byte) make_plasma_charset::s +(byte) make_plasma_charset::s#0 56.22222222222223 +(void*()) malloc((word) malloc::size) +(byte*) malloc::mem +(byte*) malloc::mem#0 0.3333333333333333 +(void*) malloc::return +(word) malloc::size +(word) malloc::size#3 1.0 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(byte) memset::c +(byte*) memset::dst +(byte*) memset::dst#1 16.5 +(byte*) memset::dst#2 16.5 +(byte*) memset::end +(word) memset::num +(void*) memset::return +(void*) memset::str +(void()) print_char((byte) print_char::ch) +(byte) print_char::ch +(byte*) print_char_cursor +(byte*) print_char_cursor#1 4.333333333333333 +(byte*) print_char_cursor#18 11.0 +(byte*) print_char_cursor#49 1.0833333333333333 +(void()) print_cls() +(byte*) print_cls::sc +(byte*) print_cls::sc#1 16.5 +(byte*) print_cls::sc#2 16.5 +(byte*) print_line_cursor +(byte*) print_screen +(byte()) sid_rnd() +(byte) sid_rnd::return +(byte) sid_rnd::return#0 334.33333333333337 +(byte) sid_rnd::return#2 2002.0 +(void()) sid_rnd_init() +(byte) sin_offset_x +(byte) sin_offset_x#10 1.625 +(byte) sin_offset_x#12 2.666666666666667 +(byte) sin_offset_x#14 11.0 +(byte) sin_offset_y +(byte) sin_offset_y#10 1.5294117647058825 +(byte) sin_offset_y#12 3.0 +(byte) sin_offset_y#14 11.0 +(word()) sqr((byte) sqr::val) +(byte~) sqr::$0 4.0 +(word) sqr::return +(word) sqr::return#0 28.5 +(word) sqr::return#2 22.0 +(word) sqr::return#3 202.0 +(byte) sqr::val +(byte) sqr::val#0 22.0 +(byte) sqr::val#1 202.0 +(byte) sqr::val#2 114.0 +(byte()) sqrt((word) sqrt::val) +(word~) sqrt::$1 2.0 +(word~) sqrt::$3 4.0 +(word*) sqrt::found +(word*) sqrt::found#0 4.0 +(byte) sqrt::return +(byte) sqrt::return#0 34.33333333333333 +(byte) sqrt::return#2 202.0 +(byte) sqrt::sq +(word) sqrt::val +(word) sqrt::val#0 103.0 + +Initial phi equivalence classes +[ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +[ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +[ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] +[ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] +[ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +[ doplasma::y#4 doplasma::y#1 ] +[ doplasma::x#2 doplasma::x#1 ] +[ memset::dst#2 memset::dst#1 ] +[ make_plasma_charset::c#2 make_plasma_charset::c#1 ] +[ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] +[ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +[ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] +[ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] +[ print_cls::sc#2 print_cls::sc#1 ] +[ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::x#2 init_angle_screen::x#1 ] +[ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ atan2_16::i#2 atan2_16::i#1 ] +[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] +[ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] +[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +[ init_dist_screen::y#10 init_dist_screen::y#1 ] +[ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] +[ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] +[ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +[ init_dist_screen::x#2 init_dist_screen::x#1 ] +[ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +[ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] +[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ sqr::val#2 sqr::val#0 sqr::val#1 ] +[ init_squares::sqr#2 init_squares::sqr#1 ] +[ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +[ init_squares::i#2 init_squares::i#1 ] +[ heap_head#12 heap_head#1 ] +[ malloc::size#3 ] +Added variable SCREEN_DIST#0 to zero page equivalence class [ SCREEN_DIST#0 ] +Added variable SCREEN_ANGLE#0 to zero page equivalence class [ SCREEN_ANGLE#0 ] +Added variable init_angle_screen::screen#0 to zero page equivalence class [ init_angle_screen::screen#0 ] +Added variable doplasma::sin_x#0 to zero page equivalence class [ doplasma::sin_x#0 ] +Added variable doplasma::sin_y#0 to zero page equivalence class [ doplasma::sin_y#0 ] +Added variable doplasma::$2 to zero page equivalence class [ doplasma::$2 ] +Added variable make_plasma_charset::$2 to zero page equivalence class [ make_plasma_charset::$2 ] +Added variable make_plasma_charset::s#0 to zero page equivalence class [ make_plasma_charset::s#0 ] +Added variable sid_rnd::return#2 to zero page equivalence class [ sid_rnd::return#2 ] +Added variable make_plasma_charset::$3 to zero page equivalence class [ make_plasma_charset::$3 ] +Added variable make_plasma_charset::$4 to zero page equivalence class [ make_plasma_charset::$4 ] +Added variable make_plasma_charset::$8 to zero page equivalence class [ make_plasma_charset::$8 ] +Added variable make_plasma_charset::$9 to zero page equivalence class [ make_plasma_charset::$9 ] +Added variable make_plasma_charset::$16 to zero page equivalence class [ make_plasma_charset::$16 ] +Added variable make_plasma_charset::$11 to zero page equivalence class [ make_plasma_charset::$11 ] +Added variable sid_rnd::return#0 to zero page equivalence class [ sid_rnd::return#0 ] +Added variable init_angle_screen::$2 to zero page equivalence class [ init_angle_screen::$2 ] +Added variable init_angle_screen::$3 to zero page equivalence class [ init_angle_screen::$3 ] +Added variable init_angle_screen::xw#0 to zero page equivalence class [ init_angle_screen::xw#0 ] +Added variable init_angle_screen::$6 to zero page equivalence class [ init_angle_screen::$6 ] +Added variable init_angle_screen::yw#0 to zero page equivalence class [ init_angle_screen::yw#0 ] +Added variable atan2_16::x#0 to zero page equivalence class [ atan2_16::x#0 ] +Added variable atan2_16::y#0 to zero page equivalence class [ atan2_16::y#0 ] +Added variable atan2_16::return#2 to zero page equivalence class [ atan2_16::return#2 ] +Added variable init_angle_screen::angle_w#0 to zero page equivalence class [ init_angle_screen::angle_w#0 ] +Added variable init_angle_screen::$10 to zero page equivalence class [ init_angle_screen::$10 ] +Added variable init_angle_screen::ang_w#0 to zero page equivalence class [ init_angle_screen::ang_w#0 ] +Added variable init_angle_screen::$12 to zero page equivalence class [ init_angle_screen::$12 ] +Added variable init_angle_screen::$13 to zero page equivalence class [ init_angle_screen::$13 ] +Added variable init_angle_screen::$14 to zero page equivalence class [ init_angle_screen::$14 ] +Added variable atan2_16::$24 to zero page equivalence class [ atan2_16::$24 ] +Added variable atan2_16::$23 to zero page equivalence class [ atan2_16::$23 ] +Added variable init_dist_screen::y2#0 to zero page equivalence class [ init_dist_screen::y2#0 ] +Added variable sqr::return#2 to zero page equivalence class [ sqr::return#2 ] +Added variable init_dist_screen::yds#0 to zero page equivalence class [ init_dist_screen::yds#0 ] +Added variable init_dist_screen::x2#0 to zero page equivalence class [ init_dist_screen::x2#0 ] +Added variable sqr::return#3 to zero page equivalence class [ sqr::return#3 ] +Added variable init_dist_screen::xds#0 to zero page equivalence class [ init_dist_screen::xds#0 ] +Added variable init_dist_screen::ds#0 to zero page equivalence class [ init_dist_screen::ds#0 ] +Added variable sqrt::val#0 to zero page equivalence class [ sqrt::val#0 ] +Added variable sqrt::return#2 to zero page equivalence class [ sqrt::return#2 ] +Added variable init_dist_screen::d#0 to zero page equivalence class [ init_dist_screen::d#0 ] +Added variable bsearch16u::key#0 to zero page equivalence class [ bsearch16u::key#0 ] +Added variable bsearch16u::return#3 to zero page equivalence class [ bsearch16u::return#3 ] +Added variable sqrt::found#0 to zero page equivalence class [ sqrt::found#0 ] +Added variable sqrt::$3 to zero page equivalence class [ sqrt::$3 ] +Added variable sqrt::$1 to zero page equivalence class [ sqrt::$1 ] +Added variable sqrt::return#0 to zero page equivalence class [ sqrt::return#0 ] +Added variable bsearch16u::$6 to zero page equivalence class [ bsearch16u::$6 ] +Added variable bsearch16u::$16 to zero page equivalence class [ bsearch16u::$16 ] +Added variable bsearch16u::pivot#0 to zero page equivalence class [ bsearch16u::pivot#0 ] +Added variable bsearch16u::result#0 to zero page equivalence class [ bsearch16u::result#0 ] +Added variable sqr::$0 to zero page equivalence class [ sqr::$0 ] +Added variable sqr::return#0 to zero page equivalence class [ sqr::return#0 ] +Added variable SQUARES#1 to zero page equivalence class [ SQUARES#1 ] +Added variable init_squares::$3 to zero page equivalence class [ init_squares::$3 ] +Added variable init_squares::$4 to zero page equivalence class [ init_squares::$4 ] +Added variable malloc::mem#0 to zero page equivalence class [ malloc::mem#0 ] +Complete equivalence classes +[ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +[ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +[ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] +[ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] +[ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +[ doplasma::y#4 doplasma::y#1 ] +[ doplasma::x#2 doplasma::x#1 ] +[ memset::dst#2 memset::dst#1 ] +[ make_plasma_charset::c#2 make_plasma_charset::c#1 ] +[ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] +[ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +[ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] +[ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] +[ print_cls::sc#2 print_cls::sc#1 ] +[ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::x#2 init_angle_screen::x#1 ] +[ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ atan2_16::i#2 atan2_16::i#1 ] +[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] +[ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] +[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +[ init_dist_screen::y#10 init_dist_screen::y#1 ] +[ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] +[ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] +[ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +[ init_dist_screen::x#2 init_dist_screen::x#1 ] +[ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +[ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] +[ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] +[ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +[ sqr::val#2 sqr::val#0 sqr::val#1 ] +[ init_squares::sqr#2 init_squares::sqr#1 ] +[ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +[ init_squares::i#2 init_squares::i#1 ] +[ heap_head#12 heap_head#1 ] +[ malloc::size#3 ] +[ SCREEN_DIST#0 ] +[ SCREEN_ANGLE#0 ] +[ init_angle_screen::screen#0 ] +[ doplasma::sin_x#0 ] +[ doplasma::sin_y#0 ] +[ doplasma::$2 ] +[ make_plasma_charset::$2 ] +[ make_plasma_charset::s#0 ] +[ sid_rnd::return#2 ] +[ make_plasma_charset::$3 ] +[ make_plasma_charset::$4 ] +[ make_plasma_charset::$8 ] +[ make_plasma_charset::$9 ] +[ make_plasma_charset::$16 ] +[ make_plasma_charset::$11 ] +[ sid_rnd::return#0 ] +[ init_angle_screen::$2 ] +[ init_angle_screen::$3 ] +[ init_angle_screen::xw#0 ] +[ init_angle_screen::$6 ] +[ init_angle_screen::yw#0 ] +[ atan2_16::x#0 ] +[ atan2_16::y#0 ] +[ atan2_16::return#2 ] +[ init_angle_screen::angle_w#0 ] +[ init_angle_screen::$10 ] +[ init_angle_screen::ang_w#0 ] +[ init_angle_screen::$12 ] +[ init_angle_screen::$13 ] +[ init_angle_screen::$14 ] +[ atan2_16::$24 ] +[ atan2_16::$23 ] +[ init_dist_screen::y2#0 ] +[ sqr::return#2 ] +[ init_dist_screen::yds#0 ] +[ init_dist_screen::x2#0 ] +[ sqr::return#3 ] +[ init_dist_screen::xds#0 ] +[ init_dist_screen::ds#0 ] +[ sqrt::val#0 ] +[ sqrt::return#2 ] +[ init_dist_screen::d#0 ] +[ bsearch16u::key#0 ] +[ bsearch16u::return#3 ] +[ sqrt::found#0 ] +[ sqrt::$3 ] +[ sqrt::$1 ] +[ sqrt::return#0 ] +[ bsearch16u::$6 ] +[ bsearch16u::$16 ] +[ bsearch16u::pivot#0 ] +[ bsearch16u::result#0 ] +[ sqr::$0 ] +[ sqr::return#0 ] +[ SQUARES#1 ] +[ init_squares::$3 ] +[ init_squares::$4 ] +[ malloc::mem#0 ] +Allocated zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +Allocated zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +Allocated zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] +Allocated zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] +Allocated zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +Allocated zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] +Allocated zp ZP_BYTE:11 [ doplasma::x#2 doplasma::x#1 ] +Allocated zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ] +Allocated zp ZP_WORD:14 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] +Allocated zp ZP_WORD:16 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] +Allocated zp ZP_BYTE:18 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +Allocated zp ZP_BYTE:19 [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] +Allocated zp ZP_BYTE:20 [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] +Allocated zp ZP_WORD:21 [ print_cls::sc#2 print_cls::sc#1 ] +Allocated zp ZP_BYTE:23 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Allocated zp ZP_WORD:24 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] +Allocated zp ZP_WORD:26 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +Allocated zp ZP_BYTE:28 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Allocated zp ZP_BYTE:29 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Allocated zp ZP_WORD:30 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +Allocated zp ZP_WORD:32 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated zp ZP_BYTE:34 [ atan2_16::i#2 atan2_16::i#1 ] +Allocated zp ZP_WORD:35 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] +Allocated zp ZP_WORD:37 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] +Allocated zp ZP_BYTE:39 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Allocated zp ZP_WORD:40 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated zp ZP_WORD:42 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated zp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Allocated zp ZP_WORD:45 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] +Allocated zp ZP_WORD:47 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] +Allocated zp ZP_BYTE:49 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Allocated zp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Allocated zp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Allocated zp ZP_BYTE:52 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] +Allocated zp ZP_WORD:53 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] +Allocated zp ZP_BYTE:55 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Allocated zp ZP_BYTE:56 [ sqr::val#2 sqr::val#0 sqr::val#1 ] +Allocated zp ZP_WORD:57 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp ZP_WORD:59 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +Allocated zp ZP_BYTE:61 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp ZP_WORD:62 [ heap_head#12 heap_head#1 ] +Allocated zp ZP_WORD:64 [ malloc::size#3 ] +Allocated zp ZP_WORD:66 [ SCREEN_DIST#0 ] +Allocated zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] +Allocated zp ZP_WORD:70 [ init_angle_screen::screen#0 ] +Allocated zp ZP_WORD:72 [ doplasma::sin_x#0 ] +Allocated zp ZP_WORD:74 [ doplasma::sin_y#0 ] +Allocated zp ZP_BYTE:76 [ doplasma::$2 ] +Allocated zp ZP_BYTE:77 [ make_plasma_charset::$2 ] +Allocated zp ZP_BYTE:78 [ make_plasma_charset::s#0 ] +Allocated zp ZP_BYTE:79 [ sid_rnd::return#2 ] +Allocated zp ZP_BYTE:80 [ make_plasma_charset::$3 ] +Allocated zp ZP_BYTE:81 [ make_plasma_charset::$4 ] +Allocated zp ZP_WORD:82 [ make_plasma_charset::$8 ] +Allocated zp ZP_WORD:84 [ make_plasma_charset::$9 ] +Allocated zp ZP_WORD:86 [ make_plasma_charset::$16 ] +Allocated zp ZP_BYTE:88 [ make_plasma_charset::$11 ] +Allocated zp ZP_BYTE:89 [ sid_rnd::return#0 ] +Allocated zp ZP_BYTE:90 [ init_angle_screen::$2 ] +Allocated zp ZP_BYTE:91 [ init_angle_screen::$3 ] +Allocated zp ZP_WORD:92 [ init_angle_screen::xw#0 ] +Allocated zp ZP_BYTE:94 [ init_angle_screen::$6 ] +Allocated zp ZP_WORD:95 [ init_angle_screen::yw#0 ] +Allocated zp ZP_WORD:97 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:99 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:101 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:103 [ init_angle_screen::angle_w#0 ] +Allocated zp ZP_WORD:105 [ init_angle_screen::$10 ] +Allocated zp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] +Allocated zp ZP_BYTE:108 [ init_angle_screen::$12 ] +Allocated zp ZP_BYTE:109 [ init_angle_screen::$13 ] +Allocated zp ZP_BYTE:110 [ init_angle_screen::$14 ] +Allocated zp ZP_BYTE:111 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:112 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:113 [ init_dist_screen::y2#0 ] +Allocated zp ZP_WORD:114 [ sqr::return#2 ] +Allocated zp ZP_WORD:116 [ init_dist_screen::yds#0 ] +Allocated zp ZP_BYTE:118 [ init_dist_screen::x2#0 ] +Allocated zp ZP_WORD:119 [ sqr::return#3 ] +Allocated zp ZP_WORD:121 [ init_dist_screen::xds#0 ] +Allocated zp ZP_WORD:123 [ init_dist_screen::ds#0 ] +Allocated zp ZP_WORD:125 [ sqrt::val#0 ] +Allocated zp ZP_BYTE:127 [ sqrt::return#2 ] +Allocated zp ZP_BYTE:128 [ init_dist_screen::d#0 ] +Allocated zp ZP_WORD:129 [ bsearch16u::key#0 ] +Allocated zp ZP_WORD:131 [ bsearch16u::return#3 ] +Allocated zp ZP_WORD:133 [ sqrt::found#0 ] +Allocated zp ZP_WORD:135 [ sqrt::$3 ] +Allocated zp ZP_WORD:137 [ sqrt::$1 ] +Allocated zp ZP_BYTE:139 [ sqrt::return#0 ] +Allocated zp ZP_BYTE:140 [ bsearch16u::$6 ] +Allocated zp ZP_BYTE:141 [ bsearch16u::$16 ] +Allocated zp ZP_WORD:142 [ bsearch16u::pivot#0 ] +Allocated zp ZP_WORD:144 [ bsearch16u::result#0 ] +Allocated zp ZP_BYTE:146 [ sqr::$0 ] +Allocated zp ZP_WORD:147 [ sqr::return#0 ] +Allocated zp ZP_WORD:149 [ SQUARES#1 ] +Allocated zp ZP_BYTE:151 [ init_squares::$3 ] +Allocated zp ZP_BYTE:152 [ init_squares::$4 ] +Allocated zp ZP_WORD:153 [ malloc::mem#0 ] + +INITIAL ASM +//SEG0 File Comments +// Plasma based on the distance/angle to the screen center +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_WORD = 2 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + // Start of the heap used by malloc() + .label HEAP_START = $c000 + // The number of iterations performed during 16-bit CORDIC atan2 calculation + .const CORDIC_ITERATIONS_16 = $f + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + // Plasma charset + .label CHARSET = $2000 + // Plasma screen 1 + .label SCREEN1 = $2800 + // Plasma screen 2 + .label SCREEN2 = $2c00 + .const NUM_SQUARES = $30 + .label heap_head = $3e + .label SQUARES = $95 + .label print_char_cursor = $10 + // Screen containing distance to center + .label SCREEN_DIST = $42 + // Screen containing angle to center + .label SCREEN_ANGLE = $44 + .label sin_offset_x = 2 + .label sin_offset_y = 3 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call malloc +//SEG7 [255] phi from @1 to malloc [phi:@1->malloc] +malloc_from_b1: +//SEG8 [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 +//SEG9 [255] phi (byte*) heap_head#12 = (const byte*) HEAP_START#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + lda #HEAP_START + sta heap_head+1 + jsr malloc + jmp b3 +//SEG10 @3 +b3: +//SEG11 [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + lda malloc.mem + sta SCREEN_DIST + lda malloc.mem+1 + sta SCREEN_DIST+1 +//SEG12 [4] call malloc +//SEG13 [255] phi from @3 to malloc [phi:@3->malloc] +malloc_from_b3: +//SEG14 [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 +//SEG15 [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + jsr malloc + jmp b4 +//SEG16 @4 +b4: +//SEG17 [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + lda malloc.mem + sta SCREEN_ANGLE + lda malloc.mem+1 + sta SCREEN_ANGLE+1 +//SEG18 [6] phi from @4 to @2 [phi:@4->@2] +b2_from_b4: + jmp b2 +//SEG19 @2 +b2: +//SEG20 [7] call main + jsr main +//SEG21 [8] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG22 @end +bend: +//SEG23 main +main: { + .const toD0181_return = (>(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(SCREEN2&$3fff)*4)|(>CHARSET)/4&$f + //SEG24 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + lda SCREEN_DIST + sta init_dist_screen.screen + lda SCREEN_DIST+1 + sta init_dist_screen.screen+1 + //SEG25 [10] call init_dist_screen + //SEG26 [170] phi from main to init_dist_screen [phi:main->init_dist_screen] + init_dist_screen_from_main: + jsr init_dist_screen + jmp b5 + //SEG27 main::@5 + b5: + //SEG28 [11] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 + lda SCREEN_ANGLE + sta init_angle_screen.screen + lda SCREEN_ANGLE+1 + sta init_angle_screen.screen+1 + //SEG29 [12] call init_angle_screen + jsr init_angle_screen + //SEG30 [13] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + b6_from_b5: + jmp b6 + //SEG31 main::@6 + b6: + //SEG32 [14] call make_plasma_charset + //SEG33 [50] phi from main::@6 to make_plasma_charset [phi:main::@6->make_plasma_charset] + make_plasma_charset_from_b6: + jsr make_plasma_charset + //SEG34 [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7] + b7_from_b6: + jmp b7 + //SEG35 main::@7 + b7: + //SEG36 [16] call memset + //SEG37 [44] phi from main::@7 to memset [phi:main::@7->memset] + memset_from_b7: + jsr memset + //SEG38 [17] phi from main::@7 to main::@1 [phi:main::@7->main::@1] + b1_from_b7: + //SEG39 [17] phi (byte) sin_offset_y#14 = (byte) 0 [phi:main::@7->main::@1#0] -- vbuz1=vbuc1 + lda #0 + sta sin_offset_y + //SEG40 [17] phi (byte) sin_offset_x#14 = (byte) 0 [phi:main::@7->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta sin_offset_x + jmp b1 + // Show double-buffered plasma + //SEG41 main::@1 + b1: + //SEG42 [18] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + jmp b2 + //SEG43 main::@2 + b2: + //SEG44 [19] call doplasma + //SEG45 [25] phi from main::@2 to doplasma [phi:main::@2->doplasma] + doplasma_from_b2: + //SEG46 [25] phi (byte*) doplasma::screen#6 = (const byte*) SCREEN1#0 [phi:main::@2->doplasma#0] -- pbuz1=pbuc1 + lda #SCREEN1 + sta doplasma.screen+1 + //SEG47 [25] phi (byte) sin_offset_y#10 = (byte) sin_offset_y#14 [phi:main::@2->doplasma#1] -- register_copy + //SEG48 [25] phi (byte) sin_offset_x#10 = (byte) sin_offset_x#14 [phi:main::@2->doplasma#2] -- register_copy + jsr doplasma + //SEG49 [20] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181] + toD0181_from_b2: + jmp toD0181 + //SEG50 main::toD0181 + toD0181: + jmp b3 + //SEG51 main::@3 + b3: + //SEG52 [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG53 [22] call doplasma + //SEG54 [25] phi from main::@3 to doplasma [phi:main::@3->doplasma] + doplasma_from_b3: + //SEG55 [25] phi (byte*) doplasma::screen#6 = (const byte*) SCREEN2#0 [phi:main::@3->doplasma#0] -- pbuz1=pbuc1 + lda #SCREEN2 + sta doplasma.screen+1 + //SEG56 [25] phi (byte) sin_offset_y#10 = (byte) sin_offset_y#12 [phi:main::@3->doplasma#1] -- register_copy + //SEG57 [25] phi (byte) sin_offset_x#10 = (byte) sin_offset_x#12 [phi:main::@3->doplasma#2] -- register_copy + jsr doplasma + //SEG58 [23] phi from main::@3 to main::toD0182 [phi:main::@3->main::toD0182] + toD0182_from_b3: + jmp toD0182 + //SEG59 main::toD0182 + toD0182: + jmp b4 + //SEG60 main::@4 + b4: + //SEG61 [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0182_return + sta D018 + //SEG62 [17] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + b1_from_b4: + //SEG63 [17] phi (byte) sin_offset_y#14 = (byte) sin_offset_y#12 [phi:main::@4->main::@1#0] -- register_copy + //SEG64 [17] phi (byte) sin_offset_x#14 = (byte) sin_offset_x#12 [phi:main::@4->main::@1#1] -- register_copy + jmp b1 +} +//SEG65 doplasma +// Render plasma to the passed screen +// doplasma(byte* zeropage(8) screen) +doplasma: { + .label _2 = $4c + .label angle = 4 + .label dist = 6 + .label sin_x = $48 + .label sin_y = $4a + .label x = $b + .label screen = 8 + .label y = $a + //SEG66 [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 + lda SCREEN_ANGLE + sta angle + lda SCREEN_ANGLE+1 + sta angle+1 + //SEG67 [27] (byte*) doplasma::dist#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + lda SCREEN_DIST + sta dist + lda SCREEN_DIST+1 + sta dist+1 + //SEG68 [28] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 -- pbuz1=pbuc1_plus_vbuz2 + lda sin_offset_x + clc + adc #SINTABLE + adc #0 + sta sin_x+1 + //SEG69 [29] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 -- pbuz1=pbuc1_plus_vbuz2 + lda sin_offset_y + clc + adc #SINTABLE + adc #0 + sta sin_y+1 + //SEG70 [30] phi from doplasma to doplasma::@1 [phi:doplasma->doplasma::@1] + b1_from_doplasma: + //SEG71 [30] phi (byte) doplasma::y#4 = (byte) 0 [phi:doplasma->doplasma::@1#0] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG72 [30] phi (byte*) doplasma::screen#5 = (byte*) doplasma::screen#6 [phi:doplasma->doplasma::@1#1] -- register_copy + //SEG73 [30] phi (byte*) doplasma::dist#4 = (byte*) doplasma::dist#0 [phi:doplasma->doplasma::@1#2] -- register_copy + //SEG74 [30] phi (byte*) doplasma::angle#4 = (byte*) doplasma::angle#0 [phi:doplasma->doplasma::@1#3] -- register_copy + jmp b1 + //SEG75 [30] phi from doplasma::@3 to doplasma::@1 [phi:doplasma::@3->doplasma::@1] + b1_from_b3: + //SEG76 [30] phi (byte) doplasma::y#4 = (byte) doplasma::y#1 [phi:doplasma::@3->doplasma::@1#0] -- register_copy + //SEG77 [30] phi (byte*) doplasma::screen#5 = (byte*) doplasma::screen#2 [phi:doplasma::@3->doplasma::@1#1] -- register_copy + //SEG78 [30] phi (byte*) doplasma::dist#4 = (byte*) doplasma::dist#1 [phi:doplasma::@3->doplasma::@1#2] -- register_copy + //SEG79 [30] phi (byte*) doplasma::angle#4 = (byte*) doplasma::angle#1 [phi:doplasma::@3->doplasma::@1#3] -- register_copy + jmp b1 + //SEG80 doplasma::@1 + b1: + //SEG81 [31] phi from doplasma::@1 to doplasma::@2 [phi:doplasma::@1->doplasma::@2] + b2_from_b1: + //SEG82 [31] phi (byte) doplasma::x#2 = (byte) 0 [phi:doplasma::@1->doplasma::@2#0] -- vbuz1=vbuc1 + lda #0 + sta x + jmp b2 + //SEG83 [31] phi from doplasma::@2 to doplasma::@2 [phi:doplasma::@2->doplasma::@2] + b2_from_b2: + //SEG84 [31] phi (byte) doplasma::x#2 = (byte) doplasma::x#1 [phi:doplasma::@2->doplasma::@2#0] -- register_copy + jmp b2 + //SEG85 doplasma::@2 + b2: + //SEG86 [32] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) -- vbuz1=pbuz2_derefidx_pbuz3_derefidx_vbuz4_plus_pbuz5_derefidx_pbuz6_derefidx_vbuz4 + ldy x + lda (dist),y + sta $ff + lda (angle),y + tay + lda (sin_x),y + ldy $ff + clc + adc (sin_y),y + sta _2 + //SEG87 [33] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _2 + ldy x + sta (screen),y + //SEG88 [34] (byte) doplasma::x#1 ← ++ (byte) doplasma::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG89 [35] if((byte) doplasma::x#1!=(byte) $28) goto doplasma::@2 -- vbuz1_neq_vbuc1_then_la1 + lda #$28 + cmp x + bne b2_from_b2 + jmp b3 + //SEG90 doplasma::@3 + b3: + //SEG91 [36] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen + sta screen + bcc !+ + inc screen+1 + !: + //SEG92 [37] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc angle + sta angle + bcc !+ + inc angle+1 + !: + //SEG93 [38] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc dist + sta dist + bcc !+ + inc dist+1 + !: + //SEG94 [39] (byte) doplasma::y#1 ← ++ (byte) doplasma::y#4 -- vbuz1=_inc_vbuz1 + inc y + //SEG95 [40] if((byte) doplasma::y#1!=(byte) $1a) goto doplasma::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$1a + cmp y + bne b1_from_b3 + jmp b4 + //SEG96 doplasma::@4 + b4: + //SEG97 [41] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 -- vbuz1=vbuz1_minus_vbuc1 + lax sin_offset_x + axs #3 + stx sin_offset_x + //SEG98 [42] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 -- vbuz1=vbuz1_minus_vbuc1 + lax sin_offset_y + axs #7 + stx sin_offset_y + jmp breturn + //SEG99 doplasma::@return + breturn: + //SEG100 [43] return + rts +} +//SEG101 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .const num = $3e8 + .label str = COLS + .label end = str+num + .label dst = $c + //SEG102 [45] phi from memset to memset::@1 [phi:memset->memset::@1] + b1_from_memset: + //SEG103 [45] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + lda #str + sta dst+1 + jmp b1 + //SEG104 [45] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1] + b1_from_b1: + //SEG105 [45] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy + jmp b1 + //SEG106 memset::@1 + b1: + //SEG107 [46] *((byte*) memset::dst#2) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + lda #BLACK + ldy #0 + sta (dst),y + //SEG108 [47] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG109 [48] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 + lda dst+1 + cmp #>end + bne b1_from_b1 + lda dst + cmp #make_plasma_charset::@10] + b10_from_make_plasma_charset: + jmp b10 + //SEG115 make_plasma_charset::@10 + b10: + //SEG116 [53] call print_cls + //SEG117 [87] phi from make_plasma_charset::@10 to print_cls [phi:make_plasma_charset::@10->print_cls] + print_cls_from_b10: + jsr print_cls + //SEG118 [54] phi from make_plasma_charset::@10 to make_plasma_charset::@1 [phi:make_plasma_charset::@10->make_plasma_charset::@1] + b1_from_b10: + //SEG119 [54] phi (byte*) print_char_cursor#49 = (const byte*) print_line_cursor#0 [phi:make_plasma_charset::@10->make_plasma_charset::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta print_char_cursor+1 + //SEG120 [54] phi (word) make_plasma_charset::c#2 = (byte) 0 [phi:make_plasma_charset::@10->make_plasma_charset::@1#1] -- vwuz1=vbuc1 + lda #0 + sta c + lda #0 + sta c+1 + jmp b1 + //SEG121 [54] phi from make_plasma_charset::@9 to make_plasma_charset::@1 [phi:make_plasma_charset::@9->make_plasma_charset::@1] + b1_from_b9: + //SEG122 [54] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#18 [phi:make_plasma_charset::@9->make_plasma_charset::@1#0] -- register_copy + //SEG123 [54] phi (word) make_plasma_charset::c#2 = (word) make_plasma_charset::c#1 [phi:make_plasma_charset::@9->make_plasma_charset::@1#1] -- register_copy + jmp b1 + //SEG124 make_plasma_charset::@1 + b1: + //SEG125 [55] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 -- vbuz1=_lo_vwuz2 + lda c + sta _2 + //SEG126 [56] (byte) make_plasma_charset::s#0 ← *((const byte[$200]) SINTABLE#0 + (byte~) make_plasma_charset::$2) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy _2 + lda SINTABLE,y + sta s + //SEG127 [57] phi from make_plasma_charset::@1 to make_plasma_charset::@2 [phi:make_plasma_charset::@1->make_plasma_charset::@2] + b2_from_b1: + //SEG128 [57] phi (byte) make_plasma_charset::i#7 = (byte) 0 [phi:make_plasma_charset::@1->make_plasma_charset::@2#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b2 + //SEG129 [57] phi from make_plasma_charset::@6 to make_plasma_charset::@2 [phi:make_plasma_charset::@6->make_plasma_charset::@2] + b2_from_b6: + //SEG130 [57] phi (byte) make_plasma_charset::i#7 = (byte) make_plasma_charset::i#1 [phi:make_plasma_charset::@6->make_plasma_charset::@2#0] -- register_copy + jmp b2 + //SEG131 make_plasma_charset::@2 + b2: + //SEG132 [58] phi from make_plasma_charset::@2 to make_plasma_charset::@3 [phi:make_plasma_charset::@2->make_plasma_charset::@3] + b3_from_b2: + //SEG133 [58] phi (byte) make_plasma_charset::b#2 = (byte) 0 [phi:make_plasma_charset::@2->make_plasma_charset::@3#0] -- vbuz1=vbuc1 + lda #0 + sta b + //SEG134 [58] phi (byte) make_plasma_charset::ii#2 = (byte) 0 [phi:make_plasma_charset::@2->make_plasma_charset::@3#1] -- vbuz1=vbuc1 + lda #0 + sta ii + jmp b3 + //SEG135 [58] phi from make_plasma_charset::@4 to make_plasma_charset::@3 [phi:make_plasma_charset::@4->make_plasma_charset::@3] + b3_from_b4: + //SEG136 [58] phi (byte) make_plasma_charset::b#2 = (byte) make_plasma_charset::b#3 [phi:make_plasma_charset::@4->make_plasma_charset::@3#0] -- register_copy + //SEG137 [58] phi (byte) make_plasma_charset::ii#2 = (byte) make_plasma_charset::ii#1 [phi:make_plasma_charset::@4->make_plasma_charset::@3#1] -- register_copy + jmp b3 + //SEG138 make_plasma_charset::@3 + b3: + //SEG139 [59] call sid_rnd + jsr sid_rnd + //SEG140 [60] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 -- vbuz1=vbuz2 + lda sid_rnd.return + sta sid_rnd.return_2 + jmp b11 + //SEG141 make_plasma_charset::@11 + b11: + //SEG142 [61] (byte~) make_plasma_charset::$3 ← (byte) sid_rnd::return#2 -- vbuz1=vbuz2 + lda sid_rnd.return_2 + sta _3 + //SEG143 [62] (byte~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (byte) $ff -- vbuz1=vbuz2_band_vbuc1 + lda #$ff + and _3 + sta _4 + //SEG144 [63] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@4 -- vbuz1_le_vbuz2_then_la1 + lda s + cmp _4 + bcs b4_from_b11 + jmp b5 + //SEG145 make_plasma_charset::@5 + b5: + //SEG146 [64] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) -- vbuz1=vbuz1_bor_pbuc1_derefidx_vbuz2 + lda b + ldy ii + ora bittab,y + sta b + //SEG147 [65] phi from make_plasma_charset::@11 make_plasma_charset::@5 to make_plasma_charset::@4 [phi:make_plasma_charset::@11/make_plasma_charset::@5->make_plasma_charset::@4] + b4_from_b11: + b4_from_b5: + //SEG148 [65] phi (byte) make_plasma_charset::b#3 = (byte) make_plasma_charset::b#2 [phi:make_plasma_charset::@11/make_plasma_charset::@5->make_plasma_charset::@4#0] -- register_copy + jmp b4 + //SEG149 make_plasma_charset::@4 + b4: + //SEG150 [66] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 -- vbuz1=_inc_vbuz1 + inc ii + //SEG151 [67] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 -- vbuz1_lt_vbuc1_then_la1 + lda ii + cmp #8 + bcc b3_from_b4 + jmp b6 + //SEG152 make_plasma_charset::@6 + b6: + //SEG153 [68] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG154 [69] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 -- vwuz1=vwuz2_plus_vbuz3 + lda i + clc + adc _8 + sta _9 + lda #0 + adc _8+1 + sta _9+1 + //SEG155 [70] (byte*~) make_plasma_charset::$16 ← (const byte*) CHARSET#0 + (word~) make_plasma_charset::$9 -- pbuz1=pbuc1_plus_vwuz2 + lda _9 + clc + adc #CHARSET + sta _16+1 + //SEG156 [71] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 -- _deref_pbuz1=vbuz2 + lda b + ldy #0 + sta (_16),y + //SEG157 [72] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#7 -- vbuz1=_inc_vbuz1 + inc i + //SEG158 [73] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #8 + bcc b2_from_b6 + jmp b7 + //SEG159 make_plasma_charset::@7 + b7: + //SEG160 [74] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 -- vbuz1=vwuz2_band_vbuc1 + lda c + and #7 + sta _11 + //SEG161 [75] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 -- vbuz1_neq_0_then_la1 + lda _11 + cmp #0 + bne b9_from_b7 + //SEG162 [76] phi from make_plasma_charset::@7 to make_plasma_charset::@8 [phi:make_plasma_charset::@7->make_plasma_charset::@8] + b8_from_b7: + jmp b8 + //SEG163 make_plasma_charset::@8 + b8: + //SEG164 [77] call print_char + jsr print_char + //SEG165 [78] phi from make_plasma_charset::@7 make_plasma_charset::@8 to make_plasma_charset::@9 [phi:make_plasma_charset::@7/make_plasma_charset::@8->make_plasma_charset::@9] + b9_from_b7: + b9_from_b8: + //SEG166 [78] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#49 [phi:make_plasma_charset::@7/make_plasma_charset::@8->make_plasma_charset::@9#0] -- register_copy + jmp b9 + //SEG167 make_plasma_charset::@9 + b9: + //SEG168 [79] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2 -- vwuz1=_inc_vwuz1 + inc c + bne !+ + inc c+1 + !: + //SEG169 [80] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 -- vwuz1_lt_vwuc1_then_la1 + lda c+1 + cmp #>$100 + bcc b1_from_b9 + bne !+ + lda c + cmp #<$100 + bcc b1_from_b9 + !: + jmp breturn + //SEG170 make_plasma_charset::@return + breturn: + //SEG171 [81] return + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +//SEG172 print_char +// Print a single char +print_char: { + .const ch = '.' + //SEG173 [82] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 -- _deref_pbuz1=vbuc1 + lda #ch + ldy #0 + sta (print_char_cursor),y + //SEG174 [83] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#49 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + jmp breturn + //SEG175 print_char::@return + breturn: + //SEG176 [84] return + rts +} +//SEG177 sid_rnd +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + .label return = $59 + .label return_2 = $4f + //SEG178 [85] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 + lda SID_VOICE3_OSC + sta return + jmp breturn + //SEG179 sid_rnd::@return + breturn: + //SEG180 [86] return + rts +} +//SEG181 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = $15 + //SEG182 [88] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + b1_from_print_cls: + //SEG183 [88] phi (byte*) print_cls::sc#2 = (const byte*) print_line_cursor#0 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta sc+1 + jmp b1 + //SEG184 [88] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + b1_from_b1: + //SEG185 [88] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + jmp b1 + //SEG186 print_cls::@1 + b1: + //SEG187 [89] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG188 [90] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG189 [91] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1_from_b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + //SEG194 [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + jmp breturn + //SEG195 sid_rnd_init::@return + breturn: + //SEG196 [95] return + rts +} +//SEG197 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($46) screen) +init_angle_screen: { + .label _2 = $5a + .label _3 = $5b + .label _6 = $5e + .label _10 = $69 + .label _12 = $6c + .label _13 = $6d + .label _14 = $6e + .label screen = $46 + .label screen_topline = $1a + .label screen_bottomline = $18 + .label xw = $5c + .label yw = $5f + .label angle_w = $67 + .label ang_w = $6b + .label x = $1c + .label xb = $1d + .label y = $17 + //SEG198 [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$c + sta screen_topline + lda screen+1 + adc #>$28*$c + sta screen_topline+1 + //SEG199 [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$c + sta screen_bottomline + lda screen+1 + adc #>$28*$c + sta screen_bottomline+1 + //SEG200 [98] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + b1_from_init_angle_screen: + //SEG201 [98] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- register_copy + //SEG202 [98] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#0 [phi:init_angle_screen->init_angle_screen::@1#1] -- register_copy + //SEG203 [98] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 + sta y + jmp b1 + //SEG204 [98] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + b1_from_b3: + //SEG205 [98] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG206 [98] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG207 [98] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy + jmp b1 + //SEG208 init_angle_screen::@1 + b1: + //SEG209 [99] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + b2_from_b1: + //SEG210 [99] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG211 [99] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 + lda #0 + sta x + jmp b2 + //SEG212 [99] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + b2_from_b4: + //SEG213 [99] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy + //SEG214 [99] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + jmp b2 + //SEG215 init_angle_screen::@2 + b2: + //SEG216 [100] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda x + asl + sta _2 + //SEG217 [101] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuz1=vbuc1_minus_vbuz2 + lda #$27 + sec + sbc _2 + sta _3 + //SEG218 [102] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _3 + ldy #0 + sta xw+1 + sty xw + //SEG219 [103] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda y + asl + sta _6 + //SEG220 [104] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _6 + ldy #0 + sta yw+1 + sty yw + //SEG221 [105] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 -- vwsz1=vwsz2 + lda xw + sta atan2_16.x + lda xw+1 + sta atan2_16.x+1 + //SEG222 [106] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 -- vwsz1=vwsz2 + lda yw + sta atan2_16.y + lda yw+1 + sta atan2_16.y+1 + //SEG223 [107] call atan2_16 + jsr atan2_16 + //SEG224 [108] (word) atan2_16::return#2 ← (word) atan2_16::return#0 -- vwuz1=vwuz2 + lda atan2_16.return + sta atan2_16.return_2 + lda atan2_16.return+1 + sta atan2_16.return_2+1 + jmp b4 + //SEG225 init_angle_screen::@4 + b4: + //SEG226 [109] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 -- vwuz1=vwuz2 + lda atan2_16.return_2 + sta angle_w + lda atan2_16.return_2+1 + sta angle_w+1 + //SEG227 [110] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz2_plus_vbuc1 + lda #$80 + clc + adc angle_w + sta _10 + lda #0 + adc angle_w+1 + sta _10+1 + //SEG228 [111] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG229 [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + ldy xb + sta (screen_bottomline),y + //SEG230 [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuz1=_neg_vbuz2 + lda ang_w + eor #$ff + clc + adc #1 + sta _12 + //SEG231 [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _12 + ldy xb + sta (screen_topline),y + //SEG232 [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_plus_vbuz2 + lax ang_w + axs #-[$80] + stx _13 + //SEG233 [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _13 + ldy x + sta (screen_topline),y + //SEG234 [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_minus_vbuz2 + lda #$80 + sec + sbc ang_w + sta _14 + //SEG235 [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _14 + ldy x + sta (screen_bottomline),y + //SEG236 [119] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG237 [120] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG238 [121] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b2_from_b4 + jmp b3 + //SEG239 init_angle_screen::@3 + b3: + //SEG240 [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG241 [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG242 [124] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 + inc y + //SEG243 [125] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1_from_b3 + jmp breturn + //SEG244 init_angle_screen::@return + breturn: + //SEG245 [126] return + rts +} +//SEG246 atan2_16 +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($61) x, signed word zeropage($63) y) +atan2_16: { + .label _2 = $1e + .label _7 = $20 + .label _23 = $70 + .label _24 = $6f + .label yi = $1e + .label xi = $20 + .label angle = $25 + .label xd = $2a + .label yd = $28 + .label shift = $27 + .label angle_2 = $23 + .label angle_3 = $23 + .label i = $22 + .label return = $25 + .label x = $61 + .label y = $63 + .label return_2 = $65 + .label angle_6 = $23 + .label angle_12 = $23 + .label angle_13 = $23 + //SEG247 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b1 + jmp b2 + //SEG248 atan2_16::@2 + b2: + //SEG249 [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc y + sta _2 + lda #0 + sbc y+1 + sta _2+1 + //SEG250 [129] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + b3_from_b1: + b3_from_b2: + //SEG251 [129] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + jmp b3 + //SEG252 atan2_16::@3 + b3: + //SEG253 [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b4 + jmp b5 + //SEG254 atan2_16::@5 + b5: + //SEG255 [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + //SEG256 [132] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + b6_from_b4: + b6_from_b5: + //SEG257 [132] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + jmp b6 + //SEG258 atan2_16::@6 + b6: + //SEG259 [133] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + b10_from_b6: + //SEG260 [133] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + lda #0 + sta angle_12 + lda #0 + sta angle_12+1 + //SEG261 [133] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG262 [133] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy + //SEG263 [133] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG264 atan2_16::@10 + b10: + //SEG265 [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + lda yi+1 + bne b11 + lda yi + bne b11 + //SEG266 [135] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + b12_from_b10: + b12_from_b19: + //SEG267 [135] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy + jmp b12 + //SEG268 atan2_16::@12 + b12: + //SEG269 [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + lda angle_6+1 + lsr + sta angle+1 + lda angle_6 + ror + sta angle + //SEG270 [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b7_from_b12 + jmp b21 + //SEG271 atan2_16::@21 + b21: + //SEG272 [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + //SEG273 [139] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + b7_from_b12: + b7_from_b21: + //SEG274 [139] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy + jmp b7 + //SEG275 atan2_16::@7 + b7: + //SEG276 [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b8_from_b7 + jmp b9 + //SEG277 atan2_16::@9 + b9: + //SEG278 [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + sec + lda #0 + sbc angle + sta angle + lda #0 + sbc angle+1 + sta angle+1 + //SEG279 [142] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + b8_from_b7: + b8_from_b9: + //SEG280 [142] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + jmp b8 + //SEG281 atan2_16::@8 + b8: + jmp breturn + //SEG282 atan2_16::@return + breturn: + //SEG283 [143] return + rts + //SEG284 atan2_16::@11 + b11: + //SEG285 [144] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuz1=vbuz2 + lda i + sta shift + //SEG286 [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 + lda xi + sta xd + lda xi+1 + sta xd+1 + //SEG287 [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 + lda yi + sta yd + lda yi+1 + sta yd+1 + //SEG288 [147] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG289 [147] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG290 [147] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //SEG291 [147] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy + jmp b13 + //SEG292 atan2_16::@13 + b13: + //SEG293 [148] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 + lda shift + cmp #2 + bcs b14 + jmp b15 + //SEG294 atan2_16::@15 + b15: + //SEG295 [149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp shift + beq b17_from_b15 + jmp b16 + //SEG296 atan2_16::@16 + b16: + //SEG297 [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG298 [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG299 [152] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG300 [152] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG301 [152] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG302 atan2_16::@17 + b17: + //SEG303 [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 + lda yi+1 + bpl b18 + jmp b20 + //SEG304 atan2_16::@20 + b20: + //SEG305 [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + //SEG306 [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda yi + clc + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + //SEG307 [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda i + asl + sta _24 + //SEG308 [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 + ldy _24 + sec + lda angle_3 + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle_3 + lda angle_3+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle_3+1 + //SEG309 [158] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG310 [158] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG311 [158] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG312 [158] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG313 atan2_16::@19 + b19: + //SEG314 [159] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG315 [160] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 + lda #CORDIC_ITERATIONS_16-1+1 + cmp i + beq b12_from_b19 + //SEG316 [133] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG317 [133] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG318 [133] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG319 [133] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG320 [133] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG321 atan2_16::@18 + b18: + //SEG322 [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda xi + clc + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + //SEG323 [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 + //SEG324 [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda i + asl + sta _23 + //SEG325 [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 + ldy _23 + clc + lda angle_2 + adc CORDIC_ATAN2_ANGLES_16,y + sta angle_2 + lda angle_2+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle_2+1 + jmp b19_from_b18 + //SEG326 atan2_16::@14 + b14: + //SEG327 [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG328 [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG329 [167] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuz1=vbuz1_minus_2 + dec shift + dec shift + jmp b13_from_b14 + //SEG330 atan2_16::@4 + b4: + //SEG331 [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6_from_b4 + //SEG332 atan2_16::@1 + b1: + //SEG333 [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + lda y + sta yi + lda y+1 + sta yi+1 + jmp b3_from_b1 +} +//SEG334 init_dist_screen +// Populates 1000 bytes (a screen) with values representing the distance to the center. +// The actual value stored is distance*2 to increase precision +// init_dist_screen(byte* zeropage($2d) screen) +init_dist_screen: { + .label _5 = $31 + .label _7 = $31 + .label _13 = $34 + .label _15 = $34 + .label screen = $2d + .label screen_bottomline = $2f + .label y2 = $71 + .label yd = $31 + .label yds = $74 + .label x2 = $76 + .label xd = $34 + .label xds = $79 + .label ds = $7b + .label d = $80 + .label x = $32 + .label xb = $33 + .label screen_topline = $2d + .label y = $2c + //SEG335 [171] call init_squares + //SEG336 [242] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + init_squares_from_init_dist_screen: + jsr init_squares + jmp b10 + //SEG337 init_dist_screen::@10 + b10: + //SEG338 [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$18 + sta screen_bottomline + lda screen+1 + adc #>$28*$18 + sta screen_bottomline+1 + //SEG339 [173] phi from init_dist_screen::@10 to init_dist_screen::@1 [phi:init_dist_screen::@10->init_dist_screen::@1] + b1_from_b10: + //SEG340 [173] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#0 [phi:init_dist_screen::@10->init_dist_screen::@1#0] -- register_copy + //SEG341 [173] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen#0 [phi:init_dist_screen::@10->init_dist_screen::@1#1] -- register_copy + //SEG342 [173] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@1#2] -- vbuz1=vbuc1 + lda #0 + sta y + jmp b1 + //SEG343 [173] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] + b1_from_b9: + //SEG344 [173] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy + //SEG345 [173] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy + //SEG346 [173] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + jmp b1 + //SEG347 init_dist_screen::@1 + b1: + //SEG348 [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda y + asl + sta y2 + //SEG349 [175] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuz1_ge_vbuc1_then_la1 + lda y2 + cmp #$18 + bcs b2 + jmp b3 + //SEG350 init_dist_screen::@3 + b3: + //SEG351 [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuz1=vbuc1_minus_vbuz2 + lda #$18 + sec + sbc y2 + sta _5 + //SEG352 [177] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] + b4_from_b2: + b4_from_b3: + //SEG353 [177] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy + jmp b4 + //SEG354 init_dist_screen::@4 + b4: + //SEG355 [178] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 -- vbuz1=vbuz2 + lda yd + sta sqr.val + //SEG356 [179] call sqr + //SEG357 [238] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + sqr_from_b4: + //SEG358 [238] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + jsr sqr + //SEG359 [180] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + lda sqr.return + sta sqr.return_2 + lda sqr.return+1 + sta sqr.return_2+1 + jmp b11 + //SEG360 init_dist_screen::@11 + b11: + //SEG361 [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 -- vwuz1=vwuz2 + lda sqr.return_2 + sta yds + lda sqr.return_2+1 + sta yds+1 + //SEG362 [182] phi from init_dist_screen::@11 to init_dist_screen::@5 [phi:init_dist_screen::@11->init_dist_screen::@5] + b5_from_b11: + //SEG363 [182] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@11->init_dist_screen::@5#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG364 [182] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@11->init_dist_screen::@5#1] -- vbuz1=vbuc1 + lda #0 + sta x + jmp b5 + //SEG365 [182] phi from init_dist_screen::@13 to init_dist_screen::@5 [phi:init_dist_screen::@13->init_dist_screen::@5] + b5_from_b13: + //SEG366 [182] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@13->init_dist_screen::@5#0] -- register_copy + //SEG367 [182] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@13->init_dist_screen::@5#1] -- register_copy + jmp b5 + //SEG368 init_dist_screen::@5 + b5: + //SEG369 [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda x + asl + sta x2 + //SEG370 [184] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuz1_ge_vbuc1_then_la1 + lda x2 + cmp #$27 + bcs b6 + jmp b7 + //SEG371 init_dist_screen::@7 + b7: + //SEG372 [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuz1=vbuc1_minus_vbuz2 + lda #$27 + sec + sbc x2 + sta _13 + //SEG373 [186] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] + b8_from_b6: + b8_from_b7: + //SEG374 [186] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy + jmp b8 + //SEG375 init_dist_screen::@8 + b8: + //SEG376 [187] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 -- vbuz1=vbuz2 + lda xd + sta sqr.val + //SEG377 [188] call sqr + //SEG378 [238] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + sqr_from_b8: + //SEG379 [238] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + jsr sqr + //SEG380 [189] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 + lda sqr.return + sta sqr.return_3 + lda sqr.return+1 + sta sqr.return_3+1 + jmp b12 + //SEG381 init_dist_screen::@12 + b12: + //SEG382 [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 -- vwuz1=vwuz2 + lda sqr.return_3 + sta xds + lda sqr.return_3+1 + sta xds+1 + //SEG383 [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz2_plus_vwuz3 + lda xds + clc + adc yds + sta ds + lda xds+1 + adc yds+1 + sta ds+1 + //SEG384 [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 -- vwuz1=vwuz2 + lda ds + sta sqrt.val + lda ds+1 + sta sqrt.val+1 + //SEG385 [193] call sqrt + jsr sqrt + //SEG386 [194] (byte) sqrt::return#2 ← (byte) sqrt::return#0 -- vbuz1=vbuz2 + lda sqrt.return + sta sqrt.return_2 + jmp b13 + //SEG387 init_dist_screen::@13 + b13: + //SEG388 [195] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 -- vbuz1=vbuz2 + lda sqrt.return_2 + sta d + //SEG389 [196] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda d + ldy x + sta (screen_topline),y + //SEG390 [197] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda d + ldy x + sta (screen_bottomline),y + //SEG391 [198] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda d + ldy xb + sta (screen_topline),y + //SEG392 [199] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda d + ldy xb + sta (screen_bottomline),y + //SEG393 [200] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG394 [201] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG395 [202] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b5_from_b13 + jmp b9 + //SEG396 init_dist_screen::@9 + b9: + //SEG397 [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 + !: + //SEG398 [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_bottomline + sec + sbc #<$28 + sta screen_bottomline + lda screen_bottomline+1 + sbc #>$28 + sta screen_bottomline+1 + //SEG399 [205] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + inc y + //SEG400 [206] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1_from_b9 + jmp breturn + //SEG401 init_dist_screen::@return + breturn: + //SEG402 [207] return + rts + //SEG403 init_dist_screen::@6 + b6: + //SEG404 [208] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuz1=vbuz2_minus_vbuc1 + lax x2 + axs #$27 + stx _15 + jmp b8_from_b6 + //SEG405 init_dist_screen::@2 + b2: + //SEG406 [209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuz1=vbuz2_minus_vbuc1 + lax y2 + axs #$18 + stx _7 + jmp b4_from_b2 +} +//SEG407 sqrt +// Find the (integer) square root of a word value +// If the square is not an integer then it returns the largest integer N where N*N <= val +// Uses a table of squares that must be initialized by calling init_squares() +// sqrt(word zeropage($7d) val) +sqrt: { + .label _1 = $89 + .label _3 = $87 + .label found = $85 + .label return = $8b + .label val = $7d + .label return_2 = $7f + //SEG408 [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 + lda val + sta bsearch16u.key + lda val+1 + sta bsearch16u.key+1 + //SEG409 [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + lda SQUARES + sta bsearch16u.items + lda SQUARES+1 + sta bsearch16u.items+1 + //SEG410 [212] call bsearch16u + //SEG411 [219] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + bsearch16u_from_sqrt: + jsr bsearch16u + //SEG412 [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 -- pwuz1=pwuz2 + lda bsearch16u.return + sta bsearch16u.return_3 + lda bsearch16u.return+1 + sta bsearch16u.return_3+1 + jmp b1 + //SEG413 sqrt::@1 + b1: + //SEG414 [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 -- pwuz1=pwuz2 + lda bsearch16u.return_3 + sta found + lda bsearch16u.return_3+1 + sta found+1 + //SEG415 [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 -- vwuz1=pwuz2_minus_pwuz3 + lda found + sec + sbc SQUARES + sta _3 + lda found+1 + sbc SQUARES+1 + sta _3+1 + //SEG416 [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + lda _3+1 + lsr + sta _1+1 + lda _3 + ror + sta _1 + //SEG417 [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuz1=_byte_vwuz2 + lda _1 + sta return + jmp breturn + //SEG418 sqrt::@return + breturn: + //SEG419 [218] return + rts +} +//SEG420 bsearch16u +// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. +// - key - The value to look for +// - items - Pointer to the start of the array to search in +// - num - The number of items in the array +// Returns pointer to an entry in the array that matches the search key +// bsearch16u(word zeropage($81) key, word* zeropage($35) items, byte zeropage($37) num) +bsearch16u: { + .label _2 = $35 + .label _6 = $8c + .label _16 = $8d + .label pivot = $8e + .label result = $90 + .label return = $35 + .label num = $37 + .label items = $35 + .label key = $81 + .label return_3 = $83 + //SEG421 [220] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + b3_from_bsearch16u: + //SEG422 [220] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy + //SEG423 [220] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 + lda #NUM_SQUARES + sta num + jmp b3 + //SEG424 bsearch16u::@3 + b3: + //SEG425 [221] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 + lda num + bne b4 + jmp b5 + //SEG426 bsearch16u::@5 + b5: + //SEG427 [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq b2_from_b5 + !: + bcc b2_from_b5 + jmp b1 + //SEG428 bsearch16u::@1 + b1: + //SEG429 [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + //SEG430 [224] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + b2_from_b1: + b2_from_b5: + //SEG431 [224] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + jmp b2 + //SEG432 bsearch16u::@2 + b2: + //SEG433 [225] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + breturn_from_b2: + breturn_from_b8: + //SEG434 [225] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + jmp breturn + //SEG435 bsearch16u::@return + breturn: + //SEG436 [226] return + rts + //SEG437 bsearch16u::@4 + b4: + //SEG438 [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + lda num + lsr + sta _6 + //SEG439 [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda _6 + asl + sta _16 + //SEG440 [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 + lda _16 + clc + adc items + sta pivot + lda #0 + adc items+1 + sta pivot+1 + //SEG441 [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + //SEG442 [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + jmp b8 + //SEG443 bsearch16u::@8 + b8: + //SEG444 [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + lda pivot + sta return + lda pivot+1 + sta return+1 + jmp breturn_from_b8 + //SEG445 bsearch16u::@6 + b6: + //SEG446 [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b7_from_b6 + bne !+ + lda result + beq b7_from_b6 + !: + jmp b9 + //SEG447 bsearch16u::@9 + b9: + //SEG448 [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc pivot + sta items + lda #0 + adc pivot+1 + sta items+1 + //SEG449 [235] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 + dec num + //SEG450 [236] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + b7_from_b6: + b7_from_b9: + //SEG451 [236] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG452 [236] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + jmp b7 + //SEG453 bsearch16u::@7 + b7: + //SEG454 [237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr num + //SEG455 [220] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + b3_from_b7: + //SEG456 [220] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG457 [220] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + jmp b3 +} +//SEG458 sqr +// Find the square of a byte value +// Uses a table of squares that must be initialized by calling init_squares() +// sqr(byte zeropage($38) val) +sqr: { + .label _0 = $92 + .label return = $93 + .label val = $38 + .label return_2 = $72 + .label return_3 = $77 + //SEG459 [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda val + asl + sta _0 + //SEG460 [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuz3 + ldy _0 + lda (SQUARES),y + sta return + iny + lda (SQUARES),y + sta return+1 + jmp breturn + //SEG461 sqr::@return + breturn: + //SEG462 [241] return + rts +} +//SEG463 init_squares +// Initialize squares table +// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 +init_squares: { + .label _3 = $97 + .label _4 = $98 + .label squares = $3b + .label sqr = $39 + .label i = $3d + //SEG464 [243] call malloc + //SEG465 [255] phi from init_squares to malloc [phi:init_squares->malloc] + malloc_from_init_squares: + //SEG466 [255] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + lda #NUM_SQUARES*SIZEOF_WORD + sta malloc.size + lda #0 + sta malloc.size+1 + //SEG467 [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + jsr malloc + jmp b2 + //SEG468 init_squares::@2 + b2: + //SEG469 [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + lda malloc.mem + sta SQUARES + lda malloc.mem+1 + sta SQUARES+1 + //SEG470 [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + lda SQUARES + sta squares + lda SQUARES+1 + sta squares+1 + //SEG471 [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + b1_from_b2: + //SEG472 [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG473 [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + //SEG474 [246] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + lda #0 + sta sqr + lda #0 + sta sqr+1 + jmp b1 + //SEG475 [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + b1_from_b1: + //SEG476 [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG477 [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG478 [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + jmp b1 + //SEG479 init_squares::@1 + b1: + //SEG480 [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + ldy #0 + lda sqr + sta (squares),y + iny + lda sqr+1 + sta (squares),y + //SEG481 [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #SIZEOF_WORD + clc + adc squares + sta squares + bcc !+ + inc squares+1 + !: + //SEG482 [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + lda i + asl + sta _3 + //SEG483 [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + ldy _3 + iny + sty _4 + //SEG484 [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + lda _4 + clc + adc sqr + sta sqr + bcc !+ + inc sqr+1 + !: + //SEG485 [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG486 [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #NUM_SQUARES-1+1 + cmp i + bne b1_from_b1 + jmp breturn + //SEG487 init_squares::@return + breturn: + //SEG488 [254] return + rts +} +//SEG489 malloc +// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. +// The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. +// malloc(word zeropage($40) size) +malloc: { + .label mem = $99 + .label size = $40 + //SEG490 [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 -- pbuz1=pbuz2 + lda heap_head + sta mem + lda heap_head+1 + sta mem+1 + //SEG491 [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 -- pbuz1=pbuz1_plus_vwuz2 + lda heap_head + clc + adc size + sta heap_head + lda heap_head+1 + adc size+1 + sta heap_head+1 + jmp breturn + //SEG492 malloc::@return + breturn: + //SEG493 [258] return + rts +} +//SEG494 File Data + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] +Statement [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] +Statement [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte y +Statement [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ atan2_16::i#2 atan2_16::i#1 ] +Statement [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:39 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Statement [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a +Statement [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a +Statement [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a +Statement [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a +Statement [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a +Statement [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a +Statement [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a +Statement [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a +Statement [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a +Statement [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a +Statement [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a +Statement [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 [ init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Statement [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ) always clobbers reg byte a +Statement [180] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ) always clobbers reg byte a +Statement [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Statement [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ) always clobbers reg byte a +Statement [189] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ) always clobbers reg byte a +Statement [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 [ bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ SQUARES#1 bsearch16u::return#3 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES#1 sqrt::found#0 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::found#0 ] ) always clobbers reg byte a +Statement [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a +Statement [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a +Statement [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Statement [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:55 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Statement [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:55 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Statement [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:188 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:188 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:61 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:61 [ init_squares::i#2 init_squares::i#1 ] +Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 [ malloc::mem#0 heap_head#12 malloc::size#3 ] ( malloc:2 [ malloc::mem#0 heap_head#12 malloc::size#3 ] malloc:4 [ malloc::mem#0 heap_head#12 malloc::size#3 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#12 malloc::size#3 ] ) always clobbers reg byte a +Statement [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a +Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a +Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a +Statement [11] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen#0 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen#0 ] ) always clobbers reg byte a +Statement [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ) always clobbers reg byte a +Statement [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ) always clobbers reg byte a +Statement [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 ] ) always clobbers reg byte a +Statement [27] (byte*) doplasma::dist#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 ] ) always clobbers reg byte a +Statement [28] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 ] ) always clobbers reg byte a +Statement [29] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 doplasma::sin_y#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 doplasma::sin_y#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 doplasma::sin_y#0 ] ) always clobbers reg byte a +Statement [32] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 doplasma::$2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 doplasma::$2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 doplasma::$2 ] ) always clobbers reg byte a reg byte y +Statement [33] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 ] ) always clobbers reg byte y +Statement [36] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::y#4 doplasma::screen#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::y#4 doplasma::screen#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::y#4 doplasma::screen#2 ] ) always clobbers reg byte a +Statement [37] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::dist#4 doplasma::y#4 doplasma::angle#1 doplasma::screen#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::dist#4 doplasma::y#4 doplasma::angle#1 doplasma::screen#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::dist#4 doplasma::y#4 doplasma::angle#1 doplasma::screen#2 ] ) always clobbers reg byte a +Statement [38] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::y#4 doplasma::angle#1 doplasma::dist#1 doplasma::screen#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::y#4 doplasma::angle#1 doplasma::dist#1 doplasma::screen#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::y#4 doplasma::angle#1 doplasma::dist#1 doplasma::screen#2 ] ) always clobbers reg byte a +Statement [41] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#10 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#10 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#10 ] ) always clobbers reg byte a reg byte x +Statement [42] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ) always clobbers reg byte a reg byte x +Statement [46] *((byte*) memset::dst#2) ← (const byte) BLACK#0 [ memset::dst#2 ] ( main:7::memset:16 [ SCREEN_DIST#0 SCREEN_ANGLE#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [48] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:7::memset:16 [ SCREEN_DIST#0 SCREEN_ANGLE#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [55] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$2 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$2 ] ) always clobbers reg byte a +Statement [64] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::ii#2 make_plasma_charset::b#1 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::ii#2 make_plasma_charset::b#1 ] ) always clobbers reg byte a +Statement [68] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 << (byte) 3 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$8 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$8 ] ) always clobbers reg byte a +Statement [69] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$9 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$9 ] ) always clobbers reg byte a +Statement [70] (byte*~) make_plasma_charset::$16 ← (const byte*) CHARSET#0 + (word~) make_plasma_charset::$9 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$16 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$16 ] ) always clobbers reg byte a +Statement [71] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 ] ) always clobbers reg byte a reg byte y +Statement [74] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$11 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$11 ] ) always clobbers reg byte a +Statement [80] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 [ make_plasma_charset::c#1 print_char_cursor#18 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#1 print_char_cursor#18 ] ) always clobbers reg byte a +Statement [82] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 [ print_char_cursor#49 ] ( main:7::make_plasma_charset:14::print_char:77 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 ] ) always clobbers reg byte a reg byte y +Statement [89] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:7::make_plasma_charset:14::print_cls:53 [ SCREEN_DIST#0 SCREEN_ANGLE#0 print_cls::sc#2 ] ) always clobbers reg byte a reg byte y +Statement [91] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word) $3e8) goto print_cls::@1 [ print_cls::sc#1 ] ( main:7::make_plasma_charset:14::print_cls:53 [ SCREEN_DIST#0 SCREEN_ANGLE#0 print_cls::sc#1 ] ) always clobbers reg byte a +Statement [93] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:7::make_plasma_charset:14::sid_rnd_init:51 [ SCREEN_DIST#0 SCREEN_ANGLE#0 ] ) always clobbers reg byte a +Statement [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:7::make_plasma_charset:14::sid_rnd_init:51 [ SCREEN_DIST#0 SCREEN_ANGLE#0 ] ) always clobbers reg byte a +Statement [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ) always clobbers reg byte a +Statement [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ) always clobbers reg byte a +Statement [100] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a +Statement [101] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [102] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Statement [103] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [104] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [105] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [106] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [108] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [109] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [110] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [111] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a reg byte y +Statement [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a +Statement [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte y +Statement [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Statement [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a +Statement [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a +Statement [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a +Statement [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a +Statement [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a +Statement [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a +Statement [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a +Statement [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a +Statement [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a +Statement [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a +Statement [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a +Statement [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a +Statement [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 [ init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ) always clobbers reg byte a +Statement [180] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ) always clobbers reg byte a +Statement [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ) always clobbers reg byte a +Statement [189] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ) always clobbers reg byte a +Statement [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [196] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:128 [ init_dist_screen::d#0 ] +Statement [197] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y +Statement [198] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y +Statement [199] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ) always clobbers reg byte y +Statement [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 [ bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ SQUARES#1 bsearch16u::return#3 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES#1 sqrt::found#0 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::found#0 ] ) always clobbers reg byte a +Statement [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a +Statement [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a +Statement [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:188 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:188 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 [ malloc::mem#0 heap_head#12 malloc::size#3 ] ( malloc:2 [ malloc::mem#0 heap_head#12 malloc::size#3 ] malloc:4 [ malloc::mem#0 heap_head#12 malloc::size#3 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#12 malloc::size#3 ] ) always clobbers reg byte a +Statement [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a +Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a +Statement [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 heap_head#1 ] ) always clobbers reg byte a +Statement [11] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen#0 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen#0 ] ) always clobbers reg byte a +Statement [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ) always clobbers reg byte a +Statement [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ( main:7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ) always clobbers reg byte a +Statement [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 ] ) always clobbers reg byte a +Statement [27] (byte*) doplasma::dist#0 ← (byte*)(void*) SCREEN_DIST#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 ] ) always clobbers reg byte a +Statement [28] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 ] ) always clobbers reg byte a +Statement [29] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 doplasma::sin_y#0 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 doplasma::sin_y#0 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::screen#6 doplasma::angle#0 doplasma::dist#0 doplasma::sin_x#0 doplasma::sin_y#0 ] ) always clobbers reg byte a +Statement [32] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 doplasma::$2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 doplasma::$2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 doplasma::$2 ] ) always clobbers reg byte a reg byte y +Statement [33] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::screen#5 doplasma::y#4 doplasma::x#2 ] ) always clobbers reg byte y +Statement [36] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::y#4 doplasma::screen#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::y#4 doplasma::screen#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::angle#4 doplasma::dist#4 doplasma::y#4 doplasma::screen#2 ] ) always clobbers reg byte a +Statement [37] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::dist#4 doplasma::y#4 doplasma::angle#1 doplasma::screen#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::dist#4 doplasma::y#4 doplasma::angle#1 doplasma::screen#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::dist#4 doplasma::y#4 doplasma::angle#1 doplasma::screen#2 ] ) always clobbers reg byte a +Statement [38] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::y#4 doplasma::angle#1 doplasma::dist#1 doplasma::screen#2 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::y#4 doplasma::angle#1 doplasma::dist#1 doplasma::screen#2 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#10 sin_offset_y#10 doplasma::sin_x#0 doplasma::sin_y#0 doplasma::y#4 doplasma::angle#1 doplasma::dist#1 doplasma::screen#2 ] ) always clobbers reg byte a +Statement [41] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#10 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#10 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#10 ] ) always clobbers reg byte a reg byte x +Statement [42] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ( main:7::doplasma:19 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] main:7::doplasma:22 [ SCREEN_DIST#0 SCREEN_ANGLE#0 sin_offset_x#12 sin_offset_y#12 ] ) always clobbers reg byte a reg byte x +Statement [46] *((byte*) memset::dst#2) ← (const byte) BLACK#0 [ memset::dst#2 ] ( main:7::memset:16 [ SCREEN_DIST#0 SCREEN_ANGLE#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [48] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:7::memset:16 [ SCREEN_DIST#0 SCREEN_ANGLE#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [55] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$2 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$2 ] ) always clobbers reg byte a +Statement [64] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::ii#2 make_plasma_charset::b#1 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::ii#2 make_plasma_charset::b#1 ] ) always clobbers reg byte a +Statement [68] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 << (byte) 3 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$8 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$8 ] ) always clobbers reg byte a +Statement [69] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$9 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$9 ] ) always clobbers reg byte a +Statement [70] (byte*~) make_plasma_charset::$16 ← (const byte*) CHARSET#0 + (word~) make_plasma_charset::$9 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$16 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 make_plasma_charset::b#3 make_plasma_charset::$16 ] ) always clobbers reg byte a +Statement [71] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::s#0 make_plasma_charset::i#7 ] ) always clobbers reg byte a reg byte y +Statement [74] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 [ make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$11 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 make_plasma_charset::$11 ] ) always clobbers reg byte a +Statement [80] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 [ make_plasma_charset::c#1 print_char_cursor#18 ] ( main:7::make_plasma_charset:14 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#1 print_char_cursor#18 ] ) always clobbers reg byte a +Statement [82] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 [ print_char_cursor#49 ] ( main:7::make_plasma_charset:14::print_char:77 [ SCREEN_DIST#0 SCREEN_ANGLE#0 make_plasma_charset::c#2 print_char_cursor#49 ] ) always clobbers reg byte a reg byte y +Statement [89] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:7::make_plasma_charset:14::print_cls:53 [ SCREEN_DIST#0 SCREEN_ANGLE#0 print_cls::sc#2 ] ) always clobbers reg byte a reg byte y +Statement [91] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word) $3e8) goto print_cls::@1 [ print_cls::sc#1 ] ( main:7::make_plasma_charset:14::print_cls:53 [ SCREEN_DIST#0 SCREEN_ANGLE#0 print_cls::sc#1 ] ) always clobbers reg byte a +Statement [93] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [ ] ( main:7::make_plasma_charset:14::sid_rnd_init:51 [ SCREEN_DIST#0 SCREEN_ANGLE#0 ] ) always clobbers reg byte a +Statement [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:7::make_plasma_charset:14::sid_rnd_init:51 [ SCREEN_DIST#0 SCREEN_ANGLE#0 ] ) always clobbers reg byte a +Statement [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen#0 init_angle_screen::screen_topline#0 ] ) always clobbers reg byte a +Statement [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [ init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::screen_topline#0 init_angle_screen::screen_bottomline#0 ] ) always clobbers reg byte a +Statement [100] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a +Statement [101] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [102] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Statement [103] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [104] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [105] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [106] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [108] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [109] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [110] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [111] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a reg byte y +Statement [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a +Statement [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte y +Statement [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ( main:7::init_angle_screen:12 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Statement [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a +Statement [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a +Statement [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a +Statement [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a +Statement [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a +Statement [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a +Statement [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a +Statement [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a +Statement [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a +Statement [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a +Statement [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a +Statement [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a +Statement [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:7::init_angle_screen:12::atan2_16:107 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 [ init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 init_dist_screen::screen_bottomline#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 SQUARES#1 ] ) always clobbers reg byte a +Statement [180] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 SQUARES#1 ] ) always clobbers reg byte a +Statement [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 SQUARES#1 ] ) always clobbers reg byte a +Statement [189] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 SQUARES#1 ] ) always clobbers reg byte a +Statement [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [196] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y +Statement [197] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y +Statement [198] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 SQUARES#1 ] ) always clobbers reg byte y +Statement [199] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 ] ) always clobbers reg byte y +Statement [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ( main:7::init_dist_screen:10 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 [ bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::items#1 SQUARES#1 ] ) always clobbers reg byte a +Statement [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ SQUARES#1 bsearch16u::return#3 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ SQUARES#1 sqrt::found#0 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::found#0 ] ) always clobbers reg byte a +Statement [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 [ SQUARES#1 sqrt::$3 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$3 ] ) always clobbers reg byte a +Statement [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ SQUARES#1 sqrt::$1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqrt::$1 ] ) always clobbers reg byte a +Statement [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqrt:193 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:7::init_dist_screen:10::sqrt:193::bsearch16u:212 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sqr::$0 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 SQUARES#1 sqr::$0 ] main:7::init_dist_screen:10::sqr:188 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 SQUARES#1 sqr::$0 ] ) always clobbers reg byte a +Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:188 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y +Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a +Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a +Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 [ malloc::mem#0 heap_head#12 malloc::size#3 ] ( malloc:2 [ malloc::mem#0 heap_head#12 malloc::size#3 ] malloc:4 [ malloc::mem#0 heap_head#12 malloc::size#3 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#12 malloc::size#3 ] ) always clobbers reg byte a +Statement [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] : zp ZP_BYTE:2 , +Potential registers zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] : zp ZP_BYTE:3 , +Potential registers zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] : zp ZP_WORD:4 , +Potential registers zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] : zp ZP_WORD:8 , +Potential registers zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] : zp ZP_BYTE:10 , reg byte x , +Potential registers zp ZP_BYTE:11 [ doplasma::x#2 doplasma::x#1 ] : zp ZP_BYTE:11 , reg byte x , +Potential registers zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ] : zp ZP_WORD:12 , +Potential registers zp ZP_WORD:14 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] : zp ZP_WORD:14 , +Potential registers zp ZP_WORD:16 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] : zp ZP_WORD:16 , +Potential registers zp ZP_BYTE:18 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] : zp ZP_BYTE:18 , reg byte x , +Potential registers zp ZP_BYTE:19 [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] : zp ZP_BYTE:19 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:21 [ print_cls::sc#2 print_cls::sc#1 ] : zp ZP_WORD:21 , +Potential registers zp ZP_BYTE:23 [ init_angle_screen::y#4 init_angle_screen::y#1 ] : zp ZP_BYTE:23 , reg byte x , +Potential registers zp ZP_WORD:24 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] : zp ZP_WORD:24 , +Potential registers zp ZP_WORD:26 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] : zp ZP_WORD:26 , +Potential registers zp ZP_BYTE:28 [ init_angle_screen::x#2 init_angle_screen::x#1 ] : zp ZP_BYTE:28 , reg byte x , +Potential registers zp ZP_BYTE:29 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] : zp ZP_BYTE:29 , reg byte x , +Potential registers zp ZP_WORD:30 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:30 , +Potential registers zp ZP_WORD:32 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp ZP_WORD:32 , +Potential registers zp ZP_BYTE:34 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:34 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:35 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:35 , +Potential registers zp ZP_WORD:37 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:37 , +Potential registers zp ZP_BYTE:39 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp ZP_BYTE:39 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:40 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp ZP_WORD:40 , +Potential registers zp ZP_WORD:42 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp ZP_WORD:42 , +Potential registers zp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] : zp ZP_BYTE:44 , reg byte x , +Potential registers zp ZP_WORD:45 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] : zp ZP_WORD:45 , +Potential registers zp ZP_WORD:47 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] : zp ZP_WORD:47 , +Potential registers zp ZP_BYTE:49 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:50 , reg byte x , +Potential registers zp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:51 , reg byte x , +Potential registers zp ZP_BYTE:52 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:52 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:53 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:53 , +Potential registers zp ZP_BYTE:55 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:55 , reg byte x , +Potential registers zp ZP_BYTE:56 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:57 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:57 , +Potential registers zp ZP_WORD:59 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp ZP_WORD:59 , +Potential registers zp ZP_BYTE:61 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:61 , reg byte x , +Potential registers zp ZP_WORD:62 [ heap_head#12 heap_head#1 ] : zp ZP_WORD:62 , +Potential registers zp ZP_WORD:64 [ malloc::size#3 ] : zp ZP_WORD:64 , +Potential registers zp ZP_WORD:66 [ SCREEN_DIST#0 ] : zp ZP_WORD:66 , +Potential registers zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] : zp ZP_WORD:68 , +Potential registers zp ZP_WORD:70 [ init_angle_screen::screen#0 ] : zp ZP_WORD:70 , +Potential registers zp ZP_WORD:72 [ doplasma::sin_x#0 ] : zp ZP_WORD:72 , +Potential registers zp ZP_WORD:74 [ doplasma::sin_y#0 ] : zp ZP_WORD:74 , +Potential registers zp ZP_BYTE:76 [ doplasma::$2 ] : zp ZP_BYTE:76 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:77 [ make_plasma_charset::$2 ] : zp ZP_BYTE:77 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:78 [ make_plasma_charset::s#0 ] : zp ZP_BYTE:78 , reg byte x , +Potential registers zp ZP_BYTE:79 [ sid_rnd::return#2 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:80 [ make_plasma_charset::$3 ] : zp ZP_BYTE:80 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:81 [ make_plasma_charset::$4 ] : zp ZP_BYTE:81 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:82 [ make_plasma_charset::$8 ] : zp ZP_WORD:82 , +Potential registers zp ZP_WORD:84 [ make_plasma_charset::$9 ] : zp ZP_WORD:84 , +Potential registers zp ZP_WORD:86 [ make_plasma_charset::$16 ] : zp ZP_WORD:86 , +Potential registers zp ZP_BYTE:88 [ make_plasma_charset::$11 ] : zp ZP_BYTE:88 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:89 [ sid_rnd::return#0 ] : zp ZP_BYTE:89 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:90 [ init_angle_screen::$2 ] : zp ZP_BYTE:90 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:91 [ init_angle_screen::$3 ] : zp ZP_BYTE:91 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:92 [ init_angle_screen::xw#0 ] : zp ZP_WORD:92 , +Potential registers zp ZP_BYTE:94 [ init_angle_screen::$6 ] : zp ZP_BYTE:94 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:95 [ init_angle_screen::yw#0 ] : zp ZP_WORD:95 , +Potential registers zp ZP_WORD:97 [ atan2_16::x#0 ] : zp ZP_WORD:97 , +Potential registers zp ZP_WORD:99 [ atan2_16::y#0 ] : zp ZP_WORD:99 , +Potential registers zp ZP_WORD:101 [ atan2_16::return#2 ] : zp ZP_WORD:101 , +Potential registers zp ZP_WORD:103 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:103 , +Potential registers zp ZP_WORD:105 [ init_angle_screen::$10 ] : zp ZP_WORD:105 , +Potential registers zp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:107 , reg byte x , +Potential registers zp ZP_BYTE:108 [ init_angle_screen::$12 ] : zp ZP_BYTE:108 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:109 [ init_angle_screen::$13 ] : zp ZP_BYTE:109 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:110 [ init_angle_screen::$14 ] : zp ZP_BYTE:110 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:111 [ atan2_16::$24 ] : zp ZP_BYTE:111 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:112 [ atan2_16::$23 ] : zp ZP_BYTE:112 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:113 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:113 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:114 [ sqr::return#2 ] : zp ZP_WORD:114 , +Potential registers zp ZP_WORD:116 [ init_dist_screen::yds#0 ] : zp ZP_WORD:116 , +Potential registers zp ZP_BYTE:118 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:118 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:119 [ sqr::return#3 ] : zp ZP_WORD:119 , +Potential registers zp ZP_WORD:121 [ init_dist_screen::xds#0 ] : zp ZP_WORD:121 , +Potential registers zp ZP_WORD:123 [ init_dist_screen::ds#0 ] : zp ZP_WORD:123 , +Potential registers zp ZP_WORD:125 [ sqrt::val#0 ] : zp ZP_WORD:125 , +Potential registers zp ZP_BYTE:127 [ sqrt::return#2 ] : zp ZP_BYTE:127 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:128 [ init_dist_screen::d#0 ] : zp ZP_BYTE:128 , reg byte a , reg byte x , +Potential registers zp ZP_WORD:129 [ bsearch16u::key#0 ] : zp ZP_WORD:129 , +Potential registers zp ZP_WORD:131 [ bsearch16u::return#3 ] : zp ZP_WORD:131 , +Potential registers zp ZP_WORD:133 [ sqrt::found#0 ] : zp ZP_WORD:133 , +Potential registers zp ZP_WORD:135 [ sqrt::$3 ] : zp ZP_WORD:135 , +Potential registers zp ZP_WORD:137 [ sqrt::$1 ] : zp ZP_WORD:137 , +Potential registers zp ZP_BYTE:139 [ sqrt::return#0 ] : zp ZP_BYTE:139 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:140 [ bsearch16u::$6 ] : zp ZP_BYTE:140 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:141 [ bsearch16u::$16 ] : zp ZP_BYTE:141 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:142 [ bsearch16u::pivot#0 ] : zp ZP_WORD:142 , +Potential registers zp ZP_WORD:144 [ bsearch16u::result#0 ] : zp ZP_WORD:144 , +Potential registers zp ZP_BYTE:146 [ sqr::$0 ] : zp ZP_BYTE:146 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:147 [ sqr::return#0 ] : zp ZP_WORD:147 , +Potential registers zp ZP_WORD:149 [ SQUARES#1 ] : zp ZP_WORD:149 , +Potential registers zp ZP_BYTE:151 [ init_squares::$3 ] : zp ZP_BYTE:151 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:152 [ init_squares::$4 ] : zp ZP_BYTE:152 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:153 [ malloc::mem#0 ] : zp ZP_WORD:153 , + +REGISTER UPLIFT SCOPES +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:39 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:40 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:42 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:35 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:30 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:32 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:111 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:112 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:34 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:101 [ atan2_16::return#2 ] 50: zp ZP_WORD:37 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:97 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:99 [ atan2_16::y#0 ] +Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:55 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,855.06: zp ZP_WORD:53 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:140 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:141 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:144 [ bsearch16u::result#0 ] 501: zp ZP_WORD:142 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:131 [ bsearch16u::return#3 ] 0.27: zp ZP_WORD:129 [ bsearch16u::key#0 ] +Uplift Scope [make_plasma_charset] 3,019.83: zp ZP_BYTE:20 [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] 2,002: zp ZP_BYTE:80 [ make_plasma_charset::$3 ] 2,002: zp ZP_BYTE:81 [ make_plasma_charset::$4 ] 1,876.88: zp ZP_BYTE:19 [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] 202: zp ZP_WORD:82 [ make_plasma_charset::$8 ] 202: zp ZP_WORD:84 [ make_plasma_charset::$9 ] 202: zp ZP_WORD:86 [ make_plasma_charset::$16 ] 171.7: zp ZP_BYTE:18 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] 56.22: zp ZP_BYTE:78 [ make_plasma_charset::s#0 ] 22.3: zp ZP_WORD:14 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] 22: zp ZP_BYTE:77 [ make_plasma_charset::$2 ] 22: zp ZP_BYTE:88 [ make_plasma_charset::$11 ] +Uplift Scope [doplasma] 3,169.83: zp ZP_BYTE:11 [ doplasma::x#2 doplasma::x#1 ] 2,002: zp ZP_BYTE:76 [ doplasma::$2 ] 241.63: zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] 223.64: zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] 219.29: zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] 173.94: zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] 83.58: zp ZP_WORD:74 [ doplasma::sin_y#0 ] 77.15: zp ZP_WORD:72 [ doplasma::sin_x#0 ] +Uplift Scope [sid_rnd] 2,002: zp ZP_BYTE:79 [ sid_rnd::return#2 ] 334.33: zp ZP_BYTE:89 [ sid_rnd::return#0 ] +Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:90 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:91 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:94 [ init_angle_screen::$6 ] 202: zp ZP_WORD:103 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:105 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:108 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:109 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:110 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:28 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:29 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:95 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:92 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:23 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 20.37: zp ZP_WORD:24 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] 16.92: zp ZP_WORD:26 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] 3: zp ZP_WORD:70 [ init_angle_screen::screen#0 ] +Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:52 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:118 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:121 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:123 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:128 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:49 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:113 [ init_dist_screen::y2#0 ] 18.18: zp ZP_WORD:47 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] 17.47: zp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp ZP_WORD:45 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] 4.87: zp ZP_WORD:116 [ init_dist_screen::yds#0 ] +Uplift Scope [sqr] 338: zp ZP_BYTE:56 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:119 [ sqr::return#3 ] 28.5: zp ZP_WORD:147 [ sqr::return#0 ] 22: zp ZP_WORD:114 [ sqr::return#2 ] 4: zp ZP_BYTE:146 [ sqr::$0 ] +Uplift Scope [sqrt] 202: zp ZP_BYTE:127 [ sqrt::return#2 ] 103: zp ZP_WORD:125 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:139 [ sqrt::return#0 ] 4: zp ZP_WORD:133 [ sqrt::found#0 ] 4: zp ZP_WORD:135 [ sqrt::$3 ] 2: zp ZP_WORD:137 [ sqrt::$1 ] +Uplift Scope [init_squares] 25.17: zp ZP_WORD:59 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp ZP_BYTE:61 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:151 [ init_squares::$3 ] 22: zp ZP_BYTE:152 [ init_squares::$4 ] 13.93: zp ZP_WORD:57 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [] 16.42: zp ZP_WORD:16 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] 15.53: zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] 15.29: zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] 4.6: zp ZP_WORD:62 [ heap_head#12 heap_head#1 ] 0.05: zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] 0.05: zp ZP_WORD:66 [ SCREEN_DIST#0 ] 0.03: zp ZP_WORD:149 [ SQUARES#1 ] +Uplift Scope [memset] 33: zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ] +Uplift Scope [print_cls] 33: zp ZP_WORD:21 [ print_cls::sc#2 print_cls::sc#1 ] +Uplift Scope [malloc] 1: zp ZP_WORD:64 [ malloc::size#3 ] 0.33: zp ZP_WORD:153 [ malloc::mem#0 ] +Uplift Scope [print_char] +Uplift Scope [sid_rnd_init] +Uplift Scope [main] + +Uplifting [atan2_16] best 1412757 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:40 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:42 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:35 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:30 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:32 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:101 [ atan2_16::return#2 ] zp ZP_WORD:37 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:97 [ atan2_16::x#0 ] zp ZP_WORD:99 [ atan2_16::y#0 ] +Limited combination testing to 100 combinations of 144 possible. +Uplifting [bsearch16u] best 1393757 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:53 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:144 [ bsearch16u::result#0 ] zp ZP_WORD:142 [ bsearch16u::pivot#0 ] zp ZP_WORD:131 [ bsearch16u::return#3 ] zp ZP_WORD:129 [ bsearch16u::key#0 ] +Uplifting [make_plasma_charset] best 1370657 combination reg byte y [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] reg byte a [ make_plasma_charset::$3 ] zp ZP_BYTE:81 [ make_plasma_charset::$4 ] reg byte x [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] zp ZP_WORD:82 [ make_plasma_charset::$8 ] zp ZP_WORD:84 [ make_plasma_charset::$9 ] zp ZP_WORD:86 [ make_plasma_charset::$16 ] zp ZP_BYTE:18 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] zp ZP_BYTE:78 [ make_plasma_charset::s#0 ] zp ZP_WORD:14 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] zp ZP_BYTE:77 [ make_plasma_charset::$2 ] zp ZP_BYTE:88 [ make_plasma_charset::$11 ] +Limited combination testing to 100 combinations of 9216 possible. +Uplifting [doplasma] best 1359657 combination reg byte x [ doplasma::x#2 doplasma::x#1 ] reg byte a [ doplasma::$2 ] zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] zp ZP_WORD:74 [ doplasma::sin_y#0 ] zp ZP_WORD:72 [ doplasma::sin_x#0 ] +Uplifting [sid_rnd] best 1350654 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] +Uplifting [init_angle_screen] best 1348454 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:103 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:105 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:109 [ init_angle_screen::$13 ] zp ZP_BYTE:110 [ init_angle_screen::$14 ] zp ZP_BYTE:28 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:29 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:95 [ init_angle_screen::yw#0 ] zp ZP_WORD:92 [ init_angle_screen::xw#0 ] zp ZP_BYTE:23 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:24 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:26 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] zp ZP_WORD:70 [ init_angle_screen::screen#0 ] +Limited combination testing to 100 combinations of 65536 possible. +Uplifting [init_dist_screen] best 1345254 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:121 [ init_dist_screen::xds#0 ] zp ZP_WORD:123 [ init_dist_screen::ds#0 ] zp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:49 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:113 [ init_dist_screen::y2#0 ] zp ZP_WORD:47 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] zp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:45 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] zp ZP_WORD:116 [ init_dist_screen::yds#0 ] +Limited combination testing to 100 combinations of 6144 possible. +Uplifting [sqr] best 1344917 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:119 [ sqr::return#3 ] zp ZP_WORD:147 [ sqr::return#0 ] zp ZP_WORD:114 [ sqr::return#2 ] reg byte a [ sqr::$0 ] +Uplifting [sqrt] best 1344014 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:125 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:133 [ sqrt::found#0 ] zp ZP_WORD:135 [ sqrt::$3 ] zp ZP_WORD:137 [ sqrt::$1 ] +Uplifting [init_squares] best 1343814 combination zp ZP_WORD:59 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:57 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [] best 1343814 combination zp ZP_WORD:16 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] zp ZP_WORD:62 [ heap_head#12 heap_head#1 ] zp ZP_WORD:68 [ SCREEN_ANGLE#0 ] zp ZP_WORD:66 [ SCREEN_DIST#0 ] zp ZP_WORD:149 [ SQUARES#1 ] +Uplifting [memset] best 1343814 combination zp ZP_WORD:12 [ memset::dst#2 memset::dst#1 ] +Uplifting [print_cls] best 1343814 combination zp ZP_WORD:21 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [malloc] best 1343814 combination zp ZP_WORD:64 [ malloc::size#3 ] zp ZP_WORD:153 [ malloc::mem#0 ] +Uplifting [print_char] best 1343814 combination +Uplifting [sid_rnd_init] best 1343814 combination +Uplifting [main] best 1343814 combination +Attempting to uplift remaining variables inzp ZP_BYTE:81 [ make_plasma_charset::$4 ] +Uplifting [make_plasma_charset] best 1343814 combination zp ZP_BYTE:81 [ make_plasma_charset::$4 ] +Attempting to uplift remaining variables inzp ZP_BYTE:109 [ init_angle_screen::$13 ] +Uplifting [init_angle_screen] best 1343414 combination reg byte a [ init_angle_screen::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:110 [ init_angle_screen::$14 ] +Uplifting [init_angle_screen] best 1342814 combination reg byte a [ init_angle_screen::$14 ] +Attempting to uplift remaining variables inzp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] +Uplifting [doplasma] best 1342814 combination zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:18 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +Uplifting [make_plasma_charset] best 1342814 combination zp ZP_BYTE:18 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Uplifting [init_dist_screen] best 1342814 combination zp ZP_BYTE:50 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:28 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Uplifting [init_angle_screen] best 1342814 combination zp ZP_BYTE:28 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Uplifting [init_dist_screen] best 1342814 combination zp ZP_BYTE:51 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:29 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Uplifting [init_angle_screen] best 1342814 combination zp ZP_BYTE:29 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1342814 combination zp ZP_BYTE:107 [ init_angle_screen::ang_w#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:49 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Uplifting [init_dist_screen] best 1342744 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:78 [ make_plasma_charset::s#0 ] +Uplifting [make_plasma_charset] best 1342744 combination zp ZP_BYTE:78 [ make_plasma_charset::s#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:77 [ make_plasma_charset::$2 ] +Uplifting [make_plasma_charset] best 1342704 combination reg byte a [ make_plasma_charset::$2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:88 [ make_plasma_charset::$11 ] +Uplifting [make_plasma_charset] best 1342644 combination reg byte a [ make_plasma_charset::$11 ] +Attempting to uplift remaining variables inzp ZP_BYTE:113 [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 1342544 combination reg byte a [ init_dist_screen::y2#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:23 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Uplifting [init_angle_screen] best 1342544 combination zp ZP_BYTE:23 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Uplifting [init_dist_screen] best 1342544 combination zp ZP_BYTE:44 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +Uplifting [] best 1342544 combination zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +Uplifting [] best 1342544 combination zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:24 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 ] ] with [ zp ZP_WORD:70 [ init_angle_screen::screen#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:35 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:37 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:131 [ bsearch16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ make_plasma_charset::$8 ] ] with [ zp ZP_WORD:84 [ make_plasma_charset::$9 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:92 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:97 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:95 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:99 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:101 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:103 [ init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:114 [ sqr::return#2 ] ] with [ zp ZP_WORD:116 [ init_dist_screen::yds#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:119 [ sqr::return#3 ] ] with [ zp ZP_WORD:121 [ init_dist_screen::xds#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:119 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:147 [ sqr::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:123 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:125 [ sqrt::val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:133 [ sqrt::found#0 ] ] with [ zp ZP_WORD:135 [ sqrt::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:149 [ SQUARES#1 ] ] with [ zp ZP_WORD:153 [ malloc::mem#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:35 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:101 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:133 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ make_plasma_charset::$8 make_plasma_charset::$9 ] ] with [ zp ZP_WORD:86 [ make_plasma_charset::$16 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:119 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:123 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:35 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:105 [ init_angle_screen::$10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:137 [ sqrt::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:119 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:129 [ bsearch16u::key#0 ] ] - score: 1 +Allocated (was zp ZP_WORD:12) zp ZP_WORD:11 [ memset::dst#2 memset::dst#1 ] +Allocated (was zp ZP_WORD:14) zp ZP_WORD:13 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] +Allocated (was zp ZP_WORD:16) zp ZP_WORD:15 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] +Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:17 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +Allocated (was zp ZP_WORD:21) zp ZP_WORD:18 [ print_cls::sc#2 print_cls::sc#1 ] +Allocated (was zp ZP_BYTE:23) zp ZP_BYTE:20 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Allocated (was zp ZP_WORD:24) zp ZP_WORD:21 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] +Allocated (was zp ZP_WORD:26) zp ZP_WORD:23 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +Allocated (was zp ZP_BYTE:28) zp ZP_BYTE:25 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Allocated (was zp ZP_BYTE:29) zp ZP_BYTE:26 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:27 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +Allocated (was zp ZP_WORD:32) zp ZP_WORD:29 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated (was zp ZP_WORD:35) zp ZP_WORD:31 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] +Allocated (was zp ZP_WORD:40) zp ZP_WORD:33 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated (was zp ZP_WORD:42) zp ZP_WORD:35 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_BYTE:44) zp ZP_BYTE:37 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Allocated (was zp ZP_WORD:45) zp ZP_WORD:38 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] +Allocated (was zp ZP_WORD:47) zp ZP_WORD:40 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] +Allocated (was zp ZP_BYTE:50) zp ZP_BYTE:42 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Allocated (was zp ZP_BYTE:51) zp ZP_BYTE:43 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Allocated (was zp ZP_WORD:53) zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] +Allocated (was zp ZP_WORD:57) zp ZP_WORD:46 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated (was zp ZP_WORD:59) zp ZP_WORD:48 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +Allocated (was zp ZP_WORD:62) zp ZP_WORD:50 [ heap_head#12 heap_head#1 ] +Allocated (was zp ZP_WORD:64) zp ZP_WORD:52 [ malloc::size#3 ] +Allocated (was zp ZP_WORD:66) zp ZP_WORD:54 [ SCREEN_DIST#0 ] +Allocated (was zp ZP_WORD:68) zp ZP_WORD:56 [ SCREEN_ANGLE#0 ] +Allocated (was zp ZP_WORD:72) zp ZP_WORD:58 [ doplasma::sin_x#0 ] +Allocated (was zp ZP_WORD:74) zp ZP_WORD:60 [ doplasma::sin_y#0 ] +Allocated (was zp ZP_BYTE:78) zp ZP_BYTE:62 [ make_plasma_charset::s#0 ] +Allocated (was zp ZP_BYTE:81) zp ZP_BYTE:63 [ make_plasma_charset::$4 ] +Allocated (was zp ZP_WORD:82) zp ZP_WORD:64 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 ] +Allocated (was zp ZP_WORD:92) zp ZP_WORD:66 [ init_angle_screen::xw#0 atan2_16::x#0 ] +Allocated (was zp ZP_WORD:95) zp ZP_WORD:68 [ init_angle_screen::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_BYTE:107) zp ZP_BYTE:70 [ init_angle_screen::ang_w#0 ] +Allocated (was zp ZP_WORD:114) zp ZP_WORD:71 [ sqr::return#2 init_dist_screen::yds#0 ] +Allocated (was zp ZP_WORD:119) zp ZP_WORD:73 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +Allocated (was zp ZP_WORD:142) zp ZP_WORD:75 [ bsearch16u::pivot#0 ] +Allocated (was zp ZP_WORD:144) zp ZP_WORD:77 [ bsearch16u::result#0 ] +Allocated (was zp ZP_WORD:149) zp ZP_WORD:79 [ SQUARES#1 malloc::mem#0 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Plasma based on the distance/angle to the screen center +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_WORD = 2 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + // Start of the heap used by malloc() + .label HEAP_START = $c000 + // The number of iterations performed during 16-bit CORDIC atan2 calculation + .const CORDIC_ITERATIONS_16 = $f + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + // Plasma charset + .label CHARSET = $2000 + // Plasma screen 1 + .label SCREEN1 = $2800 + // Plasma screen 2 + .label SCREEN2 = $2c00 + .const NUM_SQUARES = $30 + .label heap_head = $32 + .label SQUARES = $4f + .label print_char_cursor = $f + // Screen containing distance to center + .label SCREEN_DIST = $36 + // Screen containing angle to center + .label SCREEN_ANGLE = $38 + .label sin_offset_x = 2 + .label sin_offset_y = 3 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call malloc +//SEG7 [255] phi from @1 to malloc [phi:@1->malloc] +malloc_from_b1: +//SEG8 [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 +//SEG9 [255] phi (byte*) heap_head#12 = (const byte*) HEAP_START#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + lda #HEAP_START + sta heap_head+1 + jsr malloc + jmp b3 +//SEG10 @3 +b3: +//SEG11 [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + lda malloc.mem + sta SCREEN_DIST + lda malloc.mem+1 + sta SCREEN_DIST+1 +//SEG12 [4] call malloc +//SEG13 [255] phi from @3 to malloc [phi:@3->malloc] +malloc_from_b3: +//SEG14 [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 +//SEG15 [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + jsr malloc + jmp b4 +//SEG16 @4 +b4: +//SEG17 [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + lda malloc.mem + sta SCREEN_ANGLE + lda malloc.mem+1 + sta SCREEN_ANGLE+1 +//SEG18 [6] phi from @4 to @2 [phi:@4->@2] +b2_from_b4: + jmp b2 +//SEG19 @2 +b2: +//SEG20 [7] call main + jsr main +//SEG21 [8] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG22 @end +bend: +//SEG23 main +main: { + .const toD0181_return = (>(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(SCREEN2&$3fff)*4)|(>CHARSET)/4&$f + //SEG24 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + lda SCREEN_DIST + sta init_dist_screen.screen + lda SCREEN_DIST+1 + sta init_dist_screen.screen+1 + //SEG25 [10] call init_dist_screen + //SEG26 [170] phi from main to init_dist_screen [phi:main->init_dist_screen] + init_dist_screen_from_main: + jsr init_dist_screen + jmp b5 + //SEG27 main::@5 + b5: + //SEG28 [11] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 + lda SCREEN_ANGLE + sta init_angle_screen.screen + lda SCREEN_ANGLE+1 + sta init_angle_screen.screen+1 + //SEG29 [12] call init_angle_screen + jsr init_angle_screen + //SEG30 [13] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + b6_from_b5: + jmp b6 + //SEG31 main::@6 + b6: + //SEG32 [14] call make_plasma_charset + //SEG33 [50] phi from main::@6 to make_plasma_charset [phi:main::@6->make_plasma_charset] + make_plasma_charset_from_b6: + jsr make_plasma_charset + //SEG34 [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7] + b7_from_b6: + jmp b7 + //SEG35 main::@7 + b7: + //SEG36 [16] call memset + //SEG37 [44] phi from main::@7 to memset [phi:main::@7->memset] + memset_from_b7: + jsr memset + //SEG38 [17] phi from main::@7 to main::@1 [phi:main::@7->main::@1] + b1_from_b7: + //SEG39 [17] phi (byte) sin_offset_y#14 = (byte) 0 [phi:main::@7->main::@1#0] -- vbuz1=vbuc1 + lda #0 + sta sin_offset_y + //SEG40 [17] phi (byte) sin_offset_x#14 = (byte) 0 [phi:main::@7->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta sin_offset_x + jmp b1 + // Show double-buffered plasma + //SEG41 main::@1 + b1: + //SEG42 [18] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + jmp b2 + //SEG43 main::@2 + b2: + //SEG44 [19] call doplasma + //SEG45 [25] phi from main::@2 to doplasma [phi:main::@2->doplasma] + doplasma_from_b2: + //SEG46 [25] phi (byte*) doplasma::screen#6 = (const byte*) SCREEN1#0 [phi:main::@2->doplasma#0] -- pbuz1=pbuc1 + lda #SCREEN1 + sta doplasma.screen+1 + //SEG47 [25] phi (byte) sin_offset_y#10 = (byte) sin_offset_y#14 [phi:main::@2->doplasma#1] -- register_copy + //SEG48 [25] phi (byte) sin_offset_x#10 = (byte) sin_offset_x#14 [phi:main::@2->doplasma#2] -- register_copy + jsr doplasma + //SEG49 [20] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181] + toD0181_from_b2: + jmp toD0181 + //SEG50 main::toD0181 + toD0181: + jmp b3 + //SEG51 main::@3 + b3: + //SEG52 [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG53 [22] call doplasma + //SEG54 [25] phi from main::@3 to doplasma [phi:main::@3->doplasma] + doplasma_from_b3: + //SEG55 [25] phi (byte*) doplasma::screen#6 = (const byte*) SCREEN2#0 [phi:main::@3->doplasma#0] -- pbuz1=pbuc1 + lda #SCREEN2 + sta doplasma.screen+1 + //SEG56 [25] phi (byte) sin_offset_y#10 = (byte) sin_offset_y#12 [phi:main::@3->doplasma#1] -- register_copy + //SEG57 [25] phi (byte) sin_offset_x#10 = (byte) sin_offset_x#12 [phi:main::@3->doplasma#2] -- register_copy + jsr doplasma + //SEG58 [23] phi from main::@3 to main::toD0182 [phi:main::@3->main::toD0182] + toD0182_from_b3: + jmp toD0182 + //SEG59 main::toD0182 + toD0182: + jmp b4 + //SEG60 main::@4 + b4: + //SEG61 [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0182_return + sta D018 + //SEG62 [17] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + b1_from_b4: + //SEG63 [17] phi (byte) sin_offset_y#14 = (byte) sin_offset_y#12 [phi:main::@4->main::@1#0] -- register_copy + //SEG64 [17] phi (byte) sin_offset_x#14 = (byte) sin_offset_x#12 [phi:main::@4->main::@1#1] -- register_copy + jmp b1 +} +//SEG65 doplasma +// Render plasma to the passed screen +// doplasma(byte* zeropage(8) screen) +doplasma: { + .label angle = 4 + .label dist = 6 + .label sin_x = $3a + .label sin_y = $3c + .label screen = 8 + .label y = $a + //SEG66 [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 + lda SCREEN_ANGLE + sta angle + lda SCREEN_ANGLE+1 + sta angle+1 + //SEG67 [27] (byte*) doplasma::dist#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + lda SCREEN_DIST + sta dist + lda SCREEN_DIST+1 + sta dist+1 + //SEG68 [28] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 -- pbuz1=pbuc1_plus_vbuz2 + lda sin_offset_x + clc + adc #SINTABLE + adc #0 + sta sin_x+1 + //SEG69 [29] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 -- pbuz1=pbuc1_plus_vbuz2 + lda sin_offset_y + clc + adc #SINTABLE + adc #0 + sta sin_y+1 + //SEG70 [30] phi from doplasma to doplasma::@1 [phi:doplasma->doplasma::@1] + b1_from_doplasma: + //SEG71 [30] phi (byte) doplasma::y#4 = (byte) 0 [phi:doplasma->doplasma::@1#0] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG72 [30] phi (byte*) doplasma::screen#5 = (byte*) doplasma::screen#6 [phi:doplasma->doplasma::@1#1] -- register_copy + //SEG73 [30] phi (byte*) doplasma::dist#4 = (byte*) doplasma::dist#0 [phi:doplasma->doplasma::@1#2] -- register_copy + //SEG74 [30] phi (byte*) doplasma::angle#4 = (byte*) doplasma::angle#0 [phi:doplasma->doplasma::@1#3] -- register_copy + jmp b1 + //SEG75 [30] phi from doplasma::@3 to doplasma::@1 [phi:doplasma::@3->doplasma::@1] + b1_from_b3: + //SEG76 [30] phi (byte) doplasma::y#4 = (byte) doplasma::y#1 [phi:doplasma::@3->doplasma::@1#0] -- register_copy + //SEG77 [30] phi (byte*) doplasma::screen#5 = (byte*) doplasma::screen#2 [phi:doplasma::@3->doplasma::@1#1] -- register_copy + //SEG78 [30] phi (byte*) doplasma::dist#4 = (byte*) doplasma::dist#1 [phi:doplasma::@3->doplasma::@1#2] -- register_copy + //SEG79 [30] phi (byte*) doplasma::angle#4 = (byte*) doplasma::angle#1 [phi:doplasma::@3->doplasma::@1#3] -- register_copy + jmp b1 + //SEG80 doplasma::@1 + b1: + //SEG81 [31] phi from doplasma::@1 to doplasma::@2 [phi:doplasma::@1->doplasma::@2] + b2_from_b1: + //SEG82 [31] phi (byte) doplasma::x#2 = (byte) 0 [phi:doplasma::@1->doplasma::@2#0] -- vbuxx=vbuc1 + ldx #0 + jmp b2 + //SEG83 [31] phi from doplasma::@2 to doplasma::@2 [phi:doplasma::@2->doplasma::@2] + b2_from_b2: + //SEG84 [31] phi (byte) doplasma::x#2 = (byte) doplasma::x#1 [phi:doplasma::@2->doplasma::@2#0] -- register_copy + jmp b2 + //SEG85 doplasma::@2 + b2: + //SEG86 [32] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) -- vbuaa=pbuz1_derefidx_pbuz2_derefidx_vbuxx_plus_pbuz3_derefidx_pbuz4_derefidx_vbuxx + txa + tay + lda (dist),y + sta $ff + lda (angle),y + tay + lda (sin_x),y + ldy $ff + clc + adc (sin_y),y + //SEG87 [33] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 -- pbuz1_derefidx_vbuxx=vbuaa + stx $ff + ldy $ff + sta (screen),y + //SEG88 [34] (byte) doplasma::x#1 ← ++ (byte) doplasma::x#2 -- vbuxx=_inc_vbuxx + inx + //SEG89 [35] if((byte) doplasma::x#1!=(byte) $28) goto doplasma::@2 -- vbuxx_neq_vbuc1_then_la1 + cpx #$28 + bne b2_from_b2 + jmp b3 + //SEG90 doplasma::@3 + b3: + //SEG91 [36] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen + sta screen + bcc !+ + inc screen+1 + !: + //SEG92 [37] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc angle + sta angle + bcc !+ + inc angle+1 + !: + //SEG93 [38] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc dist + sta dist + bcc !+ + inc dist+1 + !: + //SEG94 [39] (byte) doplasma::y#1 ← ++ (byte) doplasma::y#4 -- vbuz1=_inc_vbuz1 + inc y + //SEG95 [40] if((byte) doplasma::y#1!=(byte) $1a) goto doplasma::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$1a + cmp y + bne b1_from_b3 + jmp b4 + //SEG96 doplasma::@4 + b4: + //SEG97 [41] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 -- vbuz1=vbuz1_minus_vbuc1 + lax sin_offset_x + axs #3 + stx sin_offset_x + //SEG98 [42] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 -- vbuz1=vbuz1_minus_vbuc1 + lax sin_offset_y + axs #7 + stx sin_offset_y + jmp breturn + //SEG99 doplasma::@return + breturn: + //SEG100 [43] return + rts +} +//SEG101 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .const num = $3e8 + .label str = COLS + .label end = str+num + .label dst = $b + //SEG102 [45] phi from memset to memset::@1 [phi:memset->memset::@1] + b1_from_memset: + //SEG103 [45] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + lda #str + sta dst+1 + jmp b1 + //SEG104 [45] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1] + b1_from_b1: + //SEG105 [45] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy + jmp b1 + //SEG106 memset::@1 + b1: + //SEG107 [46] *((byte*) memset::dst#2) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + lda #BLACK + ldy #0 + sta (dst),y + //SEG108 [47] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG109 [48] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 + lda dst+1 + cmp #>end + bne b1_from_b1 + lda dst + cmp #make_plasma_charset::@10] + b10_from_make_plasma_charset: + jmp b10 + //SEG115 make_plasma_charset::@10 + b10: + //SEG116 [53] call print_cls + //SEG117 [87] phi from make_plasma_charset::@10 to print_cls [phi:make_plasma_charset::@10->print_cls] + print_cls_from_b10: + jsr print_cls + //SEG118 [54] phi from make_plasma_charset::@10 to make_plasma_charset::@1 [phi:make_plasma_charset::@10->make_plasma_charset::@1] + b1_from_b10: + //SEG119 [54] phi (byte*) print_char_cursor#49 = (const byte*) print_line_cursor#0 [phi:make_plasma_charset::@10->make_plasma_charset::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta print_char_cursor+1 + //SEG120 [54] phi (word) make_plasma_charset::c#2 = (byte) 0 [phi:make_plasma_charset::@10->make_plasma_charset::@1#1] -- vwuz1=vbuc1 + lda #0 + sta c + lda #0 + sta c+1 + jmp b1 + //SEG121 [54] phi from make_plasma_charset::@9 to make_plasma_charset::@1 [phi:make_plasma_charset::@9->make_plasma_charset::@1] + b1_from_b9: + //SEG122 [54] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#18 [phi:make_plasma_charset::@9->make_plasma_charset::@1#0] -- register_copy + //SEG123 [54] phi (word) make_plasma_charset::c#2 = (word) make_plasma_charset::c#1 [phi:make_plasma_charset::@9->make_plasma_charset::@1#1] -- register_copy + jmp b1 + //SEG124 make_plasma_charset::@1 + b1: + //SEG125 [55] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 -- vbuaa=_lo_vwuz1 + lda c + //SEG126 [56] (byte) make_plasma_charset::s#0 ← *((const byte[$200]) SINTABLE#0 + (byte~) make_plasma_charset::$2) -- vbuz1=pbuc1_derefidx_vbuaa + tay + lda SINTABLE,y + sta s + //SEG127 [57] phi from make_plasma_charset::@1 to make_plasma_charset::@2 [phi:make_plasma_charset::@1->make_plasma_charset::@2] + b2_from_b1: + //SEG128 [57] phi (byte) make_plasma_charset::i#7 = (byte) 0 [phi:make_plasma_charset::@1->make_plasma_charset::@2#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b2 + //SEG129 [57] phi from make_plasma_charset::@6 to make_plasma_charset::@2 [phi:make_plasma_charset::@6->make_plasma_charset::@2] + b2_from_b6: + //SEG130 [57] phi (byte) make_plasma_charset::i#7 = (byte) make_plasma_charset::i#1 [phi:make_plasma_charset::@6->make_plasma_charset::@2#0] -- register_copy + jmp b2 + //SEG131 make_plasma_charset::@2 + b2: + //SEG132 [58] phi from make_plasma_charset::@2 to make_plasma_charset::@3 [phi:make_plasma_charset::@2->make_plasma_charset::@3] + b3_from_b2: + //SEG133 [58] phi (byte) make_plasma_charset::b#2 = (byte) 0 [phi:make_plasma_charset::@2->make_plasma_charset::@3#0] -- vbuyy=vbuc1 + ldy #0 + //SEG134 [58] phi (byte) make_plasma_charset::ii#2 = (byte) 0 [phi:make_plasma_charset::@2->make_plasma_charset::@3#1] -- vbuxx=vbuc1 + ldx #0 + jmp b3 + //SEG135 [58] phi from make_plasma_charset::@4 to make_plasma_charset::@3 [phi:make_plasma_charset::@4->make_plasma_charset::@3] + b3_from_b4: + //SEG136 [58] phi (byte) make_plasma_charset::b#2 = (byte) make_plasma_charset::b#3 [phi:make_plasma_charset::@4->make_plasma_charset::@3#0] -- register_copy + //SEG137 [58] phi (byte) make_plasma_charset::ii#2 = (byte) make_plasma_charset::ii#1 [phi:make_plasma_charset::@4->make_plasma_charset::@3#1] -- register_copy + jmp b3 + //SEG138 make_plasma_charset::@3 + b3: + //SEG139 [59] call sid_rnd + jsr sid_rnd + //SEG140 [60] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + jmp b11 + //SEG141 make_plasma_charset::@11 + b11: + //SEG142 [61] (byte~) make_plasma_charset::$3 ← (byte) sid_rnd::return#2 + //SEG143 [62] (byte~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (byte) $ff -- vbuz1=vbuaa_band_vbuc1 + and #$ff + sta _4 + //SEG144 [63] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@4 -- vbuz1_le_vbuz2_then_la1 + lda s + cmp _4 + bcs b4_from_b11 + jmp b5 + //SEG145 make_plasma_charset::@5 + b5: + //SEG146 [64] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) -- vbuyy=vbuyy_bor_pbuc1_derefidx_vbuxx + tya + ora bittab,x + tay + //SEG147 [65] phi from make_plasma_charset::@11 make_plasma_charset::@5 to make_plasma_charset::@4 [phi:make_plasma_charset::@11/make_plasma_charset::@5->make_plasma_charset::@4] + b4_from_b11: + b4_from_b5: + //SEG148 [65] phi (byte) make_plasma_charset::b#3 = (byte) make_plasma_charset::b#2 [phi:make_plasma_charset::@11/make_plasma_charset::@5->make_plasma_charset::@4#0] -- register_copy + jmp b4 + //SEG149 make_plasma_charset::@4 + b4: + //SEG150 [66] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 -- vbuxx=_inc_vbuxx + inx + //SEG151 [67] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 -- vbuxx_lt_vbuc1_then_la1 + cpx #8 + bcc b3_from_b4 + jmp b6 + //SEG152 make_plasma_charset::@6 + b6: + //SEG153 [68] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG154 [69] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 -- vwuz1=vwuz1_plus_vbuz2 + lda i + clc + adc _9 + sta _9 + bcc !+ + inc _9+1 + !: + //SEG155 [70] (byte*~) make_plasma_charset::$16 ← (const byte*) CHARSET#0 + (word~) make_plasma_charset::$9 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda _16 + adc #CHARSET + sta _16+1 + //SEG156 [71] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 -- _deref_pbuz1=vbuyy + tya + ldy #0 + sta (_16),y + //SEG157 [72] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#7 -- vbuz1=_inc_vbuz1 + inc i + //SEG158 [73] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #8 + bcc b2_from_b6 + jmp b7 + //SEG159 make_plasma_charset::@7 + b7: + //SEG160 [74] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 -- vbuaa=vwuz1_band_vbuc1 + lda c + and #7 + //SEG161 [75] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b9_from_b7 + //SEG162 [76] phi from make_plasma_charset::@7 to make_plasma_charset::@8 [phi:make_plasma_charset::@7->make_plasma_charset::@8] + b8_from_b7: + jmp b8 + //SEG163 make_plasma_charset::@8 + b8: + //SEG164 [77] call print_char + jsr print_char + //SEG165 [78] phi from make_plasma_charset::@7 make_plasma_charset::@8 to make_plasma_charset::@9 [phi:make_plasma_charset::@7/make_plasma_charset::@8->make_plasma_charset::@9] + b9_from_b7: + b9_from_b8: + //SEG166 [78] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#49 [phi:make_plasma_charset::@7/make_plasma_charset::@8->make_plasma_charset::@9#0] -- register_copy + jmp b9 + //SEG167 make_plasma_charset::@9 + b9: + //SEG168 [79] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2 -- vwuz1=_inc_vwuz1 + inc c + bne !+ + inc c+1 + !: + //SEG169 [80] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 -- vwuz1_lt_vwuc1_then_la1 + lda c+1 + cmp #>$100 + bcc b1_from_b9 + bne !+ + lda c + cmp #<$100 + bcc b1_from_b9 + !: + jmp breturn + //SEG170 make_plasma_charset::@return + breturn: + //SEG171 [81] return + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +//SEG172 print_char +// Print a single char +print_char: { + .const ch = '.' + //SEG173 [82] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 -- _deref_pbuz1=vbuc1 + lda #ch + ldy #0 + sta (print_char_cursor),y + //SEG174 [83] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#49 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + jmp breturn + //SEG175 print_char::@return + breturn: + //SEG176 [84] return + rts +} +//SEG177 sid_rnd +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + //SEG178 [85] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + lda SID_VOICE3_OSC + jmp breturn + //SEG179 sid_rnd::@return + breturn: + //SEG180 [86] return + rts +} +//SEG181 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = $12 + //SEG182 [88] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + b1_from_print_cls: + //SEG183 [88] phi (byte*) print_cls::sc#2 = (const byte*) print_line_cursor#0 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta sc+1 + jmp b1 + //SEG184 [88] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + b1_from_b1: + //SEG185 [88] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + jmp b1 + //SEG186 print_cls::@1 + b1: + //SEG187 [89] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG188 [90] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG189 [91] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1_from_b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + //SEG194 [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + jmp breturn + //SEG195 sid_rnd_init::@return + breturn: + //SEG196 [95] return + rts +} +//SEG197 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($15) screen) +init_angle_screen: { + .label _10 = $1f + .label screen = $15 + .label screen_topline = $17 + .label screen_bottomline = $15 + .label xw = $42 + .label yw = $44 + .label angle_w = $1f + .label ang_w = $46 + .label x = $19 + .label xb = $1a + .label y = $14 + //SEG198 [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$c + sta screen_topline + lda screen+1 + adc #>$28*$c + sta screen_topline+1 + //SEG199 [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz1_plus_vwuc1 + clc + lda screen_bottomline + adc #<$28*$c + sta screen_bottomline + lda screen_bottomline+1 + adc #>$28*$c + sta screen_bottomline+1 + //SEG200 [98] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + b1_from_init_angle_screen: + //SEG201 [98] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- register_copy + //SEG202 [98] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#0 [phi:init_angle_screen->init_angle_screen::@1#1] -- register_copy + //SEG203 [98] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 + sta y + jmp b1 + //SEG204 [98] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + b1_from_b3: + //SEG205 [98] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG206 [98] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG207 [98] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy + jmp b1 + //SEG208 init_angle_screen::@1 + b1: + //SEG209 [99] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + b2_from_b1: + //SEG210 [99] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG211 [99] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 + lda #0 + sta x + jmp b2 + //SEG212 [99] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + b2_from_b4: + //SEG213 [99] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy + //SEG214 [99] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + jmp b2 + //SEG215 init_angle_screen::@2 + b2: + //SEG216 [100] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x + asl + //SEG217 [101] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG218 [102] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 + sta xw+1 + sty xw + //SEG219 [103] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda y + asl + //SEG220 [104] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 + sta yw+1 + sty yw + //SEG221 [105] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG222 [106] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG223 [107] call atan2_16 + jsr atan2_16 + //SEG224 [108] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + jmp b4 + //SEG225 init_angle_screen::@4 + b4: + //SEG226 [109] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG227 [110] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + lda #$80 + clc + adc _10 + sta _10 + bcc !+ + inc _10+1 + !: + //SEG228 [111] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG229 [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + ldy xb + sta (screen_bottomline),y + //SEG230 [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + lda ang_w + eor #$ff + clc + adc #1 + //SEG231 [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG232 [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 + clc + adc ang_w + //SEG233 [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG234 [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 + lda #$80 + sec + sbc ang_w + //SEG235 [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_bottomline),y + //SEG236 [119] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG237 [120] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG238 [121] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b2_from_b4 + jmp b3 + //SEG239 init_angle_screen::@3 + b3: + //SEG240 [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG241 [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG242 [124] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 + inc y + //SEG243 [125] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1_from_b3 + jmp breturn + //SEG244 init_angle_screen::@return + breturn: + //SEG245 [126] return + rts +} +//SEG246 atan2_16 +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($42) x, signed word zeropage($44) y) +atan2_16: { + .label _2 = $1b + .label _7 = $1d + .label yi = $1b + .label xi = $1d + .label angle = $1f + .label xd = $23 + .label yd = $21 + .label return = $1f + .label x = $42 + .label y = $44 + //SEG247 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b1 + jmp b2 + //SEG248 atan2_16::@2 + b2: + //SEG249 [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc y + sta _2 + lda #0 + sbc y+1 + sta _2+1 + //SEG250 [129] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + b3_from_b1: + b3_from_b2: + //SEG251 [129] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + jmp b3 + //SEG252 atan2_16::@3 + b3: + //SEG253 [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b4 + jmp b5 + //SEG254 atan2_16::@5 + b5: + //SEG255 [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + //SEG256 [132] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + b6_from_b4: + b6_from_b5: + //SEG257 [132] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + jmp b6 + //SEG258 atan2_16::@6 + b6: + //SEG259 [133] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + b10_from_b6: + //SEG260 [133] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + lda #0 + sta angle + lda #0 + sta angle+1 + //SEG261 [133] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + ldx #0 + //SEG262 [133] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy + //SEG263 [133] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG264 atan2_16::@10 + b10: + //SEG265 [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + lda yi+1 + bne b11 + lda yi + bne b11 + //SEG266 [135] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + b12_from_b10: + b12_from_b19: + //SEG267 [135] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy + jmp b12 + //SEG268 atan2_16::@12 + b12: + //SEG269 [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr angle+1 + ror angle + //SEG270 [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b7_from_b12 + jmp b21 + //SEG271 atan2_16::@21 + b21: + //SEG272 [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + //SEG273 [139] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + b7_from_b12: + b7_from_b21: + //SEG274 [139] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy + jmp b7 + //SEG275 atan2_16::@7 + b7: + //SEG276 [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b8_from_b7 + jmp b9 + //SEG277 atan2_16::@9 + b9: + //SEG278 [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + sec + lda #0 + sbc angle + sta angle + lda #0 + sbc angle+1 + sta angle+1 + //SEG279 [142] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + b8_from_b7: + b8_from_b9: + //SEG280 [142] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + jmp b8 + //SEG281 atan2_16::@8 + b8: + jmp breturn + //SEG282 atan2_16::@return + breturn: + //SEG283 [143] return + rts + //SEG284 atan2_16::@11 + b11: + //SEG285 [144] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG286 [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 + lda xi + sta xd + lda xi+1 + sta xd+1 + //SEG287 [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 + lda yi + sta yd + lda yi+1 + sta yd+1 + //SEG288 [147] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG289 [147] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG290 [147] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //SEG291 [147] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy + jmp b13 + //SEG292 atan2_16::@13 + b13: + //SEG293 [148] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 + bcs b14 + jmp b15 + //SEG294 atan2_16::@15 + b15: + //SEG295 [149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 + cpy #0 + beq b17_from_b15 + jmp b16 + //SEG296 atan2_16::@16 + b16: + //SEG297 [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG298 [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG299 [152] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG300 [152] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG301 [152] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG302 atan2_16::@17 + b17: + //SEG303 [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 + lda yi+1 + bpl b18 + jmp b20 + //SEG304 atan2_16::@20 + b20: + //SEG305 [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + //SEG306 [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda yi + clc + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + //SEG307 [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG308 [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + tay + sec + lda angle + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + //SEG309 [158] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG310 [158] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG311 [158] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG312 [158] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG313 atan2_16::@19 + b19: + //SEG314 [159] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG315 [160] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + beq b12_from_b19 + //SEG316 [133] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG317 [133] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG318 [133] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG319 [133] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG320 [133] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG321 atan2_16::@18 + b18: + //SEG322 [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda xi + clc + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + //SEG323 [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 + //SEG324 [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG325 [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + tay + clc + lda angle + adc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + jmp b19_from_b18 + //SEG326 atan2_16::@14 + b14: + //SEG327 [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG328 [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG329 [167] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13_from_b14 + //SEG330 atan2_16::@4 + b4: + //SEG331 [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6_from_b4 + //SEG332 atan2_16::@1 + b1: + //SEG333 [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + lda y + sta yi + lda y+1 + sta yi+1 + jmp b3_from_b1 +} +//SEG334 init_dist_screen +// Populates 1000 bytes (a screen) with values representing the distance to the center. +// The actual value stored is distance*2 to increase precision +// init_dist_screen(byte* zeropage($26) screen) +init_dist_screen: { + .label screen = $26 + .label screen_bottomline = $28 + .label yds = $47 + .label xds = $49 + .label ds = $49 + .label x = $2a + .label xb = $2b + .label screen_topline = $26 + .label y = $25 + //SEG335 [171] call init_squares + //SEG336 [242] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + init_squares_from_init_dist_screen: + jsr init_squares + jmp b10 + //SEG337 init_dist_screen::@10 + b10: + //SEG338 [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$18 + sta screen_bottomline + lda screen+1 + adc #>$28*$18 + sta screen_bottomline+1 + //SEG339 [173] phi from init_dist_screen::@10 to init_dist_screen::@1 [phi:init_dist_screen::@10->init_dist_screen::@1] + b1_from_b10: + //SEG340 [173] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#0 [phi:init_dist_screen::@10->init_dist_screen::@1#0] -- register_copy + //SEG341 [173] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen#0 [phi:init_dist_screen::@10->init_dist_screen::@1#1] -- register_copy + //SEG342 [173] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@1#2] -- vbuz1=vbuc1 + lda #0 + sta y + jmp b1 + //SEG343 [173] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] + b1_from_b9: + //SEG344 [173] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy + //SEG345 [173] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy + //SEG346 [173] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + jmp b1 + //SEG347 init_dist_screen::@1 + b1: + //SEG348 [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda y + asl + //SEG349 [175] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 + cmp #$18 + bcs b2 + jmp b3 + //SEG350 init_dist_screen::@3 + b3: + //SEG351 [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$18+1 + //SEG352 [177] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] + b4_from_b2: + b4_from_b3: + //SEG353 [177] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy + jmp b4 + //SEG354 init_dist_screen::@4 + b4: + //SEG355 [178] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + //SEG356 [179] call sqr + //SEG357 [238] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + sqr_from_b4: + //SEG358 [238] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + jsr sqr + //SEG359 [180] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + lda sqr.return + sta sqr.return_2 + lda sqr.return+1 + sta sqr.return_2+1 + jmp b11 + //SEG360 init_dist_screen::@11 + b11: + //SEG361 [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + //SEG362 [182] phi from init_dist_screen::@11 to init_dist_screen::@5 [phi:init_dist_screen::@11->init_dist_screen::@5] + b5_from_b11: + //SEG363 [182] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@11->init_dist_screen::@5#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG364 [182] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@11->init_dist_screen::@5#1] -- vbuz1=vbuc1 + lda #0 + sta x + jmp b5 + //SEG365 [182] phi from init_dist_screen::@13 to init_dist_screen::@5 [phi:init_dist_screen::@13->init_dist_screen::@5] + b5_from_b13: + //SEG366 [182] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@13->init_dist_screen::@5#0] -- register_copy + //SEG367 [182] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@13->init_dist_screen::@5#1] -- register_copy + jmp b5 + //SEG368 init_dist_screen::@5 + b5: + //SEG369 [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x + asl + //SEG370 [184] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 + cmp #$27 + bcs b6 + jmp b7 + //SEG371 init_dist_screen::@7 + b7: + //SEG372 [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG373 [186] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] + b8_from_b6: + b8_from_b7: + //SEG374 [186] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy + jmp b8 + //SEG375 init_dist_screen::@8 + b8: + //SEG376 [187] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + //SEG377 [188] call sqr + //SEG378 [238] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + sqr_from_b8: + //SEG379 [238] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + jsr sqr + //SEG380 [189] (word) sqr::return#3 ← (word) sqr::return#0 + jmp b12 + //SEG381 init_dist_screen::@12 + b12: + //SEG382 [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + //SEG383 [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 + lda ds + clc + adc yds + sta ds + lda ds+1 + adc yds+1 + sta ds+1 + //SEG384 [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + //SEG385 [193] call sqrt + jsr sqrt + //SEG386 [194] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + jmp b13 + //SEG387 init_dist_screen::@13 + b13: + //SEG388 [195] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + //SEG389 [196] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG390 [197] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_bottomline),y + //SEG391 [198] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG392 [199] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_bottomline),y + //SEG393 [200] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG394 [201] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG395 [202] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b5_from_b13 + jmp b9 + //SEG396 init_dist_screen::@9 + b9: + //SEG397 [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 + !: + //SEG398 [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_bottomline + sec + sbc #<$28 + sta screen_bottomline + lda screen_bottomline+1 + sbc #>$28 + sta screen_bottomline+1 + //SEG399 [205] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + inc y + //SEG400 [206] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1_from_b9 + jmp breturn + //SEG401 init_dist_screen::@return + breturn: + //SEG402 [207] return + rts + //SEG403 init_dist_screen::@6 + b6: + //SEG404 [208] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 + sec + sbc #$27 + jmp b8_from_b6 + //SEG405 init_dist_screen::@2 + b2: + //SEG406 [209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 + sec + sbc #$18 + jmp b4_from_b2 +} +//SEG407 sqrt +// Find the (integer) square root of a word value +// If the square is not an integer then it returns the largest integer N where N*N <= val +// Uses a table of squares that must be initialized by calling init_squares() +// sqrt(word zeropage($49) val) +sqrt: { + .label _1 = $2c + .label _3 = $2c + .label found = $2c + .label val = $49 + //SEG408 [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + //SEG409 [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + lda SQUARES + sta bsearch16u.items + lda SQUARES+1 + sta bsearch16u.items+1 + //SEG410 [212] call bsearch16u + //SEG411 [219] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + bsearch16u_from_sqrt: + jsr bsearch16u + //SEG412 [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + jmp b1 + //SEG413 sqrt::@1 + b1: + //SEG414 [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + //SEG415 [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuz2 + lda _3 + sec + sbc SQUARES + sta _3 + lda _3+1 + sbc SQUARES+1 + sta _3+1 + //SEG416 [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr _1+1 + ror _1 + //SEG417 [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 + lda _1 + jmp breturn + //SEG418 sqrt::@return + breturn: + //SEG419 [218] return + rts +} +//SEG420 bsearch16u +// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. +// - key - The value to look for +// - items - Pointer to the start of the array to search in +// - num - The number of items in the array +// Returns pointer to an entry in the array that matches the search key +// bsearch16u(word zeropage($49) key, word* zeropage($2c) items, byte register(X) num) +bsearch16u: { + .label _2 = $2c + .label pivot = $4b + .label result = $4d + .label return = $2c + .label items = $2c + .label key = $49 + //SEG421 [220] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + b3_from_bsearch16u: + //SEG422 [220] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy + //SEG423 [220] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + ldx #NUM_SQUARES + jmp b3 + //SEG424 bsearch16u::@3 + b3: + //SEG425 [221] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + cpx #0 + bne b4 + jmp b5 + //SEG426 bsearch16u::@5 + b5: + //SEG427 [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq b2_from_b5 + !: + bcc b2_from_b5 + jmp b1 + //SEG428 bsearch16u::@1 + b1: + //SEG429 [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + //SEG430 [224] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + b2_from_b1: + b2_from_b5: + //SEG431 [224] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + jmp b2 + //SEG432 bsearch16u::@2 + b2: + //SEG433 [225] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + breturn_from_b2: + breturn_from_b8: + //SEG434 [225] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + jmp breturn + //SEG435 bsearch16u::@return + breturn: + //SEG436 [226] return + rts + //SEG437 bsearch16u::@4 + b4: + //SEG438 [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + txa + lsr + //SEG439 [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + //SEG440 [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + clc + adc items + sta pivot + lda #0 + adc items+1 + sta pivot+1 + //SEG441 [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + //SEG442 [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + lda result+1 + bne b6 + lda result + bne b6 + jmp b8 + //SEG443 bsearch16u::@8 + b8: + //SEG444 [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + lda pivot + sta return + lda pivot+1 + sta return+1 + jmp breturn_from_b8 + //SEG445 bsearch16u::@6 + b6: + //SEG446 [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b7_from_b6 + bne !+ + lda result + beq b7_from_b6 + !: + jmp b9 + //SEG447 bsearch16u::@9 + b9: + //SEG448 [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc pivot + sta items + lda #0 + adc pivot+1 + sta items+1 + //SEG449 [235] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + dex + //SEG450 [236] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + b7_from_b6: + b7_from_b9: + //SEG451 [236] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG452 [236] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + jmp b7 + //SEG453 bsearch16u::@7 + b7: + //SEG454 [237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + txa + lsr + tax + //SEG455 [220] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + b3_from_b7: + //SEG456 [220] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG457 [220] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + jmp b3 +} +//SEG458 sqr +// Find the square of a byte value +// Uses a table of squares that must be initialized by calling init_squares() +// sqr(byte register(A) val) +sqr: { + .label return = $49 + .label return_2 = $47 + //SEG459 [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + //SEG460 [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + tay + lda (SQUARES),y + sta return + iny + lda (SQUARES),y + sta return+1 + jmp breturn + //SEG461 sqr::@return + breturn: + //SEG462 [241] return + rts +} +//SEG463 init_squares +// Initialize squares table +// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 +init_squares: { + .label squares = $30 + .label sqr = $2e + //SEG464 [243] call malloc + //SEG465 [255] phi from init_squares to malloc [phi:init_squares->malloc] + malloc_from_init_squares: + //SEG466 [255] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + lda #NUM_SQUARES*SIZEOF_WORD + sta malloc.size + lda #0 + sta malloc.size+1 + //SEG467 [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + jsr malloc + jmp b2 + //SEG468 init_squares::@2 + b2: + //SEG469 [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + //SEG470 [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + lda SQUARES + sta squares + lda SQUARES+1 + sta squares+1 + //SEG471 [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + b1_from_b2: + //SEG472 [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG473 [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + //SEG474 [246] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + lda #0 + sta sqr + lda #0 + sta sqr+1 + jmp b1 + //SEG475 [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + b1_from_b1: + //SEG476 [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG477 [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG478 [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + jmp b1 + //SEG479 init_squares::@1 + b1: + //SEG480 [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + ldy #0 + lda sqr + sta (squares),y + iny + lda sqr+1 + sta (squares),y + //SEG481 [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #SIZEOF_WORD + clc + adc squares + sta squares + bcc !+ + inc squares+1 + !: + //SEG482 [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG483 [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + clc + adc #1 + //SEG484 [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + clc + adc sqr + sta sqr + bcc !+ + inc sqr+1 + !: + //SEG485 [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG486 [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #NUM_SQUARES-1+1 + bne b1_from_b1 + jmp breturn + //SEG487 init_squares::@return + breturn: + //SEG488 [254] return + rts +} +//SEG489 malloc +// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. +// The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. +// malloc(word zeropage($34) size) +malloc: { + .label mem = $4f + .label size = $34 + //SEG490 [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 -- pbuz1=pbuz2 + lda heap_head + sta mem + lda heap_head+1 + sta mem+1 + //SEG491 [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 -- pbuz1=pbuz1_plus_vwuz2 + lda heap_head + clc + adc size + sta heap_head + lda heap_head+1 + adc size+1 + sta heap_head+1 + jmp breturn + //SEG492 malloc::@return + breturn: + //SEG493 [258] return + rts +} +//SEG494 File Data + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i(word)(const byte*) SCREEN1#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(label) main::toD0182 +(word~) main::toD0182_$0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$2 +(number~) main::toD0182_$3 +(word~) main::toD0182_$4 +(byte~) main::toD0182_$5 +(number~) main::toD0182_$6 +(number~) main::toD0182_$7 +(number~) main::toD0182_$8 +(byte*) main::toD0182_gfx +(byte) main::toD0182_return +(const byte) main::toD0182_return#0 toD0182_return = >(word)(const byte*) SCREEN2#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0182_screen +(void()) make_plasma_charset((byte*) make_plasma_charset::charset) +(byte~) make_plasma_charset::$11 reg byte a 22.0 +(byte*~) make_plasma_charset::$16 $16 zp ZP_WORD:64 202.0 +(byte~) make_plasma_charset::$2 reg byte a 22.0 +(byte~) make_plasma_charset::$3 reg byte a 2002.0 +(byte~) make_plasma_charset::$4 $4 zp ZP_BYTE:63 2002.0 +(word~) make_plasma_charset::$8 $8 zp ZP_WORD:64 202.0 +(word~) make_plasma_charset::$9 $9 zp ZP_WORD:64 202.0 +(label) make_plasma_charset::@1 +(label) make_plasma_charset::@10 +(label) make_plasma_charset::@11 +(label) make_plasma_charset::@2 +(label) make_plasma_charset::@3 +(label) make_plasma_charset::@4 +(label) make_plasma_charset::@5 +(label) make_plasma_charset::@6 +(label) make_plasma_charset::@7 +(label) make_plasma_charset::@8 +(label) make_plasma_charset::@9 +(label) make_plasma_charset::@return +(byte) make_plasma_charset::b +(byte) make_plasma_charset::b#1 reg byte y 2002.0 +(byte) make_plasma_charset::b#2 reg byte y 500.5 +(byte) make_plasma_charset::b#3 reg byte y 517.3333333333334 +(byte[8]) make_plasma_charset::bittab +(const byte[8]) make_plasma_charset::bittab#0 bittab = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 } +(word) make_plasma_charset::c +(word) make_plasma_charset::c#1 c zp ZP_WORD:13 16.5 +(word) make_plasma_charset::c#2 c zp ZP_WORD:13 5.800000000000001 +(byte*) make_plasma_charset::charset +(byte) make_plasma_charset::i +(byte) make_plasma_charset::i#1 i zp ZP_BYTE:17 151.5 +(byte) make_plasma_charset::i#7 i zp ZP_BYTE:17 20.2 +(byte) make_plasma_charset::ii +(byte) make_plasma_charset::ii#1 reg byte x 1501.5 +(byte) make_plasma_charset::ii#2 reg byte x 375.375 +(byte) make_plasma_charset::s +(byte) make_plasma_charset::s#0 s zp ZP_BYTE:62 56.22222222222223 +(void*()) malloc((word) malloc::size) +(label) malloc::@return +(byte*) malloc::mem +(byte*) malloc::mem#0 mem zp ZP_WORD:79 0.3333333333333333 +(void*) malloc::return +(word) malloc::size +(word) malloc::size#3 size zp ZP_WORD:52 1.0 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(label) memset::@1 +(label) memset::@return +(byte) memset::c +(byte*) memset::dst +(byte*) memset::dst#1 dst zp ZP_WORD:11 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:11 16.5 +(byte*) memset::end +(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 +(word) memset::num +(const word) memset::num#0 num = (word) $3e8 +(void*) memset::return +(void*) memset::str +(const void*) memset::str#0 str = (void*)(const byte*) COLS#0 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(const byte) print_char::ch#0 ch = (byte) '.' +(byte*) print_char_cursor +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:15 4.333333333333333 +(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:15 11.0 +(byte*) print_char_cursor#49 print_char_cursor zp ZP_WORD:15 1.0833333333333333 +(void()) print_cls() +(label) print_cls::@1 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#1 sc zp ZP_WORD:18 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:18 16.5 +(byte*) print_line_cursor +(const byte*) print_line_cursor#0 print_line_cursor = (byte*) 1024 +(byte*) print_screen +(byte()) sid_rnd() +(label) sid_rnd::@return +(byte) sid_rnd::return +(byte) sid_rnd::return#0 reg byte a 334.33333333333337 +(byte) sid_rnd::return#2 reg byte a 2002.0 +(void()) sid_rnd_init() +(label) sid_rnd_init::@return +(byte) sin_offset_x +(byte) sin_offset_x#10 sin_offset_x zp ZP_BYTE:2 1.625 +(byte) sin_offset_x#12 sin_offset_x zp ZP_BYTE:2 2.666666666666667 +(byte) sin_offset_x#14 sin_offset_x zp ZP_BYTE:2 11.0 +(byte) sin_offset_y +(byte) sin_offset_y#10 sin_offset_y zp ZP_BYTE:3 1.5294117647058825 +(byte) sin_offset_y#12 sin_offset_y zp ZP_BYTE:3 3.0 +(byte) sin_offset_y#14 sin_offset_y zp ZP_BYTE:3 11.0 +(word()) sqr((byte) sqr::val) +(byte~) sqr::$0 reg byte a 4.0 +(label) sqr::@return +(word) sqr::return +(word) sqr::return#0 return zp ZP_WORD:73 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:71 22.0 +(word) sqr::return#3 return zp ZP_WORD:73 202.0 +(byte) sqr::val +(byte) sqr::val#0 reg byte a 22.0 +(byte) sqr::val#1 reg byte a 202.0 +(byte) sqr::val#2 reg byte a 114.0 +(byte()) sqrt((word) sqrt::val) +(word~) sqrt::$1 $1 zp ZP_WORD:44 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:44 4.0 +(label) sqrt::@1 +(label) sqrt::@return +(word*) sqrt::found +(word*) sqrt::found#0 found zp ZP_WORD:44 4.0 +(byte) sqrt::return +(byte) sqrt::return#0 reg byte a 34.33333333333333 +(byte) sqrt::return#2 reg byte a 202.0 +(byte) sqrt::sq +(word) sqrt::val +(word) sqrt::val#0 val zp ZP_WORD:73 103.0 + +zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] +zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] +zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] +reg byte x [ doplasma::x#2 doplasma::x#1 ] +zp ZP_WORD:11 [ memset::dst#2 memset::dst#1 ] +zp ZP_WORD:13 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] +zp ZP_WORD:15 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] +zp ZP_BYTE:17 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +reg byte x [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] +reg byte y [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] +zp ZP_WORD:18 [ print_cls::sc#2 print_cls::sc#1 ] +zp ZP_BYTE:20 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +zp ZP_WORD:21 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] +zp ZP_WORD:23 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +zp ZP_BYTE:25 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +zp ZP_BYTE:26 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +zp ZP_WORD:27 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +zp ZP_WORD:29 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_WORD:31 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:33 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:35 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_BYTE:37 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +zp ZP_WORD:38 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] +zp ZP_WORD:40 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] +reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +zp ZP_BYTE:42 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:43 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] +zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] +zp ZP_WORD:46 [ init_squares::sqr#2 init_squares::sqr#1 ] +zp ZP_WORD:48 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +reg byte x [ init_squares::i#2 init_squares::i#1 ] +zp ZP_WORD:50 [ heap_head#12 heap_head#1 ] +zp ZP_WORD:52 [ malloc::size#3 ] +zp ZP_WORD:54 [ SCREEN_DIST#0 ] +zp ZP_WORD:56 [ SCREEN_ANGLE#0 ] +zp ZP_WORD:58 [ doplasma::sin_x#0 ] +zp ZP_WORD:60 [ doplasma::sin_y#0 ] +reg byte a [ doplasma::$2 ] +reg byte a [ make_plasma_charset::$2 ] +zp ZP_BYTE:62 [ make_plasma_charset::s#0 ] +reg byte a [ sid_rnd::return#2 ] +reg byte a [ make_plasma_charset::$3 ] +zp ZP_BYTE:63 [ make_plasma_charset::$4 ] +zp ZP_WORD:64 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 ] +reg byte a [ make_plasma_charset::$11 ] +reg byte a [ sid_rnd::return#0 ] +reg byte a [ init_angle_screen::$2 ] +reg byte a [ init_angle_screen::$3 ] +zp ZP_WORD:66 [ init_angle_screen::xw#0 atan2_16::x#0 ] +reg byte a [ init_angle_screen::$6 ] +zp ZP_WORD:68 [ init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:70 [ init_angle_screen::ang_w#0 ] +reg byte a [ init_angle_screen::$12 ] +reg byte a [ init_angle_screen::$13 ] +reg byte a [ init_angle_screen::$14 ] +reg byte a [ atan2_16::$24 ] +reg byte a [ atan2_16::$23 ] +reg byte a [ init_dist_screen::y2#0 ] +zp ZP_WORD:71 [ sqr::return#2 init_dist_screen::yds#0 ] +reg byte a [ init_dist_screen::x2#0 ] +zp ZP_WORD:73 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +reg byte a [ sqrt::return#2 ] +reg byte a [ init_dist_screen::d#0 ] +reg byte a [ sqrt::return#0 ] +reg byte a [ bsearch16u::$6 ] +reg byte a [ bsearch16u::$16 ] +zp ZP_WORD:75 [ bsearch16u::pivot#0 ] +zp ZP_WORD:77 [ bsearch16u::result#0 ] +reg byte a [ sqr::$0 ] +zp ZP_WORD:79 [ SQUARES#1 malloc::mem#0 ] +reg byte a [ init_squares::$3 ] +reg byte a [ init_squares::$4 ] + + +FINAL ASSEMBLER +Score: 1206726 + +//SEG0 File Comments +// Plasma based on the distance/angle to the screen center +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_WORD = 2 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + // Start of the heap used by malloc() + .label HEAP_START = $c000 + // The number of iterations performed during 16-bit CORDIC atan2 calculation + .const CORDIC_ITERATIONS_16 = $f + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + // Plasma charset + .label CHARSET = $2000 + // Plasma screen 1 + .label SCREEN1 = $2800 + // Plasma screen 2 + .label SCREEN2 = $2c00 + .const NUM_SQUARES = $30 + .label heap_head = $32 + .label SQUARES = $4f + .label print_char_cursor = $f + // Screen containing distance to center + .label SCREEN_DIST = $36 + // Screen containing angle to center + .label SCREEN_ANGLE = $38 + .label sin_offset_x = 2 + .label sin_offset_y = 3 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call malloc +//SEG7 [255] phi from @1 to malloc [phi:@1->malloc] +//SEG8 [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@1->malloc#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 +//SEG9 [255] phi (byte*) heap_head#12 = (const byte*) HEAP_START#0 [phi:@1->malloc#1] -- pbuz1=pbuc1 + lda #HEAP_START + sta heap_head+1 + jsr malloc +//SEG10 @3 +//SEG11 [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + lda malloc.mem + sta SCREEN_DIST + lda malloc.mem+1 + sta SCREEN_DIST+1 +//SEG12 [4] call malloc +//SEG13 [255] phi from @3 to malloc [phi:@3->malloc] +//SEG14 [255] phi (word) malloc::size#3 = (word) $3e8 [phi:@3->malloc#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta malloc.size + lda #>$3e8 + sta malloc.size+1 +//SEG15 [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:@3->malloc#1] -- register_copy + jsr malloc +//SEG16 @4 +//SEG17 [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 + lda malloc.mem + sta SCREEN_ANGLE + lda malloc.mem+1 + sta SCREEN_ANGLE+1 +//SEG18 [6] phi from @4 to @2 [phi:@4->@2] +//SEG19 @2 +//SEG20 [7] call main + jsr main + rts +//SEG21 [8] phi from @2 to @end [phi:@2->@end] +//SEG22 @end +//SEG23 main +main: { + .const toD0181_return = (>(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(SCREEN2&$3fff)*4)|(>CHARSET)/4&$f + //SEG24 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + lda SCREEN_DIST + sta init_dist_screen.screen + lda SCREEN_DIST+1 + sta init_dist_screen.screen+1 + //SEG25 [10] call init_dist_screen + //SEG26 [170] phi from main to init_dist_screen [phi:main->init_dist_screen] + jsr init_dist_screen + //SEG27 main::@5 + //SEG28 [11] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 + lda SCREEN_ANGLE + sta init_angle_screen.screen + lda SCREEN_ANGLE+1 + sta init_angle_screen.screen+1 + //SEG29 [12] call init_angle_screen + jsr init_angle_screen + //SEG30 [13] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + //SEG31 main::@6 + //SEG32 [14] call make_plasma_charset + //SEG33 [50] phi from main::@6 to make_plasma_charset [phi:main::@6->make_plasma_charset] + jsr make_plasma_charset + //SEG34 [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7] + //SEG35 main::@7 + //SEG36 [16] call memset + //SEG37 [44] phi from main::@7 to memset [phi:main::@7->memset] + jsr memset + //SEG38 [17] phi from main::@7 to main::@1 [phi:main::@7->main::@1] + //SEG39 [17] phi (byte) sin_offset_y#14 = (byte) 0 [phi:main::@7->main::@1#0] -- vbuz1=vbuc1 + lda #0 + sta sin_offset_y + //SEG40 [17] phi (byte) sin_offset_x#14 = (byte) 0 [phi:main::@7->main::@1#1] -- vbuz1=vbuc1 + sta sin_offset_x + // Show double-buffered plasma + //SEG41 main::@1 + //SEG42 [18] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + //SEG43 main::@2 + b2: + //SEG44 [19] call doplasma + //SEG45 [25] phi from main::@2 to doplasma [phi:main::@2->doplasma] + //SEG46 [25] phi (byte*) doplasma::screen#6 = (const byte*) SCREEN1#0 [phi:main::@2->doplasma#0] -- pbuz1=pbuc1 + lda #SCREEN1 + sta doplasma.screen+1 + //SEG47 [25] phi (byte) sin_offset_y#10 = (byte) sin_offset_y#14 [phi:main::@2->doplasma#1] -- register_copy + //SEG48 [25] phi (byte) sin_offset_x#10 = (byte) sin_offset_x#14 [phi:main::@2->doplasma#2] -- register_copy + jsr doplasma + //SEG49 [20] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181] + //SEG50 main::toD0181 + //SEG51 main::@3 + //SEG52 [21] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG53 [22] call doplasma + //SEG54 [25] phi from main::@3 to doplasma [phi:main::@3->doplasma] + //SEG55 [25] phi (byte*) doplasma::screen#6 = (const byte*) SCREEN2#0 [phi:main::@3->doplasma#0] -- pbuz1=pbuc1 + lda #SCREEN2 + sta doplasma.screen+1 + //SEG56 [25] phi (byte) sin_offset_y#10 = (byte) sin_offset_y#12 [phi:main::@3->doplasma#1] -- register_copy + //SEG57 [25] phi (byte) sin_offset_x#10 = (byte) sin_offset_x#12 [phi:main::@3->doplasma#2] -- register_copy + jsr doplasma + //SEG58 [23] phi from main::@3 to main::toD0182 [phi:main::@3->main::toD0182] + //SEG59 main::toD0182 + //SEG60 main::@4 + //SEG61 [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0182_return + sta D018 + //SEG62 [17] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + //SEG63 [17] phi (byte) sin_offset_y#14 = (byte) sin_offset_y#12 [phi:main::@4->main::@1#0] -- register_copy + //SEG64 [17] phi (byte) sin_offset_x#14 = (byte) sin_offset_x#12 [phi:main::@4->main::@1#1] -- register_copy + jmp b2 +} +//SEG65 doplasma +// Render plasma to the passed screen +// doplasma(byte* zeropage(8) screen) +doplasma: { + .label angle = 4 + .label dist = 6 + .label sin_x = $3a + .label sin_y = $3c + .label screen = 8 + .label y = $a + //SEG66 [26] (byte*) doplasma::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 -- pbuz1=pbuz2 + lda SCREEN_ANGLE + sta angle + lda SCREEN_ANGLE+1 + sta angle+1 + //SEG67 [27] (byte*) doplasma::dist#0 ← (byte*)(void*) SCREEN_DIST#0 -- pbuz1=pbuz2 + lda SCREEN_DIST + sta dist + lda SCREEN_DIST+1 + sta dist+1 + //SEG68 [28] (byte*) doplasma::sin_x#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_x#10 -- pbuz1=pbuc1_plus_vbuz2 + lda sin_offset_x + clc + adc #SINTABLE + adc #0 + sta sin_x+1 + //SEG69 [29] (byte*) doplasma::sin_y#0 ← (const byte[$200]) SINTABLE#0 + (byte) sin_offset_y#10 -- pbuz1=pbuc1_plus_vbuz2 + lda sin_offset_y + clc + adc #SINTABLE + adc #0 + sta sin_y+1 + //SEG70 [30] phi from doplasma to doplasma::@1 [phi:doplasma->doplasma::@1] + //SEG71 [30] phi (byte) doplasma::y#4 = (byte) 0 [phi:doplasma->doplasma::@1#0] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG72 [30] phi (byte*) doplasma::screen#5 = (byte*) doplasma::screen#6 [phi:doplasma->doplasma::@1#1] -- register_copy + //SEG73 [30] phi (byte*) doplasma::dist#4 = (byte*) doplasma::dist#0 [phi:doplasma->doplasma::@1#2] -- register_copy + //SEG74 [30] phi (byte*) doplasma::angle#4 = (byte*) doplasma::angle#0 [phi:doplasma->doplasma::@1#3] -- register_copy + //SEG75 [30] phi from doplasma::@3 to doplasma::@1 [phi:doplasma::@3->doplasma::@1] + //SEG76 [30] phi (byte) doplasma::y#4 = (byte) doplasma::y#1 [phi:doplasma::@3->doplasma::@1#0] -- register_copy + //SEG77 [30] phi (byte*) doplasma::screen#5 = (byte*) doplasma::screen#2 [phi:doplasma::@3->doplasma::@1#1] -- register_copy + //SEG78 [30] phi (byte*) doplasma::dist#4 = (byte*) doplasma::dist#1 [phi:doplasma::@3->doplasma::@1#2] -- register_copy + //SEG79 [30] phi (byte*) doplasma::angle#4 = (byte*) doplasma::angle#1 [phi:doplasma::@3->doplasma::@1#3] -- register_copy + //SEG80 doplasma::@1 + b1: + //SEG81 [31] phi from doplasma::@1 to doplasma::@2 [phi:doplasma::@1->doplasma::@2] + //SEG82 [31] phi (byte) doplasma::x#2 = (byte) 0 [phi:doplasma::@1->doplasma::@2#0] -- vbuxx=vbuc1 + ldx #0 + //SEG83 [31] phi from doplasma::@2 to doplasma::@2 [phi:doplasma::@2->doplasma::@2] + //SEG84 [31] phi (byte) doplasma::x#2 = (byte) doplasma::x#1 [phi:doplasma::@2->doplasma::@2#0] -- register_copy + //SEG85 doplasma::@2 + b2: + //SEG86 [32] (byte~) doplasma::$2 ← *((byte*) doplasma::sin_x#0 + *((byte*) doplasma::angle#4 + (byte) doplasma::x#2)) + *((byte*) doplasma::sin_y#0 + *((byte*) doplasma::dist#4 + (byte) doplasma::x#2)) -- vbuaa=pbuz1_derefidx_pbuz2_derefidx_vbuxx_plus_pbuz3_derefidx_pbuz4_derefidx_vbuxx + txa + tay + lda (dist),y + sta $ff + lda (angle),y + tay + lda (sin_x),y + ldy $ff + clc + adc (sin_y),y + //SEG87 [33] *((byte*) doplasma::screen#5 + (byte) doplasma::x#2) ← (byte~) doplasma::$2 -- pbuz1_derefidx_vbuxx=vbuaa + stx $ff + ldy $ff + sta (screen),y + //SEG88 [34] (byte) doplasma::x#1 ← ++ (byte) doplasma::x#2 -- vbuxx=_inc_vbuxx + inx + //SEG89 [35] if((byte) doplasma::x#1!=(byte) $28) goto doplasma::@2 -- vbuxx_neq_vbuc1_then_la1 + cpx #$28 + bne b2 + //SEG90 doplasma::@3 + //SEG91 [36] (byte*) doplasma::screen#2 ← (byte*) doplasma::screen#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen + sta screen + bcc !+ + inc screen+1 + !: + //SEG92 [37] (byte*) doplasma::angle#1 ← (byte*) doplasma::angle#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc angle + sta angle + bcc !+ + inc angle+1 + !: + //SEG93 [38] (byte*) doplasma::dist#1 ← (byte*) doplasma::dist#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc dist + sta dist + bcc !+ + inc dist+1 + !: + //SEG94 [39] (byte) doplasma::y#1 ← ++ (byte) doplasma::y#4 -- vbuz1=_inc_vbuz1 + inc y + //SEG95 [40] if((byte) doplasma::y#1!=(byte) $1a) goto doplasma::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$1a + cmp y + bne b1 + //SEG96 doplasma::@4 + //SEG97 [41] (byte) sin_offset_x#12 ← (byte) sin_offset_x#10 - (byte) 3 -- vbuz1=vbuz1_minus_vbuc1 + lax sin_offset_x + axs #3 + stx sin_offset_x + //SEG98 [42] (byte) sin_offset_y#12 ← (byte) sin_offset_y#10 - (byte) 7 -- vbuz1=vbuz1_minus_vbuc1 + lax sin_offset_y + axs #7 + stx sin_offset_y + //SEG99 doplasma::@return + //SEG100 [43] return + rts +} +//SEG101 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .const num = $3e8 + .label str = COLS + .label end = str+num + .label dst = $b + //SEG102 [45] phi from memset to memset::@1 [phi:memset->memset::@1] + //SEG103 [45] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + lda #str + sta dst+1 + //SEG104 [45] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1] + //SEG105 [45] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy + //SEG106 memset::@1 + b1: + //SEG107 [46] *((byte*) memset::dst#2) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + lda #BLACK + ldy #0 + sta (dst),y + //SEG108 [47] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG109 [48] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 + lda dst+1 + cmp #>end + bne b1 + lda dst + cmp #make_plasma_charset::@10] + //SEG115 make_plasma_charset::@10 + //SEG116 [53] call print_cls + //SEG117 [87] phi from make_plasma_charset::@10 to print_cls [phi:make_plasma_charset::@10->print_cls] + jsr print_cls + //SEG118 [54] phi from make_plasma_charset::@10 to make_plasma_charset::@1 [phi:make_plasma_charset::@10->make_plasma_charset::@1] + //SEG119 [54] phi (byte*) print_char_cursor#49 = (const byte*) print_line_cursor#0 [phi:make_plasma_charset::@10->make_plasma_charset::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta print_char_cursor+1 + //SEG120 [54] phi (word) make_plasma_charset::c#2 = (byte) 0 [phi:make_plasma_charset::@10->make_plasma_charset::@1#1] -- vwuz1=vbuc1 + lda #0 + sta c + sta c+1 + //SEG121 [54] phi from make_plasma_charset::@9 to make_plasma_charset::@1 [phi:make_plasma_charset::@9->make_plasma_charset::@1] + //SEG122 [54] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#18 [phi:make_plasma_charset::@9->make_plasma_charset::@1#0] -- register_copy + //SEG123 [54] phi (word) make_plasma_charset::c#2 = (word) make_plasma_charset::c#1 [phi:make_plasma_charset::@9->make_plasma_charset::@1#1] -- register_copy + //SEG124 make_plasma_charset::@1 + b1: + //SEG125 [55] (byte~) make_plasma_charset::$2 ← < (word) make_plasma_charset::c#2 -- vbuaa=_lo_vwuz1 + lda c + //SEG126 [56] (byte) make_plasma_charset::s#0 ← *((const byte[$200]) SINTABLE#0 + (byte~) make_plasma_charset::$2) -- vbuz1=pbuc1_derefidx_vbuaa + tay + lda SINTABLE,y + sta s + //SEG127 [57] phi from make_plasma_charset::@1 to make_plasma_charset::@2 [phi:make_plasma_charset::@1->make_plasma_charset::@2] + //SEG128 [57] phi (byte) make_plasma_charset::i#7 = (byte) 0 [phi:make_plasma_charset::@1->make_plasma_charset::@2#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG129 [57] phi from make_plasma_charset::@6 to make_plasma_charset::@2 [phi:make_plasma_charset::@6->make_plasma_charset::@2] + //SEG130 [57] phi (byte) make_plasma_charset::i#7 = (byte) make_plasma_charset::i#1 [phi:make_plasma_charset::@6->make_plasma_charset::@2#0] -- register_copy + //SEG131 make_plasma_charset::@2 + b2: + //SEG132 [58] phi from make_plasma_charset::@2 to make_plasma_charset::@3 [phi:make_plasma_charset::@2->make_plasma_charset::@3] + //SEG133 [58] phi (byte) make_plasma_charset::b#2 = (byte) 0 [phi:make_plasma_charset::@2->make_plasma_charset::@3#0] -- vbuyy=vbuc1 + ldy #0 + //SEG134 [58] phi (byte) make_plasma_charset::ii#2 = (byte) 0 [phi:make_plasma_charset::@2->make_plasma_charset::@3#1] -- vbuxx=vbuc1 + ldx #0 + //SEG135 [58] phi from make_plasma_charset::@4 to make_plasma_charset::@3 [phi:make_plasma_charset::@4->make_plasma_charset::@3] + //SEG136 [58] phi (byte) make_plasma_charset::b#2 = (byte) make_plasma_charset::b#3 [phi:make_plasma_charset::@4->make_plasma_charset::@3#0] -- register_copy + //SEG137 [58] phi (byte) make_plasma_charset::ii#2 = (byte) make_plasma_charset::ii#1 [phi:make_plasma_charset::@4->make_plasma_charset::@3#1] -- register_copy + //SEG138 make_plasma_charset::@3 + b3: + //SEG139 [59] call sid_rnd + jsr sid_rnd + //SEG140 [60] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + //SEG141 make_plasma_charset::@11 + //SEG142 [61] (byte~) make_plasma_charset::$3 ← (byte) sid_rnd::return#2 + //SEG143 [62] (byte~) make_plasma_charset::$4 ← (byte~) make_plasma_charset::$3 & (byte) $ff -- vbuz1=vbuaa_band_vbuc1 + and #$ff + sta _4 + //SEG144 [63] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@4 -- vbuz1_le_vbuz2_then_la1 + lda s + cmp _4 + bcs b4 + //SEG145 make_plasma_charset::@5 + //SEG146 [64] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const byte[8]) make_plasma_charset::bittab#0 + (byte) make_plasma_charset::ii#2) -- vbuyy=vbuyy_bor_pbuc1_derefidx_vbuxx + tya + ora bittab,x + tay + //SEG147 [65] phi from make_plasma_charset::@11 make_plasma_charset::@5 to make_plasma_charset::@4 [phi:make_plasma_charset::@11/make_plasma_charset::@5->make_plasma_charset::@4] + //SEG148 [65] phi (byte) make_plasma_charset::b#3 = (byte) make_plasma_charset::b#2 [phi:make_plasma_charset::@11/make_plasma_charset::@5->make_plasma_charset::@4#0] -- register_copy + //SEG149 make_plasma_charset::@4 + b4: + //SEG150 [66] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 -- vbuxx=_inc_vbuxx + inx + //SEG151 [67] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 -- vbuxx_lt_vbuc1_then_la1 + cpx #8 + bcc b3 + //SEG152 make_plasma_charset::@6 + //SEG153 [68] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG154 [69] (word~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#7 -- vwuz1=vwuz1_plus_vbuz2 + lda i + clc + adc _9 + sta _9 + bcc !+ + inc _9+1 + !: + //SEG155 [70] (byte*~) make_plasma_charset::$16 ← (const byte*) CHARSET#0 + (word~) make_plasma_charset::$9 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda _16 + adc #CHARSET + sta _16+1 + //SEG156 [71] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#3 -- _deref_pbuz1=vbuyy + tya + ldy #0 + sta (_16),y + //SEG157 [72] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#7 -- vbuz1=_inc_vbuz1 + inc i + //SEG158 [73] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #8 + bcc b2 + //SEG159 make_plasma_charset::@7 + //SEG160 [74] (byte~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#2 & (byte) 7 -- vbuaa=vwuz1_band_vbuc1 + lda c + and #7 + //SEG161 [75] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b9 + //SEG162 [76] phi from make_plasma_charset::@7 to make_plasma_charset::@8 [phi:make_plasma_charset::@7->make_plasma_charset::@8] + //SEG163 make_plasma_charset::@8 + //SEG164 [77] call print_char + jsr print_char + //SEG165 [78] phi from make_plasma_charset::@7 make_plasma_charset::@8 to make_plasma_charset::@9 [phi:make_plasma_charset::@7/make_plasma_charset::@8->make_plasma_charset::@9] + //SEG166 [78] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#49 [phi:make_plasma_charset::@7/make_plasma_charset::@8->make_plasma_charset::@9#0] -- register_copy + //SEG167 make_plasma_charset::@9 + b9: + //SEG168 [79] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2 -- vwuz1=_inc_vwuz1 + inc c + bne !+ + inc c+1 + !: + //SEG169 [80] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 -- vwuz1_lt_vwuc1_then_la1 + lda c+1 + cmp #>$100 + bcc b1 + bne !+ + lda c + cmp #<$100 + bcc b1 + !: + //SEG170 make_plasma_charset::@return + //SEG171 [81] return + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +//SEG172 print_char +// Print a single char +print_char: { + .const ch = '.' + //SEG173 [82] *((byte*) print_char_cursor#49) ← (const byte) print_char::ch#0 -- _deref_pbuz1=vbuc1 + lda #ch + ldy #0 + sta (print_char_cursor),y + //SEG174 [83] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#49 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + //SEG175 print_char::@return + //SEG176 [84] return + rts +} +//SEG177 sid_rnd +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + //SEG178 [85] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + lda SID_VOICE3_OSC + //SEG179 sid_rnd::@return + //SEG180 [86] return + rts +} +//SEG181 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = $12 + //SEG182 [88] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + //SEG183 [88] phi (byte*) print_cls::sc#2 = (const byte*) print_line_cursor#0 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta sc+1 + //SEG184 [88] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + //SEG185 [88] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + //SEG186 print_cls::@1 + b1: + //SEG187 [89] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG188 [90] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG189 [91] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + //SEG194 [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + //SEG195 sid_rnd_init::@return + //SEG196 [95] return + rts +} +//SEG197 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +// init_angle_screen(byte* zeropage($15) screen) +init_angle_screen: { + .label _10 = $1f + .label screen = $15 + .label screen_topline = $17 + .label screen_bottomline = $15 + .label xw = $42 + .label yw = $44 + .label angle_w = $1f + .label ang_w = $46 + .label x = $19 + .label xb = $1a + .label y = $14 + //SEG198 [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$c + sta screen_topline + lda screen+1 + adc #>$28*$c + sta screen_topline+1 + //SEG199 [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -- pbuz1=pbuz1_plus_vwuc1 + clc + lda screen_bottomline + adc #<$28*$c + sta screen_bottomline + lda screen_bottomline+1 + adc #>$28*$c + sta screen_bottomline+1 + //SEG200 [98] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + //SEG201 [98] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- register_copy + //SEG202 [98] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#0 [phi:init_angle_screen->init_angle_screen::@1#1] -- register_copy + //SEG203 [98] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG204 [98] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + //SEG205 [98] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG206 [98] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG207 [98] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy + //SEG208 init_angle_screen::@1 + b1: + //SEG209 [99] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + //SEG210 [99] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG211 [99] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 + lda #0 + sta x + //SEG212 [99] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + //SEG213 [99] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy + //SEG214 [99] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + //SEG215 init_angle_screen::@2 + b2: + //SEG216 [100] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x + asl + //SEG217 [101] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG218 [102] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 + sta xw+1 + sty xw + //SEG219 [103] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda y + asl + //SEG220 [104] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + sta yw+1 + sty yw + //SEG221 [105] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG222 [106] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG223 [107] call atan2_16 + jsr atan2_16 + //SEG224 [108] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + //SEG225 init_angle_screen::@4 + //SEG226 [109] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG227 [110] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + lda #$80 + clc + adc _10 + sta _10 + bcc !+ + inc _10+1 + !: + //SEG228 [111] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG229 [112] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + ldy xb + sta (screen_bottomline),y + //SEG230 [113] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + eor #$ff + clc + adc #1 + //SEG231 [114] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa + sta (screen_topline),y + //SEG232 [115] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 + clc + adc ang_w + //SEG233 [116] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG234 [117] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 + lda #$80 + sec + sbc ang_w + //SEG235 [118] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + sta (screen_bottomline),y + //SEG236 [119] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG237 [120] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG238 [121] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b2 + //SEG239 init_angle_screen::@3 + //SEG240 [122] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG241 [123] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG242 [124] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 + inc y + //SEG243 [125] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1 + //SEG244 init_angle_screen::@return + //SEG245 [126] return + rts +} +//SEG246 atan2_16 +// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) +// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 +// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) +// atan2_16(signed word zeropage($42) x, signed word zeropage($44) y) +atan2_16: { + .label _2 = $1b + .label _7 = $1d + .label yi = $1b + .label xi = $1d + .label angle = $1f + .label xd = $23 + .label yd = $21 + .label return = $1f + .label x = $42 + .label y = $44 + //SEG247 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + lda y+1 + bmi !b1+ + jmp b1 + !b1: + //SEG248 atan2_16::@2 + //SEG249 [128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc y + sta _2 + lda #0 + sbc y+1 + sta _2+1 + //SEG250 [129] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + //SEG251 [129] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG252 atan2_16::@3 + b3: + //SEG253 [130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + lda x+1 + bmi !b4+ + jmp b4 + !b4: + //SEG254 atan2_16::@5 + //SEG255 [131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc x + sta _7 + lda #0 + sbc x+1 + sta _7+1 + //SEG256 [132] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + //SEG257 [132] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG258 atan2_16::@6 + b6: + //SEG259 [133] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG260 [133] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + lda #0 + sta angle + sta angle+1 + //SEG261 [133] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + tax + //SEG262 [133] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy + //SEG263 [133] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + //SEG264 atan2_16::@10 + b10: + //SEG265 [134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + lda yi+1 + bne b11 + lda yi + bne b11 + //SEG266 [135] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + //SEG267 [135] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy + //SEG268 atan2_16::@12 + b12: + //SEG269 [136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr angle+1 + ror angle + //SEG270 [137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + lda x+1 + bpl b7 + //SEG271 atan2_16::@21 + //SEG272 [138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + sec + lda #<$8000 + sbc angle + sta angle + lda #>$8000 + sbc angle+1 + sta angle+1 + //SEG273 [139] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + //SEG274 [139] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy + //SEG275 atan2_16::@7 + b7: + //SEG276 [140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + lda y+1 + bpl b8 + //SEG277 atan2_16::@9 + //SEG278 [141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + sec + lda #0 + sbc angle + sta angle + lda #0 + sbc angle+1 + sta angle+1 + //SEG279 [142] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG280 [142] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG281 atan2_16::@8 + b8: + //SEG282 atan2_16::@return + //SEG283 [143] return + rts + //SEG284 atan2_16::@11 + b11: + //SEG285 [144] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG286 [145] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 + lda xi + sta xd + lda xi+1 + sta xd+1 + //SEG287 [146] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 + lda yi + sta yd + lda yi+1 + sta yd+1 + //SEG288 [147] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + //SEG289 [147] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG290 [147] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //SEG291 [147] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy + //SEG292 atan2_16::@13 + b13: + //SEG293 [148] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 + bcs b14 + //SEG294 atan2_16::@15 + //SEG295 [149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 + cpy #0 + beq b17 + //SEG296 atan2_16::@16 + //SEG297 [150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG298 [151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG299 [152] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + //SEG300 [152] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG301 [152] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + //SEG302 atan2_16::@17 + b17: + //SEG303 [153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 + lda yi+1 + bpl b18 + //SEG304 atan2_16::@20 + //SEG305 [154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda xi + sec + sbc yd + sta xi + lda xi+1 + sbc yd+1 + sta xi+1 + //SEG306 [155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda yi + clc + adc xd + sta yi + lda yi+1 + adc xd+1 + sta yi+1 + //SEG307 [156] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG308 [157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + tay + sec + lda angle + sbc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + sbc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + //SEG309 [158] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + //SEG310 [158] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG311 [158] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG312 [158] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + //SEG313 atan2_16::@19 + b19: + //SEG314 [159] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG315 [160] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + bne !b12+ + jmp b12 + !b12: + //SEG316 [133] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + //SEG317 [133] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG318 [133] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG319 [133] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG320 [133] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy + jmp b10 + //SEG321 atan2_16::@18 + b18: + //SEG322 [161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 + lda xi + clc + adc yd + sta xi + lda xi+1 + adc yd+1 + sta xi+1 + //SEG323 [162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 + lda yi + sec + sbc xd + sta yi + lda yi+1 + sbc xd+1 + sta yi+1 + //SEG324 [163] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG325 [164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + tay + clc + lda angle + adc CORDIC_ATAN2_ANGLES_16,y + sta angle + lda angle+1 + adc CORDIC_ATAN2_ANGLES_16+1,y + sta angle+1 + jmp b19 + //SEG326 atan2_16::@14 + b14: + //SEG327 [165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG328 [166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG329 [167] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13 + //SEG330 atan2_16::@4 + b4: + //SEG331 [168] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + lda x + sta xi + lda x+1 + sta xi+1 + jmp b6 + //SEG332 atan2_16::@1 + b1: + //SEG333 [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + lda y + sta yi + lda y+1 + sta yi+1 + jmp b3 +} +//SEG334 init_dist_screen +// Populates 1000 bytes (a screen) with values representing the distance to the center. +// The actual value stored is distance*2 to increase precision +// init_dist_screen(byte* zeropage($26) screen) +init_dist_screen: { + .label screen = $26 + .label screen_bottomline = $28 + .label yds = $47 + .label xds = $49 + .label ds = $49 + .label x = $2a + .label xb = $2b + .label screen_topline = $26 + .label y = $25 + //SEG335 [171] call init_squares + //SEG336 [242] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + jsr init_squares + //SEG337 init_dist_screen::@10 + //SEG338 [172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 -- pbuz1=pbuz2_plus_vwuc1 + lda screen + clc + adc #<$28*$18 + sta screen_bottomline + lda screen+1 + adc #>$28*$18 + sta screen_bottomline+1 + //SEG339 [173] phi from init_dist_screen::@10 to init_dist_screen::@1 [phi:init_dist_screen::@10->init_dist_screen::@1] + //SEG340 [173] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#0 [phi:init_dist_screen::@10->init_dist_screen::@1#0] -- register_copy + //SEG341 [173] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen#0 [phi:init_dist_screen::@10->init_dist_screen::@1#1] -- register_copy + //SEG342 [173] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@1#2] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG343 [173] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] + //SEG344 [173] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy + //SEG345 [173] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy + //SEG346 [173] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + //SEG347 init_dist_screen::@1 + b1: + //SEG348 [174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda y + asl + //SEG349 [175] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 + cmp #$18 + bcs b2 + //SEG350 init_dist_screen::@3 + //SEG351 [176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$18+1 + //SEG352 [177] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] + //SEG353 [177] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy + //SEG354 init_dist_screen::@4 + b4: + //SEG355 [178] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + //SEG356 [179] call sqr + //SEG357 [238] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + //SEG358 [238] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + jsr sqr + //SEG359 [180] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + lda sqr.return + sta sqr.return_2 + lda sqr.return+1 + sta sqr.return_2+1 + //SEG360 init_dist_screen::@11 + //SEG361 [181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + //SEG362 [182] phi from init_dist_screen::@11 to init_dist_screen::@5 [phi:init_dist_screen::@11->init_dist_screen::@5] + //SEG363 [182] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@11->init_dist_screen::@5#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG364 [182] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@11->init_dist_screen::@5#1] -- vbuz1=vbuc1 + lda #0 + sta x + //SEG365 [182] phi from init_dist_screen::@13 to init_dist_screen::@5 [phi:init_dist_screen::@13->init_dist_screen::@5] + //SEG366 [182] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@13->init_dist_screen::@5#0] -- register_copy + //SEG367 [182] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@13->init_dist_screen::@5#1] -- register_copy + //SEG368 init_dist_screen::@5 + b5: + //SEG369 [183] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x + asl + //SEG370 [184] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 + cmp #$27 + bcs b6 + //SEG371 init_dist_screen::@7 + //SEG372 [185] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG373 [186] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] + //SEG374 [186] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy + //SEG375 init_dist_screen::@8 + b8: + //SEG376 [187] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + //SEG377 [188] call sqr + //SEG378 [238] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + //SEG379 [238] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + jsr sqr + //SEG380 [189] (word) sqr::return#3 ← (word) sqr::return#0 + //SEG381 init_dist_screen::@12 + //SEG382 [190] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + //SEG383 [191] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 + lda ds + clc + adc yds + sta ds + lda ds+1 + adc yds+1 + sta ds+1 + //SEG384 [192] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + //SEG385 [193] call sqrt + jsr sqrt + //SEG386 [194] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + //SEG387 init_dist_screen::@13 + //SEG388 [195] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + //SEG389 [196] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG390 [197] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + sta (screen_bottomline),y + //SEG391 [198] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG392 [199] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + sta (screen_bottomline),y + //SEG393 [200] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG394 [201] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG395 [202] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b5 + //SEG396 init_dist_screen::@9 + //SEG397 [203] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 + !: + //SEG398 [204] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_bottomline + sec + sbc #<$28 + sta screen_bottomline + lda screen_bottomline+1 + sbc #>$28 + sta screen_bottomline+1 + //SEG399 [205] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + inc y + //SEG400 [206] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1 + //SEG401 init_dist_screen::@return + //SEG402 [207] return + rts + //SEG403 init_dist_screen::@6 + b6: + //SEG404 [208] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 + sec + sbc #$27 + jmp b8 + //SEG405 init_dist_screen::@2 + b2: + //SEG406 [209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 + sec + sbc #$18 + jmp b4 +} +//SEG407 sqrt +// Find the (integer) square root of a word value +// If the square is not an integer then it returns the largest integer N where N*N <= val +// Uses a table of squares that must be initialized by calling init_squares() +// sqrt(word zeropage($49) val) +sqrt: { + .label _1 = $2c + .label _3 = $2c + .label found = $2c + .label val = $49 + //SEG408 [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + //SEG409 [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + lda SQUARES + sta bsearch16u.items + lda SQUARES+1 + sta bsearch16u.items+1 + //SEG410 [212] call bsearch16u + //SEG411 [219] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + jsr bsearch16u + //SEG412 [213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + //SEG413 sqrt::@1 + //SEG414 [214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + //SEG415 [215] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuz2 + lda _3 + sec + sbc SQUARES + sta _3 + lda _3+1 + sbc SQUARES+1 + sta _3+1 + //SEG416 [216] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr _1+1 + ror _1 + //SEG417 [217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 + lda _1 + //SEG418 sqrt::@return + //SEG419 [218] return + rts +} +//SEG420 bsearch16u +// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. +// - key - The value to look for +// - items - Pointer to the start of the array to search in +// - num - The number of items in the array +// Returns pointer to an entry in the array that matches the search key +// bsearch16u(word zeropage($49) key, word* zeropage($2c) items, byte register(X) num) +bsearch16u: { + .label _2 = $2c + .label pivot = $4b + .label result = $4d + .label return = $2c + .label items = $2c + .label key = $49 + //SEG421 [220] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + //SEG422 [220] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#1 [phi:bsearch16u->bsearch16u::@3#0] -- register_copy + //SEG423 [220] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + ldx #NUM_SQUARES + //SEG424 bsearch16u::@3 + b3: + //SEG425 [221] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + cpx #0 + bne b4 + //SEG426 bsearch16u::@5 + //SEG427 [222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + ldy #1 + lda (items),y + cmp key+1 + bne !+ + dey + lda (items),y + cmp key + beq b2 + !: + bcc b2 + //SEG428 bsearch16u::@1 + //SEG429 [223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + lda _2 + sec + sbc #<1*SIZEOF_WORD + sta _2 + lda _2+1 + sbc #>1*SIZEOF_WORD + sta _2+1 + //SEG430 [224] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + //SEG431 [224] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + //SEG432 bsearch16u::@2 + b2: + //SEG433 [225] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + //SEG434 [225] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + //SEG435 bsearch16u::@return + //SEG436 [226] return + rts + //SEG437 bsearch16u::@4 + b4: + //SEG438 [227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + txa + lsr + //SEG439 [228] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + //SEG440 [229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + clc + adc items + sta pivot + lda #0 + adc items+1 + sta pivot+1 + //SEG441 [230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + sec + lda key + ldy #0 + sbc (pivot),y + sta result + lda key+1 + iny + sbc (pivot),y + sta result+1 + //SEG442 [231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + bne b6 + lda result + bne b6 + //SEG443 bsearch16u::@8 + //SEG444 [232] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + lda pivot + sta return + lda pivot+1 + sta return+1 + rts + //SEG445 bsearch16u::@6 + b6: + //SEG446 [233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + lda result+1 + bmi b7 + bne !+ + lda result + beq b7 + !: + //SEG447 bsearch16u::@9 + //SEG448 [234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + lda #1*SIZEOF_WORD + clc + adc pivot + sta items + lda #0 + adc pivot+1 + sta items+1 + //SEG449 [235] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + dex + //SEG450 [236] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + //SEG451 [236] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG452 [236] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + //SEG453 bsearch16u::@7 + b7: + //SEG454 [237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + txa + lsr + tax + //SEG455 [220] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + //SEG456 [220] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG457 [220] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + jmp b3 +} +//SEG458 sqr +// Find the square of a byte value +// Uses a table of squares that must be initialized by calling init_squares() +// sqr(byte register(A) val) +sqr: { + .label return = $49 + .label return_2 = $47 + //SEG459 [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + asl + //SEG460 [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuz2_derefidx_vbuaa + tay + lda (SQUARES),y + sta return + iny + lda (SQUARES),y + sta return+1 + //SEG461 sqr::@return + //SEG462 [241] return + rts +} +//SEG463 init_squares +// Initialize squares table +// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 +init_squares: { + .label squares = $30 + .label sqr = $2e + //SEG464 [243] call malloc + //SEG465 [255] phi from init_squares to malloc [phi:init_squares->malloc] + //SEG466 [255] phi (word) malloc::size#3 = (const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD [phi:init_squares->malloc#0] -- vwuz1=vbuc1 + lda #NUM_SQUARES*SIZEOF_WORD + sta malloc.size + lda #0 + sta malloc.size+1 + //SEG467 [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy + jsr malloc + //SEG468 init_squares::@2 + //SEG469 [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 + //SEG470 [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 + lda SQUARES + sta squares + lda SQUARES+1 + sta squares+1 + //SEG471 [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + //SEG472 [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG473 [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + //SEG474 [246] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vbuc1 + txa + sta sqr + sta sqr+1 + //SEG475 [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + //SEG476 [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG477 [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG478 [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + //SEG479 init_squares::@1 + b1: + //SEG480 [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + ldy #0 + lda sqr + sta (squares),y + iny + lda sqr+1 + sta (squares),y + //SEG481 [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + lda #SIZEOF_WORD + clc + adc squares + sta squares + bcc !+ + inc squares+1 + !: + //SEG482 [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa + asl + //SEG483 [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + clc + adc #1 + //SEG484 [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + clc + adc sqr + sta sqr + bcc !+ + inc sqr+1 + !: + //SEG485 [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG486 [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #NUM_SQUARES-1+1 + bne b1 + //SEG487 init_squares::@return + //SEG488 [254] return + rts +} +//SEG489 malloc +// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. +// The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. +// malloc(word zeropage($34) size) +malloc: { + .label mem = $4f + .label size = $34 + //SEG490 [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 -- pbuz1=pbuz2 + lda heap_head + sta mem + lda heap_head+1 + sta mem+1 + //SEG491 [257] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3 -- pbuz1=pbuz1_plus_vwuz2 + lda heap_head + clc + adc size + sta heap_head + lda heap_head+1 + adc size+1 + sta heap_head+1 + //SEG492 malloc::@return + //SEG493 [258] return + rts +} +//SEG494 File Data + // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... +CORDIC_ATAN2_ANGLES_16: +.for (var i=0; i(word)(const byte*) SCREEN1#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(label) main::toD0182 +(word~) main::toD0182_$0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$2 +(number~) main::toD0182_$3 +(word~) main::toD0182_$4 +(byte~) main::toD0182_$5 +(number~) main::toD0182_$6 +(number~) main::toD0182_$7 +(number~) main::toD0182_$8 +(byte*) main::toD0182_gfx +(byte) main::toD0182_return +(const byte) main::toD0182_return#0 toD0182_return = >(word)(const byte*) SCREEN2#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0182_screen +(void()) make_plasma_charset((byte*) make_plasma_charset::charset) +(byte~) make_plasma_charset::$11 reg byte a 22.0 +(byte*~) make_plasma_charset::$16 $16 zp ZP_WORD:64 202.0 +(byte~) make_plasma_charset::$2 reg byte a 22.0 +(byte~) make_plasma_charset::$3 reg byte a 2002.0 +(byte~) make_plasma_charset::$4 $4 zp ZP_BYTE:63 2002.0 +(word~) make_plasma_charset::$8 $8 zp ZP_WORD:64 202.0 +(word~) make_plasma_charset::$9 $9 zp ZP_WORD:64 202.0 +(label) make_plasma_charset::@1 +(label) make_plasma_charset::@10 +(label) make_plasma_charset::@11 +(label) make_plasma_charset::@2 +(label) make_plasma_charset::@3 +(label) make_plasma_charset::@4 +(label) make_plasma_charset::@5 +(label) make_plasma_charset::@6 +(label) make_plasma_charset::@7 +(label) make_plasma_charset::@8 +(label) make_plasma_charset::@9 +(label) make_plasma_charset::@return +(byte) make_plasma_charset::b +(byte) make_plasma_charset::b#1 reg byte y 2002.0 +(byte) make_plasma_charset::b#2 reg byte y 500.5 +(byte) make_plasma_charset::b#3 reg byte y 517.3333333333334 +(byte[8]) make_plasma_charset::bittab +(const byte[8]) make_plasma_charset::bittab#0 bittab = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 } +(word) make_plasma_charset::c +(word) make_plasma_charset::c#1 c zp ZP_WORD:13 16.5 +(word) make_plasma_charset::c#2 c zp ZP_WORD:13 5.800000000000001 +(byte*) make_plasma_charset::charset +(byte) make_plasma_charset::i +(byte) make_plasma_charset::i#1 i zp ZP_BYTE:17 151.5 +(byte) make_plasma_charset::i#7 i zp ZP_BYTE:17 20.2 +(byte) make_plasma_charset::ii +(byte) make_plasma_charset::ii#1 reg byte x 1501.5 +(byte) make_plasma_charset::ii#2 reg byte x 375.375 +(byte) make_plasma_charset::s +(byte) make_plasma_charset::s#0 s zp ZP_BYTE:62 56.22222222222223 +(void*()) malloc((word) malloc::size) +(label) malloc::@return +(byte*) malloc::mem +(byte*) malloc::mem#0 mem zp ZP_WORD:79 0.3333333333333333 +(void*) malloc::return +(word) malloc::size +(word) malloc::size#3 size zp ZP_WORD:52 1.0 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(label) memset::@1 +(label) memset::@return +(byte) memset::c +(byte*) memset::dst +(byte*) memset::dst#1 dst zp ZP_WORD:11 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:11 16.5 +(byte*) memset::end +(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 +(word) memset::num +(const word) memset::num#0 num = (word) $3e8 +(void*) memset::return +(void*) memset::str +(const void*) memset::str#0 str = (void*)(const byte*) COLS#0 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(const byte) print_char::ch#0 ch = (byte) '.' +(byte*) print_char_cursor +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:15 4.333333333333333 +(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:15 11.0 +(byte*) print_char_cursor#49 print_char_cursor zp ZP_WORD:15 1.0833333333333333 +(void()) print_cls() +(label) print_cls::@1 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#1 sc zp ZP_WORD:18 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:18 16.5 +(byte*) print_line_cursor +(const byte*) print_line_cursor#0 print_line_cursor = (byte*) 1024 +(byte*) print_screen +(byte()) sid_rnd() +(label) sid_rnd::@return +(byte) sid_rnd::return +(byte) sid_rnd::return#0 reg byte a 334.33333333333337 +(byte) sid_rnd::return#2 reg byte a 2002.0 +(void()) sid_rnd_init() +(label) sid_rnd_init::@return +(byte) sin_offset_x +(byte) sin_offset_x#10 sin_offset_x zp ZP_BYTE:2 1.625 +(byte) sin_offset_x#12 sin_offset_x zp ZP_BYTE:2 2.666666666666667 +(byte) sin_offset_x#14 sin_offset_x zp ZP_BYTE:2 11.0 +(byte) sin_offset_y +(byte) sin_offset_y#10 sin_offset_y zp ZP_BYTE:3 1.5294117647058825 +(byte) sin_offset_y#12 sin_offset_y zp ZP_BYTE:3 3.0 +(byte) sin_offset_y#14 sin_offset_y zp ZP_BYTE:3 11.0 +(word()) sqr((byte) sqr::val) +(byte~) sqr::$0 reg byte a 4.0 +(label) sqr::@return +(word) sqr::return +(word) sqr::return#0 return zp ZP_WORD:73 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:71 22.0 +(word) sqr::return#3 return zp ZP_WORD:73 202.0 +(byte) sqr::val +(byte) sqr::val#0 reg byte a 22.0 +(byte) sqr::val#1 reg byte a 202.0 +(byte) sqr::val#2 reg byte a 114.0 +(byte()) sqrt((word) sqrt::val) +(word~) sqrt::$1 $1 zp ZP_WORD:44 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:44 4.0 +(label) sqrt::@1 +(label) sqrt::@return +(word*) sqrt::found +(word*) sqrt::found#0 found zp ZP_WORD:44 4.0 +(byte) sqrt::return +(byte) sqrt::return#0 reg byte a 34.33333333333333 +(byte) sqrt::return#2 reg byte a 202.0 +(byte) sqrt::sq +(word) sqrt::val +(word) sqrt::val#0 val zp ZP_WORD:73 103.0 + +zp ZP_BYTE:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] +zp ZP_BYTE:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] +zp ZP_WORD:4 [ doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] +zp ZP_WORD:6 [ doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] +zp ZP_WORD:8 [ doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] +zp ZP_BYTE:10 [ doplasma::y#4 doplasma::y#1 ] +reg byte x [ doplasma::x#2 doplasma::x#1 ] +zp ZP_WORD:11 [ memset::dst#2 memset::dst#1 ] +zp ZP_WORD:13 [ make_plasma_charset::c#2 make_plasma_charset::c#1 ] +zp ZP_WORD:15 [ print_char_cursor#49 print_char_cursor#18 print_char_cursor#1 ] +zp ZP_BYTE:17 [ make_plasma_charset::i#7 make_plasma_charset::i#1 ] +reg byte x [ make_plasma_charset::ii#2 make_plasma_charset::ii#1 ] +reg byte y [ make_plasma_charset::b#2 make_plasma_charset::b#3 make_plasma_charset::b#1 ] +zp ZP_WORD:18 [ print_cls::sc#2 print_cls::sc#1 ] +zp ZP_BYTE:20 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +zp ZP_WORD:21 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] +zp ZP_WORD:23 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] +zp ZP_BYTE:25 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +zp ZP_BYTE:26 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +zp ZP_WORD:27 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] +zp ZP_WORD:29 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_WORD:31 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:33 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:35 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_BYTE:37 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +zp ZP_WORD:38 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ] +zp ZP_WORD:40 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ] +reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +zp ZP_BYTE:42 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:43 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] +zp ZP_WORD:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] +reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] +zp ZP_WORD:46 [ init_squares::sqr#2 init_squares::sqr#1 ] +zp ZP_WORD:48 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] +reg byte x [ init_squares::i#2 init_squares::i#1 ] +zp ZP_WORD:50 [ heap_head#12 heap_head#1 ] +zp ZP_WORD:52 [ malloc::size#3 ] +zp ZP_WORD:54 [ SCREEN_DIST#0 ] +zp ZP_WORD:56 [ SCREEN_ANGLE#0 ] +zp ZP_WORD:58 [ doplasma::sin_x#0 ] +zp ZP_WORD:60 [ doplasma::sin_y#0 ] +reg byte a [ doplasma::$2 ] +reg byte a [ make_plasma_charset::$2 ] +zp ZP_BYTE:62 [ make_plasma_charset::s#0 ] +reg byte a [ sid_rnd::return#2 ] +reg byte a [ make_plasma_charset::$3 ] +zp ZP_BYTE:63 [ make_plasma_charset::$4 ] +zp ZP_WORD:64 [ make_plasma_charset::$8 make_plasma_charset::$9 make_plasma_charset::$16 ] +reg byte a [ make_plasma_charset::$11 ] +reg byte a [ sid_rnd::return#0 ] +reg byte a [ init_angle_screen::$2 ] +reg byte a [ init_angle_screen::$3 ] +zp ZP_WORD:66 [ init_angle_screen::xw#0 atan2_16::x#0 ] +reg byte a [ init_angle_screen::$6 ] +zp ZP_WORD:68 [ init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:70 [ init_angle_screen::ang_w#0 ] +reg byte a [ init_angle_screen::$12 ] +reg byte a [ init_angle_screen::$13 ] +reg byte a [ init_angle_screen::$14 ] +reg byte a [ atan2_16::$24 ] +reg byte a [ atan2_16::$23 ] +reg byte a [ init_dist_screen::y2#0 ] +zp ZP_WORD:71 [ sqr::return#2 init_dist_screen::yds#0 ] +reg byte a [ init_dist_screen::x2#0 ] +zp ZP_WORD:73 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +reg byte a [ sqrt::return#2 ] +reg byte a [ init_dist_screen::d#0 ] +reg byte a [ sqrt::return#0 ] +reg byte a [ bsearch16u::$6 ] +reg byte a [ bsearch16u::$16 ] +zp ZP_WORD:75 [ bsearch16u::pivot#0 ] +zp ZP_WORD:77 [ bsearch16u::result#0 ] +reg byte a [ sqr::$0 ] +zp ZP_WORD:79 [ SQUARES#1 malloc::mem#0 ] +reg byte a [ init_squares::$3 ] +reg byte a [ init_squares::$4 ]