From b502c26140f6215120a865746a6774ce4db8cb35 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Thu, 1 Feb 2018 22:36:54 +0100 Subject: [PATCH] Optimizing zeropage coalesce to minimize moving values around. Closes #80 --- .../kickc/passes/Pass4ZeroPageCoalesce.java | 66 +- .../kickc/test/ref/bitmap-bresenham.asm | 96 +-- .../kickc/test/ref/bitmap-bresenham.log | 566 +++++++++--------- .../kickc/test/ref/bitmap-bresenham.sym | 174 +++--- .../kickc/test/ref/bitmap-plotter.asm | 16 +- .../kickc/test/ref/bitmap-plotter.log | 88 +-- .../kickc/test/ref/bitmap-plotter.sym | 36 +- .../dk/camelot64/kickc/test/ref/constants.asm | 14 +- .../dk/camelot64/kickc/test/ref/constants.log | 92 ++- .../dk/camelot64/kickc/test/ref/constants.sym | 40 +- .../dk/camelot64/kickc/test/ref/division.asm | 51 +- .../dk/camelot64/kickc/test/ref/division.log | 264 ++++---- .../dk/camelot64/kickc/test/ref/division.sym | 102 ++-- .../camelot64/kickc/test/ref/flipper-rex2.asm | 4 +- .../camelot64/kickc/test/ref/flipper-rex2.log | 27 +- .../camelot64/kickc/test/ref/flipper-rex2.sym | 13 +- .../dk/camelot64/kickc/test/ref/halfscii.asm | 6 +- .../dk/camelot64/kickc/test/ref/halfscii.log | 31 +- .../dk/camelot64/kickc/test/ref/halfscii.sym | 11 +- .../kickc/test/ref/incrementinarray.asm | 2 +- .../kickc/test/ref/incrementinarray.log | 15 +- .../kickc/test/ref/incrementinarray.sym | 7 +- .../camelot64/kickc/test/ref/ptr-complex.asm | 4 +- .../camelot64/kickc/test/ref/ptr-complex.log | 23 +- .../camelot64/kickc/test/ref/ptr-complex.sym | 9 +- .../dk/camelot64/kickc/test/ref/ptrtest.asm | 2 +- .../dk/camelot64/kickc/test/ref/ptrtest.log | 15 +- .../dk/camelot64/kickc/test/ref/ptrtest.sym | 7 +- .../dk/camelot64/kickc/test/ref/scroll.asm | 2 +- .../dk/camelot64/kickc/test/ref/scroll.log | 15 +- .../dk/camelot64/kickc/test/ref/scroll.sym | 7 +- .../dk/camelot64/kickc/test/ref/scrollbig.asm | 2 +- .../dk/camelot64/kickc/test/ref/scrollbig.log | 19 +- .../dk/camelot64/kickc/test/ref/scrollbig.sym | 7 +- .../camelot64/kickc/test/ref/signed-words.asm | 10 +- .../camelot64/kickc/test/ref/signed-words.log | 44 +- .../camelot64/kickc/test/ref/signed-words.sym | 19 +- .../camelot64/kickc/test/ref/sinus-basic.asm | 4 +- .../camelot64/kickc/test/ref/sinus-basic.log | 33 +- .../camelot64/kickc/test/ref/sinus-basic.sym | 9 +- .../kickc/test/ref/sinus-sprites.asm | 60 +- .../kickc/test/ref/sinus-sprites.log | 367 ++++++------ .../kickc/test/ref/sinus-sprites.sym | 163 ++--- .../kickc/test/ref/test-comparisons.asm | 4 +- .../kickc/test/ref/test-comparisons.log | 25 +- .../kickc/test/ref/test-comparisons.sym | 11 +- .../kickc/test/ref/test-multiply.asm | 96 +-- .../kickc/test/ref/test-multiply.log | 554 ++++++++--------- .../kickc/test/ref/test-multiply.sym | 183 +++--- .../dk/camelot64/kickc/test/ref/voronoi.asm | 4 +- .../dk/camelot64/kickc/test/ref/voronoi.log | 27 +- .../dk/camelot64/kickc/test/ref/voronoi.sym | 11 +- 52 files changed, 1714 insertions(+), 1743 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4ZeroPageCoalesce.java b/src/main/java/dk/camelot64/kickc/passes/Pass4ZeroPageCoalesce.java index ac8827a56..b3d91683c 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4ZeroPageCoalesce.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4ZeroPageCoalesce.java @@ -2,6 +2,9 @@ package dk.camelot64.kickc.passes; import dk.camelot64.kickc.model.*; +import java.util.Collection; +import java.util.List; + /** * Coalesces zero page registers where their live ranges do not overlap. * A final step done after all other register optimizations and before ASM generation. @@ -23,28 +26,73 @@ public class Pass4ZeroPageCoalesce extends Pass2Base { } /** - * Find two equivalence classes that can be coalesced into one - and perform the coalescence. + * Find the best two equivalence classes that can be coalesced into one - and perform the coalescence. * * @param liveRangeEquivalenceClassSet The set of live range equivalence classes * @return true if any classes were coalesced. False otherwise. */ private boolean coalesce(LiveRangeEquivalenceClassSet liveRangeEquivalenceClassSet) { - for(LiveRangeEquivalenceClass myEquivalenceClass : liveRangeEquivalenceClassSet.getEquivalenceClasses()) { + double maxScore = Double.MIN_VALUE; + LiveRangeEquivalenceClass maxThis = null; + LiveRangeEquivalenceClass maxOther = null; + + for(LiveRangeEquivalenceClass thisEquivalenceClass : liveRangeEquivalenceClassSet.getEquivalenceClasses()) { for(LiveRangeEquivalenceClass otherEquivalenceClass : liveRangeEquivalenceClassSet.getEquivalenceClasses()) { - if(!myEquivalenceClass.equals(otherEquivalenceClass)) { - if(canCoalesce(myEquivalenceClass, otherEquivalenceClass)) { - getLog().append("Coalescing zero page register [ " + myEquivalenceClass + " ] with [ " + otherEquivalenceClass + " ]"); - liveRangeEquivalenceClassSet.consolidate(myEquivalenceClass, otherEquivalenceClass); - // Reset the program register allocation - getProgram().getLiveRangeEquivalenceClassSet().storeRegisterAllocation(); - return true; + if(!thisEquivalenceClass.equals(otherEquivalenceClass)) { + if(canCoalesce(thisEquivalenceClass, otherEquivalenceClass)) { + double coalesceScore = getCoalesceScore(thisEquivalenceClass, otherEquivalenceClass); + if(coalesceScore>maxScore) { + maxScore = coalesceScore; + maxThis = thisEquivalenceClass; + maxOther = otherEquivalenceClass; + } } } } } + + if(maxOther!=null) { + getLog().append("Coalescing zero page register [ " + maxThis+ " ] with [ " + maxOther + " ]"); + liveRangeEquivalenceClassSet.consolidate(maxThis, maxOther); + // Reset the program register allocation + getProgram().getLiveRangeEquivalenceClassSet().storeRegisterAllocation(); + return true; + } + return false; } + private double getCoalesceScore(LiveRangeEquivalenceClass thisEquivalenceClass, LiveRangeEquivalenceClass otherEquivalenceClass) { + double score = 0.0; + List thisClassVars = thisEquivalenceClass.getVariables(); + List otherClassVars = otherEquivalenceClass.getVariables(); + VariableReferenceInfos variableReferenceInfos = getProgram().getVariableReferenceInfos(); + for(ControlFlowBlock block : getProgram().getGraph().getAllBlocks()) { + for(Statement statement : block.getStatements()) { + Collection definedVars = variableReferenceInfos.getDefinedVars(statement); + Collection usedVars = variableReferenceInfos.getUsedVars(statement); + if(definedVars!=null && definedVars.size()>0) { + for(VariableRef definedVar : definedVars) { + if(thisClassVars.contains(definedVar)) { + for(VariableRef usedVar : usedVars) { + if(otherClassVars.contains(usedVar)) { + score += 1.0; + } + } + } else if(otherClassVars.contains(definedVar)) { + for(VariableRef usedVar : usedVars) { + if(thisClassVars.contains(usedVar)) { + score += 1.0; + } + } + } + } + } + } + } + return score; + } + private boolean canCoalesce(LiveRangeEquivalenceClass myEquivalenceClass, LiveRangeEquivalenceClass otherEquivalenceClass) { VariableRef myVariableRef = myEquivalenceClass.getVariables().get(0); Variable myVariable = getProgram().getSymbolInfos().getVariable(myVariableRef); diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm index 8728cd236..4e1ba1b58 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm @@ -48,11 +48,13 @@ lines: { rts } line: { - .label x0 = 3 - .label x1 = 4 + .label x0 = 8 + .label x1 = $14 .label y0 = 5 - .label xd = 7 + .label xd = 3 .label yd = $a + .label yd_1 = 4 + .label yd_10 = 4 lda x0 cmp x1 bcs b1 @@ -67,18 +69,12 @@ line: { tya sec sbc y0 - sta yd + sta yd_1 cmp xd bcs b3 ldx x0 - lda y0 - sta line_xdyi.y lda x1 sta line_xdyi.x1 - lda xd - sta line_xdyi.xd - lda yd - sta line_xdyi.yd jsr line_xdyi breturn: rts @@ -87,10 +83,6 @@ line: { sta line_ydxi.y ldx x0 sty line_ydxi.y1 - lda yd - sta line_ydxi.yd - lda xd - sta line_ydxi.xd jsr line_ydxi jmp breturn b2: @@ -102,23 +94,13 @@ line: { cmp xd bcs b6 ldx x0 - lda y0 - sta line_xdyd.y lda x1 sta line_xdyd.x1 - lda xd - sta line_xdyd.xd - lda yd - sta line_xdyd.yd jsr line_xdyd jmp breturn b6: sty line_ydxd.y ldx x1 - lda yd - sta line_ydxd.yd - lda xd - sta line_ydxd.xd jsr line_ydxd jmp breturn b1: @@ -138,12 +120,6 @@ line: { bcs b10 ldx x1 sty line_xdyd.y - lda x0 - sta line_xdyd.x1 - lda xd - sta line_xdyd.xd - lda yd - sta line_xdyd.yd jsr line_xdyd jmp breturn b10: @@ -151,10 +127,6 @@ line: { sta line_ydxd.y ldx x0 sty line_ydxd.y1 - lda yd - sta line_ydxd.yd - lda xd - sta line_ydxd.xd jsr line_ydxd jmp breturn b9: @@ -162,26 +134,16 @@ line: { eor #$ff sec adc y0 - sta yd + sta yd_10 cmp xd bcs b13 ldx x1 sty line_xdyi.y - lda x0 - sta line_xdyi.x1 - lda xd - sta line_xdyi.xd - lda yd - sta line_xdyi.yd jsr line_xdyi jmp breturn b13: sty line_ydxi.y ldx x1 - lda yd - sta line_ydxi.yd - lda xd - sta line_ydxi.xd jsr line_ydxi jmp breturn } @@ -218,9 +180,9 @@ line_ydxi: { rts } plot: { - .label _0 = 8 - .label plotter_x = 8 - .label plotter_y = $b + .label _0 = $15 + .label plotter_x = $15 + .label plotter_y = $17 lda plot_xhi,x sta plotter_x+1 lda plot_xlo,x @@ -243,12 +205,12 @@ plot: { rts } line_xdyi: { - .label _6 = $a - .label y = 6 - .label x1 = 5 - .label xd = 4 - .label yd = 3 - .label e = 7 + .label _6 = $19 + .label y = 5 + .label x1 = 8 + .label xd = 3 + .label yd = 4 + .label e = 9 lda yd lsr sta e @@ -277,11 +239,11 @@ line_xdyi: { rts } line_ydxd: { - .label y = 6 + .label y = $b .label y1 = 5 - .label yd = 4 + .label yd = $a .label xd = 3 - .label e = 7 + .label e = $c lda xd lsr sta e @@ -309,12 +271,12 @@ line_ydxd: { rts } line_xdyd: { - .label _6 = $a - .label y = 6 - .label x1 = 5 - .label xd = 4 - .label yd = 3 - .label e = 7 + .label _6 = $1a + .label y = 5 + .label x1 = 8 + .label xd = 3 + .label yd = $a + .label e = $d lda yd lsr sta e @@ -343,8 +305,8 @@ line_xdyd: { rts } init_plot_tables: { - .label _6 = 2 - .label yoffs = 8 + .label _6 = $1b + .label yoffs = $e ldy #$80 ldx #0 b1: @@ -396,8 +358,8 @@ init_plot_tables: { rts } init_screen: { - .label b = 8 - .label c = 8 + .label b = $10 + .label c = $12 lda #BITMAP diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log index 3a2aa16eb..bd5f0bdb0 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log @@ -5561,41 +5561,41 @@ Attempting to uplift remaining variables inzp ZP_BYTE:42 [ line::xd#1 ] Uplifting [line] best 268790 combination zp ZP_BYTE:42 [ line::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:45 [ line::xd#0 ] Uplifting [line] best 268790 combination zp ZP_BYTE:45 [ line::xd#0 ] -Coalescing zero page register [ zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] ] with [ zp ZP_BYTE:60 [ init_plot_tables::$6 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] ] with [ zp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] ] with [ zp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] ] with [ zp ZP_BYTE:23 [ line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] ] with [ zp ZP_BYTE:38 [ line::x0#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 ] ] with [ zp ZP_BYTE:12 [ line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] ] with [ zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] ] with [ zp ZP_BYTE:24 [ line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] ] with [ zp ZP_BYTE:39 [ line::x1#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 ] ] with [ zp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] ] with [ zp ZP_BYTE:19 [ line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] ] with [ zp ZP_BYTE:25 [ line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] ] with [ zp ZP_BYTE:40 [ line::y0#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] ] with [ zp ZP_BYTE:15 [ line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] ] -Coalescing zero page register [ zp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] ] with [ zp ZP_BYTE:21 [ line_ydxd::y#2 line_ydxd::y#7 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#3 ] ] -Coalescing zero page register [ zp ZP_BYTE:7 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 line_ydxd::y#2 line_ydxd::y#7 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#3 ] ] with [ zp ZP_BYTE:27 [ line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] ] -Coalescing zero page register [ zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] ] with [ zp ZP_BYTE:16 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] ] with [ zp ZP_BYTE:22 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] ] with [ zp ZP_BYTE:28 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] ] with [ zp ZP_BYTE:42 [ line::xd#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:8 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 line::xd#1 ] ] with [ zp ZP_BYTE:45 [ line::xd#0 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] ] with [ zp ZP_WORD:34 [ init_screen::b#2 init_screen::b#1 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 ] ] with [ zp ZP_WORD:36 [ init_screen::c#2 init_screen::c#1 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 ] ] with [ zp ZP_WORD:49 [ plot::plotter_x#0 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#0 ] ] with [ zp ZP_WORD:53 [ plot::$0 ] ] -Coalescing zero page register [ zp ZP_BYTE:43 [ line::yd#1 ] ] with [ zp ZP_BYTE:44 [ line::yd#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:43 [ line::yd#1 line::yd#0 ] ] with [ zp ZP_BYTE:46 [ line::yd#3 ] ] -Coalescing zero page register [ zp ZP_BYTE:43 [ line::yd#1 line::yd#0 line::yd#3 ] ] with [ zp ZP_BYTE:47 [ line::yd#10 ] ] -Coalescing zero page register [ zp ZP_BYTE:43 [ line::yd#1 line::yd#0 line::yd#3 line::yd#10 ] ] with [ zp ZP_BYTE:56 [ line_xdyi::$6 ] ] -Coalescing zero page register [ zp ZP_BYTE:43 [ line::yd#1 line::yd#0 line::yd#3 line::yd#10 line_xdyi::$6 ] ] with [ zp ZP_BYTE:58 [ line_xdyd::$6 ] ] -Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:6 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 line_ydxd::y#2 line_ydxd::y#7 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#3 line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] -Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:7 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 line::xd#1 line::xd#0 ] -Allocated (was zp ZP_WORD:32) zp ZP_WORD:8 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#0 plot::$0 ] -Allocated (was zp ZP_BYTE:43) zp ZP_BYTE:10 [ line::yd#1 line::yd#0 line::yd#3 line::yd#10 line_xdyi::$6 line_xdyd::$6 ] -Allocated (was zp ZP_WORD:51) zp ZP_WORD:11 [ plot::plotter_y#0 ] +Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 ] ] with [ zp ZP_BYTE:42 [ line::xd#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line::xd#1 ] ] with [ zp ZP_BYTE:12 [ line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line::xd#1 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 ] ] with [ zp ZP_BYTE:45 [ line::xd#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line::xd#1 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 line::xd#0 ] ] with [ zp ZP_BYTE:17 [ line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line::xd#1 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 line::xd#0 line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 ] ] with [ zp ZP_BYTE:24 [ line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 ] ] with [ zp ZP_BYTE:43 [ line::yd#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 line::yd#1 ] ] with [ zp ZP_BYTE:11 [ line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 line::yd#1 line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 ] ] with [ zp ZP_BYTE:47 [ line::yd#10 ] ] +Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 ] ] with [ zp ZP_BYTE:40 [ line::y0#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line::y0#0 ] ] with [ zp ZP_BYTE:15 [ line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] ] +Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line::y0#0 line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 ] ] with [ zp ZP_BYTE:19 [ line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line::y0#0 line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 ] ] with [ zp ZP_BYTE:27 [ line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] ] +Coalescing zero page register [ zp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 ] ] with [ zp ZP_BYTE:38 [ line::x0#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:13 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 line::x0#0 ] ] with [ zp ZP_BYTE:25 [ line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 ] ] with [ zp ZP_BYTE:44 [ line::yd#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 line::yd#0 ] ] with [ zp ZP_BYTE:23 [ line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:18 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 line::yd#0 line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 ] ] with [ zp ZP_BYTE:46 [ line::yd#3 ] ] +Coalescing zero page register [ zp ZP_WORD:49 [ plot::plotter_x#0 ] ] with [ zp ZP_WORD:53 [ plot::$0 ] ] +Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:6 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] +Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:7 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] +Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:8 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 line::x0#0 line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] +Allocated (was zp ZP_BYTE:16) zp ZP_BYTE:9 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] +Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:10 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 line::yd#0 line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 line::yd#3 ] +Allocated (was zp ZP_BYTE:21) zp ZP_BYTE:11 [ line_ydxd::y#2 line_ydxd::y#7 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#3 ] +Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:12 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] +Allocated (was zp ZP_BYTE:28) zp ZP_BYTE:13 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] +Allocated (was zp ZP_WORD:32) zp ZP_WORD:14 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] +Allocated (was zp ZP_WORD:34) zp ZP_WORD:16 [ init_screen::b#2 init_screen::b#1 ] +Allocated (was zp ZP_WORD:36) zp ZP_WORD:18 [ init_screen::c#2 init_screen::c#1 ] +Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:20 [ line::x1#0 ] +Allocated (was zp ZP_WORD:49) zp ZP_WORD:21 [ plot::plotter_x#0 plot::$0 ] +Allocated (was zp ZP_WORD:51) zp ZP_WORD:23 [ plot::plotter_y#0 ] +Allocated (was zp ZP_BYTE:56) zp ZP_BYTE:25 [ line_xdyi::$6 ] +Allocated (was zp ZP_BYTE:58) zp ZP_BYTE:26 [ line_xdyd::$6 ] +Allocated (was zp ZP_BYTE:60) zp ZP_BYTE:27 [ init_plot_tables::$6 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -5724,11 +5724,13 @@ lines: { } //SEG43 line line: { - .label x0 = 3 - .label x1 = 4 + .label x0 = 8 + .label x1 = $14 .label y0 = 5 - .label xd = 7 + .label xd = 3 .label yd = $a + .label yd_1 = 4 + .label yd_10 = 4 //SEG44 [25] if((byte) line::x0#0>=(byte) line::x1#0) goto line::@1 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::x1#0 line::y0#0 line::y1#0 ] ) -- vbuz1_ge_vbuz2_then_la1 lda x0 cmp x1 @@ -5753,9 +5755,9 @@ line: { tya sec sbc y0 - sta yd + sta yd_1 //SEG50 [29] if((byte) line::yd#1>=(byte) line::xd#1) goto line::@3 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 line::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 line::yd#1 ] ) -- vbuz1_ge_vbuz2_then_la1 - lda yd + lda yd_1 cmp xd bcs b3 jmp b17 @@ -5763,18 +5765,15 @@ line: { b17: //SEG52 [30] (byte) line_xdyi::x#0 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::xd#1 line::yd#1 line_xdyi::x#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::y0#0 line::xd#1 line::yd#1 line_xdyi::x#0 ] ) -- vbuxx=vbuz1 ldx x0 - //SEG53 [31] (byte) line_xdyi::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ) -- vbuz1=vbuz2 - lda y0 - sta line_xdyi.y + //SEG53 [31] (byte) line_xdyi::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ) + // (byte) line_xdyi::y#0 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 //SEG54 [32] (byte) line_xdyi::x1#0 ← (byte) line::x1#0 [ line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 ] ) -- vbuz1=vbuz2 lda x1 sta line_xdyi.x1 - //SEG55 [33] (byte) line_xdyi::xd#0 ← (byte) line::xd#1 [ line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyi.xd - //SEG56 [34] (byte) line_xdyi::yd#0 ← (byte) line::yd#1 [ line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyi.yd + //SEG55 [33] (byte) line_xdyi::xd#0 ← (byte) line::xd#1 [ line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ) + // (byte) line_xdyi::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 + //SEG56 [34] (byte) line_xdyi::yd#0 ← (byte) line::yd#1 [ line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ) + // (byte) line_xdyi::yd#0 = (byte) line::yd#1 // register copy zp ZP_BYTE:4 //SEG57 [35] call line_xdyi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG58 [109] phi from line::@17 to line_xdyi [phi:line::@17->line_xdyi] line_xdyi_from_b17: @@ -5798,12 +5797,10 @@ line: { ldx x0 //SEG69 [39] (byte) line_ydxi::y1#0 ← (byte) line::y1#0 [ line::xd#1 line::yd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 ] ) -- vbuz1=vbuyy sty line_ydxi.y1 - //SEG70 [40] (byte) line_ydxi::yd#0 ← (byte) line::yd#1 [ line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxi.yd - //SEG71 [41] (byte) line_ydxi::xd#0 ← (byte) line::xd#1 [ line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxi.xd + //SEG70 [40] (byte) line_ydxi::yd#0 ← (byte) line::yd#1 [ line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ) + // (byte) line_ydxi::yd#0 = (byte) line::yd#1 // register copy zp ZP_BYTE:4 + //SEG71 [41] (byte) line_ydxi::xd#0 ← (byte) line::xd#1 [ line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ) + // (byte) line_ydxi::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 //SEG72 [42] call line_ydxi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG73 [87] phi from line::@3 to line_ydxi [phi:line::@3->line_ydxi] line_ydxi_from_b3: @@ -5831,18 +5828,15 @@ line: { b20: //SEG83 [45] (byte) line_xdyd::x#0 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::xd#1 line::yd#0 line_xdyd::x#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::y0#0 line::xd#1 line::yd#0 line_xdyd::x#0 ] ) -- vbuxx=vbuz1 ldx x0 - //SEG84 [46] (byte) line_xdyd::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ) -- vbuz1=vbuz2 - lda y0 - sta line_xdyd.y + //SEG84 [46] (byte) line_xdyd::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ) + // (byte) line_xdyd::y#0 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 //SEG85 [47] (byte) line_xdyd::x1#0 ← (byte) line::x1#0 [ line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 ] ) -- vbuz1=vbuz2 lda x1 sta line_xdyd.x1 - //SEG86 [48] (byte) line_xdyd::xd#0 ← (byte) line::xd#1 [ line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyd.xd - //SEG87 [49] (byte) line_xdyd::yd#0 ← (byte) line::yd#0 [ line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyd.yd + //SEG86 [48] (byte) line_xdyd::xd#0 ← (byte) line::xd#1 [ line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ) + // (byte) line_xdyd::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 + //SEG87 [49] (byte) line_xdyd::yd#0 ← (byte) line::yd#0 [ line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ) + // (byte) line_xdyd::yd#0 = (byte) line::yd#0 // register copy zp ZP_BYTE:10 //SEG88 [50] call line_xdyd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG89 [139] phi from line::@20 to line_xdyd [phi:line::@20->line_xdyd] line_xdyd_from_b20: @@ -5861,12 +5855,10 @@ line: { ldx x1 //SEG98 [53] (byte) line_ydxd::y1#0 ← (byte) line::y0#0 [ line::xd#1 line::yd#0 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#0 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 ] ) // (byte) line_ydxd::y1#0 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 - //SEG99 [54] (byte) line_ydxd::yd#0 ← (byte) line::yd#0 [ line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxd.yd - //SEG100 [55] (byte) line_ydxd::xd#0 ← (byte) line::xd#1 [ line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxd.xd + //SEG99 [54] (byte) line_ydxd::yd#0 ← (byte) line::yd#0 [ line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ) + // (byte) line_ydxd::yd#0 = (byte) line::yd#0 // register copy zp ZP_BYTE:10 + //SEG100 [55] (byte) line_ydxd::xd#0 ← (byte) line::xd#1 [ line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ) + // (byte) line_ydxd::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 //SEG101 [56] call line_ydxd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG102 [124] phi from line::@6 to line_ydxd [phi:line::@6->line_ydxd] line_ydxd_from_b6: @@ -5908,15 +5900,12 @@ line: { ldx x1 //SEG116 [62] (byte) line_xdyd::y#1 ← (byte) line::y1#0 [ line::x0#0 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 ] ) -- vbuz1=vbuyy sty line_xdyd.y - //SEG117 [63] (byte) line_xdyd::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ) -- vbuz1=vbuz2 - lda x0 - sta line_xdyd.x1 - //SEG118 [64] (byte) line_xdyd::xd#1 ← (byte) line::xd#0 [ line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyd.xd - //SEG119 [65] (byte) line_xdyd::yd#1 ← (byte) line::yd#3 [ line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyd.yd + //SEG117 [63] (byte) line_xdyd::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ) + // (byte) line_xdyd::x1#1 = (byte) line::x0#0 // register copy zp ZP_BYTE:8 + //SEG118 [64] (byte) line_xdyd::xd#1 ← (byte) line::xd#0 [ line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ) + // (byte) line_xdyd::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 + //SEG119 [65] (byte) line_xdyd::yd#1 ← (byte) line::yd#3 [ line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ) + // (byte) line_xdyd::yd#1 = (byte) line::yd#3 // register copy zp ZP_BYTE:10 //SEG120 [66] call line_xdyd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG121 [139] phi from line::@24 to line_xdyd [phi:line::@24->line_xdyd] line_xdyd_from_b24: @@ -5936,12 +5925,10 @@ line: { ldx x0 //SEG130 [69] (byte) line_ydxd::y1#1 ← (byte) line::y1#0 [ line::xd#0 line::yd#3 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#3 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 ] ) -- vbuz1=vbuyy sty line_ydxd.y1 - //SEG131 [70] (byte) line_ydxd::yd#1 ← (byte) line::yd#3 [ line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxd.yd - //SEG132 [71] (byte) line_ydxd::xd#1 ← (byte) line::xd#0 [ line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxd.xd + //SEG131 [70] (byte) line_ydxd::yd#1 ← (byte) line::yd#3 [ line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ) + // (byte) line_ydxd::yd#1 = (byte) line::yd#3 // register copy zp ZP_BYTE:10 + //SEG132 [71] (byte) line_ydxd::xd#1 ← (byte) line::xd#0 [ line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ) + // (byte) line_ydxd::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 //SEG133 [72] call line_ydxd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG134 [124] phi from line::@10 to line_ydxd [phi:line::@10->line_ydxd] line_ydxd_from_b10: @@ -5959,9 +5946,9 @@ line: { eor #$ff sec adc y0 - sta yd + sta yd_10 //SEG142 [74] if((byte) line::yd#10>=(byte) line::xd#0) goto line::@13 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#0 line::yd#10 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#0 line::yd#10 ] ) -- vbuz1_ge_vbuz2_then_la1 - lda yd + lda yd_10 cmp xd bcs b13 jmp b27 @@ -5971,15 +5958,12 @@ line: { ldx x1 //SEG145 [76] (byte) line_xdyi::y#1 ← (byte) line::y1#0 [ line::x0#0 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 ] ) -- vbuz1=vbuyy sty line_xdyi.y - //SEG146 [77] (byte) line_xdyi::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ) -- vbuz1=vbuz2 - lda x0 - sta line_xdyi.x1 - //SEG147 [78] (byte) line_xdyi::xd#1 ← (byte) line::xd#0 [ line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyi.xd - //SEG148 [79] (byte) line_xdyi::yd#1 ← (byte) line::yd#10 [ line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyi.yd + //SEG146 [77] (byte) line_xdyi::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ) + // (byte) line_xdyi::x1#1 = (byte) line::x0#0 // register copy zp ZP_BYTE:8 + //SEG147 [78] (byte) line_xdyi::xd#1 ← (byte) line::xd#0 [ line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ) + // (byte) line_xdyi::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 + //SEG148 [79] (byte) line_xdyi::yd#1 ← (byte) line::yd#10 [ line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ) + // (byte) line_xdyi::yd#1 = (byte) line::yd#10 // register copy zp ZP_BYTE:4 //SEG149 [80] call line_xdyi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG150 [109] phi from line::@27 to line_xdyi [phi:line::@27->line_xdyi] line_xdyi_from_b27: @@ -5998,12 +5982,10 @@ line: { ldx x1 //SEG159 [83] (byte) line_ydxi::y1#1 ← (byte) line::y0#0 [ line::xd#0 line::yd#10 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#10 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 ] ) // (byte) line_ydxi::y1#1 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 - //SEG160 [84] (byte) line_ydxi::yd#1 ← (byte) line::yd#10 [ line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxi.yd - //SEG161 [85] (byte) line_ydxi::xd#1 ← (byte) line::xd#0 [ line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxi.xd + //SEG160 [84] (byte) line_ydxi::yd#1 ← (byte) line::yd#10 [ line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ) + // (byte) line_ydxi::yd#1 = (byte) line::yd#10 // register copy zp ZP_BYTE:4 + //SEG161 [85] (byte) line_ydxi::xd#1 ← (byte) line::xd#0 [ line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ) + // (byte) line_ydxi::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 //SEG162 [86] call line_ydxi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG163 [87] phi from line::@13 to line_ydxi [phi:line::@13->line_ydxi] line_ydxi_from_b13: @@ -6091,9 +6073,9 @@ line_ydxi: { } //SEG197 plot plot: { - .label _0 = 8 - .label plotter_x = 8 - .label plotter_y = $b + .label _0 = $15 + .label plotter_x = $15 + .label plotter_y = $17 //SEG198 [103] (word) plot::plotter_x#0 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#4) w= *((const byte[256]) plot_xlo#0 + (byte) plot::x#4) [ plot::x#4 plot::y#4 plot::plotter_x#0 ] ( main:2::lines:12::line:21::line_ydxi:42::plot:92 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_ydxi:86::plot:92 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyi:35::plot:114 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyi:80::plot:114 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_ydxd:56::plot:129 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#2 line_ydxd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_ydxd:72::plot:129 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#2 line_ydxd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyd:50::plot:144 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyd:66::plot:144 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] ) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx lda plot_xhi,x sta plotter_x+1 @@ -6127,12 +6109,12 @@ plot: { } //SEG205 line_xdyi line_xdyi: { - .label _6 = $a - .label y = 6 - .label x1 = 5 - .label xd = 4 - .label yd = 3 - .label e = 7 + .label _6 = $19 + .label y = 5 + .label x1 = 8 + .label xd = 3 + .label yd = 4 + .label e = 9 //SEG206 [110] (byte) line_xdyi::e#0 ← (byte) line_xdyi::yd#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] ) -- vbuz1=vbuz2_ror_1 lda yd lsr @@ -6203,11 +6185,11 @@ line_xdyi: { } //SEG233 line_ydxd line_ydxd: { - .label y = 6 + .label y = $b .label y1 = 5 - .label yd = 4 + .label yd = $a .label xd = 3 - .label e = 7 + .label e = $c //SEG234 [125] (byte) line_ydxd::e#0 ← (byte) line_ydxd::xd#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_ydxd::xd#2 line_ydxd::x#5 line_ydxd::y#7 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::e#0 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::x#5 line_ydxd::y#7 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::e#0 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::x#5 line_ydxd::y#7 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::e#0 ] ) -- vbuz1=vbuz2_ror_1 lda xd lsr @@ -6277,12 +6259,12 @@ line_ydxd: { } //SEG261 line_xdyd line_xdyd: { - .label _6 = $a - .label y = 6 - .label x1 = 5 - .label xd = 4 - .label yd = 3 - .label e = 7 + .label _6 = $1a + .label y = 5 + .label x1 = 8 + .label xd = 3 + .label yd = $a + .label e = $d //SEG262 [140] (byte) line_xdyd::e#0 ← (byte) line_xdyd::yd#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyd::yd#2 line_xdyd::x#6 line_xdyd::y#5 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::e#0 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::x#6 line_xdyd::y#5 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::e#0 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::x#6 line_xdyd::y#5 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::e#0 ] ) -- vbuz1=vbuz2_ror_1 lda yd lsr @@ -6353,8 +6335,8 @@ line_xdyd: { } //SEG289 init_plot_tables init_plot_tables: { - .label _6 = 2 - .label yoffs = 8 + .label _6 = $1b + .label yoffs = $e //SEG290 [155] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1] b1_from_init_plot_tables: //SEG291 [155] phi (byte) init_plot_tables::bits#3 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuyy=vbuc1 @@ -6476,8 +6458,8 @@ init_plot_tables: { } //SEG336 init_screen init_screen: { - .label b = 8 - .label c = 8 + .label b = $10 + .label c = $12 //SEG337 [181] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1] b1_from_init_screen: //SEG338 [181] phi (byte*) init_screen::b#2 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 @@ -6605,10 +6587,10 @@ Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #0 Removing instruction ldy l Removing instruction ldy l +Removing instruction lda yd_1 Removing instruction lda yd Removing instruction lda yd -Removing instruction lda yd -Removing instruction lda yd +Removing instruction lda yd_10 Removing instruction ldy #0 Removing instruction lda #>0 Replacing instruction ldx #0 with TAX @@ -6756,7 +6738,7 @@ FINAL SYMBOL TABLE (void()) init_plot_tables() (byte~) init_plot_tables::$0 reg byte a 22.0 (byte~) init_plot_tables::$10 reg byte a 22.0 -(byte~) init_plot_tables::$6 $6 zp ZP_BYTE:2 11.0 +(byte~) init_plot_tables::$6 $6 zp ZP_BYTE:27 11.0 (byte~) init_plot_tables::$7 reg byte a 22.0 (byte~) init_plot_tables::$8 reg byte a 22.0 (byte~) init_plot_tables::$9 reg byte a 22.0 @@ -6778,19 +6760,19 @@ FINAL SYMBOL TABLE (byte) init_plot_tables::y#1 reg byte x 16.5 (byte) init_plot_tables::y#2 reg byte x 6.0 (byte*) init_plot_tables::yoffs -(byte*) init_plot_tables::yoffs#1 yoffs zp ZP_WORD:8 22.0 -(byte*) init_plot_tables::yoffs#2 yoffs zp ZP_WORD:8 6.111111111111112 -(byte*) init_plot_tables::yoffs#4 yoffs zp ZP_WORD:8 11.0 +(byte*) init_plot_tables::yoffs#1 yoffs zp ZP_WORD:14 22.0 +(byte*) init_plot_tables::yoffs#2 yoffs zp ZP_WORD:14 6.111111111111112 +(byte*) init_plot_tables::yoffs#4 yoffs zp ZP_WORD:14 11.0 (void()) init_screen() (label) init_screen::@1 (label) init_screen::@2 (label) init_screen::@return (byte*) init_screen::b -(byte*) init_screen::b#1 b zp ZP_WORD:8 16.5 -(byte*) init_screen::b#2 b zp ZP_WORD:8 16.5 +(byte*) init_screen::b#1 b zp ZP_WORD:16 16.5 +(byte*) init_screen::b#2 b zp ZP_WORD:16 16.5 (byte*) init_screen::c -(byte*) init_screen::c#1 c zp ZP_WORD:8 16.5 -(byte*) init_screen::c#2 c zp ZP_WORD:8 16.5 +(byte*) init_screen::c#1 c zp ZP_WORD:18 16.5 +(byte*) init_screen::c#2 c zp ZP_WORD:18 16.5 (void()) line((byte) line::x0 , (byte) line::x1 , (byte) line::y0 , (byte) line::y1) (label) line::@1 (label) line::@10 @@ -6808,34 +6790,34 @@ FINAL SYMBOL TABLE (label) line::@9 (label) line::@return (byte) line::x0 -(byte) line::x0#0 x0 zp ZP_BYTE:3 5.173913043478264 +(byte) line::x0#0 x0 zp ZP_BYTE:8 5.173913043478264 (byte) line::x1 -(byte) line::x1#0 x1 zp ZP_BYTE:4 5.409090909090908 +(byte) line::x1#0 x1 zp ZP_BYTE:20 5.409090909090908 (byte) line::xd -(byte) line::xd#0 xd zp ZP_BYTE:7 0.7 -(byte) line::xd#1 xd zp ZP_BYTE:7 0.7 +(byte) line::xd#0 xd zp ZP_BYTE:3 0.7 +(byte) line::xd#1 xd zp ZP_BYTE:3 0.7 (byte) line::y0 (byte) line::y0#0 y0 zp ZP_BYTE:5 5.952380952380948 (byte) line::y1 (byte) line::y1#0 reg byte y 6.249999999999996 (byte) line::yd (byte) line::yd#0 yd zp ZP_BYTE:10 0.8888888888888888 -(byte) line::yd#1 yd zp ZP_BYTE:10 0.8888888888888888 -(byte) line::yd#10 yd zp ZP_BYTE:10 0.8888888888888888 +(byte) line::yd#1 yd#1 zp ZP_BYTE:4 0.8888888888888888 +(byte) line::yd#10 yd#10 zp ZP_BYTE:4 0.8888888888888888 (byte) line::yd#3 yd zp ZP_BYTE:10 0.8888888888888888 (void()) line_xdyd((byte) line_xdyd::x , (byte) line_xdyd::y , (byte) line_xdyd::x1 , (byte) line_xdyd::xd , (byte) line_xdyd::yd) -(byte/word~) line_xdyd::$6 $6 zp ZP_BYTE:10 2002.0 +(byte/word~) line_xdyd::$6 $6 zp ZP_BYTE:26 2002.0 (label) line_xdyd::@1 (label) line_xdyd::@2 (label) line_xdyd::@3 (label) line_xdyd::@5 (label) line_xdyd::@return (byte) line_xdyd::e -(byte) line_xdyd::e#0 e zp ZP_BYTE:7 4.0 -(byte) line_xdyd::e#1 e zp ZP_BYTE:7 1334.6666666666667 -(byte) line_xdyd::e#2 e zp ZP_BYTE:7 2002.0 -(byte) line_xdyd::e#3 e zp ZP_BYTE:7 400.79999999999995 -(byte) line_xdyd::e#6 e zp ZP_BYTE:7 1001.0 +(byte) line_xdyd::e#0 e zp ZP_BYTE:13 4.0 +(byte) line_xdyd::e#1 e zp ZP_BYTE:13 1334.6666666666667 +(byte) line_xdyd::e#2 e zp ZP_BYTE:13 2002.0 +(byte) line_xdyd::e#3 e zp ZP_BYTE:13 400.79999999999995 +(byte) line_xdyd::e#6 e zp ZP_BYTE:13 1001.0 (byte) line_xdyd::x (byte) line_xdyd::x#0 reg byte x 0.8 (byte) line_xdyd::x#1 reg byte x 0.8 @@ -6843,37 +6825,37 @@ FINAL SYMBOL TABLE (byte) line_xdyd::x#3 reg byte x 751.25 (byte) line_xdyd::x#6 reg byte x 3.0 (byte) line_xdyd::x1 -(byte) line_xdyd::x1#0 x1 zp ZP_BYTE:5 1.3333333333333333 -(byte) line_xdyd::x1#1 x1 zp ZP_BYTE:5 1.3333333333333333 -(byte) line_xdyd::x1#6 x1 zp ZP_BYTE:5 71.78571428571429 +(byte) line_xdyd::x1#0 x1 zp ZP_BYTE:8 1.3333333333333333 +(byte) line_xdyd::x1#1 x1 zp ZP_BYTE:8 1.3333333333333333 +(byte) line_xdyd::x1#6 x1 zp ZP_BYTE:8 71.78571428571429 (byte) line_xdyd::xd -(byte) line_xdyd::xd#0 xd zp ZP_BYTE:4 2.0 -(byte) line_xdyd::xd#1 xd zp ZP_BYTE:4 2.0 -(byte) line_xdyd::xd#5 xd zp ZP_BYTE:4 143.28571428571428 +(byte) line_xdyd::xd#0 xd zp ZP_BYTE:3 2.0 +(byte) line_xdyd::xd#1 xd zp ZP_BYTE:3 2.0 +(byte) line_xdyd::xd#5 xd zp ZP_BYTE:3 143.28571428571428 (byte) line_xdyd::y -(byte) line_xdyd::y#0 y zp ZP_BYTE:6 1.0 -(byte) line_xdyd::y#1 y zp ZP_BYTE:6 1.0 -(byte) line_xdyd::y#2 y zp ZP_BYTE:6 1001.0 -(byte) line_xdyd::y#3 y zp ZP_BYTE:6 572.2857142857142 -(byte) line_xdyd::y#5 y zp ZP_BYTE:6 3.0 -(byte) line_xdyd::y#6 y zp ZP_BYTE:6 1001.0 +(byte) line_xdyd::y#0 y zp ZP_BYTE:5 1.0 +(byte) line_xdyd::y#1 y zp ZP_BYTE:5 1.0 +(byte) line_xdyd::y#2 y zp ZP_BYTE:5 1001.0 +(byte) line_xdyd::y#3 y zp ZP_BYTE:5 572.2857142857142 +(byte) line_xdyd::y#5 y zp ZP_BYTE:5 3.0 +(byte) line_xdyd::y#6 y zp ZP_BYTE:5 1001.0 (byte) line_xdyd::yd -(byte) line_xdyd::yd#0 yd zp ZP_BYTE:3 4.0 -(byte) line_xdyd::yd#1 yd zp ZP_BYTE:3 4.0 -(byte) line_xdyd::yd#2 yd zp ZP_BYTE:3 71.92857142857143 +(byte) line_xdyd::yd#0 yd zp ZP_BYTE:10 4.0 +(byte) line_xdyd::yd#1 yd zp ZP_BYTE:10 4.0 +(byte) line_xdyd::yd#2 yd zp ZP_BYTE:10 71.92857142857143 (void()) line_xdyi((byte) line_xdyi::x , (byte) line_xdyi::y , (byte) line_xdyi::x1 , (byte) line_xdyi::xd , (byte) line_xdyi::yd) -(byte/word~) line_xdyi::$6 $6 zp ZP_BYTE:10 2002.0 +(byte/word~) line_xdyi::$6 $6 zp ZP_BYTE:25 2002.0 (label) line_xdyi::@1 (label) line_xdyi::@2 (label) line_xdyi::@3 (label) line_xdyi::@5 (label) line_xdyi::@return (byte) line_xdyi::e -(byte) line_xdyi::e#0 e zp ZP_BYTE:7 4.0 -(byte) line_xdyi::e#1 e zp ZP_BYTE:7 1334.6666666666667 -(byte) line_xdyi::e#2 e zp ZP_BYTE:7 2002.0 -(byte) line_xdyi::e#3 e zp ZP_BYTE:7 400.79999999999995 -(byte) line_xdyi::e#6 e zp ZP_BYTE:7 1001.0 +(byte) line_xdyi::e#0 e zp ZP_BYTE:9 4.0 +(byte) line_xdyi::e#1 e zp ZP_BYTE:9 1334.6666666666667 +(byte) line_xdyi::e#2 e zp ZP_BYTE:9 2002.0 +(byte) line_xdyi::e#3 e zp ZP_BYTE:9 400.79999999999995 +(byte) line_xdyi::e#6 e zp ZP_BYTE:9 1001.0 (byte) line_xdyi::x (byte) line_xdyi::x#0 reg byte x 0.8 (byte) line_xdyi::x#1 reg byte x 0.8 @@ -6881,24 +6863,24 @@ FINAL SYMBOL TABLE (byte) line_xdyi::x#3 reg byte x 751.25 (byte) line_xdyi::x#6 reg byte x 3.0 (byte) line_xdyi::x1 -(byte) line_xdyi::x1#0 x1 zp ZP_BYTE:5 1.3333333333333333 -(byte) line_xdyi::x1#1 x1 zp ZP_BYTE:5 1.3333333333333333 -(byte) line_xdyi::x1#6 x1 zp ZP_BYTE:5 71.78571428571429 +(byte) line_xdyi::x1#0 x1 zp ZP_BYTE:8 1.3333333333333333 +(byte) line_xdyi::x1#1 x1 zp ZP_BYTE:8 1.3333333333333333 +(byte) line_xdyi::x1#6 x1 zp ZP_BYTE:8 71.78571428571429 (byte) line_xdyi::xd -(byte) line_xdyi::xd#0 xd zp ZP_BYTE:4 2.0 -(byte) line_xdyi::xd#1 xd zp ZP_BYTE:4 2.0 -(byte) line_xdyi::xd#5 xd zp ZP_BYTE:4 143.28571428571428 +(byte) line_xdyi::xd#0 xd zp ZP_BYTE:3 2.0 +(byte) line_xdyi::xd#1 xd zp ZP_BYTE:3 2.0 +(byte) line_xdyi::xd#5 xd zp ZP_BYTE:3 143.28571428571428 (byte) line_xdyi::y -(byte) line_xdyi::y#0 y zp ZP_BYTE:6 1.0 -(byte) line_xdyi::y#1 y zp ZP_BYTE:6 1.0 -(byte) line_xdyi::y#2 y zp ZP_BYTE:6 1001.0 -(byte) line_xdyi::y#3 y zp ZP_BYTE:6 572.2857142857142 -(byte) line_xdyi::y#5 y zp ZP_BYTE:6 3.0 -(byte) line_xdyi::y#6 y zp ZP_BYTE:6 1001.0 +(byte) line_xdyi::y#0 y zp ZP_BYTE:5 1.0 +(byte) line_xdyi::y#1 y zp ZP_BYTE:5 1.0 +(byte) line_xdyi::y#2 y zp ZP_BYTE:5 1001.0 +(byte) line_xdyi::y#3 y zp ZP_BYTE:5 572.2857142857142 +(byte) line_xdyi::y#5 y zp ZP_BYTE:5 3.0 +(byte) line_xdyi::y#6 y zp ZP_BYTE:5 1001.0 (byte) line_xdyi::yd -(byte) line_xdyi::yd#0 yd zp ZP_BYTE:3 4.0 -(byte) line_xdyi::yd#1 yd zp ZP_BYTE:3 4.0 -(byte) line_xdyi::yd#2 yd zp ZP_BYTE:3 71.92857142857143 +(byte) line_xdyi::yd#0 yd zp ZP_BYTE:4 4.0 +(byte) line_xdyi::yd#1 yd zp ZP_BYTE:4 4.0 +(byte) line_xdyi::yd#2 yd zp ZP_BYTE:4 71.92857142857143 (void()) line_ydxd((byte) line_ydxd::y , (byte) line_ydxd::x , (byte) line_ydxd::y1 , (byte) line_ydxd::yd , (byte) line_ydxd::xd) (byte/word~) line_ydxd::$6 reg byte y 2002.0 (label) line_ydxd::@1 @@ -6907,11 +6889,11 @@ FINAL SYMBOL TABLE (label) line_ydxd::@5 (label) line_ydxd::@return (byte) line_ydxd::e -(byte) line_ydxd::e#0 e zp ZP_BYTE:7 4.0 -(byte) line_ydxd::e#1 e zp ZP_BYTE:7 1334.6666666666667 -(byte) line_ydxd::e#2 e zp ZP_BYTE:7 2002.0 -(byte) line_ydxd::e#3 e zp ZP_BYTE:7 400.79999999999995 -(byte) line_ydxd::e#6 e zp ZP_BYTE:7 1001.0 +(byte) line_ydxd::e#0 e zp ZP_BYTE:12 4.0 +(byte) line_ydxd::e#1 e zp ZP_BYTE:12 1334.6666666666667 +(byte) line_ydxd::e#2 e zp ZP_BYTE:12 2002.0 +(byte) line_ydxd::e#3 e zp ZP_BYTE:12 400.79999999999995 +(byte) line_ydxd::e#6 e zp ZP_BYTE:12 1001.0 (byte) line_ydxd::x (byte) line_ydxd::x#0 reg byte x 1.0 (byte) line_ydxd::x#1 reg byte x 1.0 @@ -6924,19 +6906,19 @@ FINAL SYMBOL TABLE (byte) line_ydxd::xd#1 xd zp ZP_BYTE:3 4.0 (byte) line_ydxd::xd#2 xd zp ZP_BYTE:3 71.92857142857143 (byte) line_ydxd::y -(byte) line_ydxd::y#0 y zp ZP_BYTE:6 0.8 -(byte) line_ydxd::y#1 y zp ZP_BYTE:6 0.8 -(byte) line_ydxd::y#2 y zp ZP_BYTE:6 751.25 -(byte) line_ydxd::y#3 y zp ZP_BYTE:6 375.375 -(byte) line_ydxd::y#7 y zp ZP_BYTE:6 3.0 +(byte) line_ydxd::y#0 y zp ZP_BYTE:11 0.8 +(byte) line_ydxd::y#1 y zp ZP_BYTE:11 0.8 +(byte) line_ydxd::y#2 y zp ZP_BYTE:11 751.25 +(byte) line_ydxd::y#3 y zp ZP_BYTE:11 375.375 +(byte) line_ydxd::y#7 y zp ZP_BYTE:11 3.0 (byte) line_ydxd::y1 (byte) line_ydxd::y1#0 y1 zp ZP_BYTE:5 1.3333333333333333 (byte) line_ydxd::y1#1 y1 zp ZP_BYTE:5 1.3333333333333333 (byte) line_ydxd::y1#6 y1 zp ZP_BYTE:5 71.78571428571429 (byte) line_ydxd::yd -(byte) line_ydxd::yd#0 yd zp ZP_BYTE:4 2.0 -(byte) line_ydxd::yd#1 yd zp ZP_BYTE:4 2.0 -(byte) line_ydxd::yd#5 yd zp ZP_BYTE:4 143.28571428571428 +(byte) line_ydxd::yd#0 yd zp ZP_BYTE:10 2.0 +(byte) line_ydxd::yd#1 yd zp ZP_BYTE:10 2.0 +(byte) line_ydxd::yd#5 yd zp ZP_BYTE:10 143.28571428571428 (void()) line_ydxi((byte) line_ydxi::y , (byte) line_ydxi::x , (byte) line_ydxi::y1 , (byte) line_ydxi::yd , (byte) line_ydxi::xd) (byte/word~) line_ydxi::$6 reg byte y 2002.0 (label) line_ydxi::@1 @@ -6994,14 +6976,14 @@ FINAL SYMBOL TABLE (label) main::@5 (label) main::@return (void()) plot((byte) plot::x , (byte) plot::y) -(word~) plot::$0 $0 zp ZP_WORD:8 1.0 +(word~) plot::$0 $0 zp ZP_WORD:21 1.0 (byte~) plot::$1 reg byte a 4.0 (label) plot::@return (byte*) plot::plotter (word) plot::plotter_x -(word) plot::plotter_x#0 plotter_x zp ZP_WORD:8 2.0 +(word) plot::plotter_x#0 plotter_x zp ZP_WORD:21 2.0 (word) plot::plotter_y -(word) plot::plotter_y#0 plotter_y zp ZP_WORD:11 4.0 +(word) plot::plotter_y#0 plotter_y zp ZP_WORD:23 4.0 (byte) plot::x (byte) plot::x#0 reg byte x 1001.0 (byte) plot::x#1 reg byte x 1001.0 @@ -7025,29 +7007,41 @@ FINAL SYMBOL TABLE (byte[256]) plot_ylo (const byte[256]) plot_ylo#0 plot_ylo = { fill( 256, 0) } -zp ZP_BYTE:2 [ lines::l#2 lines::l#1 init_plot_tables::$6 ] -zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 line::x0#0 ] -zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 line::x1#0 ] -zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 line::y0#0 ] +zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] +zp ZP_BYTE:3 [ line_ydxi::xd#2 line_ydxi::xd#1 line_ydxi::xd#0 line::xd#1 line_xdyi::xd#5 line_xdyi::xd#0 line_xdyi::xd#1 line::xd#0 line_ydxd::xd#2 line_ydxd::xd#1 line_ydxd::xd#0 line_xdyd::xd#5 line_xdyd::xd#0 line_xdyd::xd#1 ] +zp ZP_BYTE:4 [ line_ydxi::yd#5 line_ydxi::yd#1 line_ydxi::yd#0 line::yd#1 line_xdyi::yd#2 line_xdyi::yd#0 line_xdyi::yd#1 line::yd#10 ] +zp ZP_BYTE:5 [ line_ydxi::y1#6 line_ydxi::y1#1 line_ydxi::y1#0 line::y0#0 line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 line_ydxd::y1#6 line_ydxd::y1#1 line_ydxd::y1#0 line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] reg byte x [ line_ydxi::x#3 line_ydxi::x#5 line_ydxi::x#1 line_ydxi::x#0 line_ydxi::x#6 line_ydxi::x#2 ] -zp ZP_BYTE:6 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 line_xdyi::y#3 line_xdyi::y#5 line_xdyi::y#0 line_xdyi::y#1 line_xdyi::y#6 line_xdyi::y#2 line_ydxd::y#2 line_ydxd::y#7 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#3 line_xdyd::y#3 line_xdyd::y#5 line_xdyd::y#0 line_xdyd::y#1 line_xdyd::y#6 line_xdyd::y#2 ] -zp ZP_BYTE:7 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 line::xd#1 line::xd#0 ] +zp ZP_BYTE:6 [ line_ydxi::y#3 line_ydxi::y#6 line_ydxi::y#1 line_ydxi::y#0 line_ydxi::y#2 ] +zp ZP_BYTE:7 [ line_ydxi::e#3 line_ydxi::e#0 line_ydxi::e#6 line_ydxi::e#2 line_ydxi::e#1 ] reg byte x [ plot::x#4 plot::x#1 plot::x#0 plot::x#3 plot::x#2 ] reg byte y [ plot::y#4 plot::y#1 plot::y#0 plot::y#3 plot::y#2 ] +zp ZP_BYTE:8 [ line_xdyi::x1#6 line_xdyi::x1#0 line_xdyi::x1#1 line::x0#0 line_xdyd::x1#6 line_xdyd::x1#0 line_xdyd::x1#1 ] reg byte x [ line_xdyi::x#3 line_xdyi::x#6 line_xdyi::x#0 line_xdyi::x#1 line_xdyi::x#2 ] +zp ZP_BYTE:9 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 ] +zp ZP_BYTE:10 [ line_ydxd::yd#5 line_ydxd::yd#1 line_ydxd::yd#0 line::yd#0 line_xdyd::yd#2 line_xdyd::yd#0 line_xdyd::yd#1 line::yd#3 ] reg byte x [ line_ydxd::x#3 line_ydxd::x#5 line_ydxd::x#1 line_ydxd::x#0 line_ydxd::x#6 line_ydxd::x#2 ] +zp ZP_BYTE:11 [ line_ydxd::y#2 line_ydxd::y#7 line_ydxd::y#1 line_ydxd::y#0 line_ydxd::y#3 ] +zp ZP_BYTE:12 [ line_ydxd::e#3 line_ydxd::e#0 line_ydxd::e#6 line_ydxd::e#2 line_ydxd::e#1 ] reg byte x [ line_xdyd::x#3 line_xdyd::x#6 line_xdyd::x#0 line_xdyd::x#1 line_xdyd::x#2 ] +zp ZP_BYTE:13 [ line_xdyd::e#3 line_xdyd::e#0 line_xdyd::e#6 line_xdyd::e#2 line_xdyd::e#1 ] reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ] reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ] -zp ZP_WORD:8 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#0 plot::$0 ] +zp ZP_WORD:14 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] +zp ZP_WORD:16 [ init_screen::b#2 init_screen::b#1 ] +zp ZP_WORD:18 [ init_screen::c#2 init_screen::c#1 ] +zp ZP_BYTE:20 [ line::x1#0 ] reg byte y [ line::y1#0 ] -zp ZP_BYTE:10 [ line::yd#1 line::yd#0 line::yd#3 line::yd#10 line_xdyi::$6 line_xdyd::$6 ] reg byte y [ line_ydxi::$6 ] -zp ZP_WORD:11 [ plot::plotter_y#0 ] +zp ZP_WORD:21 [ plot::plotter_x#0 plot::$0 ] +zp ZP_WORD:23 [ plot::plotter_y#0 ] reg byte a [ plot::$1 ] +zp ZP_BYTE:25 [ line_xdyi::$6 ] reg byte y [ line_ydxd::$6 ] +zp ZP_BYTE:26 [ line_xdyd::$6 ] reg byte a [ init_plot_tables::$0 ] +zp ZP_BYTE:27 [ init_plot_tables::$6 ] reg byte a [ init_plot_tables::$7 ] reg byte a [ init_plot_tables::$8 ] reg byte a [ init_plot_tables::$9 ] @@ -7055,7 +7049,7 @@ reg byte a [ init_plot_tables::$10 ] FINAL ASSEMBLER -Score: 218375 +Score: 218255 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -7151,11 +7145,13 @@ lines: { } //SEG43 line line: { - .label x0 = 3 - .label x1 = 4 + .label x0 = 8 + .label x1 = $14 .label y0 = 5 - .label xd = 7 + .label xd = 3 .label yd = $a + .label yd_1 = 4 + .label yd_10 = 4 //SEG44 [25] if((byte) line::x0#0>=(byte) line::x1#0) goto line::@1 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::x1#0 line::y0#0 line::y1#0 ] ) -- vbuz1_ge_vbuz2_then_la1 lda x0 cmp x1 @@ -7176,25 +7172,22 @@ line: { tya sec sbc y0 - sta yd + sta yd_1 //SEG50 [29] if((byte) line::yd#1>=(byte) line::xd#1) goto line::@3 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 line::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 line::yd#1 ] ) -- vbuz1_ge_vbuz2_then_la1 cmp xd bcs b3 //SEG51 line::@17 //SEG52 [30] (byte) line_xdyi::x#0 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::xd#1 line::yd#1 line_xdyi::x#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::y0#0 line::xd#1 line::yd#1 line_xdyi::x#0 ] ) -- vbuxx=vbuz1 ldx x0 - //SEG53 [31] (byte) line_xdyi::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ) -- vbuz1=vbuz2 - lda y0 - sta line_xdyi.y + //SEG53 [31] (byte) line_xdyi::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 ] ) + // (byte) line_xdyi::y#0 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 //SEG54 [32] (byte) line_xdyi::x1#0 ← (byte) line::x1#0 [ line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 ] ) -- vbuz1=vbuz2 lda x1 sta line_xdyi.x1 - //SEG55 [33] (byte) line_xdyi::xd#0 ← (byte) line::xd#1 [ line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyi.xd - //SEG56 [34] (byte) line_xdyi::yd#0 ← (byte) line::yd#1 [ line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyi.yd + //SEG55 [33] (byte) line_xdyi::xd#0 ← (byte) line::xd#1 [ line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#1 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ] ) + // (byte) line_xdyi::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 + //SEG56 [34] (byte) line_xdyi::yd#0 ← (byte) line::yd#1 [ line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ] ) + // (byte) line_xdyi::yd#0 = (byte) line::yd#1 // register copy zp ZP_BYTE:4 //SEG57 [35] call line_xdyi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG58 [109] phi from line::@17 to line_xdyi [phi:line::@17->line_xdyi] //SEG59 [109] phi (byte) line_xdyi::x1#6 = (byte) line_xdyi::x1#0 [phi:line::@17->line_xdyi#0] -- register_copy @@ -7216,12 +7209,10 @@ line: { ldx x0 //SEG69 [39] (byte) line_ydxi::y1#0 ← (byte) line::y1#0 [ line::xd#1 line::yd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 ] ) -- vbuz1=vbuyy sty line_ydxi.y1 - //SEG70 [40] (byte) line_ydxi::yd#0 ← (byte) line::yd#1 [ line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxi.yd - //SEG71 [41] (byte) line_ydxi::xd#0 ← (byte) line::xd#1 [ line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxi.xd + //SEG70 [40] (byte) line_ydxi::yd#0 ← (byte) line::yd#1 [ line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 ] ) + // (byte) line_ydxi::yd#0 = (byte) line::yd#1 // register copy zp ZP_BYTE:4 + //SEG71 [41] (byte) line_ydxi::xd#0 ← (byte) line::xd#1 [ line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#0 line_ydxi::x#0 line_ydxi::y1#0 line_ydxi::yd#0 line_ydxi::xd#0 ] ) + // (byte) line_ydxi::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 //SEG72 [42] call line_ydxi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG73 [87] phi from line::@3 to line_ydxi [phi:line::@3->line_ydxi] //SEG74 [87] phi (byte) line_ydxi::y1#6 = (byte) line_ydxi::y1#0 [phi:line::@3->line_ydxi#0] -- register_copy @@ -7245,18 +7236,15 @@ line: { //SEG82 line::@20 //SEG83 [45] (byte) line_xdyd::x#0 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::xd#1 line::yd#0 line_xdyd::x#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::y0#0 line::xd#1 line::yd#0 line_xdyd::x#0 ] ) -- vbuxx=vbuz1 ldx x0 - //SEG84 [46] (byte) line_xdyd::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ) -- vbuz1=vbuz2 - lda y0 - sta line_xdyd.y + //SEG84 [46] (byte) line_xdyd::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x1#0 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 ] ) + // (byte) line_xdyd::y#0 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 //SEG85 [47] (byte) line_xdyd::x1#0 ← (byte) line::x1#0 [ line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 ] ) -- vbuz1=vbuz2 lda x1 sta line_xdyd.x1 - //SEG86 [48] (byte) line_xdyd::xd#0 ← (byte) line::xd#1 [ line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyd.xd - //SEG87 [49] (byte) line_xdyd::yd#0 ← (byte) line::yd#0 [ line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyd.yd + //SEG86 [48] (byte) line_xdyd::xd#0 ← (byte) line::xd#1 [ line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#0 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 ] ) + // (byte) line_xdyd::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 + //SEG87 [49] (byte) line_xdyd::yd#0 ← (byte) line::yd#0 [ line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#0 line_xdyd::y#0 line_xdyd::x1#0 line_xdyd::xd#0 line_xdyd::yd#0 ] ) + // (byte) line_xdyd::yd#0 = (byte) line::yd#0 // register copy zp ZP_BYTE:10 //SEG88 [50] call line_xdyd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG89 [139] phi from line::@20 to line_xdyd [phi:line::@20->line_xdyd] //SEG90 [139] phi (byte) line_xdyd::x1#6 = (byte) line_xdyd::x1#0 [phi:line::@20->line_xdyd#0] -- register_copy @@ -7274,12 +7262,10 @@ line: { ldx x1 //SEG98 [53] (byte) line_ydxd::y1#0 ← (byte) line::y0#0 [ line::xd#1 line::yd#0 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line::yd#0 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 ] ) // (byte) line_ydxd::y1#0 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 - //SEG99 [54] (byte) line_ydxd::yd#0 ← (byte) line::yd#0 [ line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxd.yd - //SEG100 [55] (byte) line_ydxd::xd#0 ← (byte) line::xd#1 [ line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxd.xd + //SEG99 [54] (byte) line_ydxd::yd#0 ← (byte) line::yd#0 [ line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#1 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 ] ) + // (byte) line_ydxd::yd#0 = (byte) line::yd#0 // register copy zp ZP_BYTE:10 + //SEG100 [55] (byte) line_ydxd::xd#0 ← (byte) line::xd#1 [ line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#0 line_ydxd::x#0 line_ydxd::y1#0 line_ydxd::yd#0 line_ydxd::xd#0 ] ) + // (byte) line_ydxd::xd#0 = (byte) line::xd#1 // register copy zp ZP_BYTE:3 //SEG101 [56] call line_ydxd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG102 [124] phi from line::@6 to line_ydxd [phi:line::@6->line_ydxd] //SEG103 [124] phi (byte) line_ydxd::y1#6 = (byte) line_ydxd::y1#0 [phi:line::@6->line_ydxd#0] -- register_copy @@ -7315,15 +7301,12 @@ line: { ldx x1 //SEG116 [62] (byte) line_xdyd::y#1 ← (byte) line::y1#0 [ line::x0#0 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 ] ) -- vbuz1=vbuyy sty line_xdyd.y - //SEG117 [63] (byte) line_xdyd::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ) -- vbuz1=vbuz2 - lda x0 - sta line_xdyd.x1 - //SEG118 [64] (byte) line_xdyd::xd#1 ← (byte) line::xd#0 [ line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyd.xd - //SEG119 [65] (byte) line_xdyd::yd#1 ← (byte) line::yd#3 [ line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyd.yd + //SEG117 [63] (byte) line_xdyd::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 ] ) + // (byte) line_xdyd::x1#1 = (byte) line::x0#0 // register copy zp ZP_BYTE:8 + //SEG118 [64] (byte) line_xdyd::xd#1 ← (byte) line::xd#0 [ line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#3 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 ] ) + // (byte) line_xdyd::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 + //SEG119 [65] (byte) line_xdyd::yd#1 ← (byte) line::yd#3 [ line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyd::x#1 line_xdyd::y#1 line_xdyd::x1#1 line_xdyd::xd#1 line_xdyd::yd#1 ] ) + // (byte) line_xdyd::yd#1 = (byte) line::yd#3 // register copy zp ZP_BYTE:10 //SEG120 [66] call line_xdyd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG121 [139] phi from line::@24 to line_xdyd [phi:line::@24->line_xdyd] //SEG122 [139] phi (byte) line_xdyd::x1#6 = (byte) line_xdyd::x1#1 [phi:line::@24->line_xdyd#0] -- register_copy @@ -7342,12 +7325,10 @@ line: { ldx x0 //SEG130 [69] (byte) line_ydxd::y1#1 ← (byte) line::y1#0 [ line::xd#0 line::yd#3 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#3 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 ] ) -- vbuz1=vbuyy sty line_ydxd.y1 - //SEG131 [70] (byte) line_ydxd::yd#1 ← (byte) line::yd#3 [ line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxd.yd - //SEG132 [71] (byte) line_ydxd::xd#1 ← (byte) line::xd#0 [ line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxd.xd + //SEG131 [70] (byte) line_ydxd::yd#1 ← (byte) line::yd#3 [ line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 ] ) + // (byte) line_ydxd::yd#1 = (byte) line::yd#3 // register copy zp ZP_BYTE:10 + //SEG132 [71] (byte) line_ydxd::xd#1 ← (byte) line::xd#0 [ line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxd::y#1 line_ydxd::x#1 line_ydxd::y1#1 line_ydxd::yd#1 line_ydxd::xd#1 ] ) + // (byte) line_ydxd::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 //SEG133 [72] call line_ydxd param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG134 [124] phi from line::@10 to line_ydxd [phi:line::@10->line_ydxd] //SEG135 [124] phi (byte) line_ydxd::y1#6 = (byte) line_ydxd::y1#1 [phi:line::@10->line_ydxd#0] -- register_copy @@ -7364,7 +7345,7 @@ line: { eor #$ff sec adc y0 - sta yd + sta yd_10 //SEG142 [74] if((byte) line::yd#10>=(byte) line::xd#0) goto line::@13 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#0 line::yd#10 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#0 line::yd#10 ] ) -- vbuz1_ge_vbuz2_then_la1 cmp xd bcs b13 @@ -7373,15 +7354,12 @@ line: { ldx x1 //SEG145 [76] (byte) line_xdyi::y#1 ← (byte) line::y1#0 [ line::x0#0 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::x0#0 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 ] ) -- vbuz1=vbuyy sty line_xdyi.y - //SEG146 [77] (byte) line_xdyi::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ) -- vbuz1=vbuz2 - lda x0 - sta line_xdyi.x1 - //SEG147 [78] (byte) line_xdyi::xd#1 ← (byte) line::xd#0 [ line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_xdyi.xd - //SEG148 [79] (byte) line_xdyi::yd#1 ← (byte) line::yd#10 [ line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_xdyi.yd + //SEG146 [77] (byte) line_xdyi::x1#1 ← (byte) line::x0#0 [ line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 ] ) + // (byte) line_xdyi::x1#1 = (byte) line::x0#0 // register copy zp ZP_BYTE:8 + //SEG147 [78] (byte) line_xdyi::xd#1 ← (byte) line::xd#0 [ line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::yd#10 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 ] ) + // (byte) line_xdyi::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 + //SEG148 [79] (byte) line_xdyi::yd#1 ← (byte) line::yd#10 [ line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::x1#1 line_xdyi::xd#1 line_xdyi::yd#1 ] ) + // (byte) line_xdyi::yd#1 = (byte) line::yd#10 // register copy zp ZP_BYTE:4 //SEG149 [80] call line_xdyi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG150 [109] phi from line::@27 to line_xdyi [phi:line::@27->line_xdyi] //SEG151 [109] phi (byte) line_xdyi::x1#6 = (byte) line_xdyi::x1#1 [phi:line::@27->line_xdyi#0] -- register_copy @@ -7399,12 +7377,10 @@ line: { ldx x1 //SEG159 [83] (byte) line_ydxi::y1#1 ← (byte) line::y0#0 [ line::xd#0 line::yd#10 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line::yd#10 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 ] ) // (byte) line_ydxi::y1#1 = (byte) line::y0#0 // register copy zp ZP_BYTE:5 - //SEG160 [84] (byte) line_ydxi::yd#1 ← (byte) line::yd#10 [ line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ) -- vbuz1=vbuz2 - lda yd - sta line_ydxi.yd - //SEG161 [85] (byte) line_ydxi::xd#1 ← (byte) line::xd#0 [ line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ) -- vbuz1=vbuz2 - lda xd - sta line_ydxi.xd + //SEG160 [84] (byte) line_ydxi::yd#1 ← (byte) line::yd#10 [ line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line::xd#0 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 ] ) + // (byte) line_ydxi::yd#1 = (byte) line::yd#10 // register copy zp ZP_BYTE:4 + //SEG161 [85] (byte) line_ydxi::xd#1 ← (byte) line::xd#0 [ line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ( main:2::lines:12::line:21 [ lines::l#2 line_ydxi::y#1 line_ydxi::x#1 line_ydxi::y1#1 line_ydxi::yd#1 line_ydxi::xd#1 ] ) + // (byte) line_ydxi::xd#1 = (byte) line::xd#0 // register copy zp ZP_BYTE:3 //SEG162 [86] call line_ydxi param-assignment [ ] ( main:2::lines:12::line:21 [ lines::l#2 ] ) //SEG163 [87] phi from line::@13 to line_ydxi [phi:line::@13->line_ydxi] //SEG164 [87] phi (byte) line_ydxi::y1#6 = (byte) line_ydxi::y1#1 [phi:line::@13->line_ydxi#0] -- register_copy @@ -7478,9 +7454,9 @@ line_ydxi: { } //SEG197 plot plot: { - .label _0 = 8 - .label plotter_x = 8 - .label plotter_y = $b + .label _0 = $15 + .label plotter_x = $15 + .label plotter_y = $17 //SEG198 [103] (word) plot::plotter_x#0 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#4) w= *((const byte[256]) plot_xlo#0 + (byte) plot::x#4) [ plot::x#4 plot::y#4 plot::plotter_x#0 ] ( main:2::lines:12::line:21::line_ydxi:42::plot:92 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_ydxi:86::plot:92 [ lines::l#2 line_ydxi::xd#2 line_ydxi::yd#5 line_ydxi::y1#6 line_ydxi::x#3 line_ydxi::y#3 line_ydxi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyi:35::plot:114 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyi:80::plot:114 [ lines::l#2 line_xdyi::yd#2 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::x#3 line_xdyi::y#3 line_xdyi::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_ydxd:56::plot:129 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#2 line_ydxd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_ydxd:72::plot:129 [ lines::l#2 line_ydxd::xd#2 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::x#3 line_ydxd::y#2 line_ydxd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyd:50::plot:144 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] main:2::lines:12::line:21::line_xdyd:66::plot:144 [ lines::l#2 line_xdyd::yd#2 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::x#3 line_xdyd::y#3 line_xdyd::e#3 plot::x#4 plot::y#4 plot::plotter_x#0 ] ) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx lda plot_xhi,x sta plotter_x+1 @@ -7511,12 +7487,12 @@ plot: { } //SEG205 line_xdyi line_xdyi: { - .label _6 = $a - .label y = 6 - .label x1 = 5 - .label xd = 4 - .label yd = 3 - .label e = 7 + .label _6 = $19 + .label y = 5 + .label x1 = 8 + .label xd = 3 + .label yd = 4 + .label e = 9 //SEG206 [110] (byte) line_xdyi::e#0 ← (byte) line_xdyi::yd#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] ( main:2::lines:12::line:21::line_xdyi:35 [ lines::l#2 line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] main:2::lines:12::line:21::line_xdyi:80 [ lines::l#2 line_xdyi::yd#2 line_xdyi::x#6 line_xdyi::y#5 line_xdyi::xd#5 line_xdyi::x1#6 line_xdyi::e#0 ] ) -- vbuz1=vbuz2_ror_1 lda yd lsr @@ -7574,11 +7550,11 @@ line_xdyi: { } //SEG233 line_ydxd line_ydxd: { - .label y = 6 + .label y = $b .label y1 = 5 - .label yd = 4 + .label yd = $a .label xd = 3 - .label e = 7 + .label e = $c //SEG234 [125] (byte) line_ydxd::e#0 ← (byte) line_ydxd::xd#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_ydxd::xd#2 line_ydxd::x#5 line_ydxd::y#7 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::e#0 ] ( main:2::lines:12::line:21::line_ydxd:56 [ lines::l#2 line_ydxd::xd#2 line_ydxd::x#5 line_ydxd::y#7 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::e#0 ] main:2::lines:12::line:21::line_ydxd:72 [ lines::l#2 line_ydxd::xd#2 line_ydxd::x#5 line_ydxd::y#7 line_ydxd::yd#5 line_ydxd::y1#6 line_ydxd::e#0 ] ) -- vbuz1=vbuz2_ror_1 lda xd lsr @@ -7635,12 +7611,12 @@ line_ydxd: { } //SEG261 line_xdyd line_xdyd: { - .label _6 = $a - .label y = 6 - .label x1 = 5 - .label xd = 4 - .label yd = 3 - .label e = 7 + .label _6 = $1a + .label y = 5 + .label x1 = 8 + .label xd = 3 + .label yd = $a + .label e = $d //SEG262 [140] (byte) line_xdyd::e#0 ← (byte) line_xdyd::yd#2 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ line_xdyd::yd#2 line_xdyd::x#6 line_xdyd::y#5 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::e#0 ] ( main:2::lines:12::line:21::line_xdyd:50 [ lines::l#2 line_xdyd::yd#2 line_xdyd::x#6 line_xdyd::y#5 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::e#0 ] main:2::lines:12::line:21::line_xdyd:66 [ lines::l#2 line_xdyd::yd#2 line_xdyd::x#6 line_xdyd::y#5 line_xdyd::xd#5 line_xdyd::x1#6 line_xdyd::e#0 ] ) -- vbuz1=vbuz2_ror_1 lda yd lsr @@ -7698,8 +7674,8 @@ line_xdyd: { } //SEG289 init_plot_tables init_plot_tables: { - .label _6 = 2 - .label yoffs = 8 + .label _6 = $1b + .label yoffs = $e //SEG290 [155] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1] //SEG291 [155] phi (byte) init_plot_tables::bits#3 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuyy=vbuc1 ldy #$80 @@ -7798,8 +7774,8 @@ init_plot_tables: { } //SEG336 init_screen init_screen: { - .label b = 8 - .label c = 8 + .label b = $10 + .label c = $12 //SEG337 [181] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1] //SEG338 [181] phi (byte*) init_screen::b#2 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 lda #BITMAP diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log index 67f1302e5..6316b4591 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log @@ -2266,17 +2266,17 @@ Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_plot_tables::$6 Uplifting [init_plot_tables] best 8251 combination zp ZP_BYTE:30 [ init_plot_tables::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ plot::x#0 ] Uplifting [plot] best 8251 combination zp ZP_BYTE:12 [ plot::x#0 ] -Coalescing zero page register [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] ] with [ zp ZP_WORD:8 [ init_screen::b#2 init_screen::b#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 ] ] with [ zp ZP_WORD:10 [ init_screen::c#2 init_screen::c#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 ] ] with [ zp ZP_WORD:15 [ plot::plotter_x#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 ] ] with [ zp ZP_WORD:18 [ plot::plotter_x#2 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 ] ] with [ zp ZP_WORD:26 [ plot::plotter#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:12 [ plot::x#0 ] ] with [ zp ZP_BYTE:30 [ init_plot_tables::$6 ] ] +Coalescing zero page register [ zp ZP_WORD:15 [ plot::plotter_x#1 ] ] with [ zp ZP_WORD:18 [ plot::plotter_x#2 ] ] +Coalescing zero page register [ zp ZP_WORD:15 [ plot::plotter_x#1 plot::plotter_x#2 ] ] with [ zp ZP_WORD:26 [ plot::plotter#0 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ plot::plotter_y#1 ] ] with [ zp ZP_WORD:24 [ plot::plotter_y#2 ] ] -Allocated (was zp ZP_WORD:6) zp ZP_WORD:2 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ] -Allocated (was zp ZP_BYTE:12) zp ZP_BYTE:4 [ plot::x#0 init_plot_tables::$6 ] -Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:5 [ plot::y#0 ] -Allocated (was zp ZP_WORD:21) zp ZP_WORD:6 [ plot::plotter_y#1 plot::plotter_y#2 ] +Allocated (was zp ZP_WORD:6) zp ZP_WORD:2 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] +Allocated (was zp ZP_WORD:8) zp ZP_WORD:4 [ init_screen::b#2 init_screen::b#1 ] +Allocated (was zp ZP_WORD:10) zp ZP_WORD:6 [ init_screen::c#2 init_screen::c#1 ] +Allocated (was zp ZP_BYTE:12) zp ZP_BYTE:8 [ plot::x#0 ] +Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:9 [ plot::y#0 ] +Allocated (was zp ZP_WORD:15) zp ZP_WORD:10 [ plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ] +Allocated (was zp ZP_WORD:21) zp ZP_WORD:12 [ plot::plotter_y#1 plot::plotter_y#2 ] +Allocated (was zp ZP_BYTE:30) zp ZP_BYTE:14 [ init_plot_tables::$6 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -2402,11 +2402,11 @@ plots: { } //SEG44 plot plot: { - .label x = 4 - .label y = 5 - .label plotter_x = 2 - .label plotter_y = 6 - .label plotter = 2 + .label x = 8 + .label y = 9 + .label plotter_x = $a + .label plotter_y = $c + .label plotter = $a //SEG45 [25] (byte~) plot::$6 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#0) [ plot::x#0 plot::y#0 plot::$6 ] ( main:2::plots:13::plot:21 [ plots::i#2 plot::x#0 plot::y#0 plot::$6 ] ) -- vbuaa=pbuc1_derefidx_vbuz1 ldy x lda plot_xhi,y @@ -2455,7 +2455,7 @@ plot: { } //SEG58 init_plot_tables init_plot_tables: { - .label _6 = 4 + .label _6 = $e .label yoffs = 2 //SEG59 [38] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1] b1_from_init_plot_tables: @@ -2578,8 +2578,8 @@ init_plot_tables: { } //SEG105 init_screen init_screen: { - .label b = 2 - .label c = 2 + .label b = 4 + .label c = 6 //SEG106 [64] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1] b1_from_init_screen: //SEG107 [64] phi (byte*) init_screen::b#2 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 @@ -2771,7 +2771,7 @@ FINAL SYMBOL TABLE (void()) init_plot_tables() (byte~) init_plot_tables::$0 reg byte a 22.0 (byte~) init_plot_tables::$10 reg byte a 22.0 -(byte~) init_plot_tables::$6 $6 zp ZP_BYTE:4 11.0 +(byte~) init_plot_tables::$6 $6 zp ZP_BYTE:14 11.0 (byte~) init_plot_tables::$7 reg byte a 22.0 (byte~) init_plot_tables::$8 reg byte a 22.0 (byte~) init_plot_tables::$9 reg byte a 22.0 @@ -2801,11 +2801,11 @@ FINAL SYMBOL TABLE (label) init_screen::@2 (label) init_screen::@return (byte*) init_screen::b -(byte*) init_screen::b#1 b zp ZP_WORD:2 16.5 -(byte*) init_screen::b#2 b zp ZP_WORD:2 16.5 +(byte*) init_screen::b#1 b zp ZP_WORD:4 16.5 +(byte*) init_screen::b#2 b zp ZP_WORD:4 16.5 (byte*) init_screen::c -(byte*) init_screen::c#1 c zp ZP_WORD:2 16.5 -(byte*) init_screen::c#2 c zp ZP_WORD:2 16.5 +(byte*) init_screen::c#1 c zp ZP_WORD:6 16.5 +(byte*) init_screen::c#2 c zp ZP_WORD:6 16.5 (void()) main() (label) main::@2 (label) main::@3 @@ -2820,17 +2820,17 @@ FINAL SYMBOL TABLE (byte~) plot::$9 reg byte a 4.0 (label) plot::@return (byte*) plot::plotter -(byte*) plot::plotter#0 plotter zp ZP_WORD:2 3.0 +(byte*) plot::plotter#0 plotter zp ZP_WORD:10 3.0 (byte*) plot::plotter_x -(byte*) plot::plotter_x#1 plotter_x zp ZP_WORD:2 2.0 -(byte*) plot::plotter_x#2 plotter_x zp ZP_WORD:2 0.8 +(byte*) plot::plotter_x#1 plotter_x zp ZP_WORD:10 2.0 +(byte*) plot::plotter_x#2 plotter_x zp ZP_WORD:10 0.8 (word) plot::plotter_y -(word) plot::plotter_y#1 plotter_y zp ZP_WORD:6 2.0 -(word) plot::plotter_y#2 plotter_y zp ZP_WORD:6 4.0 +(word) plot::plotter_y#1 plotter_y zp ZP_WORD:12 2.0 +(word) plot::plotter_y#2 plotter_y zp ZP_WORD:12 4.0 (byte) plot::x -(byte) plot::x#0 x zp ZP_BYTE:4 9.727272727272727 +(byte) plot::x#0 x zp ZP_BYTE:8 9.727272727272727 (byte) plot::y -(byte) plot::y#0 y zp ZP_BYTE:5 15.000000000000002 +(byte) plot::y#0 y zp ZP_BYTE:9 15.000000000000002 (byte[256]) plot_bit (const byte[256]) plot_bit#0 plot_bit = { fill( 256, 0) } (byte[256]) plot_xhi @@ -2859,16 +2859,20 @@ reg byte x [ plots::i#2 plots::i#1 ] reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ] reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ] -zp ZP_WORD:2 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ] -zp ZP_BYTE:4 [ plot::x#0 init_plot_tables::$6 ] -zp ZP_BYTE:5 [ plot::y#0 ] +zp ZP_WORD:2 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] +zp ZP_WORD:4 [ init_screen::b#2 init_screen::b#1 ] +zp ZP_WORD:6 [ init_screen::c#2 init_screen::c#1 ] +zp ZP_BYTE:8 [ plot::x#0 ] +zp ZP_BYTE:9 [ plot::y#0 ] reg byte a [ plot::$6 ] +zp ZP_WORD:10 [ plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ] reg byte a [ plot::$7 ] reg byte a [ plot::$8 ] -zp ZP_WORD:6 [ plot::plotter_y#1 plot::plotter_y#2 ] +zp ZP_WORD:12 [ plot::plotter_y#1 plot::plotter_y#2 ] reg byte a [ plot::$9 ] reg byte a [ plot::$5 ] reg byte a [ init_plot_tables::$0 ] +zp ZP_BYTE:14 [ init_plot_tables::$6 ] reg byte a [ init_plot_tables::$7 ] reg byte a [ init_plot_tables::$8 ] reg byte a [ init_plot_tables::$9 ] @@ -2971,11 +2975,11 @@ plots: { } //SEG44 plot plot: { - .label x = 4 - .label y = 5 - .label plotter_x = 2 - .label plotter_y = 6 - .label plotter = 2 + .label x = 8 + .label y = 9 + .label plotter_x = $a + .label plotter_y = $c + .label plotter = $a //SEG45 [25] (byte~) plot::$6 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#0) [ plot::x#0 plot::y#0 plot::$6 ] ( main:2::plots:13::plot:21 [ plots::i#2 plot::x#0 plot::y#0 plot::$6 ] ) -- vbuaa=pbuc1_derefidx_vbuz1 ldy x lda plot_xhi,y @@ -3020,7 +3024,7 @@ plot: { } //SEG58 init_plot_tables init_plot_tables: { - .label _6 = 4 + .label _6 = $e .label yoffs = 2 //SEG59 [38] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1] //SEG60 [38] phi (byte) init_plot_tables::bits#3 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuyy=vbuc1 @@ -3120,8 +3124,8 @@ init_plot_tables: { } //SEG105 init_screen init_screen: { - .label b = 2 - .label c = 2 + .label b = 4 + .label c = 6 //SEG106 [64] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1] //SEG107 [64] phi (byte*) init_screen::b#2 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 lda #$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/constants.log b/src/test/java/dk/camelot64/kickc/test/ref/constants.log index 1c659a601..b0fd9c6ac 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/constants.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/constants.log @@ -2991,13 +2991,13 @@ Attempting to uplift remaining variables inzp ZP_BYTE:15 [ assert_byte::c#3 ] Uplifting [assert_byte] best 2175 combination zp ZP_BYTE:15 [ assert_byte::c#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ assert_sbyte::c#5 ] Uplifting [assert_sbyte] best 2175 combination zp ZP_BYTE:5 [ assert_sbyte::c#5 ] -Coalescing zero page register [ zp ZP_WORD:2 [ assert_sbyte::msg#5 ] ] with [ zp ZP_WORD:6 [ char_cursor#75 char_cursor#65 char_cursor#2 char_cursor#82 char_cursor#1 char_cursor#88 char_cursor#89 ] ] -Coalescing zero page register [ zp ZP_WORD:2 [ assert_sbyte::msg#5 char_cursor#75 char_cursor#65 char_cursor#2 char_cursor#82 char_cursor#1 char_cursor#88 char_cursor#89 ] ] with [ zp ZP_WORD:16 [ print_cls::sc#2 print_cls::sc#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:5 [ assert_sbyte::c#5 ] ] with [ zp ZP_BYTE:15 [ assert_byte::c#3 ] ] -Coalescing zero page register [ zp ZP_WORD:8 [ print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 ] ] with [ zp ZP_WORD:12 [ assert_byte::msg#3 ] ] -Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ assert_sbyte::c#5 assert_byte::c#3 ] -Allocated (was zp ZP_WORD:8) zp ZP_WORD:5 [ print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 assert_byte::msg#3 ] +Coalescing zero page register [ zp ZP_WORD:2 [ assert_sbyte::msg#5 ] ] with [ zp ZP_WORD:8 [ print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 ] ] +Coalescing zero page register [ zp ZP_WORD:2 [ assert_sbyte::msg#5 print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 ] ] with [ zp ZP_WORD:12 [ assert_byte::msg#3 ] ] +Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ assert_sbyte::c#5 ] +Allocated (was zp ZP_WORD:6) zp ZP_WORD:5 [ char_cursor#75 char_cursor#65 char_cursor#2 char_cursor#82 char_cursor#1 char_cursor#88 char_cursor#89 ] Allocated (was zp ZP_WORD:10) zp ZP_WORD:7 [ line_cursor#21 line_cursor#42 line_cursor#45 line_cursor#1 ] +Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:9 [ assert_byte::c#3 ] +Allocated (was zp ZP_WORD:16) zp ZP_WORD:10 [ print_cls::sc#2 print_cls::sc#1 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -3008,7 +3008,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label BGCOL = $d021 .const GREEN = 5 .const RED = 2 - .label char_cursor = 2 + .label char_cursor = 5 .label line_cursor = 7 //SEG2 @begin bbegin: @@ -3169,11 +3169,8 @@ test_sbytes: { assert_sbyte: { .label msg = 2 .label c = 4 - //SEG59 [23] (byte*) print_str::str#5 ← (byte*) assert_sbyte::msg#5 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ) -- pbuz1=pbuz2 - lda msg - sta print_str.str - lda msg+1 - sta print_str.str+1 + //SEG59 [23] (byte*) print_str::str#5 ← (byte*) assert_sbyte::msg#5 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ) + // (byte*) print_str::str#5 = (byte*) assert_sbyte::msg#5 // register copy zp ZP_WORD:2 //SEG60 [24] (byte*~) char_cursor#82 ← (byte*) line_cursor#1 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] ) -- pbuz1=pbuz2 lda line_cursor sta char_cursor @@ -3260,7 +3257,7 @@ assert_sbyte: { } //SEG92 print_str print_str: { - .label str = 5 + .label str = 2 //SEG93 [37] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] b1_from_print_str: b1_from_b2: @@ -3418,10 +3415,10 @@ test_bytes: { } //SEG140 assert_byte assert_byte: { - .label msg = 5 - .label c = 4 + .label msg = 2 + .label c = 9 //SEG141 [56] (byte*) print_str::str#1 ← (byte*) assert_byte::msg#3 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ( main:2::test_bytes:7::assert_byte:49 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:51 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:53 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ) - // (byte*) print_str::str#1 = (byte*) assert_byte::msg#3 // register copy zp ZP_WORD:5 + // (byte*) print_str::str#1 = (byte*) assert_byte::msg#3 // register copy zp ZP_WORD:2 //SEG142 [57] call print_str param-assignment [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ( main:2::test_bytes:7::assert_byte:49 [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:51 [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:53 [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ) //SEG143 [36] phi from assert_byte to print_str [phi:assert_byte->print_str] print_str_from_assert_byte: @@ -3503,7 +3500,7 @@ assert_byte: { } //SEG173 print_cls print_cls: { - .label sc = 2 + .label sc = $a //SEG174 [69] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] b1_from_print_cls: //SEG175 [69] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 @@ -3678,9 +3675,9 @@ FINAL SYMBOL TABLE (byte) assert_byte::b (byte) assert_byte::b#3 reg byte x 0.4 (byte) assert_byte::c -(byte) assert_byte::c#3 c zp ZP_BYTE:4 0.4 +(byte) assert_byte::c#3 c zp ZP_BYTE:9 0.4 (byte*) assert_byte::msg -(byte*) assert_byte::msg#3 msg zp ZP_WORD:5 2.0 +(byte*) assert_byte::msg#3 msg zp ZP_WORD:2 2.0 (const string) assert_byte::str str = (string) " @" (const string) assert_byte::str1 str1 = (string) "ok@" (const string) assert_byte::str2 str2 = (string) "fail!@" @@ -3701,13 +3698,13 @@ FINAL SYMBOL TABLE (const string) assert_sbyte::str1 str1 = (string) "ok@" (const string) assert_sbyte::str2 str2 = (string) "fail!@" (byte*) char_cursor -(byte*) char_cursor#1 char_cursor zp ZP_WORD:2 11.0 -(byte*) char_cursor#2 char_cursor zp ZP_WORD:2 2.230769230769231 -(byte*) char_cursor#65 char_cursor zp ZP_WORD:2 3.0 -(byte*) char_cursor#75 char_cursor zp ZP_WORD:2 18.0 -(byte*~) char_cursor#82 char_cursor zp ZP_WORD:2 4.0 -(byte*~) char_cursor#88 char_cursor zp ZP_WORD:2 4.0 -(byte*~) char_cursor#89 char_cursor zp ZP_WORD:2 4.0 +(byte*) char_cursor#1 char_cursor zp ZP_WORD:5 11.0 +(byte*) char_cursor#2 char_cursor zp ZP_WORD:5 2.230769230769231 +(byte*) char_cursor#65 char_cursor zp ZP_WORD:5 3.0 +(byte*) char_cursor#75 char_cursor zp ZP_WORD:5 18.0 +(byte*~) char_cursor#82 char_cursor zp ZP_WORD:5 4.0 +(byte*~) char_cursor#88 char_cursor zp ZP_WORD:5 4.0 +(byte*~) char_cursor#89 char_cursor zp ZP_WORD:5 4.0 (byte*) line_cursor (byte*) line_cursor#1 line_cursor zp ZP_WORD:7 1.2500000000000002 (byte*) line_cursor#21 line_cursor zp ZP_WORD:7 24.0 @@ -3721,8 +3718,8 @@ FINAL SYMBOL TABLE (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:10 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:10 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -3731,11 +3728,11 @@ FINAL SYMBOL TABLE (label) print_str::@2 (label) print_str::@return (byte*) print_str::str -(byte*) print_str::str#0 str zp ZP_WORD:5 22.0 -(byte*) print_str::str#1 str zp ZP_WORD:5 4.0 -(byte*) print_str::str#10 str zp ZP_WORD:5 11.5 -(byte*) print_str::str#11 str zp ZP_WORD:5 6.0 -(byte*) print_str::str#5 str zp ZP_WORD:5 2.0 +(byte*) print_str::str#0 str zp ZP_WORD:2 22.0 +(byte*) print_str::str#1 str zp ZP_WORD:2 4.0 +(byte*) print_str::str#10 str zp ZP_WORD:2 11.5 +(byte*) print_str::str#11 str zp ZP_WORD:2 6.0 +(byte*) print_str::str#5 str zp ZP_WORD:2 2.0 (void()) test_bytes() (label) test_bytes::@1 (label) test_bytes::@2 @@ -3771,16 +3768,18 @@ FINAL SYMBOL TABLE (const string) test_sbytes::msg3 msg3 = (string) "-(0+2-4)=2@" (const string) test_sbytes::msg4 msg4 = (string) "-127-127=2@" -zp ZP_WORD:2 [ assert_sbyte::msg#5 char_cursor#75 char_cursor#65 char_cursor#2 char_cursor#82 char_cursor#1 char_cursor#88 char_cursor#89 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:2 [ assert_sbyte::msg#5 print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 assert_byte::msg#3 ] reg byte x [ assert_sbyte::b#5 ] -zp ZP_BYTE:4 [ assert_sbyte::c#5 assert_byte::c#3 ] -zp ZP_WORD:5 [ print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 assert_byte::msg#3 ] +zp ZP_BYTE:4 [ assert_sbyte::c#5 ] +zp ZP_WORD:5 [ char_cursor#75 char_cursor#65 char_cursor#2 char_cursor#82 char_cursor#1 char_cursor#88 char_cursor#89 ] zp ZP_WORD:7 [ line_cursor#21 line_cursor#42 line_cursor#45 line_cursor#1 ] reg byte x [ assert_byte::b#3 ] +zp ZP_BYTE:9 [ assert_byte::c#3 ] +zp ZP_WORD:10 [ print_cls::sc#2 print_cls::sc#1 ] FINAL ASSEMBLER -Score: 1858 +Score: 1846 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -3790,7 +3789,7 @@ Score: 1858 .label BGCOL = $d021 .const GREEN = 5 .const RED = 2 - .label char_cursor = 2 + .label char_cursor = 5 .label line_cursor = 7 //SEG2 @begin //SEG3 [1] phi from @begin to @13 [phi:@begin->@13] @@ -3914,11 +3913,8 @@ test_sbytes: { assert_sbyte: { .label msg = 2 .label c = 4 - //SEG59 [23] (byte*) print_str::str#5 ← (byte*) assert_sbyte::msg#5 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ) -- pbuz1=pbuz2 - lda msg - sta print_str.str - lda msg+1 - sta print_str.str+1 + //SEG59 [23] (byte*) print_str::str#5 ← (byte*) assert_sbyte::msg#5 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 line_cursor#1 ] ) + // (byte*) print_str::str#5 = (byte*) assert_sbyte::msg#5 // register copy zp ZP_WORD:2 //SEG60 [24] (byte*~) char_cursor#82 ← (byte*) line_cursor#1 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 char_cursor#82 line_cursor#1 ] ) -- pbuz1=pbuz2 lda line_cursor sta char_cursor @@ -3986,7 +3982,7 @@ assert_sbyte: { } //SEG92 print_str print_str: { - .label str = 5 + .label str = 2 //SEG93 [37] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] //SEG94 [37] phi (byte*) char_cursor#2 = (byte*) char_cursor#75 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy //SEG95 [37] phi (byte*) print_str::str#10 = (byte*) print_str::str#11 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy @@ -4124,10 +4120,10 @@ test_bytes: { } //SEG140 assert_byte assert_byte: { - .label msg = 5 - .label c = 4 + .label msg = 2 + .label c = 9 //SEG141 [56] (byte*) print_str::str#1 ← (byte*) assert_byte::msg#3 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ( main:2::test_bytes:7::assert_byte:49 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:51 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:53 [ print_str::str#1 char_cursor#65 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ) - // (byte*) print_str::str#1 = (byte*) assert_byte::msg#3 // register copy zp ZP_WORD:5 + // (byte*) print_str::str#1 = (byte*) assert_byte::msg#3 // register copy zp ZP_WORD:2 //SEG142 [57] call print_str param-assignment [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ( main:2::test_bytes:7::assert_byte:49 [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:51 [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] main:2::test_bytes:7::assert_byte:53 [ char_cursor#2 line_cursor#45 assert_byte::b#3 assert_byte::c#3 ] ) //SEG143 [36] phi from assert_byte to print_str [phi:assert_byte->print_str] //SEG144 [36] phi (byte*) char_cursor#75 = (byte*) char_cursor#65 [phi:assert_byte->print_str#0] -- register_copy @@ -4190,7 +4186,7 @@ assert_byte: { } //SEG173 print_cls print_cls: { - .label sc = 2 + .label sc = $a //SEG174 [69] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] //SEG175 [69] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 lda #<$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/constants.sym b/src/test/java/dk/camelot64/kickc/test/ref/constants.sym index 8c6ad8a01..2d82f90f1 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/constants.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/constants.sym @@ -17,9 +17,9 @@ (byte) assert_byte::b (byte) assert_byte::b#3 reg byte x 0.4 (byte) assert_byte::c -(byte) assert_byte::c#3 c zp ZP_BYTE:4 0.4 +(byte) assert_byte::c#3 c zp ZP_BYTE:9 0.4 (byte*) assert_byte::msg -(byte*) assert_byte::msg#3 msg zp ZP_WORD:5 2.0 +(byte*) assert_byte::msg#3 msg zp ZP_WORD:2 2.0 (const string) assert_byte::str str = (string) " @" (const string) assert_byte::str1 str1 = (string) "ok@" (const string) assert_byte::str2 str2 = (string) "fail!@" @@ -40,13 +40,13 @@ (const string) assert_sbyte::str1 str1 = (string) "ok@" (const string) assert_sbyte::str2 str2 = (string) "fail!@" (byte*) char_cursor -(byte*) char_cursor#1 char_cursor zp ZP_WORD:2 11.0 -(byte*) char_cursor#2 char_cursor zp ZP_WORD:2 2.230769230769231 -(byte*) char_cursor#65 char_cursor zp ZP_WORD:2 3.0 -(byte*) char_cursor#75 char_cursor zp ZP_WORD:2 18.0 -(byte*~) char_cursor#82 char_cursor zp ZP_WORD:2 4.0 -(byte*~) char_cursor#88 char_cursor zp ZP_WORD:2 4.0 -(byte*~) char_cursor#89 char_cursor zp ZP_WORD:2 4.0 +(byte*) char_cursor#1 char_cursor zp ZP_WORD:5 11.0 +(byte*) char_cursor#2 char_cursor zp ZP_WORD:5 2.230769230769231 +(byte*) char_cursor#65 char_cursor zp ZP_WORD:5 3.0 +(byte*) char_cursor#75 char_cursor zp ZP_WORD:5 18.0 +(byte*~) char_cursor#82 char_cursor zp ZP_WORD:5 4.0 +(byte*~) char_cursor#88 char_cursor zp ZP_WORD:5 4.0 +(byte*~) char_cursor#89 char_cursor zp ZP_WORD:5 4.0 (byte*) line_cursor (byte*) line_cursor#1 line_cursor zp ZP_WORD:7 1.2500000000000002 (byte*) line_cursor#21 line_cursor zp ZP_WORD:7 24.0 @@ -60,8 +60,8 @@ (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:10 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:10 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -70,11 +70,11 @@ (label) print_str::@2 (label) print_str::@return (byte*) print_str::str -(byte*) print_str::str#0 str zp ZP_WORD:5 22.0 -(byte*) print_str::str#1 str zp ZP_WORD:5 4.0 -(byte*) print_str::str#10 str zp ZP_WORD:5 11.5 -(byte*) print_str::str#11 str zp ZP_WORD:5 6.0 -(byte*) print_str::str#5 str zp ZP_WORD:5 2.0 +(byte*) print_str::str#0 str zp ZP_WORD:2 22.0 +(byte*) print_str::str#1 str zp ZP_WORD:2 4.0 +(byte*) print_str::str#10 str zp ZP_WORD:2 11.5 +(byte*) print_str::str#11 str zp ZP_WORD:2 6.0 +(byte*) print_str::str#5 str zp ZP_WORD:2 2.0 (void()) test_bytes() (label) test_bytes::@1 (label) test_bytes::@2 @@ -110,9 +110,11 @@ (const string) test_sbytes::msg3 msg3 = (string) "-(0+2-4)=2@" (const string) test_sbytes::msg4 msg4 = (string) "-127-127=2@" -zp ZP_WORD:2 [ assert_sbyte::msg#5 char_cursor#75 char_cursor#65 char_cursor#2 char_cursor#82 char_cursor#1 char_cursor#88 char_cursor#89 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:2 [ assert_sbyte::msg#5 print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 assert_byte::msg#3 ] reg byte x [ assert_sbyte::b#5 ] -zp ZP_BYTE:4 [ assert_sbyte::c#5 assert_byte::c#3 ] -zp ZP_WORD:5 [ print_str::str#10 print_str::str#11 print_str::str#1 print_str::str#5 print_str::str#0 assert_byte::msg#3 ] +zp ZP_BYTE:4 [ assert_sbyte::c#5 ] +zp ZP_WORD:5 [ char_cursor#75 char_cursor#65 char_cursor#2 char_cursor#82 char_cursor#1 char_cursor#88 char_cursor#89 ] zp ZP_WORD:7 [ line_cursor#21 line_cursor#42 line_cursor#45 line_cursor#1 ] reg byte x [ assert_byte::b#3 ] +zp ZP_BYTE:9 [ assert_byte::c#3 ] +zp ZP_WORD:10 [ print_cls::sc#2 print_cls::sc#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/division.asm b/src/test/java/dk/camelot64/kickc/test/ref/division.asm index b4c9a2b44..123c01ee1 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/division.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/division.asm @@ -3,7 +3,7 @@ .pc = $80d "Program" .label char_cursor = 7 .label line_cursor = 3 - .label rem16u = 9 + .label rem16u = $b jsr main main: { jsr print_cls @@ -12,9 +12,9 @@ main: { rts } test_16u: { - .label dividend = $d - .label divisor = $f - .label res = $11 + .label dividend = 5 + .label divisor = $16 + .label res = $f .label i = 2 lda #0 sta rem16u @@ -35,18 +35,6 @@ test_16u: { lda dividend+1 sta div16u.dividend+1 jsr div16u - lda div16u.return_1 - sta div16u.return - lda div16u.return_1+1 - sta div16u.return+1 - lda div16u.return - sta res - lda div16u.return+1 - sta res+1 - lda dividend - sta print_word.w - lda dividend+1 - sta print_word.w+1 lda line_cursor sta char_cursor lda line_cursor+1 @@ -152,7 +140,7 @@ print_char: { rts } print_str: { - .label str = 5 + .label str = 9 b1: ldy #0 lda (str),y @@ -174,12 +162,11 @@ print_str: { jmp b1 } div16u: { - .label dividend = 5 - .label divisor = $f - .label return = 5 - .label rem = 9 - .label quotient = 7 - .label return_1 = 7 + .label dividend = $d + .label divisor = $16 + .label return = $f + .label rem = $b + .label quotient = $f ldx #0 txa sta quotient @@ -229,10 +216,10 @@ div16u: { } test_8u: { .label rem = $ff - .label dividend = $13 - .label divisor = $14 - .label res = $b - .label i = 2 + .label dividend = $18 + .label divisor = $19 + .label res = $1a + .label i = $11 lda #<$400 sta line_cursor lda #>$400 @@ -296,10 +283,10 @@ test_8u: { divisors: .byte 5, 7, $b, $d, $11, $13 } div8u: { - .label dividend = $b - .label divisor = $14 - .label quotient = $c - .label return = $c + .label dividend = $12 + .label divisor = $19 + .label quotient = $13 + .label return = $13 ldx #0 txa sta quotient @@ -331,7 +318,7 @@ div8u: { rts } print_cls: { - .label sc = 3 + .label sc = $14 lda #<$400 sta sc lda #>$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/division.log b/src/test/java/dk/camelot64/kickc/test/ref/division.log index b650bf9f3..3d493e310 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/division.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/division.log @@ -4384,24 +4384,24 @@ Attempting to uplift remaining variables inzp ZP_BYTE:42 [ test_8u::divisor#0 ] Uplifting [test_8u] best 38374 combination zp ZP_BYTE:42 [ test_8u::divisor#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:45 [ test_8u::res#0 ] Uplifting [test_8u] best 38374 combination zp ZP_BYTE:45 [ test_8u::res#0 ] -Coalescing zero page register [ zp ZP_BYTE:2 [ test_16u::i#10 test_16u::i#1 ] ] with [ zp ZP_BYTE:20 [ test_8u::i#10 test_8u::i#1 ] ] -Coalescing zero page register [ zp ZP_WORD:3 [ line_cursor#11 line_cursor#22 line_cursor#1 line_cursor#25 ] ] with [ zp ZP_WORD:25 [ print_cls::sc#2 print_cls::sc#1 ] ] -Coalescing zero page register [ zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 ] ] with [ zp ZP_WORD:11 [ print_str::str#7 print_str::str#9 print_str::str#0 ] ] -Coalescing zero page register [ zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 print_str::str#7 print_str::str#9 print_str::str#0 ] ] with [ zp ZP_WORD:15 [ div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 ] ] -Coalescing zero page register [ zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 print_str::str#7 print_str::str#9 print_str::str#0 div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 ] ] with [ zp ZP_WORD:33 [ div16u::return#0 ] ] -Coalescing zero page register [ zp ZP_WORD:9 [ char_cursor#45 char_cursor#72 char_cursor#71 char_cursor#84 char_cursor#2 char_cursor#11 char_cursor#75 char_cursor#1 char_cursor#98 ] ] with [ zp ZP_WORD:17 [ div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 ] ] -Coalescing zero page register [ zp ZP_BYTE:22 [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 ] ] with [ zp ZP_BYTE:45 [ test_8u::res#0 ] ] +Coalescing zero page register [ zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 ] ] with [ zp ZP_WORD:27 [ test_16u::dividend#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 ] ] with [ zp ZP_WORD:33 [ div16u::return#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 div16u::return#0 ] ] with [ zp ZP_WORD:35 [ test_16u::res#0 ] ] Coalescing zero page register [ zp ZP_WORD:29 [ test_16u::divisor#0 ] ] with [ zp ZP_WORD:31 [ div16u::divisor#0 ] ] Coalescing zero page register [ zp ZP_BYTE:42 [ test_8u::divisor#0 ] ] with [ zp ZP_BYTE:43 [ div8u::divisor#0 ] ] -Allocated (was zp ZP_WORD:9) zp ZP_WORD:7 [ char_cursor#45 char_cursor#72 char_cursor#71 char_cursor#84 char_cursor#2 char_cursor#11 char_cursor#75 char_cursor#1 char_cursor#98 div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 ] -Allocated (was zp ZP_WORD:13) zp ZP_WORD:9 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ] -Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:11 [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 test_8u::res#0 ] -Allocated (was zp ZP_BYTE:23) zp ZP_BYTE:12 [ div8u::quotient#3 div8u::return#1 div8u::quotient#1 div8u::quotient#2 ] -Allocated (was zp ZP_WORD:27) zp ZP_WORD:13 [ test_16u::dividend#0 ] -Allocated (was zp ZP_WORD:29) zp ZP_WORD:15 [ test_16u::divisor#0 div16u::divisor#0 ] -Allocated (was zp ZP_WORD:35) zp ZP_WORD:17 [ test_16u::res#0 ] -Allocated (was zp ZP_BYTE:41) zp ZP_BYTE:19 [ test_8u::dividend#0 ] -Allocated (was zp ZP_BYTE:42) zp ZP_BYTE:20 [ test_8u::divisor#0 div8u::divisor#0 ] +Allocated (was zp ZP_WORD:9) zp ZP_WORD:7 [ char_cursor#45 char_cursor#72 char_cursor#71 char_cursor#84 char_cursor#2 char_cursor#11 char_cursor#75 char_cursor#1 char_cursor#98 ] +Allocated (was zp ZP_WORD:11) zp ZP_WORD:9 [ print_str::str#7 print_str::str#9 print_str::str#0 ] +Allocated (was zp ZP_WORD:13) zp ZP_WORD:11 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ] +Allocated (was zp ZP_WORD:15) zp ZP_WORD:13 [ div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:15 [ div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 div16u::return#0 test_16u::res#0 ] +Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:17 [ test_8u::i#10 test_8u::i#1 ] +Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:18 [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 ] +Allocated (was zp ZP_BYTE:23) zp ZP_BYTE:19 [ div8u::quotient#3 div8u::return#1 div8u::quotient#1 div8u::quotient#2 ] +Allocated (was zp ZP_WORD:25) zp ZP_WORD:20 [ print_cls::sc#2 print_cls::sc#1 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:22 [ test_16u::divisor#0 div16u::divisor#0 ] +Allocated (was zp ZP_BYTE:41) zp ZP_BYTE:24 [ test_8u::dividend#0 ] +Allocated (was zp ZP_BYTE:42) zp ZP_BYTE:25 [ test_8u::divisor#0 div8u::divisor#0 ] +Allocated (was zp ZP_BYTE:45) zp ZP_BYTE:26 [ test_8u::res#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -4411,7 +4411,7 @@ ASSEMBLER BEFORE OPTIMIZATION //SEG1 Global Constants & labels .label char_cursor = 7 .label line_cursor = 3 - .label rem16u = 9 + .label rem16u = $b //SEG2 @begin bbegin: //SEG3 [1] phi from @begin to @13 [phi:@begin->@13] @@ -4460,9 +4460,9 @@ main: { } //SEG22 test_16u test_16u: { - .label dividend = $d - .label divisor = $f - .label res = $11 + .label dividend = 5 + .label divisor = $16 + .label res = $f .label i = 2 //SEG23 [12] phi from test_16u to test_16u::@1 [phi:test_16u->test_16u::@1] b1_from_test_16u: @@ -4500,29 +4500,20 @@ test_16u: { lda dividend+1 sta div16u.dividend+1 //SEG33 [16] (word) div16u::divisor#0 ← (word) test_16u::divisor#0 [ test_16u::i#10 test_16u::dividend#0 test_16u::divisor#0 div16u::dividend#0 div16u::divisor#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 test_16u::dividend#0 test_16u::divisor#0 div16u::dividend#0 div16u::divisor#0 line_cursor#1 ] ) - // (word) div16u::divisor#0 = (word) test_16u::divisor#0 // register copy zp ZP_WORD:15 + // (word) div16u::divisor#0 = (word) test_16u::divisor#0 // register copy zp ZP_WORD:22 //SEG34 [17] call div16u param-assignment [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#1 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#1 line_cursor#1 ] ) //SEG35 [70] phi from test_16u::@1 to div16u [phi:test_16u::@1->div16u] div16u_from_b1: jsr div16u - //SEG36 [18] (word) div16u::return#0 ← (word) div16u::return#1 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ) -- vwuz1=vwuz2 - lda div16u.return_1 - sta div16u.return - lda div16u.return_1+1 - sta div16u.return+1 + //SEG36 [18] (word) div16u::return#0 ← (word) div16u::return#1 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ) + // (word) div16u::return#0 = (word) div16u::return#1 // register copy zp ZP_WORD:15 jmp b3 //SEG37 test_16u::@3 b3: - //SEG38 [19] (word) test_16u::res#0 ← (word) div16u::return#0 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ) -- vwuz1=vwuz2 - lda div16u.return - sta res - lda div16u.return+1 - sta res+1 - //SEG39 [20] (word) print_word::w#0 ← (word) test_16u::dividend#0 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ) -- vwuz1=vwuz2 - lda dividend - sta print_word.w - lda dividend+1 - sta print_word.w+1 + //SEG38 [19] (word) test_16u::res#0 ← (word) div16u::return#0 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ) + // (word) test_16u::res#0 = (word) div16u::return#0 // register copy zp ZP_WORD:15 + //SEG39 [20] (word) print_word::w#0 ← (word) test_16u::dividend#0 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ) + // (word) print_word::w#0 = (word) test_16u::dividend#0 // register copy zp ZP_WORD:5 //SEG40 [21] (byte*~) char_cursor#84 ← (byte*) line_cursor#1 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 char_cursor#84 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 char_cursor#84 line_cursor#1 ] ) -- pbuz1=pbuz2 lda line_cursor sta char_cursor @@ -4770,7 +4761,7 @@ print_char: { } //SEG131 print_str print_str: { - .label str = 5 + .label str = 9 //SEG132 [64] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] b1_from_print_str: b1_from_b2: @@ -4810,12 +4801,11 @@ print_str: { } //SEG143 div16u div16u: { - .label dividend = 5 - .label divisor = $f - .label return = 5 - .label rem = 9 - .label quotient = 7 - .label return_1 = 7 + .label dividend = $d + .label divisor = $16 + .label return = $f + .label rem = $b + .label quotient = $f //SEG144 [71] phi from div16u to div16u::@1 [phi:div16u->div16u::@1] b1_from_div16u: //SEG145 [71] phi (byte) div16u::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:div16u->div16u::@1#0] -- vbuxx=vbuc1 @@ -4919,10 +4909,10 @@ div16u: { //SEG178 test_8u test_8u: { .label rem = $ff - .label dividend = $13 - .label divisor = $14 - .label res = $b - .label i = 2 + .label dividend = $18 + .label divisor = $19 + .label res = $1a + .label i = $11 //SEG179 [88] phi from test_8u to test_8u::@1 [phi:test_8u->test_8u::@1] b1_from_test_8u: //SEG180 [88] phi (byte*) line_cursor#25 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:test_8u->test_8u::@1#0] -- pbuz1=pbuc1 @@ -4953,7 +4943,7 @@ test_8u: { lda dividend sta div8u.dividend //SEG187 [92] (byte) div8u::divisor#0 ← (byte) test_8u::divisor#0 [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::dividend#0 div8u::divisor#0 ] ( main:2::test_8u:7 [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::dividend#0 div8u::divisor#0 ] ) - // (byte) div8u::divisor#0 = (byte) test_8u::divisor#0 // register copy zp ZP_BYTE:20 + // (byte) div8u::divisor#0 = (byte) test_8u::divisor#0 // register copy zp ZP_BYTE:25 //SEG188 [93] call div8u param-assignment [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::return#1 ] ( main:2::test_8u:7 [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::return#1 ] ) //SEG189 [116] phi from test_8u::@1 to div8u [phi:test_8u::@1->div8u] div8u_from_b1: @@ -5093,10 +5083,10 @@ test_8u: { } //SEG247 div8u div8u: { - .label dividend = $b - .label divisor = $14 - .label quotient = $c - .label return = $c + .label dividend = $12 + .label divisor = $19 + .label quotient = $13 + .label return = $13 //SEG248 [117] phi from div8u to div8u::@1 [phi:div8u->div8u::@1] b1_from_div8u: //SEG249 [117] phi (byte) div8u::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:div8u->div8u::@1#0] -- vbuxx=vbuc1 @@ -5182,7 +5172,7 @@ div8u: { } //SEG283 print_cls print_cls: { - .label sc = 3 + .label sc = $14 //SEG284 [134] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] b1_from_print_cls: //SEG285 [134] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 @@ -5432,28 +5422,28 @@ FINAL SYMBOL TABLE (label) div16u::@5 (label) div16u::@return (word) div16u::dividend -(word) div16u::dividend#0 dividend zp ZP_WORD:5 4.333333333333333 -(word) div16u::dividend#1 dividend zp ZP_WORD:5 25.25 -(word) div16u::dividend#2 dividend zp ZP_WORD:5 43.57142857142858 +(word) div16u::dividend#0 dividend zp ZP_WORD:13 4.333333333333333 +(word) div16u::dividend#1 dividend zp ZP_WORD:13 25.25 +(word) div16u::dividend#2 dividend zp ZP_WORD:13 43.57142857142858 (word) div16u::divisor -(word) div16u::divisor#0 divisor zp ZP_WORD:15 12.529411764705884 +(word) div16u::divisor#0 divisor zp ZP_WORD:22 12.529411764705884 (byte) div16u::i (byte) div16u::i#1 reg byte x 151.5 (byte) div16u::i#2 reg byte x 15.538461538461538 (word) div16u::quotient -(word) div16u::quotient#1 quotient zp ZP_WORD:7 151.5 -(word) div16u::quotient#2 quotient zp ZP_WORD:7 101.0 -(word) div16u::quotient#3 quotient zp ZP_WORD:7 25.25 +(word) div16u::quotient#1 quotient zp ZP_WORD:15 151.5 +(word) div16u::quotient#2 quotient zp ZP_WORD:15 101.0 +(word) div16u::quotient#3 quotient zp ZP_WORD:15 25.25 (word) div16u::rem -(word) div16u::rem#1 rem zp ZP_WORD:9 75.75 -(word) div16u::rem#2 rem zp ZP_WORD:9 202.0 -(word) div16u::rem#3 rem zp ZP_WORD:9 202.0 -(word) div16u::rem#4 rem zp ZP_WORD:9 202.0 -(word) div16u::rem#5 rem zp ZP_WORD:9 101.0 -(word) div16u::rem#8 rem zp ZP_WORD:9 12.5 +(word) div16u::rem#1 rem zp ZP_WORD:11 75.75 +(word) div16u::rem#2 rem zp ZP_WORD:11 202.0 +(word) div16u::rem#3 rem zp ZP_WORD:11 202.0 +(word) div16u::rem#4 rem zp ZP_WORD:11 202.0 +(word) div16u::rem#5 rem zp ZP_WORD:11 101.0 +(word) div16u::rem#8 rem zp ZP_WORD:11 12.5 (word) div16u::return -(word) div16u::return#0 return zp ZP_WORD:5 22.0 -(word) div16u::return#1 return#1 zp ZP_WORD:7 62.8 +(word) div16u::return#0 return zp ZP_WORD:15 22.0 +(word) div16u::return#1 return zp ZP_WORD:15 62.8 (byte()) div8u((byte) div8u::dividend , (byte) div8u::divisor , (byte*) div8u::remainder) (byte~) div8u::$1 reg byte a 202.0 (label) div8u::@1 @@ -5464,18 +5454,18 @@ FINAL SYMBOL TABLE (label) div8u::@6 (label) div8u::@return (byte) div8u::dividend -(byte) div8u::dividend#0 dividend zp ZP_BYTE:11 4.333333333333333 -(byte) div8u::dividend#1 dividend zp ZP_BYTE:11 25.25 -(byte) div8u::dividend#2 dividend zp ZP_BYTE:11 50.83333333333333 +(byte) div8u::dividend#0 dividend zp ZP_BYTE:18 4.333333333333333 +(byte) div8u::dividend#1 dividend zp ZP_BYTE:18 25.25 +(byte) div8u::dividend#2 dividend zp ZP_BYTE:18 50.83333333333333 (byte) div8u::divisor -(byte) div8u::divisor#0 divisor zp ZP_BYTE:20 13.3125 +(byte) div8u::divisor#0 divisor zp ZP_BYTE:25 13.3125 (byte) div8u::i (byte) div8u::i#1 reg byte x 151.5 (byte) div8u::i#2 reg byte x 16.833333333333332 (byte) div8u::quotient -(byte) div8u::quotient#1 quotient zp ZP_BYTE:12 151.5 -(byte) div8u::quotient#2 quotient zp ZP_BYTE:12 101.0 -(byte) div8u::quotient#3 quotient zp ZP_BYTE:12 28.857142857142858 +(byte) div8u::quotient#1 quotient zp ZP_BYTE:19 151.5 +(byte) div8u::quotient#2 quotient zp ZP_BYTE:19 101.0 +(byte) div8u::quotient#3 quotient zp ZP_BYTE:19 28.857142857142858 (byte) div8u::rem (byte) div8u::rem#1 reg byte y 101.0 (byte) div8u::rem#2 reg byte y 202.0 @@ -5486,7 +5476,7 @@ FINAL SYMBOL TABLE (byte*) div8u::remainder (byte) div8u::return (byte) div8u::return#0 reg byte a 22.0 -(byte) div8u::return#1 return zp ZP_BYTE:12 52.33333333333333 +(byte) div8u::return#1 return zp ZP_BYTE:19 52.33333333333333 (byte*) line_cursor (byte*) line_cursor#1 line_cursor zp ZP_WORD:3 9.131578947368421 (byte*) line_cursor#11 line_cursor zp ZP_WORD:3 204.0 @@ -5521,8 +5511,8 @@ FINAL SYMBOL TABLE (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:3 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:3 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:20 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:20 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -5531,9 +5521,9 @@ FINAL SYMBOL TABLE (label) print_str::@2 (label) print_str::@return (byte*) print_str::str -(byte*) print_str::str#0 str zp ZP_WORD:5 202.0 -(byte*) print_str::str#7 str zp ZP_WORD:5 101.5 -(byte*) print_str::str#9 str zp ZP_WORD:5 2.0 +(byte*) print_str::str#0 str zp ZP_WORD:9 202.0 +(byte*) print_str::str#7 str zp ZP_WORD:9 101.5 +(byte*) print_str::str#9 str zp ZP_WORD:9 2.0 (void()) print_word((word) print_word::w) (label) print_word::@1 (label) print_word::@return @@ -5544,7 +5534,7 @@ FINAL SYMBOL TABLE (word) print_word::w#3 w zp ZP_WORD:5 22.0 (word) print_word::w#4 w zp ZP_WORD:5 15.999999999999998 (word) rem16u -(word) rem16u#16 rem16u zp ZP_WORD:9 110.0 +(word) rem16u#16 rem16u zp ZP_WORD:11 110.0 (void()) test_16u() (label) test_16u::@1 (label) test_16u::@10 @@ -5558,18 +5548,18 @@ FINAL SYMBOL TABLE (label) test_16u::@9 (label) test_16u::@return (word) test_16u::dividend -(word) test_16u::dividend#0 dividend zp ZP_WORD:13 4.714285714285714 +(word) test_16u::dividend#0 dividend zp ZP_WORD:5 4.714285714285714 (word[]) test_16u::dividends (const word[]) test_16u::dividends#0 dividends = { (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535 } (word) test_16u::divisor -(word) test_16u::divisor#0 divisor zp ZP_WORD:15 3.0 +(word) test_16u::divisor#0 divisor zp ZP_WORD:22 3.0 (word[]) test_16u::divisors (const word[]) test_16u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 } (byte) test_16u::i (byte) test_16u::i#1 i zp ZP_BYTE:2 16.5 (byte) test_16u::i#10 i zp ZP_BYTE:2 1.76 (word) test_16u::res -(word) test_16u::res#0 res zp ZP_WORD:17 2.2 +(word) test_16u::res#0 res zp ZP_WORD:15 2.2 (const string) test_16u::str str = (string) " / @" (const string) test_16u::str1 str1 = (string) " = @" (const string) test_16u::str2 str2 = (string) " @" @@ -5587,51 +5577,55 @@ FINAL SYMBOL TABLE (label) test_8u::@9 (label) test_8u::@return (byte) test_8u::dividend -(byte) test_8u::dividend#0 dividend zp ZP_BYTE:19 4.714285714285714 +(byte) test_8u::dividend#0 dividend zp ZP_BYTE:24 4.714285714285714 (byte[]) test_8u::dividends (const byte[]) test_8u::dividends#0 dividends = { (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255 } (byte) test_8u::divisor -(byte) test_8u::divisor#0 divisor zp ZP_BYTE:20 3.3000000000000003 +(byte) test_8u::divisor#0 divisor zp ZP_BYTE:25 3.3000000000000003 (byte[]) test_8u::divisors (const byte[]) test_8u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 } (byte) test_8u::i -(byte) test_8u::i#1 i zp ZP_BYTE:2 11.0 -(byte) test_8u::i#10 i zp ZP_BYTE:2 1.8333333333333333 +(byte) test_8u::i#1 i zp ZP_BYTE:17 11.0 +(byte) test_8u::i#10 i zp ZP_BYTE:17 1.8333333333333333 (byte*) test_8u::rem (const byte*) test_8u::rem#0 rem = ((byte*))(byte/word/signed word/dword/signed dword) 255 (byte) test_8u::res -(byte) test_8u::res#0 res zp ZP_BYTE:11 2.4444444444444446 +(byte) test_8u::res#0 res zp ZP_BYTE:26 2.4444444444444446 (const string) test_8u::str str = (string) " / @" (const string) test_8u::str1 str1 = (string) " = @" (const string) test_8u::str2 str2 = (string) " @" -zp ZP_BYTE:2 [ test_16u::i#10 test_16u::i#1 test_8u::i#10 test_8u::i#1 ] -zp ZP_WORD:3 [ line_cursor#11 line_cursor#22 line_cursor#1 line_cursor#25 print_cls::sc#2 print_cls::sc#1 ] -zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 print_str::str#7 print_str::str#9 print_str::str#0 div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 div16u::return#0 ] +zp ZP_BYTE:2 [ test_16u::i#10 test_16u::i#1 ] +zp ZP_WORD:3 [ line_cursor#11 line_cursor#22 line_cursor#1 line_cursor#25 ] +zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 test_16u::dividend#0 ] reg byte x [ print_byte::b#6 print_byte::b#0 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -zp ZP_WORD:7 [ char_cursor#45 char_cursor#72 char_cursor#71 char_cursor#84 char_cursor#2 char_cursor#11 char_cursor#75 char_cursor#1 char_cursor#98 div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 ] -zp ZP_WORD:9 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ] +zp ZP_WORD:7 [ char_cursor#45 char_cursor#72 char_cursor#71 char_cursor#84 char_cursor#2 char_cursor#11 char_cursor#75 char_cursor#1 char_cursor#98 ] +zp ZP_WORD:9 [ print_str::str#7 print_str::str#9 print_str::str#0 ] +zp ZP_WORD:11 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ] +zp ZP_WORD:13 [ div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 ] +zp ZP_WORD:15 [ div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 div16u::return#0 test_16u::res#0 ] reg byte x [ div16u::i#2 div16u::i#1 ] +zp ZP_BYTE:17 [ test_8u::i#10 test_8u::i#1 ] reg byte y [ div8u::rem#4 div8u::rem#8 div8u::rem#5 div8u::rem#1 div8u::rem#2 div8u::rem#3 ] -zp ZP_BYTE:11 [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 test_8u::res#0 ] -zp ZP_BYTE:12 [ div8u::quotient#3 div8u::return#1 div8u::quotient#1 div8u::quotient#2 ] +zp ZP_BYTE:18 [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 ] +zp ZP_BYTE:19 [ div8u::quotient#3 div8u::return#1 div8u::quotient#1 div8u::quotient#2 ] reg byte x [ div8u::i#2 div8u::i#1 ] -zp ZP_WORD:13 [ test_16u::dividend#0 ] -zp ZP_WORD:15 [ test_16u::divisor#0 div16u::divisor#0 ] -zp ZP_WORD:17 [ test_16u::res#0 ] +zp ZP_WORD:20 [ print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:22 [ test_16u::divisor#0 div16u::divisor#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] reg byte a [ div16u::$1 ] reg byte a [ div16u::$2 ] -zp ZP_BYTE:19 [ test_8u::dividend#0 ] -zp ZP_BYTE:20 [ test_8u::divisor#0 div8u::divisor#0 ] +zp ZP_BYTE:24 [ test_8u::dividend#0 ] +zp ZP_BYTE:25 [ test_8u::divisor#0 div8u::divisor#0 ] reg byte a [ div8u::return#0 ] +zp ZP_BYTE:26 [ test_8u::res#0 ] reg byte a [ div8u::$1 ] FINAL ASSEMBLER -Score: 31267 +Score: 30907 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -5640,7 +5634,7 @@ Score: 31267 //SEG1 Global Constants & labels .label char_cursor = 7 .label line_cursor = 3 - .label rem16u = 9 + .label rem16u = $b //SEG2 @begin //SEG3 [1] phi from @begin to @13 [phi:@begin->@13] //SEG4 @13 @@ -5670,9 +5664,9 @@ main: { } //SEG22 test_16u test_16u: { - .label dividend = $d - .label divisor = $f - .label res = $11 + .label dividend = 5 + .label divisor = $16 + .label res = $f .label i = 2 //SEG23 [12] phi from test_16u to test_16u::@1 [phi:test_16u->test_16u::@1] //SEG24 [12] phi (word) rem16u#16 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:test_16u->test_16u::@1#0] -- vwuz1=vbuc1 @@ -5703,26 +5697,17 @@ test_16u: { lda dividend+1 sta div16u.dividend+1 //SEG33 [16] (word) div16u::divisor#0 ← (word) test_16u::divisor#0 [ test_16u::i#10 test_16u::dividend#0 test_16u::divisor#0 div16u::dividend#0 div16u::divisor#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 test_16u::dividend#0 test_16u::divisor#0 div16u::dividend#0 div16u::divisor#0 line_cursor#1 ] ) - // (word) div16u::divisor#0 = (word) test_16u::divisor#0 // register copy zp ZP_WORD:15 + // (word) div16u::divisor#0 = (word) test_16u::divisor#0 // register copy zp ZP_WORD:22 //SEG34 [17] call div16u param-assignment [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#1 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#1 line_cursor#1 ] ) //SEG35 [70] phi from test_16u::@1 to div16u [phi:test_16u::@1->div16u] jsr div16u - //SEG36 [18] (word) div16u::return#0 ← (word) div16u::return#1 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ) -- vwuz1=vwuz2 - lda div16u.return_1 - sta div16u.return - lda div16u.return_1+1 - sta div16u.return+1 + //SEG36 [18] (word) div16u::return#0 ← (word) div16u::return#1 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 div16u::return#0 line_cursor#1 ] ) + // (word) div16u::return#0 = (word) div16u::return#1 // register copy zp ZP_WORD:15 //SEG37 test_16u::@3 - //SEG38 [19] (word) test_16u::res#0 ← (word) div16u::return#0 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ) -- vwuz1=vwuz2 - lda div16u.return - sta res - lda div16u.return+1 - sta res+1 - //SEG39 [20] (word) print_word::w#0 ← (word) test_16u::dividend#0 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ) -- vwuz1=vwuz2 - lda dividend - sta print_word.w - lda dividend+1 - sta print_word.w+1 + //SEG38 [19] (word) test_16u::res#0 ← (word) div16u::return#0 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::dividend#0 test_16u::divisor#0 test_16u::res#0 line_cursor#1 ] ) + // (word) test_16u::res#0 = (word) div16u::return#0 // register copy zp ZP_WORD:15 + //SEG39 [20] (word) print_word::w#0 ← (word) test_16u::dividend#0 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 line_cursor#1 ] ) + // (word) print_word::w#0 = (word) test_16u::dividend#0 // register copy zp ZP_WORD:5 //SEG40 [21] (byte*~) char_cursor#84 ← (byte*) line_cursor#1 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 char_cursor#84 line_cursor#1 ] ( main:2::test_16u:9 [ test_16u::i#10 div16u::rem#8 test_16u::divisor#0 test_16u::res#0 print_word::w#0 char_cursor#84 line_cursor#1 ] ) -- pbuz1=pbuz2 lda line_cursor sta char_cursor @@ -5920,7 +5905,7 @@ print_char: { } //SEG131 print_str print_str: { - .label str = 5 + .label str = 9 //SEG132 [64] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] //SEG133 [64] phi (byte*) char_cursor#2 = (byte*) char_cursor#11 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy //SEG134 [64] phi (byte*) print_str::str#7 = (byte*) print_str::str#9 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy @@ -5954,12 +5939,11 @@ print_str: { } //SEG143 div16u div16u: { - .label dividend = 5 - .label divisor = $f - .label return = 5 - .label rem = 9 - .label quotient = 7 - .label return_1 = 7 + .label dividend = $d + .label divisor = $16 + .label return = $f + .label rem = $b + .label quotient = $f //SEG144 [71] phi from div16u to div16u::@1 [phi:div16u->div16u::@1] //SEG145 [71] phi (byte) div16u::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:div16u->div16u::@1#0] -- vbuxx=vbuc1 ldx #0 @@ -6044,10 +6028,10 @@ div16u: { //SEG178 test_8u test_8u: { .label rem = $ff - .label dividend = $13 - .label divisor = $14 - .label res = $b - .label i = 2 + .label dividend = $18 + .label divisor = $19 + .label res = $1a + .label i = $11 //SEG179 [88] phi from test_8u to test_8u::@1 [phi:test_8u->test_8u::@1] //SEG180 [88] phi (byte*) line_cursor#25 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:test_8u->test_8u::@1#0] -- pbuz1=pbuc1 lda #<$400 @@ -6075,7 +6059,7 @@ test_8u: { lda dividend sta div8u.dividend //SEG187 [92] (byte) div8u::divisor#0 ← (byte) test_8u::divisor#0 [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::dividend#0 div8u::divisor#0 ] ( main:2::test_8u:7 [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::dividend#0 div8u::divisor#0 ] ) - // (byte) div8u::divisor#0 = (byte) test_8u::divisor#0 // register copy zp ZP_BYTE:20 + // (byte) div8u::divisor#0 = (byte) test_8u::divisor#0 // register copy zp ZP_BYTE:25 //SEG188 [93] call div8u param-assignment [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::return#1 ] ( main:2::test_8u:7 [ line_cursor#25 char_cursor#75 test_8u::i#10 test_8u::dividend#0 test_8u::divisor#0 div8u::return#1 ] ) //SEG189 [116] phi from test_8u::@1 to div8u [phi:test_8u::@1->div8u] jsr div8u @@ -6181,10 +6165,10 @@ test_8u: { } //SEG247 div8u div8u: { - .label dividend = $b - .label divisor = $14 - .label quotient = $c - .label return = $c + .label dividend = $12 + .label divisor = $19 + .label quotient = $13 + .label return = $13 //SEG248 [117] phi from div8u to div8u::@1 [phi:div8u->div8u::@1] //SEG249 [117] phi (byte) div8u::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:div8u->div8u::@1#0] -- vbuxx=vbuc1 ldx #0 @@ -6252,7 +6236,7 @@ div8u: { } //SEG283 print_cls print_cls: { - .label sc = 3 + .label sc = $14 //SEG284 [134] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] //SEG285 [134] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 lda #<$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/division.sym b/src/test/java/dk/camelot64/kickc/test/ref/division.sym index 4356d45b7..1c3d5f48e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/division.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/division.sym @@ -21,28 +21,28 @@ (label) div16u::@5 (label) div16u::@return (word) div16u::dividend -(word) div16u::dividend#0 dividend zp ZP_WORD:5 4.333333333333333 -(word) div16u::dividend#1 dividend zp ZP_WORD:5 25.25 -(word) div16u::dividend#2 dividend zp ZP_WORD:5 43.57142857142858 +(word) div16u::dividend#0 dividend zp ZP_WORD:13 4.333333333333333 +(word) div16u::dividend#1 dividend zp ZP_WORD:13 25.25 +(word) div16u::dividend#2 dividend zp ZP_WORD:13 43.57142857142858 (word) div16u::divisor -(word) div16u::divisor#0 divisor zp ZP_WORD:15 12.529411764705884 +(word) div16u::divisor#0 divisor zp ZP_WORD:22 12.529411764705884 (byte) div16u::i (byte) div16u::i#1 reg byte x 151.5 (byte) div16u::i#2 reg byte x 15.538461538461538 (word) div16u::quotient -(word) div16u::quotient#1 quotient zp ZP_WORD:7 151.5 -(word) div16u::quotient#2 quotient zp ZP_WORD:7 101.0 -(word) div16u::quotient#3 quotient zp ZP_WORD:7 25.25 +(word) div16u::quotient#1 quotient zp ZP_WORD:15 151.5 +(word) div16u::quotient#2 quotient zp ZP_WORD:15 101.0 +(word) div16u::quotient#3 quotient zp ZP_WORD:15 25.25 (word) div16u::rem -(word) div16u::rem#1 rem zp ZP_WORD:9 75.75 -(word) div16u::rem#2 rem zp ZP_WORD:9 202.0 -(word) div16u::rem#3 rem zp ZP_WORD:9 202.0 -(word) div16u::rem#4 rem zp ZP_WORD:9 202.0 -(word) div16u::rem#5 rem zp ZP_WORD:9 101.0 -(word) div16u::rem#8 rem zp ZP_WORD:9 12.5 +(word) div16u::rem#1 rem zp ZP_WORD:11 75.75 +(word) div16u::rem#2 rem zp ZP_WORD:11 202.0 +(word) div16u::rem#3 rem zp ZP_WORD:11 202.0 +(word) div16u::rem#4 rem zp ZP_WORD:11 202.0 +(word) div16u::rem#5 rem zp ZP_WORD:11 101.0 +(word) div16u::rem#8 rem zp ZP_WORD:11 12.5 (word) div16u::return -(word) div16u::return#0 return zp ZP_WORD:5 22.0 -(word) div16u::return#1 return#1 zp ZP_WORD:7 62.8 +(word) div16u::return#0 return zp ZP_WORD:15 22.0 +(word) div16u::return#1 return zp ZP_WORD:15 62.8 (byte()) div8u((byte) div8u::dividend , (byte) div8u::divisor , (byte*) div8u::remainder) (byte~) div8u::$1 reg byte a 202.0 (label) div8u::@1 @@ -53,18 +53,18 @@ (label) div8u::@6 (label) div8u::@return (byte) div8u::dividend -(byte) div8u::dividend#0 dividend zp ZP_BYTE:11 4.333333333333333 -(byte) div8u::dividend#1 dividend zp ZP_BYTE:11 25.25 -(byte) div8u::dividend#2 dividend zp ZP_BYTE:11 50.83333333333333 +(byte) div8u::dividend#0 dividend zp ZP_BYTE:18 4.333333333333333 +(byte) div8u::dividend#1 dividend zp ZP_BYTE:18 25.25 +(byte) div8u::dividend#2 dividend zp ZP_BYTE:18 50.83333333333333 (byte) div8u::divisor -(byte) div8u::divisor#0 divisor zp ZP_BYTE:20 13.3125 +(byte) div8u::divisor#0 divisor zp ZP_BYTE:25 13.3125 (byte) div8u::i (byte) div8u::i#1 reg byte x 151.5 (byte) div8u::i#2 reg byte x 16.833333333333332 (byte) div8u::quotient -(byte) div8u::quotient#1 quotient zp ZP_BYTE:12 151.5 -(byte) div8u::quotient#2 quotient zp ZP_BYTE:12 101.0 -(byte) div8u::quotient#3 quotient zp ZP_BYTE:12 28.857142857142858 +(byte) div8u::quotient#1 quotient zp ZP_BYTE:19 151.5 +(byte) div8u::quotient#2 quotient zp ZP_BYTE:19 101.0 +(byte) div8u::quotient#3 quotient zp ZP_BYTE:19 28.857142857142858 (byte) div8u::rem (byte) div8u::rem#1 reg byte y 101.0 (byte) div8u::rem#2 reg byte y 202.0 @@ -75,7 +75,7 @@ (byte*) div8u::remainder (byte) div8u::return (byte) div8u::return#0 reg byte a 22.0 -(byte) div8u::return#1 return zp ZP_BYTE:12 52.33333333333333 +(byte) div8u::return#1 return zp ZP_BYTE:19 52.33333333333333 (byte*) line_cursor (byte*) line_cursor#1 line_cursor zp ZP_WORD:3 9.131578947368421 (byte*) line_cursor#11 line_cursor zp ZP_WORD:3 204.0 @@ -110,8 +110,8 @@ (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:3 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:3 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:20 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:20 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -120,9 +120,9 @@ (label) print_str::@2 (label) print_str::@return (byte*) print_str::str -(byte*) print_str::str#0 str zp ZP_WORD:5 202.0 -(byte*) print_str::str#7 str zp ZP_WORD:5 101.5 -(byte*) print_str::str#9 str zp ZP_WORD:5 2.0 +(byte*) print_str::str#0 str zp ZP_WORD:9 202.0 +(byte*) print_str::str#7 str zp ZP_WORD:9 101.5 +(byte*) print_str::str#9 str zp ZP_WORD:9 2.0 (void()) print_word((word) print_word::w) (label) print_word::@1 (label) print_word::@return @@ -133,7 +133,7 @@ (word) print_word::w#3 w zp ZP_WORD:5 22.0 (word) print_word::w#4 w zp ZP_WORD:5 15.999999999999998 (word) rem16u -(word) rem16u#16 rem16u zp ZP_WORD:9 110.0 +(word) rem16u#16 rem16u zp ZP_WORD:11 110.0 (void()) test_16u() (label) test_16u::@1 (label) test_16u::@10 @@ -147,18 +147,18 @@ (label) test_16u::@9 (label) test_16u::@return (word) test_16u::dividend -(word) test_16u::dividend#0 dividend zp ZP_WORD:13 4.714285714285714 +(word) test_16u::dividend#0 dividend zp ZP_WORD:5 4.714285714285714 (word[]) test_16u::dividends (const word[]) test_16u::dividends#0 dividends = { (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535 } (word) test_16u::divisor -(word) test_16u::divisor#0 divisor zp ZP_WORD:15 3.0 +(word) test_16u::divisor#0 divisor zp ZP_WORD:22 3.0 (word[]) test_16u::divisors (const word[]) test_16u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 } (byte) test_16u::i (byte) test_16u::i#1 i zp ZP_BYTE:2 16.5 (byte) test_16u::i#10 i zp ZP_BYTE:2 1.76 (word) test_16u::res -(word) test_16u::res#0 res zp ZP_WORD:17 2.2 +(word) test_16u::res#0 res zp ZP_WORD:15 2.2 (const string) test_16u::str str = (string) " / @" (const string) test_16u::str1 str1 = (string) " = @" (const string) test_16u::str2 str2 = (string) " @" @@ -176,44 +176,48 @@ (label) test_8u::@9 (label) test_8u::@return (byte) test_8u::dividend -(byte) test_8u::dividend#0 dividend zp ZP_BYTE:19 4.714285714285714 +(byte) test_8u::dividend#0 dividend zp ZP_BYTE:24 4.714285714285714 (byte[]) test_8u::dividends (const byte[]) test_8u::dividends#0 dividends = { (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255 } (byte) test_8u::divisor -(byte) test_8u::divisor#0 divisor zp ZP_BYTE:20 3.3000000000000003 +(byte) test_8u::divisor#0 divisor zp ZP_BYTE:25 3.3000000000000003 (byte[]) test_8u::divisors (const byte[]) test_8u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 } (byte) test_8u::i -(byte) test_8u::i#1 i zp ZP_BYTE:2 11.0 -(byte) test_8u::i#10 i zp ZP_BYTE:2 1.8333333333333333 +(byte) test_8u::i#1 i zp ZP_BYTE:17 11.0 +(byte) test_8u::i#10 i zp ZP_BYTE:17 1.8333333333333333 (byte*) test_8u::rem (const byte*) test_8u::rem#0 rem = ((byte*))(byte/word/signed word/dword/signed dword) 255 (byte) test_8u::res -(byte) test_8u::res#0 res zp ZP_BYTE:11 2.4444444444444446 +(byte) test_8u::res#0 res zp ZP_BYTE:26 2.4444444444444446 (const string) test_8u::str str = (string) " / @" (const string) test_8u::str1 str1 = (string) " = @" (const string) test_8u::str2 str2 = (string) " @" -zp ZP_BYTE:2 [ test_16u::i#10 test_16u::i#1 test_8u::i#10 test_8u::i#1 ] -zp ZP_WORD:3 [ line_cursor#11 line_cursor#22 line_cursor#1 line_cursor#25 print_cls::sc#2 print_cls::sc#1 ] -zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 print_str::str#7 print_str::str#9 print_str::str#0 div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 div16u::return#0 ] +zp ZP_BYTE:2 [ test_16u::i#10 test_16u::i#1 ] +zp ZP_WORD:3 [ line_cursor#11 line_cursor#22 line_cursor#1 line_cursor#25 ] +zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 test_16u::dividend#0 ] reg byte x [ print_byte::b#6 print_byte::b#0 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -zp ZP_WORD:7 [ char_cursor#45 char_cursor#72 char_cursor#71 char_cursor#84 char_cursor#2 char_cursor#11 char_cursor#75 char_cursor#1 char_cursor#98 div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 ] -zp ZP_WORD:9 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ] +zp ZP_WORD:7 [ char_cursor#45 char_cursor#72 char_cursor#71 char_cursor#84 char_cursor#2 char_cursor#11 char_cursor#75 char_cursor#1 char_cursor#98 ] +zp ZP_WORD:9 [ print_str::str#7 print_str::str#9 print_str::str#0 ] +zp ZP_WORD:11 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ] +zp ZP_WORD:13 [ div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 ] +zp ZP_WORD:15 [ div16u::quotient#3 div16u::return#1 div16u::quotient#1 div16u::quotient#2 div16u::return#0 test_16u::res#0 ] reg byte x [ div16u::i#2 div16u::i#1 ] +zp ZP_BYTE:17 [ test_8u::i#10 test_8u::i#1 ] reg byte y [ div8u::rem#4 div8u::rem#8 div8u::rem#5 div8u::rem#1 div8u::rem#2 div8u::rem#3 ] -zp ZP_BYTE:11 [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 test_8u::res#0 ] -zp ZP_BYTE:12 [ div8u::quotient#3 div8u::return#1 div8u::quotient#1 div8u::quotient#2 ] +zp ZP_BYTE:18 [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 ] +zp ZP_BYTE:19 [ div8u::quotient#3 div8u::return#1 div8u::quotient#1 div8u::quotient#2 ] reg byte x [ div8u::i#2 div8u::i#1 ] -zp ZP_WORD:13 [ test_16u::dividend#0 ] -zp ZP_WORD:15 [ test_16u::divisor#0 div16u::divisor#0 ] -zp ZP_WORD:17 [ test_16u::res#0 ] +zp ZP_WORD:20 [ print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:22 [ test_16u::divisor#0 div16u::divisor#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] reg byte a [ div16u::$1 ] reg byte a [ div16u::$2 ] -zp ZP_BYTE:19 [ test_8u::dividend#0 ] -zp ZP_BYTE:20 [ test_8u::divisor#0 div8u::divisor#0 ] +zp ZP_BYTE:24 [ test_8u::dividend#0 ] +zp ZP_BYTE:25 [ test_8u::divisor#0 div8u::divisor#0 ] reg byte a [ div8u::return#0 ] +zp ZP_BYTE:26 [ test_8u::res#0 ] reg byte a [ div8u::$1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm index 2056b7924..b3903697c 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.asm @@ -55,8 +55,8 @@ plot: { rts } flip: { - .label c = 5 - .label r = 4 + .label c = 6 + .label r = 5 lda #$10 sta r ldx #$f diff --git a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log index 5b8c43e17..0875f9869 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log @@ -1523,10 +1523,10 @@ Attempting to uplift remaining variables inzp ZP_BYTE:5 [ plot::y#4 plot::y#1 ] Uplifting [plot] best 119922 combination zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:8 [ flip::r#4 flip::r#1 ] Uplifting [flip] best 119922 combination zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ] -Coalescing zero page register [ zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ] ] with [ zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ] ] Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ plot::line#4 plot::line#1 ] -Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ plot::y#4 plot::y#1 flip::r#4 flip::r#1 ] -Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:5 [ flip::c#2 flip::c#1 ] +Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ plot::y#4 plot::y#1 ] +Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:5 [ flip::r#4 flip::r#1 ] +Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:6 [ flip::c#2 flip::c#1 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -1693,8 +1693,8 @@ plot: { } //SEG63 flip flip: { - .label c = 5 - .label r = 4 + .label c = 6 + .label r = 5 //SEG64 [29] phi from flip to flip::@1 [phi:flip->flip::@1] b1_from_flip: //SEG65 [29] phi (byte) flip::r#4 = (byte/signed byte/word/signed word/dword/signed dword) 16 [phi:flip->flip::@1#0] -- vbuz1=vbuc1 @@ -1914,8 +1914,8 @@ FINAL SYMBOL TABLE (label) flip::@4 (label) flip::@return (byte) flip::c -(byte) flip::c#1 c zp ZP_BYTE:5 1501.5 -(byte) flip::c#2 c zp ZP_BYTE:5 500.5 +(byte) flip::c#1 c zp ZP_BYTE:6 1501.5 +(byte) flip::c#2 c zp ZP_BYTE:6 500.5 (byte) flip::dstIdx (byte) flip::dstIdx#1 reg byte x 701.0 (byte) flip::dstIdx#2 reg byte x 67.33333333333333 @@ -1925,8 +1925,8 @@ FINAL SYMBOL TABLE (byte) flip::i#1 reg byte x 151.5 (byte) flip::i#2 reg byte x 202.0 (byte) flip::r -(byte) flip::r#1 r zp ZP_BYTE:4 151.5 -(byte) flip::r#4 r zp ZP_BYTE:4 25.25 +(byte) flip::r#1 r zp ZP_BYTE:5 151.5 +(byte) flip::r#4 r zp ZP_BYTE:5 25.25 (byte) flip::srcIdx (byte) flip::srcIdx#1 reg byte y 300.42857142857144 (byte) flip::srcIdx#2 reg byte y 1552.0 @@ -1969,12 +1969,13 @@ FINAL SYMBOL TABLE reg byte x [ main::c#4 main::c#1 ] zp ZP_WORD:2 [ plot::line#4 plot::line#1 ] -zp ZP_BYTE:4 [ plot::y#4 plot::y#1 flip::r#4 flip::r#1 ] +zp ZP_BYTE:4 [ plot::y#4 plot::y#1 ] reg byte x [ plot::i#2 plot::i#3 plot::i#1 ] reg byte y [ plot::x#2 plot::x#1 ] +zp ZP_BYTE:5 [ flip::r#4 flip::r#1 ] reg byte y [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] reg byte x [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] -zp ZP_BYTE:5 [ flip::c#2 flip::c#1 ] +zp ZP_BYTE:6 [ flip::c#2 flip::c#1 ] reg byte x [ flip::i#2 flip::i#1 ] reg byte x [ prepare::i#2 prepare::i#1 ] @@ -2103,8 +2104,8 @@ plot: { } //SEG63 flip flip: { - .label c = 5 - .label r = 4 + .label c = 6 + .label r = 5 //SEG64 [29] phi from flip to flip::@1 [phi:flip->flip::@1] //SEG65 [29] phi (byte) flip::r#4 = (byte/signed byte/word/signed word/dword/signed dword) 16 [phi:flip->flip::@1#0] -- vbuz1=vbuc1 lda #$10 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.sym b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.sym index d0cc717dc..7bc5bdec1 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.sym @@ -16,8 +16,8 @@ (label) flip::@4 (label) flip::@return (byte) flip::c -(byte) flip::c#1 c zp ZP_BYTE:5 1501.5 -(byte) flip::c#2 c zp ZP_BYTE:5 500.5 +(byte) flip::c#1 c zp ZP_BYTE:6 1501.5 +(byte) flip::c#2 c zp ZP_BYTE:6 500.5 (byte) flip::dstIdx (byte) flip::dstIdx#1 reg byte x 701.0 (byte) flip::dstIdx#2 reg byte x 67.33333333333333 @@ -27,8 +27,8 @@ (byte) flip::i#1 reg byte x 151.5 (byte) flip::i#2 reg byte x 202.0 (byte) flip::r -(byte) flip::r#1 r zp ZP_BYTE:4 151.5 -(byte) flip::r#4 r zp ZP_BYTE:4 25.25 +(byte) flip::r#1 r zp ZP_BYTE:5 151.5 +(byte) flip::r#4 r zp ZP_BYTE:5 25.25 (byte) flip::srcIdx (byte) flip::srcIdx#1 reg byte y 300.42857142857144 (byte) flip::srcIdx#2 reg byte y 1552.0 @@ -71,11 +71,12 @@ reg byte x [ main::c#4 main::c#1 ] zp ZP_WORD:2 [ plot::line#4 plot::line#1 ] -zp ZP_BYTE:4 [ plot::y#4 plot::y#1 flip::r#4 flip::r#1 ] +zp ZP_BYTE:4 [ plot::y#4 plot::y#1 ] reg byte x [ plot::i#2 plot::i#3 plot::i#1 ] reg byte y [ plot::x#2 plot::x#1 ] +zp ZP_BYTE:5 [ flip::r#4 flip::r#1 ] reg byte y [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] reg byte x [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] -zp ZP_BYTE:5 [ flip::c#2 flip::c#1 ] +zp ZP_BYTE:6 [ flip::c#2 flip::c#1 ] reg byte x [ flip::i#2 flip::i#1 ] reg byte x [ prepare::i#2 prepare::i#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.asm b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.asm index 668d433a1..8a0358c44 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.asm @@ -9,9 +9,9 @@ jsr main main: { .label _1 = 8 - .label _11 = 8 - .label _21 = 8 - .label _30 = 8 + .label _11 = 9 + .label _21 = $a + .label _30 = $b .label chargen1 = 6 .label charset4 = 4 .label chargen = 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log index ad6c99b99..712114a05 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log @@ -1820,11 +1820,11 @@ Attempting to uplift remaining variables inzp ZP_BYTE:20 [ main::$11 ] Uplifting [main] best 3563 combination zp ZP_BYTE:20 [ main::$11 ] Attempting to uplift remaining variables inzp ZP_BYTE:27 [ main::$21 ] Uplifting [main] best 3563 combination zp ZP_BYTE:27 [ main::$21 ] -Coalescing zero page register [ zp ZP_BYTE:13 [ main::$1 ] ] with [ zp ZP_BYTE:20 [ main::$11 ] ] -Coalescing zero page register [ zp ZP_BYTE:13 [ main::$1 main::$11 ] ] with [ zp ZP_BYTE:27 [ main::$21 ] ] -Coalescing zero page register [ zp ZP_BYTE:13 [ main::$1 main::$11 main::$21 ] ] with [ zp ZP_BYTE:33 [ main::$30 ] ] Allocated (was zp ZP_WORD:11) zp ZP_WORD:6 [ main::chargen1#0 ] -Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:8 [ main::$1 main::$11 main::$21 main::$30 ] +Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:8 [ main::$1 ] +Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:9 [ main::$11 ] +Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:10 [ main::$21 ] +Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:11 [ main::$30 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -1854,9 +1854,9 @@ bend: //SEG8 main main: { .label _1 = 8 - .label _11 = 8 - .label _21 = 8 - .label _30 = 8 + .label _11 = 9 + .label _21 = $a + .label _30 = $b .label chargen1 = 6 .label charset4 = 4 .label chargen = 2 @@ -2192,20 +2192,20 @@ FINAL SYMBOL TABLE (const byte[]) bits_count#0 bits_count = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4 } (void()) main() (byte~) main::$1 $1 zp ZP_BYTE:8 7.333333333333333 -(byte~) main::$11 $11 zp ZP_BYTE:8 7.333333333333333 +(byte~) main::$11 $11 zp ZP_BYTE:9 7.333333333333333 (byte~) main::$12 reg byte a 22.0 (byte~) main::$13 reg byte a 22.0 (byte~) main::$14 reg byte a 22.0 (byte~) main::$15 reg byte a 22.0 (byte~) main::$2 reg byte a 22.0 (byte~) main::$20 reg byte a 22.0 -(byte~) main::$21 $21 zp ZP_BYTE:8 7.333333333333333 +(byte~) main::$21 $21 zp ZP_BYTE:10 7.333333333333333 (byte~) main::$22 reg byte a 22.0 (byte~) main::$23 reg byte a 22.0 (byte~) main::$24 reg byte a 22.0 (byte~) main::$29 reg byte a 22.0 (byte~) main::$3 reg byte a 22.0 -(byte~) main::$30 $30 zp ZP_BYTE:8 11.0 +(byte~) main::$30 $30 zp ZP_BYTE:11 11.0 (byte~) main::$31 reg byte a 22.0 (byte~) main::$32 reg byte a 22.0 (byte~) main::$4 reg byte a 22.0 @@ -2261,24 +2261,27 @@ reg byte x [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ] reg byte x [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:6 [ main::chargen1#0 ] -zp ZP_BYTE:8 [ main::$1 main::$11 main::$21 main::$30 ] +zp ZP_BYTE:8 [ main::$1 ] reg byte a [ main::$2 ] reg byte a [ main::$3 ] reg byte a [ main::$4 ] reg byte a [ main::$5 ] reg byte a [ main::$6 ] reg byte a [ main::bits#0 ] +zp ZP_BYTE:9 [ main::$11 ] reg byte a [ main::$12 ] reg byte a [ main::$13 ] reg byte a [ main::$14 ] reg byte a [ main::$15 ] reg byte a [ main::bits#1 ] reg byte a [ main::$20 ] +zp ZP_BYTE:10 [ main::$21 ] reg byte a [ main::$22 ] reg byte a [ main::$23 ] reg byte a [ main::$24 ] reg byte a [ main::bits#2 ] reg byte a [ main::$29 ] +zp ZP_BYTE:11 [ main::$30 ] reg byte a [ main::$31 ] reg byte a [ main::$32 ] reg byte a [ main::bits#3 ] @@ -2308,9 +2311,9 @@ Score: 3054 //SEG8 main main: { .label _1 = 8 - .label _11 = 8 - .label _21 = 8 - .label _30 = 8 + .label _11 = 9 + .label _21 = $a + .label _30 = $b .label chargen1 = 6 .label charset4 = 4 .label chargen = 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.sym b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.sym index 501adbb3d..5a4963453 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.sym @@ -15,20 +15,20 @@ (const byte[]) bits_count#0 bits_count = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4 } (void()) main() (byte~) main::$1 $1 zp ZP_BYTE:8 7.333333333333333 -(byte~) main::$11 $11 zp ZP_BYTE:8 7.333333333333333 +(byte~) main::$11 $11 zp ZP_BYTE:9 7.333333333333333 (byte~) main::$12 reg byte a 22.0 (byte~) main::$13 reg byte a 22.0 (byte~) main::$14 reg byte a 22.0 (byte~) main::$15 reg byte a 22.0 (byte~) main::$2 reg byte a 22.0 (byte~) main::$20 reg byte a 22.0 -(byte~) main::$21 $21 zp ZP_BYTE:8 7.333333333333333 +(byte~) main::$21 $21 zp ZP_BYTE:10 7.333333333333333 (byte~) main::$22 reg byte a 22.0 (byte~) main::$23 reg byte a 22.0 (byte~) main::$24 reg byte a 22.0 (byte~) main::$29 reg byte a 22.0 (byte~) main::$3 reg byte a 22.0 -(byte~) main::$30 $30 zp ZP_BYTE:8 11.0 +(byte~) main::$30 $30 zp ZP_BYTE:11 11.0 (byte~) main::$31 reg byte a 22.0 (byte~) main::$32 reg byte a 22.0 (byte~) main::$4 reg byte a 22.0 @@ -84,24 +84,27 @@ reg byte x [ main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 ] reg byte x [ main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:6 [ main::chargen1#0 ] -zp ZP_BYTE:8 [ main::$1 main::$11 main::$21 main::$30 ] +zp ZP_BYTE:8 [ main::$1 ] reg byte a [ main::$2 ] reg byte a [ main::$3 ] reg byte a [ main::$4 ] reg byte a [ main::$5 ] reg byte a [ main::$6 ] reg byte a [ main::bits#0 ] +zp ZP_BYTE:9 [ main::$11 ] reg byte a [ main::$12 ] reg byte a [ main::$13 ] reg byte a [ main::$14 ] reg byte a [ main::$15 ] reg byte a [ main::bits#1 ] reg byte a [ main::$20 ] +zp ZP_BYTE:10 [ main::$21 ] reg byte a [ main::$22 ] reg byte a [ main::$23 ] reg byte a [ main::$24 ] reg byte a [ main::bits#2 ] reg byte a [ main::$29 ] +zp ZP_BYTE:11 [ main::$30 ] reg byte a [ main::$31 ] reg byte a [ main::$32 ] reg byte a [ main::bits#3 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.asm b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.asm index 1fab21b3b..157591ead 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.asm @@ -79,7 +79,7 @@ print_str: { jmp b1 } print_cls: { - .label sc = 2 + .label sc = 8 lda #<$400 sta sc lda #>$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log index 376698190..fb5f1fe35 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log @@ -1237,10 +1237,10 @@ Uplifting [print_str] best 12807 combination zp ZP_WORD:5 [ print_str::str#2 pri Uplifting [print_cls] best 12807 combination zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] Uplifting [main] best 12717 combination reg byte x [ main::i#2 main::i#1 ] Uplifting [print_ln] best 12717 combination -Coalescing zero page register [ zp ZP_WORD:3 [ line_cursor#6 line_cursor#13 line_cursor#1 ] ] with [ zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] ] -Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ line_cursor#6 line_cursor#13 line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ line_cursor#6 line_cursor#13 line_cursor#1 ] Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ print_str::str#2 print_str::str#0 ] Allocated (was zp ZP_WORD:7) zp ZP_WORD:6 [ char_cursor#10 char_cursor#19 char_cursor#25 char_cursor#1 ] +Allocated (was zp ZP_WORD:9) zp ZP_WORD:8 [ print_cls::sc#2 print_cls::sc#1 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -1415,7 +1415,7 @@ print_str: { } //SEG58 print_cls print_cls: { - .label sc = 2 + .label sc = 8 //SEG59 [28] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] b1_from_print_cls: //SEG60 [28] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 @@ -1529,8 +1529,8 @@ FINAL SYMBOL TABLE (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:8 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:8 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -1545,9 +1545,10 @@ FINAL SYMBOL TABLE (const string) txt#0 txt = (string) "camelot@" reg byte x [ main::i#2 main::i#1 ] -zp ZP_WORD:2 [ line_cursor#6 line_cursor#13 line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:2 [ line_cursor#6 line_cursor#13 line_cursor#1 ] zp ZP_WORD:4 [ print_str::str#2 print_str::str#0 ] zp ZP_WORD:6 [ char_cursor#10 char_cursor#19 char_cursor#25 char_cursor#1 ] +zp ZP_WORD:8 [ print_cls::sc#2 print_cls::sc#1 ] FINAL ASSEMBLER @@ -1693,7 +1694,7 @@ print_str: { } //SEG58 print_cls print_cls: { - .label sc = 2 + .label sc = 8 //SEG59 [28] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] //SEG60 [28] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 lda #<$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.sym b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.sym index 07a281fc5..5c69f2577 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.sym @@ -23,8 +23,8 @@ (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:8 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:8 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -39,6 +39,7 @@ (const string) txt#0 txt = (string) "camelot@" reg byte x [ main::i#2 main::i#1 ] -zp ZP_WORD:2 [ line_cursor#6 line_cursor#13 line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:2 [ line_cursor#6 line_cursor#13 line_cursor#1 ] zp ZP_WORD:4 [ print_str::str#2 print_str::str#0 ] zp ZP_WORD:6 [ char_cursor#10 char_cursor#19 char_cursor#25 char_cursor#1 ] +zp ZP_WORD:8 [ print_cls::sc#2 print_cls::sc#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.asm b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.asm index a8ccc6cc9..c028b7194 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.asm @@ -7,8 +7,8 @@ main: { .label BGCOL = $d020 .label sc2 = screen+$51 .label _2 = 2 - .label _9 = 2 - .label _11 = 4 + .label _9 = 4 + .label _11 = 6 ldx #0 b1: txa diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log index 54abc7738..62e68df4e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log @@ -644,9 +644,9 @@ Uplift Scope [] Uplifting [main] best 1165 combination reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::j#2 main::j#1 ] zp ZP_WORD:4 [ main::$2 ] zp ZP_WORD:8 [ main::$11 ] zp ZP_WORD:6 [ main::$9 ] Uplifting [] best 1165 combination -Coalescing zero page register [ zp ZP_WORD:4 [ main::$2 ] ] with [ zp ZP_WORD:6 [ main::$9 ] ] -Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ main::$2 main::$9 ] -Allocated (was zp ZP_WORD:8) zp ZP_WORD:4 [ main::$11 ] +Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ main::$2 ] +Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ main::$9 ] +Allocated (was zp ZP_WORD:8) zp ZP_WORD:6 [ main::$11 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -676,8 +676,8 @@ main: { .label BGCOL = $d020 .label sc2 = screen+$51 .label _2 = 2 - .label _9 = 2 - .label _11 = 4 + .label _9 = 4 + .label _11 = 6 //SEG10 [5] phi from main to main::@1 [phi:main->main::@1] b1_from_main: //SEG11 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 @@ -805,9 +805,9 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (void()) main() -(byte*~) main::$11 $11 zp ZP_WORD:4 22.0 +(byte*~) main::$11 $11 zp ZP_WORD:6 22.0 (byte*~) main::$2 $2 zp ZP_WORD:2 22.0 -(byte*~) main::$9 $9 zp ZP_WORD:2 11.0 +(byte*~) main::$9 $9 zp ZP_WORD:4 11.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -828,8 +828,9 @@ FINAL SYMBOL TABLE reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::j#2 main::j#1 ] -zp ZP_WORD:2 [ main::$2 main::$9 ] -zp ZP_WORD:4 [ main::$11 ] +zp ZP_WORD:2 [ main::$2 ] +zp ZP_WORD:4 [ main::$9 ] +zp ZP_WORD:6 [ main::$11 ] FINAL ASSEMBLER @@ -854,8 +855,8 @@ main: { .label BGCOL = $d020 .label sc2 = screen+$51 .label _2 = 2 - .label _9 = 2 - .label _11 = 4 + .label _9 = 4 + .label _11 = 6 //SEG10 [5] phi from main to main::@1 [phi:main->main::@1] //SEG11 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 ldx #0 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.sym b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.sym index cbde774f9..c2bd98780 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.sym @@ -2,9 +2,9 @@ (label) @begin (label) @end (void()) main() -(byte*~) main::$11 $11 zp ZP_WORD:4 22.0 +(byte*~) main::$11 $11 zp ZP_WORD:6 22.0 (byte*~) main::$2 $2 zp ZP_WORD:2 22.0 -(byte*~) main::$9 $9 zp ZP_WORD:2 11.0 +(byte*~) main::$9 $9 zp ZP_WORD:4 11.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -25,5 +25,6 @@ reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::j#2 main::j#1 ] -zp ZP_WORD:2 [ main::$2 main::$9 ] -zp ZP_WORD:4 [ main::$11 ] +zp ZP_WORD:2 [ main::$2 ] +zp ZP_WORD:4 [ main::$9 ] +zp ZP_WORD:6 [ main::$11 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.asm b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.asm index d150f1cf5..ff287bc8e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.asm @@ -33,7 +33,7 @@ lvaluevar: { jmp b1 } rvaluevar: { - .label screen = 2 + .label screen = 4 lda #<$400 sta screen lda #>$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log index 02b7ce77f..2f2093e8b 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log @@ -1089,8 +1089,8 @@ Uplifting [rvalue] best 1530 combination reg byte x [ rvalue::i#2 rvalue::i#1 ] Uplifting [lvalue] best 1410 combination reg byte x [ lvalue::i#2 lvalue::i#1 ] Uplifting [main] best 1410 combination Uplifting [] best 1410 combination -Coalescing zero page register [ zp ZP_WORD:3 [ lvaluevar::screen#2 lvaluevar::screen#1 ] ] with [ zp ZP_WORD:6 [ rvaluevar::screen#2 rvaluevar::screen#1 ] ] -Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ lvaluevar::screen#2 lvaluevar::screen#1 rvaluevar::screen#2 rvaluevar::screen#1 ] +Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ lvaluevar::screen#2 lvaluevar::screen#1 ] +Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ rvaluevar::screen#2 rvaluevar::screen#1 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -1196,7 +1196,7 @@ lvaluevar: { } //SEG40 rvaluevar rvaluevar: { - .label screen = 2 + .label screen = 4 //SEG41 [21] phi from rvaluevar to rvaluevar::@1 [phi:rvaluevar->rvaluevar::@1] b1_from_rvaluevar: //SEG42 [21] phi (byte*) rvaluevar::screen#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:rvaluevar->rvaluevar::@1#0] -- pbuz1=pbuc1 @@ -1390,12 +1390,13 @@ FINAL SYMBOL TABLE (byte) rvaluevar::i#1 reg byte x 22.0 (byte) rvaluevar::i#2 reg byte x 11.0 (byte*) rvaluevar::screen -(byte*) rvaluevar::screen#1 screen zp ZP_WORD:2 11.0 -(byte*) rvaluevar::screen#2 screen zp ZP_WORD:2 11.0 +(byte*) rvaluevar::screen#1 screen zp ZP_WORD:4 11.0 +(byte*) rvaluevar::screen#2 screen zp ZP_WORD:4 11.0 reg byte x [ lvaluevar::i#2 lvaluevar::i#1 ] -zp ZP_WORD:2 [ lvaluevar::screen#2 lvaluevar::screen#1 rvaluevar::screen#2 rvaluevar::screen#1 ] +zp ZP_WORD:2 [ lvaluevar::screen#2 lvaluevar::screen#1 ] reg byte x [ rvaluevar::i#2 rvaluevar::i#1 ] +zp ZP_WORD:4 [ rvaluevar::screen#2 rvaluevar::screen#1 ] reg byte x [ rvalue::i#2 rvalue::i#1 ] reg byte x [ lvalue::i#2 lvalue::i#1 ] @@ -1479,7 +1480,7 @@ lvaluevar: { } //SEG40 rvaluevar rvaluevar: { - .label screen = 2 + .label screen = 4 //SEG41 [21] phi from rvaluevar to rvaluevar::@1 [phi:rvaluevar->rvaluevar::@1] //SEG42 [21] phi (byte*) rvaluevar::screen#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:rvaluevar->rvaluevar::@1#0] -- pbuz1=pbuc1 lda #<$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.sym b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.sym index 8a60e0e43..2c38ddfa5 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.sym @@ -44,11 +44,12 @@ (byte) rvaluevar::i#1 reg byte x 22.0 (byte) rvaluevar::i#2 reg byte x 11.0 (byte*) rvaluevar::screen -(byte*) rvaluevar::screen#1 screen zp ZP_WORD:2 11.0 -(byte*) rvaluevar::screen#2 screen zp ZP_WORD:2 11.0 +(byte*) rvaluevar::screen#1 screen zp ZP_WORD:4 11.0 +(byte*) rvaluevar::screen#2 screen zp ZP_WORD:4 11.0 reg byte x [ lvaluevar::i#2 lvaluevar::i#1 ] -zp ZP_WORD:2 [ lvaluevar::screen#2 lvaluevar::screen#1 rvaluevar::screen#2 rvaluevar::screen#1 ] +zp ZP_WORD:2 [ lvaluevar::screen#2 lvaluevar::screen#1 ] reg byte x [ rvaluevar::i#2 rvaluevar::i#1 ] +zp ZP_WORD:4 [ rvaluevar::screen#2 rvaluevar::screen#1 ] reg byte x [ rvalue::i#2 rvalue::i#1 ] reg byte x [ lvalue::i#2 lvalue::i#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/scroll.asm b/src/test/java/dk/camelot64/kickc/test/ref/scroll.asm index bfeb4d888..7d13e974d 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/scroll.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/scroll.asm @@ -58,7 +58,7 @@ main: { } fillscreen: { .const fill = $20 - .label cursor = 2 + .label cursor = 4 lda #SCREEN diff --git a/src/test/java/dk/camelot64/kickc/test/ref/scroll.log b/src/test/java/dk/camelot64/kickc/test/ref/scroll.log index 4041813f3..8a2c51c09 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/scroll.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/scroll.log @@ -1266,8 +1266,8 @@ Uplift Scope [] Uplifting [main] best 8620 combination reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::c#2 main::c#0 main::c#1 ] zp ZP_WORD:5 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ] reg byte x [ main::scroll#7 main::scroll#10 main::scroll#1 ] Uplifting [fillscreen] best 8620 combination zp ZP_WORD:7 [ fillscreen::cursor#2 fillscreen::cursor#1 ] Uplifting [] best 8620 combination -Coalescing zero page register [ zp ZP_WORD:5 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ] ] with [ zp ZP_WORD:7 [ fillscreen::cursor#2 fillscreen::cursor#1 ] ] -Allocated (was zp ZP_WORD:5) zp ZP_WORD:2 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 fillscreen::cursor#2 fillscreen::cursor#1 ] +Allocated (was zp ZP_WORD:5) zp ZP_WORD:2 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ] +Allocated (was zp ZP_WORD:7) zp ZP_WORD:4 [ fillscreen::cursor#2 fillscreen::cursor#1 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -1429,7 +1429,7 @@ main: { //SEG61 fillscreen fillscreen: { .const fill = $20 - .label cursor = 2 + .label cursor = 4 //SEG62 [28] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] b1_from_fillscreen: //SEG63 [28] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- pbuz1=pbuc1 @@ -1550,8 +1550,8 @@ FINAL SYMBOL TABLE (label) fillscreen::@1 (label) fillscreen::@return (byte*) fillscreen::cursor -(byte*) fillscreen::cursor#1 cursor zp ZP_WORD:2 16.5 -(byte*) fillscreen::cursor#2 cursor zp ZP_WORD:2 16.5 +(byte*) fillscreen::cursor#1 cursor zp ZP_WORD:4 16.5 +(byte*) fillscreen::cursor#2 cursor zp ZP_WORD:4 16.5 (byte) fillscreen::fill (const byte) fillscreen::fill#0 fill = (byte/signed byte/word/signed word/dword/signed dword) 32 (byte*) fillscreen::screen @@ -1587,7 +1587,8 @@ FINAL SYMBOL TABLE reg byte x [ main::scroll#7 main::scroll#10 main::scroll#1 ] reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::c#2 main::c#0 main::c#1 ] -zp ZP_WORD:2 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 fillscreen::cursor#2 fillscreen::cursor#1 ] +zp ZP_WORD:2 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 ] +zp ZP_WORD:4 [ fillscreen::cursor#2 fillscreen::cursor#1 ] FINAL ASSEMBLER @@ -1715,7 +1716,7 @@ main: { //SEG61 fillscreen fillscreen: { .const fill = $20 - .label cursor = 2 + .label cursor = 4 //SEG62 [28] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] //SEG63 [28] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- pbuz1=pbuc1 lda #SCREEN diff --git a/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log b/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log index 84261d0ee..3551edd90 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log @@ -3159,13 +3159,13 @@ Uplifting [main] best 24678 combination Uplifting [scroll_soft] best 24678 combination Attempting to uplift remaining variables inzp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] Uplifting [] best 24678 combination zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] -Coalescing zero page register [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] ] with [ zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 fillscreen::cursor#2 fillscreen::cursor#1 ] ] with [ zp ZP_WORD:18 [ scroll_bit::c#0 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 fillscreen::cursor#2 fillscreen::cursor#1 scroll_bit::c#0 ] ] with [ zp ZP_WORD:20 [ scroll_bit::$4 ] ] +Coalescing zero page register [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] ] with [ zp ZP_WORD:20 [ scroll_bit::$4 ] ] +Coalescing zero page register [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 ] ] with [ zp ZP_WORD:18 [ scroll_bit::c#0 ] ] Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] -Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 fillscreen::cursor#2 fillscreen::cursor#1 scroll_bit::c#0 scroll_bit::$4 ] +Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 scroll_bit::c#0 ] Allocated (was zp ZP_WORD:7) zp ZP_WORD:5 [ scroll_bit::sc#2 scroll_bit::sc#1 ] Allocated (was zp ZP_WORD:11) zp ZP_WORD:7 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ] +Allocated (was zp ZP_WORD:14) zp ZP_WORD:9 [ fillscreen::cursor#2 fillscreen::cursor#1 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -3539,7 +3539,7 @@ next_char: { //SEG140 fillscreen fillscreen: { .const fill = $20 - .label cursor = 3 + .label cursor = 9 //SEG141 [67] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] b1_from_fillscreen: //SEG142 [67] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- pbuz1=pbuc1 @@ -3711,8 +3711,8 @@ FINAL SYMBOL TABLE (label) fillscreen::@1 (label) fillscreen::@return (byte*) fillscreen::cursor -(byte*) fillscreen::cursor#1 cursor zp ZP_WORD:3 16.5 -(byte*) fillscreen::cursor#2 cursor zp ZP_WORD:3 16.5 +(byte*) fillscreen::cursor#1 cursor zp ZP_WORD:9 16.5 +(byte*) fillscreen::cursor#2 cursor zp ZP_WORD:9 16.5 (byte) fillscreen::fill (const byte) fillscreen::fill#0 fill = (byte/signed byte/word/signed word/dword/signed dword) 32 (byte*) fillscreen::screen @@ -3780,13 +3780,14 @@ FINAL SYMBOL TABLE reg byte x [ scroll#18 scroll#10 scroll#3 ] zp ZP_BYTE:2 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] -zp ZP_WORD:3 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 fillscreen::cursor#2 fillscreen::cursor#1 scroll_bit::c#0 scroll_bit::$4 ] +zp ZP_WORD:3 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 scroll_bit::c#0 ] reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ] zp ZP_WORD:5 [ scroll_bit::sc#2 scroll_bit::sc#1 ] reg byte a [ scroll_bit::b#2 ] reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ] zp ZP_WORD:7 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ] reg byte a [ next_char::return#1 next_char::c#0 next_char::c#1 ] +zp ZP_WORD:9 [ fillscreen::cursor#2 fillscreen::cursor#1 ] reg byte a [ next_char::return#0 ] reg byte a [ scroll_bit::$3 ] reg byte a [ scroll_bit::bits#0 ] @@ -4096,7 +4097,7 @@ next_char: { //SEG140 fillscreen fillscreen: { .const fill = $20 - .label cursor = 3 + .label cursor = 9 //SEG141 [67] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] //SEG142 [67] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- pbuz1=pbuc1 lda #=(byte/signed byte/word/signed word/dword/signed dword) 0) goto anim::@1 [ yvel#12 xpos#12 ypos#13 xvel#12 yvel_init#13 ] ( main:2::anim:9 [ yvel#12 xpos#12 ypos#13 xvel#12 yvel_init#13 ] ) -- vwsz1_ge_0_then_la1 lda ypos+1 bpl b1_from_anim @@ -2305,7 +2304,7 @@ anim: { } //SEG75 init init: { - .label sc = 2 + .label sc = $c //SEG76 [34] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2::init:5 [ ] ) -- _deref_pbuc1=vbuc2 lda #1 sta SPRITES_ENABLE @@ -2491,8 +2490,8 @@ FINAL SYMBOL TABLE (byte) WHITE (const byte) WHITE#0 WHITE = (byte/signed byte/word/signed word/dword/signed dword) 1 (void()) anim() -(signed word~) anim::$10 $10 zp ZP_WORD:12 4.0 -(signed word~) anim::$12 $12 zp ZP_WORD:14 4.0 +(signed word~) anim::$10 $10 zp ZP_WORD:14 4.0 +(signed word~) anim::$12 $12 zp ZP_WORD:16 4.0 (byte~) anim::$14 reg byte a 4.0 (byte~) anim::$15 reg byte a 4.0 (byte~) anim::$16 reg byte a 4.0 @@ -2502,9 +2501,9 @@ FINAL SYMBOL TABLE (label) anim::@5 (label) anim::@return (signed word) anim::sprite_x -(signed word) anim::sprite_x#0 sprite_x zp ZP_WORD:12 0.8571428571428571 +(signed word) anim::sprite_x#0 sprite_x zp ZP_WORD:14 0.8571428571428571 (signed word) anim::sprite_y -(signed word) anim::sprite_y#0 sprite_y zp ZP_WORD:14 1.3333333333333333 +(signed word) anim::sprite_y#0 sprite_y zp ZP_WORD:16 1.3333333333333333 (signed word) g (const signed word) g#0 g = -(byte/signed byte/word/signed word/dword/signed dword) 5 (void()) init() @@ -2515,8 +2514,8 @@ FINAL SYMBOL TABLE (byte) init::i#1 reg byte x 16.5 (byte) init::i#2 reg byte x 16.5 (byte*) init::sc -(byte*) init::sc#1 sc zp ZP_WORD:2 16.5 -(byte*) init::sc#2 sc zp ZP_WORD:2 16.5 +(byte*) init::sc#1 sc zp ZP_WORD:12 16.5 +(byte*) init::sc#2 sc zp ZP_WORD:12 16.5 (void()) main() (label) main::@2 (label) main::@3 @@ -2545,14 +2544,15 @@ FINAL SYMBOL TABLE (signed word) yvel_init#13 yvel_init zp ZP_WORD:4 3.0 (signed word) yvel_init#3 yvel_init zp ZP_WORD:4 2.0 -zp ZP_WORD:2 [ xvel#12 xvel#10 xvel#14 init::sc#2 init::sc#1 ] +zp ZP_WORD:2 [ xvel#12 xvel#10 xvel#14 ] zp ZP_WORD:4 [ yvel_init#13 yvel_init#11 yvel#4 yvel_init#3 ] zp ZP_WORD:6 [ yvel#9 yvel#12 yvel#10 yvel#22 ] zp ZP_WORD:8 [ xpos#9 xpos#12 xpos#10 ] zp ZP_WORD:10 [ ypos#10 ypos#13 ypos#11 ] +zp ZP_WORD:12 [ init::sc#2 init::sc#1 ] reg byte x [ init::i#2 init::i#1 ] -zp ZP_WORD:12 [ anim::$10 anim::sprite_x#0 ] -zp ZP_WORD:14 [ anim::$12 anim::sprite_y#0 ] +zp ZP_WORD:14 [ anim::$10 anim::sprite_x#0 ] +zp ZP_WORD:16 [ anim::$12 anim::sprite_y#0 ] reg byte a [ anim::$14 ] reg byte a [ anim::$15 ] reg byte a [ anim::$16 ] @@ -2647,10 +2647,10 @@ main: { } //SEG33 anim anim: { - .label _10 = $c - .label _12 = $e - .label sprite_x = $c - .label sprite_y = $e + .label _10 = $e + .label _12 = $10 + .label sprite_x = $e + .label sprite_y = $10 //SEG34 [12] if((signed word) ypos#13>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto anim::@1 [ yvel#12 xpos#12 ypos#13 xvel#12 yvel_init#13 ] ( main:2::anim:9 [ yvel#12 xpos#12 ypos#13 xvel#12 yvel_init#13 ] ) -- vwsz1_ge_0_then_la1 lda ypos+1 bpl b1 @@ -2810,7 +2810,7 @@ anim: { } //SEG75 init init: { - .label sc = 2 + .label sc = $c //SEG76 [34] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2::init:5 [ ] ) -- _deref_pbuc1=vbuc2 lda #1 sta SPRITES_ENABLE diff --git a/src/test/java/dk/camelot64/kickc/test/ref/signed-words.sym b/src/test/java/dk/camelot64/kickc/test/ref/signed-words.sym index 0419578df..37d9adc3c 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/signed-words.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/signed-words.sym @@ -26,8 +26,8 @@ (byte) WHITE (const byte) WHITE#0 WHITE = (byte/signed byte/word/signed word/dword/signed dword) 1 (void()) anim() -(signed word~) anim::$10 $10 zp ZP_WORD:12 4.0 -(signed word~) anim::$12 $12 zp ZP_WORD:14 4.0 +(signed word~) anim::$10 $10 zp ZP_WORD:14 4.0 +(signed word~) anim::$12 $12 zp ZP_WORD:16 4.0 (byte~) anim::$14 reg byte a 4.0 (byte~) anim::$15 reg byte a 4.0 (byte~) anim::$16 reg byte a 4.0 @@ -37,9 +37,9 @@ (label) anim::@5 (label) anim::@return (signed word) anim::sprite_x -(signed word) anim::sprite_x#0 sprite_x zp ZP_WORD:12 0.8571428571428571 +(signed word) anim::sprite_x#0 sprite_x zp ZP_WORD:14 0.8571428571428571 (signed word) anim::sprite_y -(signed word) anim::sprite_y#0 sprite_y zp ZP_WORD:14 1.3333333333333333 +(signed word) anim::sprite_y#0 sprite_y zp ZP_WORD:16 1.3333333333333333 (signed word) g (const signed word) g#0 g = -(byte/signed byte/word/signed word/dword/signed dword) 5 (void()) init() @@ -50,8 +50,8 @@ (byte) init::i#1 reg byte x 16.5 (byte) init::i#2 reg byte x 16.5 (byte*) init::sc -(byte*) init::sc#1 sc zp ZP_WORD:2 16.5 -(byte*) init::sc#2 sc zp ZP_WORD:2 16.5 +(byte*) init::sc#1 sc zp ZP_WORD:12 16.5 +(byte*) init::sc#2 sc zp ZP_WORD:12 16.5 (void()) main() (label) main::@2 (label) main::@3 @@ -80,14 +80,15 @@ (signed word) yvel_init#13 yvel_init zp ZP_WORD:4 3.0 (signed word) yvel_init#3 yvel_init zp ZP_WORD:4 2.0 -zp ZP_WORD:2 [ xvel#12 xvel#10 xvel#14 init::sc#2 init::sc#1 ] +zp ZP_WORD:2 [ xvel#12 xvel#10 xvel#14 ] zp ZP_WORD:4 [ yvel_init#13 yvel_init#11 yvel#4 yvel_init#3 ] zp ZP_WORD:6 [ yvel#9 yvel#12 yvel#10 yvel#22 ] zp ZP_WORD:8 [ xpos#9 xpos#12 xpos#10 ] zp ZP_WORD:10 [ ypos#10 ypos#13 ypos#11 ] +zp ZP_WORD:12 [ init::sc#2 init::sc#1 ] reg byte x [ init::i#2 init::i#1 ] -zp ZP_WORD:12 [ anim::$10 anim::sprite_x#0 ] -zp ZP_WORD:14 [ anim::$12 anim::sprite_y#0 ] +zp ZP_WORD:14 [ anim::$10 anim::sprite_x#0 ] +zp ZP_WORD:16 [ anim::$12 anim::sprite_y#0 ] reg byte a [ anim::$14 ] reg byte a [ anim::$15 ] reg byte a [ anim::$16 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.asm b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.asm index 5abbc5136..50905bbdf 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.asm @@ -96,7 +96,7 @@ print_ln: { rts } print_word: { - .label w = 7 + .label w = 9 lda w+1 tax jsr print_byte @@ -132,7 +132,7 @@ print_char: { rts } getFAC: { - .label return = 7 + .label return = 9 jsr $b1aa sty $fe sta $ff diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log index 6161b5fdf..6d78d4e82 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log @@ -3274,11 +3274,11 @@ Uplifting [main] best 6281 combination zp ZP_BYTE:2 [ main::i#10 main::i#1 ] Coalescing zero page register [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ] ] with [ zp ZP_WORD:11 [ mulFACbyMEM::mem#2 ] ] Coalescing zero page register [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 ] ] with [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] ] Coalescing zero page register [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 ] ] with [ zp ZP_WORD:15 [ setMEMtoFAC::mem#2 ] ] -Coalescing zero page register [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 ] ] with [ zp ZP_WORD:17 [ getFAC::return#2 ] ] -Coalescing zero page register [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 getFAC::return#2 ] ] with [ zp ZP_WORD:19 [ print_word::w#0 ] ] -Coalescing zero page register [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 getFAC::return#2 print_word::w#0 ] ] with [ zp ZP_WORD:23 [ getFAC::return#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ getFAC::return#2 ] ] with [ zp ZP_WORD:19 [ print_word::w#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ getFAC::return#2 print_word::w#0 ] ] with [ zp ZP_WORD:23 [ getFAC::return#0 ] ] Allocated (was zp ZP_WORD:7) zp ZP_WORD:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] -Allocated (was zp ZP_WORD:9) zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 getFAC::return#2 print_word::w#0 getFAC::return#0 ] +Allocated (was zp ZP_WORD:9) zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:9 [ getFAC::return#2 print_word::w#0 getFAC::return#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -3457,12 +3457,12 @@ main: { //SEG63 [28] call getFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) jsr getFAC //SEG64 [29] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ) - // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:7 + // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:9 jmp b14 //SEG65 main::@14 b14: //SEG66 [30] (word) print_word::w#0 ← (word) getFAC::return#2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ) - // (word) print_word::w#0 = (word) getFAC::return#2 // register copy zp ZP_WORD:7 + // (word) print_word::w#0 = (word) getFAC::return#2 // register copy zp ZP_WORD:9 //SEG67 [31] call print_word param-assignment [ main::i#10 line_cursor#13 char_cursor#10 ] ( main:2 [ main::i#10 line_cursor#13 char_cursor#10 ] ) jsr print_word //SEG68 [32] phi from main::@14 to main::@15 [phi:main::@14->main::@15] @@ -3538,7 +3538,7 @@ print_ln: { } //SEG91 print_word print_word: { - .label w = 7 + .label w = 9 //SEG92 [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ char_cursor#32 print_word::w#0 print_byte::b#0 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_byte::b#0 ] ) -- vbuxx=_hi_vwuz1 lda w+1 tax @@ -3623,7 +3623,7 @@ print_char: { } //SEG126 getFAC getFAC: { - .label return = 7 + .label return = 9 //SEG127 asm { jsr$b1aa sty$fe sta$ff } jsr $b1aa sty $fe @@ -3936,8 +3936,8 @@ FINAL SYMBOL TABLE (word()) getFAC() (label) getFAC::@return (word) getFAC::return -(word) getFAC::return#0 return zp ZP_WORD:7 4.333333333333333 -(word) getFAC::return#2 return zp ZP_WORD:7 22.0 +(word) getFAC::return#0 return zp ZP_WORD:9 4.333333333333333 +(word) getFAC::return#2 return zp ZP_WORD:9 22.0 (word) getFAC::w (byte*) line_cursor (byte*) line_cursor#1 line_cursor zp ZP_WORD:3 46.42857142857143 @@ -4011,7 +4011,7 @@ FINAL SYMBOL TABLE (label) print_word::@1 (label) print_word::@return (word) print_word::w -(word) print_word::w#0 w zp ZP_WORD:7 5.0 +(word) print_word::w#0 w zp ZP_WORD:9 5.0 (void()) setFAC((word) setFAC::w) (label) setFAC::@1 (label) setFAC::@return @@ -4031,7 +4031,8 @@ zp ZP_WORD:3 [ line_cursor#6 line_cursor#13 line_cursor#1 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] zp ZP_WORD:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] -zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 getFAC::return#2 print_word::w#0 getFAC::return#0 ] +zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 ] +zp ZP_WORD:9 [ getFAC::return#2 print_word::w#0 getFAC::return#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] reg byte a [ prepareMEM::$0 ] @@ -4168,10 +4169,10 @@ main: { //SEG63 [28] call getFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#0 ] ) jsr getFAC //SEG64 [29] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ) - // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:7 + // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:9 //SEG65 main::@14 //SEG66 [30] (word) print_word::w#0 ← (word) getFAC::return#2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ) - // (word) print_word::w#0 = (word) getFAC::return#2 // register copy zp ZP_WORD:7 + // (word) print_word::w#0 = (word) getFAC::return#2 // register copy zp ZP_WORD:9 //SEG67 [31] call print_word param-assignment [ main::i#10 line_cursor#13 char_cursor#10 ] ( main:2 [ main::i#10 line_cursor#13 char_cursor#10 ] ) jsr print_word //SEG68 [32] phi from main::@14 to main::@15 [phi:main::@14->main::@15] @@ -4233,7 +4234,7 @@ print_ln: { } //SEG91 print_word print_word: { - .label w = 7 + .label w = 9 //SEG92 [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ char_cursor#32 print_word::w#0 print_byte::b#0 ] ( main:2::print_word:31 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_byte::b#0 ] ) -- vbuxx=_hi_vwuz1 lda w+1 tax @@ -4304,7 +4305,7 @@ print_char: { } //SEG126 getFAC getFAC: { - .label return = 7 + .label return = 9 //SEG127 asm { jsr$b1aa sty$fe sta$ff } jsr $b1aa sty $fe diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.sym b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.sym index baef74b88..1103f3155 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.sym @@ -20,8 +20,8 @@ (word()) getFAC() (label) getFAC::@return (word) getFAC::return -(word) getFAC::return#0 return zp ZP_WORD:7 4.333333333333333 -(word) getFAC::return#2 return zp ZP_WORD:7 22.0 +(word) getFAC::return#0 return zp ZP_WORD:9 4.333333333333333 +(word) getFAC::return#2 return zp ZP_WORD:9 22.0 (word) getFAC::w (byte*) line_cursor (byte*) line_cursor#1 line_cursor zp ZP_WORD:3 46.42857142857143 @@ -95,7 +95,7 @@ (label) print_word::@1 (label) print_word::@return (word) print_word::w -(word) print_word::w#0 w zp ZP_WORD:7 5.0 +(word) print_word::w#0 w zp ZP_WORD:9 5.0 (void()) setFAC((word) setFAC::w) (label) setFAC::@1 (label) setFAC::@return @@ -115,7 +115,8 @@ zp ZP_WORD:3 [ line_cursor#6 line_cursor#13 line_cursor#1 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] zp ZP_WORD:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] -zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 getFAC::return#2 print_word::w#0 getFAC::return#0 ] +zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 ] +zp ZP_WORD:9 [ getFAC::return#2 print_word::w#0 getFAC::return#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] reg byte a [ prepareMEM::$0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.asm b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.asm index 79c87ae22..97ab2db43 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.asm @@ -19,8 +19,8 @@ .const sinlen_x = $dd .const sinlen_y = $c5 .label sprites = $2000 - .label progress_idx = 4 - .label progress_cursor = $a + .label progress_idx = $f + .label progress_cursor = $10 .label sin_idx_x = 2 .label sin_idx_y = 3 jsr main @@ -39,7 +39,7 @@ main: { anim: { .label xidx = 4 .label yidx = 6 - .label x = 8 + .label x = $21 .label x_msb = 5 .label j = 7 inc BORDERCOL @@ -188,11 +188,11 @@ clear_screen: { } gen_sintab: { .label f_2pi = $e2e5 - .label _23 = $c - .label i = 2 - .label min = 2 - .label length = 3 - .label sintab = 8 + .label _23 = $23 + .label i = $e + .label min = $a + .label length = $b + .label sintab = $c txa sta setFAC.w lda #0 @@ -320,7 +320,7 @@ progress_inc: { progress_chars: .byte $20, $65, $74, $75, $61, $f6, $e7, $ea, $e0 } getFAC: { - .label return = $c + .label return = $23 jsr $b1aa sty $fe sta $ff @@ -331,7 +331,7 @@ getFAC: { rts } addMEMtoFAC: { - .label mem = $c + .label mem = $12 jsr prepareMEM lda $fe ldy $ff @@ -339,7 +339,7 @@ addMEMtoFAC: { rts } prepareMEM: { - .label mem = $c + .label mem = $12 lda mem sta memLo lda mem+1 @@ -347,7 +347,7 @@ prepareMEM: { rts } mulFACbyMEM: { - .label mem = $c + .label mem = $12 jsr prepareMEM lda $fe ldy $ff @@ -359,7 +359,7 @@ sinFAC: { rts } divMEMbyFAC: { - .label mem = $c + .label mem = $12 jsr prepareMEM lda $fe ldy $ff @@ -367,7 +367,7 @@ divMEMbyFAC: { rts } setFAC: { - .label w = $c + .label w = $12 jsr prepareMEM ldy $fe lda $ff @@ -375,7 +375,7 @@ setFAC: { rts } setMEMtoFAC: { - .label mem = $c + .label mem = $12 jsr prepareMEM ldx $fe ldy $ff @@ -391,12 +391,12 @@ setARGtoFAC: { rts } progress_init: { - .label line = $a + .label line = $10 rts } gen_sprites: { - .label spr = 8 - .label i = 2 + .label spr = $15 + .label i = $14 lda #sprites @@ -426,15 +426,15 @@ gen_sprites: { cml: .text "camelot" } gen_chargen_sprite: { - .label _0 = $c - .label _1 = $c - .label sprite = $a - .label chargen = $c - .label bits = 4 - .label s_gen = 7 - .label x = 5 - .label y = 3 - .label c = 6 + .label _0 = $25 + .label _1 = $25 + .label sprite = $1c + .label chargen = $25 + .label bits = $18 + .label s_gen = $1b + .label x = $19 + .label y = $17 + .label c = $1a tya sta _0 lda #0 @@ -526,9 +526,9 @@ gen_chargen_sprite: { } place_sprites: { .label sprites_ptr = SCREEN+$3f8 - .label spr_id = 2 - .label spr_x = 3 - .label col = 4 + .label spr_id = $1e + .label spr_x = $1f + .label col = $20 lda #$7f sta SPRITES_ENABLE sta SPRITES_EXPAND_X diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log index 9e4adcc06..50b973d65 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log @@ -7982,39 +7982,39 @@ Attempting to uplift remaining variables inzp ZP_BYTE:14 [ gen_sintab::length#10 Uplifting [gen_sintab] best 1061722 combination zp ZP_BYTE:14 [ gen_sintab::length#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ gen_sintab::min#2 ] Uplifting [gen_sintab] best 1061722 combination zp ZP_BYTE:13 [ gen_sintab::min#2 ] -Coalescing zero page register [ zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ] ] with [ zp ZP_BYTE:13 [ gen_sintab::min#2 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 gen_sintab::min#2 ] ] with [ zp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 gen_sintab::min#2 gen_sintab::i#10 gen_sintab::i#1 ] ] with [ zp ZP_BYTE:33 [ gen_sprites::i#2 gen_sprites::i#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 gen_sintab::min#2 gen_sintab::i#10 gen_sintab::i#1 gen_sprites::i#2 gen_sprites::i#1 ] ] with [ zp ZP_BYTE:45 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ] ] with [ zp ZP_BYTE:14 [ gen_sintab::length#10 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 gen_sintab::length#10 ] ] with [ zp ZP_BYTE:36 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 gen_sintab::length#10 gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ] ] with [ zp ZP_BYTE:47 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ] ] with [ zp ZP_BYTE:18 [ progress_idx#34 progress_idx#12 progress_idx#10 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 progress_idx#34 progress_idx#12 progress_idx#10 ] ] with [ zp ZP_BYTE:37 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 progress_idx#34 progress_idx#12 progress_idx#10 gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ] ] with [ zp ZP_BYTE:49 [ place_sprites::col#2 place_sprites::col#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ] ] with [ zp ZP_BYTE:38 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:7 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ] ] with [ zp ZP_BYTE:39 [ gen_chargen_sprite::c#3 ] ] -Coalescing zero page register [ zp ZP_BYTE:8 [ anim::j#2 anim::j#1 ] ] with [ zp ZP_BYTE:40 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] ] -Coalescing zero page register [ zp ZP_WORD:10 [ clear_screen::sc#2 clear_screen::sc#1 ] ] with [ zp ZP_WORD:15 [ gen_sintab::sintab#12 ] ] -Coalescing zero page register [ zp ZP_WORD:10 [ clear_screen::sc#2 clear_screen::sc#1 gen_sintab::sintab#12 ] ] with [ zp ZP_WORD:34 [ gen_sprites::spr#2 gen_sprites::spr#1 ] ] -Coalescing zero page register [ zp ZP_WORD:10 [ clear_screen::sc#2 clear_screen::sc#1 gen_sintab::sintab#12 gen_sprites::spr#2 gen_sprites::spr#1 ] ] with [ zp ZP_WORD:50 [ anim::x#0 ] ] -Coalescing zero page register [ zp ZP_WORD:19 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 ] ] with [ zp ZP_WORD:43 [ gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 ] ] with [ zp ZP_WORD:23 [ prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 ] ] with [ zp ZP_WORD:25 [ mulFACbyMEM::mem#2 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 ] ] with [ zp ZP_WORD:27 [ divMEMbyFAC::mem#2 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 ] ] with [ zp ZP_WORD:29 [ setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 ] ] Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 ] ] with [ zp ZP_WORD:31 [ setMEMtoFAC::mem#5 ] ] -Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 ] ] with [ zp ZP_WORD:55 [ getFAC::return#2 ] ] -Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 getFAC::return#2 ] ] with [ zp ZP_WORD:57 [ gen_sintab::$23 ] ] -Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 getFAC::return#2 gen_sintab::$23 ] ] with [ zp ZP_WORD:60 [ getFAC::return#0 ] ] -Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 getFAC::return#2 gen_sintab::$23 getFAC::return#0 ] ] with [ zp ZP_WORD:65 [ gen_chargen_sprite::$0 ] ] -Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 getFAC::return#2 gen_sintab::$23 getFAC::return#0 gen_chargen_sprite::$0 ] ] with [ zp ZP_WORD:67 [ gen_chargen_sprite::$1 ] ] -Coalescing zero page register [ zp ZP_WORD:21 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 getFAC::return#2 gen_sintab::$23 getFAC::return#0 gen_chargen_sprite::$0 gen_chargen_sprite::$1 ] ] with [ zp ZP_WORD:69 [ gen_chargen_sprite::chargen#0 ] ] -Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:6 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 gen_chargen_sprite::c#3 ] -Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:7 [ anim::j#2 anim::j#1 gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] -Allocated (was zp ZP_WORD:10) zp ZP_WORD:8 [ clear_screen::sc#2 clear_screen::sc#1 gen_sintab::sintab#12 gen_sprites::spr#2 gen_sprites::spr#1 anim::x#0 ] -Allocated (was zp ZP_WORD:19) zp ZP_WORD:10 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] -Allocated (was zp ZP_WORD:21) zp ZP_WORD:12 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 getFAC::return#2 gen_sintab::$23 getFAC::return#0 gen_chargen_sprite::$0 gen_chargen_sprite::$1 gen_chargen_sprite::chargen#0 ] +Coalescing zero page register [ zp ZP_WORD:55 [ getFAC::return#2 ] ] with [ zp ZP_WORD:57 [ gen_sintab::$23 ] ] +Coalescing zero page register [ zp ZP_WORD:55 [ getFAC::return#2 gen_sintab::$23 ] ] with [ zp ZP_WORD:60 [ getFAC::return#0 ] ] +Coalescing zero page register [ zp ZP_WORD:65 [ gen_chargen_sprite::$0 ] ] with [ zp ZP_WORD:67 [ gen_chargen_sprite::$1 ] ] +Coalescing zero page register [ zp ZP_WORD:65 [ gen_chargen_sprite::$0 gen_chargen_sprite::$1 ] ] with [ zp ZP_WORD:69 [ gen_chargen_sprite::chargen#0 ] ] +Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:6 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ] +Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:7 [ anim::j#2 anim::j#1 ] +Allocated (was zp ZP_WORD:10) zp ZP_WORD:8 [ clear_screen::sc#2 clear_screen::sc#1 ] +Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:10 [ gen_sintab::min#2 ] +Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:11 [ gen_sintab::length#10 ] +Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ gen_sintab::sintab#12 ] +Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:14 [ gen_sintab::i#10 gen_sintab::i#1 ] +Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:15 [ progress_idx#34 progress_idx#12 progress_idx#10 ] +Allocated (was zp ZP_WORD:19) zp ZP_WORD:16 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 ] +Allocated (was zp ZP_WORD:21) zp ZP_WORD:18 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 ] +Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:20 [ gen_sprites::i#2 gen_sprites::i#1 ] +Allocated (was zp ZP_WORD:34) zp ZP_WORD:21 [ gen_sprites::spr#2 gen_sprites::spr#1 ] +Allocated (was zp ZP_BYTE:36) zp ZP_BYTE:23 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ] +Allocated (was zp ZP_BYTE:37) zp ZP_BYTE:24 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ] +Allocated (was zp ZP_BYTE:38) zp ZP_BYTE:25 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ] +Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:26 [ gen_chargen_sprite::c#3 ] +Allocated (was zp ZP_BYTE:40) zp ZP_BYTE:27 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] +Allocated (was zp ZP_WORD:43) zp ZP_WORD:28 [ gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] +Allocated (was zp ZP_BYTE:45) zp ZP_BYTE:30 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ] +Allocated (was zp ZP_BYTE:47) zp ZP_BYTE:31 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ] +Allocated (was zp ZP_BYTE:49) zp ZP_BYTE:32 [ place_sprites::col#2 place_sprites::col#1 ] +Allocated (was zp ZP_WORD:50) zp ZP_WORD:33 [ anim::x#0 ] +Allocated (was zp ZP_WORD:55) zp ZP_WORD:35 [ getFAC::return#2 gen_sintab::$23 getFAC::return#0 ] +Allocated (was zp ZP_WORD:65) zp ZP_WORD:37 [ gen_chargen_sprite::$0 gen_chargen_sprite::$1 gen_chargen_sprite::chargen#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -8040,8 +8040,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const sinlen_x = $dd .const sinlen_y = $c5 .label sprites = $2000 - .label progress_idx = 4 - .label progress_cursor = $a + .label progress_idx = $f + .label progress_cursor = $10 .label sin_idx_x = 2 .label sin_idx_y = 3 //SEG2 @begin @@ -8111,7 +8111,7 @@ main: { anim: { .label xidx = 4 .label yidx = 6 - .label x = 8 + .label x = $21 .label x_msb = 5 .label j = 7 //SEG29 [12] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) [ sin_idx_x#13 sin_idx_y#13 ] ( main:2::anim:9 [ sin_idx_x#13 sin_idx_y#13 ] ) -- _deref_pbuc1=_inc__deref_pbuc1 @@ -8464,11 +8464,11 @@ clear_screen: { //SEG154 gen_sintab gen_sintab: { .label f_2pi = $e2e5 - .label _23 = $c - .label i = 2 - .label min = 2 - .label length = 3 - .label sintab = 8 + .label _23 = $23 + .label i = $e + .label min = $a + .label length = $b + .label sintab = $c //SEG155 [74] (word) setFAC::w#0 ← ((word)) (byte) gen_sintab::max#2 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 setFAC::w#0 progress_init::line#2 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 setFAC::w#0 progress_init::line#2 ] main:2::init:5::gen_sintab:63 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 setFAC::w#0 progress_init::line#2 ] ) -- vwuz1=_word_vbuxx txa sta setFAC.w @@ -8734,12 +8734,12 @@ gen_sintab: { //SEG254 [115] call getFAC param-assignment [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#0 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#0 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#0 ] ) jsr getFAC //SEG255 [116] (word) getFAC::return#2 ← (word) getFAC::return#0 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#2 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#2 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#2 ] ) - // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:12 + // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:35 jmp b22 //SEG256 gen_sintab::@22 b22: //SEG257 [117] (word~) gen_sintab::$23 ← (word) getFAC::return#2 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$23 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$23 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$23 ] ) - // (word~) gen_sintab::$23 = (word) getFAC::return#2 // register copy zp ZP_WORD:12 + // (word~) gen_sintab::$23 = (word) getFAC::return#2 // register copy zp ZP_WORD:35 //SEG258 [118] (byte~) gen_sintab::$24 ← ((byte)) (word~) gen_sintab::$23 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$24 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$24 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$24 ] ) -- vbuaa=_byte_vwuz1 lda _23 //SEG259 [119] *((byte*) gen_sintab::sintab#12 + (byte) gen_sintab::i#10) ← (byte~) gen_sintab::$24 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) -- pbuz1_derefidx_vbuz2=vbuaa @@ -8813,7 +8813,7 @@ progress_inc: { } //SEG282 getFAC getFAC: { - .label return = $c + .label return = $23 //SEG283 asm { jsr$b1aa sty$fe sta$ff } jsr $b1aa sty $fe @@ -8831,9 +8831,9 @@ getFAC: { } //SEG287 addMEMtoFAC addMEMtoFAC: { - .label mem = $c + .label mem = $12 //SEG288 [135] (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#2 [ prepareMEM::mem#2 ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#2 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#2 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#2 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#2 ] ) - // (byte*) prepareMEM::mem#2 = (byte*) addMEMtoFAC::mem#2 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#2 = (byte*) addMEMtoFAC::mem#2 // register copy zp ZP_WORD:18 //SEG289 [136] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG290 [139] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] prepareMEM_from_addMEMtoFAC: @@ -8854,7 +8854,7 @@ addMEMtoFAC: { } //SEG296 prepareMEM prepareMEM: { - .label mem = $c + .label mem = $12 //SEG297 [140] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] ) -- vbuaa=_lo_pbuz1 lda mem //SEG298 [141] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] ) -- _deref_pbuc1=vbuaa @@ -8871,9 +8871,9 @@ prepareMEM: { } //SEG303 mulFACbyMEM mulFACbyMEM: { - .label mem = $c + .label mem = $12 //SEG304 [146] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::init:5::gen_sintab:59::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] ) - // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_WORD:18 //SEG305 [147] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG306 [139] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM] prepareMEM_from_mulFACbyMEM: @@ -8904,9 +8904,9 @@ sinFAC: { } //SEG316 divMEMbyFAC divMEMbyFAC: { - .label mem = $c + .label mem = $12 //SEG317 [153] (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#2 [ prepareMEM::mem#3 ] ( main:2::init:5::gen_sintab:59::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#3 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#3 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#3 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#3 ] ) - // (byte*) prepareMEM::mem#3 = (byte*) divMEMbyFAC::mem#2 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#3 = (byte*) divMEMbyFAC::mem#2 // register copy zp ZP_WORD:18 //SEG318 [154] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG319 [139] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] prepareMEM_from_divMEMbyFAC: @@ -8927,9 +8927,9 @@ divMEMbyFAC: { } //SEG325 setFAC setFAC: { - .label w = $c + .label w = $12 //SEG326 [158] (byte*~) prepareMEM::mem#9 ← (byte*)(word) setFAC::w#5 [ prepareMEM::mem#9 ] ( main:2::init:5::gen_sintab:59::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] ) - // (byte*~) prepareMEM::mem#9 = (byte*)(word) setFAC::w#5 // register copy zp ZP_WORD:12 + // (byte*~) prepareMEM::mem#9 = (byte*)(word) setFAC::w#5 // register copy zp ZP_WORD:18 //SEG327 [159] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:59::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG328 [139] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM] prepareMEM_from_setFAC: @@ -8950,9 +8950,9 @@ setFAC: { } //SEG334 setMEMtoFAC setMEMtoFAC: { - .label mem = $c + .label mem = $12 //SEG335 [163] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#5 [ prepareMEM::mem#1 ] ( main:2::init:5::gen_sintab:59::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#1 ] ) - // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#5 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#5 // register copy zp ZP_WORD:18 //SEG336 [164] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG337 [139] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] prepareMEM_from_setMEMtoFAC: @@ -8993,7 +8993,7 @@ setARGtoFAC: { } //SEG351 progress_init progress_init: { - .label line = $a + .label line = $10 jmp breturn //SEG352 progress_init::@return breturn: @@ -9002,8 +9002,8 @@ progress_init: { } //SEG354 gen_sprites gen_sprites: { - .label spr = 8 - .label i = 2 + .label spr = $15 + .label i = $14 //SEG355 [174] phi from gen_sprites to gen_sprites::@1 [phi:gen_sprites->gen_sprites::@1] b1_from_gen_sprites: //SEG356 [174] phi (byte*) gen_sprites::spr#2 = (const byte*) sprites#0 [phi:gen_sprites->gen_sprites::@1#0] -- pbuz1=pbuc1 @@ -9058,15 +9058,15 @@ gen_sprites: { } //SEG371 gen_chargen_sprite gen_chargen_sprite: { - .label _0 = $c - .label _1 = $c - .label sprite = $a - .label chargen = $c - .label bits = 4 - .label s_gen = 7 - .label x = 5 - .label y = 3 - .label c = 6 + .label _0 = $25 + .label _1 = $25 + .label sprite = $1c + .label chargen = $25 + .label bits = $18 + .label s_gen = $1b + .label x = $19 + .label y = $17 + .label c = $1a //SEG372 [182] (word~) gen_chargen_sprite::$0 ← ((word)) (byte) gen_chargen_sprite::ch#0 [ gen_chargen_sprite::sprite#0 gen_chargen_sprite::$0 ] ( main:2::init:5::gen_sprites:55::gen_chargen_sprite:177 [ gen_sprites::i#2 gen_sprites::spr#2 gen_chargen_sprite::sprite#0 gen_chargen_sprite::$0 ] ) -- vwuz1=_word_vbuyy tya sta _0 @@ -9273,9 +9273,9 @@ gen_chargen_sprite: { //SEG451 place_sprites place_sprites: { .label sprites_ptr = SCREEN+$3f8 - .label spr_id = 2 - .label spr_x = 3 - .label col = 4 + .label spr_id = $1e + .label spr_x = $1f + .label col = $20 //SEG452 [215] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 127 [ ] ( main:2::init:5::place_sprites:53 [ ] ) -- _deref_pbuc1=vbuc2 lda #$7f sta SPRITES_ENABLE @@ -9704,7 +9704,7 @@ FINAL SYMBOL TABLE (label) addMEMtoFAC::@1 (label) addMEMtoFAC::@return (byte*) addMEMtoFAC::mem -(byte*) addMEMtoFAC::mem#2 mem zp ZP_WORD:12 2.0 +(byte*) addMEMtoFAC::mem#2 mem zp ZP_WORD:18 2.0 (void()) anim() (byte~) anim::$2 reg byte a 101.0 (byte~) anim::$3 reg byte alu 202.0 @@ -9727,7 +9727,7 @@ FINAL SYMBOL TABLE (byte) anim::j2#1 reg byte x 67.33333333333333 (byte) anim::j2#2 reg byte x 25.25 (word) anim::x -(word) anim::x#0 x zp ZP_WORD:8 75.75 +(word) anim::x#0 x zp ZP_WORD:33 75.75 (byte) anim::x_msb (byte) anim::x_msb#1 x_msb zp ZP_BYTE:5 13.6 (byte) anim::x_msb#2 x_msb zp ZP_BYTE:5 101.0 @@ -9753,10 +9753,10 @@ FINAL SYMBOL TABLE (label) divMEMbyFAC::@1 (label) divMEMbyFAC::@return (byte*) divMEMbyFAC::mem -(byte*) divMEMbyFAC::mem#2 mem zp ZP_WORD:12 2.0 +(byte*) divMEMbyFAC::mem#2 mem zp ZP_WORD:18 2.0 (void()) gen_chargen_sprite((byte) gen_chargen_sprite::ch , (byte*) gen_chargen_sprite::sprite) -(word~) gen_chargen_sprite::$0 $0 zp ZP_WORD:12 4.0 -(word~) gen_chargen_sprite::$1 $1 zp ZP_WORD:12 4.0 +(word~) gen_chargen_sprite::$0 $0 zp ZP_WORD:37 4.0 +(word~) gen_chargen_sprite::$1 $1 zp ZP_WORD:37 4.0 (byte~) gen_chargen_sprite::$3 reg byte a 2002.0 (byte~) gen_chargen_sprite::$6 reg byte a 20002.0 (label) gen_chargen_sprite::@1 @@ -9774,41 +9774,41 @@ FINAL SYMBOL TABLE (byte) gen_chargen_sprite::b#1 reg byte x 15001.5 (byte) gen_chargen_sprite::b#2 reg byte x 2000.2 (byte) gen_chargen_sprite::bits -(byte) gen_chargen_sprite::bits#0 bits zp ZP_BYTE:4 202.0 -(byte) gen_chargen_sprite::bits#1 bits zp ZP_BYTE:4 667.3333333333334 -(byte) gen_chargen_sprite::bits#2 bits zp ZP_BYTE:4 182.58823529411765 +(byte) gen_chargen_sprite::bits#0 bits zp ZP_BYTE:24 202.0 +(byte) gen_chargen_sprite::bits#1 bits zp ZP_BYTE:24 667.3333333333334 +(byte) gen_chargen_sprite::bits#2 bits zp ZP_BYTE:24 182.58823529411765 (byte) gen_chargen_sprite::c -(byte) gen_chargen_sprite::c#3 c zp ZP_BYTE:6 769.3076923076923 +(byte) gen_chargen_sprite::c#3 c zp ZP_BYTE:26 769.3076923076923 (byte) gen_chargen_sprite::ch (byte) gen_chargen_sprite::ch#0 reg byte y 6.5 (byte*) gen_chargen_sprite::chargen -(byte*) gen_chargen_sprite::chargen#0 chargen zp ZP_WORD:12 3.678571428571429 +(byte*) gen_chargen_sprite::chargen#0 chargen zp ZP_WORD:37 3.678571428571429 (byte) gen_chargen_sprite::s_gen -(byte) gen_chargen_sprite::s_gen#1 s_gen zp ZP_BYTE:7 10001.0 -(byte) gen_chargen_sprite::s_gen#3 s_gen zp ZP_BYTE:7 21003.0 -(byte) gen_chargen_sprite::s_gen#5 s_gen zp ZP_BYTE:7 400.4 -(byte) gen_chargen_sprite::s_gen#6 s_gen zp ZP_BYTE:7 3500.5 +(byte) gen_chargen_sprite::s_gen#1 s_gen zp ZP_BYTE:27 10001.0 +(byte) gen_chargen_sprite::s_gen#3 s_gen zp ZP_BYTE:27 21003.0 +(byte) gen_chargen_sprite::s_gen#5 s_gen zp ZP_BYTE:27 400.4 +(byte) gen_chargen_sprite::s_gen#6 s_gen zp ZP_BYTE:27 3500.5 (byte) gen_chargen_sprite::s_gen_cnt (byte) gen_chargen_sprite::s_gen_cnt#1 reg byte y 15001.5 (byte) gen_chargen_sprite::s_gen_cnt#3 reg byte y 7001.0 (byte) gen_chargen_sprite::s_gen_cnt#4 reg byte y 400.4 (byte) gen_chargen_sprite::s_gen_cnt#5 reg byte y 3500.5 (byte*) gen_chargen_sprite::sprite -(byte*) gen_chargen_sprite::sprite#0 sprite zp ZP_WORD:10 2.1666666666666665 -(byte*) gen_chargen_sprite::sprite#1 sprite zp ZP_WORD:10 20002.0 -(byte*) gen_chargen_sprite::sprite#10 sprite zp ZP_WORD:10 420.59999999999997 -(byte*) gen_chargen_sprite::sprite#11 sprite zp ZP_WORD:10 102.0 -(byte*) gen_chargen_sprite::sprite#2 sprite zp ZP_WORD:10 67.33333333333333 -(byte*) gen_chargen_sprite::sprite#3 sprite zp ZP_WORD:10 7625.875 -(byte*) gen_chargen_sprite::sprite#4 sprite zp ZP_WORD:10 5184.166666666666 +(byte*) gen_chargen_sprite::sprite#0 sprite zp ZP_WORD:28 2.1666666666666665 +(byte*) gen_chargen_sprite::sprite#1 sprite zp ZP_WORD:28 20002.0 +(byte*) gen_chargen_sprite::sprite#10 sprite zp ZP_WORD:28 420.59999999999997 +(byte*) gen_chargen_sprite::sprite#11 sprite zp ZP_WORD:28 102.0 +(byte*) gen_chargen_sprite::sprite#2 sprite zp ZP_WORD:28 67.33333333333333 +(byte*) gen_chargen_sprite::sprite#3 sprite zp ZP_WORD:28 7625.875 +(byte*) gen_chargen_sprite::sprite#4 sprite zp ZP_WORD:28 5184.166666666666 (byte) gen_chargen_sprite::x -(byte) gen_chargen_sprite::x#1 x zp ZP_BYTE:5 1501.5 -(byte) gen_chargen_sprite::x#6 x zp ZP_BYTE:5 111.22222222222223 +(byte) gen_chargen_sprite::x#1 x zp ZP_BYTE:25 1501.5 +(byte) gen_chargen_sprite::x#6 x zp ZP_BYTE:25 111.22222222222223 (byte) gen_chargen_sprite::y -(byte) gen_chargen_sprite::y#1 y zp ZP_BYTE:3 151.5 -(byte) gen_chargen_sprite::y#2 y zp ZP_BYTE:3 13.173913043478262 +(byte) gen_chargen_sprite::y#1 y zp ZP_BYTE:23 151.5 +(byte) gen_chargen_sprite::y#2 y zp ZP_BYTE:23 13.173913043478262 (void()) gen_sintab((byte*) gen_sintab::sintab , (byte) gen_sintab::length , (byte) gen_sintab::min , (byte) gen_sintab::max) -(word~) gen_sintab::$23 $23 zp ZP_WORD:12 22.0 +(word~) gen_sintab::$23 $23 zp ZP_WORD:35 22.0 (byte~) gen_sintab::$24 reg byte a 22.0 (label) gen_sintab::@1 (label) gen_sintab::@10 @@ -9841,16 +9841,16 @@ FINAL SYMBOL TABLE (byte[]) gen_sintab::f_min (const byte[]) gen_sintab::f_min#0 f_min = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 } (byte) gen_sintab::i -(byte) gen_sintab::i#1 i zp ZP_BYTE:2 16.5 -(byte) gen_sintab::i#10 i zp ZP_BYTE:2 1.8333333333333333 +(byte) gen_sintab::i#1 i zp ZP_BYTE:14 16.5 +(byte) gen_sintab::i#10 i zp ZP_BYTE:14 1.8333333333333333 (byte) gen_sintab::length -(byte) gen_sintab::length#10 length zp ZP_BYTE:3 0.44 +(byte) gen_sintab::length#10 length zp ZP_BYTE:11 0.44 (byte) gen_sintab::max (byte) gen_sintab::max#2 reg byte x 2.0 (byte) gen_sintab::min -(byte) gen_sintab::min#2 min zp ZP_BYTE:2 0.3333333333333333 +(byte) gen_sintab::min#2 min zp ZP_BYTE:10 0.3333333333333333 (byte*) gen_sintab::sintab -(byte*) gen_sintab::sintab#12 sintab zp ZP_WORD:8 0.22 +(byte*) gen_sintab::sintab#12 sintab zp ZP_WORD:12 0.22 (void()) gen_sprites() (label) gen_sprites::@1 (label) gen_sprites::@3 @@ -9858,16 +9858,16 @@ FINAL SYMBOL TABLE (byte[]) gen_sprites::cml (const string) gen_sprites::cml#0 cml = (string) "camelot" (byte) gen_sprites::i -(byte) gen_sprites::i#1 i zp ZP_BYTE:2 16.5 -(byte) gen_sprites::i#2 i zp ZP_BYTE:2 6.6000000000000005 +(byte) gen_sprites::i#1 i zp ZP_BYTE:20 16.5 +(byte) gen_sprites::i#2 i zp ZP_BYTE:20 6.6000000000000005 (byte*) gen_sprites::spr -(byte*) gen_sprites::spr#1 spr zp ZP_WORD:8 7.333333333333333 -(byte*) gen_sprites::spr#2 spr zp ZP_WORD:8 8.25 +(byte*) gen_sprites::spr#1 spr zp ZP_WORD:21 7.333333333333333 +(byte*) gen_sprites::spr#2 spr zp ZP_WORD:21 8.25 (word()) getFAC() (label) getFAC::@return (word) getFAC::return -(word) getFAC::return#0 return zp ZP_WORD:12 4.333333333333333 -(word) getFAC::return#2 return zp ZP_WORD:12 22.0 +(word) getFAC::return#0 return zp ZP_WORD:35 4.333333333333333 +(word) getFAC::return#2 return zp ZP_WORD:35 22.0 (word) getFAC::w (void()) init() (label) init::@1 @@ -9895,13 +9895,13 @@ FINAL SYMBOL TABLE (label) mulFACbyMEM::@1 (label) mulFACbyMEM::@return (byte*) mulFACbyMEM::mem -(byte*) mulFACbyMEM::mem#2 mem zp ZP_WORD:12 2.0 +(byte*) mulFACbyMEM::mem#2 mem zp ZP_WORD:18 2.0 (void()) place_sprites() (label) place_sprites::@1 (label) place_sprites::@return (byte) place_sprites::col -(byte) place_sprites::col#1 col zp ZP_BYTE:4 4.4 -(byte) place_sprites::col#2 col zp ZP_BYTE:4 4.714285714285714 +(byte) place_sprites::col#1 col zp ZP_BYTE:32 4.4 +(byte) place_sprites::col#2 col zp ZP_BYTE:32 4.714285714285714 (byte) place_sprites::j (byte) place_sprites::j#1 reg byte y 16.5 (byte) place_sprites::j#2 reg byte y 4.4 @@ -9910,11 +9910,11 @@ FINAL SYMBOL TABLE (byte) place_sprites::j2#2 reg byte x 7.333333333333333 (byte) place_sprites::j2#3 reg byte x 5.5 (byte) place_sprites::spr_id -(byte) place_sprites::spr_id#1 spr_id zp ZP_BYTE:2 2.2 -(byte) place_sprites::spr_id#2 spr_id zp ZP_BYTE:2 16.5 +(byte) place_sprites::spr_id#1 spr_id zp ZP_BYTE:30 2.2 +(byte) place_sprites::spr_id#2 spr_id zp ZP_BYTE:30 16.5 (byte) place_sprites::spr_x -(byte) place_sprites::spr_x#1 spr_x zp ZP_BYTE:3 3.6666666666666665 -(byte) place_sprites::spr_x#2 spr_x zp ZP_BYTE:3 5.5 +(byte) place_sprites::spr_x#1 spr_x zp ZP_BYTE:31 3.6666666666666665 +(byte) place_sprites::spr_x#2 spr_x zp ZP_BYTE:31 5.5 (byte*) place_sprites::sprites_ptr (const byte*) place_sprites::sprites_ptr#0 sprites_ptr = (const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1016 (void()) prepareMEM((byte*) prepareMEM::mem) @@ -9922,20 +9922,20 @@ FINAL SYMBOL TABLE (byte~) prepareMEM::$1 reg byte a 4.0 (label) prepareMEM::@return (byte*) prepareMEM::mem -(byte*) prepareMEM::mem#1 mem zp ZP_WORD:12 4.0 -(byte*) prepareMEM::mem#2 mem zp ZP_WORD:12 4.0 -(byte*) prepareMEM::mem#3 mem zp ZP_WORD:12 4.0 -(byte*) prepareMEM::mem#4 mem zp ZP_WORD:12 4.0 -(byte*) prepareMEM::mem#5 mem zp ZP_WORD:12 4.666666666666666 -(byte*~) prepareMEM::mem#9 mem zp ZP_WORD:12 4.0 +(byte*) prepareMEM::mem#1 mem zp ZP_WORD:18 4.0 +(byte*) prepareMEM::mem#2 mem zp ZP_WORD:18 4.0 +(byte*) prepareMEM::mem#3 mem zp ZP_WORD:18 4.0 +(byte*) prepareMEM::mem#4 mem zp ZP_WORD:18 4.0 +(byte*) prepareMEM::mem#5 mem zp ZP_WORD:18 4.666666666666666 +(byte*~) prepareMEM::mem#9 mem zp ZP_WORD:18 4.0 (byte*) progress_cursor -(byte*) progress_cursor#10 progress_cursor zp ZP_WORD:10 4.0 -(byte*) progress_cursor#11 progress_cursor zp ZP_WORD:10 2.8333333333333335 -(byte*) progress_cursor#34 progress_cursor zp ZP_WORD:10 0.7307692307692306 +(byte*) progress_cursor#10 progress_cursor zp ZP_WORD:16 4.0 +(byte*) progress_cursor#11 progress_cursor zp ZP_WORD:16 2.8333333333333335 +(byte*) progress_cursor#34 progress_cursor zp ZP_WORD:16 0.7307692307692306 (byte) progress_idx -(byte) progress_idx#10 progress_idx zp ZP_BYTE:4 3.0 -(byte) progress_idx#12 progress_idx zp ZP_BYTE:4 2.5 -(byte) progress_idx#34 progress_idx zp ZP_BYTE:4 0.5652173913043479 +(byte) progress_idx#10 progress_idx zp ZP_BYTE:15 3.0 +(byte) progress_idx#12 progress_idx zp ZP_BYTE:15 2.5 +(byte) progress_idx#34 progress_idx zp ZP_BYTE:15 0.5652173913043479 (void()) progress_inc() (label) progress_inc::@1 (label) progress_inc::@2 @@ -9945,23 +9945,23 @@ FINAL SYMBOL TABLE (void()) progress_init((byte*) progress_init::line) (label) progress_init::@return (byte*) progress_init::line -(byte*) progress_init::line#2 line zp ZP_WORD:10 0.06666666666666667 +(byte*) progress_init::line#2 line zp ZP_WORD:16 0.06666666666666667 (void()) setARGtoFAC() (label) setARGtoFAC::@return (void()) setFAC((word) setFAC::w) (label) setFAC::@1 (label) setFAC::@return (word) setFAC::w -(word) setFAC::w#0 w zp ZP_WORD:12 4.0 -(word) setFAC::w#1 w zp ZP_WORD:12 4.0 -(word) setFAC::w#3 w zp ZP_WORD:12 22.0 -(word) setFAC::w#4 w zp ZP_WORD:12 22.0 -(word) setFAC::w#5 w zp ZP_WORD:12 26.0 +(word) setFAC::w#0 w zp ZP_WORD:18 4.0 +(word) setFAC::w#1 w zp ZP_WORD:18 4.0 +(word) setFAC::w#3 w zp ZP_WORD:18 22.0 +(word) setFAC::w#4 w zp ZP_WORD:18 22.0 +(word) setFAC::w#5 w zp ZP_WORD:18 26.0 (void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) (label) setMEMtoFAC::@1 (label) setMEMtoFAC::@return (byte*) setMEMtoFAC::mem -(byte*) setMEMtoFAC::mem#5 mem zp ZP_WORD:12 2.0 +(byte*) setMEMtoFAC::mem#5 mem zp ZP_WORD:18 2.0 (void()) sinFAC() (label) sinFAC::@return (byte) sin_idx_x @@ -9985,29 +9985,48 @@ FINAL SYMBOL TABLE (void()) subFACfromARG() (label) subFACfromARG::@return -zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 gen_sintab::min#2 gen_sintab::i#10 gen_sintab::i#1 gen_sprites::i#2 gen_sprites::i#1 place_sprites::spr_id#2 place_sprites::spr_id#1 ] -zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 gen_sintab::length#10 gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 place_sprites::spr_x#2 place_sprites::spr_x#1 ] -zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 progress_idx#34 progress_idx#12 progress_idx#10 gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 place_sprites::col#2 place_sprites::col#1 ] -zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ] +zp ZP_BYTE:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ] +zp ZP_BYTE:3 [ sin_idx_y#13 sin_idx_y#11 sin_idx_y#3 ] +zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ] +zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ] reg byte x [ anim::j2#2 anim::j2#1 ] -zp ZP_BYTE:6 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 gen_chargen_sprite::c#3 ] -zp ZP_BYTE:7 [ anim::j#2 anim::j#1 gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] +zp ZP_BYTE:6 [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ] +zp ZP_BYTE:7 [ anim::j#2 anim::j#1 ] reg byte x [ init::i#2 init::i#1 ] -zp ZP_WORD:8 [ clear_screen::sc#2 clear_screen::sc#1 gen_sintab::sintab#12 gen_sprites::spr#2 gen_sprites::spr#1 anim::x#0 ] +zp ZP_WORD:8 [ clear_screen::sc#2 clear_screen::sc#1 ] reg byte x [ gen_sintab::max#2 ] -zp ZP_WORD:10 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] -zp ZP_WORD:12 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 getFAC::return#2 gen_sintab::$23 getFAC::return#0 gen_chargen_sprite::$0 gen_chargen_sprite::$1 gen_chargen_sprite::chargen#0 ] +zp ZP_BYTE:10 [ gen_sintab::min#2 ] +zp ZP_BYTE:11 [ gen_sintab::length#10 ] +zp ZP_WORD:12 [ gen_sintab::sintab#12 ] +zp ZP_BYTE:14 [ gen_sintab::i#10 gen_sintab::i#1 ] +zp ZP_BYTE:15 [ progress_idx#34 progress_idx#12 progress_idx#10 ] +zp ZP_WORD:16 [ progress_cursor#34 progress_init::line#2 progress_cursor#11 progress_cursor#10 ] +zp ZP_WORD:18 [ addMEMtoFAC::mem#2 prepareMEM::mem#5 prepareMEM::mem#2 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#9 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 ] +zp ZP_BYTE:20 [ gen_sprites::i#2 gen_sprites::i#1 ] +zp ZP_WORD:21 [ gen_sprites::spr#2 gen_sprites::spr#1 ] +zp ZP_BYTE:23 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ] +zp ZP_BYTE:24 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ] +zp ZP_BYTE:25 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ] +zp ZP_BYTE:26 [ gen_chargen_sprite::c#3 ] +zp ZP_BYTE:27 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] reg byte y [ gen_chargen_sprite::s_gen_cnt#3 gen_chargen_sprite::s_gen_cnt#4 gen_chargen_sprite::s_gen_cnt#5 gen_chargen_sprite::s_gen_cnt#1 ] reg byte x [ gen_chargen_sprite::b#2 gen_chargen_sprite::b#1 ] +zp ZP_WORD:28 [ gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] +zp ZP_BYTE:30 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ] reg byte y [ place_sprites::j#2 place_sprites::j#1 ] +zp ZP_BYTE:31 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ] reg byte x [ place_sprites::j2#3 place_sprites::j2#2 ] +zp ZP_BYTE:32 [ place_sprites::col#2 place_sprites::col#1 ] +zp ZP_WORD:33 [ anim::x#0 ] reg byte a [ anim::$2 ] reg byte alu [ anim::$3 ] reg byte a [ anim::$5 ] +zp ZP_WORD:35 [ getFAC::return#2 gen_sintab::$23 getFAC::return#0 ] reg byte a [ gen_sintab::$24 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ] reg byte y [ gen_chargen_sprite::ch#0 ] +zp ZP_WORD:37 [ gen_chargen_sprite::$0 gen_chargen_sprite::$1 gen_chargen_sprite::chargen#0 ] reg byte a [ gen_chargen_sprite::$3 ] reg byte a [ gen_chargen_sprite::$6 ] reg byte x [ place_sprites::j2#1 ] @@ -10039,8 +10058,8 @@ Score: 767890 .const sinlen_x = $dd .const sinlen_y = $c5 .label sprites = $2000 - .label progress_idx = 4 - .label progress_cursor = $a + .label progress_idx = $f + .label progress_cursor = $10 .label sin_idx_x = 2 .label sin_idx_y = 3 //SEG2 @begin @@ -10086,7 +10105,7 @@ main: { anim: { .label xidx = 4 .label yidx = 6 - .label x = 8 + .label x = $21 .label x_msb = 5 .label j = 7 //SEG29 [12] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) [ sin_idx_x#13 sin_idx_y#13 ] ( main:2::anim:9 [ sin_idx_x#13 sin_idx_y#13 ] ) -- _deref_pbuc1=_inc__deref_pbuc1 @@ -10362,11 +10381,11 @@ clear_screen: { //SEG154 gen_sintab gen_sintab: { .label f_2pi = $e2e5 - .label _23 = $c - .label i = 2 - .label min = 2 - .label length = 3 - .label sintab = 8 + .label _23 = $23 + .label i = $e + .label min = $a + .label length = $b + .label sintab = $c //SEG155 [74] (word) setFAC::w#0 ← ((word)) (byte) gen_sintab::max#2 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 setFAC::w#0 progress_init::line#2 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 setFAC::w#0 progress_init::line#2 ] main:2::init:5::gen_sintab:63 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 setFAC::w#0 progress_init::line#2 ] ) -- vwuz1=_word_vbuxx txa sta setFAC.w @@ -10559,10 +10578,10 @@ gen_sintab: { //SEG254 [115] call getFAC param-assignment [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#0 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#0 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#0 ] ) jsr getFAC //SEG255 [116] (word) getFAC::return#2 ← (word) getFAC::return#0 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#2 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#2 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 getFAC::return#2 ] ) - // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:12 + // (word) getFAC::return#2 = (word) getFAC::return#0 // register copy zp ZP_WORD:35 //SEG256 gen_sintab::@22 //SEG257 [117] (word~) gen_sintab::$23 ← (word) getFAC::return#2 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$23 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$23 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$23 ] ) - // (word~) gen_sintab::$23 = (word) getFAC::return#2 // register copy zp ZP_WORD:12 + // (word~) gen_sintab::$23 = (word) getFAC::return#2 // register copy zp ZP_WORD:35 //SEG258 [118] (byte~) gen_sintab::$24 ← ((byte)) (word~) gen_sintab::$23 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$24 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$24 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 gen_sintab::$24 ] ) -- vbuaa=_byte_vwuz1 lda _23 //SEG259 [119] *((byte*) gen_sintab::sintab#12 + (byte) gen_sintab::i#10) ← (byte~) gen_sintab::$24 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ( main:2::init:5::gen_sintab:59 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) -- pbuz1_derefidx_vbuz2=vbuaa @@ -10624,7 +10643,7 @@ progress_inc: { } //SEG282 getFAC getFAC: { - .label return = $c + .label return = $23 //SEG283 asm { jsr$b1aa sty$fe sta$ff } jsr $b1aa sty $fe @@ -10640,9 +10659,9 @@ getFAC: { } //SEG287 addMEMtoFAC addMEMtoFAC: { - .label mem = $c + .label mem = $12 //SEG288 [135] (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#2 [ prepareMEM::mem#2 ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#2 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#2 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#2 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#2 ] ) - // (byte*) prepareMEM::mem#2 = (byte*) addMEMtoFAC::mem#2 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#2 = (byte*) addMEMtoFAC::mem#2 // register copy zp ZP_WORD:18 //SEG289 [136] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG290 [139] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] //SEG291 [139] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#2 [phi:addMEMtoFAC->prepareMEM#0] -- register_copy @@ -10658,7 +10677,7 @@ addMEMtoFAC: { } //SEG296 prepareMEM prepareMEM: { - .label mem = $c + .label mem = $12 //SEG297 [140] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 prepareMEM::$0 ] ) -- vbuaa=_lo_pbuz1 lda mem //SEG298 [141] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::init:5::gen_sintab:59::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:94::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::addMEMtoFAC:113::prepareMEM:136 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111::prepareMEM:147 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107::prepareMEM:154 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:75::prepareMEM:159 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:80::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:88::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:99::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setFAC:105::prepareMEM:159 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103::prepareMEM:164 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#5 ] ) -- _deref_pbuc1=vbuaa @@ -10673,9 +10692,9 @@ prepareMEM: { } //SEG303 mulFACbyMEM mulFACbyMEM: { - .label mem = $c + .label mem = $12 //SEG304 [146] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::init:5::gen_sintab:59::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#4 ] ) - // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#4 = (byte*) mulFACbyMEM::mem#2 // register copy zp ZP_WORD:18 //SEG305 [147] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:101 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:59::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::mulFACbyMEM:111 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG306 [139] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM] //SEG307 [139] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy @@ -10699,9 +10718,9 @@ sinFAC: { } //SEG316 divMEMbyFAC divMEMbyFAC: { - .label mem = $c + .label mem = $12 //SEG317 [153] (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#2 [ prepareMEM::mem#3 ] ( main:2::init:5::gen_sintab:59::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#3 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#3 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#3 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#3 ] ) - // (byte*) prepareMEM::mem#3 = (byte*) divMEMbyFAC::mem#2 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#3 = (byte*) divMEMbyFAC::mem#2 // register copy zp ZP_WORD:18 //SEG318 [154] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:90 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::divMEMbyFAC:107 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG319 [139] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] //SEG320 [139] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#3 [phi:divMEMbyFAC->prepareMEM#0] -- register_copy @@ -10717,9 +10736,9 @@ divMEMbyFAC: { } //SEG325 setFAC setFAC: { - .label w = $c + .label w = $12 //SEG326 [158] (byte*~) prepareMEM::mem#9 ← (byte*)(word) setFAC::w#5 [ prepareMEM::mem#9 ] ( main:2::init:5::gen_sintab:59::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:59::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] main:2::init:5::gen_sintab:63::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#9 ] ) - // (byte*~) prepareMEM::mem#9 = (byte*)(word) setFAC::w#5 // register copy zp ZP_WORD:12 + // (byte*~) prepareMEM::mem#9 = (byte*)(word) setFAC::w#5 // register copy zp ZP_WORD:18 //SEG327 [159] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setFAC:75 [ gen_sintab::min#2 gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setFAC:80 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setFAC:88 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::setFAC:99 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:59::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::setFAC:105 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG328 [139] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM] //SEG329 [139] phi (byte*) prepareMEM::mem#5 = (byte*~) prepareMEM::mem#9 [phi:setFAC->prepareMEM#0] -- register_copy @@ -10735,9 +10754,9 @@ setFAC: { } //SEG334 setMEMtoFAC setMEMtoFAC: { - .label mem = $c + .label mem = $12 //SEG335 [163] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#5 [ prepareMEM::mem#1 ] ( main:2::init:5::gen_sintab:59::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#1 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 prepareMEM::mem#1 ] ) - // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#5 // register copy zp ZP_WORD:12 + // (byte*) prepareMEM::mem#1 = (byte*) setMEMtoFAC::mem#5 // register copy zp ZP_WORD:18 //SEG336 [164] call prepareMEM param-assignment [ ] ( main:2::init:5::gen_sintab:59::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:82 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:86 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:92 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:96 [ gen_sintab::length#10 gen_sintab::sintab#12 progress_init::line#2 ] main:2::init:5::gen_sintab:59::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] main:2::init:5::gen_sintab:63::setMEMtoFAC:103 [ gen_sintab::length#10 gen_sintab::sintab#12 gen_sintab::i#10 progress_idx#34 progress_cursor#34 ] ) //SEG337 [139] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM] //SEG338 [139] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy @@ -10769,15 +10788,15 @@ setARGtoFAC: { } //SEG351 progress_init progress_init: { - .label line = $a + .label line = $10 //SEG352 progress_init::@return //SEG353 [172] return [ progress_init::line#2 ] ( main:2::init:5::progress_init:57 [ progress_init::line#2 ] main:2::init:5::progress_init:61 [ progress_init::line#2 ] ) rts } //SEG354 gen_sprites gen_sprites: { - .label spr = 8 - .label i = 2 + .label spr = $15 + .label i = $14 //SEG355 [174] phi from gen_sprites to gen_sprites::@1 [phi:gen_sprites->gen_sprites::@1] //SEG356 [174] phi (byte*) gen_sprites::spr#2 = (const byte*) sprites#0 [phi:gen_sprites->gen_sprites::@1#0] -- pbuz1=pbuc1 lda #$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.log b/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.log index 04e98acdd..447575ff7 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.log @@ -8850,14 +8850,14 @@ Uplifting [main] best 20013 combination reg byte x [ main::r#59 ] Attempting to uplift remaining variables inzp ZP_BYTE:39 [ main::b#0 ] Uplifting [main] best 20013 combination zp ZP_BYTE:39 [ main::b#0 ] Coalescing zero page register [ zp ZP_BYTE:2 [ main::a#10 main::a#1 ] ] with [ zp ZP_BYTE:26 [ printu::a#20 printu::a#8 printu::a#9 printu::a#10 printu::a#11 printu::a#12 printu::a#13 printu::a#14 printu::a#15 printu::a#16 printu::a#17 printu::a#0 printu::a#18 printu::a#19 printu::a#1 printu::a#2 printu::a#3 printu::a#4 printu::a#5 printu::a#6 printu::a#7 ] ] -Coalescing zero page register [ zp ZP_WORD:24 [ line_cursor#10 line_cursor#20 line_cursor#21 line_cursor#1 ] ] with [ zp ZP_WORD:37 [ print_cls::sc#2 print_cls::sc#1 ] ] Coalescing zero page register [ zp ZP_WORD:27 [ printu::op#20 ] ] with [ zp ZP_WORD:35 [ print_str::str#2 print_str::str#1 print_str::str#0 ] ] -Allocated (was zp ZP_WORD:24) zp ZP_WORD:4 [ line_cursor#10 line_cursor#20 line_cursor#21 line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +Allocated (was zp ZP_WORD:24) zp ZP_WORD:4 [ line_cursor#10 line_cursor#20 line_cursor#21 line_cursor#1 ] Allocated (was zp ZP_WORD:27) zp ZP_WORD:6 [ printu::op#20 print_str::str#2 print_str::str#1 print_str::str#0 ] Allocated (was zp ZP_BYTE:29) zp ZP_BYTE:8 [ printu::b#20 printu::b#8 printu::b#10 printu::b#11 printu::b#12 printu::b#14 printu::b#15 printu::b#16 printu::b#0 printu::b#18 printu::b#19 printu::b#2 printu::b#3 printu::b#4 printu::b#6 printu::b#7 ] Allocated (was zp ZP_WORD:32) zp ZP_WORD:9 [ char_cursor#51 char_cursor#89 char_cursor#90 char_cursor#138 char_cursor#52 char_cursor#142 char_cursor#146 char_cursor#114 char_cursor#137 char_cursor#154 char_cursor#2 char_cursor#1 ] Allocated (was zp ZP_BYTE:34) zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] -Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:12 [ main::b#0 ] +Allocated (was zp ZP_WORD:37) zp ZP_WORD:12 [ print_cls::sc#2 print_cls::sc#1 ] +Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:14 [ main::b#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -8885,7 +8885,7 @@ bend_from_b10: bend: //SEG9 main main: { - .label b = $c + .label b = $e .label a = 2 .label i = 3 //SEG10 [5] call print_cls param-assignment [ ] ( main:2 [ ] ) @@ -10136,7 +10136,7 @@ print_str: { } //SEG513 print_cls print_cls: { - .label sc = 4 + .label sc = $c //SEG514 [201] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] b1_from_print_cls: //SEG515 [201] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 @@ -10544,7 +10544,7 @@ FINAL SYMBOL TABLE (byte) main::a#1 a zp ZP_BYTE:2 5.5 (byte) main::a#10 a zp ZP_BYTE:2 3.860927152317884 (byte) main::b -(byte) main::b#0 b zp ZP_BYTE:12 0.9758064516129035 +(byte) main::b#0 b zp ZP_BYTE:14 0.9758064516129035 (byte[5]) main::cs (const byte[5]) main::cs#0 cs = { (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/word/signed word/dword/signed dword) 199, (byte/signed byte/word/signed word/dword/signed dword) 55, (byte/word/signed word/dword/signed dword) 151, (byte/signed byte/word/signed word/dword/signed dword) 103 } (byte) main::i @@ -10613,8 +10613,8 @@ FINAL SYMBOL TABLE (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:4 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:4 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:12 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:12 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -10719,14 +10719,15 @@ reg byte x [ main::r#56 ] reg byte x [ main::r#57 ] reg byte x [ main::r#58 ] reg byte x [ main::r#59 ] -zp ZP_WORD:4 [ line_cursor#10 line_cursor#20 line_cursor#21 line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:4 [ line_cursor#10 line_cursor#20 line_cursor#21 line_cursor#1 ] zp ZP_WORD:6 [ printu::op#20 print_str::str#2 print_str::str#1 print_str::str#0 ] zp ZP_BYTE:8 [ printu::b#20 printu::b#8 printu::b#10 printu::b#11 printu::b#12 printu::b#14 printu::b#15 printu::b#16 printu::b#0 printu::b#18 printu::b#19 printu::b#2 printu::b#3 printu::b#4 printu::b#6 printu::b#7 ] reg byte x [ printu::res#20 printu::res#8 printu::res#9 printu::res#10 printu::res#11 printu::res#12 printu::res#13 printu::res#14 printu::res#15 printu::res#16 printu::res#17 printu::res#0 printu::res#18 printu::res#19 printu::res#1 printu::res#2 printu::res#3 printu::res#4 printu::res#5 printu::res#6 printu::res#7 ] reg byte a [ print_char::ch#5 print_char::ch#0 print_char::ch#1 print_char::ch#4 ] zp ZP_WORD:9 [ char_cursor#51 char_cursor#89 char_cursor#90 char_cursor#138 char_cursor#52 char_cursor#142 char_cursor#146 char_cursor#114 char_cursor#137 char_cursor#154 char_cursor#2 char_cursor#1 ] zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] -zp ZP_BYTE:12 [ main::b#0 ] +zp ZP_WORD:12 [ print_cls::sc#2 print_cls::sc#1 ] +zp ZP_BYTE:14 [ main::b#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] @@ -10751,7 +10752,7 @@ Score: 15772 //SEG8 @end //SEG9 main main: { - .label b = $c + .label b = $e .label a = 2 .label i = 3 //SEG10 [5] call print_cls param-assignment [ ] ( main:2 [ ] ) @@ -11776,7 +11777,7 @@ print_str: { } //SEG513 print_cls print_cls: { - .label sc = 4 + .label sc = $c //SEG514 [201] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] //SEG515 [201] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 lda #<$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.sym b/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.sym index a8900680e..fb040efee 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-comparisons.sym @@ -93,7 +93,7 @@ (byte) main::a#1 a zp ZP_BYTE:2 5.5 (byte) main::a#10 a zp ZP_BYTE:2 3.860927152317884 (byte) main::b -(byte) main::b#0 b zp ZP_BYTE:12 0.9758064516129035 +(byte) main::b#0 b zp ZP_BYTE:14 0.9758064516129035 (byte[5]) main::cs (const byte[5]) main::cs#0 cs = { (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/word/signed word/dword/signed dword) 199, (byte/signed byte/word/signed word/dword/signed dword) 55, (byte/word/signed word/dword/signed dword) 151, (byte/signed byte/word/signed word/dword/signed dword) 103 } (byte) main::i @@ -162,8 +162,8 @@ (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:4 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:4 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:12 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:12 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -268,13 +268,14 @@ reg byte x [ main::r#56 ] reg byte x [ main::r#57 ] reg byte x [ main::r#58 ] reg byte x [ main::r#59 ] -zp ZP_WORD:4 [ line_cursor#10 line_cursor#20 line_cursor#21 line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:4 [ line_cursor#10 line_cursor#20 line_cursor#21 line_cursor#1 ] zp ZP_WORD:6 [ printu::op#20 print_str::str#2 print_str::str#1 print_str::str#0 ] zp ZP_BYTE:8 [ printu::b#20 printu::b#8 printu::b#10 printu::b#11 printu::b#12 printu::b#14 printu::b#15 printu::b#16 printu::b#0 printu::b#18 printu::b#19 printu::b#2 printu::b#3 printu::b#4 printu::b#6 printu::b#7 ] reg byte x [ printu::res#20 printu::res#8 printu::res#9 printu::res#10 printu::res#11 printu::res#12 printu::res#13 printu::res#14 printu::res#15 printu::res#16 printu::res#17 printu::res#0 printu::res#18 printu::res#19 printu::res#1 printu::res#2 printu::res#3 printu::res#4 printu::res#5 printu::res#6 printu::res#7 ] reg byte a [ print_char::ch#5 print_char::ch#0 print_char::ch#1 print_char::ch#4 ] zp ZP_WORD:9 [ char_cursor#51 char_cursor#89 char_cursor#90 char_cursor#138 char_cursor#52 char_cursor#142 char_cursor#146 char_cursor#114 char_cursor#137 char_cursor#154 char_cursor#2 char_cursor#1 ] zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] -zp ZP_BYTE:12 [ main::b#0 ] +zp ZP_WORD:12 [ print_cls::sc#2 print_cls::sc#1 ] +zp ZP_BYTE:14 [ main::b#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.asm b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.asm index 0e669c616..f9fb89ce7 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.asm @@ -2,7 +2,7 @@ :BasicUpstart(main) .pc = $80d "Program" .label BGCOL = $d021 - .label char_cursor = 8 + .label char_cursor = $a .label line_cursor = 4 jsr main main: { @@ -18,7 +18,7 @@ main: { } signed_multiply_results_compare: { .label ms = 8 - .label ma = 6 + .label ma = $c .label b = 3 .label a = 2 lda #-$80 @@ -29,10 +29,6 @@ signed_multiply_results_compare: { b2: ldx b jsr slow_signed_multiply - lda slow_signed_multiply.return - sta ms - lda slow_signed_multiply.return+1 - sta ms+1 ldy a jsr signed_multiply lda ms @@ -45,16 +41,6 @@ signed_multiply_results_compare: { lda #2 sta BGCOL ldx a - lda b - sta signed_multiply_error.b - lda ms - sta signed_multiply_error.ms - lda ms+1 - sta signed_multiply_error.ms+1 - lda ma - sta signed_multiply_error.ma - lda ma+1 - sta signed_multiply_error.ma+1 jsr signed_multiply_error breturn: rts @@ -122,8 +108,8 @@ print_str: { jmp b1 } signed_multiply_error: { - .label b = 2 - .label ms = $a + .label b = 3 + .label ms = 8 .label ma = $c lda line_cursor sta char_cursor @@ -147,10 +133,6 @@ signed_multiply_error: { lda #>str2 sta print_str.str+1 jsr print_str - lda ms - sta print_sword.w - lda ms+1 - sta print_sword.w+1 jsr print_sword lda #str2 sta print_str.str+1 jsr print_str - lda ms - sta print_word.w - lda ms+1 - sta print_word.w+1 jsr print_word lda #asm_mul_sqr1_lo @@ -510,10 +478,6 @@ multiply_tables_compare: { lda #>str sta print_str.str+1 jsr print_str - lda asm_sqr - sta print_word.w - lda asm_sqr+1 - sta print_word.w+1 jsr print_word lda #$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.log b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.log index 7265fbc19..20b06c1c7 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.log @@ -8371,43 +8371,42 @@ Attempting to uplift remaining variables inzp ZP_BYTE:63 [ signed_multiply_error Uplifting [signed_multiply_error] best 202850 combination zp ZP_BYTE:63 [ signed_multiply_error::b#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:89 [ multiply_error::b#0 ] Uplifting [multiply_error] best 202850 combination zp ZP_BYTE:89 [ multiply_error::b#0 ] -Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 ] ] with [ zp ZP_BYTE:25 [ multiply_results_compare::a#6 multiply_results_compare::a#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 ] ] with [ zp ZP_BYTE:39 [ init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 ] ] with [ zp ZP_BYTE:47 [ init_multiply::dir#2 init_multiply::dir#3 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 init_multiply::dir#2 init_multiply::dir#3 ] ] with [ zp ZP_BYTE:50 [ slow_signed_multiply::a#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 init_multiply::dir#2 init_multiply::dir#3 slow_signed_multiply::a#0 ] ] with [ zp ZP_BYTE:63 [ signed_multiply_error::b#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 init_multiply::dir#2 init_multiply::dir#3 slow_signed_multiply::a#0 signed_multiply_error::b#0 ] ] with [ zp ZP_BYTE:78 [ slow_multiply::a#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 init_multiply::dir#2 init_multiply::dir#3 slow_signed_multiply::a#0 signed_multiply_error::b#0 slow_multiply::a#0 ] ] with [ zp ZP_BYTE:89 [ multiply_error::b#0 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 ] ] with [ zp ZP_BYTE:26 [ multiply_results_compare::b#2 multiply_results_compare::b#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 multiply_results_compare::b#2 multiply_results_compare::b#1 ] ] with [ zp ZP_BYTE:57 [ signed_multiply::b#0 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 ] ] with [ zp ZP_WORD:30 [ multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 ] ] with [ zp ZP_WORD:35 [ init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 ] ] with [ zp ZP_WORD:43 [ init_multiply::sqr2_lo#2 init_multiply::sqr2_lo#1 ] ] -Coalescing zero page register [ zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 init_multiply::sqr2_lo#2 init_multiply::sqr2_lo#1 ] ] with [ zp ZP_WORD:48 [ print_cls::sc#2 print_cls::sc#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 ] ] with [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 ] ] with [ zp ZP_WORD:10 [ print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 ] ] with [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 ] ] with [ zp ZP_WORD:22 [ slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 ] ] with [ zp ZP_WORD:28 [ slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 ] ] with [ zp ZP_WORD:37 [ init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 ] ] with [ zp ZP_WORD:45 [ init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 ] ] with [ zp ZP_WORD:52 [ slow_signed_multiply::return#2 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 ] ] with [ zp ZP_WORD:58 [ signed_multiply::return#2 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 ] ] with [ zp ZP_WORD:60 [ signed_multiply_results_compare::ma#0 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 ] ] with [ zp ZP_WORD:70 [ multiply::return#2 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 multiply::return#2 ] ] with [ zp ZP_WORD:76 [ multiply::return#0 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 multiply::return#2 multiply::return#0 ] ] with [ zp ZP_WORD:80 [ slow_multiply::return#2 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 multiply::return#2 multiply::return#0 slow_multiply::return#2 ] ] with [ zp ZP_WORD:84 [ multiply::return#3 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 multiply::return#2 multiply::return#0 slow_multiply::return#2 multiply::return#3 ] ] with [ zp ZP_WORD:86 [ multiply_results_compare::ma#0 ] ] -Coalescing zero page register [ zp ZP_WORD:14 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 ] ] with [ zp ZP_WORD:40 [ init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 ] ] -Coalescing zero page register [ zp ZP_WORD:14 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 ] ] with [ zp ZP_WORD:54 [ signed_multiply_results_compare::ms#0 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 ] ] with [ zp ZP_WORD:64 [ signed_multiply_error::ms#0 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 ] ] with [ zp ZP_WORD:82 [ multiply_results_compare::ms#0 ] ] -Coalescing zero page register [ zp ZP_WORD:32 [ multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 multiply_results_compare::ms#0 ] ] with [ zp ZP_WORD:90 [ multiply_error::ms#0 ] ] -Coalescing zero page register [ zp ZP_WORD:66 [ signed_multiply_error::ma#0 ] ] with [ zp ZP_WORD:92 [ multiply_error::ma#0 ] ] -Allocated (was zp ZP_WORD:14) zp ZP_WORD:8 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 signed_multiply_results_compare::ms#0 ] -Allocated (was zp ZP_WORD:32) zp ZP_WORD:10 [ multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 multiply_results_compare::ms#0 multiply_error::ms#0 ] -Allocated (was zp ZP_WORD:66) zp ZP_WORD:12 [ signed_multiply_error::ma#0 multiply_error::ma#0 ] +Coalescing zero page register [ zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 ] ] with [ zp ZP_BYTE:50 [ slow_signed_multiply::a#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 ] ] with [ zp ZP_BYTE:57 [ signed_multiply::b#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 signed_multiply::b#0 ] ] with [ zp ZP_BYTE:63 [ signed_multiply_error::b#0 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 ] ] with [ zp ZP_WORD:10 [ print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 ] ] with [ zp ZP_WORD:32 [ multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 ] ] with [ zp ZP_WORD:64 [ signed_multiply_error::ms#0 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 ] ] with [ zp ZP_WORD:54 [ signed_multiply_results_compare::ms#0 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 ] ] with [ zp ZP_WORD:52 [ slow_signed_multiply::return#2 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 slow_signed_multiply::return#2 ] ] with [ zp ZP_WORD:22 [ slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 slow_signed_multiply::return#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 ] ] with [ zp ZP_WORD:90 [ multiply_error::ms#0 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 slow_signed_multiply::return#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 multiply_error::ms#0 ] ] with [ zp ZP_WORD:82 [ multiply_results_compare::ms#0 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 slow_signed_multiply::return#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 multiply_error::ms#0 multiply_results_compare::ms#0 ] ] with [ zp ZP_WORD:80 [ slow_multiply::return#2 ] ] +Coalescing zero page register [ zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 slow_signed_multiply::return#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 multiply_error::ms#0 multiply_results_compare::ms#0 slow_multiply::return#2 ] ] with [ zp ZP_WORD:28 [ slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 ] ] with [ zp ZP_WORD:58 [ signed_multiply::return#2 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 ] ] with [ zp ZP_WORD:60 [ signed_multiply_results_compare::ma#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 ] ] with [ zp ZP_WORD:66 [ signed_multiply_error::ma#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 ] ] with [ zp ZP_WORD:70 [ multiply::return#2 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 multiply::return#2 ] ] with [ zp ZP_WORD:76 [ multiply::return#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 multiply::return#2 multiply::return#0 ] ] with [ zp ZP_WORD:84 [ multiply::return#3 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 multiply::return#2 multiply::return#0 multiply::return#3 ] ] with [ zp ZP_WORD:86 [ multiply_results_compare::ma#0 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 multiply::return#2 multiply::return#0 multiply::return#3 multiply_results_compare::ma#0 ] ] with [ zp ZP_WORD:92 [ multiply_error::ma#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:25 [ multiply_results_compare::a#6 multiply_results_compare::a#1 ] ] with [ zp ZP_BYTE:78 [ slow_multiply::a#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:26 [ multiply_results_compare::b#2 multiply_results_compare::b#1 ] ] with [ zp ZP_BYTE:89 [ multiply_error::b#0 ] ] +Allocated (was zp ZP_WORD:14) zp ZP_WORD:10 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:12 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 multiply::return#2 multiply::return#0 multiply::return#3 multiply_results_compare::ma#0 multiply_error::ma#0 ] +Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:14 [ multiply_results_compare::a#6 multiply_results_compare::a#1 slow_multiply::a#0 ] +Allocated (was zp ZP_BYTE:26) zp ZP_BYTE:15 [ multiply_results_compare::b#2 multiply_results_compare::b#1 multiply_error::b#0 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:16 [ multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 ] +Allocated (was zp ZP_WORD:35) zp ZP_WORD:18 [ init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 ] +Allocated (was zp ZP_WORD:37) zp ZP_WORD:20 [ init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 ] +Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:22 [ init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 ] +Allocated (was zp ZP_WORD:40) zp ZP_WORD:23 [ init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 ] +Allocated (was zp ZP_WORD:43) zp ZP_WORD:25 [ init_multiply::sqr2_lo#2 init_multiply::sqr2_lo#1 ] +Allocated (was zp ZP_WORD:45) zp ZP_WORD:27 [ init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 ] +Allocated (was zp ZP_BYTE:47) zp ZP_BYTE:29 [ init_multiply::dir#2 init_multiply::dir#3 ] +Allocated (was zp ZP_WORD:48) zp ZP_WORD:30 [ print_cls::sc#2 print_cls::sc#1 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -8416,7 +8415,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" //SEG1 Global Constants & labels .label BGCOL = $d021 - .label char_cursor = 8 + .label char_cursor = $a .label line_cursor = 4 //SEG2 @begin bbegin: @@ -8493,7 +8492,7 @@ main: { //SEG33 signed_multiply_results_compare signed_multiply_results_compare: { .label ms = 8 - .label ma = 6 + .label ma = $c .label b = 3 .label a = 2 //SEG34 [18] phi from signed_multiply_results_compare to signed_multiply_results_compare::@1 [phi:signed_multiply_results_compare->signed_multiply_results_compare::@1] @@ -8527,15 +8526,12 @@ signed_multiply_results_compare: { //SEG46 [22] call slow_signed_multiply param-assignment [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#0 line_cursor#1 ] ) jsr slow_signed_multiply //SEG47 [23] (signed word) slow_signed_multiply::return#2 ← (signed word) slow_signed_multiply::return#0 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#2 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#2 line_cursor#1 ] ) - // (signed word) slow_signed_multiply::return#2 = (signed word) slow_signed_multiply::return#0 // register copy zp ZP_WORD:6 + // (signed word) slow_signed_multiply::return#2 = (signed word) slow_signed_multiply::return#0 // register copy zp ZP_WORD:8 jmp b8 //SEG48 signed_multiply_results_compare::@8 b8: - //SEG49 [24] (signed word) signed_multiply_results_compare::ms#0 ← (signed word) slow_signed_multiply::return#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ) -- vwsz1=vwsz2 - lda slow_signed_multiply.return - sta ms - lda slow_signed_multiply.return+1 - sta ms+1 + //SEG49 [24] (signed word) signed_multiply_results_compare::ms#0 ← (signed word) slow_signed_multiply::return#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ) + // (signed word) signed_multiply_results_compare::ms#0 = (signed word) slow_signed_multiply::return#2 // register copy zp ZP_WORD:8 //SEG50 [25] (signed byte) signed_multiply::a#0 ← (signed byte) signed_multiply_results_compare::a#6 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 line_cursor#1 ] ) -- vbsyy=vbsz1 ldy a //SEG51 [26] (signed byte) signed_multiply::b#0 ← (signed byte) signed_multiply_results_compare::b#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 signed_multiply::b#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 signed_multiply::b#0 line_cursor#1 ] ) @@ -8543,12 +8539,12 @@ signed_multiply_results_compare: { //SEG52 [27] call signed_multiply param-assignment [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::m#4 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::m#4 line_cursor#1 ] ) jsr signed_multiply //SEG53 [28] (signed word) signed_multiply::return#2 ← (signed word)(word) signed_multiply::m#4 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::return#2 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::return#2 line_cursor#1 ] ) - // (signed word) signed_multiply::return#2 = (signed word)(word) signed_multiply::m#4 // register copy zp ZP_WORD:6 + // (signed word) signed_multiply::return#2 = (signed word)(word) signed_multiply::m#4 // register copy zp ZP_WORD:12 jmp b9 //SEG54 signed_multiply_results_compare::@9 b9: //SEG55 [29] (signed word) signed_multiply_results_compare::ma#0 ← (signed word) signed_multiply::return#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ) - // (signed word) signed_multiply_results_compare::ma#0 = (signed word) signed_multiply::return#2 // register copy zp ZP_WORD:6 + // (signed word) signed_multiply_results_compare::ma#0 = (signed word) signed_multiply::return#2 // register copy zp ZP_WORD:12 //SEG56 [30] if((signed word) signed_multiply_results_compare::ms#0==(signed word) signed_multiply_results_compare::ma#0) goto signed_multiply_results_compare::@3 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ) -- vwsz1_eq_vwsz2_then_la1 lda ms cmp ma @@ -8565,19 +8561,12 @@ signed_multiply_results_compare: { sta BGCOL //SEG59 [32] (signed byte) signed_multiply_error::a#0 ← (signed byte) signed_multiply_results_compare::a#6 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 line_cursor#1 ] ) -- vbsxx=vbsz1 ldx a - //SEG60 [33] (signed byte) signed_multiply_error::b#0 ← (signed byte) signed_multiply_results_compare::b#2 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ) -- vbsz1=vbsz2 - lda b - sta signed_multiply_error.b - //SEG61 [34] (signed word) signed_multiply_error::ms#0 ← (signed word) signed_multiply_results_compare::ms#0 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ) -- vwsz1=vwsz2 - lda ms - sta signed_multiply_error.ms - lda ms+1 - sta signed_multiply_error.ms+1 - //SEG62 [35] (signed word) signed_multiply_error::ma#0 ← (signed word) signed_multiply_results_compare::ma#0 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ) -- vwsz1=vwsz2 - lda ma - sta signed_multiply_error.ma - lda ma+1 - sta signed_multiply_error.ma+1 + //SEG60 [33] (signed byte) signed_multiply_error::b#0 ← (signed byte) signed_multiply_results_compare::b#2 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ) + // (signed byte) signed_multiply_error::b#0 = (signed byte) signed_multiply_results_compare::b#2 // register copy zp ZP_BYTE:3 + //SEG61 [34] (signed word) signed_multiply_error::ms#0 ← (signed word) signed_multiply_results_compare::ms#0 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ) + // (signed word) signed_multiply_error::ms#0 = (signed word) signed_multiply_results_compare::ms#0 // register copy zp ZP_WORD:8 + //SEG62 [35] (signed word) signed_multiply_error::ma#0 ← (signed word) signed_multiply_results_compare::ma#0 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ) + // (signed word) signed_multiply_error::ma#0 = (signed word) signed_multiply_results_compare::ma#0 // register copy zp ZP_WORD:12 //SEG63 [36] call signed_multiply_error param-assignment [ ] ( main:2::signed_multiply_results_compare:15 [ ] ) jsr signed_multiply_error jmp breturn @@ -8708,8 +8697,8 @@ print_str: { } //SEG104 signed_multiply_error signed_multiply_error: { - .label b = 2 - .label ms = $a + .label b = 3 + .label ms = 8 .label ma = $c //SEG105 [58] (byte*~) char_cursor#172 ← (byte*) line_cursor#1 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 char_cursor#172 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 char_cursor#172 ] ) -- pbuz1=pbuz2 lda line_cursor @@ -8779,11 +8768,8 @@ signed_multiply_error: { jmp b5 //SEG132 signed_multiply_error::@5 b5: - //SEG133 [68] (signed word) print_sword::w#1 ← (signed word) signed_multiply_error::ms#0 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ) -- vwsz1=vwsz2 - lda ms - sta print_sword.w - lda ms+1 - sta print_sword.w+1 + //SEG133 [68] (signed word) print_sword::w#1 ← (signed word) signed_multiply_error::ms#0 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ) + // (signed word) print_sword::w#1 = (signed word) signed_multiply_error::ms#0 // register copy zp ZP_WORD:8 //SEG134 [69] call print_sword param-assignment [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#17 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#17 ] ) //SEG135 [77] phi from signed_multiply_error::@5 to print_sword [phi:signed_multiply_error::@5->print_sword] print_sword_from_b5: @@ -8840,7 +8826,7 @@ signed_multiply_error: { } //SEG156 print_sword print_sword: { - .label w = 6 + .label w = 8 //SEG157 [78] if((signed word) print_sword::w#3>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 [ char_cursor#117 print_sword::w#3 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#3 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73 [ line_cursor#1 char_cursor#117 print_sword::w#3 ] ) -- vwsz1_ge_0_then_la1 lda w+1 bpl b1_from_print_sword @@ -8878,7 +8864,7 @@ print_sword: { //SEG169 print_sword::@1 b1: //SEG170 [83] (word~) print_word::w#11 ← (word)(signed word) print_sword::w#4 [ char_cursor#119 print_word::w#11 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#119 print_word::w#11 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73 [ line_cursor#1 char_cursor#119 print_word::w#11 ] ) - // (word~) print_word::w#11 = (word)(signed word) print_sword::w#4 // register copy zp ZP_WORD:6 + // (word~) print_word::w#11 = (word)(signed word) print_sword::w#4 // register copy zp ZP_WORD:8 //SEG171 [84] call print_word param-assignment [ char_cursor#17 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#17 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73 [ line_cursor#1 char_cursor#17 ] ) //SEG172 [86] phi from print_sword::@1 to print_word [phi:print_sword::@1->print_word] print_word_from_b1: @@ -8893,7 +8879,7 @@ print_sword: { } //SEG177 print_word print_word: { - .label w = 6 + .label w = 8 //SEG178 [87] (byte) print_byte::b#1 ← > (word) print_word::w#5 [ print_word::w#5 char_cursor#123 print_byte::b#1 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69::print_word:84 [ signed_multiply_error::ma#0 line_cursor#1 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73::print_word:84 [ line_cursor#1 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_results_compare:13::multiply_error:166::print_word:187 [ line_cursor#27 multiply_error::ma#0 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_results_compare:13::multiply_error:166::print_word:191 [ line_cursor#27 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_tables_compare:11::print_word:208 [ multiply_tables_compare::kc_sqr#2 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_tables_compare:11::print_word:212 [ print_word::w#5 char_cursor#123 print_byte::b#1 ] ) -- vbuxx=_hi_vwuz1 lda w+1 tax @@ -9026,9 +9012,9 @@ print_sbyte: { } //SEG233 signed_multiply signed_multiply: { - .label m = 6 + .label m = $c .label b = 3 - .label return = 6 + .label return = $c //SEG234 [113] (byte~) multiply::a#4 ← (byte)(signed byte) signed_multiply::a#0 [ signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 ] ) -- vbuaa=vbuyy tya //SEG235 [114] (byte~) multiply::b#4 ← (byte)(signed byte) signed_multiply::b#0 [ signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 multiply::b#4 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 multiply::b#4 ] ) -- vbuxx=vbuz1 @@ -9040,12 +9026,12 @@ signed_multiply: { //SEG239 [129] phi (byte) multiply::a#2 = (byte~) multiply::a#4 [phi:signed_multiply->multiply#1] -- register_copy jsr multiply //SEG240 [116] (word) multiply::return#2 ← (word) multiply::return#0 [ signed_multiply::a#0 signed_multiply::b#0 multiply::return#2 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::return#2 ] ) - // (word) multiply::return#2 = (word) multiply::return#0 // register copy zp ZP_WORD:6 + // (word) multiply::return#2 = (word) multiply::return#0 // register copy zp ZP_WORD:12 jmp b6 //SEG241 signed_multiply::@6 b6: //SEG242 [117] (word) signed_multiply::m#0 ← (word) multiply::return#2 [ signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ) - // (word) signed_multiply::m#0 = (word) multiply::return#2 // register copy zp ZP_WORD:6 + // (word) signed_multiply::m#0 = (word) multiply::return#2 // register copy zp ZP_WORD:12 //SEG243 [118] if((signed byte) signed_multiply::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto signed_multiply::@1 [ signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ) -- vbsyy_ge_0_then_la1 cpy #0 bpl b1_from_b6 @@ -9098,7 +9084,7 @@ signed_multiply: { multiply: { .label memA = $fe .label memB = $ff - .label return = 6 + .label return = $c //SEG262 [130] *((const byte*) multiply::memA#0) ← (byte) multiply::a#2 [ multiply::b#2 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27::multiply:115 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::b#2 ] main:2::multiply_results_compare:13::multiply:157 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply::b#2 ] ) -- _deref_pbuc1=vbuaa sta memA //SEG263 [131] *((const byte*) multiply::memB#0) ← (byte) multiply::b#2 [ ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27::multiply:115 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 ] main:2::multiply_results_compare:13::multiply:157 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- _deref_pbuc1=vbuxx @@ -9135,8 +9121,8 @@ multiply: { } //SEG268 slow_signed_multiply slow_signed_multiply: { - .label m = 6 - .label return = 6 + .label m = 8 + .label return = 8 .label a = 2 //SEG269 [135] if((signed byte) slow_signed_multiply::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto slow_signed_multiply::@1 [ slow_signed_multiply::a#0 slow_signed_multiply::b#0 ] ( main:2::signed_multiply_results_compare:15::slow_signed_multiply:22 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 line_cursor#1 slow_signed_multiply::a#0 slow_signed_multiply::b#0 ] ) -- vbsz1_ge_0_then_la1 lda a @@ -9248,10 +9234,10 @@ slow_signed_multiply: { } //SEG299 multiply_results_compare multiply_results_compare: { - .label ms = $a - .label ma = 6 - .label b = 3 - .label a = 2 + .label ms = 8 + .label ma = $c + .label b = $f + .label a = $e //SEG300 [148] phi from multiply_results_compare to multiply_results_compare::@1 [phi:multiply_results_compare->multiply_results_compare::@1] b1_from_multiply_results_compare: //SEG301 [148] phi (byte) multiply_results_compare::a#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:multiply_results_compare->multiply_results_compare::@1#0] -- vbuz1=vbuc1 @@ -9277,21 +9263,18 @@ multiply_results_compare: { //SEG309 multiply_results_compare::@2 b2: //SEG310 [150] (byte) slow_multiply::a#0 ← (byte) multiply_results_compare::a#6 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 ] ) - // (byte) slow_multiply::a#0 = (byte) multiply_results_compare::a#6 // register copy zp ZP_BYTE:2 + // (byte) slow_multiply::a#0 = (byte) multiply_results_compare::a#6 // register copy zp ZP_BYTE:14 //SEG311 [151] (byte) slow_multiply::b#0 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 slow_multiply::b#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 slow_multiply::b#0 ] ) -- vbuxx=vbuz1 ldx b //SEG312 [152] call slow_multiply param-assignment [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#0 ] ) jsr slow_multiply //SEG313 [153] (word) slow_multiply::return#2 ← (word) slow_multiply::return#0 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#2 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#2 ] ) - // (word) slow_multiply::return#2 = (word) slow_multiply::return#0 // register copy zp ZP_WORD:6 + // (word) slow_multiply::return#2 = (word) slow_multiply::return#0 // register copy zp ZP_WORD:8 jmp b8 //SEG314 multiply_results_compare::@8 b8: - //SEG315 [154] (word) multiply_results_compare::ms#0 ← (word) slow_multiply::return#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- vwuz1=vwuz2 - lda slow_multiply.return - sta ms - lda slow_multiply.return+1 - sta ms+1 + //SEG315 [154] (word) multiply_results_compare::ms#0 ← (word) slow_multiply::return#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) + // (word) multiply_results_compare::ms#0 = (word) slow_multiply::return#2 // register copy zp ZP_WORD:8 //SEG316 [155] (byte) multiply::a#1 ← (byte) multiply_results_compare::a#6 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- vbuaa=vbuz1 lda a //SEG317 [156] (byte) multiply::b#1 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply::b#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply::b#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- vbuxx=vbuz1 @@ -9303,12 +9286,12 @@ multiply_results_compare: { //SEG321 [129] phi (byte) multiply::a#2 = (byte) multiply::a#1 [phi:multiply_results_compare::@8->multiply#1] -- register_copy jsr multiply //SEG322 [158] (word) multiply::return#3 ← (word) multiply::return#0 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply::return#3 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply::return#3 ] ) - // (word) multiply::return#3 = (word) multiply::return#0 // register copy zp ZP_WORD:6 + // (word) multiply::return#3 = (word) multiply::return#0 // register copy zp ZP_WORD:12 jmp b9 //SEG323 multiply_results_compare::@9 b9: //SEG324 [159] (word) multiply_results_compare::ma#0 ← (word) multiply::return#3 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ) - // (word) multiply_results_compare::ma#0 = (word) multiply::return#3 // register copy zp ZP_WORD:6 + // (word) multiply_results_compare::ma#0 = (word) multiply::return#3 // register copy zp ZP_WORD:12 //SEG325 [160] if((word) multiply_results_compare::ms#0==(word) multiply_results_compare::ma#0) goto multiply_results_compare::@3 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ) -- vwuz1_eq_vwuz2_then_la1 lda ms cmp ma @@ -9325,16 +9308,12 @@ multiply_results_compare: { sta BGCOL //SEG328 [162] (byte) multiply_error::a#0 ← (byte) multiply_results_compare::a#6 [ line_cursor#27 char_cursor#27 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 ] ) -- vbuxx=vbuz1 ldx a - //SEG329 [163] (byte) multiply_error::b#0 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ) -- vbuz1=vbuz2 - lda b - sta multiply_error.b + //SEG329 [163] (byte) multiply_error::b#0 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ) + // (byte) multiply_error::b#0 = (byte) multiply_results_compare::b#2 // register copy zp ZP_BYTE:15 //SEG330 [164] (word) multiply_error::ms#0 ← (word) multiply_results_compare::ms#0 [ line_cursor#27 char_cursor#27 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 ] ) - // (word) multiply_error::ms#0 = (word) multiply_results_compare::ms#0 // register copy zp ZP_WORD:10 - //SEG331 [165] (word) multiply_error::ma#0 ← (word) multiply_results_compare::ma#0 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ) -- vwuz1=vwuz2 - lda ma - sta multiply_error.ma - lda ma+1 - sta multiply_error.ma+1 + // (word) multiply_error::ms#0 = (word) multiply_results_compare::ms#0 // register copy zp ZP_WORD:8 + //SEG331 [165] (word) multiply_error::ma#0 ← (word) multiply_results_compare::ma#0 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ) + // (word) multiply_error::ma#0 = (word) multiply_results_compare::ma#0 // register copy zp ZP_WORD:12 //SEG332 [166] call multiply_error param-assignment [ line_cursor#1 ] ( main:2::multiply_results_compare:13 [ line_cursor#1 ] ) //SEG333 [176] phi from multiply_results_compare::@4 to multiply_error [phi:multiply_results_compare::@4->multiply_error] multiply_error_from_b4: @@ -9390,8 +9369,8 @@ multiply_results_compare: { } //SEG354 multiply_error multiply_error: { - .label b = 2 - .label ms = $a + .label b = $f + .label ms = 8 .label ma = $c //SEG355 [177] call print_str param-assignment [ char_cursor#117 line_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#117 line_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ) //SEG356 [51] phi from multiply_error to print_str [phi:multiply_error->print_str] @@ -9458,11 +9437,8 @@ multiply_error: { jmp b5 //SEG383 multiply_error::@5 b5: - //SEG384 [186] (word) print_word::w#3 ← (word) multiply_error::ms#0 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ) -- vwuz1=vwuz2 - lda ms - sta print_word.w - lda ms+1 - sta print_word.w+1 + //SEG384 [186] (word) print_word::w#3 ← (word) multiply_error::ms#0 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ) + // (word) print_word::w#3 = (word) multiply_error::ms#0 // register copy zp ZP_WORD:8 //SEG385 [187] call print_word param-assignment [ char_cursor#17 line_cursor#27 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#17 line_cursor#27 multiply_error::ma#0 ] ) //SEG386 [86] phi from multiply_error::@5 to print_word [phi:multiply_error::@5->print_word] print_word_from_b5: @@ -9521,9 +9497,9 @@ multiply_error: { } //SEG409 slow_multiply slow_multiply: { - .label return = 6 - .label m = 6 - .label a = 2 + .label return = 8 + .label m = 8 + .label a = $e //SEG410 [195] if((byte) slow_multiply::a#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto slow_multiply::@1 [ slow_multiply::a#0 slow_multiply::b#0 ] ( main:2::multiply_results_compare:13::slow_multiply:152 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 slow_multiply::b#0 ] ) -- vbuz1_eq_0_then_la1 lda a beq b1_from_slow_multiply @@ -9579,8 +9555,8 @@ slow_multiply: { } //SEG428 multiply_tables_compare multiply_tables_compare: { - .label asm_sqr = $a - .label kc_sqr = 4 + .label asm_sqr = 8 + .label kc_sqr = $10 //SEG429 [203] phi from multiply_tables_compare to multiply_tables_compare::@1 [phi:multiply_tables_compare->multiply_tables_compare::@1] b1_from_multiply_tables_compare: //SEG430 [203] phi (byte*) multiply_tables_compare::asm_sqr#2 = (const byte[512]) asm_mul_sqr1_lo#0 [phi:multiply_tables_compare->multiply_tables_compare::@1#0] -- pbuz1=pbuc1 @@ -9630,11 +9606,8 @@ multiply_tables_compare: { jmp b6 //SEG443 multiply_tables_compare::@6 b6: - //SEG444 [207] (word~) print_word::w#9 ← (word)(byte*) multiply_tables_compare::asm_sqr#2 [ char_cursor#117 print_word::w#9 multiply_tables_compare::kc_sqr#2 ] ( main:2::multiply_tables_compare:11 [ char_cursor#117 print_word::w#9 multiply_tables_compare::kc_sqr#2 ] ) -- vwuz1=vwuz2 - lda asm_sqr - sta print_word.w - lda asm_sqr+1 - sta print_word.w+1 + //SEG444 [207] (word~) print_word::w#9 ← (word)(byte*) multiply_tables_compare::asm_sqr#2 [ char_cursor#117 print_word::w#9 multiply_tables_compare::kc_sqr#2 ] ( main:2::multiply_tables_compare:11 [ char_cursor#117 print_word::w#9 multiply_tables_compare::kc_sqr#2 ] ) + // (word~) print_word::w#9 = (word)(byte*) multiply_tables_compare::asm_sqr#2 // register copy zp ZP_WORD:8 //SEG445 [208] call print_word param-assignment [ char_cursor#17 multiply_tables_compare::kc_sqr#2 ] ( main:2::multiply_tables_compare:11 [ char_cursor#17 multiply_tables_compare::kc_sqr#2 ] ) //SEG446 [86] phi from multiply_tables_compare::@6 to print_word [phi:multiply_tables_compare::@6->print_word] print_word_from_b6: @@ -9814,13 +9787,13 @@ init_multiply_asm: { } //SEG494 init_multiply init_multiply: { - .label sqr1_hi = 6 - .label sqr = 8 - .label sqr1_lo = 4 - .label x_2 = 2 - .label sqr2_hi = 6 - .label sqr2_lo = 4 - .label dir = 2 + .label sqr1_hi = $14 + .label sqr = $17 + .label sqr1_lo = $12 + .label x_2 = $16 + .label sqr2_hi = $1b + .label sqr2_lo = $19 + .label dir = $1d //SEG495 [230] phi from init_multiply to init_multiply::@1 [phi:init_multiply->init_multiply::@1] b1_from_init_multiply: //SEG496 [230] phi (byte) init_multiply::x_2#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_multiply->init_multiply::@1#0] -- vbuz1=vbuc1 @@ -10009,7 +9982,7 @@ init_multiply: { } //SEG556 print_cls print_cls: { - .label sc = 4 + .label sc = $1e //SEG557 [259] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] b1_from_print_cls: //SEG558 [259] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 @@ -10422,20 +10395,20 @@ FINAL SYMBOL TABLE (byte[512]) asm_mul_sqr2_lo (const byte[512]) asm_mul_sqr2_lo#0 asm_mul_sqr2_lo = { fill( 512, 0) } (byte*) char_cursor -(byte*) char_cursor#1 char_cursor zp ZP_WORD:8 11.0 -(byte*) char_cursor#117 char_cursor zp ZP_WORD:8 1.6944444444444446 -(byte*) char_cursor#118 char_cursor zp ZP_WORD:8 5.25 -(byte*) char_cursor#119 char_cursor zp ZP_WORD:8 3.0 -(byte*) char_cursor#121 char_cursor zp ZP_WORD:8 3.0 -(byte*) char_cursor#123 char_cursor zp ZP_WORD:8 6.0 -(byte*) char_cursor#124 char_cursor zp ZP_WORD:8 3.9999999999999996 -(byte*) char_cursor#135 char_cursor zp ZP_WORD:8 24.0 -(byte*) char_cursor#17 char_cursor zp ZP_WORD:8 0.7894736842105261 -(byte*~) char_cursor#172 char_cursor zp ZP_WORD:8 4.0 -(byte*~) char_cursor#176 char_cursor zp ZP_WORD:8 4.0 -(byte*~) char_cursor#197 char_cursor zp ZP_WORD:8 4.0 -(byte*) char_cursor#27 char_cursor zp ZP_WORD:8 0.27586206896551724 -(byte*) char_cursor#75 char_cursor zp ZP_WORD:8 6.0 +(byte*) char_cursor#1 char_cursor zp ZP_WORD:10 11.0 +(byte*) char_cursor#117 char_cursor zp ZP_WORD:10 1.6944444444444446 +(byte*) char_cursor#118 char_cursor zp ZP_WORD:10 5.25 +(byte*) char_cursor#119 char_cursor zp ZP_WORD:10 3.0 +(byte*) char_cursor#121 char_cursor zp ZP_WORD:10 3.0 +(byte*) char_cursor#123 char_cursor zp ZP_WORD:10 6.0 +(byte*) char_cursor#124 char_cursor zp ZP_WORD:10 3.9999999999999996 +(byte*) char_cursor#135 char_cursor zp ZP_WORD:10 24.0 +(byte*) char_cursor#17 char_cursor zp ZP_WORD:10 0.7894736842105261 +(byte*~) char_cursor#172 char_cursor zp ZP_WORD:10 4.0 +(byte*~) char_cursor#176 char_cursor zp ZP_WORD:10 4.0 +(byte*~) char_cursor#197 char_cursor zp ZP_WORD:10 4.0 +(byte*) char_cursor#27 char_cursor zp ZP_WORD:10 0.27586206896551724 +(byte*) char_cursor#75 char_cursor zp ZP_WORD:10 6.0 (void()) init_multiply() (byte~) init_multiply::$2 reg byte a 22.0 (byte~) init_multiply::$5 reg byte a 22.0 @@ -10452,29 +10425,29 @@ FINAL SYMBOL TABLE (byte) init_multiply::c#1 reg byte x 2.357142857142857 (byte) init_multiply::c#2 reg byte x 22.0 (byte) init_multiply::dir -(byte) init_multiply::dir#2 dir zp ZP_BYTE:2 4.714285714285714 -(byte) init_multiply::dir#3 dir zp ZP_BYTE:2 7.333333333333333 +(byte) init_multiply::dir#2 dir zp ZP_BYTE:29 4.714285714285714 +(byte) init_multiply::dir#3 dir zp ZP_BYTE:29 7.333333333333333 (word) init_multiply::sqr -(word) init_multiply::sqr#1 sqr zp ZP_WORD:8 7.333333333333333 -(word) init_multiply::sqr#2 sqr zp ZP_WORD:8 22.0 -(word) init_multiply::sqr#3 sqr zp ZP_WORD:8 9.166666666666666 -(word) init_multiply::sqr#4 sqr zp ZP_WORD:8 6.6000000000000005 +(word) init_multiply::sqr#1 sqr zp ZP_WORD:23 7.333333333333333 +(word) init_multiply::sqr#2 sqr zp ZP_WORD:23 22.0 +(word) init_multiply::sqr#3 sqr zp ZP_WORD:23 9.166666666666666 +(word) init_multiply::sqr#4 sqr zp ZP_WORD:23 6.6000000000000005 (byte*) init_multiply::sqr1_hi -(byte*) init_multiply::sqr1_hi#1 sqr1_hi zp ZP_WORD:6 5.5 -(byte*) init_multiply::sqr1_hi#2 sqr1_hi zp ZP_WORD:6 3.0 +(byte*) init_multiply::sqr1_hi#1 sqr1_hi zp ZP_WORD:20 5.5 +(byte*) init_multiply::sqr1_hi#2 sqr1_hi zp ZP_WORD:20 3.0 (byte*) init_multiply::sqr1_lo -(byte*) init_multiply::sqr1_lo#1 sqr1_lo zp ZP_WORD:4 16.5 -(byte*) init_multiply::sqr1_lo#2 sqr1_lo zp ZP_WORD:4 2.5384615384615383 +(byte*) init_multiply::sqr1_lo#1 sqr1_lo zp ZP_WORD:18 16.5 +(byte*) init_multiply::sqr1_lo#2 sqr1_lo zp ZP_WORD:18 2.5384615384615383 (byte*) init_multiply::sqr2_hi -(byte*) init_multiply::sqr2_hi#1 sqr2_hi zp ZP_WORD:6 3.142857142857143 -(byte*) init_multiply::sqr2_hi#2 sqr2_hi zp ZP_WORD:6 11.0 +(byte*) init_multiply::sqr2_hi#1 sqr2_hi zp ZP_WORD:27 3.142857142857143 +(byte*) init_multiply::sqr2_hi#2 sqr2_hi zp ZP_WORD:27 11.0 (byte*) init_multiply::sqr2_lo -(byte*) init_multiply::sqr2_lo#1 sqr2_lo zp ZP_WORD:4 16.5 -(byte*) init_multiply::sqr2_lo#2 sqr2_lo zp ZP_WORD:4 4.125 +(byte*) init_multiply::sqr2_lo#1 sqr2_lo zp ZP_WORD:25 16.5 +(byte*) init_multiply::sqr2_lo#2 sqr2_lo zp ZP_WORD:25 4.125 (byte) init_multiply::x_2 -(byte) init_multiply::x_2#1 x_2 zp ZP_BYTE:2 11.0 -(byte) init_multiply::x_2#2 x_2 zp ZP_BYTE:2 4.888888888888889 -(byte) init_multiply::x_2#3 x_2 zp ZP_BYTE:2 8.25 +(byte) init_multiply::x_2#1 x_2 zp ZP_BYTE:22 11.0 +(byte) init_multiply::x_2#2 x_2 zp ZP_BYTE:22 4.888888888888889 +(byte) init_multiply::x_2#3 x_2 zp ZP_BYTE:22 8.25 (byte) init_multiply::x_255 (byte) init_multiply::x_255#1 reg byte x 5.5 (byte) init_multiply::x_255#2 reg byte x 11.0 @@ -10517,9 +10490,9 @@ FINAL SYMBOL TABLE (byte*) multiply::memB (const byte*) multiply::memB#0 memB = ((byte*))(byte/word/signed word/dword/signed dword) 255 (word) multiply::return -(word) multiply::return#0 return zp ZP_WORD:6 26.25 -(word) multiply::return#2 return zp ZP_WORD:6 4.0 -(word) multiply::return#3 return zp ZP_WORD:6 202.0 +(word) multiply::return#0 return zp ZP_WORD:12 26.25 +(word) multiply::return#2 return zp ZP_WORD:12 4.0 +(word) multiply::return#3 return zp ZP_WORD:12 202.0 (void()) multiply_error((byte) multiply_error::a , (byte) multiply_error::b , (word) multiply_error::ms , (word) multiply_error::ma) (label) multiply_error::@1 (label) multiply_error::@2 @@ -10533,11 +10506,11 @@ FINAL SYMBOL TABLE (byte) multiply_error::a (byte) multiply_error::a#0 reg byte x 0.6666666666666666 (byte) multiply_error::b -(byte) multiply_error::b#0 b zp ZP_BYTE:2 0.4444444444444444 +(byte) multiply_error::b#0 b zp ZP_BYTE:15 0.4444444444444444 (word) multiply_error::ma (word) multiply_error::ma#0 ma zp ZP_WORD:12 0.26666666666666666 (word) multiply_error::ms -(word) multiply_error::ms#0 ms zp ZP_WORD:10 0.3333333333333333 +(word) multiply_error::ms#0 ms zp ZP_WORD:8 0.3333333333333333 (const string) multiply_error::str str = (string) "multiply mismatch @" (const string) multiply_error::str1 str1 = (string) "*@" (const string) multiply_error::str2 str2 = (string) " slow:@" @@ -10554,15 +10527,15 @@ FINAL SYMBOL TABLE (label) multiply_results_compare::@9 (label) multiply_results_compare::@return (byte) multiply_results_compare::a -(byte) multiply_results_compare::a#1 a zp ZP_BYTE:2 16.5 -(byte) multiply_results_compare::a#6 a zp ZP_BYTE:2 14.125 +(byte) multiply_results_compare::a#1 a zp ZP_BYTE:14 16.5 +(byte) multiply_results_compare::a#6 a zp ZP_BYTE:14 14.125 (byte) multiply_results_compare::b -(byte) multiply_results_compare::b#1 b zp ZP_BYTE:3 151.5 -(byte) multiply_results_compare::b#2 b zp ZP_BYTE:3 29.0 +(byte) multiply_results_compare::b#1 b zp ZP_BYTE:15 151.5 +(byte) multiply_results_compare::b#2 b zp ZP_BYTE:15 29.0 (word) multiply_results_compare::ma -(word) multiply_results_compare::ma#0 ma zp ZP_WORD:6 34.0 +(word) multiply_results_compare::ma#0 ma zp ZP_WORD:12 34.0 (word) multiply_results_compare::ms -(word) multiply_results_compare::ms#0 ms zp ZP_WORD:10 20.4 +(word) multiply_results_compare::ms#0 ms zp ZP_WORD:8 20.4 (const string) multiply_results_compare::str str = (string) "multiply results match!@" (void()) multiply_tables_compare() (label) multiply_tables_compare::@1 @@ -10575,11 +10548,11 @@ FINAL SYMBOL TABLE (label) multiply_tables_compare::@8 (label) multiply_tables_compare::@return (byte*) multiply_tables_compare::asm_sqr -(byte*) multiply_tables_compare::asm_sqr#1 asm_sqr zp ZP_WORD:10 7.333333333333333 -(byte*) multiply_tables_compare::asm_sqr#2 asm_sqr zp ZP_WORD:10 8.25 +(byte*) multiply_tables_compare::asm_sqr#1 asm_sqr zp ZP_WORD:8 7.333333333333333 +(byte*) multiply_tables_compare::asm_sqr#2 asm_sqr zp ZP_WORD:8 8.25 (byte*) multiply_tables_compare::kc_sqr -(byte*) multiply_tables_compare::kc_sqr#1 kc_sqr zp ZP_WORD:4 16.5 -(byte*) multiply_tables_compare::kc_sqr#2 kc_sqr zp ZP_WORD:4 3.666666666666667 +(byte*) multiply_tables_compare::kc_sqr#1 kc_sqr zp ZP_WORD:16 16.5 +(byte*) multiply_tables_compare::kc_sqr#2 kc_sqr zp ZP_WORD:16 3.666666666666667 (const string) multiply_tables_compare::str str = (string) "multiply table mismatch at @" (const string) multiply_tables_compare::str1 str1 = (string) " / @" (const string) multiply_tables_compare::str2 str2 = (string) "multiply tables match!@" @@ -10607,8 +10580,8 @@ FINAL SYMBOL TABLE (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:4 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:4 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:30 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:30 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -10637,21 +10610,21 @@ FINAL SYMBOL TABLE (label) print_sword::@4 (label) print_sword::@return (signed word) print_sword::w -(signed word) print_sword::w#0 w zp ZP_WORD:6 4.0 -(signed word) print_sword::w#1 w zp ZP_WORD:6 4.0 -(signed word) print_sword::w#2 w zp ZP_WORD:6 4.0 -(signed word) print_sword::w#3 w zp ZP_WORD:6 2.5 -(signed word) print_sword::w#4 w zp ZP_WORD:6 4.0 +(signed word) print_sword::w#0 w zp ZP_WORD:8 4.0 +(signed word) print_sword::w#1 w zp ZP_WORD:8 4.0 +(signed word) print_sword::w#2 w zp ZP_WORD:8 4.0 +(signed word) print_sword::w#3 w zp ZP_WORD:8 2.5 +(signed word) print_sword::w#4 w zp ZP_WORD:8 4.0 (void()) print_word((word) print_word::w) (label) print_word::@1 (label) print_word::@return (word) print_word::w -(word~) print_word::w#10 w zp ZP_WORD:6 4.0 -(word~) print_word::w#11 w zp ZP_WORD:6 4.0 -(word) print_word::w#3 w zp ZP_WORD:6 4.0 -(word) print_word::w#4 w zp ZP_WORD:6 4.0 -(word) print_word::w#5 w zp ZP_WORD:6 4.666666666666666 -(word~) print_word::w#9 w zp ZP_WORD:6 4.0 +(word~) print_word::w#10 w zp ZP_WORD:8 4.0 +(word~) print_word::w#11 w zp ZP_WORD:8 4.0 +(word) print_word::w#3 w zp ZP_WORD:8 4.0 +(word) print_word::w#4 w zp ZP_WORD:8 4.0 +(word) print_word::w#5 w zp ZP_WORD:8 4.666666666666666 +(word~) print_word::w#9 w zp ZP_WORD:8 4.0 (signed word()) signed_multiply((signed byte) signed_multiply::a , (signed byte) signed_multiply::b) (byte~) signed_multiply::$12 reg byte a 4.0 (byte/signed byte/word/signed word/dword/signed dword~) signed_multiply::$16 reg byte a 4.0 @@ -10668,13 +10641,13 @@ FINAL SYMBOL TABLE (signed byte) signed_multiply::b (signed byte) signed_multiply::b#0 b zp ZP_BYTE:3 9.363636363636363 (word) signed_multiply::m -(word) signed_multiply::m#0 m zp ZP_WORD:6 2.0 -(word) signed_multiply::m#1 m zp ZP_WORD:6 4.0 -(word) signed_multiply::m#2 m zp ZP_WORD:6 4.0 -(word) signed_multiply::m#4 m zp ZP_WORD:6 1.3333333333333333 -(word) signed_multiply::m#5 m zp ZP_WORD:6 2.5 +(word) signed_multiply::m#0 m zp ZP_WORD:12 2.0 +(word) signed_multiply::m#1 m zp ZP_WORD:12 4.0 +(word) signed_multiply::m#2 m zp ZP_WORD:12 4.0 +(word) signed_multiply::m#4 m zp ZP_WORD:12 1.3333333333333333 +(word) signed_multiply::m#5 m zp ZP_WORD:12 2.5 (signed word) signed_multiply::return -(signed word) signed_multiply::return#2 return zp ZP_WORD:6 202.0 +(signed word) signed_multiply::return#2 return zp ZP_WORD:12 202.0 (void()) signed_multiply_error((signed byte) signed_multiply_error::a , (signed byte) signed_multiply_error::b , (signed word) signed_multiply_error::ms , (signed word) signed_multiply_error::ma) (label) signed_multiply_error::@1 (label) signed_multiply_error::@2 @@ -10688,11 +10661,11 @@ FINAL SYMBOL TABLE (signed byte) signed_multiply_error::a (signed byte) signed_multiply_error::a#0 reg byte x 0.6666666666666666 (signed byte) signed_multiply_error::b -(signed byte) signed_multiply_error::b#0 b zp ZP_BYTE:2 0.4444444444444444 +(signed byte) signed_multiply_error::b#0 b zp ZP_BYTE:3 0.4444444444444444 (signed word) signed_multiply_error::ma (signed word) signed_multiply_error::ma#0 ma zp ZP_WORD:12 0.26666666666666666 (signed word) signed_multiply_error::ms -(signed word) signed_multiply_error::ms#0 ms zp ZP_WORD:10 0.3333333333333333 +(signed word) signed_multiply_error::ms#0 ms zp ZP_WORD:8 0.3333333333333333 (const string) signed_multiply_error::str str = (string) "signed multiply mismatch @" (const string) signed_multiply_error::str1 str1 = (string) "*@" (const string) signed_multiply_error::str2 str2 = (string) " slow:@" @@ -10715,7 +10688,7 @@ FINAL SYMBOL TABLE (signed byte) signed_multiply_results_compare::b#1 b zp ZP_BYTE:3 151.5 (signed byte) signed_multiply_results_compare::b#2 b zp ZP_BYTE:3 29.0 (signed word) signed_multiply_results_compare::ma -(signed word) signed_multiply_results_compare::ma#0 ma zp ZP_WORD:6 34.0 +(signed word) signed_multiply_results_compare::ma#0 ma zp ZP_WORD:12 34.0 (signed word) signed_multiply_results_compare::ms (signed word) signed_multiply_results_compare::ms#0 ms zp ZP_WORD:8 20.4 (const string) signed_multiply_results_compare::str str = (string) "signed multiply results match!@" @@ -10724,18 +10697,18 @@ FINAL SYMBOL TABLE (label) slow_multiply::@2 (label) slow_multiply::@return (byte) slow_multiply::a -(byte) slow_multiply::a#0 a zp ZP_BYTE:2 157.71428571428572 +(byte) slow_multiply::a#0 a zp ZP_BYTE:14 157.71428571428572 (byte) slow_multiply::b (byte) slow_multiply::b#0 reg byte x 183.66666666666669 (byte) slow_multiply::i (byte) slow_multiply::i#1 reg byte y 1501.5 (byte) slow_multiply::i#2 reg byte y 1001.0 (word) slow_multiply::m -(word) slow_multiply::m#1 m zp ZP_WORD:6 1001.0 -(word) slow_multiply::m#3 m zp ZP_WORD:6 2002.0 +(word) slow_multiply::m#1 m zp ZP_WORD:8 1001.0 +(word) slow_multiply::m#3 m zp ZP_WORD:8 2002.0 (word) slow_multiply::return -(word) slow_multiply::return#0 return zp ZP_WORD:6 367.33333333333337 -(word) slow_multiply::return#2 return zp ZP_WORD:6 202.0 +(word) slow_multiply::return#0 return zp ZP_WORD:8 367.33333333333337 +(word) slow_multiply::return#2 return zp ZP_WORD:8 202.0 (signed word()) slow_signed_multiply((signed byte) slow_signed_multiply::a , (signed byte) slow_signed_multiply::b) (label) slow_signed_multiply::@1 (label) slow_signed_multiply::@2 @@ -10753,34 +10726,45 @@ FINAL SYMBOL TABLE (signed byte) slow_signed_multiply::j#1 reg byte y 1501.5 (signed byte) slow_signed_multiply::j#2 reg byte y 1001.0 (signed word) slow_signed_multiply::m -(signed word) slow_signed_multiply::m#1 m zp ZP_WORD:6 1001.0 -(signed word) slow_signed_multiply::m#2 m zp ZP_WORD:6 1001.0 -(signed word) slow_signed_multiply::m#3 m zp ZP_WORD:6 2002.0 -(signed word) slow_signed_multiply::m#5 m zp ZP_WORD:6 2002.0 +(signed word) slow_signed_multiply::m#1 m zp ZP_WORD:8 1001.0 +(signed word) slow_signed_multiply::m#2 m zp ZP_WORD:8 1001.0 +(signed word) slow_signed_multiply::m#3 m zp ZP_WORD:8 2002.0 +(signed word) slow_signed_multiply::m#5 m zp ZP_WORD:8 2002.0 (signed word) slow_signed_multiply::return -(signed word) slow_signed_multiply::return#0 return zp ZP_WORD:6 701.0 -(signed word) slow_signed_multiply::return#2 return zp ZP_WORD:6 202.0 +(signed word) slow_signed_multiply::return#0 return zp ZP_WORD:8 701.0 +(signed word) slow_signed_multiply::return#2 return zp ZP_WORD:8 202.0 -zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 init_multiply::dir#2 init_multiply::dir#3 slow_signed_multiply::a#0 signed_multiply_error::b#0 slow_multiply::a#0 multiply_error::b#0 ] -zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 multiply_results_compare::b#2 multiply_results_compare::b#1 signed_multiply::b#0 ] -zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 init_multiply::sqr2_lo#2 init_multiply::sqr2_lo#1 print_cls::sc#2 print_cls::sc#1 ] -zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 multiply::return#2 multiply::return#0 slow_multiply::return#2 multiply::return#3 multiply_results_compare::ma#0 ] +zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 slow_signed_multiply::a#0 ] +zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 signed_multiply::b#0 signed_multiply_error::b#0 ] +zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 ] +zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 ] +zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 slow_signed_multiply::return#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 multiply_error::ms#0 multiply_results_compare::ms#0 slow_multiply::return#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 ] reg byte x [ print_byte::b#5 print_byte::b#3 print_byte::b#4 print_byte::b#9 print_byte::b#1 print_byte::b#2 ] reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] -zp ZP_WORD:8 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 signed_multiply_results_compare::ms#0 ] +zp ZP_WORD:10 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 ] reg byte x [ print_sbyte::b#4 print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#0 ] +zp ZP_WORD:12 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 multiply::return#2 multiply::return#0 multiply::return#3 multiply_results_compare::ma#0 multiply_error::ma#0 ] reg byte a [ multiply::a#2 multiply::a#1 multiply::a#4 ] reg byte x [ multiply::b#2 multiply::b#1 multiply::b#4 ] reg byte y [ slow_signed_multiply::i#2 slow_signed_multiply::i#1 ] reg byte y [ slow_signed_multiply::j#2 slow_signed_multiply::j#1 ] +zp ZP_BYTE:14 [ multiply_results_compare::a#6 multiply_results_compare::a#1 slow_multiply::a#0 ] +zp ZP_BYTE:15 [ multiply_results_compare::b#2 multiply_results_compare::b#1 multiply_error::b#0 ] reg byte y [ slow_multiply::i#2 slow_multiply::i#1 ] -zp ZP_WORD:10 [ multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 multiply_results_compare::ms#0 multiply_error::ms#0 ] +zp ZP_WORD:16 [ multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 ] reg byte x [ init_multiply::c#2 init_multiply::c#1 ] +zp ZP_WORD:18 [ init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 ] +zp ZP_WORD:20 [ init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 ] +zp ZP_BYTE:22 [ init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 ] +zp ZP_WORD:23 [ init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 ] reg byte x [ init_multiply::x_255#2 init_multiply::x_255#1 ] +zp ZP_WORD:25 [ init_multiply::sqr2_lo#2 init_multiply::sqr2_lo#1 ] +zp ZP_WORD:27 [ init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 ] +zp ZP_BYTE:29 [ init_multiply::dir#2 init_multiply::dir#3 ] +zp ZP_WORD:30 [ print_cls::sc#2 print_cls::sc#1 ] reg byte x [ slow_signed_multiply::b#0 ] reg byte y [ signed_multiply::a#0 ] reg byte x [ signed_multiply_error::a#0 ] -zp ZP_WORD:12 [ signed_multiply_error::ma#0 multiply_error::ma#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] reg byte a [ signed_multiply::$6 ] @@ -10795,7 +10779,7 @@ reg byte a [ init_multiply::$6 ] FINAL ASSEMBLER -Score: 161070 +Score: 158586 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -10803,7 +10787,7 @@ Score: 161070 .pc = $80d "Program" //SEG1 Global Constants & labels .label BGCOL = $d021 - .label char_cursor = 8 + .label char_cursor = $a .label line_cursor = 4 //SEG2 @begin //SEG3 [1] phi from @begin to @20 [phi:@begin->@20] @@ -10851,7 +10835,7 @@ main: { //SEG33 signed_multiply_results_compare signed_multiply_results_compare: { .label ms = 8 - .label ma = 6 + .label ma = $c .label b = 3 .label a = 2 //SEG34 [18] phi from signed_multiply_results_compare to signed_multiply_results_compare::@1 [phi:signed_multiply_results_compare->signed_multiply_results_compare::@1] @@ -10877,13 +10861,10 @@ signed_multiply_results_compare: { //SEG46 [22] call slow_signed_multiply param-assignment [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#0 line_cursor#1 ] ) jsr slow_signed_multiply //SEG47 [23] (signed word) slow_signed_multiply::return#2 ← (signed word) slow_signed_multiply::return#0 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#2 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 slow_signed_multiply::return#2 line_cursor#1 ] ) - // (signed word) slow_signed_multiply::return#2 = (signed word) slow_signed_multiply::return#0 // register copy zp ZP_WORD:6 + // (signed word) slow_signed_multiply::return#2 = (signed word) slow_signed_multiply::return#0 // register copy zp ZP_WORD:8 //SEG48 signed_multiply_results_compare::@8 - //SEG49 [24] (signed word) signed_multiply_results_compare::ms#0 ← (signed word) slow_signed_multiply::return#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ) -- vwsz1=vwsz2 - lda slow_signed_multiply.return - sta ms - lda slow_signed_multiply.return+1 - sta ms+1 + //SEG49 [24] (signed word) signed_multiply_results_compare::ms#0 ← (signed word) slow_signed_multiply::return#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 ] ) + // (signed word) signed_multiply_results_compare::ms#0 = (signed word) slow_signed_multiply::return#2 // register copy zp ZP_WORD:8 //SEG50 [25] (signed byte) signed_multiply::a#0 ← (signed byte) signed_multiply_results_compare::a#6 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 line_cursor#1 ] ) -- vbsyy=vbsz1 ldy a //SEG51 [26] (signed byte) signed_multiply::b#0 ← (signed byte) signed_multiply_results_compare::b#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 signed_multiply::b#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::a#0 signed_multiply::b#0 line_cursor#1 ] ) @@ -10891,10 +10872,10 @@ signed_multiply_results_compare: { //SEG52 [27] call signed_multiply param-assignment [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::m#4 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::m#4 line_cursor#1 ] ) jsr signed_multiply //SEG53 [28] (signed word) signed_multiply::return#2 ← (signed word)(word) signed_multiply::m#4 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::return#2 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply::return#2 line_cursor#1 ] ) - // (signed word) signed_multiply::return#2 = (signed word)(word) signed_multiply::m#4 // register copy zp ZP_WORD:6 + // (signed word) signed_multiply::return#2 = (signed word)(word) signed_multiply::m#4 // register copy zp ZP_WORD:12 //SEG54 signed_multiply_results_compare::@9 //SEG55 [29] (signed word) signed_multiply_results_compare::ma#0 ← (signed word) signed_multiply::return#2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ) - // (signed word) signed_multiply_results_compare::ma#0 = (signed word) signed_multiply::return#2 // register copy zp ZP_WORD:6 + // (signed word) signed_multiply_results_compare::ma#0 = (signed word) signed_multiply::return#2 // register copy zp ZP_WORD:12 //SEG56 [30] if((signed word) signed_multiply_results_compare::ms#0==(signed word) signed_multiply_results_compare::ma#0) goto signed_multiply_results_compare::@3 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 line_cursor#1 ] ) -- vwsz1_eq_vwsz2_then_la1 lda ms cmp ma @@ -10909,19 +10890,12 @@ signed_multiply_results_compare: { sta BGCOL //SEG59 [32] (signed byte) signed_multiply_error::a#0 ← (signed byte) signed_multiply_results_compare::a#6 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 line_cursor#1 ] ) -- vbsxx=vbsz1 ldx a - //SEG60 [33] (signed byte) signed_multiply_error::b#0 ← (signed byte) signed_multiply_results_compare::b#2 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ) -- vbsz1=vbsz2 - lda b - sta signed_multiply_error.b - //SEG61 [34] (signed word) signed_multiply_error::ms#0 ← (signed word) signed_multiply_results_compare::ms#0 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ) -- vwsz1=vwsz2 - lda ms - sta signed_multiply_error.ms - lda ms+1 - sta signed_multiply_error.ms+1 - //SEG62 [35] (signed word) signed_multiply_error::ma#0 ← (signed word) signed_multiply_results_compare::ma#0 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ) -- vwsz1=vwsz2 - lda ma - sta signed_multiply_error.ma - lda ma+1 - sta signed_multiply_error.ma+1 + //SEG60 [33] (signed byte) signed_multiply_error::b#0 ← (signed byte) signed_multiply_results_compare::b#2 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ms#0 signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 line_cursor#1 ] ) + // (signed byte) signed_multiply_error::b#0 = (signed byte) signed_multiply_results_compare::b#2 // register copy zp ZP_BYTE:3 + //SEG61 [34] (signed word) signed_multiply_error::ms#0 ← (signed word) signed_multiply_results_compare::ms#0 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_results_compare::ma#0 signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 line_cursor#1 ] ) + // (signed word) signed_multiply_error::ms#0 = (signed word) signed_multiply_results_compare::ms#0 // register copy zp ZP_WORD:8 + //SEG62 [35] (signed word) signed_multiply_error::ma#0 ← (signed word) signed_multiply_results_compare::ma#0 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ( main:2::signed_multiply_results_compare:15 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 ] ) + // (signed word) signed_multiply_error::ma#0 = (signed word) signed_multiply_results_compare::ma#0 // register copy zp ZP_WORD:12 //SEG63 [36] call signed_multiply_error param-assignment [ ] ( main:2::signed_multiply_results_compare:15 [ ] ) jsr signed_multiply_error //SEG64 signed_multiply_results_compare::@return @@ -11031,8 +11005,8 @@ print_str: { } //SEG104 signed_multiply_error signed_multiply_error: { - .label b = 2 - .label ms = $a + .label b = 3 + .label ms = 8 .label ma = $c //SEG105 [58] (byte*~) char_cursor#172 ← (byte*) line_cursor#1 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 char_cursor#172 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::a#0 signed_multiply_error::b#0 signed_multiply_error::ms#0 signed_multiply_error::ma#0 line_cursor#1 char_cursor#172 ] ) -- pbuz1=pbuz2 lda line_cursor @@ -11085,11 +11059,8 @@ signed_multiply_error: { sta print_str.str+1 jsr print_str //SEG132 signed_multiply_error::@5 - //SEG133 [68] (signed word) print_sword::w#1 ← (signed word) signed_multiply_error::ms#0 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ) -- vwsz1=vwsz2 - lda ms - sta print_sword.w - lda ms+1 - sta print_sword.w+1 + //SEG133 [68] (signed word) print_sword::w#1 ← (signed word) signed_multiply_error::ms#0 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#1 ] ) + // (signed word) print_sword::w#1 = (signed word) signed_multiply_error::ms#0 // register copy zp ZP_WORD:8 //SEG134 [69] call print_sword param-assignment [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#17 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#17 ] ) //SEG135 [77] phi from signed_multiply_error::@5 to print_sword [phi:signed_multiply_error::@5->print_sword] //SEG136 [77] phi (signed word) print_sword::w#3 = (signed word) print_sword::w#1 [phi:signed_multiply_error::@5->print_sword#0] -- register_copy @@ -11132,7 +11103,7 @@ signed_multiply_error: { } //SEG156 print_sword print_sword: { - .label w = 6 + .label w = 8 //SEG157 [78] if((signed word) print_sword::w#3>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 [ char_cursor#117 print_sword::w#3 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#117 print_sword::w#3 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73 [ line_cursor#1 char_cursor#117 print_sword::w#3 ] ) -- vwsz1_ge_0_then_la1 lda w+1 bpl b1 @@ -11161,7 +11132,7 @@ print_sword: { //SEG169 print_sword::@1 b1: //SEG170 [83] (word~) print_word::w#11 ← (word)(signed word) print_sword::w#4 [ char_cursor#119 print_word::w#11 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#119 print_word::w#11 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73 [ line_cursor#1 char_cursor#119 print_word::w#11 ] ) - // (word~) print_word::w#11 = (word)(signed word) print_sword::w#4 // register copy zp ZP_WORD:6 + // (word~) print_word::w#11 = (word)(signed word) print_sword::w#4 // register copy zp ZP_WORD:8 //SEG171 [84] call print_word param-assignment [ char_cursor#17 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69 [ signed_multiply_error::ma#0 line_cursor#1 char_cursor#17 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73 [ line_cursor#1 char_cursor#17 ] ) //SEG172 [86] phi from print_sword::@1 to print_word [phi:print_sword::@1->print_word] //SEG173 [86] phi (byte*) char_cursor#123 = (byte*) char_cursor#119 [phi:print_sword::@1->print_word#0] -- register_copy @@ -11173,7 +11144,7 @@ print_sword: { } //SEG177 print_word print_word: { - .label w = 6 + .label w = 8 //SEG178 [87] (byte) print_byte::b#1 ← > (word) print_word::w#5 [ print_word::w#5 char_cursor#123 print_byte::b#1 ] ( main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:69::print_word:84 [ signed_multiply_error::ma#0 line_cursor#1 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::signed_multiply_results_compare:15::signed_multiply_error:36::print_sword:73::print_word:84 [ line_cursor#1 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_results_compare:13::multiply_error:166::print_word:187 [ line_cursor#27 multiply_error::ma#0 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_results_compare:13::multiply_error:166::print_word:191 [ line_cursor#27 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_tables_compare:11::print_word:208 [ multiply_tables_compare::kc_sqr#2 print_word::w#5 char_cursor#123 print_byte::b#1 ] main:2::multiply_tables_compare:11::print_word:212 [ print_word::w#5 char_cursor#123 print_byte::b#1 ] ) -- vbuxx=_hi_vwuz1 lda w+1 tax @@ -11280,9 +11251,9 @@ print_sbyte: { } //SEG233 signed_multiply signed_multiply: { - .label m = 6 + .label m = $c .label b = 3 - .label return = 6 + .label return = $c //SEG234 [113] (byte~) multiply::a#4 ← (byte)(signed byte) signed_multiply::a#0 [ signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 ] ) -- vbuaa=vbuyy tya //SEG235 [114] (byte~) multiply::b#4 ← (byte)(signed byte) signed_multiply::b#0 [ signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 multiply::b#4 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::a#4 multiply::b#4 ] ) -- vbuxx=vbuz1 @@ -11293,10 +11264,10 @@ signed_multiply: { //SEG239 [129] phi (byte) multiply::a#2 = (byte~) multiply::a#4 [phi:signed_multiply->multiply#1] -- register_copy jsr multiply //SEG240 [116] (word) multiply::return#2 ← (word) multiply::return#0 [ signed_multiply::a#0 signed_multiply::b#0 multiply::return#2 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::return#2 ] ) - // (word) multiply::return#2 = (word) multiply::return#0 // register copy zp ZP_WORD:6 + // (word) multiply::return#2 = (word) multiply::return#0 // register copy zp ZP_WORD:12 //SEG241 signed_multiply::@6 //SEG242 [117] (word) signed_multiply::m#0 ← (word) multiply::return#2 [ signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ) - // (word) signed_multiply::m#0 = (word) multiply::return#2 // register copy zp ZP_WORD:6 + // (word) signed_multiply::m#0 = (word) multiply::return#2 // register copy zp ZP_WORD:12 //SEG243 [118] if((signed byte) signed_multiply::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto signed_multiply::@1 [ signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 signed_multiply::m#0 ] ) -- vbsyy_ge_0_then_la1 cpy #0 bpl b1 @@ -11337,7 +11308,7 @@ signed_multiply: { multiply: { .label memA = $fe .label memB = $ff - .label return = 6 + .label return = $c //SEG262 [130] *((const byte*) multiply::memA#0) ← (byte) multiply::a#2 [ multiply::b#2 ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27::multiply:115 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 multiply::b#2 ] main:2::multiply_results_compare:13::multiply:157 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply::b#2 ] ) -- _deref_pbuc1=vbuaa sta memA //SEG263 [131] *((const byte*) multiply::memB#0) ← (byte) multiply::b#2 [ ] ( main:2::signed_multiply_results_compare:15::signed_multiply:27::multiply:115 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 signed_multiply_results_compare::ms#0 line_cursor#1 signed_multiply::a#0 signed_multiply::b#0 ] main:2::multiply_results_compare:13::multiply:157 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- _deref_pbuc1=vbuxx @@ -11370,8 +11341,8 @@ multiply: { } //SEG268 slow_signed_multiply slow_signed_multiply: { - .label m = 6 - .label return = 6 + .label m = 8 + .label return = 8 .label a = 2 //SEG269 [135] if((signed byte) slow_signed_multiply::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto slow_signed_multiply::@1 [ slow_signed_multiply::a#0 slow_signed_multiply::b#0 ] ( main:2::signed_multiply_results_compare:15::slow_signed_multiply:22 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::b#2 line_cursor#1 slow_signed_multiply::a#0 slow_signed_multiply::b#0 ] ) -- vbsz1_ge_0_then_la1 lda a @@ -11465,10 +11436,10 @@ slow_signed_multiply: { } //SEG299 multiply_results_compare multiply_results_compare: { - .label ms = $a - .label ma = 6 - .label b = 3 - .label a = 2 + .label ms = 8 + .label ma = $c + .label b = $f + .label a = $e //SEG300 [148] phi from multiply_results_compare to multiply_results_compare::@1 [phi:multiply_results_compare->multiply_results_compare::@1] //SEG301 [148] phi (byte) multiply_results_compare::a#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:multiply_results_compare->multiply_results_compare::@1#0] -- vbuz1=vbuc1 lda #0 @@ -11486,19 +11457,16 @@ multiply_results_compare: { //SEG309 multiply_results_compare::@2 b2: //SEG310 [150] (byte) slow_multiply::a#0 ← (byte) multiply_results_compare::a#6 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 ] ) - // (byte) slow_multiply::a#0 = (byte) multiply_results_compare::a#6 // register copy zp ZP_BYTE:2 + // (byte) slow_multiply::a#0 = (byte) multiply_results_compare::a#6 // register copy zp ZP_BYTE:14 //SEG311 [151] (byte) slow_multiply::b#0 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 slow_multiply::b#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 slow_multiply::b#0 ] ) -- vbuxx=vbuz1 ldx b //SEG312 [152] call slow_multiply param-assignment [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#0 ] ) jsr slow_multiply //SEG313 [153] (word) slow_multiply::return#2 ← (word) slow_multiply::return#0 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#2 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::return#2 ] ) - // (word) slow_multiply::return#2 = (word) slow_multiply::return#0 // register copy zp ZP_WORD:6 + // (word) slow_multiply::return#2 = (word) slow_multiply::return#0 // register copy zp ZP_WORD:8 //SEG314 multiply_results_compare::@8 - //SEG315 [154] (word) multiply_results_compare::ms#0 ← (word) slow_multiply::return#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- vwuz1=vwuz2 - lda slow_multiply.return - sta ms - lda slow_multiply.return+1 - sta ms+1 + //SEG315 [154] (word) multiply_results_compare::ms#0 ← (word) slow_multiply::return#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) + // (word) multiply_results_compare::ms#0 = (word) slow_multiply::return#2 // register copy zp ZP_WORD:8 //SEG316 [155] (byte) multiply::a#1 ← (byte) multiply_results_compare::a#6 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- vbuaa=vbuz1 lda a //SEG317 [156] (byte) multiply::b#1 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply::b#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply::a#1 multiply::b#1 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 ] ) -- vbuxx=vbuz1 @@ -11509,10 +11477,10 @@ multiply_results_compare: { //SEG321 [129] phi (byte) multiply::a#2 = (byte) multiply::a#1 [phi:multiply_results_compare::@8->multiply#1] -- register_copy jsr multiply //SEG322 [158] (word) multiply::return#3 ← (word) multiply::return#0 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply::return#3 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply::return#3 ] ) - // (word) multiply::return#3 = (word) multiply::return#0 // register copy zp ZP_WORD:6 + // (word) multiply::return#3 = (word) multiply::return#0 // register copy zp ZP_WORD:12 //SEG323 multiply_results_compare::@9 //SEG324 [159] (word) multiply_results_compare::ma#0 ← (word) multiply::return#3 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ) - // (word) multiply_results_compare::ma#0 = (word) multiply::return#3 // register copy zp ZP_WORD:6 + // (word) multiply_results_compare::ma#0 = (word) multiply::return#3 // register copy zp ZP_WORD:12 //SEG325 [160] if((word) multiply_results_compare::ms#0==(word) multiply_results_compare::ma#0) goto multiply_results_compare::@3 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 ] ) -- vwuz1_eq_vwuz2_then_la1 lda ms cmp ma @@ -11527,16 +11495,12 @@ multiply_results_compare: { sta BGCOL //SEG328 [162] (byte) multiply_error::a#0 ← (byte) multiply_results_compare::a#6 [ line_cursor#27 char_cursor#27 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::b#2 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 ] ) -- vbuxx=vbuz1 ldx a - //SEG329 [163] (byte) multiply_error::b#0 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ) -- vbuz1=vbuz2 - lda b - sta multiply_error.b + //SEG329 [163] (byte) multiply_error::b#0 ← (byte) multiply_results_compare::b#2 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::ms#0 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 ] ) + // (byte) multiply_error::b#0 = (byte) multiply_results_compare::b#2 // register copy zp ZP_BYTE:15 //SEG330 [164] (word) multiply_error::ms#0 ← (word) multiply_results_compare::ms#0 [ line_cursor#27 char_cursor#27 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_results_compare::ma#0 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 ] ) - // (word) multiply_error::ms#0 = (word) multiply_results_compare::ms#0 // register copy zp ZP_WORD:10 - //SEG331 [165] (word) multiply_error::ma#0 ← (word) multiply_results_compare::ma#0 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ) -- vwuz1=vwuz2 - lda ma - sta multiply_error.ma - lda ma+1 - sta multiply_error.ma+1 + // (word) multiply_error::ms#0 = (word) multiply_results_compare::ms#0 // register copy zp ZP_WORD:8 + //SEG331 [165] (word) multiply_error::ma#0 ← (word) multiply_results_compare::ma#0 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13 [ line_cursor#27 char_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ) + // (word) multiply_error::ma#0 = (word) multiply_results_compare::ma#0 // register copy zp ZP_WORD:12 //SEG332 [166] call multiply_error param-assignment [ line_cursor#1 ] ( main:2::multiply_results_compare:13 [ line_cursor#1 ] ) //SEG333 [176] phi from multiply_results_compare::@4 to multiply_error [phi:multiply_results_compare::@4->multiply_error] jsr multiply_error @@ -11580,8 +11544,8 @@ multiply_results_compare: { } //SEG354 multiply_error multiply_error: { - .label b = 2 - .label ms = $a + .label b = $f + .label ms = 8 .label ma = $c //SEG355 [177] call print_str param-assignment [ char_cursor#117 line_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#117 line_cursor#27 multiply_error::a#0 multiply_error::b#0 multiply_error::ms#0 multiply_error::ma#0 ] ) //SEG356 [51] phi from multiply_error to print_str [phi:multiply_error->print_str] @@ -11631,11 +11595,8 @@ multiply_error: { sta print_str.str+1 jsr print_str //SEG383 multiply_error::@5 - //SEG384 [186] (word) print_word::w#3 ← (word) multiply_error::ms#0 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ) -- vwuz1=vwuz2 - lda ms - sta print_word.w - lda ms+1 - sta print_word.w+1 + //SEG384 [186] (word) print_word::w#3 ← (word) multiply_error::ms#0 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#117 line_cursor#27 print_word::w#3 multiply_error::ma#0 ] ) + // (word) print_word::w#3 = (word) multiply_error::ms#0 // register copy zp ZP_WORD:8 //SEG385 [187] call print_word param-assignment [ char_cursor#17 line_cursor#27 multiply_error::ma#0 ] ( main:2::multiply_results_compare:13::multiply_error:166 [ char_cursor#17 line_cursor#27 multiply_error::ma#0 ] ) //SEG386 [86] phi from multiply_error::@5 to print_word [phi:multiply_error::@5->print_word] //SEG387 [86] phi (byte*) char_cursor#123 = (byte*) char_cursor#117 [phi:multiply_error::@5->print_word#0] -- register_copy @@ -11680,9 +11641,9 @@ multiply_error: { } //SEG409 slow_multiply slow_multiply: { - .label return = 6 - .label m = 6 - .label a = 2 + .label return = 8 + .label m = 8 + .label a = $e //SEG410 [195] if((byte) slow_multiply::a#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto slow_multiply::@1 [ slow_multiply::a#0 slow_multiply::b#0 ] ( main:2::multiply_results_compare:13::slow_multiply:152 [ line_cursor#27 char_cursor#27 multiply_results_compare::a#6 multiply_results_compare::b#2 slow_multiply::a#0 slow_multiply::b#0 ] ) -- vbuz1_eq_0_then_la1 lda a beq b3 @@ -11728,8 +11689,8 @@ slow_multiply: { } //SEG428 multiply_tables_compare multiply_tables_compare: { - .label asm_sqr = $a - .label kc_sqr = 4 + .label asm_sqr = 8 + .label kc_sqr = $10 //SEG429 [203] phi from multiply_tables_compare to multiply_tables_compare::@1 [phi:multiply_tables_compare->multiply_tables_compare::@1] //SEG430 [203] phi (byte*) multiply_tables_compare::asm_sqr#2 = (const byte[512]) asm_mul_sqr1_lo#0 [phi:multiply_tables_compare->multiply_tables_compare::@1#0] -- pbuz1=pbuc1 lda #print_word] //SEG447 [86] phi (byte*) char_cursor#123 = (byte*) char_cursor#117 [phi:multiply_tables_compare::@6->print_word#0] -- register_copy @@ -11932,13 +11890,13 @@ init_multiply_asm: { } //SEG494 init_multiply init_multiply: { - .label sqr1_hi = 6 - .label sqr = 8 - .label sqr1_lo = 4 - .label x_2 = 2 - .label sqr2_hi = 6 - .label sqr2_lo = 4 - .label dir = 2 + .label sqr1_hi = $14 + .label sqr = $17 + .label sqr1_lo = $12 + .label x_2 = $16 + .label sqr2_hi = $1b + .label sqr2_lo = $19 + .label dir = $1d //SEG495 [230] phi from init_multiply to init_multiply::@1 [phi:init_multiply->init_multiply::@1] //SEG496 [230] phi (byte) init_multiply::x_2#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_multiply->init_multiply::@1#0] -- vbuz1=vbuc1 lda #0 @@ -12100,7 +12058,7 @@ init_multiply: { } //SEG556 print_cls print_cls: { - .label sc = 4 + .label sc = $1e //SEG557 [259] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] //SEG558 [259] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 lda #<$400 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.sym b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.sym index f117221b9..a6512ae29 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply.sym @@ -12,20 +12,20 @@ (byte[512]) asm_mul_sqr2_lo (const byte[512]) asm_mul_sqr2_lo#0 asm_mul_sqr2_lo = { fill( 512, 0) } (byte*) char_cursor -(byte*) char_cursor#1 char_cursor zp ZP_WORD:8 11.0 -(byte*) char_cursor#117 char_cursor zp ZP_WORD:8 1.6944444444444446 -(byte*) char_cursor#118 char_cursor zp ZP_WORD:8 5.25 -(byte*) char_cursor#119 char_cursor zp ZP_WORD:8 3.0 -(byte*) char_cursor#121 char_cursor zp ZP_WORD:8 3.0 -(byte*) char_cursor#123 char_cursor zp ZP_WORD:8 6.0 -(byte*) char_cursor#124 char_cursor zp ZP_WORD:8 3.9999999999999996 -(byte*) char_cursor#135 char_cursor zp ZP_WORD:8 24.0 -(byte*) char_cursor#17 char_cursor zp ZP_WORD:8 0.7894736842105261 -(byte*~) char_cursor#172 char_cursor zp ZP_WORD:8 4.0 -(byte*~) char_cursor#176 char_cursor zp ZP_WORD:8 4.0 -(byte*~) char_cursor#197 char_cursor zp ZP_WORD:8 4.0 -(byte*) char_cursor#27 char_cursor zp ZP_WORD:8 0.27586206896551724 -(byte*) char_cursor#75 char_cursor zp ZP_WORD:8 6.0 +(byte*) char_cursor#1 char_cursor zp ZP_WORD:10 11.0 +(byte*) char_cursor#117 char_cursor zp ZP_WORD:10 1.6944444444444446 +(byte*) char_cursor#118 char_cursor zp ZP_WORD:10 5.25 +(byte*) char_cursor#119 char_cursor zp ZP_WORD:10 3.0 +(byte*) char_cursor#121 char_cursor zp ZP_WORD:10 3.0 +(byte*) char_cursor#123 char_cursor zp ZP_WORD:10 6.0 +(byte*) char_cursor#124 char_cursor zp ZP_WORD:10 3.9999999999999996 +(byte*) char_cursor#135 char_cursor zp ZP_WORD:10 24.0 +(byte*) char_cursor#17 char_cursor zp ZP_WORD:10 0.7894736842105261 +(byte*~) char_cursor#172 char_cursor zp ZP_WORD:10 4.0 +(byte*~) char_cursor#176 char_cursor zp ZP_WORD:10 4.0 +(byte*~) char_cursor#197 char_cursor zp ZP_WORD:10 4.0 +(byte*) char_cursor#27 char_cursor zp ZP_WORD:10 0.27586206896551724 +(byte*) char_cursor#75 char_cursor zp ZP_WORD:10 6.0 (void()) init_multiply() (byte~) init_multiply::$2 reg byte a 22.0 (byte~) init_multiply::$5 reg byte a 22.0 @@ -42,29 +42,29 @@ (byte) init_multiply::c#1 reg byte x 2.357142857142857 (byte) init_multiply::c#2 reg byte x 22.0 (byte) init_multiply::dir -(byte) init_multiply::dir#2 dir zp ZP_BYTE:2 4.714285714285714 -(byte) init_multiply::dir#3 dir zp ZP_BYTE:2 7.333333333333333 +(byte) init_multiply::dir#2 dir zp ZP_BYTE:29 4.714285714285714 +(byte) init_multiply::dir#3 dir zp ZP_BYTE:29 7.333333333333333 (word) init_multiply::sqr -(word) init_multiply::sqr#1 sqr zp ZP_WORD:8 7.333333333333333 -(word) init_multiply::sqr#2 sqr zp ZP_WORD:8 22.0 -(word) init_multiply::sqr#3 sqr zp ZP_WORD:8 9.166666666666666 -(word) init_multiply::sqr#4 sqr zp ZP_WORD:8 6.6000000000000005 +(word) init_multiply::sqr#1 sqr zp ZP_WORD:23 7.333333333333333 +(word) init_multiply::sqr#2 sqr zp ZP_WORD:23 22.0 +(word) init_multiply::sqr#3 sqr zp ZP_WORD:23 9.166666666666666 +(word) init_multiply::sqr#4 sqr zp ZP_WORD:23 6.6000000000000005 (byte*) init_multiply::sqr1_hi -(byte*) init_multiply::sqr1_hi#1 sqr1_hi zp ZP_WORD:6 5.5 -(byte*) init_multiply::sqr1_hi#2 sqr1_hi zp ZP_WORD:6 3.0 +(byte*) init_multiply::sqr1_hi#1 sqr1_hi zp ZP_WORD:20 5.5 +(byte*) init_multiply::sqr1_hi#2 sqr1_hi zp ZP_WORD:20 3.0 (byte*) init_multiply::sqr1_lo -(byte*) init_multiply::sqr1_lo#1 sqr1_lo zp ZP_WORD:4 16.5 -(byte*) init_multiply::sqr1_lo#2 sqr1_lo zp ZP_WORD:4 2.5384615384615383 +(byte*) init_multiply::sqr1_lo#1 sqr1_lo zp ZP_WORD:18 16.5 +(byte*) init_multiply::sqr1_lo#2 sqr1_lo zp ZP_WORD:18 2.5384615384615383 (byte*) init_multiply::sqr2_hi -(byte*) init_multiply::sqr2_hi#1 sqr2_hi zp ZP_WORD:6 3.142857142857143 -(byte*) init_multiply::sqr2_hi#2 sqr2_hi zp ZP_WORD:6 11.0 +(byte*) init_multiply::sqr2_hi#1 sqr2_hi zp ZP_WORD:27 3.142857142857143 +(byte*) init_multiply::sqr2_hi#2 sqr2_hi zp ZP_WORD:27 11.0 (byte*) init_multiply::sqr2_lo -(byte*) init_multiply::sqr2_lo#1 sqr2_lo zp ZP_WORD:4 16.5 -(byte*) init_multiply::sqr2_lo#2 sqr2_lo zp ZP_WORD:4 4.125 +(byte*) init_multiply::sqr2_lo#1 sqr2_lo zp ZP_WORD:25 16.5 +(byte*) init_multiply::sqr2_lo#2 sqr2_lo zp ZP_WORD:25 4.125 (byte) init_multiply::x_2 -(byte) init_multiply::x_2#1 x_2 zp ZP_BYTE:2 11.0 -(byte) init_multiply::x_2#2 x_2 zp ZP_BYTE:2 4.888888888888889 -(byte) init_multiply::x_2#3 x_2 zp ZP_BYTE:2 8.25 +(byte) init_multiply::x_2#1 x_2 zp ZP_BYTE:22 11.0 +(byte) init_multiply::x_2#2 x_2 zp ZP_BYTE:22 4.888888888888889 +(byte) init_multiply::x_2#3 x_2 zp ZP_BYTE:22 8.25 (byte) init_multiply::x_255 (byte) init_multiply::x_255#1 reg byte x 5.5 (byte) init_multiply::x_255#2 reg byte x 11.0 @@ -107,9 +107,9 @@ (byte*) multiply::memB (const byte*) multiply::memB#0 memB = ((byte*))(byte/word/signed word/dword/signed dword) 255 (word) multiply::return -(word) multiply::return#0 return zp ZP_WORD:6 26.25 -(word) multiply::return#2 return zp ZP_WORD:6 4.0 -(word) multiply::return#3 return zp ZP_WORD:6 202.0 +(word) multiply::return#0 return zp ZP_WORD:12 26.25 +(word) multiply::return#2 return zp ZP_WORD:12 4.0 +(word) multiply::return#3 return zp ZP_WORD:12 202.0 (void()) multiply_error((byte) multiply_error::a , (byte) multiply_error::b , (word) multiply_error::ms , (word) multiply_error::ma) (label) multiply_error::@1 (label) multiply_error::@2 @@ -123,11 +123,11 @@ (byte) multiply_error::a (byte) multiply_error::a#0 reg byte x 0.6666666666666666 (byte) multiply_error::b -(byte) multiply_error::b#0 b zp ZP_BYTE:2 0.4444444444444444 +(byte) multiply_error::b#0 b zp ZP_BYTE:15 0.4444444444444444 (word) multiply_error::ma (word) multiply_error::ma#0 ma zp ZP_WORD:12 0.26666666666666666 (word) multiply_error::ms -(word) multiply_error::ms#0 ms zp ZP_WORD:10 0.3333333333333333 +(word) multiply_error::ms#0 ms zp ZP_WORD:8 0.3333333333333333 (const string) multiply_error::str str = (string) "multiply mismatch @" (const string) multiply_error::str1 str1 = (string) "*@" (const string) multiply_error::str2 str2 = (string) " slow:@" @@ -144,15 +144,15 @@ (label) multiply_results_compare::@9 (label) multiply_results_compare::@return (byte) multiply_results_compare::a -(byte) multiply_results_compare::a#1 a zp ZP_BYTE:2 16.5 -(byte) multiply_results_compare::a#6 a zp ZP_BYTE:2 14.125 +(byte) multiply_results_compare::a#1 a zp ZP_BYTE:14 16.5 +(byte) multiply_results_compare::a#6 a zp ZP_BYTE:14 14.125 (byte) multiply_results_compare::b -(byte) multiply_results_compare::b#1 b zp ZP_BYTE:3 151.5 -(byte) multiply_results_compare::b#2 b zp ZP_BYTE:3 29.0 +(byte) multiply_results_compare::b#1 b zp ZP_BYTE:15 151.5 +(byte) multiply_results_compare::b#2 b zp ZP_BYTE:15 29.0 (word) multiply_results_compare::ma -(word) multiply_results_compare::ma#0 ma zp ZP_WORD:6 34.0 +(word) multiply_results_compare::ma#0 ma zp ZP_WORD:12 34.0 (word) multiply_results_compare::ms -(word) multiply_results_compare::ms#0 ms zp ZP_WORD:10 20.4 +(word) multiply_results_compare::ms#0 ms zp ZP_WORD:8 20.4 (const string) multiply_results_compare::str str = (string) "multiply results match!@" (void()) multiply_tables_compare() (label) multiply_tables_compare::@1 @@ -165,11 +165,11 @@ (label) multiply_tables_compare::@8 (label) multiply_tables_compare::@return (byte*) multiply_tables_compare::asm_sqr -(byte*) multiply_tables_compare::asm_sqr#1 asm_sqr zp ZP_WORD:10 7.333333333333333 -(byte*) multiply_tables_compare::asm_sqr#2 asm_sqr zp ZP_WORD:10 8.25 +(byte*) multiply_tables_compare::asm_sqr#1 asm_sqr zp ZP_WORD:8 7.333333333333333 +(byte*) multiply_tables_compare::asm_sqr#2 asm_sqr zp ZP_WORD:8 8.25 (byte*) multiply_tables_compare::kc_sqr -(byte*) multiply_tables_compare::kc_sqr#1 kc_sqr zp ZP_WORD:4 16.5 -(byte*) multiply_tables_compare::kc_sqr#2 kc_sqr zp ZP_WORD:4 3.666666666666667 +(byte*) multiply_tables_compare::kc_sqr#1 kc_sqr zp ZP_WORD:16 16.5 +(byte*) multiply_tables_compare::kc_sqr#2 kc_sqr zp ZP_WORD:16 3.666666666666667 (const string) multiply_tables_compare::str str = (string) "multiply table mismatch at @" (const string) multiply_tables_compare::str1 str1 = (string) " / @" (const string) multiply_tables_compare::str2 str2 = (string) "multiply tables match!@" @@ -197,8 +197,8 @@ (label) print_cls::@1 (label) print_cls::@return (byte*) print_cls::sc -(byte*) print_cls::sc#1 sc zp ZP_WORD:4 16.5 -(byte*) print_cls::sc#2 sc zp ZP_WORD:4 16.5 +(byte*) print_cls::sc#1 sc zp ZP_WORD:30 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:30 16.5 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -227,21 +227,21 @@ (label) print_sword::@4 (label) print_sword::@return (signed word) print_sword::w -(signed word) print_sword::w#0 w zp ZP_WORD:6 4.0 -(signed word) print_sword::w#1 w zp ZP_WORD:6 4.0 -(signed word) print_sword::w#2 w zp ZP_WORD:6 4.0 -(signed word) print_sword::w#3 w zp ZP_WORD:6 2.5 -(signed word) print_sword::w#4 w zp ZP_WORD:6 4.0 +(signed word) print_sword::w#0 w zp ZP_WORD:8 4.0 +(signed word) print_sword::w#1 w zp ZP_WORD:8 4.0 +(signed word) print_sword::w#2 w zp ZP_WORD:8 4.0 +(signed word) print_sword::w#3 w zp ZP_WORD:8 2.5 +(signed word) print_sword::w#4 w zp ZP_WORD:8 4.0 (void()) print_word((word) print_word::w) (label) print_word::@1 (label) print_word::@return (word) print_word::w -(word~) print_word::w#10 w zp ZP_WORD:6 4.0 -(word~) print_word::w#11 w zp ZP_WORD:6 4.0 -(word) print_word::w#3 w zp ZP_WORD:6 4.0 -(word) print_word::w#4 w zp ZP_WORD:6 4.0 -(word) print_word::w#5 w zp ZP_WORD:6 4.666666666666666 -(word~) print_word::w#9 w zp ZP_WORD:6 4.0 +(word~) print_word::w#10 w zp ZP_WORD:8 4.0 +(word~) print_word::w#11 w zp ZP_WORD:8 4.0 +(word) print_word::w#3 w zp ZP_WORD:8 4.0 +(word) print_word::w#4 w zp ZP_WORD:8 4.0 +(word) print_word::w#5 w zp ZP_WORD:8 4.666666666666666 +(word~) print_word::w#9 w zp ZP_WORD:8 4.0 (signed word()) signed_multiply((signed byte) signed_multiply::a , (signed byte) signed_multiply::b) (byte~) signed_multiply::$12 reg byte a 4.0 (byte/signed byte/word/signed word/dword/signed dword~) signed_multiply::$16 reg byte a 4.0 @@ -258,13 +258,13 @@ (signed byte) signed_multiply::b (signed byte) signed_multiply::b#0 b zp ZP_BYTE:3 9.363636363636363 (word) signed_multiply::m -(word) signed_multiply::m#0 m zp ZP_WORD:6 2.0 -(word) signed_multiply::m#1 m zp ZP_WORD:6 4.0 -(word) signed_multiply::m#2 m zp ZP_WORD:6 4.0 -(word) signed_multiply::m#4 m zp ZP_WORD:6 1.3333333333333333 -(word) signed_multiply::m#5 m zp ZP_WORD:6 2.5 +(word) signed_multiply::m#0 m zp ZP_WORD:12 2.0 +(word) signed_multiply::m#1 m zp ZP_WORD:12 4.0 +(word) signed_multiply::m#2 m zp ZP_WORD:12 4.0 +(word) signed_multiply::m#4 m zp ZP_WORD:12 1.3333333333333333 +(word) signed_multiply::m#5 m zp ZP_WORD:12 2.5 (signed word) signed_multiply::return -(signed word) signed_multiply::return#2 return zp ZP_WORD:6 202.0 +(signed word) signed_multiply::return#2 return zp ZP_WORD:12 202.0 (void()) signed_multiply_error((signed byte) signed_multiply_error::a , (signed byte) signed_multiply_error::b , (signed word) signed_multiply_error::ms , (signed word) signed_multiply_error::ma) (label) signed_multiply_error::@1 (label) signed_multiply_error::@2 @@ -278,11 +278,11 @@ (signed byte) signed_multiply_error::a (signed byte) signed_multiply_error::a#0 reg byte x 0.6666666666666666 (signed byte) signed_multiply_error::b -(signed byte) signed_multiply_error::b#0 b zp ZP_BYTE:2 0.4444444444444444 +(signed byte) signed_multiply_error::b#0 b zp ZP_BYTE:3 0.4444444444444444 (signed word) signed_multiply_error::ma (signed word) signed_multiply_error::ma#0 ma zp ZP_WORD:12 0.26666666666666666 (signed word) signed_multiply_error::ms -(signed word) signed_multiply_error::ms#0 ms zp ZP_WORD:10 0.3333333333333333 +(signed word) signed_multiply_error::ms#0 ms zp ZP_WORD:8 0.3333333333333333 (const string) signed_multiply_error::str str = (string) "signed multiply mismatch @" (const string) signed_multiply_error::str1 str1 = (string) "*@" (const string) signed_multiply_error::str2 str2 = (string) " slow:@" @@ -305,7 +305,7 @@ (signed byte) signed_multiply_results_compare::b#1 b zp ZP_BYTE:3 151.5 (signed byte) signed_multiply_results_compare::b#2 b zp ZP_BYTE:3 29.0 (signed word) signed_multiply_results_compare::ma -(signed word) signed_multiply_results_compare::ma#0 ma zp ZP_WORD:6 34.0 +(signed word) signed_multiply_results_compare::ma#0 ma zp ZP_WORD:12 34.0 (signed word) signed_multiply_results_compare::ms (signed word) signed_multiply_results_compare::ms#0 ms zp ZP_WORD:8 20.4 (const string) signed_multiply_results_compare::str str = (string) "signed multiply results match!@" @@ -314,18 +314,18 @@ (label) slow_multiply::@2 (label) slow_multiply::@return (byte) slow_multiply::a -(byte) slow_multiply::a#0 a zp ZP_BYTE:2 157.71428571428572 +(byte) slow_multiply::a#0 a zp ZP_BYTE:14 157.71428571428572 (byte) slow_multiply::b (byte) slow_multiply::b#0 reg byte x 183.66666666666669 (byte) slow_multiply::i (byte) slow_multiply::i#1 reg byte y 1501.5 (byte) slow_multiply::i#2 reg byte y 1001.0 (word) slow_multiply::m -(word) slow_multiply::m#1 m zp ZP_WORD:6 1001.0 -(word) slow_multiply::m#3 m zp ZP_WORD:6 2002.0 +(word) slow_multiply::m#1 m zp ZP_WORD:8 1001.0 +(word) slow_multiply::m#3 m zp ZP_WORD:8 2002.0 (word) slow_multiply::return -(word) slow_multiply::return#0 return zp ZP_WORD:6 367.33333333333337 -(word) slow_multiply::return#2 return zp ZP_WORD:6 202.0 +(word) slow_multiply::return#0 return zp ZP_WORD:8 367.33333333333337 +(word) slow_multiply::return#2 return zp ZP_WORD:8 202.0 (signed word()) slow_signed_multiply((signed byte) slow_signed_multiply::a , (signed byte) slow_signed_multiply::b) (label) slow_signed_multiply::@1 (label) slow_signed_multiply::@2 @@ -343,34 +343,45 @@ (signed byte) slow_signed_multiply::j#1 reg byte y 1501.5 (signed byte) slow_signed_multiply::j#2 reg byte y 1001.0 (signed word) slow_signed_multiply::m -(signed word) slow_signed_multiply::m#1 m zp ZP_WORD:6 1001.0 -(signed word) slow_signed_multiply::m#2 m zp ZP_WORD:6 1001.0 -(signed word) slow_signed_multiply::m#3 m zp ZP_WORD:6 2002.0 -(signed word) slow_signed_multiply::m#5 m zp ZP_WORD:6 2002.0 +(signed word) slow_signed_multiply::m#1 m zp ZP_WORD:8 1001.0 +(signed word) slow_signed_multiply::m#2 m zp ZP_WORD:8 1001.0 +(signed word) slow_signed_multiply::m#3 m zp ZP_WORD:8 2002.0 +(signed word) slow_signed_multiply::m#5 m zp ZP_WORD:8 2002.0 (signed word) slow_signed_multiply::return -(signed word) slow_signed_multiply::return#0 return zp ZP_WORD:6 701.0 -(signed word) slow_signed_multiply::return#2 return zp ZP_WORD:6 202.0 +(signed word) slow_signed_multiply::return#0 return zp ZP_WORD:8 701.0 +(signed word) slow_signed_multiply::return#2 return zp ZP_WORD:8 202.0 -zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 multiply_results_compare::a#6 multiply_results_compare::a#1 init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 init_multiply::dir#2 init_multiply::dir#3 slow_signed_multiply::a#0 signed_multiply_error::b#0 slow_multiply::a#0 multiply_error::b#0 ] -zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 multiply_results_compare::b#2 multiply_results_compare::b#1 signed_multiply::b#0 ] -zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 init_multiply::sqr2_lo#2 init_multiply::sqr2_lo#1 print_cls::sc#2 print_cls::sc#1 ] -zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 slow_signed_multiply::return#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 multiply::return#2 multiply::return#0 slow_multiply::return#2 multiply::return#3 multiply_results_compare::ma#0 ] +zp ZP_BYTE:2 [ signed_multiply_results_compare::a#6 signed_multiply_results_compare::a#1 slow_signed_multiply::a#0 ] +zp ZP_BYTE:3 [ signed_multiply_results_compare::b#2 signed_multiply_results_compare::b#1 signed_multiply::b#0 signed_multiply_error::b#0 ] +zp ZP_WORD:4 [ line_cursor#20 line_cursor#40 line_cursor#27 line_cursor#1 ] +zp ZP_WORD:6 [ print_str::str#14 print_str::str#16 print_str::str#0 ] +zp ZP_WORD:8 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#9 print_word::w#10 print_word::w#11 multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 signed_multiply_results_compare::ms#0 slow_signed_multiply::return#2 slow_signed_multiply::m#5 slow_signed_multiply::return#0 slow_signed_multiply::m#3 slow_signed_multiply::m#1 slow_signed_multiply::m#2 multiply_error::ms#0 multiply_results_compare::ms#0 slow_multiply::return#2 slow_multiply::return#0 slow_multiply::m#3 slow_multiply::m#1 ] reg byte x [ print_byte::b#5 print_byte::b#3 print_byte::b#4 print_byte::b#9 print_byte::b#1 print_byte::b#2 ] reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] -zp ZP_WORD:8 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 signed_multiply_results_compare::ms#0 ] +zp ZP_WORD:10 [ char_cursor#75 char_cursor#124 char_cursor#123 char_cursor#119 char_cursor#135 char_cursor#27 char_cursor#118 char_cursor#17 char_cursor#117 char_cursor#172 char_cursor#176 char_cursor#1 char_cursor#121 char_cursor#197 ] reg byte x [ print_sbyte::b#4 print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#0 ] +zp ZP_WORD:12 [ signed_multiply::m#4 signed_multiply::m#5 signed_multiply::m#1 signed_multiply::m#0 signed_multiply::m#2 signed_multiply::return#2 signed_multiply_results_compare::ma#0 signed_multiply_error::ma#0 multiply::return#2 multiply::return#0 multiply::return#3 multiply_results_compare::ma#0 multiply_error::ma#0 ] reg byte a [ multiply::a#2 multiply::a#1 multiply::a#4 ] reg byte x [ multiply::b#2 multiply::b#1 multiply::b#4 ] reg byte y [ slow_signed_multiply::i#2 slow_signed_multiply::i#1 ] reg byte y [ slow_signed_multiply::j#2 slow_signed_multiply::j#1 ] +zp ZP_BYTE:14 [ multiply_results_compare::a#6 multiply_results_compare::a#1 slow_multiply::a#0 ] +zp ZP_BYTE:15 [ multiply_results_compare::b#2 multiply_results_compare::b#1 multiply_error::b#0 ] reg byte y [ slow_multiply::i#2 slow_multiply::i#1 ] -zp ZP_WORD:10 [ multiply_tables_compare::asm_sqr#2 multiply_tables_compare::asm_sqr#1 signed_multiply_error::ms#0 multiply_results_compare::ms#0 multiply_error::ms#0 ] +zp ZP_WORD:16 [ multiply_tables_compare::kc_sqr#2 multiply_tables_compare::kc_sqr#1 ] reg byte x [ init_multiply::c#2 init_multiply::c#1 ] +zp ZP_WORD:18 [ init_multiply::sqr1_lo#2 init_multiply::sqr1_lo#1 ] +zp ZP_WORD:20 [ init_multiply::sqr1_hi#2 init_multiply::sqr1_hi#1 ] +zp ZP_BYTE:22 [ init_multiply::x_2#3 init_multiply::x_2#2 init_multiply::x_2#1 ] +zp ZP_WORD:23 [ init_multiply::sqr#3 init_multiply::sqr#4 init_multiply::sqr#1 init_multiply::sqr#2 ] reg byte x [ init_multiply::x_255#2 init_multiply::x_255#1 ] +zp ZP_WORD:25 [ init_multiply::sqr2_lo#2 init_multiply::sqr2_lo#1 ] +zp ZP_WORD:27 [ init_multiply::sqr2_hi#2 init_multiply::sqr2_hi#1 ] +zp ZP_BYTE:29 [ init_multiply::dir#2 init_multiply::dir#3 ] +zp ZP_WORD:30 [ print_cls::sc#2 print_cls::sc#1 ] reg byte x [ slow_signed_multiply::b#0 ] reg byte y [ signed_multiply::a#0 ] reg byte x [ signed_multiply_error::a#0 ] -zp ZP_WORD:12 [ signed_multiply_error::ma#0 multiply_error::ma#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] reg byte a [ signed_multiply::$6 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm index 1e71cb06c..39aecfd71 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm @@ -109,7 +109,7 @@ findcol: { .label x = 5 .label y = 2 .label xp = 7 - .label yp = 8 + .label yp = $a .label diff = 7 .label mindiff = 6 ldy #0 @@ -177,7 +177,7 @@ findcol: { jmp b5 } initscreen: { - .label screen = 3 + .label screen = 8 lda #SCREEN diff --git a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log index 83b23524f..f43b6de4c 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log @@ -2600,13 +2600,13 @@ Attempting to uplift remaining variables inzp ZP_BYTE:20 [ findcol::x#0 ] Uplifting [findcol] best 1703953 combination zp ZP_BYTE:20 [ findcol::x#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ render::y#4 render::y#1 ] Uplifting [render] best 1703953 combination zp ZP_BYTE:2 [ render::y#4 render::y#1 ] -Coalescing zero page register [ zp ZP_BYTE:2 [ render::y#4 render::y#1 ] ] with [ zp ZP_BYTE:21 [ findcol::y#0 ] ] -Coalescing zero page register [ zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] ] with [ zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] ] -Coalescing zero page register [ zp ZP_BYTE:5 [ render::x#2 render::x#1 ] ] with [ zp ZP_BYTE:20 [ findcol::x#0 ] ] Coalescing zero page register [ zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] ] with [ zp ZP_BYTE:24 [ findcol::xp#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:2 [ render::y#4 render::y#1 ] ] with [ zp ZP_BYTE:21 [ findcol::y#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:5 [ render::x#2 render::x#1 ] ] with [ zp ZP_BYTE:20 [ findcol::x#0 ] ] Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:6 [ findcol::mindiff#10 findcol::mindiff#13 ] Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:7 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 findcol::xp#0 ] -Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:8 [ findcol::yp#0 ] +Allocated (was zp ZP_WORD:11) zp ZP_WORD:8 [ initscreen::screen#2 initscreen::screen#1 ] +Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:10 [ findcol::yp#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -2869,7 +2869,7 @@ findcol: { .label x = 5 .label y = 2 .label xp = 7 - .label yp = 8 + .label yp = $a .label diff = 7 .label mindiff = 6 //SEG91 [54] phi from findcol to findcol::@1 [phi:findcol->findcol::@1] @@ -3013,7 +3013,7 @@ findcol: { } //SEG143 initscreen initscreen: { - .label screen = 3 + .label screen = 8 //SEG144 [79] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] b1_from_initscreen: //SEG145 [79] phi (byte*) initscreen::screen#2 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@1#0] -- pbuz1=pbuc1 @@ -3243,13 +3243,13 @@ FINAL SYMBOL TABLE (byte) findcol::y (byte) findcol::y#0 y zp ZP_BYTE:2 1708.5416666666665 (byte) findcol::yp -(byte) findcol::yp#0 yp zp ZP_BYTE:8 6250.625 +(byte) findcol::yp#0 yp zp ZP_BYTE:10 6250.625 (void()) initscreen() (label) initscreen::@1 (label) initscreen::@return (byte*) initscreen::screen -(byte*) initscreen::screen#1 screen zp ZP_WORD:3 16.5 -(byte*) initscreen::screen#2 screen zp ZP_WORD:3 16.5 +(byte*) initscreen::screen#1 screen zp ZP_WORD:8 16.5 +(byte*) initscreen::screen#2 screen zp ZP_WORD:8 16.5 (void()) main() (label) main::@1 (label) main::@4 @@ -3276,13 +3276,14 @@ FINAL SYMBOL TABLE (byte) render::y#4 y zp ZP_BYTE:2 109.36363636363637 zp ZP_BYTE:2 [ render::y#4 render::y#1 findcol::y#0 ] -zp ZP_WORD:3 [ render::colline#5 render::colline#1 initscreen::screen#2 initscreen::screen#1 ] +zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] zp ZP_BYTE:5 [ render::x#2 render::x#1 findcol::x#0 ] reg byte x [ findcol::i#10 findcol::i#1 ] zp ZP_BYTE:6 [ findcol::mindiff#10 findcol::mindiff#13 ] reg byte y [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] zp ZP_BYTE:7 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 findcol::xp#0 ] reg byte a [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] +zp ZP_WORD:8 [ initscreen::screen#2 initscreen::screen#1 ] reg byte x [ animate::$0 ] reg byte x [ animate::$3 ] reg byte x [ animate::$6 ] @@ -3292,7 +3293,7 @@ reg byte a [ animate::$15 ] reg byte a [ animate::$18 ] reg byte a [ findcol::return#0 ] reg byte a [ render::col#0 ] -zp ZP_BYTE:8 [ findcol::yp#0 ] +zp ZP_BYTE:10 [ findcol::yp#0 ] reg byte a [ findcol::$10 ] reg byte a [ findcol::$12 ] @@ -3505,7 +3506,7 @@ findcol: { .label x = 5 .label y = 2 .label xp = 7 - .label yp = 8 + .label yp = $a .label diff = 7 .label mindiff = 6 //SEG91 [54] phi from findcol to findcol::@1 [phi:findcol->findcol::@1] @@ -3626,7 +3627,7 @@ findcol: { } //SEG143 initscreen initscreen: { - .label screen = 3 + .label screen = 8 //SEG144 [79] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] //SEG145 [79] phi (byte*) initscreen::screen#2 = (const byte*) SCREEN#0 [phi:initscreen->initscreen::@1#0] -- pbuz1=pbuc1 lda #