From c4c60a5b36e3558b10b765f023fda4a0c18d9a17 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 29 Oct 2017 11:41:35 +0100 Subject: [PATCH] Added a bunch of test cases highlighting each known error --- src/main/java/dk/camelot64/kickc/TODO.txt | 10 +- .../dk/camelot64/kickc/test/TestErrors.java | 83 + ...mpilationOutput.java => TestPrograms.java} | 15 +- .../camelot64/kickc/test/bitmap-bresenham.kc | 22 +- .../kickc/test/forincrementassign.kc | 10 + .../camelot64/kickc/test/forrangesymbolic.kc | 11 + .../java/dk/camelot64/kickc/test/incd020.kc | 3 + .../kickc/test/inlinearrayproblem.kc | 11 + .../kickc/test/ref/bitmap-bresenham.asm | 218 + .../kickc/test/ref/bitmap-bresenham.cfg | 138 + .../kickc/test/ref/bitmap-bresenham.log | 8988 +++++++++++++++++ .../kickc/test/ref/bitmap-bresenham.sym | 169 + .../camelot64/kickc/test/useuninitialized.kc | 1 + .../java/dk/camelot64/kickc/test/wordexpr.kc | 10 + 14 files changed, 9656 insertions(+), 33 deletions(-) create mode 100644 src/main/java/dk/camelot64/kickc/test/TestErrors.java rename src/main/java/dk/camelot64/kickc/test/{TestCompilationOutput.java => TestPrograms.java} (92%) create mode 100644 src/main/java/dk/camelot64/kickc/test/forincrementassign.kc create mode 100644 src/main/java/dk/camelot64/kickc/test/forrangesymbolic.kc create mode 100644 src/main/java/dk/camelot64/kickc/test/inlinearrayproblem.kc create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.cfg create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.sym create mode 100644 src/main/java/dk/camelot64/kickc/test/wordexpr.kc diff --git a/src/main/java/dk/camelot64/kickc/TODO.txt b/src/main/java/dk/camelot64/kickc/TODO.txt index 1e22acb7c..a347d889a 100644 --- a/src/main/java/dk/camelot64/kickc/TODO.txt +++ b/src/main/java/dk/camelot64/kickc/TODO.txt @@ -1,8 +1,10 @@ Known Problems -- Increment/decrement of value pointed to by pointer does not work. eg. byte* BGCOL = $d020; (*BGCOL)++; -- Arrays / strings allocated inline destroy functions (because they are allocated where the call enters. -- Classic for() does not allow assignment as increment, eg. for(byte i=0;i<25;i=i+2) {} -- Range-based for does not recognize symbolic constants. The following gives a ParseTreeConstantEvaluator$NotConstantException - const byte* BITMAP = $2000; for(byte* b : BITMAP..BITMAP+$2000) { *b = 0; } +- (incd020.kc) Increment/decrement of value pointed to by pointer does not work. eg. byte* BGCOL = $d020; (*BGCOL)++; +- (inlinearrayproblem.kc) Arrays / strings allocated inline destroy functions (because they are allocated where the call enters. +- (forincrementassign.kc) Classic for() does not allow assignment as increment, eg. for(byte i=0;i<25;i=i+2) {} +- (forrangesymbolic.kc) Range-based for does not recognize symbolic constants. The following gives a ParseTreeConstantEvaluator$NotConstantException - const byte* BITMAP = $2000; for(byte* b : BITMAP..BITMAP+$2000) { *b = 0; } +- (wordexpr.kc) Expressions based on bytes but resulting in words are erronously infered as bytes - eg. yoffs = yoffs + 40*8; +- (useuninitialized.kc) Using an uninitialized variable fails in the optimizer phase. It should fail much earlier. Features - Move the main code into a main() function, and disallow code outside functions. The main function per default has no parameters and exits with RTS. diff --git a/src/main/java/dk/camelot64/kickc/test/TestErrors.java b/src/main/java/dk/camelot64/kickc/test/TestErrors.java new file mode 100644 index 000000000..4a9593d27 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/TestErrors.java @@ -0,0 +1,83 @@ +package dk.camelot64.kickc.test; + +import dk.camelot64.kickc.Compiler; +import dk.camelot64.kickc.model.CompileError; +import dk.camelot64.kickc.model.Program; +import junit.framework.TestCase; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; + +import java.io.IOException; +import java.net.URISyntaxException; + +/** + * Some failing tests highlighting errors/problems in KickC + */ +public class TestErrors extends TestCase { + + ReferenceHelper helper; + + String testPath; + + public TestErrors() throws IOException { + testPath = "src/main/java/dk/camelot64/kickc/test/"; + helper = new ReferenceHelper("dk/camelot64/kickc/test/ref/"); + } + + public void testIncD020() throws IOException, URISyntaxException { + compileAndCompare("incd020"); + } + + public void testUseUninitialized() throws IOException, URISyntaxException { + String filename = "useuninitialized"; + compileAndCompare(filename); + } + + public void testWordExpr() throws IOException, URISyntaxException { + String filename = "wordexpr"; + compileAndCompare(filename); + } + + public void testForRangeSymbolic() throws IOException, URISyntaxException { + String filename = "forrangesymbolic"; + compileAndCompare(filename); + } + + public void testInlineArrayProblem() throws IOException, URISyntaxException { + String filename = "inlinearrayproblem"; + compileAndCompare(filename); + } + + public void testForIncrementAssign() throws IOException, URISyntaxException { + String filename = "forincrementassign"; + compileAndCompare(filename); + } + + public void testCallConstParamProblem() throws IOException, URISyntaxException { + String filename = "callconstparamproblem"; + compileAndCompare(filename); + } + + private void compileAndCompare(String filename) throws IOException, URISyntaxException { + TestErrors tester = new TestErrors(); + tester.testFile(filename); + } + + private void testFile(String fileName) throws IOException, URISyntaxException { + String inputPath = testPath + fileName + ".kc"; + System.out.println("Testing output for " + inputPath); + CharStream input = CharStreams.fromFileName(inputPath); + Compiler compiler = new Compiler(); + Program program = compiler.compile(input); + boolean success = true; + success &= helper.testOutput(fileName, ".asm", program.getAsm().toString(false)); + success &= helper.testOutput(fileName, ".sym", program.getScope().getSymbolTableContents(program)); + success &= helper.testOutput(fileName, ".cfg", program.getGraph().toString(program)); + success &= helper.testOutput(fileName, ".log", program.getLog().toString()); + if (!success) { + fail("Output does not match reference!"); + } + } + + +} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/test/TestCompilationOutput.java b/src/main/java/dk/camelot64/kickc/test/TestPrograms.java similarity index 92% rename from src/main/java/dk/camelot64/kickc/test/TestCompilationOutput.java rename to src/main/java/dk/camelot64/kickc/test/TestPrograms.java index 4b8078a9d..3493f2184 100644 --- a/src/main/java/dk/camelot64/kickc/test/TestCompilationOutput.java +++ b/src/main/java/dk/camelot64/kickc/test/TestPrograms.java @@ -13,13 +13,13 @@ import java.net.URISyntaxException; /** * Compile a number of source files and compare the resulting assembler with expected output */ -public class TestCompilationOutput extends TestCase { +public class TestPrograms extends TestCase { ReferenceHelper helper; String testPath; - public TestCompilationOutput() throws IOException { + public TestPrograms() throws IOException { testPath = "src/main/java/dk/camelot64/kickc/test/"; helper = new ReferenceHelper("dk/camelot64/kickc/test/ref/"); } @@ -40,10 +40,6 @@ public class TestCompilationOutput extends TestCase { compileAndCompare("literals"); } - public void testIncD020() throws IOException, URISyntaxException { - compileAndCompare("incd020"); - } - public void testScroll() throws IOException, URISyntaxException { compileAndCompare("scroll"); } @@ -144,11 +140,6 @@ public class TestCompilationOutput extends TestCase { compileAndCompare("forrangemin"); } - public void testUseUninitialized() throws IOException, URISyntaxException { - String filename = "useuninitialized"; - compileAndCompare(filename); - } - public void testUseUndeclared() throws IOException, URISyntaxException { try { compileAndCompare("useundeclared"); @@ -161,7 +152,7 @@ public class TestCompilationOutput extends TestCase { private void compileAndCompare(String filename) throws IOException, URISyntaxException { - TestCompilationOutput tester = new TestCompilationOutput(); + TestPrograms tester = new TestPrograms(); tester.testFile(filename); } diff --git a/src/main/java/dk/camelot64/kickc/test/bitmap-bresenham.kc b/src/main/java/dk/camelot64/kickc/test/bitmap-bresenham.kc index 925e3232d..fcde9528d 100644 --- a/src/main/java/dk/camelot64/kickc/test/bitmap-bresenham.kc +++ b/src/main/java/dk/camelot64/kickc/test/bitmap-bresenham.kc @@ -18,8 +18,6 @@ byte CSEL = %00001000; byte* SCREEN = $400; const byte* BITMAP = $2000; -// TODO: Make all arrays in-program allocations - byte[$100] plot_xlo; -// TODO: Create a fill-like array initialization - byte[$100] plot_xlo = { [x] = x&$f8 }; byte[] plot_xlo = $1000; byte[] plot_xhi = $1100; byte[] plot_ylo = $1200; @@ -30,8 +28,7 @@ void main() { *BGCOL = 0; *FGCOL = 0; *D011 = BMM|DEN|RSEL|3; - //TODO: Add ability to cast byte* to word. *D018 = ((word)SCREEN/$40)|((word)BITMAP/$400); - *D018 = $18; + *D018 = $18; // Needs casting for *D018 = ((word)SCREEN/$40)|((word)BITMAP/$400); initscreen(); initplottables(); // TODO: Error with constant identification of the parameters! @@ -40,7 +37,6 @@ void main() { } void line(byte x0, byte y0, byte x1, byte y1) { - //byte* plotter; byte xd = x1-x0; byte yd = y1-y0; byte x = x0; @@ -48,11 +44,7 @@ void line(byte x0, byte y0, byte x1, byte y1) { byte e = yd>>1; do { plot(x,y); - // TODO: Nice2have: Support array-initializer as words. plotter = { plot_xlo[x]+plot_ylo[y], plot_xhi[x]+plot_yhi[y] }; - // TODO: Need2have: Ensure coalescing of plotter#0 and plotter#1 into a single live range equivalence class. - //plotter = plot_xhi[x]+plot_yhi[y]; - //*plotter = *plotter | plot_bit[x]; + // TODO: Ensure coalescing of plotter#0 and plotter#1 into a single live range equivalence class. x = x + 1; e = e+yd; if(xdyoffs; if((y&$7)==7) { - // TODO: Error: Identify 8*40 as a word constant (not a byte) - yoffs = yoffs + 320; + yoffs = yoffs + 320; // Needs better constant type inference for yoffs = yoffs + 40*8; } } - } -// TODO: Implement inline functions (will be perfect for plot) void plot(byte x, byte y) { + // TODO: This assignment is needed - to avoid plotter var being destroyed during compilation. Find a way to eliminate it. byte* plotter = BITMAP; plotter = plot_xhi[x]+plot_yhi[y]; - // TODO: Error - plotter part. Requires new logic? + // TODO: plotter part. Requires new logic? *plotter = *plotter | plot_bit[x]; } -//TODO: Add a default main()-call. main(); diff --git a/src/main/java/dk/camelot64/kickc/test/forincrementassign.kc b/src/main/java/dk/camelot64/kickc/test/forincrementassign.kc new file mode 100644 index 000000000..2c85ee6a7 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/forincrementassign.kc @@ -0,0 +1,10 @@ +// Classic for() does not allow assignment as increment, eg. for(byte i=0;i<25;i=i+2) {} +// The following should give a program rendering a char on every second char of the first line - but results in a syntax error + +byte* SCREEN = $0400; +main(); +void main() { + for(byte i=0;i<40;i=i+2) { + SCREEN[i] = i; + } +} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/test/forrangesymbolic.kc b/src/main/java/dk/camelot64/kickc/test/forrangesymbolic.kc new file mode 100644 index 000000000..b0cbe1a16 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/forrangesymbolic.kc @@ -0,0 +1,11 @@ +// Range-based for does not recognize symbolic constants. +// The following should work but gives a not-constant exception + +main(); + +void main() { + const byte* BITMAP = $2000; + for(byte* b : BITMAP..BITMAP+$2000) { + *b = $5a; + } +} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/test/incd020.kc b/src/main/java/dk/camelot64/kickc/test/incd020.kc index b42aefe14..32dc5d730 100644 --- a/src/main/java/dk/camelot64/kickc/test/incd020.kc +++ b/src/main/java/dk/camelot64/kickc/test/incd020.kc @@ -1,3 +1,6 @@ +// Incrementing / decrementing pointer content should result in code modifying the memory location - eg. inc $d020. +// Currently it does not but instead leads to just reading the value a few times. + byte* BGCOL = $d020; main(); void main() { diff --git a/src/main/java/dk/camelot64/kickc/test/inlinearrayproblem.kc b/src/main/java/dk/camelot64/kickc/test/inlinearrayproblem.kc new file mode 100644 index 000000000..8d1ba414c --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/inlinearrayproblem.kc @@ -0,0 +1,11 @@ +// Arrays / strings allocated inline destroy functions (because they are allocated where the call enters. +// The following places the text at the start of the main-function - and JSR's straight into the text - not the code. + +byte* SCREEN = $0400; +main(); +void main() { + byte[] txt = "qwe"; + for( byte i : 0..3) { + SCREEN[i] = txt[i]; + } +} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm new file mode 100644 index 000000000..17710d51b --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.asm @@ -0,0 +1,218 @@ + .const COLS = $d800 + .const BGCOL = $d020 + .const FGCOL = $d021 + .const SCROLL = $d016 + .const D018 = $d018 + .const D011 = $d011 + .const RST8 = $80 + .const ECM = $40 + .const BMM = $20 + .const DEN = $10 + .const RSEL = 8 + .const D016 = $d016 + .const MCM = $10 + .const CSEL = 8 + .const SCREEN = $400 + .const BITMAP = $2000 + .const plot_xlo = $1000 + .const plot_xhi = $1100 + .const plot_ylo = $1200 + .const plot_yhi = $1300 + .const plot_bit = $1400 + jsr main +main: { + lda #0 + sta BGCOL + sta FGCOL + lda #BMM|DEN|RSEL|3 + sta D011 + lda #$18 + sta D018 + jsr initscreen + jsr initplottables + lda #y0 + sta line.y + ldx #$a + lda #x0 + sta line.x + lda #$14 + sta line.x1 + jsr line + lda #y0 + sta line.y + ldx #$28 + lda #x0 + sta line.x + lda #$28 + sta line.x1 + jsr line + rts +} +line: { + .const x0 = 0 + .const y0 = 0 + .label xd = 8 + .label yd = 9 + .label x = 3 + .label y = 4 + .label e = 5 + .label x1 = 2 + lda x1 + sec + sbc x + sta xd + txa + sec + sbc y + sta yd + lda yd + lsr + sta e + b1: + ldx x + ldy y + jsr plot + inc x + lda e + clc + adc yd + sta e + lda xd + cmp e + bcs b2 + inc y + lda e + sec + sbc xd + sta e + b2: + lda x1 + clc + adc #1 + cmp x + bcs b1 + rts +} +plot: { + .label _0 = 10 + .label _3 = 10 + .label _6 = 10 + .label plotter = 6 + lda plot_xlo,x + sta _0 + lda plot_ylo,y + clc + adc _0 + sta plotter + lda #>BITMAP + sta plotter+1 + lda plot_xhi,x + sta _3 + lda plot_yhi,y + clc + adc _3 + sta plotter+1 + ldy #0 + lda (plotter),y + sta _6 + lda plot_bit,x + ora _6 + sta (plotter),y + rts +} +initplottables: { + .label _6 = 2 + .label yoffs = 6 + ldy #$80 + ldx #0 + b1: + txa + and #$f8 + sta plot_xlo,x + lda #>BITMAP + sta plot_xhi,x + tya + sta plot_bit,x + tya + lsr + tay + cpy #0 + bne b10 + ldy #$80 + b2: + inx + cpx #0 + bne b1 + lda #0 + sta yoffs + sta yoffs+1 + ldx #0 + b3: + txa + and #7 + sta _6 + lda yoffs + ora _6 + sta plot_ylo,x + lda yoffs+1 + sta plot_yhi,x + txa + and #7 + cmp #7 + bne b4 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + b4: + inx + cpx #0 + bne b3 + rts + b10: + jmp b2 +} +initscreen: { + .label b = 6 + .label c = 6 + lda #BITMAP + sta b+1 + b1: + ldy #0 + lda #0 + sta (b),y + inc b + bne !+ + inc b+1 + !: + lda b+1 + cmp #>BITMAP+$2000 + bne b1 + lda b + cmp #SCREEN + sta c+1 + b2: + ldy #0 + lda #$14 + sta (c),y + inc c + bne !+ + inc c+1 + !: + lda c+1 + cmp #>SCREEN+$400 + bne b2 + lda c + cmp #> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] + to:line::@1 +line::@1: scope:[line] from line line::@2 + [14] (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [14] (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [14] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] + [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] + [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + to:line::@5 +line::@5: scope:[line] from line::@1 + [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] + [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] + [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] + to:line::@3 +line::@3: scope:[line] from line::@5 + [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] + [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] + to:line::@2 +line::@2: scope:[line] from line::@3 line::@5 + [23] (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + [23] (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] + [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + to:line::@return +line::@return: scope:[line] from line::@2 + [26] return [ ] + to:@return +plot: scope:[plot] from line::@1 + [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] + [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] + [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] + [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] + [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] + [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] + [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] + [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] + [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] + [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] + [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] + [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] + to:plot::@return +plot::@return: scope:[plot] from plot + [39] return [ ] + to:@return +initplottables: scope:[initplottables] from main::@1 + [40] phi() [ ] + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + [41] (byte) initplottables::bit#3 ← phi( initplottables/(byte) 128 initplottables::@2/(byte) initplottables::bit#4 ) [ initplottables::x#2 initplottables::bit#3 ] + [41] (byte) initplottables::x#2 ← phi( initplottables/(byte) 0 initplottables::@2/(byte) initplottables::x#1 ) [ initplottables::x#2 initplottables::bit#3 ] + [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] + [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] + [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] + [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] + [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] + [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] + to:initplottables::@2 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@10 + [48] (byte) initplottables::bit#4 ← phi( initplottables::@10/(byte) initplottables::bit#1 initplottables::@1/(byte) 128 ) [ initplottables::x#2 initplottables::bit#4 ] + [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] + [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@2 initplottables::@4 + [51] (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ] + [51] (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ] + [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] + [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] + [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] + [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] + [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] + [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] + [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] + [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] + to:initplottables::@7 +initplottables::@7: scope:[initplottables] from initplottables::@3 + [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] + to:initplottables::@4 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + [61] (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) [ initplottables::y#2 initplottables::yoffs#4 ] + [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] + [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] + to:initplottables::@return +initplottables::@return: scope:[initplottables] from initplottables::@4 + [64] return [ ] + to:@return +initplottables::@10: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initscreen: scope:[initscreen] from main + [65] phi() [ ] + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + [66] (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) BITMAP#0 initscreen::@1/(byte*) initscreen::b#1 ) [ initscreen::b#2 ] + [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] + [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] + [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@2 + [70] (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@1/(const byte*) SCREEN#0 ) [ initscreen::c#2 ] + [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] + [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] + [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + [74] return [ ] + to:@return diff --git a/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log new file mode 100644 index 000000000..eb5444042 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log @@ -0,0 +1,8988 @@ +byte* COLS = $d800; +byte* BGCOL = $d020; +byte* FGCOL = $d021; +byte* SCROLL = $d016; +byte* D018 = $d018; + +byte* D011 = $d011; +byte RST8 = %10000000; +byte ECM = %01000000; +byte BMM = %00100000; +byte DEN = %00010000; +byte RSEL = %00001000; + +byte* D016 = $d016; +byte MCM = %00010000; +byte CSEL = %00001000; + +byte* SCREEN = $400; +const byte* BITMAP = $2000; + +byte[] plot_xlo = $1000; +byte[] plot_xhi = $1100; +byte[] plot_ylo = $1200; +byte[] plot_yhi = $1300; +byte[] plot_bit = $1400; + +void main() { + *BGCOL = 0; + *FGCOL = 0; + *D011 = BMM|DEN|RSEL|3; + *D018 = $18; // Needs casting for *D018 = ((word)SCREEN/$40)|((word)BITMAP/$400); + initscreen(); + initplottables(); + // TODO: Error with constant identification of the parameters! + line(0,0,20,10); + line(10,20,40,40); +} + +void line(byte x0, byte y0, byte x1, byte y1) { + //byte* plotter; + byte xd = x1-x0; + byte yd = y1-y0; + byte x = x0; + byte y = y0; + byte e = yd>>1; + do { + plot(x,y); + // TODO: Ensure coalescing of plotter#0 and plotter#1 into a single live range equivalence class. + x = x + 1; + e = e+yd; + if(xdBITMAP; + plot_bit[x] = bit; + bit = bit>>1; + if(bit==0) { + bit = $80; + } + } + byte* yoffs = $0; + for(byte y : 0..255) { + plot_ylo[y] = y&$7 | yoffs; + if((y&$7)==7) { + yoffs = yoffs + 320; // Needs better constant type inference for yoffs = yoffs + 40*8; + } + } +} + + + +void plot(byte x, byte y) { + // TODO: This assignment is needed - to avoid plotter var being destroyed during compilation. Find a way to eliminate it. + byte* plotter = BITMAP; + plotter = plot_xhi[x]+plot_yhi[y]; + // TODO: plotter part. Requires new logic? + *plotter = *plotter | plot_bit[x]; +} + +main(); + +Adding pre/post-modifier (byte*) initscreen::b ← ++ (byte*) initscreen::b +Adding pre/post-modifier (byte*) initscreen::c ← ++ (byte*) initscreen::c +Fixing lo/hi-lvalue lo=(plot::plotter) ← plot::$2 +Fixing lo/hi-lvalue hi=(plot::plotter) ← plot::$5 +PROGRAM + (byte*) COLS ← (word) 55296 + (byte*) BGCOL ← (word) 53280 + (byte*) FGCOL ← (word) 53281 + (byte*) SCROLL ← (word) 53270 + (byte*) D018 ← (word) 53272 + (byte*) D011 ← (word) 53265 + (byte) RST8 ← (byte) 128 + (byte) ECM ← (byte) 64 + (byte) BMM ← (byte) 32 + (byte) DEN ← (byte) 16 + (byte) RSEL ← (byte) 8 + (byte*) D016 ← (word) 53270 + (byte) MCM ← (byte) 16 + (byte) CSEL ← (byte) 8 + (byte*) SCREEN ← (word) 1024 + (byte*) BITMAP ← (word) 8192 + (byte[]) plot_xlo ← (word) 4096 + (byte[]) plot_xhi ← (word) 4352 + (byte[]) plot_ylo ← (word) 4608 + (byte[]) plot_yhi ← (word) 4864 + (byte[]) plot_bit ← (word) 5120 +proc (void()) main() + *((byte*) BGCOL) ← (byte) 0 + *((byte*) FGCOL) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM | (byte) DEN + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011) ← (byte~) main::$2 + *((byte*) D018) ← (byte) 24 + (void~) main::$3 ← call initscreen + (void~) main::$4 ← call initplottables + (void~) main::$5 ← call line (byte) 0 (byte) 0 (byte) 20 (byte) 10 + (void~) main::$6 ← call line (byte) 10 (byte) 20 (byte) 40 (byte) 40 +main::@return: + return +endproc // main() +proc (void()) line((byte) line::x0 , (byte) line::y0 , (byte) line::x1 , (byte) line::y1) + (byte~) line::$0 ← (byte) line::x1 - (byte) line::x0 + (byte) line::xd ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1 - (byte) line::y0 + (byte) line::yd ← (byte~) line::$1 + (byte) line::x ← (byte) line::x0 + (byte) line::y ← (byte) line::y0 + (byte~) line::$2 ← (byte) line::yd >> (byte) 1 + (byte) line::e ← (byte~) line::$2 +line::@1: + (void~) line::$3 ← call plot (byte) line::x (byte) line::y + (byte~) line::$4 ← (byte) line::x + (byte) 1 + (byte) line::x ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e + (byte) line::yd + (byte) line::e ← (byte~) line::$5 + (boolean~) line::$6 ← (byte) line::xd < (byte) line::e + (boolean~) line::$7 ← ! (boolean~) line::$6 + if((boolean~) line::$7) goto line::@2 + (byte~) line::$8 ← (byte) line::y + (byte) 1 + (byte) line::y ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e - (byte) line::xd + (byte) line::e ← (byte~) line::$9 +line::@2: + (byte~) line::$10 ← (byte) line::x1 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 +line::@return: + return +endproc // line() +proc (void()) initscreen() + (byte*) initscreen::b ← (byte*) BITMAP +initscreen::@1: + *((byte*) initscreen::b) ← (byte) 0 + (byte*) initscreen::b ← ++ (byte*) initscreen::b + (byte*~) initscreen::$0 ← (byte*) BITMAP + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + (byte*) initscreen::c ← (byte*) SCREEN +initscreen::@2: + *((byte*) initscreen::c) ← (byte) 20 + (byte*) initscreen::c ← ++ (byte*) initscreen::c + (byte*~) initscreen::$2 ← (byte*) SCREEN + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 +initscreen::@return: + return +endproc // initscreen() +proc (void()) initplottables() + (byte) initplottables::bit ← (byte) 128 + (byte) initplottables::x ← (byte) 0 +initplottables::@1: + (byte~) initplottables::$0 ← (byte) initplottables::x & (byte) 248 + *((byte[]) plot_xlo + (byte) initplottables::x) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP + *((byte[]) plot_xhi + (byte) initplottables::x) ← (byte~) initplottables::$1 + *((byte[]) plot_bit + (byte) initplottables::x) ← (byte) initplottables::bit + (byte~) initplottables::$2 ← (byte) initplottables::bit >> (byte) 1 + (byte) initplottables::bit ← (byte~) initplottables::$2 + (boolean~) initplottables::$3 ← (byte) initplottables::bit == (byte) 0 + (boolean~) initplottables::$4 ← ! (boolean~) initplottables::$3 + if((boolean~) initplottables::$4) goto initplottables::@2 + (byte) initplottables::bit ← (byte) 128 +initplottables::@2: + (byte) initplottables::x ← ++ (byte) initplottables::x + (boolean~) initplottables::$5 ← (byte) initplottables::x != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + (byte*) initplottables::yoffs ← (byte) 0 + (byte) initplottables::y ← (byte) 0 +initplottables::@3: + (byte~) initplottables::$6 ← (byte) initplottables::y & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo + (byte) initplottables::y) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs + *((byte[]) plot_yhi + (byte) initplottables::y) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y & (byte) 7 + (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 + (boolean~) initplottables::$12 ← ! (boolean~) initplottables::$11 + if((boolean~) initplottables::$12) goto initplottables::@4 + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs + (word) 320 + (byte*) initplottables::yoffs ← (byte*~) initplottables::$13 +initplottables::@4: + (byte) initplottables::y ← ++ (byte) initplottables::y + (boolean~) initplottables::$14 ← (byte) initplottables::y != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 +initplottables::@return: + return +endproc // initplottables() +proc (void()) plot((byte) plot::x , (byte) plot::y) + (byte*) plot::plotter ← (byte*) BITMAP + (byte~) plot::$0 ← (byte[]) plot_xlo *idx (byte) plot::x + (byte~) plot::$1 ← (byte[]) plot_ylo *idx (byte) plot::y + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter ← (byte*) plot::plotter lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi *idx (byte) plot::x + (byte~) plot::$4 ← (byte[]) plot_yhi *idx (byte) plot::y + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter ← (byte*) plot::plotter hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter + (byte~) plot::$7 ← (byte[]) plot_bit *idx (byte) plot::x + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter) ← (byte~) plot::$8 +plot::@return: + return +endproc // plot() + (void~) $0 ← call main + +SYMBOLS +(void~) $0 +(byte*) BGCOL +(byte*) BITMAP +(byte) BMM +(byte*) COLS +(byte) CSEL +(byte*) D011 +(byte*) D016 +(byte*) D018 +(byte) DEN +(byte) ECM +(byte*) FGCOL +(byte) MCM +(byte) RSEL +(byte) RST8 +(byte*) SCREEN +(byte*) SCROLL +(void()) initplottables() +(byte~) initplottables::$0 +(byte~) initplottables::$1 +(byte~) initplottables::$10 +(boolean~) initplottables::$11 +(boolean~) initplottables::$12 +(byte*~) initplottables::$13 +(boolean~) initplottables::$14 +(byte~) initplottables::$2 +(boolean~) initplottables::$3 +(boolean~) initplottables::$4 +(boolean~) initplottables::$5 +(byte~) initplottables::$6 +(byte~) initplottables::$7 +(byte~) initplottables::$8 +(byte~) initplottables::$9 +(label) initplottables::@1 +(label) initplottables::@2 +(label) initplottables::@3 +(label) initplottables::@4 +(label) initplottables::@return +(byte) initplottables::bit +(byte) initplottables::x +(byte) initplottables::y +(byte*) initplottables::yoffs +(void()) initscreen() +(byte*~) initscreen::$0 +(boolean~) initscreen::$1 +(byte*~) initscreen::$2 +(boolean~) initscreen::$3 +(label) initscreen::@1 +(label) initscreen::@2 +(label) initscreen::@return +(byte*) initscreen::b +(byte*) initscreen::c +(void()) line((byte) line::x0 , (byte) line::y0 , (byte) line::x1 , (byte) line::y1) +(byte~) line::$0 +(byte~) line::$1 +(byte~) line::$10 +(boolean~) line::$11 +(byte~) line::$2 +(void~) line::$3 +(byte~) line::$4 +(byte~) line::$5 +(boolean~) line::$6 +(boolean~) line::$7 +(byte~) line::$8 +(byte~) line::$9 +(label) line::@1 +(label) line::@2 +(label) line::@return +(byte) line::e +(byte) line::x +(byte) line::x0 +(byte) line::x1 +(byte) line::xd +(byte) line::y +(byte) line::y0 +(byte) line::y1 +(byte) line::yd +(void()) main() +(byte~) main::$0 +(byte~) main::$1 +(byte~) main::$2 +(void~) main::$3 +(void~) main::$4 +(void~) main::$5 +(void~) main::$6 +(label) main::@return +(void()) plot((byte) plot::x , (byte) plot::y) +(byte~) plot::$0 +(byte~) plot::$1 +(byte~) plot::$2 +(byte~) plot::$3 +(byte~) plot::$4 +(byte~) plot::$5 +(byte~) plot::$6 +(byte~) plot::$7 +(byte~) plot::$8 +(label) plot::@return +(byte*) plot::plotter +(byte) plot::x +(byte) plot::y +(byte[]) plot_bit +(byte[]) plot_xhi +(byte[]) plot_xlo +(byte[]) plot_yhi +(byte[]) plot_ylo + +INITIAL CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS ← (word) 55296 + (byte*) BGCOL ← (word) 53280 + (byte*) FGCOL ← (word) 53281 + (byte*) SCROLL ← (word) 53270 + (byte*) D018 ← (word) 53272 + (byte*) D011 ← (word) 53265 + (byte) RST8 ← (byte) 128 + (byte) ECM ← (byte) 64 + (byte) BMM ← (byte) 32 + (byte) DEN ← (byte) 16 + (byte) RSEL ← (byte) 8 + (byte*) D016 ← (word) 53270 + (byte) MCM ← (byte) 16 + (byte) CSEL ← (byte) 8 + (byte*) SCREEN ← (word) 1024 + (byte*) BITMAP ← (word) 8192 + (byte[]) plot_xlo ← (word) 4096 + (byte[]) plot_xhi ← (word) 4352 + (byte[]) plot_ylo ← (word) 4608 + (byte[]) plot_yhi ← (word) 4864 + (byte[]) plot_bit ← (word) 5120 + to:@1 +main: scope:[main] from + *((byte*) BGCOL) ← (byte) 0 + *((byte*) FGCOL) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM | (byte) DEN + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011) ← (byte~) main::$2 + *((byte*) D018) ← (byte) 24 + (void~) main::$3 ← call initscreen + (void~) main::$4 ← call initplottables + (void~) main::$5 ← call line (byte) 0 (byte) 0 (byte) 20 (byte) 10 + (void~) main::$6 ← call line (byte) 10 (byte) 20 (byte) 40 (byte) 40 + to:main::@return +main::@return: scope:[main] from main + return + to:@return +@1: scope:[] from @begin + to:@2 +line: scope:[line] from + (byte~) line::$0 ← (byte) line::x1 - (byte) line::x0 + (byte) line::xd ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1 - (byte) line::y0 + (byte) line::yd ← (byte~) line::$1 + (byte) line::x ← (byte) line::x0 + (byte) line::y ← (byte) line::y0 + (byte~) line::$2 ← (byte) line::yd >> (byte) 1 + (byte) line::e ← (byte~) line::$2 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (void~) line::$3 ← call plot (byte) line::x (byte) line::y + (byte~) line::$4 ← (byte) line::x + (byte) 1 + (byte) line::x ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e + (byte) line::yd + (byte) line::e ← (byte~) line::$5 + (boolean~) line::$6 ← (byte) line::xd < (byte) line::e + (boolean~) line::$7 ← ! (boolean~) line::$6 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@1 line::@3 + (byte~) line::$10 ← (byte) line::x1 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@4 +line::@3: scope:[line] from line::@1 + (byte~) line::$8 ← (byte) line::y + (byte) 1 + (byte) line::y ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e - (byte) line::xd + (byte) line::e ← (byte~) line::$9 + to:line::@2 +line::@4: scope:[line] from line::@2 + to:line::@return +line::@return: scope:[line] from line::@4 + return + to:@return +@2: scope:[] from @1 + to:@3 +initscreen: scope:[initscreen] from + (byte*) initscreen::b ← (byte*) BITMAP + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + *((byte*) initscreen::b) ← (byte) 0 + (byte*) initscreen::b ← ++ (byte*) initscreen::b + (byte*~) initscreen::$0 ← (byte*) BITMAP + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c ← (byte*) SCREEN + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + *((byte*) initscreen::c) ← (byte) 20 + (byte*) initscreen::c ← ++ (byte*) initscreen::c + (byte*~) initscreen::$2 ← (byte*) SCREEN + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@4 +initscreen::@4: scope:[initscreen] from initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@4 + return + to:@return +@3: scope:[] from @2 + to:@4 +initplottables: scope:[initplottables] from + (byte) initplottables::bit ← (byte) 128 + (byte) initplottables::x ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte~) initplottables::$0 ← (byte) initplottables::x & (byte) 248 + *((byte[]) plot_xlo + (byte) initplottables::x) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP + *((byte[]) plot_xhi + (byte) initplottables::x) ← (byte~) initplottables::$1 + *((byte[]) plot_bit + (byte) initplottables::x) ← (byte) initplottables::bit + (byte~) initplottables::$2 ← (byte) initplottables::bit >> (byte) 1 + (byte) initplottables::bit ← (byte~) initplottables::$2 + (boolean~) initplottables::$3 ← (byte) initplottables::bit == (byte) 0 + (boolean~) initplottables::$4 ← ! (boolean~) initplottables::$3 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::x ← ++ (byte) initplottables::x + (boolean~) initplottables::$5 ← (byte) initplottables::x != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte) initplottables::bit ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte*) initplottables::yoffs ← (byte) 0 + (byte) initplottables::y ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte~) initplottables::$6 ← (byte) initplottables::y & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo + (byte) initplottables::y) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs + *((byte[]) plot_yhi + (byte) initplottables::y) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y & (byte) 7 + (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 + (boolean~) initplottables::$12 ← ! (boolean~) initplottables::$11 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte) initplottables::y ← ++ (byte) initplottables::y + (boolean~) initplottables::$14 ← (byte) initplottables::y != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@8 +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs + (word) 320 + (byte*) initplottables::yoffs ← (byte*~) initplottables::$13 + to:initplottables::@4 +initplottables::@8: scope:[initplottables] from initplottables::@4 + to:initplottables::@return +initplottables::@return: scope:[initplottables] from initplottables::@8 + return + to:@return +@4: scope:[] from @3 + to:@5 +plot: scope:[plot] from + (byte*) plot::plotter ← (byte*) BITMAP + (byte~) plot::$0 ← (byte[]) plot_xlo *idx (byte) plot::x + (byte~) plot::$1 ← (byte[]) plot_ylo *idx (byte) plot::y + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter ← (byte*) plot::plotter lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi *idx (byte) plot::x + (byte~) plot::$4 ← (byte[]) plot_yhi *idx (byte) plot::y + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter ← (byte*) plot::plotter hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter + (byte~) plot::$7 ← (byte[]) plot_bit *idx (byte) plot::x + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @4 + (void~) $0 ← call main + to:@end +@end: scope:[] from @5 + +Removing empty block @1 +Removing empty block line::@4 +Removing empty block @2 +Removing empty block initscreen::@4 +Removing empty block @3 +Removing empty block initplottables::@8 +Removing empty block @4 +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS ← (word) 55296 + (byte*) BGCOL ← (word) 53280 + (byte*) FGCOL ← (word) 53281 + (byte*) SCROLL ← (word) 53270 + (byte*) D018 ← (word) 53272 + (byte*) D011 ← (word) 53265 + (byte) RST8 ← (byte) 128 + (byte) ECM ← (byte) 64 + (byte) BMM ← (byte) 32 + (byte) DEN ← (byte) 16 + (byte) RSEL ← (byte) 8 + (byte*) D016 ← (word) 53270 + (byte) MCM ← (byte) 16 + (byte) CSEL ← (byte) 8 + (byte*) SCREEN ← (word) 1024 + (byte*) BITMAP ← (word) 8192 + (byte[]) plot_xlo ← (word) 4096 + (byte[]) plot_xhi ← (word) 4352 + (byte[]) plot_ylo ← (word) 4608 + (byte[]) plot_yhi ← (word) 4864 + (byte[]) plot_bit ← (word) 5120 + to:@5 +main: scope:[main] from + *((byte*) BGCOL) ← (byte) 0 + *((byte*) FGCOL) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM | (byte) DEN + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011) ← (byte~) main::$2 + *((byte*) D018) ← (byte) 24 + (void~) main::$3 ← call initscreen + (void~) main::$4 ← call initplottables + (void~) main::$5 ← call line (byte) 0 (byte) 0 (byte) 20 (byte) 10 + (void~) main::$6 ← call line (byte) 10 (byte) 20 (byte) 40 (byte) 40 + to:main::@return +main::@return: scope:[main] from main + return + to:@return +line: scope:[line] from + (byte~) line::$0 ← (byte) line::x1 - (byte) line::x0 + (byte) line::xd ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1 - (byte) line::y0 + (byte) line::yd ← (byte~) line::$1 + (byte) line::x ← (byte) line::x0 + (byte) line::y ← (byte) line::y0 + (byte~) line::$2 ← (byte) line::yd >> (byte) 1 + (byte) line::e ← (byte~) line::$2 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (void~) line::$3 ← call plot (byte) line::x (byte) line::y + (byte~) line::$4 ← (byte) line::x + (byte) 1 + (byte) line::x ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e + (byte) line::yd + (byte) line::e ← (byte~) line::$5 + (boolean~) line::$6 ← (byte) line::xd < (byte) line::e + (boolean~) line::$7 ← ! (boolean~) line::$6 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@1 line::@3 + (byte~) line::$10 ← (byte) line::x1 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@1 + (byte~) line::$8 ← (byte) line::y + (byte) 1 + (byte) line::y ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e - (byte) line::xd + (byte) line::e ← (byte~) line::$9 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from + (byte*) initscreen::b ← (byte*) BITMAP + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + *((byte*) initscreen::b) ← (byte) 0 + (byte*) initscreen::b ← ++ (byte*) initscreen::b + (byte*~) initscreen::$0 ← (byte*) BITMAP + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c ← (byte*) SCREEN + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + *((byte*) initscreen::c) ← (byte) 20 + (byte*) initscreen::c ← ++ (byte*) initscreen::c + (byte*~) initscreen::$2 ← (byte*) SCREEN + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from + (byte) initplottables::bit ← (byte) 128 + (byte) initplottables::x ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte~) initplottables::$0 ← (byte) initplottables::x & (byte) 248 + *((byte[]) plot_xlo + (byte) initplottables::x) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP + *((byte[]) plot_xhi + (byte) initplottables::x) ← (byte~) initplottables::$1 + *((byte[]) plot_bit + (byte) initplottables::x) ← (byte) initplottables::bit + (byte~) initplottables::$2 ← (byte) initplottables::bit >> (byte) 1 + (byte) initplottables::bit ← (byte~) initplottables::$2 + (boolean~) initplottables::$3 ← (byte) initplottables::bit == (byte) 0 + (boolean~) initplottables::$4 ← ! (boolean~) initplottables::$3 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::x ← ++ (byte) initplottables::x + (boolean~) initplottables::$5 ← (byte) initplottables::x != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte) initplottables::bit ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte*) initplottables::yoffs ← (byte) 0 + (byte) initplottables::y ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte~) initplottables::$6 ← (byte) initplottables::y & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo + (byte) initplottables::y) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs + *((byte[]) plot_yhi + (byte) initplottables::y) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y & (byte) 7 + (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 + (boolean~) initplottables::$12 ← ! (boolean~) initplottables::$11 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte) initplottables::y ← ++ (byte) initplottables::y + (boolean~) initplottables::$14 ← (byte) initplottables::y != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs + (word) 320 + (byte*) initplottables::yoffs ← (byte*~) initplottables::$13 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from + (byte*) plot::plotter ← (byte*) BITMAP + (byte~) plot::$0 ← (byte[]) plot_xlo *idx (byte) plot::x + (byte~) plot::$1 ← (byte[]) plot_ylo *idx (byte) plot::y + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter ← (byte*) plot::plotter lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi *idx (byte) plot::x + (byte~) plot::$4 ← (byte[]) plot_yhi *idx (byte) plot::y + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter ← (byte*) plot::plotter hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter + (byte~) plot::$7 ← (byte[]) plot_bit *idx (byte) plot::x + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + (void~) $0 ← call main + to:@end +@end: scope:[] from @5 + +PROCEDURE MODIFY VARIABLE ANALYSIS + +CONTROL FLOW GRAPH WITH ASSIGNMENT CALL +@begin: scope:[] from + (byte*) COLS ← (word) 55296 + (byte*) BGCOL ← (word) 53280 + (byte*) FGCOL ← (word) 53281 + (byte*) SCROLL ← (word) 53270 + (byte*) D018 ← (word) 53272 + (byte*) D011 ← (word) 53265 + (byte) RST8 ← (byte) 128 + (byte) ECM ← (byte) 64 + (byte) BMM ← (byte) 32 + (byte) DEN ← (byte) 16 + (byte) RSEL ← (byte) 8 + (byte*) D016 ← (word) 53270 + (byte) MCM ← (byte) 16 + (byte) CSEL ← (byte) 8 + (byte*) SCREEN ← (word) 1024 + (byte*) BITMAP ← (word) 8192 + (byte[]) plot_xlo ← (word) 4096 + (byte[]) plot_xhi ← (word) 4352 + (byte[]) plot_ylo ← (word) 4608 + (byte[]) plot_yhi ← (word) 4864 + (byte[]) plot_bit ← (word) 5120 + to:@5 +main: scope:[main] from @5 + *((byte*) BGCOL) ← (byte) 0 + *((byte*) FGCOL) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM | (byte) DEN + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011) ← (byte~) main::$2 + *((byte*) D018) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) line::x0 ← (byte) 0 + (byte) line::y0 ← (byte) 0 + (byte) line::x1 ← (byte) 20 + (byte) line::y1 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte) line::x0 ← (byte) 10 + (byte) line::y0 ← (byte) 20 + (byte) line::x1 ← (byte) 40 + (byte) line::y1 ← (byte) 40 + call line param-assignment + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte~) line::$0 ← (byte) line::x1 - (byte) line::x0 + (byte) line::xd ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1 - (byte) line::y0 + (byte) line::yd ← (byte~) line::$1 + (byte) line::x ← (byte) line::x0 + (byte) line::y ← (byte) line::y0 + (byte~) line::$2 ← (byte) line::yd >> (byte) 1 + (byte) line::e ← (byte~) line::$2 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) plot::x ← (byte) line::x + (byte) plot::y ← (byte) line::y + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte~) line::$4 ← (byte) line::x + (byte) 1 + (byte) line::x ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e + (byte) line::yd + (byte) line::e ← (byte~) line::$5 + (boolean~) line::$6 ← (byte) line::xd < (byte) line::e + (boolean~) line::$7 ← ! (boolean~) line::$6 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte~) line::$10 ← (byte) line::x1 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte~) line::$8 ← (byte) line::y + (byte) 1 + (byte) line::y ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e - (byte) line::xd + (byte) line::e ← (byte~) line::$9 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) initscreen::b ← (byte*) BITMAP + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + *((byte*) initscreen::b) ← (byte) 0 + (byte*) initscreen::b ← ++ (byte*) initscreen::b + (byte*~) initscreen::$0 ← (byte*) BITMAP + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c ← (byte*) SCREEN + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + *((byte*) initscreen::c) ← (byte) 20 + (byte*) initscreen::c ← ++ (byte*) initscreen::c + (byte*~) initscreen::$2 ← (byte*) SCREEN + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte) initplottables::bit ← (byte) 128 + (byte) initplottables::x ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte~) initplottables::$0 ← (byte) initplottables::x & (byte) 248 + *((byte[]) plot_xlo + (byte) initplottables::x) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP + *((byte[]) plot_xhi + (byte) initplottables::x) ← (byte~) initplottables::$1 + *((byte[]) plot_bit + (byte) initplottables::x) ← (byte) initplottables::bit + (byte~) initplottables::$2 ← (byte) initplottables::bit >> (byte) 1 + (byte) initplottables::bit ← (byte~) initplottables::$2 + (boolean~) initplottables::$3 ← (byte) initplottables::bit == (byte) 0 + (boolean~) initplottables::$4 ← ! (boolean~) initplottables::$3 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::x ← ++ (byte) initplottables::x + (boolean~) initplottables::$5 ← (byte) initplottables::x != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte) initplottables::bit ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte*) initplottables::yoffs ← (byte) 0 + (byte) initplottables::y ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte~) initplottables::$6 ← (byte) initplottables::y & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo + (byte) initplottables::y) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs + *((byte[]) plot_yhi + (byte) initplottables::y) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y & (byte) 7 + (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 + (boolean~) initplottables::$12 ← ! (boolean~) initplottables::$11 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte) initplottables::y ← ++ (byte) initplottables::y + (boolean~) initplottables::$14 ← (byte) initplottables::y != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs + (word) 320 + (byte*) initplottables::yoffs ← (byte*~) initplottables::$13 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte*) plot::plotter ← (byte*) BITMAP + (byte~) plot::$0 ← (byte[]) plot_xlo *idx (byte) plot::x + (byte~) plot::$1 ← (byte[]) plot_ylo *idx (byte) plot::y + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter ← (byte*) plot::plotter lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi *idx (byte) plot::x + (byte~) plot::$4 ← (byte[]) plot_yhi *idx (byte) plot::y + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter ← (byte*) plot::plotter hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter + (byte~) plot::$7 ← (byte[]) plot_bit *idx (byte) plot::x + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 + +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + (byte[]) plot_yhi#18 ← phi( @5/(byte[]) plot_yhi#19 ) + (byte[]) plot_ylo#18 ← phi( @5/(byte[]) plot_ylo#19 ) + (byte*) SCREEN#5 ← phi( @5/(byte*) SCREEN#6 ) + (byte[]) plot_bit#10 ← phi( @5/(byte[]) plot_bit#15 ) + (byte[]) plot_xhi#10 ← phi( @5/(byte[]) plot_xhi#15 ) + (byte[]) plot_xlo#10 ← phi( @5/(byte[]) plot_xlo#15 ) + (byte*) BITMAP#5 ← phi( @5/(byte*) BITMAP#9 ) + (byte*) D018#1 ← phi( @5/(byte*) D018#2 ) + (byte*) D011#1 ← phi( @5/(byte*) D011#2 ) + (byte) RSEL#1 ← phi( @5/(byte) RSEL#2 ) + (byte) DEN#1 ← phi( @5/(byte) DEN#2 ) + (byte) BMM#1 ← phi( @5/(byte) BMM#2 ) + (byte*) FGCOL#1 ← phi( @5/(byte*) FGCOL#2 ) + (byte*) BGCOL#1 ← phi( @5/(byte*) BGCOL#2 ) + *((byte*) BGCOL#1) ← (byte) 0 + *((byte*) FGCOL#1) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#1 | (byte) DEN#1 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#1 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#1) ← (byte~) main::$2 + *((byte*) D018#1) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + (byte[]) plot_yhi#16 ← phi( main/(byte[]) plot_yhi#18 ) + (byte[]) plot_ylo#16 ← phi( main/(byte[]) plot_ylo#18 ) + (byte[]) plot_bit#8 ← phi( main/(byte[]) plot_bit#10 ) + (byte[]) plot_xhi#8 ← phi( main/(byte[]) plot_xhi#10 ) + (byte*) BITMAP#12 ← phi( main/(byte*) BITMAP#5 ) + (byte[]) plot_xlo#8 ← phi( main/(byte[]) plot_xlo#10 ) + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte[]) plot_bit#11 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_yhi#10 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_xhi#11 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte[]) plot_ylo#10 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_xlo#11 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte*) BITMAP#14 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte[]) plot_bit#12 ← phi( main::@2/(byte[]) plot_bit#11 ) + (byte[]) plot_yhi#11 ← phi( main::@2/(byte[]) plot_yhi#10 ) + (byte[]) plot_xhi#12 ← phi( main::@2/(byte[]) plot_xhi#11 ) + (byte[]) plot_ylo#11 ← phi( main::@2/(byte[]) plot_ylo#10 ) + (byte[]) plot_xlo#12 ← phi( main::@2/(byte[]) plot_xlo#11 ) + (byte*) BITMAP#15 ← phi( main::@2/(byte*) BITMAP#14 ) + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte[]) plot_bit#6 ← phi( main::@2/(byte[]) plot_bit#11 main::@3/(byte[]) plot_bit#12 ) + (byte[]) plot_yhi#6 ← phi( main::@2/(byte[]) plot_yhi#10 main::@3/(byte[]) plot_yhi#11 ) + (byte[]) plot_xhi#6 ← phi( main::@2/(byte[]) plot_xhi#11 main::@3/(byte[]) plot_xhi#12 ) + (byte[]) plot_ylo#6 ← phi( main::@2/(byte[]) plot_ylo#10 main::@3/(byte[]) plot_ylo#11 ) + (byte[]) plot_xlo#6 ← phi( main::@2/(byte[]) plot_xlo#11 main::@3/(byte[]) plot_xlo#12 ) + (byte*) BITMAP#10 ← phi( main::@2/(byte*) BITMAP#14 main::@3/(byte*) BITMAP#15 ) + (byte) line::y0#2 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x0#2 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte~) line::$0 ← (byte) line::x1#2 - (byte) line::x0#2 + (byte) line::xd#0 ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1#2 - (byte) line::y0#2 + (byte) line::yd#0 ← (byte~) line::$1 + (byte) line::x#0 ← (byte) line::x0#2 + (byte) line::y#0 ← (byte) line::y0#2 + (byte~) line::$2 ← (byte) line::yd#0 >> (byte) 1 + (byte) line::e#0 ← (byte~) line::$2 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#6 ← phi( line/(byte) line::x1#2 line::@2/(byte) line::x1#3 ) + (byte[]) plot_bit#5 ← phi( line/(byte[]) plot_bit#6 line::@2/(byte[]) plot_bit#7 ) + (byte[]) plot_yhi#5 ← phi( line/(byte[]) plot_yhi#6 line::@2/(byte[]) plot_yhi#7 ) + (byte[]) plot_xhi#5 ← phi( line/(byte[]) plot_xhi#6 line::@2/(byte[]) plot_xhi#7 ) + (byte[]) plot_ylo#5 ← phi( line/(byte[]) plot_ylo#6 line::@2/(byte[]) plot_ylo#7 ) + (byte[]) plot_xlo#5 ← phi( line/(byte[]) plot_xlo#6 line::@2/(byte[]) plot_xlo#7 ) + (byte*) BITMAP#8 ← phi( line/(byte*) BITMAP#10 line::@2/(byte*) BITMAP#11 ) + (byte) line::xd#3 ← phi( line/(byte) line::xd#0 line::@2/(byte) line::xd#4 ) + (byte) line::yd#2 ← phi( line/(byte) line::yd#0 line::@2/(byte) line::yd#3 ) + (byte) line::e#5 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#4 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte[]) plot_bit#14 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#13 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#14 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte[]) plot_ylo#13 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte[]) plot_xlo#14 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#17 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte) line::y#5 ← phi( line::@1/(byte) line::y#2 ) + (byte) line::x1#5 ← phi( line::@1/(byte) line::x1#6 ) + (byte) line::xd#1 ← phi( line::@1/(byte) line::xd#3 ) + (byte) line::yd#1 ← phi( line::@1/(byte) line::yd#2 ) + (byte) line::e#3 ← phi( line::@1/(byte) line::e#5 ) + (byte) line::x#3 ← phi( line::@1/(byte) line::x#2 ) + (byte~) line::$4 ← (byte) line::x#3 + (byte) 1 + (byte) line::x#1 ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e#3 + (byte) line::yd#1 + (byte) line::e#1 ← (byte~) line::$5 + (boolean~) line::$6 ← (byte) line::xd#1 < (byte) line::e#1 + (boolean~) line::$7 ← ! (boolean~) line::$6 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte[]) plot_bit#7 ← phi( line::@3/(byte[]) plot_bit#13 line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#7 ← phi( line::@3/(byte[]) plot_yhi#12 line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#7 ← phi( line::@3/(byte[]) plot_xhi#13 line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#7 ← phi( line::@3/(byte[]) plot_ylo#12 line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#7 ← phi( line::@3/(byte[]) plot_xlo#13 line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#11 ← phi( line::@3/(byte*) BITMAP#16 line::@5/(byte*) BITMAP#17 ) + (byte) line::xd#4 ← phi( line::@3/(byte) line::xd#2 line::@5/(byte) line::xd#1 ) + (byte) line::yd#3 ← phi( line::@3/(byte) line::yd#4 line::@5/(byte) line::yd#1 ) + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#5 ) + (byte) line::x#4 ← phi( line::@3/(byte) line::x#5 line::@5/(byte) line::x#1 ) + (byte) line::x1#3 ← phi( line::@3/(byte) line::x1#4 line::@5/(byte) line::x1#5 ) + (byte~) line::$10 ← (byte) line::x1#3 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x#4 < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte[]) plot_bit#13 ← phi( line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#12 ← phi( line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#13 ← phi( line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#12 ← phi( line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#13 ← phi( line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#16 ← phi( line::@5/(byte*) BITMAP#17 ) + (byte) line::yd#4 ← phi( line::@5/(byte) line::yd#1 ) + (byte) line::x#5 ← phi( line::@5/(byte) line::x#1 ) + (byte) line::x1#4 ← phi( line::@5/(byte) line::x1#5 ) + (byte) line::xd#2 ← phi( line::@5/(byte) line::xd#1 ) + (byte) line::e#4 ← phi( line::@5/(byte) line::e#1 ) + (byte) line::y#3 ← phi( line::@5/(byte) line::y#5 ) + (byte~) line::$8 ← (byte) line::y#3 + (byte) 1 + (byte) line::y#1 ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e#4 - (byte) line::xd#2 + (byte) line::e#2 ← (byte~) line::$9 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) SCREEN#4 ← phi( main/(byte*) SCREEN#5 ) + (byte*) BITMAP#1 ← phi( main/(byte*) BITMAP#5 ) + (byte*) initscreen::b#0 ← (byte*) BITMAP#1 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#3 ← phi( initscreen/(byte*) SCREEN#4 initscreen::@1/(byte*) SCREEN#3 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#1 initscreen::@1/(byte*) BITMAP#2 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b#1 != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen::@1/(byte*) SCREEN#3 ) + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@2/(byte*) SCREEN#2 initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c#1 != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte[]) plot_yhi#17 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_ylo#17 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_bit#3 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_xhi#3 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte*) BITMAP#6 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte[]) plot_xlo#3 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#17 initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#17 initplottables::@2/(byte[]) plot_ylo#8 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#3 initplottables::@2/(byte[]) plot_bit#4 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#3 initplottables::@2/(byte[]) plot_xhi#4 ) + (byte*) BITMAP#3 ← phi( initplottables/(byte*) BITMAP#6 initplottables::@2/(byte*) BITMAP#7 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#3 initplottables::@2/(byte[]) plot_xlo#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#3 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte~) initplottables::$2 ← (byte) initplottables::bit#3 >> (byte) 1 + (byte) initplottables::bit#1 ← (byte~) initplottables::$2 + (boolean~) initplottables::$3 ← (byte) initplottables::bit#1 == (byte) 0 + (boolean~) initplottables::$4 ← ! (boolean~) initplottables::$3 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte[]) plot_yhi#8 ← phi( initplottables::@1/(byte[]) plot_yhi#14 initplottables::@5/(byte[]) plot_yhi#15 ) + (byte[]) plot_ylo#8 ← phi( initplottables::@1/(byte[]) plot_ylo#14 initplottables::@5/(byte[]) plot_ylo#15 ) + (byte[]) plot_bit#4 ← phi( initplottables::@1/(byte[]) plot_bit#1 initplottables::@5/(byte[]) plot_bit#9 ) + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte[]) plot_xhi#4 ← phi( initplottables::@1/(byte[]) plot_xhi#1 initplottables::@5/(byte[]) plot_xhi#9 ) + (byte*) BITMAP#7 ← phi( initplottables::@1/(byte*) BITMAP#3 initplottables::@5/(byte*) BITMAP#13 ) + (byte[]) plot_xlo#4 ← phi( initplottables::@1/(byte[]) plot_xlo#1 initplottables::@5/(byte[]) plot_xlo#9 ) + (byte) initplottables::x#3 ← phi( initplottables::@1/(byte) initplottables::x#2 initplottables::@5/(byte) initplottables::x#4 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#3 + (boolean~) initplottables::$5 ← (byte) initplottables::x#1 != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte[]) plot_yhi#15 ← phi( initplottables::@1/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#15 ← phi( initplottables::@1/(byte[]) plot_ylo#14 ) + (byte[]) plot_bit#9 ← phi( initplottables::@1/(byte[]) plot_bit#1 ) + (byte[]) plot_xhi#9 ← phi( initplottables::@1/(byte[]) plot_xhi#1 ) + (byte*) BITMAP#13 ← phi( initplottables::@1/(byte*) BITMAP#3 ) + (byte[]) plot_xlo#9 ← phi( initplottables::@1/(byte[]) plot_xlo#1 ) + (byte) initplottables::x#4 ← phi( initplottables::@1/(byte) initplottables::x#2 ) + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte[]) plot_yhi#4 ← phi( initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#4 ← phi( initplottables::@2/(byte[]) plot_ylo#8 ) + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@4/(byte[]) plot_yhi#3 initplottables::@6/(byte[]) plot_yhi#4 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@4/(byte[]) plot_ylo#3 initplottables::@6/(byte[]) plot_ylo#4 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 + (boolean~) initplottables::$12 ← ! (boolean~) initplottables::$11 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte[]) plot_yhi#3 ← phi( initplottables::@3/(byte[]) plot_yhi#1 initplottables::@7/(byte[]) plot_yhi#9 ) + (byte[]) plot_ylo#3 ← phi( initplottables::@3/(byte[]) plot_ylo#1 initplottables::@7/(byte[]) plot_ylo#9 ) + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#3 ← phi( initplottables::@3/(byte) initplottables::y#2 initplottables::@7/(byte) initplottables::y#4 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#3 + (boolean~) initplottables::$14 ← (byte) initplottables::y#1 != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte[]) plot_yhi#9 ← phi( initplottables::@3/(byte[]) plot_yhi#1 ) + (byte[]) plot_ylo#9 ← phi( initplottables::@3/(byte[]) plot_ylo#1 ) + (byte) initplottables::y#4 ← phi( initplottables::@3/(byte) initplottables::y#2 ) + (byte*) initplottables::yoffs#3 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 ) + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs#3 + (word) 320 + (byte*) initplottables::yoffs#1 ← (byte*~) initplottables::$13 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte[]) plot_bit#2 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#2 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#2 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte) plot::y#1 ← phi( line::@1/(byte) plot::y#0 ) + (byte[]) plot_ylo#2 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte) plot::x#1 ← phi( line::@1/(byte) plot::x#0 ) + (byte[]) plot_xlo#2 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#4 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte*) plot::plotter#0 ← (byte*) BITMAP#4 + (byte~) plot::$0 ← (byte[]) plot_xlo#2 *idx (byte) plot::x#1 + (byte~) plot::$1 ← (byte[]) plot_ylo#2 *idx (byte) plot::y#1 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#2 *idx (byte) plot::x#1 + (byte~) plot::$4 ← (byte[]) plot_yhi#2 *idx (byte) plot::y#1 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#2 *idx (byte) plot::x#1 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + (byte[]) plot_yhi#19 ← phi( @begin/(byte[]) plot_yhi#0 ) + (byte[]) plot_ylo#19 ← phi( @begin/(byte[]) plot_ylo#0 ) + (byte*) SCREEN#6 ← phi( @begin/(byte*) SCREEN#0 ) + (byte[]) plot_bit#15 ← phi( @begin/(byte[]) plot_bit#0 ) + (byte[]) plot_xhi#15 ← phi( @begin/(byte[]) plot_xhi#0 ) + (byte[]) plot_xlo#15 ← phi( @begin/(byte[]) plot_xlo#0 ) + (byte*) BITMAP#9 ← phi( @begin/(byte*) BITMAP#0 ) + (byte*) D018#2 ← phi( @begin/(byte*) D018#0 ) + (byte*) D011#2 ← phi( @begin/(byte*) D011#0 ) + (byte) RSEL#2 ← phi( @begin/(byte) RSEL#0 ) + (byte) DEN#2 ← phi( @begin/(byte) DEN#0 ) + (byte) BMM#2 ← phi( @begin/(byte) BMM#0 ) + (byte*) FGCOL#2 ← phi( @begin/(byte*) FGCOL#0 ) + (byte*) BGCOL#2 ← phi( @begin/(byte*) BGCOL#0 ) + call main param-assignment + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 + +CONTROL FLOW GRAPH WITH ASSIGNMENT CALL & RETURN +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + (byte[]) plot_yhi#18 ← phi( @5/(byte[]) plot_yhi#19 ) + (byte[]) plot_ylo#18 ← phi( @5/(byte[]) plot_ylo#19 ) + (byte*) SCREEN#5 ← phi( @5/(byte*) SCREEN#6 ) + (byte[]) plot_bit#10 ← phi( @5/(byte[]) plot_bit#15 ) + (byte[]) plot_xhi#10 ← phi( @5/(byte[]) plot_xhi#15 ) + (byte[]) plot_xlo#10 ← phi( @5/(byte[]) plot_xlo#15 ) + (byte*) BITMAP#5 ← phi( @5/(byte*) BITMAP#9 ) + (byte*) D018#1 ← phi( @5/(byte*) D018#2 ) + (byte*) D011#1 ← phi( @5/(byte*) D011#2 ) + (byte) RSEL#1 ← phi( @5/(byte) RSEL#2 ) + (byte) DEN#1 ← phi( @5/(byte) DEN#2 ) + (byte) BMM#1 ← phi( @5/(byte) BMM#2 ) + (byte*) FGCOL#1 ← phi( @5/(byte*) FGCOL#2 ) + (byte*) BGCOL#1 ← phi( @5/(byte*) BGCOL#2 ) + *((byte*) BGCOL#1) ← (byte) 0 + *((byte*) FGCOL#1) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#1 | (byte) DEN#1 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#1 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#1) ← (byte~) main::$2 + *((byte*) D018#1) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + (byte[]) plot_yhi#16 ← phi( main/(byte[]) plot_yhi#18 ) + (byte[]) plot_ylo#16 ← phi( main/(byte[]) plot_ylo#18 ) + (byte[]) plot_bit#8 ← phi( main/(byte[]) plot_bit#10 ) + (byte[]) plot_xhi#8 ← phi( main/(byte[]) plot_xhi#10 ) + (byte*) BITMAP#12 ← phi( main/(byte*) BITMAP#5 ) + (byte[]) plot_xlo#8 ← phi( main/(byte[]) plot_xlo#10 ) + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte[]) plot_bit#11 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_yhi#10 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_xhi#11 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte[]) plot_ylo#10 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_xlo#11 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte*) BITMAP#14 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte[]) plot_bit#12 ← phi( main::@2/(byte[]) plot_bit#11 ) + (byte[]) plot_yhi#11 ← phi( main::@2/(byte[]) plot_yhi#10 ) + (byte[]) plot_xhi#12 ← phi( main::@2/(byte[]) plot_xhi#11 ) + (byte[]) plot_ylo#11 ← phi( main::@2/(byte[]) plot_ylo#10 ) + (byte[]) plot_xlo#12 ← phi( main::@2/(byte[]) plot_xlo#11 ) + (byte*) BITMAP#15 ← phi( main::@2/(byte*) BITMAP#14 ) + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte[]) plot_bit#6 ← phi( main::@2/(byte[]) plot_bit#11 main::@3/(byte[]) plot_bit#12 ) + (byte[]) plot_yhi#6 ← phi( main::@2/(byte[]) plot_yhi#10 main::@3/(byte[]) plot_yhi#11 ) + (byte[]) plot_xhi#6 ← phi( main::@2/(byte[]) plot_xhi#11 main::@3/(byte[]) plot_xhi#12 ) + (byte[]) plot_ylo#6 ← phi( main::@2/(byte[]) plot_ylo#10 main::@3/(byte[]) plot_ylo#11 ) + (byte[]) plot_xlo#6 ← phi( main::@2/(byte[]) plot_xlo#11 main::@3/(byte[]) plot_xlo#12 ) + (byte*) BITMAP#10 ← phi( main::@2/(byte*) BITMAP#14 main::@3/(byte*) BITMAP#15 ) + (byte) line::y0#2 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x0#2 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte~) line::$0 ← (byte) line::x1#2 - (byte) line::x0#2 + (byte) line::xd#0 ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1#2 - (byte) line::y0#2 + (byte) line::yd#0 ← (byte~) line::$1 + (byte) line::x#0 ← (byte) line::x0#2 + (byte) line::y#0 ← (byte) line::y0#2 + (byte~) line::$2 ← (byte) line::yd#0 >> (byte) 1 + (byte) line::e#0 ← (byte~) line::$2 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#6 ← phi( line/(byte) line::x1#2 line::@2/(byte) line::x1#3 ) + (byte[]) plot_bit#5 ← phi( line/(byte[]) plot_bit#6 line::@2/(byte[]) plot_bit#7 ) + (byte[]) plot_yhi#5 ← phi( line/(byte[]) plot_yhi#6 line::@2/(byte[]) plot_yhi#7 ) + (byte[]) plot_xhi#5 ← phi( line/(byte[]) plot_xhi#6 line::@2/(byte[]) plot_xhi#7 ) + (byte[]) plot_ylo#5 ← phi( line/(byte[]) plot_ylo#6 line::@2/(byte[]) plot_ylo#7 ) + (byte[]) plot_xlo#5 ← phi( line/(byte[]) plot_xlo#6 line::@2/(byte[]) plot_xlo#7 ) + (byte*) BITMAP#8 ← phi( line/(byte*) BITMAP#10 line::@2/(byte*) BITMAP#11 ) + (byte) line::xd#3 ← phi( line/(byte) line::xd#0 line::@2/(byte) line::xd#4 ) + (byte) line::yd#2 ← phi( line/(byte) line::yd#0 line::@2/(byte) line::yd#3 ) + (byte) line::e#5 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#4 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte[]) plot_bit#14 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#13 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#14 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte[]) plot_ylo#13 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte[]) plot_xlo#14 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#17 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte) line::y#5 ← phi( line::@1/(byte) line::y#2 ) + (byte) line::x1#5 ← phi( line::@1/(byte) line::x1#6 ) + (byte) line::xd#1 ← phi( line::@1/(byte) line::xd#3 ) + (byte) line::yd#1 ← phi( line::@1/(byte) line::yd#2 ) + (byte) line::e#3 ← phi( line::@1/(byte) line::e#5 ) + (byte) line::x#3 ← phi( line::@1/(byte) line::x#2 ) + (byte~) line::$4 ← (byte) line::x#3 + (byte) 1 + (byte) line::x#1 ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e#3 + (byte) line::yd#1 + (byte) line::e#1 ← (byte~) line::$5 + (boolean~) line::$6 ← (byte) line::xd#1 < (byte) line::e#1 + (boolean~) line::$7 ← ! (boolean~) line::$6 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte[]) plot_bit#7 ← phi( line::@3/(byte[]) plot_bit#13 line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#7 ← phi( line::@3/(byte[]) plot_yhi#12 line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#7 ← phi( line::@3/(byte[]) plot_xhi#13 line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#7 ← phi( line::@3/(byte[]) plot_ylo#12 line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#7 ← phi( line::@3/(byte[]) plot_xlo#13 line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#11 ← phi( line::@3/(byte*) BITMAP#16 line::@5/(byte*) BITMAP#17 ) + (byte) line::xd#4 ← phi( line::@3/(byte) line::xd#2 line::@5/(byte) line::xd#1 ) + (byte) line::yd#3 ← phi( line::@3/(byte) line::yd#4 line::@5/(byte) line::yd#1 ) + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#5 ) + (byte) line::x#4 ← phi( line::@3/(byte) line::x#5 line::@5/(byte) line::x#1 ) + (byte) line::x1#3 ← phi( line::@3/(byte) line::x1#4 line::@5/(byte) line::x1#5 ) + (byte~) line::$10 ← (byte) line::x1#3 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x#4 < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte[]) plot_bit#13 ← phi( line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#12 ← phi( line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#13 ← phi( line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#12 ← phi( line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#13 ← phi( line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#16 ← phi( line::@5/(byte*) BITMAP#17 ) + (byte) line::yd#4 ← phi( line::@5/(byte) line::yd#1 ) + (byte) line::x#5 ← phi( line::@5/(byte) line::x#1 ) + (byte) line::x1#4 ← phi( line::@5/(byte) line::x1#5 ) + (byte) line::xd#2 ← phi( line::@5/(byte) line::xd#1 ) + (byte) line::e#4 ← phi( line::@5/(byte) line::e#1 ) + (byte) line::y#3 ← phi( line::@5/(byte) line::y#5 ) + (byte~) line::$8 ← (byte) line::y#3 + (byte) 1 + (byte) line::y#1 ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e#4 - (byte) line::xd#2 + (byte) line::e#2 ← (byte~) line::$9 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) SCREEN#4 ← phi( main/(byte*) SCREEN#5 ) + (byte*) BITMAP#1 ← phi( main/(byte*) BITMAP#5 ) + (byte*) initscreen::b#0 ← (byte*) BITMAP#1 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#3 ← phi( initscreen/(byte*) SCREEN#4 initscreen::@1/(byte*) SCREEN#3 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#1 initscreen::@1/(byte*) BITMAP#2 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b#1 != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen::@1/(byte*) SCREEN#3 ) + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@2/(byte*) SCREEN#2 initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c#1 != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte[]) plot_yhi#17 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_ylo#17 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_bit#3 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_xhi#3 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte*) BITMAP#6 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte[]) plot_xlo#3 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#17 initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#17 initplottables::@2/(byte[]) plot_ylo#8 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#3 initplottables::@2/(byte[]) plot_bit#4 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#3 initplottables::@2/(byte[]) plot_xhi#4 ) + (byte*) BITMAP#3 ← phi( initplottables/(byte*) BITMAP#6 initplottables::@2/(byte*) BITMAP#7 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#3 initplottables::@2/(byte[]) plot_xlo#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#3 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte~) initplottables::$2 ← (byte) initplottables::bit#3 >> (byte) 1 + (byte) initplottables::bit#1 ← (byte~) initplottables::$2 + (boolean~) initplottables::$3 ← (byte) initplottables::bit#1 == (byte) 0 + (boolean~) initplottables::$4 ← ! (boolean~) initplottables::$3 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte[]) plot_yhi#8 ← phi( initplottables::@1/(byte[]) plot_yhi#14 initplottables::@5/(byte[]) plot_yhi#15 ) + (byte[]) plot_ylo#8 ← phi( initplottables::@1/(byte[]) plot_ylo#14 initplottables::@5/(byte[]) plot_ylo#15 ) + (byte[]) plot_bit#4 ← phi( initplottables::@1/(byte[]) plot_bit#1 initplottables::@5/(byte[]) plot_bit#9 ) + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte[]) plot_xhi#4 ← phi( initplottables::@1/(byte[]) plot_xhi#1 initplottables::@5/(byte[]) plot_xhi#9 ) + (byte*) BITMAP#7 ← phi( initplottables::@1/(byte*) BITMAP#3 initplottables::@5/(byte*) BITMAP#13 ) + (byte[]) plot_xlo#4 ← phi( initplottables::@1/(byte[]) plot_xlo#1 initplottables::@5/(byte[]) plot_xlo#9 ) + (byte) initplottables::x#3 ← phi( initplottables::@1/(byte) initplottables::x#2 initplottables::@5/(byte) initplottables::x#4 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#3 + (boolean~) initplottables::$5 ← (byte) initplottables::x#1 != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte[]) plot_yhi#15 ← phi( initplottables::@1/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#15 ← phi( initplottables::@1/(byte[]) plot_ylo#14 ) + (byte[]) plot_bit#9 ← phi( initplottables::@1/(byte[]) plot_bit#1 ) + (byte[]) plot_xhi#9 ← phi( initplottables::@1/(byte[]) plot_xhi#1 ) + (byte*) BITMAP#13 ← phi( initplottables::@1/(byte*) BITMAP#3 ) + (byte[]) plot_xlo#9 ← phi( initplottables::@1/(byte[]) plot_xlo#1 ) + (byte) initplottables::x#4 ← phi( initplottables::@1/(byte) initplottables::x#2 ) + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte[]) plot_yhi#4 ← phi( initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#4 ← phi( initplottables::@2/(byte[]) plot_ylo#8 ) + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@4/(byte[]) plot_yhi#3 initplottables::@6/(byte[]) plot_yhi#4 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@4/(byte[]) plot_ylo#3 initplottables::@6/(byte[]) plot_ylo#4 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 + (boolean~) initplottables::$12 ← ! (boolean~) initplottables::$11 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte[]) plot_yhi#3 ← phi( initplottables::@3/(byte[]) plot_yhi#1 initplottables::@7/(byte[]) plot_yhi#9 ) + (byte[]) plot_ylo#3 ← phi( initplottables::@3/(byte[]) plot_ylo#1 initplottables::@7/(byte[]) plot_ylo#9 ) + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#3 ← phi( initplottables::@3/(byte) initplottables::y#2 initplottables::@7/(byte) initplottables::y#4 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#3 + (boolean~) initplottables::$14 ← (byte) initplottables::y#1 != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte[]) plot_yhi#9 ← phi( initplottables::@3/(byte[]) plot_yhi#1 ) + (byte[]) plot_ylo#9 ← phi( initplottables::@3/(byte[]) plot_ylo#1 ) + (byte) initplottables::y#4 ← phi( initplottables::@3/(byte) initplottables::y#2 ) + (byte*) initplottables::yoffs#3 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 ) + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs#3 + (word) 320 + (byte*) initplottables::yoffs#1 ← (byte*~) initplottables::$13 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte[]) plot_bit#2 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#2 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#2 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte) plot::y#1 ← phi( line::@1/(byte) plot::y#0 ) + (byte[]) plot_ylo#2 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte) plot::x#1 ← phi( line::@1/(byte) plot::x#0 ) + (byte[]) plot_xlo#2 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#4 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte*) plot::plotter#0 ← (byte*) BITMAP#4 + (byte~) plot::$0 ← (byte[]) plot_xlo#2 *idx (byte) plot::x#1 + (byte~) plot::$1 ← (byte[]) plot_ylo#2 *idx (byte) plot::y#1 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#2 *idx (byte) plot::x#1 + (byte~) plot::$4 ← (byte[]) plot_yhi#2 *idx (byte) plot::y#1 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#2 *idx (byte) plot::x#1 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + (byte[]) plot_yhi#19 ← phi( @begin/(byte[]) plot_yhi#0 ) + (byte[]) plot_ylo#19 ← phi( @begin/(byte[]) plot_ylo#0 ) + (byte*) SCREEN#6 ← phi( @begin/(byte*) SCREEN#0 ) + (byte[]) plot_bit#15 ← phi( @begin/(byte[]) plot_bit#0 ) + (byte[]) plot_xhi#15 ← phi( @begin/(byte[]) plot_xhi#0 ) + (byte[]) plot_xlo#15 ← phi( @begin/(byte[]) plot_xlo#0 ) + (byte*) BITMAP#9 ← phi( @begin/(byte*) BITMAP#0 ) + (byte*) D018#2 ← phi( @begin/(byte*) D018#0 ) + (byte*) D011#2 ← phi( @begin/(byte*) D011#0 ) + (byte) RSEL#2 ← phi( @begin/(byte) RSEL#0 ) + (byte) DEN#2 ← phi( @begin/(byte) DEN#0 ) + (byte) BMM#2 ← phi( @begin/(byte) BMM#0 ) + (byte*) FGCOL#2 ← phi( @begin/(byte*) FGCOL#0 ) + (byte*) BGCOL#2 ← phi( @begin/(byte*) BGCOL#0 ) + call main param-assignment + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 + +INITIAL SSA SYMBOL TABLE +(label) @5 +(label) @6 +(label) @begin +(label) @end +(byte*) BGCOL +(byte*) BGCOL#0 +(byte*) BGCOL#1 +(byte*) BGCOL#2 +(byte*) BITMAP +(byte*) BITMAP#0 +(byte*) BITMAP#1 +(byte*) BITMAP#10 +(byte*) BITMAP#11 +(byte*) BITMAP#12 +(byte*) BITMAP#13 +(byte*) BITMAP#14 +(byte*) BITMAP#15 +(byte*) BITMAP#16 +(byte*) BITMAP#17 +(byte*) BITMAP#2 +(byte*) BITMAP#3 +(byte*) BITMAP#4 +(byte*) BITMAP#5 +(byte*) BITMAP#6 +(byte*) BITMAP#7 +(byte*) BITMAP#8 +(byte*) BITMAP#9 +(byte) BMM +(byte) BMM#0 +(byte) BMM#1 +(byte) BMM#2 +(byte*) COLS +(byte*) COLS#0 +(byte) CSEL +(byte) CSEL#0 +(byte*) D011 +(byte*) D011#0 +(byte*) D011#1 +(byte*) D011#2 +(byte*) D016 +(byte*) D016#0 +(byte*) D018 +(byte*) D018#0 +(byte*) D018#1 +(byte*) D018#2 +(byte) DEN +(byte) DEN#0 +(byte) DEN#1 +(byte) DEN#2 +(byte) ECM +(byte) ECM#0 +(byte*) FGCOL +(byte*) FGCOL#0 +(byte*) FGCOL#1 +(byte*) FGCOL#2 +(byte) MCM +(byte) MCM#0 +(byte) RSEL +(byte) RSEL#0 +(byte) RSEL#1 +(byte) RSEL#2 +(byte) RST8 +(byte) RST8#0 +(byte*) SCREEN +(byte*) SCREEN#0 +(byte*) SCREEN#1 +(byte*) SCREEN#2 +(byte*) SCREEN#3 +(byte*) SCREEN#4 +(byte*) SCREEN#5 +(byte*) SCREEN#6 +(byte*) SCROLL +(byte*) SCROLL#0 +(void()) initplottables() +(byte~) initplottables::$0 +(byte~) initplottables::$1 +(byte~) initplottables::$10 +(boolean~) initplottables::$11 +(boolean~) initplottables::$12 +(byte*~) initplottables::$13 +(boolean~) initplottables::$14 +(byte~) initplottables::$2 +(boolean~) initplottables::$3 +(boolean~) initplottables::$4 +(boolean~) initplottables::$5 +(byte~) initplottables::$6 +(byte~) initplottables::$7 +(byte~) initplottables::$8 +(byte~) initplottables::$9 +(label) initplottables::@1 +(label) initplottables::@2 +(label) initplottables::@3 +(label) initplottables::@4 +(label) initplottables::@5 +(label) initplottables::@6 +(label) initplottables::@7 +(label) initplottables::@return +(byte) initplottables::bit +(byte) initplottables::bit#0 +(byte) initplottables::bit#1 +(byte) initplottables::bit#2 +(byte) initplottables::bit#3 +(byte) initplottables::bit#4 +(byte) initplottables::x +(byte) initplottables::x#0 +(byte) initplottables::x#1 +(byte) initplottables::x#2 +(byte) initplottables::x#3 +(byte) initplottables::x#4 +(byte) initplottables::y +(byte) initplottables::y#0 +(byte) initplottables::y#1 +(byte) initplottables::y#2 +(byte) initplottables::y#3 +(byte) initplottables::y#4 +(byte*) initplottables::yoffs +(byte*) initplottables::yoffs#0 +(byte*) initplottables::yoffs#1 +(byte*) initplottables::yoffs#2 +(byte*) initplottables::yoffs#3 +(byte*) initplottables::yoffs#4 +(void()) initscreen() +(byte*~) initscreen::$0 +(boolean~) initscreen::$1 +(byte*~) initscreen::$2 +(boolean~) initscreen::$3 +(label) initscreen::@1 +(label) initscreen::@2 +(label) initscreen::@3 +(label) initscreen::@return +(byte*) initscreen::b +(byte*) initscreen::b#0 +(byte*) initscreen::b#1 +(byte*) initscreen::b#2 +(byte*) initscreen::c +(byte*) initscreen::c#0 +(byte*) initscreen::c#1 +(byte*) initscreen::c#2 +(void()) line((byte) line::x0 , (byte) line::y0 , (byte) line::x1 , (byte) line::y1) +(byte~) line::$0 +(byte~) line::$1 +(byte~) line::$10 +(boolean~) line::$11 +(byte~) line::$2 +(byte~) line::$4 +(byte~) line::$5 +(boolean~) line::$6 +(boolean~) line::$7 +(byte~) line::$8 +(byte~) line::$9 +(label) line::@1 +(label) line::@2 +(label) line::@3 +(label) line::@5 +(label) line::@return +(byte) line::e +(byte) line::e#0 +(byte) line::e#1 +(byte) line::e#2 +(byte) line::e#3 +(byte) line::e#4 +(byte) line::e#5 +(byte) line::e#6 +(byte) line::x +(byte) line::x#0 +(byte) line::x#1 +(byte) line::x#2 +(byte) line::x#3 +(byte) line::x#4 +(byte) line::x#5 +(byte) line::x0 +(byte) line::x0#0 +(byte) line::x0#1 +(byte) line::x0#2 +(byte) line::x1 +(byte) line::x1#0 +(byte) line::x1#1 +(byte) line::x1#2 +(byte) line::x1#3 +(byte) line::x1#4 +(byte) line::x1#5 +(byte) line::x1#6 +(byte) line::xd +(byte) line::xd#0 +(byte) line::xd#1 +(byte) line::xd#2 +(byte) line::xd#3 +(byte) line::xd#4 +(byte) line::y +(byte) line::y#0 +(byte) line::y#1 +(byte) line::y#2 +(byte) line::y#3 +(byte) line::y#4 +(byte) line::y#5 +(byte) line::y0 +(byte) line::y0#0 +(byte) line::y0#1 +(byte) line::y0#2 +(byte) line::y1 +(byte) line::y1#0 +(byte) line::y1#1 +(byte) line::y1#2 +(byte) line::yd +(byte) line::yd#0 +(byte) line::yd#1 +(byte) line::yd#2 +(byte) line::yd#3 +(byte) line::yd#4 +(void()) main() +(byte~) main::$0 +(byte~) main::$1 +(byte~) main::$2 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@return +(void()) plot((byte) plot::x , (byte) plot::y) +(byte~) plot::$0 +(byte~) plot::$1 +(byte~) plot::$2 +(byte~) plot::$3 +(byte~) plot::$4 +(byte~) plot::$5 +(byte~) plot::$6 +(byte~) plot::$7 +(byte~) plot::$8 +(label) plot::@return +(byte*) plot::plotter +(byte*) plot::plotter#0 +(byte*) plot::plotter#1 +(byte*) plot::plotter#2 +(byte) plot::x +(byte) plot::x#0 +(byte) plot::x#1 +(byte) plot::y +(byte) plot::y#0 +(byte) plot::y#1 +(byte[]) plot_bit +(byte[]) plot_bit#0 +(byte[]) plot_bit#1 +(byte[]) plot_bit#10 +(byte[]) plot_bit#11 +(byte[]) plot_bit#12 +(byte[]) plot_bit#13 +(byte[]) plot_bit#14 +(byte[]) plot_bit#15 +(byte[]) plot_bit#2 +(byte[]) plot_bit#3 +(byte[]) plot_bit#4 +(byte[]) plot_bit#5 +(byte[]) plot_bit#6 +(byte[]) plot_bit#7 +(byte[]) plot_bit#8 +(byte[]) plot_bit#9 +(byte[]) plot_xhi +(byte[]) plot_xhi#0 +(byte[]) plot_xhi#1 +(byte[]) plot_xhi#10 +(byte[]) plot_xhi#11 +(byte[]) plot_xhi#12 +(byte[]) plot_xhi#13 +(byte[]) plot_xhi#14 +(byte[]) plot_xhi#15 +(byte[]) plot_xhi#2 +(byte[]) plot_xhi#3 +(byte[]) plot_xhi#4 +(byte[]) plot_xhi#5 +(byte[]) plot_xhi#6 +(byte[]) plot_xhi#7 +(byte[]) plot_xhi#8 +(byte[]) plot_xhi#9 +(byte[]) plot_xlo +(byte[]) plot_xlo#0 +(byte[]) plot_xlo#1 +(byte[]) plot_xlo#10 +(byte[]) plot_xlo#11 +(byte[]) plot_xlo#12 +(byte[]) plot_xlo#13 +(byte[]) plot_xlo#14 +(byte[]) plot_xlo#15 +(byte[]) plot_xlo#2 +(byte[]) plot_xlo#3 +(byte[]) plot_xlo#4 +(byte[]) plot_xlo#5 +(byte[]) plot_xlo#6 +(byte[]) plot_xlo#7 +(byte[]) plot_xlo#8 +(byte[]) plot_xlo#9 +(byte[]) plot_yhi +(byte[]) plot_yhi#0 +(byte[]) plot_yhi#1 +(byte[]) plot_yhi#10 +(byte[]) plot_yhi#11 +(byte[]) plot_yhi#12 +(byte[]) plot_yhi#13 +(byte[]) plot_yhi#14 +(byte[]) plot_yhi#15 +(byte[]) plot_yhi#16 +(byte[]) plot_yhi#17 +(byte[]) plot_yhi#18 +(byte[]) plot_yhi#19 +(byte[]) plot_yhi#2 +(byte[]) plot_yhi#3 +(byte[]) plot_yhi#4 +(byte[]) plot_yhi#5 +(byte[]) plot_yhi#6 +(byte[]) plot_yhi#7 +(byte[]) plot_yhi#8 +(byte[]) plot_yhi#9 +(byte[]) plot_ylo +(byte[]) plot_ylo#0 +(byte[]) plot_ylo#1 +(byte[]) plot_ylo#10 +(byte[]) plot_ylo#11 +(byte[]) plot_ylo#12 +(byte[]) plot_ylo#13 +(byte[]) plot_ylo#14 +(byte[]) plot_ylo#15 +(byte[]) plot_ylo#16 +(byte[]) plot_ylo#17 +(byte[]) plot_ylo#18 +(byte[]) plot_ylo#19 +(byte[]) plot_ylo#2 +(byte[]) plot_ylo#3 +(byte[]) plot_ylo#4 +(byte[]) plot_ylo#5 +(byte[]) plot_ylo#6 +(byte[]) plot_ylo#7 +(byte[]) plot_ylo#8 +(byte[]) plot_ylo#9 + +Culled Empty Block (label) main::@4 +Culled Empty Block (label) @6 +Succesful SSA optimization Pass2CullEmptyBlocks +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + (byte[]) plot_yhi#18 ← phi( @5/(byte[]) plot_yhi#19 ) + (byte[]) plot_ylo#18 ← phi( @5/(byte[]) plot_ylo#19 ) + (byte*) SCREEN#5 ← phi( @5/(byte*) SCREEN#6 ) + (byte[]) plot_bit#10 ← phi( @5/(byte[]) plot_bit#15 ) + (byte[]) plot_xhi#10 ← phi( @5/(byte[]) plot_xhi#15 ) + (byte[]) plot_xlo#10 ← phi( @5/(byte[]) plot_xlo#15 ) + (byte*) BITMAP#5 ← phi( @5/(byte*) BITMAP#9 ) + (byte*) D018#1 ← phi( @5/(byte*) D018#2 ) + (byte*) D011#1 ← phi( @5/(byte*) D011#2 ) + (byte) RSEL#1 ← phi( @5/(byte) RSEL#2 ) + (byte) DEN#1 ← phi( @5/(byte) DEN#2 ) + (byte) BMM#1 ← phi( @5/(byte) BMM#2 ) + (byte*) FGCOL#1 ← phi( @5/(byte*) FGCOL#2 ) + (byte*) BGCOL#1 ← phi( @5/(byte*) BGCOL#2 ) + *((byte*) BGCOL#1) ← (byte) 0 + *((byte*) FGCOL#1) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#1 | (byte) DEN#1 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#1 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#1) ← (byte~) main::$2 + *((byte*) D018#1) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + (byte[]) plot_yhi#16 ← phi( main/(byte[]) plot_yhi#18 ) + (byte[]) plot_ylo#16 ← phi( main/(byte[]) plot_ylo#18 ) + (byte[]) plot_bit#8 ← phi( main/(byte[]) plot_bit#10 ) + (byte[]) plot_xhi#8 ← phi( main/(byte[]) plot_xhi#10 ) + (byte*) BITMAP#12 ← phi( main/(byte*) BITMAP#5 ) + (byte[]) plot_xlo#8 ← phi( main/(byte[]) plot_xlo#10 ) + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte[]) plot_bit#11 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_yhi#10 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_xhi#11 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte[]) plot_ylo#10 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_xlo#11 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte*) BITMAP#14 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte[]) plot_bit#12 ← phi( main::@2/(byte[]) plot_bit#11 ) + (byte[]) plot_yhi#11 ← phi( main::@2/(byte[]) plot_yhi#10 ) + (byte[]) plot_xhi#12 ← phi( main::@2/(byte[]) plot_xhi#11 ) + (byte[]) plot_ylo#11 ← phi( main::@2/(byte[]) plot_ylo#10 ) + (byte[]) plot_xlo#12 ← phi( main::@2/(byte[]) plot_xlo#11 ) + (byte*) BITMAP#15 ← phi( main::@2/(byte*) BITMAP#14 ) + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte[]) plot_bit#6 ← phi( main::@2/(byte[]) plot_bit#11 main::@3/(byte[]) plot_bit#12 ) + (byte[]) plot_yhi#6 ← phi( main::@2/(byte[]) plot_yhi#10 main::@3/(byte[]) plot_yhi#11 ) + (byte[]) plot_xhi#6 ← phi( main::@2/(byte[]) plot_xhi#11 main::@3/(byte[]) plot_xhi#12 ) + (byte[]) plot_ylo#6 ← phi( main::@2/(byte[]) plot_ylo#10 main::@3/(byte[]) plot_ylo#11 ) + (byte[]) plot_xlo#6 ← phi( main::@2/(byte[]) plot_xlo#11 main::@3/(byte[]) plot_xlo#12 ) + (byte*) BITMAP#10 ← phi( main::@2/(byte*) BITMAP#14 main::@3/(byte*) BITMAP#15 ) + (byte) line::y0#2 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x0#2 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte~) line::$0 ← (byte) line::x1#2 - (byte) line::x0#2 + (byte) line::xd#0 ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1#2 - (byte) line::y0#2 + (byte) line::yd#0 ← (byte~) line::$1 + (byte) line::x#0 ← (byte) line::x0#2 + (byte) line::y#0 ← (byte) line::y0#2 + (byte~) line::$2 ← (byte) line::yd#0 >> (byte) 1 + (byte) line::e#0 ← (byte~) line::$2 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#6 ← phi( line/(byte) line::x1#2 line::@2/(byte) line::x1#3 ) + (byte[]) plot_bit#5 ← phi( line/(byte[]) plot_bit#6 line::@2/(byte[]) plot_bit#7 ) + (byte[]) plot_yhi#5 ← phi( line/(byte[]) plot_yhi#6 line::@2/(byte[]) plot_yhi#7 ) + (byte[]) plot_xhi#5 ← phi( line/(byte[]) plot_xhi#6 line::@2/(byte[]) plot_xhi#7 ) + (byte[]) plot_ylo#5 ← phi( line/(byte[]) plot_ylo#6 line::@2/(byte[]) plot_ylo#7 ) + (byte[]) plot_xlo#5 ← phi( line/(byte[]) plot_xlo#6 line::@2/(byte[]) plot_xlo#7 ) + (byte*) BITMAP#8 ← phi( line/(byte*) BITMAP#10 line::@2/(byte*) BITMAP#11 ) + (byte) line::xd#3 ← phi( line/(byte) line::xd#0 line::@2/(byte) line::xd#4 ) + (byte) line::yd#2 ← phi( line/(byte) line::yd#0 line::@2/(byte) line::yd#3 ) + (byte) line::e#5 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#4 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte[]) plot_bit#14 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#13 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#14 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte[]) plot_ylo#13 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte[]) plot_xlo#14 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#17 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte) line::y#5 ← phi( line::@1/(byte) line::y#2 ) + (byte) line::x1#5 ← phi( line::@1/(byte) line::x1#6 ) + (byte) line::xd#1 ← phi( line::@1/(byte) line::xd#3 ) + (byte) line::yd#1 ← phi( line::@1/(byte) line::yd#2 ) + (byte) line::e#3 ← phi( line::@1/(byte) line::e#5 ) + (byte) line::x#3 ← phi( line::@1/(byte) line::x#2 ) + (byte~) line::$4 ← (byte) line::x#3 + (byte) 1 + (byte) line::x#1 ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e#3 + (byte) line::yd#1 + (byte) line::e#1 ← (byte~) line::$5 + (boolean~) line::$6 ← (byte) line::xd#1 < (byte) line::e#1 + (boolean~) line::$7 ← ! (boolean~) line::$6 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte[]) plot_bit#7 ← phi( line::@3/(byte[]) plot_bit#13 line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#7 ← phi( line::@3/(byte[]) plot_yhi#12 line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#7 ← phi( line::@3/(byte[]) plot_xhi#13 line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#7 ← phi( line::@3/(byte[]) plot_ylo#12 line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#7 ← phi( line::@3/(byte[]) plot_xlo#13 line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#11 ← phi( line::@3/(byte*) BITMAP#16 line::@5/(byte*) BITMAP#17 ) + (byte) line::xd#4 ← phi( line::@3/(byte) line::xd#2 line::@5/(byte) line::xd#1 ) + (byte) line::yd#3 ← phi( line::@3/(byte) line::yd#4 line::@5/(byte) line::yd#1 ) + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#5 ) + (byte) line::x#4 ← phi( line::@3/(byte) line::x#5 line::@5/(byte) line::x#1 ) + (byte) line::x1#3 ← phi( line::@3/(byte) line::x1#4 line::@5/(byte) line::x1#5 ) + (byte~) line::$10 ← (byte) line::x1#3 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x#4 < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte[]) plot_bit#13 ← phi( line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#12 ← phi( line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#13 ← phi( line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#12 ← phi( line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#13 ← phi( line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#16 ← phi( line::@5/(byte*) BITMAP#17 ) + (byte) line::yd#4 ← phi( line::@5/(byte) line::yd#1 ) + (byte) line::x#5 ← phi( line::@5/(byte) line::x#1 ) + (byte) line::x1#4 ← phi( line::@5/(byte) line::x1#5 ) + (byte) line::xd#2 ← phi( line::@5/(byte) line::xd#1 ) + (byte) line::e#4 ← phi( line::@5/(byte) line::e#1 ) + (byte) line::y#3 ← phi( line::@5/(byte) line::y#5 ) + (byte~) line::$8 ← (byte) line::y#3 + (byte) 1 + (byte) line::y#1 ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e#4 - (byte) line::xd#2 + (byte) line::e#2 ← (byte~) line::$9 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) SCREEN#4 ← phi( main/(byte*) SCREEN#5 ) + (byte*) BITMAP#1 ← phi( main/(byte*) BITMAP#5 ) + (byte*) initscreen::b#0 ← (byte*) BITMAP#1 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#3 ← phi( initscreen/(byte*) SCREEN#4 initscreen::@1/(byte*) SCREEN#3 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#1 initscreen::@1/(byte*) BITMAP#2 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b#1 != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen::@1/(byte*) SCREEN#3 ) + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@2/(byte*) SCREEN#2 initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c#1 != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte[]) plot_yhi#17 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_ylo#17 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_bit#3 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_xhi#3 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte*) BITMAP#6 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte[]) plot_xlo#3 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#17 initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#17 initplottables::@2/(byte[]) plot_ylo#8 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#3 initplottables::@2/(byte[]) plot_bit#4 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#3 initplottables::@2/(byte[]) plot_xhi#4 ) + (byte*) BITMAP#3 ← phi( initplottables/(byte*) BITMAP#6 initplottables::@2/(byte*) BITMAP#7 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#3 initplottables::@2/(byte[]) plot_xlo#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#3 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte~) initplottables::$2 ← (byte) initplottables::bit#3 >> (byte) 1 + (byte) initplottables::bit#1 ← (byte~) initplottables::$2 + (boolean~) initplottables::$3 ← (byte) initplottables::bit#1 == (byte) 0 + (boolean~) initplottables::$4 ← ! (boolean~) initplottables::$3 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte[]) plot_yhi#8 ← phi( initplottables::@1/(byte[]) plot_yhi#14 initplottables::@5/(byte[]) plot_yhi#15 ) + (byte[]) plot_ylo#8 ← phi( initplottables::@1/(byte[]) plot_ylo#14 initplottables::@5/(byte[]) plot_ylo#15 ) + (byte[]) plot_bit#4 ← phi( initplottables::@1/(byte[]) plot_bit#1 initplottables::@5/(byte[]) plot_bit#9 ) + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte[]) plot_xhi#4 ← phi( initplottables::@1/(byte[]) plot_xhi#1 initplottables::@5/(byte[]) plot_xhi#9 ) + (byte*) BITMAP#7 ← phi( initplottables::@1/(byte*) BITMAP#3 initplottables::@5/(byte*) BITMAP#13 ) + (byte[]) plot_xlo#4 ← phi( initplottables::@1/(byte[]) plot_xlo#1 initplottables::@5/(byte[]) plot_xlo#9 ) + (byte) initplottables::x#3 ← phi( initplottables::@1/(byte) initplottables::x#2 initplottables::@5/(byte) initplottables::x#4 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#3 + (boolean~) initplottables::$5 ← (byte) initplottables::x#1 != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte[]) plot_yhi#15 ← phi( initplottables::@1/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#15 ← phi( initplottables::@1/(byte[]) plot_ylo#14 ) + (byte[]) plot_bit#9 ← phi( initplottables::@1/(byte[]) plot_bit#1 ) + (byte[]) plot_xhi#9 ← phi( initplottables::@1/(byte[]) plot_xhi#1 ) + (byte*) BITMAP#13 ← phi( initplottables::@1/(byte*) BITMAP#3 ) + (byte[]) plot_xlo#9 ← phi( initplottables::@1/(byte[]) plot_xlo#1 ) + (byte) initplottables::x#4 ← phi( initplottables::@1/(byte) initplottables::x#2 ) + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte[]) plot_yhi#4 ← phi( initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#4 ← phi( initplottables::@2/(byte[]) plot_ylo#8 ) + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@4/(byte[]) plot_yhi#3 initplottables::@6/(byte[]) plot_yhi#4 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@4/(byte[]) plot_ylo#3 initplottables::@6/(byte[]) plot_ylo#4 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 + (boolean~) initplottables::$12 ← ! (boolean~) initplottables::$11 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte[]) plot_yhi#3 ← phi( initplottables::@3/(byte[]) plot_yhi#1 initplottables::@7/(byte[]) plot_yhi#9 ) + (byte[]) plot_ylo#3 ← phi( initplottables::@3/(byte[]) plot_ylo#1 initplottables::@7/(byte[]) plot_ylo#9 ) + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#3 ← phi( initplottables::@3/(byte) initplottables::y#2 initplottables::@7/(byte) initplottables::y#4 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#3 + (boolean~) initplottables::$14 ← (byte) initplottables::y#1 != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte[]) plot_yhi#9 ← phi( initplottables::@3/(byte[]) plot_yhi#1 ) + (byte[]) plot_ylo#9 ← phi( initplottables::@3/(byte[]) plot_ylo#1 ) + (byte) initplottables::y#4 ← phi( initplottables::@3/(byte) initplottables::y#2 ) + (byte*) initplottables::yoffs#3 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 ) + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs#3 + (word) 320 + (byte*) initplottables::yoffs#1 ← (byte*~) initplottables::$13 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte[]) plot_bit#2 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#2 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#2 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte) plot::y#1 ← phi( line::@1/(byte) plot::y#0 ) + (byte[]) plot_ylo#2 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte) plot::x#1 ← phi( line::@1/(byte) plot::x#0 ) + (byte[]) plot_xlo#2 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#4 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte*) plot::plotter#0 ← (byte*) BITMAP#4 + (byte~) plot::$0 ← (byte[]) plot_xlo#2 *idx (byte) plot::x#1 + (byte~) plot::$1 ← (byte[]) plot_ylo#2 *idx (byte) plot::y#1 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#2 *idx (byte) plot::x#1 + (byte~) plot::$4 ← (byte[]) plot_yhi#2 *idx (byte) plot::y#1 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#2 *idx (byte) plot::x#1 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + (byte[]) plot_yhi#19 ← phi( @begin/(byte[]) plot_yhi#0 ) + (byte[]) plot_ylo#19 ← phi( @begin/(byte[]) plot_ylo#0 ) + (byte*) SCREEN#6 ← phi( @begin/(byte*) SCREEN#0 ) + (byte[]) plot_bit#15 ← phi( @begin/(byte[]) plot_bit#0 ) + (byte[]) plot_xhi#15 ← phi( @begin/(byte[]) plot_xhi#0 ) + (byte[]) plot_xlo#15 ← phi( @begin/(byte[]) plot_xlo#0 ) + (byte*) BITMAP#9 ← phi( @begin/(byte*) BITMAP#0 ) + (byte*) D018#2 ← phi( @begin/(byte*) D018#0 ) + (byte*) D011#2 ← phi( @begin/(byte*) D011#0 ) + (byte) RSEL#2 ← phi( @begin/(byte) RSEL#0 ) + (byte) DEN#2 ← phi( @begin/(byte) DEN#0 ) + (byte) BMM#2 ← phi( @begin/(byte) BMM#0 ) + (byte*) FGCOL#2 ← phi( @begin/(byte*) FGCOL#0 ) + (byte*) BGCOL#2 ← phi( @begin/(byte*) BGCOL#0 ) + call main param-assignment + to:@end +@end: scope:[] from @5 + +Inversing boolean not (boolean~) line::$7 ← (byte) line::xd#1 >= (byte) line::e#1 from (boolean~) line::$6 ← (byte) line::xd#1 < (byte) line::e#1 +Inversing boolean not (boolean~) initplottables::$4 ← (byte) initplottables::bit#1 != (byte) 0 from (boolean~) initplottables::$3 ← (byte) initplottables::bit#1 == (byte) 0 +Inversing boolean not (boolean~) initplottables::$12 ← (byte~) initplottables::$10 != (byte) 7 from (boolean~) initplottables::$11 ← (byte~) initplottables::$10 == (byte) 7 +Succesful SSA optimization Pass2UnaryNotSimplification +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + (byte[]) plot_yhi#18 ← phi( @5/(byte[]) plot_yhi#19 ) + (byte[]) plot_ylo#18 ← phi( @5/(byte[]) plot_ylo#19 ) + (byte*) SCREEN#5 ← phi( @5/(byte*) SCREEN#6 ) + (byte[]) plot_bit#10 ← phi( @5/(byte[]) plot_bit#15 ) + (byte[]) plot_xhi#10 ← phi( @5/(byte[]) plot_xhi#15 ) + (byte[]) plot_xlo#10 ← phi( @5/(byte[]) plot_xlo#15 ) + (byte*) BITMAP#5 ← phi( @5/(byte*) BITMAP#9 ) + (byte*) D018#1 ← phi( @5/(byte*) D018#2 ) + (byte*) D011#1 ← phi( @5/(byte*) D011#2 ) + (byte) RSEL#1 ← phi( @5/(byte) RSEL#2 ) + (byte) DEN#1 ← phi( @5/(byte) DEN#2 ) + (byte) BMM#1 ← phi( @5/(byte) BMM#2 ) + (byte*) FGCOL#1 ← phi( @5/(byte*) FGCOL#2 ) + (byte*) BGCOL#1 ← phi( @5/(byte*) BGCOL#2 ) + *((byte*) BGCOL#1) ← (byte) 0 + *((byte*) FGCOL#1) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#1 | (byte) DEN#1 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#1 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#1) ← (byte~) main::$2 + *((byte*) D018#1) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + (byte[]) plot_yhi#16 ← phi( main/(byte[]) plot_yhi#18 ) + (byte[]) plot_ylo#16 ← phi( main/(byte[]) plot_ylo#18 ) + (byte[]) plot_bit#8 ← phi( main/(byte[]) plot_bit#10 ) + (byte[]) plot_xhi#8 ← phi( main/(byte[]) plot_xhi#10 ) + (byte*) BITMAP#12 ← phi( main/(byte*) BITMAP#5 ) + (byte[]) plot_xlo#8 ← phi( main/(byte[]) plot_xlo#10 ) + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte[]) plot_bit#11 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_yhi#10 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_xhi#11 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte[]) plot_ylo#10 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_xlo#11 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte*) BITMAP#14 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte[]) plot_bit#12 ← phi( main::@2/(byte[]) plot_bit#11 ) + (byte[]) plot_yhi#11 ← phi( main::@2/(byte[]) plot_yhi#10 ) + (byte[]) plot_xhi#12 ← phi( main::@2/(byte[]) plot_xhi#11 ) + (byte[]) plot_ylo#11 ← phi( main::@2/(byte[]) plot_ylo#10 ) + (byte[]) plot_xlo#12 ← phi( main::@2/(byte[]) plot_xlo#11 ) + (byte*) BITMAP#15 ← phi( main::@2/(byte*) BITMAP#14 ) + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte[]) plot_bit#6 ← phi( main::@2/(byte[]) plot_bit#11 main::@3/(byte[]) plot_bit#12 ) + (byte[]) plot_yhi#6 ← phi( main::@2/(byte[]) plot_yhi#10 main::@3/(byte[]) plot_yhi#11 ) + (byte[]) plot_xhi#6 ← phi( main::@2/(byte[]) plot_xhi#11 main::@3/(byte[]) plot_xhi#12 ) + (byte[]) plot_ylo#6 ← phi( main::@2/(byte[]) plot_ylo#10 main::@3/(byte[]) plot_ylo#11 ) + (byte[]) plot_xlo#6 ← phi( main::@2/(byte[]) plot_xlo#11 main::@3/(byte[]) plot_xlo#12 ) + (byte*) BITMAP#10 ← phi( main::@2/(byte*) BITMAP#14 main::@3/(byte*) BITMAP#15 ) + (byte) line::y0#2 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x0#2 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte~) line::$0 ← (byte) line::x1#2 - (byte) line::x0#2 + (byte) line::xd#0 ← (byte~) line::$0 + (byte~) line::$1 ← (byte) line::y1#2 - (byte) line::y0#2 + (byte) line::yd#0 ← (byte~) line::$1 + (byte) line::x#0 ← (byte) line::x0#2 + (byte) line::y#0 ← (byte) line::y0#2 + (byte~) line::$2 ← (byte) line::yd#0 >> (byte) 1 + (byte) line::e#0 ← (byte~) line::$2 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#6 ← phi( line/(byte) line::x1#2 line::@2/(byte) line::x1#3 ) + (byte[]) plot_bit#5 ← phi( line/(byte[]) plot_bit#6 line::@2/(byte[]) plot_bit#7 ) + (byte[]) plot_yhi#5 ← phi( line/(byte[]) plot_yhi#6 line::@2/(byte[]) plot_yhi#7 ) + (byte[]) plot_xhi#5 ← phi( line/(byte[]) plot_xhi#6 line::@2/(byte[]) plot_xhi#7 ) + (byte[]) plot_ylo#5 ← phi( line/(byte[]) plot_ylo#6 line::@2/(byte[]) plot_ylo#7 ) + (byte[]) plot_xlo#5 ← phi( line/(byte[]) plot_xlo#6 line::@2/(byte[]) plot_xlo#7 ) + (byte*) BITMAP#8 ← phi( line/(byte*) BITMAP#10 line::@2/(byte*) BITMAP#11 ) + (byte) line::xd#3 ← phi( line/(byte) line::xd#0 line::@2/(byte) line::xd#4 ) + (byte) line::yd#2 ← phi( line/(byte) line::yd#0 line::@2/(byte) line::yd#3 ) + (byte) line::e#5 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#4 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte[]) plot_bit#14 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#13 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#14 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte[]) plot_ylo#13 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte[]) plot_xlo#14 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#17 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte) line::y#5 ← phi( line::@1/(byte) line::y#2 ) + (byte) line::x1#5 ← phi( line::@1/(byte) line::x1#6 ) + (byte) line::xd#1 ← phi( line::@1/(byte) line::xd#3 ) + (byte) line::yd#1 ← phi( line::@1/(byte) line::yd#2 ) + (byte) line::e#3 ← phi( line::@1/(byte) line::e#5 ) + (byte) line::x#3 ← phi( line::@1/(byte) line::x#2 ) + (byte~) line::$4 ← (byte) line::x#3 + (byte) 1 + (byte) line::x#1 ← (byte~) line::$4 + (byte~) line::$5 ← (byte) line::e#3 + (byte) line::yd#1 + (byte) line::e#1 ← (byte~) line::$5 + (boolean~) line::$7 ← (byte) line::xd#1 >= (byte) line::e#1 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte[]) plot_bit#7 ← phi( line::@3/(byte[]) plot_bit#13 line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#7 ← phi( line::@3/(byte[]) plot_yhi#12 line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#7 ← phi( line::@3/(byte[]) plot_xhi#13 line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#7 ← phi( line::@3/(byte[]) plot_ylo#12 line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#7 ← phi( line::@3/(byte[]) plot_xlo#13 line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#11 ← phi( line::@3/(byte*) BITMAP#16 line::@5/(byte*) BITMAP#17 ) + (byte) line::xd#4 ← phi( line::@3/(byte) line::xd#2 line::@5/(byte) line::xd#1 ) + (byte) line::yd#3 ← phi( line::@3/(byte) line::yd#4 line::@5/(byte) line::yd#1 ) + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#5 ) + (byte) line::x#4 ← phi( line::@3/(byte) line::x#5 line::@5/(byte) line::x#1 ) + (byte) line::x1#3 ← phi( line::@3/(byte) line::x1#4 line::@5/(byte) line::x1#5 ) + (byte~) line::$10 ← (byte) line::x1#3 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x#4 < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte[]) plot_bit#13 ← phi( line::@5/(byte[]) plot_bit#14 ) + (byte[]) plot_yhi#12 ← phi( line::@5/(byte[]) plot_yhi#13 ) + (byte[]) plot_xhi#13 ← phi( line::@5/(byte[]) plot_xhi#14 ) + (byte[]) plot_ylo#12 ← phi( line::@5/(byte[]) plot_ylo#13 ) + (byte[]) plot_xlo#13 ← phi( line::@5/(byte[]) plot_xlo#14 ) + (byte*) BITMAP#16 ← phi( line::@5/(byte*) BITMAP#17 ) + (byte) line::yd#4 ← phi( line::@5/(byte) line::yd#1 ) + (byte) line::x#5 ← phi( line::@5/(byte) line::x#1 ) + (byte) line::x1#4 ← phi( line::@5/(byte) line::x1#5 ) + (byte) line::xd#2 ← phi( line::@5/(byte) line::xd#1 ) + (byte) line::e#4 ← phi( line::@5/(byte) line::e#1 ) + (byte) line::y#3 ← phi( line::@5/(byte) line::y#5 ) + (byte~) line::$8 ← (byte) line::y#3 + (byte) 1 + (byte) line::y#1 ← (byte~) line::$8 + (byte~) line::$9 ← (byte) line::e#4 - (byte) line::xd#2 + (byte) line::e#2 ← (byte~) line::$9 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) SCREEN#4 ← phi( main/(byte*) SCREEN#5 ) + (byte*) BITMAP#1 ← phi( main/(byte*) BITMAP#5 ) + (byte*) initscreen::b#0 ← (byte*) BITMAP#1 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#3 ← phi( initscreen/(byte*) SCREEN#4 initscreen::@1/(byte*) SCREEN#3 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#1 initscreen::@1/(byte*) BITMAP#2 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b#1 != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen::@1/(byte*) SCREEN#3 ) + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@2/(byte*) SCREEN#2 initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c#1 != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte[]) plot_yhi#17 ← phi( main::@1/(byte[]) plot_yhi#16 ) + (byte[]) plot_ylo#17 ← phi( main::@1/(byte[]) plot_ylo#16 ) + (byte[]) plot_bit#3 ← phi( main::@1/(byte[]) plot_bit#8 ) + (byte[]) plot_xhi#3 ← phi( main::@1/(byte[]) plot_xhi#8 ) + (byte*) BITMAP#6 ← phi( main::@1/(byte*) BITMAP#12 ) + (byte[]) plot_xlo#3 ← phi( main::@1/(byte[]) plot_xlo#8 ) + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#17 initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#17 initplottables::@2/(byte[]) plot_ylo#8 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#3 initplottables::@2/(byte[]) plot_bit#4 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#3 initplottables::@2/(byte[]) plot_xhi#4 ) + (byte*) BITMAP#3 ← phi( initplottables/(byte*) BITMAP#6 initplottables::@2/(byte*) BITMAP#7 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#3 initplottables::@2/(byte[]) plot_xlo#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#3 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte~) initplottables::$2 ← (byte) initplottables::bit#3 >> (byte) 1 + (byte) initplottables::bit#1 ← (byte~) initplottables::$2 + (boolean~) initplottables::$4 ← (byte) initplottables::bit#1 != (byte) 0 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte[]) plot_yhi#8 ← phi( initplottables::@1/(byte[]) plot_yhi#14 initplottables::@5/(byte[]) plot_yhi#15 ) + (byte[]) plot_ylo#8 ← phi( initplottables::@1/(byte[]) plot_ylo#14 initplottables::@5/(byte[]) plot_ylo#15 ) + (byte[]) plot_bit#4 ← phi( initplottables::@1/(byte[]) plot_bit#1 initplottables::@5/(byte[]) plot_bit#9 ) + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte[]) plot_xhi#4 ← phi( initplottables::@1/(byte[]) plot_xhi#1 initplottables::@5/(byte[]) plot_xhi#9 ) + (byte*) BITMAP#7 ← phi( initplottables::@1/(byte*) BITMAP#3 initplottables::@5/(byte*) BITMAP#13 ) + (byte[]) plot_xlo#4 ← phi( initplottables::@1/(byte[]) plot_xlo#1 initplottables::@5/(byte[]) plot_xlo#9 ) + (byte) initplottables::x#3 ← phi( initplottables::@1/(byte) initplottables::x#2 initplottables::@5/(byte) initplottables::x#4 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#3 + (boolean~) initplottables::$5 ← (byte) initplottables::x#1 != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte[]) plot_yhi#15 ← phi( initplottables::@1/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#15 ← phi( initplottables::@1/(byte[]) plot_ylo#14 ) + (byte[]) plot_bit#9 ← phi( initplottables::@1/(byte[]) plot_bit#1 ) + (byte[]) plot_xhi#9 ← phi( initplottables::@1/(byte[]) plot_xhi#1 ) + (byte*) BITMAP#13 ← phi( initplottables::@1/(byte*) BITMAP#3 ) + (byte[]) plot_xlo#9 ← phi( initplottables::@1/(byte[]) plot_xlo#1 ) + (byte) initplottables::x#4 ← phi( initplottables::@1/(byte) initplottables::x#2 ) + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte[]) plot_yhi#4 ← phi( initplottables::@2/(byte[]) plot_yhi#8 ) + (byte[]) plot_ylo#4 ← phi( initplottables::@2/(byte[]) plot_ylo#8 ) + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@4/(byte[]) plot_yhi#3 initplottables::@6/(byte[]) plot_yhi#4 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@4/(byte[]) plot_ylo#3 initplottables::@6/(byte[]) plot_ylo#4 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + (boolean~) initplottables::$12 ← (byte~) initplottables::$10 != (byte) 7 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte[]) plot_yhi#3 ← phi( initplottables::@3/(byte[]) plot_yhi#1 initplottables::@7/(byte[]) plot_yhi#9 ) + (byte[]) plot_ylo#3 ← phi( initplottables::@3/(byte[]) plot_ylo#1 initplottables::@7/(byte[]) plot_ylo#9 ) + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#3 ← phi( initplottables::@3/(byte) initplottables::y#2 initplottables::@7/(byte) initplottables::y#4 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#3 + (boolean~) initplottables::$14 ← (byte) initplottables::y#1 != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte[]) plot_yhi#9 ← phi( initplottables::@3/(byte[]) plot_yhi#1 ) + (byte[]) plot_ylo#9 ← phi( initplottables::@3/(byte[]) plot_ylo#1 ) + (byte) initplottables::y#4 ← phi( initplottables::@3/(byte) initplottables::y#2 ) + (byte*) initplottables::yoffs#3 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 ) + (byte*~) initplottables::$13 ← (byte*) initplottables::yoffs#3 + (word) 320 + (byte*) initplottables::yoffs#1 ← (byte*~) initplottables::$13 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte[]) plot_bit#2 ← phi( line::@1/(byte[]) plot_bit#5 ) + (byte[]) plot_yhi#2 ← phi( line::@1/(byte[]) plot_yhi#5 ) + (byte[]) plot_xhi#2 ← phi( line::@1/(byte[]) plot_xhi#5 ) + (byte) plot::y#1 ← phi( line::@1/(byte) plot::y#0 ) + (byte[]) plot_ylo#2 ← phi( line::@1/(byte[]) plot_ylo#5 ) + (byte) plot::x#1 ← phi( line::@1/(byte) plot::x#0 ) + (byte[]) plot_xlo#2 ← phi( line::@1/(byte[]) plot_xlo#5 ) + (byte*) BITMAP#4 ← phi( line::@1/(byte*) BITMAP#8 ) + (byte*) plot::plotter#0 ← (byte*) BITMAP#4 + (byte~) plot::$0 ← (byte[]) plot_xlo#2 *idx (byte) plot::x#1 + (byte~) plot::$1 ← (byte[]) plot_ylo#2 *idx (byte) plot::y#1 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#2 *idx (byte) plot::x#1 + (byte~) plot::$4 ← (byte[]) plot_yhi#2 *idx (byte) plot::y#1 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#2 *idx (byte) plot::x#1 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + (byte[]) plot_yhi#19 ← phi( @begin/(byte[]) plot_yhi#0 ) + (byte[]) plot_ylo#19 ← phi( @begin/(byte[]) plot_ylo#0 ) + (byte*) SCREEN#6 ← phi( @begin/(byte*) SCREEN#0 ) + (byte[]) plot_bit#15 ← phi( @begin/(byte[]) plot_bit#0 ) + (byte[]) plot_xhi#15 ← phi( @begin/(byte[]) plot_xhi#0 ) + (byte[]) plot_xlo#15 ← phi( @begin/(byte[]) plot_xlo#0 ) + (byte*) BITMAP#9 ← phi( @begin/(byte*) BITMAP#0 ) + (byte*) D018#2 ← phi( @begin/(byte*) D018#0 ) + (byte*) D011#2 ← phi( @begin/(byte*) D011#0 ) + (byte) RSEL#2 ← phi( @begin/(byte) RSEL#0 ) + (byte) DEN#2 ← phi( @begin/(byte) DEN#0 ) + (byte) BMM#2 ← phi( @begin/(byte) BMM#0 ) + (byte*) FGCOL#2 ← phi( @begin/(byte*) FGCOL#0 ) + (byte*) BGCOL#2 ← phi( @begin/(byte*) BGCOL#0 ) + call main param-assignment + to:@end +@end: scope:[] from @5 + +Not aliassing across scopes: plot::x#0 line::x#2 +Not aliassing across scopes: plot::y#0 line::y#2 +Not aliassing across scopes: initscreen::b#0 BITMAP#1 +Not aliassing across scopes: initscreen::c#0 SCREEN#1 +Not aliassing across scopes: plot::plotter#0 BITMAP#4 +Alias (byte*) BGCOL#0 = (byte*) BGCOL#1 (byte*) BGCOL#2 +Alias (byte*) FGCOL#0 = (byte*) FGCOL#1 (byte*) FGCOL#2 +Alias (byte) BMM#0 = (byte) BMM#1 (byte) BMM#2 +Alias (byte) DEN#0 = (byte) DEN#1 (byte) DEN#2 +Alias (byte) RSEL#0 = (byte) RSEL#1 (byte) RSEL#2 +Alias (byte*) D011#0 = (byte*) D011#1 (byte*) D011#2 +Alias (byte*) D018#0 = (byte*) D018#1 (byte*) D018#2 +Alias (byte*) BITMAP#0 = (byte*) BITMAP#5 (byte*) BITMAP#9 (byte*) BITMAP#12 (byte*) BITMAP#14 (byte*) BITMAP#15 (byte*) BITMAP#1 (byte*) BITMAP#6 +Alias (byte[]) plot_xlo#0 = (byte[]) plot_xlo#10 (byte[]) plot_xlo#15 (byte[]) plot_xlo#8 (byte[]) plot_xlo#11 (byte[]) plot_xlo#12 (byte[]) plot_xlo#3 +Alias (byte[]) plot_xhi#0 = (byte[]) plot_xhi#10 (byte[]) plot_xhi#15 (byte[]) plot_xhi#8 (byte[]) plot_xhi#11 (byte[]) plot_xhi#12 (byte[]) plot_xhi#3 +Alias (byte[]) plot_bit#0 = (byte[]) plot_bit#10 (byte[]) plot_bit#15 (byte[]) plot_bit#8 (byte[]) plot_bit#11 (byte[]) plot_bit#12 (byte[]) plot_bit#3 +Alias (byte*) SCREEN#0 = (byte*) SCREEN#5 (byte*) SCREEN#6 (byte*) SCREEN#4 +Alias (byte[]) plot_ylo#0 = (byte[]) plot_ylo#18 (byte[]) plot_ylo#19 (byte[]) plot_ylo#16 (byte[]) plot_ylo#10 (byte[]) plot_ylo#11 (byte[]) plot_ylo#17 +Alias (byte[]) plot_yhi#0 = (byte[]) plot_yhi#18 (byte[]) plot_yhi#19 (byte[]) plot_yhi#16 (byte[]) plot_yhi#10 (byte[]) plot_yhi#11 (byte[]) plot_yhi#17 +Alias (byte) line::xd#0 = (byte~) line::$0 +Alias (byte) line::yd#0 = (byte~) line::$1 +Alias (byte) line::x#0 = (byte) line::x0#2 +Alias (byte) line::y#0 = (byte) line::y0#2 +Alias (byte) line::e#0 = (byte~) line::$2 +Alias (byte) line::x#2 = (byte) line::x#3 +Alias (byte) line::e#3 = (byte) line::e#5 +Alias (byte) line::yd#1 = (byte) line::yd#2 (byte) line::yd#4 +Alias (byte) line::xd#1 = (byte) line::xd#3 (byte) line::xd#2 +Alias (byte) line::x1#4 = (byte) line::x1#5 (byte) line::x1#6 +Alias (byte) line::y#2 = (byte) line::y#5 (byte) line::y#3 +Alias (byte*) BITMAP#16 = (byte*) BITMAP#17 (byte*) BITMAP#8 (byte*) BITMAP#4 +Alias (byte[]) plot_xlo#13 = (byte[]) plot_xlo#14 (byte[]) plot_xlo#5 (byte[]) plot_xlo#2 +Alias (byte[]) plot_ylo#12 = (byte[]) plot_ylo#13 (byte[]) plot_ylo#5 (byte[]) plot_ylo#2 +Alias (byte[]) plot_xhi#13 = (byte[]) plot_xhi#14 (byte[]) plot_xhi#5 (byte[]) plot_xhi#2 +Alias (byte[]) plot_yhi#12 = (byte[]) plot_yhi#13 (byte[]) plot_yhi#5 (byte[]) plot_yhi#2 +Alias (byte[]) plot_bit#13 = (byte[]) plot_bit#14 (byte[]) plot_bit#5 (byte[]) plot_bit#2 +Alias (byte) line::x#1 = (byte~) line::$4 (byte) line::x#5 +Alias (byte) line::e#1 = (byte~) line::$5 (byte) line::e#4 +Alias (byte) line::y#1 = (byte~) line::$8 +Alias (byte) line::e#2 = (byte~) line::$9 +Alias (byte*) SCREEN#1 = (byte*) SCREEN#3 +Alias (byte) initplottables::bit#1 = (byte~) initplottables::$2 +Alias (byte) initplottables::x#2 = (byte) initplottables::x#4 +Alias (byte[]) plot_xlo#1 = (byte[]) plot_xlo#9 +Alias (byte*) BITMAP#13 = (byte*) BITMAP#3 +Alias (byte[]) plot_xhi#1 = (byte[]) plot_xhi#9 +Alias (byte[]) plot_bit#1 = (byte[]) plot_bit#9 +Alias (byte[]) plot_ylo#14 = (byte[]) plot_ylo#15 +Alias (byte[]) plot_yhi#14 = (byte[]) plot_yhi#15 +Alias (byte[]) plot_ylo#4 = (byte[]) plot_ylo#8 +Alias (byte[]) plot_yhi#4 = (byte[]) plot_yhi#8 +Alias (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#3 +Alias (byte) initplottables::y#2 = (byte) initplottables::y#4 +Alias (byte[]) plot_ylo#1 = (byte[]) plot_ylo#9 +Alias (byte[]) plot_yhi#1 = (byte[]) plot_yhi#9 +Alias (byte*) initplottables::yoffs#1 = (byte*~) initplottables::$13 +Alias (byte) plot::x#0 = (byte) plot::x#1 +Alias (byte) plot::y#0 = (byte) plot::y#1 +Succesful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + *((byte*) BGCOL#0) ← (byte) 0 + *((byte*) FGCOL#0) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#0 | (byte) DEN#0 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#0 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#0) ← (byte~) main::$2 + *((byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte[]) plot_bit#6 ← phi( main::@2/(byte[]) plot_bit#0 main::@3/(byte[]) plot_bit#0 ) + (byte[]) plot_yhi#6 ← phi( main::@2/(byte[]) plot_yhi#0 main::@3/(byte[]) plot_yhi#0 ) + (byte[]) plot_xhi#6 ← phi( main::@2/(byte[]) plot_xhi#0 main::@3/(byte[]) plot_xhi#0 ) + (byte[]) plot_ylo#6 ← phi( main::@2/(byte[]) plot_ylo#0 main::@3/(byte[]) plot_ylo#0 ) + (byte[]) plot_xlo#6 ← phi( main::@2/(byte[]) plot_xlo#0 main::@3/(byte[]) plot_xlo#0 ) + (byte*) BITMAP#10 ← phi( main::@2/(byte*) BITMAP#0 main::@3/(byte*) BITMAP#0 ) + (byte) line::y#0 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 line::@2/(byte) line::x1#3 ) + (byte[]) plot_bit#13 ← phi( line/(byte[]) plot_bit#6 line::@2/(byte[]) plot_bit#7 ) + (byte[]) plot_yhi#12 ← phi( line/(byte[]) plot_yhi#6 line::@2/(byte[]) plot_yhi#7 ) + (byte[]) plot_xhi#13 ← phi( line/(byte[]) plot_xhi#6 line::@2/(byte[]) plot_xhi#7 ) + (byte[]) plot_ylo#12 ← phi( line/(byte[]) plot_ylo#6 line::@2/(byte[]) plot_ylo#7 ) + (byte[]) plot_xlo#13 ← phi( line/(byte[]) plot_xlo#6 line::@2/(byte[]) plot_xlo#7 ) + (byte*) BITMAP#16 ← phi( line/(byte*) BITMAP#10 line::@2/(byte*) BITMAP#11 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 line::@2/(byte) line::xd#4 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 line::@2/(byte) line::yd#3 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#4 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + (boolean~) line::$7 ← (byte) line::xd#1 >= (byte) line::e#1 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte[]) plot_bit#7 ← phi( line::@3/(byte[]) plot_bit#13 line::@5/(byte[]) plot_bit#13 ) + (byte[]) plot_yhi#7 ← phi( line::@3/(byte[]) plot_yhi#12 line::@5/(byte[]) plot_yhi#12 ) + (byte[]) plot_xhi#7 ← phi( line::@3/(byte[]) plot_xhi#13 line::@5/(byte[]) plot_xhi#13 ) + (byte[]) plot_ylo#7 ← phi( line::@3/(byte[]) plot_ylo#12 line::@5/(byte[]) plot_ylo#12 ) + (byte[]) plot_xlo#7 ← phi( line::@3/(byte[]) plot_xlo#13 line::@5/(byte[]) plot_xlo#13 ) + (byte*) BITMAP#11 ← phi( line::@3/(byte*) BITMAP#16 line::@5/(byte*) BITMAP#16 ) + (byte) line::xd#4 ← phi( line::@3/(byte) line::xd#1 line::@5/(byte) line::xd#1 ) + (byte) line::yd#3 ← phi( line::@3/(byte) line::yd#1 line::@5/(byte) line::yd#1 ) + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte) line::x#4 ← phi( line::@3/(byte) line::x#1 line::@5/(byte) line::x#1 ) + (byte) line::x1#3 ← phi( line::@3/(byte) line::x1#4 line::@5/(byte) line::x1#4 ) + (byte~) line::$10 ← (byte) line::x1#3 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x#4 < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) initscreen::b#0 ← (byte*) BITMAP#0 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen/(byte*) SCREEN#0 initscreen::@1/(byte*) SCREEN#1 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#0 initscreen::@1/(byte*) BITMAP#2 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b#1 != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@2/(byte*) SCREEN#2 initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c#1 != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#0 initplottables::@2/(byte[]) plot_yhi#4 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#0 initplottables::@2/(byte[]) plot_ylo#4 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#0 initplottables::@2/(byte[]) plot_bit#4 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#0 initplottables::@2/(byte[]) plot_xhi#4 ) + (byte*) BITMAP#13 ← phi( initplottables/(byte*) BITMAP#0 initplottables::@2/(byte*) BITMAP#7 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#0 initplottables::@2/(byte[]) plot_xlo#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#13 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + (boolean~) initplottables::$4 ← (byte) initplottables::bit#1 != (byte) 0 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte[]) plot_yhi#4 ← phi( initplottables::@1/(byte[]) plot_yhi#14 initplottables::@5/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#4 ← phi( initplottables::@1/(byte[]) plot_ylo#14 initplottables::@5/(byte[]) plot_ylo#14 ) + (byte[]) plot_bit#4 ← phi( initplottables::@1/(byte[]) plot_bit#1 initplottables::@5/(byte[]) plot_bit#1 ) + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte[]) plot_xhi#4 ← phi( initplottables::@1/(byte[]) plot_xhi#1 initplottables::@5/(byte[]) plot_xhi#1 ) + (byte*) BITMAP#7 ← phi( initplottables::@1/(byte*) BITMAP#13 initplottables::@5/(byte*) BITMAP#13 ) + (byte[]) plot_xlo#4 ← phi( initplottables::@1/(byte[]) plot_xlo#1 initplottables::@5/(byte[]) plot_xlo#1 ) + (byte) initplottables::x#3 ← phi( initplottables::@1/(byte) initplottables::x#2 initplottables::@5/(byte) initplottables::x#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#3 + (boolean~) initplottables::$5 ← (byte) initplottables::x#1 != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@4/(byte[]) plot_yhi#3 initplottables::@6/(byte[]) plot_yhi#4 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@4/(byte[]) plot_ylo#3 initplottables::@6/(byte[]) plot_ylo#4 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + (boolean~) initplottables::$12 ← (byte~) initplottables::$10 != (byte) 7 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte[]) plot_yhi#3 ← phi( initplottables::@3/(byte[]) plot_yhi#1 initplottables::@7/(byte[]) plot_yhi#1 ) + (byte[]) plot_ylo#3 ← phi( initplottables::@3/(byte[]) plot_ylo#1 initplottables::@7/(byte[]) plot_ylo#1 ) + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#3 ← phi( initplottables::@3/(byte) initplottables::y#2 initplottables::@7/(byte) initplottables::y#2 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#3 + (boolean~) initplottables::$14 ← (byte) initplottables::y#1 != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte*) plot::plotter#0 ← (byte*) BITMAP#16 + (byte~) plot::$0 ← (byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Not aliassing across scopes: plot::x#0 line::x#2 +Not aliassing across scopes: plot::y#0 line::y#2 +Not aliassing across scopes: initscreen::b#0 BITMAP#0 +Not aliassing across scopes: initscreen::c#0 SCREEN#1 +Not aliassing across scopes: plot::plotter#0 BITMAP#16 +Redundant Phi (byte*) BITMAP#10 (byte*) BITMAP#0 +Redundant Phi (byte[]) plot_xlo#6 (byte[]) plot_xlo#0 +Redundant Phi (byte[]) plot_ylo#6 (byte[]) plot_ylo#0 +Redundant Phi (byte[]) plot_xhi#6 (byte[]) plot_xhi#0 +Redundant Phi (byte[]) plot_yhi#6 (byte[]) plot_yhi#0 +Redundant Phi (byte[]) plot_bit#6 (byte[]) plot_bit#0 +Redundant Phi (byte) line::x1#3 (byte) line::x1#4 +Redundant Phi (byte) line::x#4 (byte) line::x#1 +Redundant Phi (byte) line::yd#3 (byte) line::yd#1 +Redundant Phi (byte) line::xd#4 (byte) line::xd#1 +Redundant Phi (byte*) BITMAP#11 (byte*) BITMAP#16 +Redundant Phi (byte[]) plot_xlo#7 (byte[]) plot_xlo#13 +Redundant Phi (byte[]) plot_ylo#7 (byte[]) plot_ylo#12 +Redundant Phi (byte[]) plot_xhi#7 (byte[]) plot_xhi#13 +Redundant Phi (byte[]) plot_yhi#7 (byte[]) plot_yhi#12 +Redundant Phi (byte[]) plot_bit#7 (byte[]) plot_bit#13 +Redundant Phi (byte) initplottables::x#3 (byte) initplottables::x#2 +Redundant Phi (byte[]) plot_xlo#4 (byte[]) plot_xlo#1 +Redundant Phi (byte*) BITMAP#7 (byte*) BITMAP#13 +Redundant Phi (byte[]) plot_xhi#4 (byte[]) plot_xhi#1 +Redundant Phi (byte[]) plot_bit#4 (byte[]) plot_bit#1 +Redundant Phi (byte[]) plot_ylo#4 (byte[]) plot_ylo#14 +Redundant Phi (byte[]) plot_yhi#4 (byte[]) plot_yhi#14 +Redundant Phi (byte) initplottables::y#3 (byte) initplottables::y#2 +Redundant Phi (byte[]) plot_ylo#3 (byte[]) plot_ylo#1 +Redundant Phi (byte[]) plot_yhi#3 (byte[]) plot_yhi#1 +Succesful SSA optimization Pass2RedundantPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + *((byte*) BGCOL#0) ← (byte) 0 + *((byte*) FGCOL#0) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#0 | (byte) DEN#0 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#0 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#0) ← (byte~) main::$2 + *((byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 line::@2/(byte) line::x1#4 ) + (byte[]) plot_bit#13 ← phi( line/(byte[]) plot_bit#0 line::@2/(byte[]) plot_bit#13 ) + (byte[]) plot_yhi#12 ← phi( line/(byte[]) plot_yhi#0 line::@2/(byte[]) plot_yhi#12 ) + (byte[]) plot_xhi#13 ← phi( line/(byte[]) plot_xhi#0 line::@2/(byte[]) plot_xhi#13 ) + (byte[]) plot_ylo#12 ← phi( line/(byte[]) plot_ylo#0 line::@2/(byte[]) plot_ylo#12 ) + (byte[]) plot_xlo#13 ← phi( line/(byte[]) plot_xlo#0 line::@2/(byte[]) plot_xlo#13 ) + (byte*) BITMAP#16 ← phi( line/(byte*) BITMAP#0 line::@2/(byte*) BITMAP#16 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 line::@2/(byte) line::xd#1 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 line::@2/(byte) line::yd#1 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + (boolean~) line::$7 ← (byte) line::xd#1 >= (byte) line::e#1 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x#1 < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) initscreen::b#0 ← (byte*) BITMAP#0 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen/(byte*) SCREEN#0 initscreen::@1/(byte*) SCREEN#1 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#0 initscreen::@1/(byte*) BITMAP#2 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b#1 != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@2/(byte*) SCREEN#2 initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c#1 != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#0 initplottables::@2/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#0 initplottables::@2/(byte[]) plot_ylo#14 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#0 initplottables::@2/(byte[]) plot_bit#1 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#0 initplottables::@2/(byte[]) plot_xhi#1 ) + (byte*) BITMAP#13 ← phi( initplottables/(byte*) BITMAP#0 initplottables::@2/(byte*) BITMAP#13 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#0 initplottables::@2/(byte[]) plot_xlo#1 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#13 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + (boolean~) initplottables::$4 ← (byte) initplottables::bit#1 != (byte) 0 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + (boolean~) initplottables::$5 ← (byte) initplottables::x#1 != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@4/(byte[]) plot_yhi#1 initplottables::@6/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@4/(byte[]) plot_ylo#1 initplottables::@6/(byte[]) plot_ylo#14 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + (boolean~) initplottables::$12 ← (byte~) initplottables::$10 != (byte) 7 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + (boolean~) initplottables::$14 ← (byte) initplottables::y#1 != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte*) plot::plotter#0 ← (byte*) BITMAP#16 + (byte~) plot::$0 ← (byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Self Phi Eliminated (byte) line::yd#1 +Self Phi Eliminated (byte) line::xd#1 +Self Phi Eliminated (byte*) BITMAP#16 +Self Phi Eliminated (byte[]) plot_xlo#13 +Self Phi Eliminated (byte[]) plot_ylo#12 +Self Phi Eliminated (byte[]) plot_xhi#13 +Self Phi Eliminated (byte[]) plot_yhi#12 +Self Phi Eliminated (byte[]) plot_bit#13 +Self Phi Eliminated (byte) line::x1#4 +Self Phi Eliminated (byte*) BITMAP#2 +Self Phi Eliminated (byte*) SCREEN#1 +Self Phi Eliminated (byte*) SCREEN#2 +Self Phi Eliminated (byte[]) plot_xlo#1 +Self Phi Eliminated (byte*) BITMAP#13 +Self Phi Eliminated (byte[]) plot_xhi#1 +Self Phi Eliminated (byte[]) plot_bit#1 +Self Phi Eliminated (byte[]) plot_ylo#14 +Self Phi Eliminated (byte[]) plot_yhi#14 +Self Phi Eliminated (byte[]) plot_ylo#1 +Self Phi Eliminated (byte[]) plot_yhi#1 +Succesful SSA optimization Pass2SelfPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + *((byte*) BGCOL#0) ← (byte) 0 + *((byte*) FGCOL#0) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#0 | (byte) DEN#0 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#0 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#0) ← (byte~) main::$2 + *((byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 ) + (byte[]) plot_bit#13 ← phi( line/(byte[]) plot_bit#0 ) + (byte[]) plot_yhi#12 ← phi( line/(byte[]) plot_yhi#0 ) + (byte[]) plot_xhi#13 ← phi( line/(byte[]) plot_xhi#0 ) + (byte[]) plot_ylo#12 ← phi( line/(byte[]) plot_ylo#0 ) + (byte[]) plot_xlo#13 ← phi( line/(byte[]) plot_xlo#0 ) + (byte*) BITMAP#16 ← phi( line/(byte*) BITMAP#0 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + (boolean~) line::$7 ← (byte) line::xd#1 >= (byte) line::e#1 + if((boolean~) line::$7) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + (boolean~) line::$11 ← (byte) line::x#1 < (byte~) line::$10 + if((boolean~) line::$11) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) initscreen::b#0 ← (byte*) BITMAP#0 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen/(byte*) SCREEN#0 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#0 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + (boolean~) initscreen::$1 ← (byte*) initscreen::b#1 != (byte*~) initscreen::$0 + if((boolean~) initscreen::$1) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + (boolean~) initscreen::$3 ← (byte*) initscreen::c#1 != (byte*~) initscreen::$2 + if((boolean~) initscreen::$3) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#0 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#0 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#0 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#0 ) + (byte*) BITMAP#13 ← phi( initplottables/(byte*) BITMAP#0 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#0 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#13 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + (boolean~) initplottables::$4 ← (byte) initplottables::bit#1 != (byte) 0 + if((boolean~) initplottables::$4) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + (boolean~) initplottables::$5 ← (byte) initplottables::x#1 != (byte) 0 + if((boolean~) initplottables::$5) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@6/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@6/(byte[]) plot_ylo#14 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + (boolean~) initplottables::$12 ← (byte~) initplottables::$10 != (byte) 7 + if((boolean~) initplottables::$12) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + (boolean~) initplottables::$14 ← (byte) initplottables::y#1 != (byte) 0 + if((boolean~) initplottables::$14) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte*) plot::plotter#0 ← (byte*) BITMAP#16 + (byte~) plot::$0 ← (byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Simple Condition (boolean~) line::$7 if((byte) line::xd#1>=(byte) line::e#1) goto line::@2 +Simple Condition (boolean~) line::$11 if((byte) line::x#1<(byte~) line::$10) goto line::@1 +Simple Condition (boolean~) initscreen::$1 if((byte*) initscreen::b#1!=(byte*~) initscreen::$0) goto initscreen::@1 +Simple Condition (boolean~) initscreen::$3 if((byte*) initscreen::c#1!=(byte*~) initscreen::$2) goto initscreen::@2 +Simple Condition (boolean~) initplottables::$4 if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 +Simple Condition (boolean~) initplottables::$5 if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 +Simple Condition (boolean~) initplottables::$12 if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 +Simple Condition (boolean~) initplottables::$14 if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 +Succesful SSA optimization Pass2ConditionalJumpSimplification +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) COLS#0 ← (word) 55296 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) FGCOL#0 ← (word) 53281 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) D018#0 ← (word) 53272 + (byte*) D011#0 ← (word) 53265 + (byte) RST8#0 ← (byte) 128 + (byte) ECM#0 ← (byte) 64 + (byte) BMM#0 ← (byte) 32 + (byte) DEN#0 ← (byte) 16 + (byte) RSEL#0 ← (byte) 8 + (byte*) D016#0 ← (word) 53270 + (byte) MCM#0 ← (byte) 16 + (byte) CSEL#0 ← (byte) 8 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) BITMAP#0 ← (word) 8192 + (byte[]) plot_xlo#0 ← (word) 4096 + (byte[]) plot_xhi#0 ← (word) 4352 + (byte[]) plot_ylo#0 ← (word) 4608 + (byte[]) plot_yhi#0 ← (word) 4864 + (byte[]) plot_bit#0 ← (word) 5120 + to:@5 +main: scope:[main] from @5 + *((byte*) BGCOL#0) ← (byte) 0 + *((byte*) FGCOL#0) ← (byte) 0 + (byte~) main::$0 ← (byte) BMM#0 | (byte) DEN#0 + (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#0 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((byte*) D011#0) ← (byte~) main::$2 + *((byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) line::x0#0 ← (byte) 0 + (byte) line::y0#0 ← (byte) 0 + (byte) line::x1#0 ← (byte) 20 + (byte) line::y1#0 ← (byte) 10 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte) line::x0#1 ← (byte) 10 + (byte) line::y0#1 ← (byte) 20 + (byte) line::x1#1 ← (byte) 40 + (byte) line::y1#1 ← (byte) 40 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(byte) line::y0#0 main::@3/(byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) line::y1#0 main::@3/(byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(byte) line::x0#0 main::@3/(byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) line::x1#0 main::@3/(byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 ) + (byte[]) plot_bit#13 ← phi( line/(byte[]) plot_bit#0 ) + (byte[]) plot_yhi#12 ← phi( line/(byte[]) plot_yhi#0 ) + (byte[]) plot_xhi#13 ← phi( line/(byte[]) plot_xhi#0 ) + (byte[]) plot_ylo#12 ← phi( line/(byte[]) plot_ylo#0 ) + (byte[]) plot_xlo#13 ← phi( line/(byte[]) plot_xlo#0 ) + (byte*) BITMAP#16 ← phi( line/(byte*) BITMAP#0 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + if((byte) line::xd#1>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) initscreen::b#0 ← (byte*) BITMAP#0 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen/(byte*) SCREEN#0 ) + (byte*) BITMAP#2 ← phi( initscreen/(byte*) BITMAP#0 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + if((byte*) initscreen::b#1!=(byte*~) initscreen::$0) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + if((byte*) initscreen::c#1!=(byte*~) initscreen::$2) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + (byte) initplottables::bit#0 ← (byte) 128 + (byte) initplottables::x#0 ← (byte) 0 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(byte[]) plot_yhi#0 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(byte[]) plot_ylo#0 ) + (byte[]) plot_bit#1 ← phi( initplottables/(byte[]) plot_bit#0 ) + (byte) initplottables::bit#3 ← phi( initplottables/(byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(byte[]) plot_xhi#0 ) + (byte*) BITMAP#13 ← phi( initplottables/(byte*) BITMAP#0 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(byte[]) plot_xlo#0 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#13 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + (byte) initplottables::bit#2 ← (byte) 128 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + (byte*) initplottables::yoffs#0 ← (byte) 0 + (byte) initplottables::y#0 ← (byte) 0 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@6/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@6/(byte[]) plot_ylo#14 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte*) plot::plotter#0 ← (byte*) BITMAP#16 + (byte~) plot::$0 ← (byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Constant (const byte*) COLS#0 = 55296 +Constant (const byte*) BGCOL#0 = 53280 +Constant (const byte*) FGCOL#0 = 53281 +Constant (const byte*) SCROLL#0 = 53270 +Constant (const byte*) D018#0 = 53272 +Constant (const byte*) D011#0 = 53265 +Constant (const byte) RST8#0 = 128 +Constant (const byte) ECM#0 = 64 +Constant (const byte) BMM#0 = 32 +Constant (const byte) DEN#0 = 16 +Constant (const byte) RSEL#0 = 8 +Constant (const byte*) D016#0 = 53270 +Constant (const byte) MCM#0 = 16 +Constant (const byte) CSEL#0 = 8 +Constant (const byte*) SCREEN#0 = 1024 +Constant (const byte*) BITMAP#0 = 8192 +Constant (const byte[]) plot_xlo#0 = 4096 +Constant (const byte[]) plot_xhi#0 = 4352 +Constant (const byte[]) plot_ylo#0 = 4608 +Constant (const byte[]) plot_yhi#0 = 4864 +Constant (const byte[]) plot_bit#0 = 5120 +Constant (const byte) line::x0#0 = 0 +Constant (const byte) line::y0#0 = 0 +Constant (const byte) line::x1#0 = 20 +Constant (const byte) line::y1#0 = 10 +Constant (const byte) line::x0#1 = 10 +Constant (const byte) line::y0#1 = 20 +Constant (const byte) line::x1#1 = 40 +Constant (const byte) line::y1#1 = 40 +Constant (const byte) initplottables::bit#0 = 128 +Constant (const byte) initplottables::x#0 = 0 +Constant (const byte) initplottables::bit#2 = 128 +Constant (const byte*) initplottables::yoffs#0 = 0 +Constant (const byte) initplottables::y#0 = 0 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + (byte~) main::$0 ← (const byte) BMM#0 | (const byte) DEN#0 + (byte~) main::$1 ← (byte~) main::$0 | (const byte) RSEL#0 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((const byte*) D011#0) ← (byte~) main::$2 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(const byte) line::y1#0 main::@3/(const byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(const byte) line::x1#0 main::@3/(const byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 ) + (byte[]) plot_bit#13 ← phi( line/(const byte[]) plot_bit#0 ) + (byte[]) plot_yhi#12 ← phi( line/(const byte[]) plot_yhi#0 ) + (byte[]) plot_xhi#13 ← phi( line/(const byte[]) plot_xhi#0 ) + (byte[]) plot_ylo#12 ← phi( line/(const byte[]) plot_ylo#0 ) + (byte[]) plot_xlo#13 ← phi( line/(const byte[]) plot_xlo#0 ) + (byte*) BITMAP#16 ← phi( line/(const byte*) BITMAP#0 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + if((byte) line::xd#1>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + (byte*) initscreen::b#0 ← (const byte*) BITMAP#0 + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) SCREEN#1 ← phi( initscreen/(const byte*) SCREEN#0 ) + (byte*) BITMAP#2 ← phi( initscreen/(const byte*) BITMAP#0 ) + (byte*) initscreen::b#2 ← phi( initscreen/(byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (byte*) BITMAP#2 + (word) 8192 + if((byte*) initscreen::b#1!=(byte*~) initscreen::$0) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c#0 ← (byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@3/(byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + if((byte*) initscreen::c#1!=(byte*~) initscreen::$2) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte[]) plot_yhi#14 ← phi( initplottables/(const byte[]) plot_yhi#0 ) + (byte[]) plot_ylo#14 ← phi( initplottables/(const byte[]) plot_ylo#0 ) + (byte[]) plot_bit#1 ← phi( initplottables/(const byte[]) plot_bit#0 ) + (byte) initplottables::bit#3 ← phi( initplottables/(const byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte[]) plot_xhi#1 ← phi( initplottables/(const byte[]) plot_xhi#0 ) + (byte*) BITMAP#13 ← phi( initplottables/(const byte*) BITMAP#0 ) + (byte[]) plot_xlo#1 ← phi( initplottables/(const byte[]) plot_xlo#0 ) + (byte) initplottables::x#2 ← phi( initplottables/(const byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (byte*) BITMAP#13 + *((byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(const byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@6/(byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@6/(byte[]) plot_ylo#14 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(const byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(const byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte*) plot::plotter#0 ← (byte*) BITMAP#16 + (byte~) plot::$0 ← (byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Constant (const byte) main::$0 = BMM#0|DEN#0 +Constant (const byte*) BITMAP#16 = BITMAP#0 +Constant (const byte[]) plot_xlo#13 = plot_xlo#0 +Constant (const byte[]) plot_ylo#12 = plot_ylo#0 +Constant (const byte[]) plot_xhi#13 = plot_xhi#0 +Constant (const byte[]) plot_yhi#12 = plot_yhi#0 +Constant (const byte[]) plot_bit#13 = plot_bit#0 +Constant (const byte*) initscreen::b#0 = BITMAP#0 +Constant (const byte*) BITMAP#2 = BITMAP#0 +Constant (const byte*) SCREEN#1 = SCREEN#0 +Constant (const byte[]) plot_xlo#1 = plot_xlo#0 +Constant (const byte*) BITMAP#13 = BITMAP#0 +Constant (const byte[]) plot_xhi#1 = plot_xhi#0 +Constant (const byte[]) plot_bit#1 = plot_bit#0 +Constant (const byte[]) plot_ylo#14 = plot_ylo#0 +Constant (const byte[]) plot_yhi#14 = plot_yhi#0 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + (byte~) main::$1 ← (const byte) main::$0 | (const byte) RSEL#0 + (byte~) main::$2 ← (byte~) main::$1 | (byte) 3 + *((const byte*) D011#0) ← (byte~) main::$2 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(const byte) line::y1#0 main::@3/(const byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(const byte) line::x1#0 main::@3/(const byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + if((byte) line::xd#1>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + (byte*~) initscreen::$0 ← (const byte*) BITMAP#2 + (word) 8192 + if((byte*) initscreen::b#1!=(byte*~) initscreen::$0) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + (byte*) initscreen::c#0 ← (const byte*) SCREEN#1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) SCREEN#2 ← phi( initscreen::@3/(const byte*) SCREEN#1 ) + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (byte*) SCREEN#2 + (word) 1024 + if((byte*) initscreen::c#1!=(byte*~) initscreen::$2) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte) initplottables::bit#3 ← phi( initplottables/(const byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(const byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((const byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + (byte~) initplottables::$1 ← > (const byte*) BITMAP#13 + *((const byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$1 + *((const byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(const byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte[]) plot_yhi#1 ← phi( initplottables::@6/(const byte[]) plot_yhi#14 ) + (byte[]) plot_ylo#1 ← phi( initplottables::@6/(const byte[]) plot_ylo#14 ) + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(const byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(const byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte*) plot::plotter#0 ← (const byte*) BITMAP#16 + (byte~) plot::$0 ← (const byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (const byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (const byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (const byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (const byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Constant (const byte) main::$1 = main::$0|RSEL#0 +Constant (const byte*) initscreen::$0 = BITMAP#2+8192 +Constant (const byte*) initscreen::c#0 = SCREEN#1 +Constant (const byte*) SCREEN#2 = SCREEN#1 +Constant (const byte) initplottables::$1 = >BITMAP#13 +Constant (const byte[]) plot_ylo#1 = plot_ylo#14 +Constant (const byte[]) plot_yhi#1 = plot_yhi#14 +Constant (const byte*) plot::plotter#0 = BITMAP#16 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + (byte~) main::$2 ← (const byte) main::$1 | (byte) 3 + *((const byte*) D011#0) ← (byte~) main::$2 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(const byte) line::y1#0 main::@3/(const byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(const byte) line::x1#0 main::@3/(const byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + if((byte) line::xd#1>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + if((byte*) initscreen::b#1!=(const byte*) initscreen::$0) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(const byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + (byte*~) initscreen::$2 ← (const byte*) SCREEN#2 + (word) 1024 + if((byte*) initscreen::c#1!=(byte*~) initscreen::$2) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte) initplottables::bit#3 ← phi( initplottables/(const byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(const byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((const byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + *((const byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (const byte) initplottables::$1 + *((const byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(const byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(const byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(const byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((const byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((const byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte~) plot::$0 ← (const byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (const byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (const byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (const byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (const byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (const byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Constant (const byte) main::$2 = main::$1|3 +Constant (const byte*) initscreen::$2 = SCREEN#2+1024 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + *((const byte*) D011#0) ← (const byte) main::$2 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(const byte) line::y1#0 main::@3/(const byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(const byte) line::x1#0 main::@3/(const byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + if((byte) line::xd#1>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + if((byte*) initscreen::b#1!=(const byte*) initscreen::$0) goto initscreen::@1 + to:initscreen::@3 +initscreen::@3: scope:[initscreen] from initscreen::@1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@2 initscreen::@3 + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@3/(const byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + if((byte*) initscreen::c#1!=(const byte*) initscreen::$2) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte) initplottables::bit#3 ← phi( initplottables/(const byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(const byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((const byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + *((const byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (const byte) initplottables::$1 + *((const byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(const byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@6 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@6: scope:[initplottables] from initplottables::@2 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@4 initplottables::@6 + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@6/(const byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@6/(const byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((const byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((const byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte~) plot::$0 ← (const byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (const byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (const byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (const byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (const byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (const byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Multiple usages for variable. Not optimizing sub-constant (byte) line::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) line::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte*) initplottables::yoffs#2 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::y#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::y#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Culled Empty Block (label) initscreen::@3 +Not culling empty block because it shares successor with its predecessor. (label) initplottables::@5 +Culled Empty Block (label) initplottables::@6 +Succesful SSA optimization Pass2CullEmptyBlocks +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + *((const byte*) D011#0) ← (const byte) main::$2 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(const byte) line::y1#0 main::@3/(const byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(const byte) line::x1#0 main::@3/(const byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::x1#4 ← phi( line/(byte) line::x1#2 ) + (byte) line::xd#1 ← phi( line/(byte) line::xd#0 ) + (byte) line::yd#1 ← phi( line/(byte) line::yd#0 ) + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#1 + if((byte) line::xd#1>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#4 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#1 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + if((byte*) initscreen::b#1!=(const byte*) initscreen::$0) goto initscreen::@1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@2 + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@1/(const byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + if((byte*) initscreen::c#1!=(const byte*) initscreen::$2) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte) initplottables::bit#3 ← phi( initplottables/(const byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(const byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((const byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + *((const byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (const byte) initplottables::$1 + *((const byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(const byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@3 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@3: scope:[initplottables] from initplottables::@2 initplottables::@4 + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@2/(const byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@2/(const byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((const byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((const byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte~) plot::$0 ← (const byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (const byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (const byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (const byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (const byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (const byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Not culling empty block because it shares successor with its predecessor. (label) initplottables::@5 +Not aliassing across scopes: plot::x#0 line::x#2 +Not aliassing across scopes: plot::y#0 line::y#2 +Alias (byte) line::yd#0 = (byte) line::yd#1 +Alias (byte) line::xd#0 = (byte) line::xd#1 +Alias (byte) line::x1#2 = (byte) line::x1#4 +Succesful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + *((const byte*) D011#0) ← (const byte) main::$2 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(const byte) line::y1#0 main::@3/(const byte) line::y1#1 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(const byte) line::x1#0 main::@3/(const byte) line::x1#1 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 + if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) initscreen::b#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + if((byte*) initscreen::b#1!=(const byte*) initscreen::$0) goto initscreen::@1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@2 + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@1/(const byte*) initscreen::c#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + if((byte*) initscreen::c#1!=(const byte*) initscreen::$2) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte) initplottables::bit#3 ← phi( initplottables/(const byte) initplottables::bit#0 initplottables::@2/(byte) initplottables::bit#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(const byte) initplottables::x#0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((const byte[]) plot_xlo#1 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + *((const byte[]) plot_xhi#1 + (byte) initplottables::x#2) ← (const byte) initplottables::$1 + *((const byte[]) plot_bit#1 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(const byte) initplottables::bit#2 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@3 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@3: scope:[initplottables] from initplottables::@2 initplottables::@4 + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@2/(const byte*) initplottables::yoffs#0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@2/(const byte) initplottables::y#0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((const byte[]) plot_ylo#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((const byte[]) plot_yhi#1 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte~) plot::$0 ← (const byte[]) plot_xlo#13 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (const byte[]) plot_ylo#12 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (const byte*) plot::plotter#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (const byte[]) plot_xhi#13 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (const byte[]) plot_yhi#12 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (const byte[]) plot_bit#13 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +Not aliassing across scopes: plot::x#0 line::x#2 +Not aliassing across scopes: plot::y#0 line::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) line::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) line::x1#2 +Multiple usages for variable. Not optimizing sub-constant (byte) line::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte*) initplottables::yoffs#2 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::y#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::y#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Not culling empty block because it shares successor with its predecessor. (label) initplottables::@5 +Not aliassing across scopes: plot::x#0 line::x#2 +Not aliassing across scopes: plot::y#0 line::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) line::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) line::x1#2 +Multiple usages for variable. Not optimizing sub-constant (byte) line::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::x#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte) initplottables::y#2 +Multiple usages for variable. Not optimizing sub-constant (byte*) initplottables::yoffs#2 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::y#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::y#0 +Multiple usages for variable. Not optimizing sub-constant (byte) plot::x#0 +Constant inlined plot_bit#13 = (const byte[]) plot_bit#0 +Constant inlined initplottables::bit#0 = (byte) 128 +Constant inlined initplottables::bit#2 = (byte) 128 +Constant inlined plot_ylo#1 = (const byte[]) plot_ylo#0 +Constant inlined plot_xhi#13 = (const byte[]) plot_xhi#0 +Constant inlined initplottables::yoffs#0 = (byte) 0 +Constant inlined main::$1 = (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0 +Constant inlined main::$2 = (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 +Constant inlined main::$0 = (const byte) BMM#0|(const byte) DEN#0 +Constant inlined plot::plotter#0 = (const byte*) BITMAP#0 +Constant inlined initscreen::$0 = (const byte*) BITMAP#0+(word) 8192 +Constant inlined initscreen::$2 = (const byte*) SCREEN#0+(word) 1024 +Constant inlined plot_bit#1 = (const byte[]) plot_bit#0 +Constant inlined initplottables::$1 = >(const byte*) BITMAP#0 +Constant inlined line::y1#0 = (byte) 10 +Constant inlined line::y1#1 = (byte) 40 +Constant inlined initplottables::y#0 = (byte) 0 +Constant inlined plot_xlo#1 = (const byte[]) plot_xlo#0 +Constant inlined initplottables::x#0 = (byte) 0 +Constant inlined SCREEN#2 = (const byte*) SCREEN#0 +Constant inlined plot_ylo#14 = (const byte[]) plot_ylo#0 +Constant inlined SCREEN#1 = (const byte*) SCREEN#0 +Constant inlined BITMAP#2 = (const byte*) BITMAP#0 +Constant inlined initscreen::c#0 = (const byte*) SCREEN#0 +Constant inlined plot_xlo#13 = (const byte[]) plot_xlo#0 +Constant inlined line::x1#0 = (byte) 20 +Constant inlined line::x1#1 = (byte) 40 +Constant inlined plot_ylo#12 = (const byte[]) plot_ylo#0 +Constant inlined plot_xhi#1 = (const byte[]) plot_xhi#0 +Constant inlined BITMAP#13 = (const byte*) BITMAP#0 +Constant inlined plot_yhi#12 = (const byte[]) plot_yhi#0 +Constant inlined plot_yhi#14 = (const byte[]) plot_yhi#0 +Constant inlined initscreen::b#0 = (const byte*) BITMAP#0 +Constant inlined plot_yhi#1 = (const byte[]) plot_yhi#0 +Constant inlined BITMAP#16 = (const byte*) BITMAP#0 +Succesful SSA optimization Pass2ConstantInlining +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) 10 main::@3/(byte) 40 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) 20 main::@3/(byte) 40 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + to:line::@1 +line::@1: scope:[line] from line line::@2 + (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) + (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) + (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 + if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 + to:line::@3 +line::@2: scope:[line] from line::@3 line::@5 + (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) + (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) + (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@1 + to:line::@return +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 + to:line::@2 +line::@return: scope:[line] from line::@2 + return + to:@return +initscreen: scope:[initscreen] from main + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) BITMAP#0 initscreen::@1/(byte*) initscreen::b#1 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@2 + (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@1/(const byte*) SCREEN#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + (byte) initplottables::bit#3 ← phi( initplottables/(byte) 128 initplottables::@2/(byte) initplottables::bit#4 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) 0 initplottables::@2/(byte) initplottables::x#1 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 + *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@2 + to:initplottables::@5 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@1/(byte) initplottables::bit#1 initplottables::@5/(byte) 128 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 + to:initplottables::@3 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@3: scope:[initplottables] from initplottables::@2 initplottables::@4 + (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@2/(byte) 0 ) + (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@2/(byte) 0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 + to:initplottables::@7 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 + to:initplottables::@return +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + to:initplottables::@4 +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +plot: scope:[plot] from line::@1 + (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 + +FINAL SYMBOL TABLE +(label) @5 +(label) @begin +(label) @end +(byte*) BGCOL +(const byte*) BGCOL#0 = (word) 53280 +(byte*) BITMAP +(const byte*) BITMAP#0 = (word) 8192 +(byte) BMM +(const byte) BMM#0 = (byte) 32 +(byte*) COLS +(const byte*) COLS#0 = (word) 55296 +(byte) CSEL +(const byte) CSEL#0 = (byte) 8 +(byte*) D011 +(const byte*) D011#0 = (word) 53265 +(byte*) D016 +(const byte*) D016#0 = (word) 53270 +(byte*) D018 +(const byte*) D018#0 = (word) 53272 +(byte) DEN +(const byte) DEN#0 = (byte) 16 +(byte) ECM +(const byte) ECM#0 = (byte) 64 +(byte*) FGCOL +(const byte*) FGCOL#0 = (word) 53281 +(byte) MCM +(const byte) MCM#0 = (byte) 16 +(byte) RSEL +(const byte) RSEL#0 = (byte) 8 +(byte) RST8 +(const byte) RST8#0 = (byte) 128 +(byte*) SCREEN +(const byte*) SCREEN#0 = (word) 1024 +(byte*) SCROLL +(const byte*) SCROLL#0 = (word) 53270 +(void()) initplottables() +(byte~) initplottables::$0 +(byte~) initplottables::$10 +(byte~) initplottables::$6 +(byte~) initplottables::$7 +(byte~) initplottables::$8 +(byte~) initplottables::$9 +(label) initplottables::@1 +(label) initplottables::@2 +(label) initplottables::@3 +(label) initplottables::@4 +(label) initplottables::@5 +(label) initplottables::@7 +(label) initplottables::@return +(byte) initplottables::bit +(byte) initplottables::bit#1 +(byte) initplottables::bit#3 +(byte) initplottables::bit#4 +(byte) initplottables::x +(byte) initplottables::x#1 +(byte) initplottables::x#2 +(byte) initplottables::y +(byte) initplottables::y#1 +(byte) initplottables::y#2 +(byte*) initplottables::yoffs +(byte*) initplottables::yoffs#1 +(byte*) initplottables::yoffs#2 +(byte*) initplottables::yoffs#4 +(void()) initscreen() +(label) initscreen::@1 +(label) initscreen::@2 +(label) initscreen::@return +(byte*) initscreen::b +(byte*) initscreen::b#1 +(byte*) initscreen::b#2 +(byte*) initscreen::c +(byte*) initscreen::c#1 +(byte*) initscreen::c#2 +(void()) line((byte) line::x0 , (byte) line::y0 , (byte) line::x1 , (byte) line::y1) +(byte~) line::$10 +(label) line::@1 +(label) line::@2 +(label) line::@3 +(label) line::@5 +(label) line::@return +(byte) line::e +(byte) line::e#0 +(byte) line::e#1 +(byte) line::e#2 +(byte) line::e#3 +(byte) line::e#6 +(byte) line::x +(byte) line::x#0 +(byte) line::x#1 +(byte) line::x#2 +(byte) line::x0 +(const byte) line::x0#0 = (byte) 0 +(const byte) line::x0#1 = (byte) 10 +(byte) line::x1 +(byte) line::x1#2 +(byte) line::xd +(byte) line::xd#0 +(byte) line::y +(byte) line::y#0 +(byte) line::y#1 +(byte) line::y#2 +(byte) line::y#4 +(byte) line::y0 +(const byte) line::y0#0 = (byte) 0 +(const byte) line::y0#1 = (byte) 20 +(byte) line::y1 +(byte) line::y1#2 +(byte) line::yd +(byte) line::yd#0 +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(void()) plot((byte) plot::x , (byte) plot::y) +(byte~) plot::$0 +(byte~) plot::$1 +(byte~) plot::$2 +(byte~) plot::$3 +(byte~) plot::$4 +(byte~) plot::$5 +(byte~) plot::$6 +(byte~) plot::$7 +(byte~) plot::$8 +(label) plot::@return +(byte*) plot::plotter +(byte*) plot::plotter#1 +(byte*) plot::plotter#2 +(byte) plot::x +(byte) plot::x#0 +(byte) plot::y +(byte) plot::y#0 +(byte[]) plot_bit +(const byte[]) plot_bit#0 = (word) 5120 +(byte[]) plot_xhi +(const byte[]) plot_xhi#0 = (word) 4352 +(byte[]) plot_xlo +(const byte[]) plot_xlo#0 = (word) 4096 +(byte[]) plot_yhi +(const byte[]) plot_yhi#0 = (word) 4864 +(byte[]) plot_ylo +(const byte[]) plot_ylo#0 = (word) 4608 + +Block Sequence Planned @begin @5 @end main main::@1 main::@2 main::@3 main::@return line line::@1 line::@5 line::@3 line::@2 line::@return plot plot::@return initplottables initplottables::@1 initplottables::@5 initplottables::@2 initplottables::@3 initplottables::@7 initplottables::@4 initplottables::@return initscreen initscreen::@1 initscreen::@2 initscreen::@return +Added new block during phi lifting line::@6(between line::@2 and line::@1) +Added new block during phi lifting line::@7(between line::@5 and line::@2) +Added new block during phi lifting initplottables::@9(between initplottables::@2 and initplottables::@1) +Added new block during phi lifting initplottables::@10(between initplottables::@1 and initplottables::@2) +Added new block during phi lifting initplottables::@11(between initplottables::@4 and initplottables::@3) +Added new block during phi lifting initplottables::@12(between initplottables::@3 and initplottables::@4) +Added new block during phi lifting initscreen::@5(between initscreen::@1 and initscreen::@1) +Added new block during phi lifting initscreen::@6(between initscreen::@2 and initscreen::@2) +Block Sequence Planned @begin @5 @end main main::@1 main::@2 main::@3 main::@return line line::@1 line::@5 line::@3 line::@2 line::@return line::@6 line::@7 plot plot::@return initplottables initplottables::@1 initplottables::@5 initplottables::@2 initplottables::@3 initplottables::@7 initplottables::@4 initplottables::@return initplottables::@11 initplottables::@12 initplottables::@9 initplottables::@10 initscreen initscreen::@1 initscreen::@2 initscreen::@return initscreen::@6 initscreen::@5 +CONTROL FLOW GRAPH - PHI LIFTED +@begin: scope:[] from + to:@5 +@5: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @5 +main: scope:[main] from @5 + *((const byte*) BGCOL#0) ← (byte) 0 + *((const byte*) FGCOL#0) ← (byte) 0 + *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 + *((const byte*) D018#0) ← (byte) 24 + call initscreen param-assignment + to:main::@1 +main::@1: scope:[main] from main + call initplottables param-assignment + to:main::@2 +main::@2: scope:[main] from main::@1 + call line param-assignment + to:main::@3 +main::@3: scope:[main] from main::@2 + call line param-assignment + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +line: scope:[line] from main::@2 main::@3 + (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) + (byte) line::y1#2 ← phi( main::@2/(byte) 10 main::@3/(byte) 40 ) + (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) + (byte) line::x1#2 ← phi( main::@2/(byte) 20 main::@3/(byte) 40 ) + (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 + (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 + (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 + (byte~) line::x#6 ← (byte) line::x#0 + (byte~) line::y#6 ← (byte) line::y#0 + (byte~) line::e#7 ← (byte) line::e#0 + to:line::@1 +line::@1: scope:[line] from line line::@6 + (byte) line::e#3 ← phi( line/(byte~) line::e#7 line::@6/(byte~) line::e#8 ) + (byte) line::y#2 ← phi( line/(byte~) line::y#6 line::@6/(byte~) line::y#7 ) + (byte) line::x#2 ← phi( line/(byte~) line::x#6 line::@6/(byte~) line::x#7 ) + (byte) plot::x#0 ← (byte) line::x#2 + (byte) plot::y#0 ← (byte) line::y#2 + call plot param-assignment + to:line::@5 +line::@5: scope:[line] from line::@1 + (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 + (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 + if((byte) line::xd#0>=(byte) line::e#1) goto line::@7 + to:line::@3 +line::@3: scope:[line] from line::@5 + (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 + (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 + (byte~) line::y#8 ← (byte) line::y#1 + (byte~) line::e#9 ← (byte) line::e#2 + to:line::@2 +line::@2: scope:[line] from line::@3 line::@7 + (byte) line::e#6 ← phi( line::@3/(byte~) line::e#9 line::@7/(byte~) line::e#10 ) + (byte) line::y#4 ← phi( line::@3/(byte~) line::y#8 line::@7/(byte~) line::y#9 ) + (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 + if((byte) line::x#1<(byte~) line::$10) goto line::@6 + to:line::@return +line::@return: scope:[line] from line::@2 + return + to:@return +line::@6: scope:[line] from line::@2 + (byte~) line::x#7 ← (byte) line::x#1 + (byte~) line::y#7 ← (byte) line::y#4 + (byte~) line::e#8 ← (byte) line::e#6 + to:line::@1 +line::@7: scope:[line] from line::@5 + (byte~) line::y#9 ← (byte) line::y#2 + (byte~) line::e#10 ← (byte) line::e#1 + to:line::@2 +plot: scope:[plot] from line::@1 + (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 + (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 + (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 + (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 + (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 + (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 + (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 + (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 + (byte~) plot::$6 ← * (byte*) plot::plotter#2 + (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 + (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 + *((byte*) plot::plotter#2) ← (byte~) plot::$8 + to:plot::@return +plot::@return: scope:[plot] from plot + return + to:@return +initplottables: scope:[initplottables] from main::@1 + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@9 + (byte) initplottables::bit#3 ← phi( initplottables/(byte) 128 initplottables::@9/(byte~) initplottables::bit#5 ) + (byte) initplottables::x#2 ← phi( initplottables/(byte) 0 initplottables::@9/(byte~) initplottables::x#5 ) + (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 + *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 + *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 + *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 + (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 + if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 + to:initplottables::@5 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@2: scope:[initplottables] from initplottables::@10 initplottables::@5 + (byte) initplottables::bit#4 ← phi( initplottables::@10/(byte~) initplottables::bit#6 initplottables::@5/(byte) 128 ) + (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 + if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@9 + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@11 initplottables::@2 + (byte*) initplottables::yoffs#2 ← phi( initplottables::@11/(byte*~) initplottables::yoffs#5 initplottables::@2/(byte) 0 ) + (byte) initplottables::y#2 ← phi( initplottables::@11/(byte~) initplottables::y#5 initplottables::@2/(byte) 0 ) + (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 + (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 + (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 + *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 + (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 + *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 + (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 + if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@12 + to:initplottables::@7 +initplottables::@7: scope:[initplottables] from initplottables::@3 + (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 + (byte*~) initplottables::yoffs#7 ← (byte*) initplottables::yoffs#1 + to:initplottables::@4 +initplottables::@4: scope:[initplottables] from initplottables::@12 initplottables::@7 + (byte*) initplottables::yoffs#4 ← phi( initplottables::@12/(byte*~) initplottables::yoffs#6 initplottables::@7/(byte*~) initplottables::yoffs#7 ) + (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 + if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@11 + to:initplottables::@return +initplottables::@return: scope:[initplottables] from initplottables::@4 + return + to:@return +initplottables::@11: scope:[initplottables] from initplottables::@4 + (byte~) initplottables::y#5 ← (byte) initplottables::y#1 + (byte*~) initplottables::yoffs#5 ← (byte*) initplottables::yoffs#4 + to:initplottables::@3 +initplottables::@12: scope:[initplottables] from initplottables::@3 + (byte*~) initplottables::yoffs#6 ← (byte*) initplottables::yoffs#2 + to:initplottables::@4 +initplottables::@9: scope:[initplottables] from initplottables::@2 + (byte~) initplottables::x#5 ← (byte) initplottables::x#1 + (byte~) initplottables::bit#5 ← (byte) initplottables::bit#4 + to:initplottables::@1 +initplottables::@10: scope:[initplottables] from initplottables::@1 + (byte~) initplottables::bit#6 ← (byte) initplottables::bit#1 + to:initplottables::@2 +initscreen: scope:[initscreen] from main + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@5 + (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) BITMAP#0 initscreen::@5/(byte*~) initscreen::b#3 ) + *((byte*) initscreen::b#2) ← (byte) 0 + (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 + if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@5 + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@6 + (byte*) initscreen::c#2 ← phi( initscreen::@6/(byte*~) initscreen::c#3 initscreen::@1/(const byte*) SCREEN#0 ) + *((byte*) initscreen::c#2) ← (byte) 20 + (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 + if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@6 + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + return + to:@return +initscreen::@6: scope:[initscreen] from initscreen::@2 + (byte*~) initscreen::c#3 ← (byte*) initscreen::c#1 + to:initscreen::@2 +initscreen::@5: scope:[initscreen] from initscreen::@1 + (byte*~) initscreen::b#3 ← (byte*) initscreen::b#1 + to:initscreen::@1 + +Adding NOP phi() at start of initplottables +Adding NOP phi() at start of initscreen +CALL GRAPH +Calls in [] to 0:main +Calls in [main] to 5:initscreen 6:initplottables 7:line 8:line +Calls in [line] to 20:plot + +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +CONTROL FLOW GRAPH - LIVE RANGES FOUND +@begin: scope:[] from + to:@5 +@5: scope:[] from @begin + [0] call main param-assignment [ ] + to:@end +@end: scope:[] from @5 +main: scope:[main] from @5 + [1] *((const byte*) BGCOL#0) ← (byte) 0 [ ] + [2] *((const byte*) FGCOL#0) ← (byte) 0 [ ] + [3] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] + [4] *((const byte*) D018#0) ← (byte) 24 [ ] + [5] call initscreen param-assignment [ ] + to:main::@1 +main::@1: scope:[main] from main + [6] call initplottables param-assignment [ ] + to:main::@2 +main::@2: scope:[main] from main::@1 + [7] call line param-assignment [ ] + to:main::@3 +main::@3: scope:[main] from main::@2 + [8] call line param-assignment [ ] + to:main::@return +main::@return: scope:[main] from main::@3 + [9] return [ ] + to:@return +line: scope:[line] from main::@2 main::@3 + [10] (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [10] (byte) line::y1#2 ← phi( main::@2/(byte) 10 main::@3/(byte) 40 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [10] (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [10] (byte) line::x1#2 ← phi( main::@2/(byte) 20 main::@3/(byte) 40 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] + [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] + [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] + [14] (byte~) line::x#6 ← (byte) line::x#0 [ line::x1#2 line::y#0 line::xd#0 line::yd#0 line::e#0 line::x#6 ] + [15] (byte~) line::y#6 ← (byte) line::y#0 [ line::x1#2 line::xd#0 line::yd#0 line::e#0 line::x#6 line::y#6 ] + [16] (byte~) line::e#7 ← (byte) line::e#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#6 line::y#6 line::e#7 ] + to:line::@1 +line::@1: scope:[line] from line line::@6 + [17] (byte) line::e#3 ← phi( line/(byte~) line::e#7 line::@6/(byte~) line::e#8 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [17] (byte) line::y#2 ← phi( line/(byte~) line::y#6 line::@6/(byte~) line::y#7 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [17] (byte) line::x#2 ← phi( line/(byte~) line::x#6 line::@6/(byte~) line::x#7 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [18] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] + [19] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] + [20] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + to:line::@5 +line::@5: scope:[line] from line::@1 + [21] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] + [22] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] + [23] if((byte) line::xd#0>=(byte) line::e#1) goto line::@7 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] + to:line::@3 +line::@3: scope:[line] from line::@5 + [24] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] + [25] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] + [26] (byte~) line::y#8 ← (byte) line::y#1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#2 line::y#8 ] + [27] (byte~) line::e#9 ← (byte) line::e#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#8 line::e#9 ] + to:line::@2 +line::@2: scope:[line] from line::@3 line::@7 + [28] (byte) line::e#6 ← phi( line::@3/(byte~) line::e#9 line::@7/(byte~) line::e#10 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + [28] (byte) line::y#4 ← phi( line::@3/(byte~) line::y#8 line::@7/(byte~) line::y#9 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + [29] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] + [30] if((byte) line::x#1<(byte~) line::$10) goto line::@6 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + to:line::@return +line::@return: scope:[line] from line::@2 + [31] return [ ] + to:@return +line::@6: scope:[line] from line::@2 + [32] (byte~) line::x#7 ← (byte) line::x#1 [ line::x1#2 line::xd#0 line::yd#0 line::x#7 line::y#4 line::e#6 ] + [33] (byte~) line::y#7 ← (byte) line::y#4 [ line::x1#2 line::xd#0 line::yd#0 line::x#7 line::y#7 line::e#6 ] + [34] (byte~) line::e#8 ← (byte) line::e#6 [ line::x1#2 line::xd#0 line::yd#0 line::x#7 line::y#7 line::e#8 ] + to:line::@1 +line::@7: scope:[line] from line::@5 + [35] (byte~) line::y#9 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#9 ] + [36] (byte~) line::e#10 ← (byte) line::e#1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#9 line::e#10 ] + to:line::@2 +plot: scope:[plot] from line::@1 + [37] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] + [38] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] + [39] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] + [40] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] + [41] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] + [42] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] + [43] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] + [44] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] + [45] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] + [46] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] + [47] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] + [48] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] + to:plot::@return +plot::@return: scope:[plot] from plot + [49] return [ ] + to:@return +initplottables: scope:[initplottables] from main::@1 + [50] phi() [ ] + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@9 + [51] (byte) initplottables::bit#3 ← phi( initplottables/(byte) 128 initplottables::@9/(byte~) initplottables::bit#5 ) [ initplottables::x#2 initplottables::bit#3 ] + [51] (byte) initplottables::x#2 ← phi( initplottables/(byte) 0 initplottables::@9/(byte~) initplottables::x#5 ) [ initplottables::x#2 initplottables::bit#3 ] + [52] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] + [53] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] + [54] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] + [55] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] + [56] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] + [57] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 initplottables::bit#1 ] + to:initplottables::@5 +initplottables::@5: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initplottables::@2: scope:[initplottables] from initplottables::@10 initplottables::@5 + [58] (byte) initplottables::bit#4 ← phi( initplottables::@10/(byte~) initplottables::bit#6 initplottables::@5/(byte) 128 ) [ initplottables::x#2 initplottables::bit#4 ] + [59] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::bit#4 initplottables::x#1 ] + [60] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@9 [ initplottables::bit#4 initplottables::x#1 ] + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@11 initplottables::@2 + [61] (byte*) initplottables::yoffs#2 ← phi( initplottables::@11/(byte*~) initplottables::yoffs#5 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ] + [61] (byte) initplottables::y#2 ← phi( initplottables::@11/(byte~) initplottables::y#5 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ] + [62] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] + [63] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] + [64] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] + [65] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] + [66] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] + [67] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] + [68] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] + [69] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@12 [ initplottables::y#2 initplottables::yoffs#2 ] + to:initplottables::@7 +initplottables::@7: scope:[initplottables] from initplottables::@3 + [70] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] + [71] (byte*~) initplottables::yoffs#7 ← (byte*) initplottables::yoffs#1 [ initplottables::y#2 initplottables::yoffs#7 ] + to:initplottables::@4 +initplottables::@4: scope:[initplottables] from initplottables::@12 initplottables::@7 + [72] (byte*) initplottables::yoffs#4 ← phi( initplottables::@12/(byte*~) initplottables::yoffs#6 initplottables::@7/(byte*~) initplottables::yoffs#7 ) [ initplottables::y#2 initplottables::yoffs#4 ] + [73] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::yoffs#4 initplottables::y#1 ] + [74] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@11 [ initplottables::yoffs#4 initplottables::y#1 ] + to:initplottables::@return +initplottables::@return: scope:[initplottables] from initplottables::@4 + [75] return [ ] + to:@return +initplottables::@11: scope:[initplottables] from initplottables::@4 + [76] (byte~) initplottables::y#5 ← (byte) initplottables::y#1 [ initplottables::y#5 initplottables::yoffs#4 ] + [77] (byte*~) initplottables::yoffs#5 ← (byte*) initplottables::yoffs#4 [ initplottables::y#5 initplottables::yoffs#5 ] + to:initplottables::@3 +initplottables::@12: scope:[initplottables] from initplottables::@3 + [78] (byte*~) initplottables::yoffs#6 ← (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#6 ] + to:initplottables::@4 +initplottables::@9: scope:[initplottables] from initplottables::@2 + [79] (byte~) initplottables::x#5 ← (byte) initplottables::x#1 [ initplottables::x#5 initplottables::bit#4 ] + [80] (byte~) initplottables::bit#5 ← (byte) initplottables::bit#4 [ initplottables::x#5 initplottables::bit#5 ] + to:initplottables::@1 +initplottables::@10: scope:[initplottables] from initplottables::@1 + [81] (byte~) initplottables::bit#6 ← (byte) initplottables::bit#1 [ initplottables::x#2 initplottables::bit#6 ] + to:initplottables::@2 +initscreen: scope:[initscreen] from main + [82] phi() [ ] + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@5 + [83] (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) BITMAP#0 initscreen::@5/(byte*~) initscreen::b#3 ) [ initscreen::b#2 ] + [84] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] + [85] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] + [86] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@5 [ initscreen::b#1 ] + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@6 + [87] (byte*) initscreen::c#2 ← phi( initscreen::@6/(byte*~) initscreen::c#3 initscreen::@1/(const byte*) SCREEN#0 ) [ initscreen::c#2 ] + [88] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] + [89] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] + [90] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@6 [ initscreen::c#1 ] + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + [91] return [ ] + to:@return +initscreen::@6: scope:[initscreen] from initscreen::@2 + [92] (byte*~) initscreen::c#3 ← (byte*) initscreen::c#1 [ initscreen::c#3 ] + to:initscreen::@2 +initscreen::@5: scope:[initscreen] from initscreen::@1 + [93] (byte*~) initscreen::b#3 ← (byte*) initscreen::b#1 [ initscreen::b#3 ] + to:initscreen::@1 + +Created 17 initial phi equivalence classes +Coalesced [14] line::x#6 ← line::x#0 +Coalesced [15] line::y#6 ← line::y#0 +Coalesced [16] line::e#7 ← line::e#0 +Coalesced [26] line::y#8 ← line::y#1 +Coalesced [27] line::e#9 ← line::e#2 +Coalesced [32] line::x#7 ← line::x#1 +Coalesced [33] line::y#7 ← line::y#4 +Coalesced [34] line::e#8 ← line::e#6 +Coalesced (already) [35] line::y#9 ← line::y#2 +Coalesced [36] line::e#10 ← line::e#1 +Coalesced [71] initplottables::yoffs#7 ← initplottables::yoffs#1 +Coalesced [76] initplottables::y#5 ← initplottables::y#1 +Coalesced [77] initplottables::yoffs#5 ← initplottables::yoffs#4 +Coalesced (already) [78] initplottables::yoffs#6 ← initplottables::yoffs#2 +Coalesced [79] initplottables::x#5 ← initplottables::x#1 +Coalesced [80] initplottables::bit#5 ← initplottables::bit#4 +Coalesced [81] initplottables::bit#6 ← initplottables::bit#1 +Coalesced [92] initscreen::c#3 ← initscreen::c#1 +Coalesced [93] initscreen::b#3 ← initscreen::b#1 +Coalesced down to 11 phi equivalence classes +Culled Empty Block (label) line::@6 +Culled Empty Block (label) line::@7 +Culled Empty Block (label) initplottables::@5 +Culled Empty Block (label) initplottables::@11 +Culled Empty Block (label) initplottables::@12 +Culled Empty Block (label) initplottables::@9 +Not culling empty block because it shares successor with its predecessor. (label) initplottables::@10 +Culled Empty Block (label) initscreen::@6 +Culled Empty Block (label) initscreen::@5 +Block Sequence Planned @begin @5 @end main main::@1 main::@2 main::@3 main::@return line line::@1 line::@5 line::@3 line::@2 line::@return plot plot::@return initplottables initplottables::@1 initplottables::@2 initplottables::@3 initplottables::@7 initplottables::@4 initplottables::@return initplottables::@10 initscreen initscreen::@1 initscreen::@2 initscreen::@return +Adding NOP phi() at start of initplottables +Adding NOP phi() at start of initscreen +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +CONTROL FLOW GRAPH - PHI MEM COALESCED +@begin: scope:[] from + to:@5 +@5: scope:[] from @begin + [0] call main param-assignment [ ] + to:@end +@end: scope:[] from @5 +main: scope:[main] from @5 + [1] *((const byte*) BGCOL#0) ← (byte) 0 [ ] + [2] *((const byte*) FGCOL#0) ← (byte) 0 [ ] + [3] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] + [4] *((const byte*) D018#0) ← (byte) 24 [ ] + [5] call initscreen param-assignment [ ] + to:main::@1 +main::@1: scope:[main] from main + [6] call initplottables param-assignment [ ] + to:main::@2 +main::@2: scope:[main] from main::@1 + [7] call line param-assignment [ ] + to:main::@3 +main::@3: scope:[main] from main::@2 + [8] call line param-assignment [ ] + to:main::@return +main::@return: scope:[main] from main::@3 + [9] return [ ] + to:@return +line: scope:[line] from main::@2 main::@3 + [10] (byte) line::y#0 ← phi( main::@2/(const byte) line::y0#0 main::@3/(const byte) line::y0#1 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [10] (byte) line::y1#2 ← phi( main::@2/(byte) 10 main::@3/(byte) 40 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [10] (byte) line::x#0 ← phi( main::@2/(const byte) line::x0#0 main::@3/(const byte) line::x0#1 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [10] (byte) line::x1#2 ← phi( main::@2/(byte) 20 main::@3/(byte) 40 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ] + [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] + [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] + [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] + to:line::@1 +line::@1: scope:[line] from line line::@2 + [14] (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [14] (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [14] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] + [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] + [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + to:line::@5 +line::@5: scope:[line] from line::@1 + [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] + [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] + [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] + to:line::@3 +line::@3: scope:[line] from line::@5 + [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] + [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] + to:line::@2 +line::@2: scope:[line] from line::@3 line::@5 + [23] (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + [23] (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] + [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] + to:line::@return +line::@return: scope:[line] from line::@2 + [26] return [ ] + to:@return +plot: scope:[plot] from line::@1 + [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] + [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] + [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] + [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] + [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] + [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] + [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] + [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] + [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] + [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] + [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] + [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] + to:plot::@return +plot::@return: scope:[plot] from plot + [39] return [ ] + to:@return +initplottables: scope:[initplottables] from main::@1 + [40] phi() [ ] + to:initplottables::@1 +initplottables::@1: scope:[initplottables] from initplottables initplottables::@2 + [41] (byte) initplottables::bit#3 ← phi( initplottables/(byte) 128 initplottables::@2/(byte) initplottables::bit#4 ) [ initplottables::x#2 initplottables::bit#3 ] + [41] (byte) initplottables::x#2 ← phi( initplottables/(byte) 0 initplottables::@2/(byte) initplottables::x#1 ) [ initplottables::x#2 initplottables::bit#3 ] + [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] + [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] + [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] + [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] + [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] + [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] + to:initplottables::@2 +initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@10 + [48] (byte) initplottables::bit#4 ← phi( initplottables::@10/(byte) initplottables::bit#1 initplottables::@1/(byte) 128 ) [ initplottables::x#2 initplottables::bit#4 ] + [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] + [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] + to:initplottables::@3 +initplottables::@3: scope:[initplottables] from initplottables::@2 initplottables::@4 + [51] (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ] + [51] (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ] + [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] + [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] + [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] + [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] + [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] + [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] + [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] + [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] + to:initplottables::@7 +initplottables::@7: scope:[initplottables] from initplottables::@3 + [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] + to:initplottables::@4 +initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7 + [61] (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) [ initplottables::y#2 initplottables::yoffs#4 ] + [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] + [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] + to:initplottables::@return +initplottables::@return: scope:[initplottables] from initplottables::@4 + [64] return [ ] + to:@return +initplottables::@10: scope:[initplottables] from initplottables::@1 + to:initplottables::@2 +initscreen: scope:[initscreen] from main + [65] phi() [ ] + to:initscreen::@1 +initscreen::@1: scope:[initscreen] from initscreen initscreen::@1 + [66] (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) BITMAP#0 initscreen::@1/(byte*) initscreen::b#1 ) [ initscreen::b#2 ] + [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] + [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] + [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] + to:initscreen::@2 +initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@2 + [70] (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@1/(const byte*) SCREEN#0 ) [ initscreen::c#2 ] + [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] + [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] + [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] + to:initscreen::@return +initscreen::@return: scope:[initscreen] from initscreen::@2 + [74] return [ ] + to:@return + +DOMINATORS +@begin dominated by @begin +@5 dominated by @5 @begin +@end dominated by @5 @begin @end +main dominated by @5 @begin main +main::@1 dominated by @5 @begin main::@1 main +main::@2 dominated by @5 @begin main::@2 main::@1 main +main::@3 dominated by @5 @begin main::@2 main::@1 main::@3 main +main::@return dominated by @5 @begin main::@2 main::@1 main::@3 main main::@return +line dominated by @5 @begin line main::@2 main::@1 main +line::@1 dominated by @5 @begin line main::@2 main::@1 line::@1 main +line::@5 dominated by @5 @begin line main::@2 main::@1 line::@1 line::@5 main +line::@3 dominated by @5 @begin line main::@2 main::@1 line::@3 line::@1 line::@5 main +line::@2 dominated by @5 @begin line main::@2 main::@1 line::@2 line::@1 line::@5 main +line::@return dominated by @5 @begin line main::@2 main::@1 line::@2 line::@1 line::@5 line::@return main +plot dominated by @5 @begin line main::@2 main::@1 plot line::@1 main +plot::@return dominated by @5 @begin line main::@2 main::@1 plot line::@1 plot::@return main +initplottables dominated by @5 @begin main::@1 initplottables main +initplottables::@1 dominated by initplottables::@1 @5 @begin main::@1 initplottables main +initplottables::@2 dominated by initplottables::@1 @5 @begin main::@1 initplottables::@2 initplottables main +initplottables::@3 dominated by initplottables::@1 @5 @begin main::@1 initplottables::@3 initplottables::@2 initplottables main +initplottables::@7 dominated by initplottables::@1 @5 @begin initplottables::@7 main::@1 initplottables::@3 initplottables::@2 initplottables main +initplottables::@4 dominated by initplottables::@1 @5 @begin main::@1 initplottables::@3 initplottables::@2 initplottables::@4 initplottables main +initplottables::@return dominated by initplottables::@1 @5 @begin main::@1 initplottables::@3 initplottables::@2 initplottables::@4 initplottables initplottables::@return main +initplottables::@10 dominated by initplottables::@1 @5 @begin main::@1 initplottables main initplottables::@10 +initscreen dominated by @5 @begin initscreen main +initscreen::@1 dominated by @5 @begin initscreen main initscreen::@1 +initscreen::@2 dominated by @5 @begin initscreen main initscreen::@1 initscreen::@2 +initscreen::@return dominated by @5 @begin initscreen initscreen::@return main initscreen::@1 initscreen::@2 + +Found back edge: Loop head: line::@1 tails: line::@2 blocks: null +Found back edge: Loop head: initplottables::@1 tails: initplottables::@2 blocks: null +Found back edge: Loop head: initplottables::@3 tails: initplottables::@4 blocks: null +Found back edge: Loop head: initscreen::@1 tails: initscreen::@1 blocks: null +Found back edge: Loop head: initscreen::@2 tails: initscreen::@2 blocks: null +Populated: Loop head: line::@1 tails: line::@2 blocks: line::@2 line::@3 line::@5 line::@1 +Populated: Loop head: initplottables::@1 tails: initplottables::@2 blocks: initplottables::@2 initplottables::@1 initplottables::@10 +Populated: Loop head: initplottables::@3 tails: initplottables::@4 blocks: initplottables::@4 initplottables::@3 initplottables::@7 +Populated: Loop head: initscreen::@1 tails: initscreen::@1 blocks: initscreen::@1 +Populated: Loop head: initscreen::@2 tails: initscreen::@2 blocks: initscreen::@2 +NATURAL LOOPS +Loop head: line::@1 tails: line::@2 blocks: line::@2 line::@3 line::@5 line::@1 +Loop head: initplottables::@1 tails: initplottables::@2 blocks: initplottables::@2 initplottables::@1 initplottables::@10 +Loop head: initplottables::@3 tails: initplottables::@4 blocks: initplottables::@4 initplottables::@3 initplottables::@7 +Loop head: initscreen::@1 tails: initscreen::@1 blocks: initscreen::@1 +Loop head: initscreen::@2 tails: initscreen::@2 blocks: initscreen::@2 + +Found 0 loops in scope [] +Found 0 loops in scope [main] +Found 2 loops in scope [initscreen] + Loop head: initscreen::@1 tails: initscreen::@1 blocks: initscreen::@1 + Loop head: initscreen::@2 tails: initscreen::@2 blocks: initscreen::@2 +Found 2 loops in scope [initplottables] + Loop head: initplottables::@1 tails: initplottables::@2 blocks: initplottables::@2 initplottables::@1 initplottables::@10 + Loop head: initplottables::@3 tails: initplottables::@4 blocks: initplottables::@4 initplottables::@3 initplottables::@7 +Found 1 loops in scope [line] + Loop head: line::@1 tails: line::@2 blocks: line::@2 line::@3 line::@5 line::@1 +Found 0 loops in scope [plot] +NATURAL LOOPS WITH DEPTH +Loop head: line::@1 tails: line::@2 blocks: line::@2 line::@3 line::@5 line::@1 depth: 1 +Loop head: initplottables::@1 tails: initplottables::@2 blocks: initplottables::@2 initplottables::@1 initplottables::@10 depth: 1 +Loop head: initplottables::@3 tails: initplottables::@4 blocks: initplottables::@4 initplottables::@3 initplottables::@7 depth: 1 +Loop head: initscreen::@1 tails: initscreen::@1 blocks: initscreen::@1 depth: 1 +Loop head: initscreen::@2 tails: initscreen::@2 blocks: initscreen::@2 depth: 1 + + +VARIABLE REGISTER WEIGHTS +(byte*) BGCOL +(byte*) BITMAP +(byte) BMM +(byte*) COLS +(byte) CSEL +(byte*) D011 +(byte*) D016 +(byte*) D018 +(byte) DEN +(byte) ECM +(byte*) FGCOL +(byte) MCM +(byte) RSEL +(byte) RST8 +(byte*) SCREEN +(byte*) SCROLL +(void()) initplottables() +(byte~) initplottables::$0 22.0 +(byte~) initplottables::$10 22.0 +(byte~) initplottables::$6 11.0 +(byte~) initplottables::$7 22.0 +(byte~) initplottables::$8 22.0 +(byte~) initplottables::$9 22.0 +(byte) initplottables::bit +(byte) initplottables::bit#1 33.0 +(byte) initplottables::bit#3 6.6000000000000005 +(byte) initplottables::bit#4 7.333333333333333 +(byte) initplottables::x +(byte) initplottables::x#1 16.5 +(byte) initplottables::x#2 8.25 +(byte) initplottables::y +(byte) initplottables::y#1 16.5 +(byte) initplottables::y#2 6.0 +(byte*) initplottables::yoffs +(byte*) initplottables::yoffs#1 22.0 +(byte*) initplottables::yoffs#2 6.111111111111112 +(byte*) initplottables::yoffs#4 11.0 +(void()) initscreen() +(byte*) initscreen::b +(byte*) initscreen::b#1 16.5 +(byte*) initscreen::b#2 16.5 +(byte*) initscreen::c +(byte*) initscreen::c#1 16.5 +(byte*) initscreen::c#2 16.5 +(void()) line((byte) line::x0 , (byte) line::y0 , (byte) line::x1 , (byte) line::y1) +(byte~) line::$10 22.0 +(byte) line::e +(byte) line::e#0 4.0 +(byte) line::e#1 14.666666666666666 +(byte) line::e#2 22.0 +(byte) line::e#3 4.800000000000001 +(byte) line::e#6 11.0 +(byte) line::x +(byte) line::x#0 1.0 +(byte) line::x#1 4.125 +(byte) line::x#2 8.75 +(byte) line::x0 +(byte) line::x1 +(byte) line::x1#2 0.8125 +(byte) line::xd +(byte) line::xd#0 1.5999999999999999 +(byte) line::y +(byte) line::y#0 1.0 +(byte) line::y#1 11.0 +(byte) line::y#2 6.571428571428571 +(byte) line::y#4 11.0 +(byte) line::y0 +(byte) line::y1 +(byte) line::y1#2 1.0 +(byte) line::yd +(byte) line::yd#0 1.0714285714285714 +(void()) main() +(void()) plot((byte) plot::x , (byte) plot::y) +(byte~) plot::$0 2.0 +(byte~) plot::$1 4.0 +(byte~) plot::$2 4.0 +(byte~) plot::$3 2.0 +(byte~) plot::$4 4.0 +(byte~) plot::$5 4.0 +(byte~) plot::$6 2.0 +(byte~) plot::$7 4.0 +(byte~) plot::$8 4.0 +(byte*) plot::plotter +(byte*) plot::plotter#1 1.0 +(byte*) plot::plotter#2 1.5 +(byte) plot::x +(byte) plot::x#0 1.5454545454545456 +(byte) plot::y +(byte) plot::y#0 2.5 +(byte[]) plot_bit +(byte[]) plot_xhi +(byte[]) plot_xlo +(byte[]) plot_yhi +(byte[]) plot_ylo + +Initial phi equivalence classes +[ line::x1#2 ] +[ line::y1#2 ] +[ line::x#2 line::x#0 line::x#1 ] +[ line::y#2 line::y#0 line::y#4 line::y#1 ] +[ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] +[ initplottables::x#2 initplottables::x#1 ] +[ initplottables::bit#3 initplottables::bit#4 initplottables::bit#1 ] +[ initplottables::y#2 initplottables::y#1 ] +[ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 ] +[ initscreen::b#2 initscreen::b#1 ] +[ initscreen::c#2 initscreen::c#1 ] +Added variable line::xd#0 to zero page equivalence class [ line::xd#0 ] +Added variable line::yd#0 to zero page equivalence class [ line::yd#0 ] +Added variable plot::x#0 to zero page equivalence class [ plot::x#0 ] +Added variable plot::y#0 to zero page equivalence class [ plot::y#0 ] +Added variable line::$10 to zero page equivalence class [ line::$10 ] +Added variable plot::$0 to zero page equivalence class [ plot::$0 ] +Added variable plot::$1 to zero page equivalence class [ plot::$1 ] +Added variable plot::$2 to zero page equivalence class [ plot::$2 ] +Added variable plot::plotter#1 to zero page equivalence class [ plot::plotter#1 ] +Added variable plot::$3 to zero page equivalence class [ plot::$3 ] +Added variable plot::$4 to zero page equivalence class [ plot::$4 ] +Added variable plot::$5 to zero page equivalence class [ plot::$5 ] +Added variable plot::plotter#2 to zero page equivalence class [ plot::plotter#2 ] +Added variable plot::$6 to zero page equivalence class [ plot::$6 ] +Added variable plot::$7 to zero page equivalence class [ plot::$7 ] +Added variable plot::$8 to zero page equivalence class [ plot::$8 ] +Added variable initplottables::$0 to zero page equivalence class [ initplottables::$0 ] +Added variable initplottables::$6 to zero page equivalence class [ initplottables::$6 ] +Added variable initplottables::$7 to zero page equivalence class [ initplottables::$7 ] +Added variable initplottables::$8 to zero page equivalence class [ initplottables::$8 ] +Added variable initplottables::$9 to zero page equivalence class [ initplottables::$9 ] +Added variable initplottables::$10 to zero page equivalence class [ initplottables::$10 ] +Complete equivalence classes +[ line::x1#2 ] +[ line::y1#2 ] +[ line::x#2 line::x#0 line::x#1 ] +[ line::y#2 line::y#0 line::y#4 line::y#1 ] +[ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] +[ initplottables::x#2 initplottables::x#1 ] +[ initplottables::bit#3 initplottables::bit#4 initplottables::bit#1 ] +[ initplottables::y#2 initplottables::y#1 ] +[ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 ] +[ initscreen::b#2 initscreen::b#1 ] +[ initscreen::c#2 initscreen::c#1 ] +[ line::xd#0 ] +[ line::yd#0 ] +[ plot::x#0 ] +[ plot::y#0 ] +[ line::$10 ] +[ plot::$0 ] +[ plot::$1 ] +[ plot::$2 ] +[ plot::plotter#1 ] +[ plot::$3 ] +[ plot::$4 ] +[ plot::$5 ] +[ plot::plotter#2 ] +[ plot::$6 ] +[ plot::$7 ] +[ plot::$8 ] +[ initplottables::$0 ] +[ initplottables::$6 ] +[ initplottables::$7 ] +[ initplottables::$8 ] +[ initplottables::$9 ] +[ initplottables::$10 ] +Allocated zp ZP_BYTE:2 [ line::x1#2 ] +Allocated zp ZP_BYTE:3 [ line::y1#2 ] +Allocated zp ZP_BYTE:4 [ line::x#2 line::x#0 line::x#1 ] +Allocated zp ZP_BYTE:5 [ line::y#2 line::y#0 line::y#4 line::y#1 ] +Allocated zp ZP_BYTE:6 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] +Allocated zp ZP_BYTE:7 [ initplottables::x#2 initplottables::x#1 ] +Allocated zp ZP_BYTE:8 [ initplottables::bit#3 initplottables::bit#4 initplottables::bit#1 ] +Allocated zp ZP_BYTE:9 [ initplottables::y#2 initplottables::y#1 ] +Allocated zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 ] +Allocated zp ZP_PTR_BYTE:12 [ initscreen::b#2 initscreen::b#1 ] +Allocated zp ZP_PTR_BYTE:14 [ initscreen::c#2 initscreen::c#1 ] +Allocated zp ZP_BYTE:16 [ line::xd#0 ] +Allocated zp ZP_BYTE:17 [ line::yd#0 ] +Allocated zp ZP_BYTE:18 [ plot::x#0 ] +Allocated zp ZP_BYTE:19 [ plot::y#0 ] +Allocated zp ZP_BYTE:20 [ line::$10 ] +Allocated zp ZP_BYTE:21 [ plot::$0 ] +Allocated zp ZP_BYTE:22 [ plot::$1 ] +Allocated zp ZP_BYTE:23 [ plot::$2 ] +Allocated zp ZP_PTR_BYTE:24 [ plot::plotter#1 ] +Allocated zp ZP_BYTE:26 [ plot::$3 ] +Allocated zp ZP_BYTE:27 [ plot::$4 ] +Allocated zp ZP_BYTE:28 [ plot::$5 ] +Allocated zp ZP_PTR_BYTE:29 [ plot::plotter#2 ] +Allocated zp ZP_BYTE:31 [ plot::$6 ] +Allocated zp ZP_BYTE:32 [ plot::$7 ] +Allocated zp ZP_BYTE:33 [ plot::$8 ] +Allocated zp ZP_BYTE:34 [ initplottables::$0 ] +Allocated zp ZP_BYTE:35 [ initplottables::$6 ] +Allocated zp ZP_BYTE:36 [ initplottables::$7 ] +Allocated zp ZP_BYTE:37 [ initplottables::$8 ] +Allocated zp ZP_BYTE:38 [ initplottables::$9 ] +Allocated zp ZP_BYTE:39 [ initplottables::$10 ] +INITIAL ASM +//SEG0 Global Constants & labels + .const COLS = $d800 + .const BGCOL = $d020 + .const FGCOL = $d021 + .const SCROLL = $d016 + .const D018 = $d018 + .const D011 = $d011 + .const RST8 = $80 + .const ECM = $40 + .const BMM = $20 + .const DEN = $10 + .const RSEL = 8 + .const D016 = $d016 + .const MCM = $10 + .const CSEL = 8 + .const SCREEN = $400 + .const BITMAP = $2000 + .const plot_xlo = $1000 + .const plot_xhi = $1100 + .const plot_ylo = $1200 + .const plot_yhi = $1300 + .const plot_bit = $1400 +//SEG1 @begin +bbegin: + jmp b5 +//SEG2 @5 +b5: +//SEG3 [0] call main param-assignment [ ] + jsr main + jmp bend +//SEG4 @end +bend: +//SEG5 main +main: { + //SEG6 [1] *((const byte*) BGCOL#0) ← (byte) 0 [ ] -- _star_cowo1=coby2 + lda #0 + sta BGCOL + //SEG7 [2] *((const byte*) FGCOL#0) ← (byte) 0 [ ] -- _star_cowo1=coby2 + lda #0 + sta FGCOL + //SEG8 [3] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] -- _star_cowo1=coby2 + lda #BMM|DEN|RSEL|3 + sta D011 + //SEG9 [4] *((const byte*) D018#0) ← (byte) 24 [ ] -- _star_cowo1=coby2 + lda #$18 + sta D018 + //SEG10 [5] call initscreen param-assignment [ ] + //SEG11 [65] phi from main to initscreen [phi:main->initscreen] + initscreen_from_main: + jsr initscreen + jmp b1 + //SEG12 main::@1 + b1: + //SEG13 [6] call initplottables param-assignment [ ] + //SEG14 [40] phi from main::@1 to initplottables [phi:main::@1->initplottables] + initplottables_from_b1: + jsr initplottables + jmp b2 + //SEG15 main::@2 + b2: + //SEG16 [7] call line param-assignment [ ] + //SEG17 [10] phi from main::@2 to line [phi:main::@2->line] + line_from_b2: + //SEG18 [10] phi (byte) line::y#0 = (const byte) line::y0#0 [phi:main::@2->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG19 [10] phi (byte) line::y1#2 = (byte) 10 [phi:main::@2->line#1] -- zpby1=coby1 + lda #$a + sta line.y1 + //SEG20 [10] phi (byte) line::x#0 = (const byte) line::x0#0 [phi:main::@2->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG21 [10] phi (byte) line::x1#2 = (byte) 20 [phi:main::@2->line#3] -- zpby1=coby1 + lda #$14 + sta line.x1 + jsr line + jmp b3 + //SEG22 main::@3 + b3: + //SEG23 [8] call line param-assignment [ ] + //SEG24 [10] phi from main::@3 to line [phi:main::@3->line] + line_from_b3: + //SEG25 [10] phi (byte) line::y#0 = (const byte) line::y0#1 [phi:main::@3->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG26 [10] phi (byte) line::y1#2 = (byte) 40 [phi:main::@3->line#1] -- zpby1=coby1 + lda #$28 + sta line.y1 + //SEG27 [10] phi (byte) line::x#0 = (const byte) line::x0#1 [phi:main::@3->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG28 [10] phi (byte) line::x1#2 = (byte) 40 [phi:main::@3->line#3] -- zpby1=coby1 + lda #$28 + sta line.x1 + jsr line + jmp breturn + //SEG29 main::@return + breturn: + //SEG30 [9] return [ ] + rts +} +//SEG31 line +line: { + .const x0 = 0 + .const y0 = 0 + .label _10 = 20 + .label xd = 16 + .label yd = 17 + .label x = 4 + .label y = 5 + .label e = 6 + .label x1 = 2 + .label y1 = 3 + //SEG32 [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] -- zpby1=zpby2_minus_zpby3 + lda x1 + sec + sbc x + sta xd + //SEG33 [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] -- zpby1=zpby2_minus_zpby3 + lda y1 + sec + sbc y + sta yd + //SEG34 [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] -- zpby1=zpby2_ror_1 + lda yd + lsr + sta e + //SEG35 [14] phi from line line::@2 to line::@1 [phi:line/line::@2->line::@1] + b1_from_line: + b1_from_b2: + //SEG36 [14] phi (byte) line::e#3 = (byte) line::e#0 [phi:line/line::@2->line::@1#0] -- register_copy + //SEG37 [14] phi (byte) line::y#2 = (byte) line::y#0 [phi:line/line::@2->line::@1#1] -- register_copy + //SEG38 [14] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@2->line::@1#2] -- register_copy + jmp b1 + //SEG39 line::@1 + b1: + //SEG40 [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] -- zpby1=zpby2 + lda x + sta plot.x + //SEG41 [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] -- zpby1=zpby2 + lda y + sta plot.y + //SEG42 [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + jsr plot + jmp b5 + //SEG43 line::@5 + b5: + //SEG44 [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] -- zpby1=zpby1_plus_1 + inc x + //SEG45 [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1=zpby1_plus_zpby2 + lda e + clc + adc yd + sta e + //SEG46 [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1_ge_zpby2_then_la1 + lda xd + cmp e + bcs b2_from_b5 + jmp b3 + //SEG47 line::@3 + b3: + //SEG48 [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] -- zpby1=zpby1_plus_1 + inc y + //SEG49 [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] -- zpby1=zpby1_minus_zpby2 + lda e + sec + sbc xd + sta e + //SEG50 [23] phi from line::@3 line::@5 to line::@2 [phi:line::@3/line::@5->line::@2] + b2_from_b3: + b2_from_b5: + //SEG51 [23] phi (byte) line::e#6 = (byte) line::e#2 [phi:line::@3/line::@5->line::@2#0] -- register_copy + //SEG52 [23] phi (byte) line::y#4 = (byte) line::y#1 [phi:line::@3/line::@5->line::@2#1] -- register_copy + jmp b2 + //SEG53 line::@2 + b2: + //SEG54 [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] -- zpby1=zpby2_plus_1 + lda x1 + clc + adc #1 + sta _10 + //SEG55 [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] -- zpby1_lt_zpby2_then_la1 + lda x + cmp _10 + bcc b1_from_b2 + jmp breturn + //SEG56 line::@return + breturn: + //SEG57 [26] return [ ] + rts +} +//SEG58 plot +plot: { + .label _0 = 21 + .label _1 = 22 + .label _2 = 23 + .label _3 = 26 + .label _4 = 27 + .label _5 = 28 + .label _6 = 31 + .label _7 = 32 + .label _8 = 33 + .label x = 18 + .label y = 19 + .label plotter = 24 + .label plotter_2 = 29 + //SEG59 [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] -- zpby1=cowo1_staridx_zpby2 + ldx x + lda plot_xlo,x + sta _0 + //SEG60 [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] -- zpby1=cowo1_staridx_zpby2 + ldx y + lda plot_ylo,x + sta _1 + //SEG61 [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] -- zpby1=zpby2_plus_zpby3 + lda _0 + clc + adc _1 + sta _2 + //SEG62 [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] -- zpptrby1=cowo1_setlo_zpby1 + lda _2 + sta plotter + lda #>BITMAP + sta plotter+1 + //SEG63 [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] -- zpby1=cowo1_staridx_zpby2 + ldx x + lda plot_xhi,x + sta _3 + //SEG64 [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] -- zpby1=cowo1_staridx_zpby2 + ldx y + lda plot_yhi,x + sta _4 + //SEG65 [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] -- zpby1=zpby2_plus_zpby3 + lda _3 + clc + adc _4 + sta _5 + //SEG66 [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] -- zpptrby1=zpptrby2_sethi_zpby1 + lda plotter + sta plotter_2 + lda _5 + sta plotter_2+1 + //SEG67 [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] -- zpby1=_star_zpptrby1 + ldy #0 + lda (plotter_2),y + sta _6 + //SEG68 [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] -- zpby1=cowo1_staridx_zpby2 + ldx x + lda plot_bit,x + sta _7 + //SEG69 [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] -- zpby1=zpby2_bor_zpby3 + lda _6 + ora _7 + sta _8 + //SEG70 [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] -- _star_zpptrby1=zpby1 + ldy #0 + lda _8 + sta (plotter_2),y + jmp breturn + //SEG71 plot::@return + breturn: + //SEG72 [39] return [ ] + rts +} +//SEG73 initplottables +initplottables: { + .label _0 = 34 + .label _6 = 35 + .label _7 = 36 + .label _8 = 37 + .label _9 = 38 + .label _10 = 39 + .label bit = 8 + .label x = 7 + .label y = 9 + .label yoffs = 10 + //SEG74 [41] phi from initplottables to initplottables::@1 [phi:initplottables->initplottables::@1] + b1_from_initplottables: + //SEG75 [41] phi (byte) initplottables::bit#3 = (byte) 128 [phi:initplottables->initplottables::@1#0] -- zpby1=coby1 + lda #$80 + sta bit + //SEG76 [41] phi (byte) initplottables::x#2 = (byte) 0 [phi:initplottables->initplottables::@1#1] -- zpby1=coby1 + lda #0 + sta x + jmp b1 + //SEG77 [41] phi from initplottables::@2 to initplottables::@1 [phi:initplottables::@2->initplottables::@1] + b1_from_b2: + //SEG78 [41] phi (byte) initplottables::bit#3 = (byte) initplottables::bit#4 [phi:initplottables::@2->initplottables::@1#0] -- register_copy + //SEG79 [41] phi (byte) initplottables::x#2 = (byte) initplottables::x#1 [phi:initplottables::@2->initplottables::@1#1] -- register_copy + jmp b1 + //SEG80 initplottables::@1 + b1: + //SEG81 [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] -- zpby1=zpby2_band_coby1 + lda x + and #$f8 + sta _0 + //SEG82 [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_zpby1=zpby2 + lda _0 + ldx x + sta plot_xlo,x + //SEG83 [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_zpby1=coby2 + lda #>BITMAP + ldx x + sta plot_xhi,x + //SEG84 [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_zpby1=zpby2 + lda bit + ldx x + sta plot_bit,x + //SEG85 [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] -- zpby1=zpby1_ror_1 + lsr + sta bit + //SEG86 [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] -- zpby1_neq_0_then_la1 + lda bit + bne b10 + //SEG87 [48] phi from initplottables::@1 to initplottables::@2 [phi:initplottables::@1->initplottables::@2] + b2_from_b1: + //SEG88 [48] phi (byte) initplottables::bit#4 = (byte) 128 [phi:initplottables::@1->initplottables::@2#0] -- zpby1=coby1 + lda #$80 + sta bit + jmp b2 + //SEG89 initplottables::@2 + b2: + //SEG90 [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] -- zpby1=_inc_zpby1 + inc x + //SEG91 [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] -- zpby1_neq_0_then_la1 + lda x + bne b1_from_b2 + //SEG92 [51] phi from initplottables::@2 to initplottables::@3 [phi:initplottables::@2->initplottables::@3] + b3_from_b2: + //SEG93 [51] phi (byte*) initplottables::yoffs#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#0] -- zpptrby1=coby1 + lda #0 + sta yoffs + lda #0 + sta yoffs+1 + //SEG94 [51] phi (byte) initplottables::y#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#1] -- zpby1=coby1 + lda #0 + sta y + jmp b3 + //SEG95 [51] phi from initplottables::@4 to initplottables::@3 [phi:initplottables::@4->initplottables::@3] + b3_from_b4: + //SEG96 [51] phi (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#4 [phi:initplottables::@4->initplottables::@3#0] -- register_copy + //SEG97 [51] phi (byte) initplottables::y#2 = (byte) initplottables::y#1 [phi:initplottables::@4->initplottables::@3#1] -- register_copy + jmp b3 + //SEG98 initplottables::@3 + b3: + //SEG99 [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] -- zpby1=zpby2_band_coby1 + lda y + and #7 + sta _6 + //SEG100 [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] -- zpby1=_lo_zpptrby1 + lda yoffs + sta _7 + //SEG101 [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] -- zpby1=zpby2_bor_zpby3 + lda _6 + ora _7 + sta _8 + //SEG102 [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_zpby1=zpby2 + lda _8 + ldx y + sta plot_ylo,x + //SEG103 [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] -- zpby1=_hi_zpptrby1 + lda yoffs+1 + sta _9 + //SEG104 [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_zpby1=zpby2 + lda _9 + ldx y + sta plot_yhi,x + //SEG105 [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] -- zpby1=zpby2_band_coby1 + lda y + and #7 + sta _10 + //SEG106 [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] -- zpby1_neq_coby1_then_la1 + lda _10 + cmp #7 + bne b4_from_b3 + jmp b7 + //SEG107 initplottables::@7 + b7: + //SEG108 [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] -- zpptrby1=zpptrby1_plus_cowo1 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + //SEG109 [61] phi from initplottables::@3 initplottables::@7 to initplottables::@4 [phi:initplottables::@3/initplottables::@7->initplottables::@4] + b4_from_b3: + b4_from_b7: + //SEG110 [61] phi (byte*) initplottables::yoffs#4 = (byte*) initplottables::yoffs#2 [phi:initplottables::@3/initplottables::@7->initplottables::@4#0] -- register_copy + jmp b4 + //SEG111 initplottables::@4 + b4: + //SEG112 [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] -- zpby1=_inc_zpby1 + inc y + //SEG113 [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] -- zpby1_neq_0_then_la1 + lda y + bne b3_from_b4 + jmp breturn + //SEG114 initplottables::@return + breturn: + //SEG115 [64] return [ ] + rts + //SEG116 initplottables::@10 + b10: + //SEG117 [48] phi from initplottables::@10 to initplottables::@2 [phi:initplottables::@10->initplottables::@2] + b2_from_b10: + //SEG118 [48] phi (byte) initplottables::bit#4 = (byte) initplottables::bit#1 [phi:initplottables::@10->initplottables::@2#0] -- register_copy + jmp b2 +} +//SEG119 initscreen +initscreen: { + .label b = 12 + .label c = 14 + //SEG120 [66] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] + b1_from_initscreen: + //SEG121 [66] phi (byte*) initscreen::b#2 = (const byte*) BITMAP#0 [phi:initscreen->initscreen::@1#0] -- zpptrby1=cowo1 + lda #BITMAP + sta b+1 + jmp b1 + //SEG122 [66] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1] + b1_from_b1: + //SEG123 [66] phi (byte*) initscreen::b#2 = (byte*) initscreen::b#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy + jmp b1 + //SEG124 initscreen::@1 + b1: + //SEG125 [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #0 + sta (b),y + //SEG126 [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] -- zpptrby1=_inc_zpptrby1 + inc b + bne !+ + inc b+1 + !: + //SEG127 [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda b+1 + cmp #>BITMAP+$2000 + bne b1_from_b1 + lda b + cmp #initscreen::@2] + b2_from_b1: + //SEG129 [70] phi (byte*) initscreen::c#2 = (const byte*) SCREEN#0 [phi:initscreen::@1->initscreen::@2#0] -- zpptrby1=cowo1 + lda #SCREEN + sta c+1 + jmp b2 + //SEG130 [70] phi from initscreen::@2 to initscreen::@2 [phi:initscreen::@2->initscreen::@2] + b2_from_b2: + //SEG131 [70] phi (byte*) initscreen::c#2 = (byte*) initscreen::c#1 [phi:initscreen::@2->initscreen::@2#0] -- register_copy + jmp b2 + //SEG132 initscreen::@2 + b2: + //SEG133 [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #$14 + sta (c),y + //SEG134 [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] -- zpptrby1=_inc_zpptrby1 + inc c + bne !+ + inc c+1 + !: + //SEG135 [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda c+1 + cmp #>SCREEN+$400 + bne b2_from_b2 + lda c + cmp #(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] always clobbers reg byte a +Statement [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] always clobbers reg byte a +Statement [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ initplottables::y#2 initplottables::y#1 ] +Statement [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:35 [ initplottables::$6 ] +Statement [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] always clobbers reg byte a +Statement [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] always clobbers reg byte a +Statement [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] always clobbers reg byte a +Statement [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] always clobbers reg byte a +Statement [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] always clobbers reg byte a reg byte y +Statement [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] always clobbers reg byte a +Statement [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] always clobbers reg byte a reg byte y +Statement [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] always clobbers reg byte a +Statement [1] *((const byte*) BGCOL#0) ← (byte) 0 [ ] always clobbers reg byte a +Statement [2] *((const byte*) FGCOL#0) ← (byte) 0 [ ] always clobbers reg byte a +Statement [3] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] always clobbers reg byte a +Statement [4] *((const byte*) D018#0) ← (byte) 24 [ ] always clobbers reg byte a +Statement [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] always clobbers reg byte a +Statement [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] always clobbers reg byte a +Statement [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] always clobbers reg byte a +Statement [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] always clobbers reg byte a +Statement [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] always clobbers reg byte a +Statement [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] always clobbers reg byte a +Statement [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] always clobbers reg byte a +Statement [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] always clobbers reg byte a reg byte y +Statement [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] always clobbers reg byte y +Statement [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] always clobbers reg byte a +Statement [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] always clobbers reg byte a +Statement [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] always clobbers reg byte a +Statement [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] always clobbers reg byte a +Statement [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] always clobbers reg byte a +Statement [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] always clobbers reg byte a +Statement [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] always clobbers reg byte a +Statement [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] always clobbers reg byte a +Statement [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] always clobbers reg byte a +Statement [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] always clobbers reg byte a reg byte y +Statement [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] always clobbers reg byte a +Statement [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] always clobbers reg byte a reg byte y +Statement [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] always clobbers reg byte a +Equivalence Class zp ZP_BYTE:22 [ plot::$1 ] has ALU potential. +Equivalence Class zp ZP_BYTE:27 [ plot::$4 ] has ALU potential. +Equivalence Class zp ZP_BYTE:32 [ plot::$7 ] has ALU potential. +Equivalence Class zp ZP_BYTE:36 [ initplottables::$7 ] has ALU potential. +REGISTER UPLIFT POTENTIAL REGISTERS +Potential registers zp ZP_BYTE:2 [ line::x1#2 ] : zp ZP_BYTE:2 , reg byte x , +Potential registers zp ZP_BYTE:3 [ line::y1#2 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:4 [ line::x#2 line::x#0 line::x#1 ] : zp ZP_BYTE:4 , reg byte x , +Potential registers zp ZP_BYTE:5 [ line::y#2 line::y#0 line::y#4 line::y#1 ] : zp ZP_BYTE:5 , reg byte x , +Potential registers zp ZP_BYTE:6 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] : zp ZP_BYTE:6 , reg byte x , +Potential registers zp ZP_BYTE:7 [ initplottables::x#2 initplottables::x#1 ] : zp ZP_BYTE:7 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:8 [ initplottables::bit#3 initplottables::bit#4 initplottables::bit#1 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:9 [ initplottables::y#2 initplottables::y#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , +Potential registers zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 ] : zp ZP_PTR_BYTE:10 , +Potential registers zp ZP_PTR_BYTE:12 [ initscreen::b#2 initscreen::b#1 ] : zp ZP_PTR_BYTE:12 , +Potential registers zp ZP_PTR_BYTE:14 [ initscreen::c#2 initscreen::c#1 ] : zp ZP_PTR_BYTE:14 , +Potential registers zp ZP_BYTE:16 [ line::xd#0 ] : zp ZP_BYTE:16 , reg byte x , +Potential registers zp ZP_BYTE:17 [ line::yd#0 ] : zp ZP_BYTE:17 , reg byte x , +Potential registers zp ZP_BYTE:18 [ plot::x#0 ] : zp ZP_BYTE:18 , reg byte x , +Potential registers zp ZP_BYTE:19 [ plot::y#0 ] : zp ZP_BYTE:19 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ line::$10 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:21 [ plot::$0 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:22 [ plot::$1 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp ZP_BYTE:23 [ plot::$2 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_PTR_BYTE:24 [ plot::plotter#1 ] : zp ZP_PTR_BYTE:24 , +Potential registers zp ZP_BYTE:26 [ plot::$3 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:27 [ plot::$4 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp ZP_BYTE:28 [ plot::$5 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_PTR_BYTE:29 [ plot::plotter#2 ] : zp ZP_PTR_BYTE:29 , +Potential registers zp ZP_BYTE:31 [ plot::$6 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:32 [ plot::$7 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp ZP_BYTE:33 [ plot::$8 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:34 [ initplottables::$0 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:35 [ initplottables::$6 ] : zp ZP_BYTE:35 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:36 [ initplottables::$7 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp ZP_BYTE:37 [ initplottables::$8 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:38 [ initplottables::$9 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:39 [ initplottables::$10 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [initplottables] 46.93: zp ZP_BYTE:8 [ initplottables::bit#3 initplottables::bit#4 initplottables::bit#1 ] 39.11: zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 ] 24.75: zp ZP_BYTE:7 [ initplottables::x#2 initplottables::x#1 ] 22.5: zp ZP_BYTE:9 [ initplottables::y#2 initplottables::y#1 ] 22: zp ZP_BYTE:34 [ initplottables::$0 ] 22: zp ZP_BYTE:36 [ initplottables::$7 ] 22: zp ZP_BYTE:37 [ initplottables::$8 ] 22: zp ZP_BYTE:38 [ initplottables::$9 ] 22: zp ZP_BYTE:39 [ initplottables::$10 ] 11: zp ZP_BYTE:35 [ initplottables::$6 ] +Uplift Scope [line] 56.47: zp ZP_BYTE:6 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] 29.57: zp ZP_BYTE:5 [ line::y#2 line::y#0 line::y#4 line::y#1 ] 22: zp ZP_BYTE:20 [ line::$10 ] 13.88: zp ZP_BYTE:4 [ line::x#2 line::x#0 line::x#1 ] 1.6: zp ZP_BYTE:16 [ line::xd#0 ] 1.07: zp ZP_BYTE:17 [ line::yd#0 ] 1: zp ZP_BYTE:3 [ line::y1#2 ] 0.81: zp ZP_BYTE:2 [ line::x1#2 ] +Uplift Scope [initscreen] 33: zp ZP_PTR_BYTE:12 [ initscreen::b#2 initscreen::b#1 ] 33: zp ZP_PTR_BYTE:14 [ initscreen::c#2 initscreen::c#1 ] +Uplift Scope [plot] 4: zp ZP_BYTE:22 [ plot::$1 ] 4: zp ZP_BYTE:23 [ plot::$2 ] 4: zp ZP_BYTE:27 [ plot::$4 ] 4: zp ZP_BYTE:28 [ plot::$5 ] 4: zp ZP_BYTE:32 [ plot::$7 ] 4: zp ZP_BYTE:33 [ plot::$8 ] 2.5: zp ZP_BYTE:19 [ plot::y#0 ] 2: zp ZP_BYTE:21 [ plot::$0 ] 2: zp ZP_BYTE:26 [ plot::$3 ] 2: zp ZP_BYTE:31 [ plot::$6 ] 1.55: zp ZP_BYTE:18 [ plot::x#0 ] 1.5: zp ZP_PTR_BYTE:29 [ plot::plotter#2 ] 1: zp ZP_PTR_BYTE:24 [ plot::plotter#1 ] +Uplift Scope [main] +Uplift Scope [] + +Uplift attempts [initplottables] 10000/103680 (limiting to 10000) +Uplifting [initplottables] best 3847 combination reg byte y [ initplottables::bit#3 initplottables::bit#4 initplottables::bit#1 ] zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 ] reg byte x [ initplottables::x#2 initplottables::x#1 ] reg byte x [ initplottables::y#2 initplottables::y#1 ] reg byte a [ initplottables::$0 ] reg byte a [ initplottables::$7 ] reg byte a [ initplottables::$8 ] reg byte a [ initplottables::$9 ] zp ZP_BYTE:39 [ initplottables::$10 ] zp ZP_BYTE:35 [ initplottables::$6 ] +Limited combination testing to 10000 combinations of 103680 possible. +Uplifting [line] best 3780 combination zp ZP_BYTE:6 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] zp ZP_BYTE:5 [ line::y#2 line::y#0 line::y#4 line::y#1 ] reg byte a [ line::$10 ] zp ZP_BYTE:4 [ line::x#2 line::x#0 line::x#1 ] zp ZP_BYTE:16 [ line::xd#0 ] zp ZP_BYTE:17 [ line::yd#0 ] reg byte x [ line::y1#2 ] zp ZP_BYTE:2 [ line::x1#2 ] +Uplifting [initscreen] best 3780 combination zp ZP_PTR_BYTE:12 [ initscreen::b#2 initscreen::b#1 ] zp ZP_PTR_BYTE:14 [ initscreen::c#2 initscreen::c#1 ] +Uplift attempts [plot] 10000/3072000 (limiting to 10000) +Uplifting [plot] best 3744 combination reg byte a [ plot::$1 ] reg byte a [ plot::$2 ] reg byte a [ plot::$4 ] reg byte a [ plot::$5 ] reg byte a [ plot::$7 ] reg byte a [ plot::$8 ] zp ZP_BYTE:19 [ plot::y#0 ] zp ZP_BYTE:21 [ plot::$0 ] zp ZP_BYTE:26 [ plot::$3 ] zp ZP_BYTE:31 [ plot::$6 ] zp ZP_BYTE:18 [ plot::x#0 ] zp ZP_PTR_BYTE:29 [ plot::plotter#2 ] zp ZP_PTR_BYTE:24 [ plot::plotter#1 ] +Limited combination testing to 10000 combinations of 3072000 possible. +Uplifting [main] best 3744 combination +Uplifting [] best 3744 combination +Attempting to uplift remaining variables inzp ZP_BYTE:6 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] +Uplifting [line] best 3744 combination zp ZP_BYTE:6 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:5 [ line::y#2 line::y#0 line::y#4 line::y#1 ] +Uplifting [line] best 3744 combination zp ZP_BYTE:5 [ line::y#2 line::y#0 line::y#4 line::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:39 [ initplottables::$10 ] +Uplifting [initplottables] best 3684 combination reg byte a [ initplottables::$10 ] +Attempting to uplift remaining variables inzp ZP_BYTE:4 [ line::x#2 line::x#0 line::x#1 ] +Uplifting [line] best 3684 combination zp ZP_BYTE:4 [ line::x#2 line::x#0 line::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:35 [ initplottables::$6 ] +Uplifting [initplottables] best 3684 combination zp ZP_BYTE:35 [ initplottables::$6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:19 [ plot::y#0 ] +Uplifting [plot] best 3648 combination reg byte y [ plot::y#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:21 [ plot::$0 ] +Uplifting [plot] best 3648 combination zp ZP_BYTE:21 [ plot::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:26 [ plot::$3 ] +Uplifting [plot] best 3648 combination zp ZP_BYTE:26 [ plot::$3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:31 [ plot::$6 ] +Uplifting [plot] best 3648 combination zp ZP_BYTE:31 [ plot::$6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:16 [ line::xd#0 ] +Uplifting [line] best 3648 combination zp ZP_BYTE:16 [ line::xd#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:18 [ plot::x#0 ] +Uplifting [plot] best 3609 combination reg byte x [ plot::x#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:17 [ line::yd#0 ] +Uplifting [line] best 3609 combination zp ZP_BYTE:17 [ line::yd#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ line::x1#2 ] +Uplifting [line] best 3609 combination zp ZP_BYTE:2 [ line::x1#2 ] +Coalescing zero page register [ zp ZP_BYTE:2 [ line::x1#2 ] ] with [ zp ZP_BYTE:35 [ initplottables::$6 ] ] +Coalescing zero page register [ zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 ] ] with [ zp ZP_PTR_BYTE:12 [ initscreen::b#2 initscreen::b#1 ] ] +Coalescing zero page register [ zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 initscreen::b#2 initscreen::b#1 ] ] with [ zp ZP_PTR_BYTE:14 [ initscreen::c#2 initscreen::c#1 ] ] +Coalescing zero page register [ zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 initscreen::b#2 initscreen::b#1 initscreen::c#2 initscreen::c#1 ] ] with [ zp ZP_PTR_BYTE:24 [ plot::plotter#1 ] ] +Coalescing zero page register [ zp ZP_PTR_BYTE:10 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 initscreen::b#2 initscreen::b#1 initscreen::c#2 initscreen::c#1 plot::plotter#1 ] ] with [ zp ZP_PTR_BYTE:29 [ plot::plotter#2 ] ] +Coalescing zero page register [ zp ZP_BYTE:21 [ plot::$0 ] ] with [ zp ZP_BYTE:26 [ plot::$3 ] ] +Coalescing zero page register [ zp ZP_BYTE:21 [ plot::$0 plot::$3 ] ] with [ zp ZP_BYTE:31 [ plot::$6 ] ] +Allocated (was zp ZP_BYTE:4) zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ] +Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ line::y#2 line::y#0 line::y#4 line::y#1 ] +Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:5 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ] +Allocated (was zp ZP_PTR_BYTE:10) zp ZP_PTR_BYTE:6 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 initscreen::b#2 initscreen::b#1 initscreen::c#2 initscreen::c#1 plot::plotter#1 plot::plotter#2 ] +Allocated (was zp ZP_BYTE:16) zp ZP_BYTE:8 [ line::xd#0 ] +Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:9 [ line::yd#0 ] +Allocated (was zp ZP_BYTE:21) zp ZP_BYTE:10 [ plot::$0 plot::$3 plot::$6 ] +Removing instruction jmp b5 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b5 +Removing instruction jmp b3 +Removing instruction jmp b2 +Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b7 +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +ASSEMBLER +//SEG0 Global Constants & labels + .const COLS = $d800 + .const BGCOL = $d020 + .const FGCOL = $d021 + .const SCROLL = $d016 + .const D018 = $d018 + .const D011 = $d011 + .const RST8 = $80 + .const ECM = $40 + .const BMM = $20 + .const DEN = $10 + .const RSEL = 8 + .const D016 = $d016 + .const MCM = $10 + .const CSEL = 8 + .const SCREEN = $400 + .const BITMAP = $2000 + .const plot_xlo = $1000 + .const plot_xhi = $1100 + .const plot_ylo = $1200 + .const plot_yhi = $1300 + .const plot_bit = $1400 +//SEG1 @begin +bbegin: +//SEG2 @5 +b5: +//SEG3 [0] call main param-assignment [ ] + jsr main +//SEG4 @end +bend: +//SEG5 main +main: { + //SEG6 [1] *((const byte*) BGCOL#0) ← (byte) 0 [ ] -- _star_cowo1=coby2 + lda #0 + sta BGCOL + //SEG7 [2] *((const byte*) FGCOL#0) ← (byte) 0 [ ] -- _star_cowo1=coby2 + lda #0 + sta FGCOL + //SEG8 [3] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] -- _star_cowo1=coby2 + lda #BMM|DEN|RSEL|3 + sta D011 + //SEG9 [4] *((const byte*) D018#0) ← (byte) 24 [ ] -- _star_cowo1=coby2 + lda #$18 + sta D018 + //SEG10 [5] call initscreen param-assignment [ ] + //SEG11 [65] phi from main to initscreen [phi:main->initscreen] + initscreen_from_main: + jsr initscreen + //SEG12 main::@1 + b1: + //SEG13 [6] call initplottables param-assignment [ ] + //SEG14 [40] phi from main::@1 to initplottables [phi:main::@1->initplottables] + initplottables_from_b1: + jsr initplottables + //SEG15 main::@2 + b2: + //SEG16 [7] call line param-assignment [ ] + //SEG17 [10] phi from main::@2 to line [phi:main::@2->line] + line_from_b2: + //SEG18 [10] phi (byte) line::y#0 = (const byte) line::y0#0 [phi:main::@2->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG19 [10] phi (byte) line::y1#2 = (byte) 10 [phi:main::@2->line#1] -- xby=coby1 + ldx #$a + //SEG20 [10] phi (byte) line::x#0 = (const byte) line::x0#0 [phi:main::@2->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG21 [10] phi (byte) line::x1#2 = (byte) 20 [phi:main::@2->line#3] -- zpby1=coby1 + lda #$14 + sta line.x1 + jsr line + //SEG22 main::@3 + b3: + //SEG23 [8] call line param-assignment [ ] + //SEG24 [10] phi from main::@3 to line [phi:main::@3->line] + line_from_b3: + //SEG25 [10] phi (byte) line::y#0 = (const byte) line::y0#1 [phi:main::@3->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG26 [10] phi (byte) line::y1#2 = (byte) 40 [phi:main::@3->line#1] -- xby=coby1 + ldx #$28 + //SEG27 [10] phi (byte) line::x#0 = (const byte) line::x0#1 [phi:main::@3->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG28 [10] phi (byte) line::x1#2 = (byte) 40 [phi:main::@3->line#3] -- zpby1=coby1 + lda #$28 + sta line.x1 + jsr line + //SEG29 main::@return + breturn: + //SEG30 [9] return [ ] + rts +} +//SEG31 line +line: { + .const x0 = 0 + .const y0 = 0 + .label xd = 8 + .label yd = 9 + .label x = 3 + .label y = 4 + .label e = 5 + .label x1 = 2 + //SEG32 [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] -- zpby1=zpby2_minus_zpby3 + lda x1 + sec + sbc x + sta xd + //SEG33 [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] -- zpby1=xby_minus_zpby2 + txa + sec + sbc y + sta yd + //SEG34 [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] -- zpby1=zpby2_ror_1 + lda yd + lsr + sta e + //SEG35 [14] phi from line line::@2 to line::@1 [phi:line/line::@2->line::@1] + b1_from_line: + b1_from_b2: + //SEG36 [14] phi (byte) line::e#3 = (byte) line::e#0 [phi:line/line::@2->line::@1#0] -- register_copy + //SEG37 [14] phi (byte) line::y#2 = (byte) line::y#0 [phi:line/line::@2->line::@1#1] -- register_copy + //SEG38 [14] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@2->line::@1#2] -- register_copy + //SEG39 line::@1 + b1: + //SEG40 [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] -- xby=zpby1 + ldx x + //SEG41 [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] -- yby=zpby1 + ldy y + //SEG42 [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + jsr plot + //SEG43 line::@5 + b5: + //SEG44 [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] -- zpby1=zpby1_plus_1 + inc x + //SEG45 [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1=zpby1_plus_zpby2 + lda e + clc + adc yd + sta e + //SEG46 [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1_ge_zpby2_then_la1 + lda xd + cmp e + bcs b2_from_b5 + //SEG47 line::@3 + b3: + //SEG48 [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] -- zpby1=zpby1_plus_1 + inc y + //SEG49 [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] -- zpby1=zpby1_minus_zpby2 + lda e + sec + sbc xd + sta e + //SEG50 [23] phi from line::@3 line::@5 to line::@2 [phi:line::@3/line::@5->line::@2] + b2_from_b3: + b2_from_b5: + //SEG51 [23] phi (byte) line::e#6 = (byte) line::e#2 [phi:line::@3/line::@5->line::@2#0] -- register_copy + //SEG52 [23] phi (byte) line::y#4 = (byte) line::y#1 [phi:line::@3/line::@5->line::@2#1] -- register_copy + //SEG53 line::@2 + b2: + //SEG54 [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] -- aby=zpby1_plus_1 + lda x1 + clc + adc #1 + //SEG55 [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] -- zpby1_lt_aby_then_la1 + cmp x + bcs b1_from_b2 + //SEG56 line::@return + breturn: + //SEG57 [26] return [ ] + rts +} +//SEG58 plot +plot: { + .label _0 = 10 + .label _3 = 10 + .label _6 = 10 + .label plotter = 6 + //SEG59 [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] -- zpby1=cowo1_staridx_xby + lda plot_xlo,x + sta _0 + //SEG60 [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] -- aby=cowo1_staridx_yby + lda plot_ylo,y + //SEG61 [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] -- aby=zpby1_plus_aby + clc + adc _0 + //SEG62 [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] -- zpptrby1=cowo1_setlo_aby + sta plotter + lda #>BITMAP + sta plotter+1 + //SEG63 [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] -- zpby1=cowo1_staridx_xby + lda plot_xhi,x + sta _3 + //SEG64 [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] -- aby=cowo1_staridx_yby + lda plot_yhi,y + //SEG65 [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] -- aby=zpby1_plus_aby + clc + adc _3 + //SEG66 [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] -- zpptrby1=zpptrby1_sethi_aby + sta plotter+1 + //SEG67 [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] -- zpby1=_star_zpptrby1 + ldy #0 + lda (plotter),y + sta _6 + //SEG68 [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] -- aby=cowo1_staridx_xby + lda plot_bit,x + //SEG69 [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG70 [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] -- _star_zpptrby1=aby + ldy #0 + sta (plotter),y + //SEG71 plot::@return + breturn: + //SEG72 [39] return [ ] + rts +} +//SEG73 initplottables +initplottables: { + .label _6 = 2 + .label yoffs = 6 + //SEG74 [41] phi from initplottables to initplottables::@1 [phi:initplottables->initplottables::@1] + b1_from_initplottables: + //SEG75 [41] phi (byte) initplottables::bit#3 = (byte) 128 [phi:initplottables->initplottables::@1#0] -- yby=coby1 + ldy #$80 + //SEG76 [41] phi (byte) initplottables::x#2 = (byte) 0 [phi:initplottables->initplottables::@1#1] -- xby=coby1 + ldx #0 + jmp b1 + //SEG77 [41] phi from initplottables::@2 to initplottables::@1 [phi:initplottables::@2->initplottables::@1] + b1_from_b2: + //SEG78 [41] phi (byte) initplottables::bit#3 = (byte) initplottables::bit#4 [phi:initplottables::@2->initplottables::@1#0] -- register_copy + //SEG79 [41] phi (byte) initplottables::x#2 = (byte) initplottables::x#1 [phi:initplottables::@2->initplottables::@1#1] -- register_copy + //SEG80 initplottables::@1 + b1: + //SEG81 [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] -- aby=xby_band_coby1 + txa + and #$f8 + //SEG82 [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=aby + sta plot_xlo,x + //SEG83 [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=coby2 + lda #>BITMAP + sta plot_xhi,x + //SEG84 [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=yby + tya + sta plot_bit,x + //SEG85 [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] -- yby=yby_ror_1 + tya + lsr + tay + //SEG86 [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] -- yby_neq_0_then_la1 + cpy #0 + bne b10 + //SEG87 [48] phi from initplottables::@1 to initplottables::@2 [phi:initplottables::@1->initplottables::@2] + b2_from_b1: + //SEG88 [48] phi (byte) initplottables::bit#4 = (byte) 128 [phi:initplottables::@1->initplottables::@2#0] -- yby=coby1 + ldy #$80 + //SEG89 initplottables::@2 + b2: + //SEG90 [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] -- xby=_inc_xby + inx + //SEG91 [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b1_from_b2 + //SEG92 [51] phi from initplottables::@2 to initplottables::@3 [phi:initplottables::@2->initplottables::@3] + b3_from_b2: + //SEG93 [51] phi (byte*) initplottables::yoffs#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#0] -- zpptrby1=coby1 + lda #0 + sta yoffs + lda #0 + sta yoffs+1 + //SEG94 [51] phi (byte) initplottables::y#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#1] -- xby=coby1 + ldx #0 + jmp b3 + //SEG95 [51] phi from initplottables::@4 to initplottables::@3 [phi:initplottables::@4->initplottables::@3] + b3_from_b4: + //SEG96 [51] phi (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#4 [phi:initplottables::@4->initplottables::@3#0] -- register_copy + //SEG97 [51] phi (byte) initplottables::y#2 = (byte) initplottables::y#1 [phi:initplottables::@4->initplottables::@3#1] -- register_copy + //SEG98 initplottables::@3 + b3: + //SEG99 [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] -- zpby1=xby_band_coby1 + txa + and #7 + sta _6 + //SEG100 [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] -- aby=_lo_zpptrby1 + lda yoffs + //SEG101 [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG102 [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_ylo,x + //SEG103 [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] -- aby=_hi_zpptrby1 + lda yoffs+1 + //SEG104 [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_yhi,x + //SEG105 [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] -- aby=xby_band_coby1 + txa + and #7 + //SEG106 [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] -- aby_neq_coby1_then_la1 + cmp #7 + bne b4_from_b3 + //SEG107 initplottables::@7 + b7: + //SEG108 [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] -- zpptrby1=zpptrby1_plus_cowo1 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + //SEG109 [61] phi from initplottables::@3 initplottables::@7 to initplottables::@4 [phi:initplottables::@3/initplottables::@7->initplottables::@4] + b4_from_b3: + b4_from_b7: + //SEG110 [61] phi (byte*) initplottables::yoffs#4 = (byte*) initplottables::yoffs#2 [phi:initplottables::@3/initplottables::@7->initplottables::@4#0] -- register_copy + //SEG111 initplottables::@4 + b4: + //SEG112 [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby=_inc_xby + inx + //SEG113 [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b3_from_b4 + //SEG114 initplottables::@return + breturn: + //SEG115 [64] return [ ] + rts + //SEG116 initplottables::@10 + b10: + //SEG117 [48] phi from initplottables::@10 to initplottables::@2 [phi:initplottables::@10->initplottables::@2] + b2_from_b10: + //SEG118 [48] phi (byte) initplottables::bit#4 = (byte) initplottables::bit#1 [phi:initplottables::@10->initplottables::@2#0] -- register_copy + jmp b2 +} +//SEG119 initscreen +initscreen: { + .label b = 6 + .label c = 6 + //SEG120 [66] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] + b1_from_initscreen: + //SEG121 [66] phi (byte*) initscreen::b#2 = (const byte*) BITMAP#0 [phi:initscreen->initscreen::@1#0] -- zpptrby1=cowo1 + lda #BITMAP + sta b+1 + jmp b1 + //SEG122 [66] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1] + b1_from_b1: + //SEG123 [66] phi (byte*) initscreen::b#2 = (byte*) initscreen::b#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy + //SEG124 initscreen::@1 + b1: + //SEG125 [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #0 + sta (b),y + //SEG126 [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] -- zpptrby1=_inc_zpptrby1 + inc b + bne !+ + inc b+1 + !: + //SEG127 [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda b+1 + cmp #>BITMAP+$2000 + bne b1_from_b1 + lda b + cmp #initscreen::@2] + b2_from_b1: + //SEG129 [70] phi (byte*) initscreen::c#2 = (const byte*) SCREEN#0 [phi:initscreen::@1->initscreen::@2#0] -- zpptrby1=cowo1 + lda #SCREEN + sta c+1 + jmp b2 + //SEG130 [70] phi from initscreen::@2 to initscreen::@2 [phi:initscreen::@2->initscreen::@2] + b2_from_b2: + //SEG131 [70] phi (byte*) initscreen::c#2 = (byte*) initscreen::c#1 [phi:initscreen::@2->initscreen::@2#0] -- register_copy + //SEG132 initscreen::@2 + b2: + //SEG133 [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #$14 + sta (c),y + //SEG134 [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] -- zpptrby1=_inc_zpptrby1 + inc c + bne !+ + inc c+1 + !: + //SEG135 [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda c+1 + cmp #>SCREEN+$400 + bne b2_from_b2 + lda c + cmp #initscreen] + initscreen_from_main: + jsr initscreen + //SEG12 main::@1 + b1: + //SEG13 [6] call initplottables param-assignment [ ] + //SEG14 [40] phi from main::@1 to initplottables [phi:main::@1->initplottables] + initplottables_from_b1: + jsr initplottables + //SEG15 main::@2 + b2: + //SEG16 [7] call line param-assignment [ ] + //SEG17 [10] phi from main::@2 to line [phi:main::@2->line] + line_from_b2: + //SEG18 [10] phi (byte) line::y#0 = (const byte) line::y0#0 [phi:main::@2->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG19 [10] phi (byte) line::y1#2 = (byte) 10 [phi:main::@2->line#1] -- xby=coby1 + ldx #$a + //SEG20 [10] phi (byte) line::x#0 = (const byte) line::x0#0 [phi:main::@2->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG21 [10] phi (byte) line::x1#2 = (byte) 20 [phi:main::@2->line#3] -- zpby1=coby1 + lda #$14 + sta line.x1 + jsr line + //SEG22 main::@3 + b3: + //SEG23 [8] call line param-assignment [ ] + //SEG24 [10] phi from main::@3 to line [phi:main::@3->line] + line_from_b3: + //SEG25 [10] phi (byte) line::y#0 = (const byte) line::y0#1 [phi:main::@3->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG26 [10] phi (byte) line::y1#2 = (byte) 40 [phi:main::@3->line#1] -- xby=coby1 + ldx #$28 + //SEG27 [10] phi (byte) line::x#0 = (const byte) line::x0#1 [phi:main::@3->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG28 [10] phi (byte) line::x1#2 = (byte) 40 [phi:main::@3->line#3] -- zpby1=coby1 + lda #$28 + sta line.x1 + jsr line + //SEG29 main::@return + breturn: + //SEG30 [9] return [ ] + rts +} +//SEG31 line +line: { + .const x0 = 0 + .const y0 = 0 + .label xd = 8 + .label yd = 9 + .label x = 3 + .label y = 4 + .label e = 5 + .label x1 = 2 + //SEG32 [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] -- zpby1=zpby2_minus_zpby3 + lda x1 + sec + sbc x + sta xd + //SEG33 [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] -- zpby1=xby_minus_zpby2 + txa + sec + sbc y + sta yd + //SEG34 [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] -- zpby1=zpby2_ror_1 + lda yd + lsr + sta e + //SEG35 [14] phi from line line::@2 to line::@1 [phi:line/line::@2->line::@1] + b1_from_line: + b1_from_b2: + //SEG36 [14] phi (byte) line::e#3 = (byte) line::e#0 [phi:line/line::@2->line::@1#0] -- register_copy + //SEG37 [14] phi (byte) line::y#2 = (byte) line::y#0 [phi:line/line::@2->line::@1#1] -- register_copy + //SEG38 [14] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@2->line::@1#2] -- register_copy + //SEG39 line::@1 + b1: + //SEG40 [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] -- xby=zpby1 + ldx x + //SEG41 [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] -- yby=zpby1 + ldy y + //SEG42 [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + jsr plot + //SEG43 line::@5 + b5: + //SEG44 [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] -- zpby1=zpby1_plus_1 + inc x + //SEG45 [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1=zpby1_plus_zpby2 + lda e + clc + adc yd + sta e + //SEG46 [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1_ge_zpby2_then_la1 + lda xd + cmp e + bcs b2_from_b5 + //SEG47 line::@3 + b3: + //SEG48 [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] -- zpby1=zpby1_plus_1 + inc y + //SEG49 [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] -- zpby1=zpby1_minus_zpby2 + lda e + sec + sbc xd + sta e + //SEG50 [23] phi from line::@3 line::@5 to line::@2 [phi:line::@3/line::@5->line::@2] + b2_from_b3: + b2_from_b5: + //SEG51 [23] phi (byte) line::e#6 = (byte) line::e#2 [phi:line::@3/line::@5->line::@2#0] -- register_copy + //SEG52 [23] phi (byte) line::y#4 = (byte) line::y#1 [phi:line::@3/line::@5->line::@2#1] -- register_copy + //SEG53 line::@2 + b2: + //SEG54 [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] -- aby=zpby1_plus_1 + lda x1 + clc + adc #1 + //SEG55 [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] -- zpby1_lt_aby_then_la1 + cmp x + bcs b1_from_b2 + //SEG56 line::@return + breturn: + //SEG57 [26] return [ ] + rts +} +//SEG58 plot +plot: { + .label _0 = 10 + .label _3 = 10 + .label _6 = 10 + .label plotter = 6 + //SEG59 [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] -- zpby1=cowo1_staridx_xby + lda plot_xlo,x + sta _0 + //SEG60 [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] -- aby=cowo1_staridx_yby + lda plot_ylo,y + //SEG61 [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] -- aby=zpby1_plus_aby + clc + adc _0 + //SEG62 [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] -- zpptrby1=cowo1_setlo_aby + sta plotter + lda #>BITMAP + sta plotter+1 + //SEG63 [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] -- zpby1=cowo1_staridx_xby + lda plot_xhi,x + sta _3 + //SEG64 [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] -- aby=cowo1_staridx_yby + lda plot_yhi,y + //SEG65 [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] -- aby=zpby1_plus_aby + clc + adc _3 + //SEG66 [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] -- zpptrby1=zpptrby1_sethi_aby + sta plotter+1 + //SEG67 [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] -- zpby1=_star_zpptrby1 + ldy #0 + lda (plotter),y + sta _6 + //SEG68 [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] -- aby=cowo1_staridx_xby + lda plot_bit,x + //SEG69 [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG70 [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] -- _star_zpptrby1=aby + sta (plotter),y + //SEG71 plot::@return + breturn: + //SEG72 [39] return [ ] + rts +} +//SEG73 initplottables +initplottables: { + .label _6 = 2 + .label yoffs = 6 + //SEG74 [41] phi from initplottables to initplottables::@1 [phi:initplottables->initplottables::@1] + b1_from_initplottables: + //SEG75 [41] phi (byte) initplottables::bit#3 = (byte) 128 [phi:initplottables->initplottables::@1#0] -- yby=coby1 + ldy #$80 + //SEG76 [41] phi (byte) initplottables::x#2 = (byte) 0 [phi:initplottables->initplottables::@1#1] -- xby=coby1 + ldx #0 + jmp b1 + //SEG77 [41] phi from initplottables::@2 to initplottables::@1 [phi:initplottables::@2->initplottables::@1] + b1_from_b2: + //SEG78 [41] phi (byte) initplottables::bit#3 = (byte) initplottables::bit#4 [phi:initplottables::@2->initplottables::@1#0] -- register_copy + //SEG79 [41] phi (byte) initplottables::x#2 = (byte) initplottables::x#1 [phi:initplottables::@2->initplottables::@1#1] -- register_copy + //SEG80 initplottables::@1 + b1: + //SEG81 [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] -- aby=xby_band_coby1 + txa + and #$f8 + //SEG82 [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=aby + sta plot_xlo,x + //SEG83 [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=coby2 + lda #>BITMAP + sta plot_xhi,x + //SEG84 [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=yby + tya + sta plot_bit,x + //SEG85 [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] -- yby=yby_ror_1 + tya + lsr + tay + //SEG86 [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] -- yby_neq_0_then_la1 + cpy #0 + bne b10 + //SEG87 [48] phi from initplottables::@1 to initplottables::@2 [phi:initplottables::@1->initplottables::@2] + b2_from_b1: + //SEG88 [48] phi (byte) initplottables::bit#4 = (byte) 128 [phi:initplottables::@1->initplottables::@2#0] -- yby=coby1 + ldy #$80 + //SEG89 initplottables::@2 + b2: + //SEG90 [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] -- xby=_inc_xby + inx + //SEG91 [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b1_from_b2 + //SEG92 [51] phi from initplottables::@2 to initplottables::@3 [phi:initplottables::@2->initplottables::@3] + b3_from_b2: + //SEG93 [51] phi (byte*) initplottables::yoffs#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#0] -- zpptrby1=coby1 + lda #0 + sta yoffs + sta yoffs+1 + //SEG94 [51] phi (byte) initplottables::y#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#1] -- xby=coby1 + ldx #0 + jmp b3 + //SEG95 [51] phi from initplottables::@4 to initplottables::@3 [phi:initplottables::@4->initplottables::@3] + b3_from_b4: + //SEG96 [51] phi (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#4 [phi:initplottables::@4->initplottables::@3#0] -- register_copy + //SEG97 [51] phi (byte) initplottables::y#2 = (byte) initplottables::y#1 [phi:initplottables::@4->initplottables::@3#1] -- register_copy + //SEG98 initplottables::@3 + b3: + //SEG99 [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] -- zpby1=xby_band_coby1 + txa + and #7 + sta _6 + //SEG100 [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] -- aby=_lo_zpptrby1 + lda yoffs + //SEG101 [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG102 [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_ylo,x + //SEG103 [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] -- aby=_hi_zpptrby1 + lda yoffs+1 + //SEG104 [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_yhi,x + //SEG105 [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] -- aby=xby_band_coby1 + txa + and #7 + //SEG106 [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] -- aby_neq_coby1_then_la1 + cmp #7 + bne b4_from_b3 + //SEG107 initplottables::@7 + b7: + //SEG108 [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] -- zpptrby1=zpptrby1_plus_cowo1 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + //SEG109 [61] phi from initplottables::@3 initplottables::@7 to initplottables::@4 [phi:initplottables::@3/initplottables::@7->initplottables::@4] + b4_from_b3: + b4_from_b7: + //SEG110 [61] phi (byte*) initplottables::yoffs#4 = (byte*) initplottables::yoffs#2 [phi:initplottables::@3/initplottables::@7->initplottables::@4#0] -- register_copy + //SEG111 initplottables::@4 + b4: + //SEG112 [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby=_inc_xby + inx + //SEG113 [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b3_from_b4 + //SEG114 initplottables::@return + breturn: + //SEG115 [64] return [ ] + rts + //SEG116 initplottables::@10 + b10: + //SEG117 [48] phi from initplottables::@10 to initplottables::@2 [phi:initplottables::@10->initplottables::@2] + b2_from_b10: + //SEG118 [48] phi (byte) initplottables::bit#4 = (byte) initplottables::bit#1 [phi:initplottables::@10->initplottables::@2#0] -- register_copy + jmp b2 +} +//SEG119 initscreen +initscreen: { + .label b = 6 + .label c = 6 + //SEG120 [66] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] + b1_from_initscreen: + //SEG121 [66] phi (byte*) initscreen::b#2 = (const byte*) BITMAP#0 [phi:initscreen->initscreen::@1#0] -- zpptrby1=cowo1 + lda #BITMAP + sta b+1 + jmp b1 + //SEG122 [66] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1] + b1_from_b1: + //SEG123 [66] phi (byte*) initscreen::b#2 = (byte*) initscreen::b#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy + //SEG124 initscreen::@1 + b1: + //SEG125 [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #0 + sta (b),y + //SEG126 [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] -- zpptrby1=_inc_zpptrby1 + inc b + bne !+ + inc b+1 + !: + //SEG127 [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda b+1 + cmp #>BITMAP+$2000 + bne b1_from_b1 + lda b + cmp #initscreen::@2] + b2_from_b1: + //SEG129 [70] phi (byte*) initscreen::c#2 = (const byte*) SCREEN#0 [phi:initscreen::@1->initscreen::@2#0] -- zpptrby1=cowo1 + lda #SCREEN + sta c+1 + jmp b2 + //SEG130 [70] phi from initscreen::@2 to initscreen::@2 [phi:initscreen::@2->initscreen::@2] + b2_from_b2: + //SEG131 [70] phi (byte*) initscreen::c#2 = (byte*) initscreen::c#1 [phi:initscreen::@2->initscreen::@2#0] -- register_copy + //SEG132 initscreen::@2 + b2: + //SEG133 [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #$14 + sta (c),y + //SEG134 [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] -- zpptrby1=_inc_zpptrby1 + inc c + bne !+ + inc c+1 + !: + //SEG135 [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda c+1 + cmp #>SCREEN+$400 + bne b2_from_b2 + lda c + cmp #initscreen] + initscreen_from_main: + jsr initscreen + //SEG12 main::@1 + b1: + //SEG13 [6] call initplottables param-assignment [ ] + //SEG14 [40] phi from main::@1 to initplottables [phi:main::@1->initplottables] + jsr initplottables + //SEG15 main::@2 + b2: + //SEG16 [7] call line param-assignment [ ] + //SEG17 [10] phi from main::@2 to line [phi:main::@2->line] + //SEG18 [10] phi (byte) line::y#0 = (const byte) line::y0#0 [phi:main::@2->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG19 [10] phi (byte) line::y1#2 = (byte) 10 [phi:main::@2->line#1] -- xby=coby1 + ldx #$a + //SEG20 [10] phi (byte) line::x#0 = (const byte) line::x0#0 [phi:main::@2->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG21 [10] phi (byte) line::x1#2 = (byte) 20 [phi:main::@2->line#3] -- zpby1=coby1 + lda #$14 + sta line.x1 + jsr line + //SEG22 main::@3 + b3: + //SEG23 [8] call line param-assignment [ ] + //SEG24 [10] phi from main::@3 to line [phi:main::@3->line] + //SEG25 [10] phi (byte) line::y#0 = (const byte) line::y0#1 [phi:main::@3->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG26 [10] phi (byte) line::y1#2 = (byte) 40 [phi:main::@3->line#1] -- xby=coby1 + ldx #$28 + //SEG27 [10] phi (byte) line::x#0 = (const byte) line::x0#1 [phi:main::@3->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG28 [10] phi (byte) line::x1#2 = (byte) 40 [phi:main::@3->line#3] -- zpby1=coby1 + lda #$28 + sta line.x1 + jsr line + //SEG29 main::@return + breturn: + //SEG30 [9] return [ ] + rts +} +//SEG31 line +line: { + .const x0 = 0 + .const y0 = 0 + .label xd = 8 + .label yd = 9 + .label x = 3 + .label y = 4 + .label e = 5 + .label x1 = 2 + //SEG32 [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] -- zpby1=zpby2_minus_zpby3 + lda x1 + sec + sbc x + sta xd + //SEG33 [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] -- zpby1=xby_minus_zpby2 + txa + sec + sbc y + sta yd + //SEG34 [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] -- zpby1=zpby2_ror_1 + lda yd + lsr + sta e + //SEG35 [14] phi from line line::@2 to line::@1 [phi:line/line::@2->line::@1] + //SEG36 [14] phi (byte) line::e#3 = (byte) line::e#0 [phi:line/line::@2->line::@1#0] -- register_copy + //SEG37 [14] phi (byte) line::y#2 = (byte) line::y#0 [phi:line/line::@2->line::@1#1] -- register_copy + //SEG38 [14] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@2->line::@1#2] -- register_copy + //SEG39 line::@1 + b1: + //SEG40 [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] -- xby=zpby1 + ldx x + //SEG41 [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] -- yby=zpby1 + ldy y + //SEG42 [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + jsr plot + //SEG43 line::@5 + b5: + //SEG44 [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] -- zpby1=zpby1_plus_1 + inc x + //SEG45 [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1=zpby1_plus_zpby2 + lda e + clc + adc yd + sta e + //SEG46 [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1_ge_zpby2_then_la1 + lda xd + cmp e + bcs b2 + //SEG47 line::@3 + b3: + //SEG48 [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] -- zpby1=zpby1_plus_1 + inc y + //SEG49 [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] -- zpby1=zpby1_minus_zpby2 + lda e + sec + sbc xd + sta e + //SEG50 [23] phi from line::@3 line::@5 to line::@2 [phi:line::@3/line::@5->line::@2] + //SEG51 [23] phi (byte) line::e#6 = (byte) line::e#2 [phi:line::@3/line::@5->line::@2#0] -- register_copy + //SEG52 [23] phi (byte) line::y#4 = (byte) line::y#1 [phi:line::@3/line::@5->line::@2#1] -- register_copy + //SEG53 line::@2 + b2: + //SEG54 [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] -- aby=zpby1_plus_1 + lda x1 + clc + adc #1 + //SEG55 [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] -- zpby1_lt_aby_then_la1 + cmp x + bcs b1 + //SEG56 line::@return + breturn: + //SEG57 [26] return [ ] + rts +} +//SEG58 plot +plot: { + .label _0 = 10 + .label _3 = 10 + .label _6 = 10 + .label plotter = 6 + //SEG59 [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] -- zpby1=cowo1_staridx_xby + lda plot_xlo,x + sta _0 + //SEG60 [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] -- aby=cowo1_staridx_yby + lda plot_ylo,y + //SEG61 [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] -- aby=zpby1_plus_aby + clc + adc _0 + //SEG62 [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] -- zpptrby1=cowo1_setlo_aby + sta plotter + lda #>BITMAP + sta plotter+1 + //SEG63 [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] -- zpby1=cowo1_staridx_xby + lda plot_xhi,x + sta _3 + //SEG64 [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] -- aby=cowo1_staridx_yby + lda plot_yhi,y + //SEG65 [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] -- aby=zpby1_plus_aby + clc + adc _3 + //SEG66 [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] -- zpptrby1=zpptrby1_sethi_aby + sta plotter+1 + //SEG67 [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] -- zpby1=_star_zpptrby1 + ldy #0 + lda (plotter),y + sta _6 + //SEG68 [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] -- aby=cowo1_staridx_xby + lda plot_bit,x + //SEG69 [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG70 [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] -- _star_zpptrby1=aby + sta (plotter),y + //SEG71 plot::@return + breturn: + //SEG72 [39] return [ ] + rts +} +//SEG73 initplottables +initplottables: { + .label _6 = 2 + .label yoffs = 6 + //SEG74 [41] phi from initplottables to initplottables::@1 [phi:initplottables->initplottables::@1] + b1_from_initplottables: + //SEG75 [41] phi (byte) initplottables::bit#3 = (byte) 128 [phi:initplottables->initplottables::@1#0] -- yby=coby1 + ldy #$80 + //SEG76 [41] phi (byte) initplottables::x#2 = (byte) 0 [phi:initplottables->initplottables::@1#1] -- xby=coby1 + ldx #0 + jmp b1 + //SEG77 [41] phi from initplottables::@2 to initplottables::@1 [phi:initplottables::@2->initplottables::@1] + //SEG78 [41] phi (byte) initplottables::bit#3 = (byte) initplottables::bit#4 [phi:initplottables::@2->initplottables::@1#0] -- register_copy + //SEG79 [41] phi (byte) initplottables::x#2 = (byte) initplottables::x#1 [phi:initplottables::@2->initplottables::@1#1] -- register_copy + //SEG80 initplottables::@1 + b1: + //SEG81 [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] -- aby=xby_band_coby1 + txa + and #$f8 + //SEG82 [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=aby + sta plot_xlo,x + //SEG83 [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=coby2 + lda #>BITMAP + sta plot_xhi,x + //SEG84 [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=yby + tya + sta plot_bit,x + //SEG85 [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] -- yby=yby_ror_1 + tya + lsr + tay + //SEG86 [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] -- yby_neq_0_then_la1 + cpy #0 + bne b10 + //SEG87 [48] phi from initplottables::@1 to initplottables::@2 [phi:initplottables::@1->initplottables::@2] + b2_from_b1: + //SEG88 [48] phi (byte) initplottables::bit#4 = (byte) 128 [phi:initplottables::@1->initplottables::@2#0] -- yby=coby1 + ldy #$80 + //SEG89 initplottables::@2 + b2: + //SEG90 [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] -- xby=_inc_xby + inx + //SEG91 [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b1 + //SEG92 [51] phi from initplottables::@2 to initplottables::@3 [phi:initplottables::@2->initplottables::@3] + b3_from_b2: + //SEG93 [51] phi (byte*) initplottables::yoffs#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#0] -- zpptrby1=coby1 + lda #0 + sta yoffs + sta yoffs+1 + //SEG94 [51] phi (byte) initplottables::y#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#1] -- xby=coby1 + ldx #0 + jmp b3 + //SEG95 [51] phi from initplottables::@4 to initplottables::@3 [phi:initplottables::@4->initplottables::@3] + //SEG96 [51] phi (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#4 [phi:initplottables::@4->initplottables::@3#0] -- register_copy + //SEG97 [51] phi (byte) initplottables::y#2 = (byte) initplottables::y#1 [phi:initplottables::@4->initplottables::@3#1] -- register_copy + //SEG98 initplottables::@3 + b3: + //SEG99 [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] -- zpby1=xby_band_coby1 + txa + and #7 + sta _6 + //SEG100 [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] -- aby=_lo_zpptrby1 + lda yoffs + //SEG101 [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG102 [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_ylo,x + //SEG103 [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] -- aby=_hi_zpptrby1 + lda yoffs+1 + //SEG104 [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_yhi,x + //SEG105 [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] -- aby=xby_band_coby1 + txa + and #7 + //SEG106 [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] -- aby_neq_coby1_then_la1 + cmp #7 + bne b4 + //SEG107 initplottables::@7 + b7: + //SEG108 [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] -- zpptrby1=zpptrby1_plus_cowo1 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + //SEG109 [61] phi from initplottables::@3 initplottables::@7 to initplottables::@4 [phi:initplottables::@3/initplottables::@7->initplottables::@4] + //SEG110 [61] phi (byte*) initplottables::yoffs#4 = (byte*) initplottables::yoffs#2 [phi:initplottables::@3/initplottables::@7->initplottables::@4#0] -- register_copy + //SEG111 initplottables::@4 + b4: + //SEG112 [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby=_inc_xby + inx + //SEG113 [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b3 + //SEG114 initplottables::@return + breturn: + //SEG115 [64] return [ ] + rts + //SEG116 initplottables::@10 + b10: + //SEG117 [48] phi from initplottables::@10 to initplottables::@2 [phi:initplottables::@10->initplottables::@2] + //SEG118 [48] phi (byte) initplottables::bit#4 = (byte) initplottables::bit#1 [phi:initplottables::@10->initplottables::@2#0] -- register_copy + jmp b2 +} +//SEG119 initscreen +initscreen: { + .label b = 6 + .label c = 6 + //SEG120 [66] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] + b1_from_initscreen: + //SEG121 [66] phi (byte*) initscreen::b#2 = (const byte*) BITMAP#0 [phi:initscreen->initscreen::@1#0] -- zpptrby1=cowo1 + lda #BITMAP + sta b+1 + jmp b1 + //SEG122 [66] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1] + //SEG123 [66] phi (byte*) initscreen::b#2 = (byte*) initscreen::b#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy + //SEG124 initscreen::@1 + b1: + //SEG125 [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #0 + sta (b),y + //SEG126 [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] -- zpptrby1=_inc_zpptrby1 + inc b + bne !+ + inc b+1 + !: + //SEG127 [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda b+1 + cmp #>BITMAP+$2000 + bne b1 + lda b + cmp #initscreen::@2] + b2_from_b1: + //SEG129 [70] phi (byte*) initscreen::c#2 = (const byte*) SCREEN#0 [phi:initscreen::@1->initscreen::@2#0] -- zpptrby1=cowo1 + lda #SCREEN + sta c+1 + jmp b2 + //SEG130 [70] phi from initscreen::@2 to initscreen::@2 [phi:initscreen::@2->initscreen::@2] + //SEG131 [70] phi (byte*) initscreen::c#2 = (byte*) initscreen::c#1 [phi:initscreen::@2->initscreen::@2#0] -- register_copy + //SEG132 initscreen::@2 + b2: + //SEG133 [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #$14 + sta (c),y + //SEG134 [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] -- zpptrby1=_inc_zpptrby1 + inc c + bne !+ + inc c+1 + !: + //SEG135 [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda c+1 + cmp #>SCREEN+$400 + bne b2 + lda c + cmp #initscreen] + jsr initscreen + //SEG12 main::@1 + //SEG13 [6] call initplottables param-assignment [ ] + //SEG14 [40] phi from main::@1 to initplottables [phi:main::@1->initplottables] + jsr initplottables + //SEG15 main::@2 + //SEG16 [7] call line param-assignment [ ] + //SEG17 [10] phi from main::@2 to line [phi:main::@2->line] + //SEG18 [10] phi (byte) line::y#0 = (const byte) line::y0#0 [phi:main::@2->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG19 [10] phi (byte) line::y1#2 = (byte) 10 [phi:main::@2->line#1] -- xby=coby1 + ldx #$a + //SEG20 [10] phi (byte) line::x#0 = (const byte) line::x0#0 [phi:main::@2->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG21 [10] phi (byte) line::x1#2 = (byte) 20 [phi:main::@2->line#3] -- zpby1=coby1 + lda #$14 + sta line.x1 + jsr line + //SEG22 main::@3 + //SEG23 [8] call line param-assignment [ ] + //SEG24 [10] phi from main::@3 to line [phi:main::@3->line] + //SEG25 [10] phi (byte) line::y#0 = (const byte) line::y0#1 [phi:main::@3->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG26 [10] phi (byte) line::y1#2 = (byte) 40 [phi:main::@3->line#1] -- xby=coby1 + ldx #$28 + //SEG27 [10] phi (byte) line::x#0 = (const byte) line::x0#1 [phi:main::@3->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG28 [10] phi (byte) line::x1#2 = (byte) 40 [phi:main::@3->line#3] -- zpby1=coby1 + lda #$28 + sta line.x1 + jsr line + //SEG29 main::@return + //SEG30 [9] return [ ] + rts +} +//SEG31 line +line: { + .const x0 = 0 + .const y0 = 0 + .label xd = 8 + .label yd = 9 + .label x = 3 + .label y = 4 + .label e = 5 + .label x1 = 2 + //SEG32 [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] -- zpby1=zpby2_minus_zpby3 + lda x1 + sec + sbc x + sta xd + //SEG33 [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] -- zpby1=xby_minus_zpby2 + txa + sec + sbc y + sta yd + //SEG34 [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] -- zpby1=zpby2_ror_1 + lda yd + lsr + sta e + //SEG35 [14] phi from line line::@2 to line::@1 [phi:line/line::@2->line::@1] + //SEG36 [14] phi (byte) line::e#3 = (byte) line::e#0 [phi:line/line::@2->line::@1#0] -- register_copy + //SEG37 [14] phi (byte) line::y#2 = (byte) line::y#0 [phi:line/line::@2->line::@1#1] -- register_copy + //SEG38 [14] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@2->line::@1#2] -- register_copy + //SEG39 line::@1 + b1: + //SEG40 [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] -- xby=zpby1 + ldx x + //SEG41 [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] -- yby=zpby1 + ldy y + //SEG42 [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + jsr plot + //SEG43 line::@5 + //SEG44 [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] -- zpby1=zpby1_plus_1 + inc x + //SEG45 [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1=zpby1_plus_zpby2 + lda e + clc + adc yd + sta e + //SEG46 [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1_ge_zpby2_then_la1 + lda xd + cmp e + bcs b2 + //SEG47 line::@3 + //SEG48 [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] -- zpby1=zpby1_plus_1 + inc y + //SEG49 [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] -- zpby1=zpby1_minus_zpby2 + lda e + sec + sbc xd + sta e + //SEG50 [23] phi from line::@3 line::@5 to line::@2 [phi:line::@3/line::@5->line::@2] + //SEG51 [23] phi (byte) line::e#6 = (byte) line::e#2 [phi:line::@3/line::@5->line::@2#0] -- register_copy + //SEG52 [23] phi (byte) line::y#4 = (byte) line::y#1 [phi:line::@3/line::@5->line::@2#1] -- register_copy + //SEG53 line::@2 + b2: + //SEG54 [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] -- aby=zpby1_plus_1 + lda x1 + clc + adc #1 + //SEG55 [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] -- zpby1_lt_aby_then_la1 + cmp x + bcs b1 + //SEG56 line::@return + //SEG57 [26] return [ ] + rts +} +//SEG58 plot +plot: { + .label _0 = 10 + .label _3 = 10 + .label _6 = 10 + .label plotter = 6 + //SEG59 [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] -- zpby1=cowo1_staridx_xby + lda plot_xlo,x + sta _0 + //SEG60 [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] -- aby=cowo1_staridx_yby + lda plot_ylo,y + //SEG61 [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] -- aby=zpby1_plus_aby + clc + adc _0 + //SEG62 [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] -- zpptrby1=cowo1_setlo_aby + sta plotter + lda #>BITMAP + sta plotter+1 + //SEG63 [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] -- zpby1=cowo1_staridx_xby + lda plot_xhi,x + sta _3 + //SEG64 [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] -- aby=cowo1_staridx_yby + lda plot_yhi,y + //SEG65 [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] -- aby=zpby1_plus_aby + clc + adc _3 + //SEG66 [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] -- zpptrby1=zpptrby1_sethi_aby + sta plotter+1 + //SEG67 [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] -- zpby1=_star_zpptrby1 + ldy #0 + lda (plotter),y + sta _6 + //SEG68 [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] -- aby=cowo1_staridx_xby + lda plot_bit,x + //SEG69 [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG70 [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] -- _star_zpptrby1=aby + sta (plotter),y + //SEG71 plot::@return + //SEG72 [39] return [ ] + rts +} +//SEG73 initplottables +initplottables: { + .label _6 = 2 + .label yoffs = 6 + //SEG74 [41] phi from initplottables to initplottables::@1 [phi:initplottables->initplottables::@1] + //SEG75 [41] phi (byte) initplottables::bit#3 = (byte) 128 [phi:initplottables->initplottables::@1#0] -- yby=coby1 + ldy #$80 + //SEG76 [41] phi (byte) initplottables::x#2 = (byte) 0 [phi:initplottables->initplottables::@1#1] -- xby=coby1 + ldx #0 + jmp b1 + //SEG77 [41] phi from initplottables::@2 to initplottables::@1 [phi:initplottables::@2->initplottables::@1] + //SEG78 [41] phi (byte) initplottables::bit#3 = (byte) initplottables::bit#4 [phi:initplottables::@2->initplottables::@1#0] -- register_copy + //SEG79 [41] phi (byte) initplottables::x#2 = (byte) initplottables::x#1 [phi:initplottables::@2->initplottables::@1#1] -- register_copy + //SEG80 initplottables::@1 + b1: + //SEG81 [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] -- aby=xby_band_coby1 + txa + and #$f8 + //SEG82 [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=aby + sta plot_xlo,x + //SEG83 [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=coby2 + lda #>BITMAP + sta plot_xhi,x + //SEG84 [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=yby + tya + sta plot_bit,x + //SEG85 [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] -- yby=yby_ror_1 + tya + lsr + tay + //SEG86 [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] -- yby_neq_0_then_la1 + cpy #0 + bne b10 + //SEG87 [48] phi from initplottables::@1 to initplottables::@2 [phi:initplottables::@1->initplottables::@2] + //SEG88 [48] phi (byte) initplottables::bit#4 = (byte) 128 [phi:initplottables::@1->initplottables::@2#0] -- yby=coby1 + ldy #$80 + //SEG89 initplottables::@2 + b2: + //SEG90 [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] -- xby=_inc_xby + inx + //SEG91 [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b1 + //SEG92 [51] phi from initplottables::@2 to initplottables::@3 [phi:initplottables::@2->initplottables::@3] + //SEG93 [51] phi (byte*) initplottables::yoffs#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#0] -- zpptrby1=coby1 + lda #0 + sta yoffs + sta yoffs+1 + //SEG94 [51] phi (byte) initplottables::y#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#1] -- xby=coby1 + ldx #0 + jmp b3 + //SEG95 [51] phi from initplottables::@4 to initplottables::@3 [phi:initplottables::@4->initplottables::@3] + //SEG96 [51] phi (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#4 [phi:initplottables::@4->initplottables::@3#0] -- register_copy + //SEG97 [51] phi (byte) initplottables::y#2 = (byte) initplottables::y#1 [phi:initplottables::@4->initplottables::@3#1] -- register_copy + //SEG98 initplottables::@3 + b3: + //SEG99 [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] -- zpby1=xby_band_coby1 + txa + and #7 + sta _6 + //SEG100 [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] -- aby=_lo_zpptrby1 + lda yoffs + //SEG101 [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG102 [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_ylo,x + //SEG103 [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] -- aby=_hi_zpptrby1 + lda yoffs+1 + //SEG104 [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_yhi,x + //SEG105 [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] -- aby=xby_band_coby1 + txa + and #7 + //SEG106 [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] -- aby_neq_coby1_then_la1 + cmp #7 + bne b4 + //SEG107 initplottables::@7 + //SEG108 [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] -- zpptrby1=zpptrby1_plus_cowo1 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + //SEG109 [61] phi from initplottables::@3 initplottables::@7 to initplottables::@4 [phi:initplottables::@3/initplottables::@7->initplottables::@4] + //SEG110 [61] phi (byte*) initplottables::yoffs#4 = (byte*) initplottables::yoffs#2 [phi:initplottables::@3/initplottables::@7->initplottables::@4#0] -- register_copy + //SEG111 initplottables::@4 + b4: + //SEG112 [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby=_inc_xby + inx + //SEG113 [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b3 + //SEG114 initplottables::@return + //SEG115 [64] return [ ] + rts + //SEG116 initplottables::@10 + b10: + //SEG117 [48] phi from initplottables::@10 to initplottables::@2 [phi:initplottables::@10->initplottables::@2] + //SEG118 [48] phi (byte) initplottables::bit#4 = (byte) initplottables::bit#1 [phi:initplottables::@10->initplottables::@2#0] -- register_copy + jmp b2 +} +//SEG119 initscreen +initscreen: { + .label b = 6 + .label c = 6 + //SEG120 [66] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] + //SEG121 [66] phi (byte*) initscreen::b#2 = (const byte*) BITMAP#0 [phi:initscreen->initscreen::@1#0] -- zpptrby1=cowo1 + lda #BITMAP + sta b+1 + jmp b1 + //SEG122 [66] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1] + //SEG123 [66] phi (byte*) initscreen::b#2 = (byte*) initscreen::b#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy + //SEG124 initscreen::@1 + b1: + //SEG125 [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #0 + sta (b),y + //SEG126 [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] -- zpptrby1=_inc_zpptrby1 + inc b + bne !+ + inc b+1 + !: + //SEG127 [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda b+1 + cmp #>BITMAP+$2000 + bne b1 + lda b + cmp #initscreen::@2] + //SEG129 [70] phi (byte*) initscreen::c#2 = (const byte*) SCREEN#0 [phi:initscreen::@1->initscreen::@2#0] -- zpptrby1=cowo1 + lda #SCREEN + sta c+1 + jmp b2 + //SEG130 [70] phi from initscreen::@2 to initscreen::@2 [phi:initscreen::@2->initscreen::@2] + //SEG131 [70] phi (byte*) initscreen::c#2 = (byte*) initscreen::c#1 [phi:initscreen::@2->initscreen::@2#0] -- register_copy + //SEG132 initscreen::@2 + b2: + //SEG133 [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #$14 + sta (c),y + //SEG134 [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] -- zpptrby1=_inc_zpptrby1 + inc c + bne !+ + inc c+1 + !: + //SEG135 [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda c+1 + cmp #>SCREEN+$400 + bne b2 + lda c + cmp #initscreen] + jsr initscreen + //SEG12 main::@1 + //SEG13 [6] call initplottables param-assignment [ ] + //SEG14 [40] phi from main::@1 to initplottables [phi:main::@1->initplottables] + jsr initplottables + //SEG15 main::@2 + //SEG16 [7] call line param-assignment [ ] + //SEG17 [10] phi from main::@2 to line [phi:main::@2->line] + //SEG18 [10] phi (byte) line::y#0 = (const byte) line::y0#0 [phi:main::@2->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG19 [10] phi (byte) line::y1#2 = (byte) 10 [phi:main::@2->line#1] -- xby=coby1 + ldx #$a + //SEG20 [10] phi (byte) line::x#0 = (const byte) line::x0#0 [phi:main::@2->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG21 [10] phi (byte) line::x1#2 = (byte) 20 [phi:main::@2->line#3] -- zpby1=coby1 + lda #$14 + sta line.x1 + jsr line + //SEG22 main::@3 + //SEG23 [8] call line param-assignment [ ] + //SEG24 [10] phi from main::@3 to line [phi:main::@3->line] + //SEG25 [10] phi (byte) line::y#0 = (const byte) line::y0#1 [phi:main::@3->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG26 [10] phi (byte) line::y1#2 = (byte) 40 [phi:main::@3->line#1] -- xby=coby1 + ldx #$28 + //SEG27 [10] phi (byte) line::x#0 = (const byte) line::x0#1 [phi:main::@3->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG28 [10] phi (byte) line::x1#2 = (byte) 40 [phi:main::@3->line#3] -- zpby1=coby1 + lda #$28 + sta line.x1 + jsr line + //SEG29 main::@return + //SEG30 [9] return [ ] + rts +} +//SEG31 line +line: { + .const x0 = 0 + .const y0 = 0 + .label xd = 8 + .label yd = 9 + .label x = 3 + .label y = 4 + .label e = 5 + .label x1 = 2 + //SEG32 [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] -- zpby1=zpby2_minus_zpby3 + lda x1 + sec + sbc x + sta xd + //SEG33 [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] -- zpby1=xby_minus_zpby2 + txa + sec + sbc y + sta yd + //SEG34 [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] -- zpby1=zpby2_ror_1 + lda yd + lsr + sta e + //SEG35 [14] phi from line line::@2 to line::@1 [phi:line/line::@2->line::@1] + //SEG36 [14] phi (byte) line::e#3 = (byte) line::e#0 [phi:line/line::@2->line::@1#0] -- register_copy + //SEG37 [14] phi (byte) line::y#2 = (byte) line::y#0 [phi:line/line::@2->line::@1#1] -- register_copy + //SEG38 [14] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@2->line::@1#2] -- register_copy + //SEG39 line::@1 + b1: + //SEG40 [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] -- xby=zpby1 + ldx x + //SEG41 [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] -- yby=zpby1 + ldy y + //SEG42 [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + jsr plot + //SEG43 line::@5 + //SEG44 [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] -- zpby1=zpby1_plus_1 + inc x + //SEG45 [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1=zpby1_plus_zpby2 + lda e + clc + adc yd + sta e + //SEG46 [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1_ge_zpby2_then_la1 + lda xd + cmp e + bcs b2 + //SEG47 line::@3 + //SEG48 [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] -- zpby1=zpby1_plus_1 + inc y + //SEG49 [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] -- zpby1=zpby1_minus_zpby2 + lda e + sec + sbc xd + sta e + //SEG50 [23] phi from line::@3 line::@5 to line::@2 [phi:line::@3/line::@5->line::@2] + //SEG51 [23] phi (byte) line::e#6 = (byte) line::e#2 [phi:line::@3/line::@5->line::@2#0] -- register_copy + //SEG52 [23] phi (byte) line::y#4 = (byte) line::y#1 [phi:line::@3/line::@5->line::@2#1] -- register_copy + //SEG53 line::@2 + b2: + //SEG54 [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] -- aby=zpby1_plus_1 + lda x1 + clc + adc #1 + //SEG55 [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] -- zpby1_lt_aby_then_la1 + cmp x + bcs b1 + //SEG56 line::@return + //SEG57 [26] return [ ] + rts +} +//SEG58 plot +plot: { + .label _0 = 10 + .label _3 = 10 + .label _6 = 10 + .label plotter = 6 + //SEG59 [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] -- zpby1=cowo1_staridx_xby + lda plot_xlo,x + sta _0 + //SEG60 [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] -- aby=cowo1_staridx_yby + lda plot_ylo,y + //SEG61 [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] -- aby=zpby1_plus_aby + clc + adc _0 + //SEG62 [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] -- zpptrby1=cowo1_setlo_aby + sta plotter + lda #>BITMAP + sta plotter+1 + //SEG63 [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] -- zpby1=cowo1_staridx_xby + lda plot_xhi,x + sta _3 + //SEG64 [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] -- aby=cowo1_staridx_yby + lda plot_yhi,y + //SEG65 [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] -- aby=zpby1_plus_aby + clc + adc _3 + //SEG66 [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] -- zpptrby1=zpptrby1_sethi_aby + sta plotter+1 + //SEG67 [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] -- zpby1=_star_zpptrby1 + ldy #0 + lda (plotter),y + sta _6 + //SEG68 [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] -- aby=cowo1_staridx_xby + lda plot_bit,x + //SEG69 [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG70 [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] -- _star_zpptrby1=aby + sta (plotter),y + //SEG71 plot::@return + //SEG72 [39] return [ ] + rts +} +//SEG73 initplottables +initplottables: { + .label _6 = 2 + .label yoffs = 6 + //SEG74 [41] phi from initplottables to initplottables::@1 [phi:initplottables->initplottables::@1] + //SEG75 [41] phi (byte) initplottables::bit#3 = (byte) 128 [phi:initplottables->initplottables::@1#0] -- yby=coby1 + ldy #$80 + //SEG76 [41] phi (byte) initplottables::x#2 = (byte) 0 [phi:initplottables->initplottables::@1#1] -- xby=coby1 + ldx #0 + //SEG77 [41] phi from initplottables::@2 to initplottables::@1 [phi:initplottables::@2->initplottables::@1] + //SEG78 [41] phi (byte) initplottables::bit#3 = (byte) initplottables::bit#4 [phi:initplottables::@2->initplottables::@1#0] -- register_copy + //SEG79 [41] phi (byte) initplottables::x#2 = (byte) initplottables::x#1 [phi:initplottables::@2->initplottables::@1#1] -- register_copy + //SEG80 initplottables::@1 + b1: + //SEG81 [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] -- aby=xby_band_coby1 + txa + and #$f8 + //SEG82 [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=aby + sta plot_xlo,x + //SEG83 [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=coby2 + lda #>BITMAP + sta plot_xhi,x + //SEG84 [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=yby + tya + sta plot_bit,x + //SEG85 [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] -- yby=yby_ror_1 + tya + lsr + tay + //SEG86 [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] -- yby_neq_0_then_la1 + cpy #0 + bne b10 + //SEG87 [48] phi from initplottables::@1 to initplottables::@2 [phi:initplottables::@1->initplottables::@2] + //SEG88 [48] phi (byte) initplottables::bit#4 = (byte) 128 [phi:initplottables::@1->initplottables::@2#0] -- yby=coby1 + ldy #$80 + //SEG89 initplottables::@2 + b2: + //SEG90 [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] -- xby=_inc_xby + inx + //SEG91 [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b1 + //SEG92 [51] phi from initplottables::@2 to initplottables::@3 [phi:initplottables::@2->initplottables::@3] + //SEG93 [51] phi (byte*) initplottables::yoffs#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#0] -- zpptrby1=coby1 + lda #0 + sta yoffs + sta yoffs+1 + //SEG94 [51] phi (byte) initplottables::y#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#1] -- xby=coby1 + ldx #0 + //SEG95 [51] phi from initplottables::@4 to initplottables::@3 [phi:initplottables::@4->initplottables::@3] + //SEG96 [51] phi (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#4 [phi:initplottables::@4->initplottables::@3#0] -- register_copy + //SEG97 [51] phi (byte) initplottables::y#2 = (byte) initplottables::y#1 [phi:initplottables::@4->initplottables::@3#1] -- register_copy + //SEG98 initplottables::@3 + b3: + //SEG99 [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] -- zpby1=xby_band_coby1 + txa + and #7 + sta _6 + //SEG100 [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] -- aby=_lo_zpptrby1 + lda yoffs + //SEG101 [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG102 [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_ylo,x + //SEG103 [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] -- aby=_hi_zpptrby1 + lda yoffs+1 + //SEG104 [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_yhi,x + //SEG105 [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] -- aby=xby_band_coby1 + txa + and #7 + //SEG106 [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] -- aby_neq_coby1_then_la1 + cmp #7 + bne b4 + //SEG107 initplottables::@7 + //SEG108 [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] -- zpptrby1=zpptrby1_plus_cowo1 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + //SEG109 [61] phi from initplottables::@3 initplottables::@7 to initplottables::@4 [phi:initplottables::@3/initplottables::@7->initplottables::@4] + //SEG110 [61] phi (byte*) initplottables::yoffs#4 = (byte*) initplottables::yoffs#2 [phi:initplottables::@3/initplottables::@7->initplottables::@4#0] -- register_copy + //SEG111 initplottables::@4 + b4: + //SEG112 [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby=_inc_xby + inx + //SEG113 [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b3 + //SEG114 initplottables::@return + //SEG115 [64] return [ ] + rts + //SEG116 initplottables::@10 + b10: + //SEG117 [48] phi from initplottables::@10 to initplottables::@2 [phi:initplottables::@10->initplottables::@2] + //SEG118 [48] phi (byte) initplottables::bit#4 = (byte) initplottables::bit#1 [phi:initplottables::@10->initplottables::@2#0] -- register_copy + jmp b2 +} +//SEG119 initscreen +initscreen: { + .label b = 6 + .label c = 6 + //SEG120 [66] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] + //SEG121 [66] phi (byte*) initscreen::b#2 = (const byte*) BITMAP#0 [phi:initscreen->initscreen::@1#0] -- zpptrby1=cowo1 + lda #BITMAP + sta b+1 + //SEG122 [66] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1] + //SEG123 [66] phi (byte*) initscreen::b#2 = (byte*) initscreen::b#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy + //SEG124 initscreen::@1 + b1: + //SEG125 [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #0 + sta (b),y + //SEG126 [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] -- zpptrby1=_inc_zpptrby1 + inc b + bne !+ + inc b+1 + !: + //SEG127 [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda b+1 + cmp #>BITMAP+$2000 + bne b1 + lda b + cmp #initscreen::@2] + //SEG129 [70] phi (byte*) initscreen::c#2 = (const byte*) SCREEN#0 [phi:initscreen::@1->initscreen::@2#0] -- zpptrby1=cowo1 + lda #SCREEN + sta c+1 + //SEG130 [70] phi from initscreen::@2 to initscreen::@2 [phi:initscreen::@2->initscreen::@2] + //SEG131 [70] phi (byte*) initscreen::c#2 = (byte*) initscreen::c#1 [phi:initscreen::@2->initscreen::@2#0] -- register_copy + //SEG132 initscreen::@2 + b2: + //SEG133 [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #$14 + sta (c),y + //SEG134 [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] -- zpptrby1=_inc_zpptrby1 + inc c + bne !+ + inc c+1 + !: + //SEG135 [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda c+1 + cmp #>SCREEN+$400 + bne b2 + lda c + cmp #initscreen] + jsr initscreen + //SEG12 main::@1 + //SEG13 [6] call initplottables param-assignment [ ] + //SEG14 [40] phi from main::@1 to initplottables [phi:main::@1->initplottables] + jsr initplottables + //SEG15 main::@2 + //SEG16 [7] call line param-assignment [ ] + //SEG17 [10] phi from main::@2 to line [phi:main::@2->line] + //SEG18 [10] phi (byte) line::y#0 = (const byte) line::y0#0 [phi:main::@2->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG19 [10] phi (byte) line::y1#2 = (byte) 10 [phi:main::@2->line#1] -- xby=coby1 + ldx #$a + //SEG20 [10] phi (byte) line::x#0 = (const byte) line::x0#0 [phi:main::@2->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG21 [10] phi (byte) line::x1#2 = (byte) 20 [phi:main::@2->line#3] -- zpby1=coby1 + lda #$14 + sta line.x1 + jsr line + //SEG22 main::@3 + //SEG23 [8] call line param-assignment [ ] + //SEG24 [10] phi from main::@3 to line [phi:main::@3->line] + //SEG25 [10] phi (byte) line::y#0 = (const byte) line::y0#1 [phi:main::@3->line#0] -- zpby1=coby1 + lda #y0 + sta line.y + //SEG26 [10] phi (byte) line::y1#2 = (byte) 40 [phi:main::@3->line#1] -- xby=coby1 + ldx #$28 + //SEG27 [10] phi (byte) line::x#0 = (const byte) line::x0#1 [phi:main::@3->line#2] -- zpby1=coby1 + lda #x0 + sta line.x + //SEG28 [10] phi (byte) line::x1#2 = (byte) 40 [phi:main::@3->line#3] -- zpby1=coby1 + lda #$28 + sta line.x1 + jsr line + //SEG29 main::@return + //SEG30 [9] return [ ] + rts +} +//SEG31 line +line: { + .const x0 = 0 + .const y0 = 0 + .label xd = 8 + .label yd = 9 + .label x = 3 + .label y = 4 + .label e = 5 + .label x1 = 2 + //SEG32 [11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ] -- zpby1=zpby2_minus_zpby3 + lda x1 + sec + sbc x + sta xd + //SEG33 [12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ] -- zpby1=xby_minus_zpby2 + txa + sec + sbc y + sta yd + //SEG34 [13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ] -- zpby1=zpby2_ror_1 + lda yd + lsr + sta e + //SEG35 [14] phi from line line::@2 to line::@1 [phi:line/line::@2->line::@1] + //SEG36 [14] phi (byte) line::e#3 = (byte) line::e#0 [phi:line/line::@2->line::@1#0] -- register_copy + //SEG37 [14] phi (byte) line::y#2 = (byte) line::y#0 [phi:line/line::@2->line::@1#1] -- register_copy + //SEG38 [14] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@2->line::@1#2] -- register_copy + //SEG39 line::@1 + b1: + //SEG40 [15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ] -- xby=zpby1 + ldx x + //SEG41 [16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ] -- yby=zpby1 + ldy y + //SEG42 [17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ] + jsr plot + //SEG43 line::@5 + //SEG44 [18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ] -- zpby1=zpby1_plus_1 + inc x + //SEG45 [19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1=zpby1_plus_zpby2 + lda e + clc + adc yd + sta e + //SEG46 [20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ] -- zpby1_ge_zpby2_then_la1 + lda xd + cmp e + bcs b2 + //SEG47 line::@3 + //SEG48 [21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ] -- zpby1=zpby1_plus_1 + inc y + //SEG49 [22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ] -- zpby1=zpby1_minus_zpby2 + lda e + sec + sbc xd + sta e + //SEG50 [23] phi from line::@3 line::@5 to line::@2 [phi:line::@3/line::@5->line::@2] + //SEG51 [23] phi (byte) line::e#6 = (byte) line::e#2 [phi:line::@3/line::@5->line::@2#0] -- register_copy + //SEG52 [23] phi (byte) line::y#4 = (byte) line::y#1 [phi:line::@3/line::@5->line::@2#1] -- register_copy + //SEG53 line::@2 + b2: + //SEG54 [24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ] -- aby=zpby1_plus_1 + lda x1 + clc + adc #1 + //SEG55 [25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ] -- zpby1_lt_aby_then_la1 + cmp x + bcs b1 + //SEG56 line::@return + //SEG57 [26] return [ ] + rts +} +//SEG58 plot +plot: { + .label _0 = 10 + .label _3 = 10 + .label _6 = 10 + .label plotter = 6 + //SEG59 [27] (byte~) plot::$0 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ] -- zpby1=cowo1_staridx_xby + lda plot_xlo,x + sta _0 + //SEG60 [28] (byte~) plot::$1 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::$0 plot::$1 ] -- aby=cowo1_staridx_yby + lda plot_ylo,y + //SEG61 [29] (byte~) plot::$2 ← (byte~) plot::$0 + (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::$2 ] -- aby=zpby1_plus_aby + clc + adc _0 + //SEG62 [30] (byte*) plot::plotter#1 ← (const byte*) BITMAP#0 lo= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter#1 ] -- zpptrby1=cowo1_setlo_aby + sta plotter + lda #>BITMAP + sta plotter+1 + //SEG63 [31] (byte~) plot::$3 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter#1 plot::$3 ] -- zpby1=cowo1_staridx_xby + lda plot_xhi,x + sta _3 + //SEG64 [32] (byte~) plot::$4 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter#1 plot::$3 plot::$4 ] -- aby=cowo1_staridx_yby + lda plot_yhi,y + //SEG65 [33] (byte~) plot::$5 ← (byte~) plot::$3 + (byte~) plot::$4 [ plot::x#0 plot::plotter#1 plot::$5 ] -- aby=zpby1_plus_aby + clc + adc _3 + //SEG66 [34] (byte*) plot::plotter#2 ← (byte*) plot::plotter#1 hi= (byte~) plot::$5 [ plot::x#0 plot::plotter#2 ] -- zpptrby1=zpptrby1_sethi_aby + sta plotter+1 + //SEG67 [35] (byte~) plot::$6 ← * (byte*) plot::plotter#2 [ plot::x#0 plot::plotter#2 plot::$6 ] -- zpby1=_star_zpptrby1 + ldy #0 + lda (plotter),y + sta _6 + //SEG68 [36] (byte~) plot::$7 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#2 plot::$6 plot::$7 ] -- aby=cowo1_staridx_xby + lda plot_bit,x + //SEG69 [37] (byte~) plot::$8 ← (byte~) plot::$6 | (byte~) plot::$7 [ plot::plotter#2 plot::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG70 [38] *((byte*) plot::plotter#2) ← (byte~) plot::$8 [ ] -- _star_zpptrby1=aby + sta (plotter),y + //SEG71 plot::@return + //SEG72 [39] return [ ] + rts +} +//SEG73 initplottables +initplottables: { + .label _6 = 2 + .label yoffs = 6 + //SEG74 [41] phi from initplottables to initplottables::@1 [phi:initplottables->initplottables::@1] + //SEG75 [41] phi (byte) initplottables::bit#3 = (byte) 128 [phi:initplottables->initplottables::@1#0] -- yby=coby1 + ldy #$80 + //SEG76 [41] phi (byte) initplottables::x#2 = (byte) 0 [phi:initplottables->initplottables::@1#1] -- xby=coby1 + ldx #0 + //SEG77 [41] phi from initplottables::@2 to initplottables::@1 [phi:initplottables::@2->initplottables::@1] + //SEG78 [41] phi (byte) initplottables::bit#3 = (byte) initplottables::bit#4 [phi:initplottables::@2->initplottables::@1#0] -- register_copy + //SEG79 [41] phi (byte) initplottables::x#2 = (byte) initplottables::x#1 [phi:initplottables::@2->initplottables::@1#1] -- register_copy + //SEG80 initplottables::@1 + b1: + //SEG81 [42] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ] -- aby=xby_band_coby1 + txa + and #$f8 + //SEG82 [43] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=aby + sta plot_xlo,x + //SEG83 [44] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=coby2 + lda #>BITMAP + sta plot_xhi,x + //SEG84 [45] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ] -- cowo1_staridx_xby=yby + tya + sta plot_bit,x + //SEG85 [46] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ] -- yby=yby_ror_1 + tya + lsr + tay + //SEG86 [47] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ] -- yby_neq_0_then_la1 + cpy #0 + bne b10 + //SEG87 [48] phi from initplottables::@1 to initplottables::@2 [phi:initplottables::@1->initplottables::@2] + //SEG88 [48] phi (byte) initplottables::bit#4 = (byte) 128 [phi:initplottables::@1->initplottables::@2#0] -- yby=coby1 + ldy #$80 + //SEG89 initplottables::@2 + b2: + //SEG90 [49] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ] -- xby=_inc_xby + inx + //SEG91 [50] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b1 + //SEG92 [51] phi from initplottables::@2 to initplottables::@3 [phi:initplottables::@2->initplottables::@3] + //SEG93 [51] phi (byte*) initplottables::yoffs#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#0] -- zpptrby1=coby1 + lda #0 + sta yoffs + sta yoffs+1 + //SEG94 [51] phi (byte) initplottables::y#2 = (byte) 0 [phi:initplottables::@2->initplottables::@3#1] -- xby=coby1 + ldx #0 + //SEG95 [51] phi from initplottables::@4 to initplottables::@3 [phi:initplottables::@4->initplottables::@3] + //SEG96 [51] phi (byte*) initplottables::yoffs#2 = (byte*) initplottables::yoffs#4 [phi:initplottables::@4->initplottables::@3#0] -- register_copy + //SEG97 [51] phi (byte) initplottables::y#2 = (byte) initplottables::y#1 [phi:initplottables::@4->initplottables::@3#1] -- register_copy + //SEG98 initplottables::@3 + b3: + //SEG99 [52] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ] -- zpby1=xby_band_coby1 + txa + and #7 + sta _6 + //SEG100 [53] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ] -- aby=_lo_zpptrby1 + lda yoffs + //SEG101 [54] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ] -- aby=zpby1_bor_aby + ora _6 + //SEG102 [55] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_ylo,x + //SEG103 [56] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ] -- aby=_hi_zpptrby1 + lda yoffs+1 + //SEG104 [57] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ] -- cowo1_staridx_xby=aby + sta plot_yhi,x + //SEG105 [58] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ] -- aby=xby_band_coby1 + txa + and #7 + //SEG106 [59] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ] -- aby_neq_coby1_then_la1 + cmp #7 + bne b4 + //SEG107 initplottables::@7 + //SEG108 [60] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ] -- zpptrby1=zpptrby1_plus_cowo1 + lda yoffs + clc + adc #<$140 + sta yoffs + lda yoffs+1 + adc #>$140 + sta yoffs+1 + //SEG109 [61] phi from initplottables::@3 initplottables::@7 to initplottables::@4 [phi:initplottables::@3/initplottables::@7->initplottables::@4] + //SEG110 [61] phi (byte*) initplottables::yoffs#4 = (byte*) initplottables::yoffs#2 [phi:initplottables::@3/initplottables::@7->initplottables::@4#0] -- register_copy + //SEG111 initplottables::@4 + b4: + //SEG112 [62] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby=_inc_xby + inx + //SEG113 [63] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ] -- xby_neq_0_then_la1 + cpx #0 + bne b3 + //SEG114 initplottables::@return + //SEG115 [64] return [ ] + rts + //SEG116 initplottables::@10 + b10: + //SEG117 [48] phi from initplottables::@10 to initplottables::@2 [phi:initplottables::@10->initplottables::@2] + //SEG118 [48] phi (byte) initplottables::bit#4 = (byte) initplottables::bit#1 [phi:initplottables::@10->initplottables::@2#0] -- register_copy + jmp b2 +} +//SEG119 initscreen +initscreen: { + .label b = 6 + .label c = 6 + //SEG120 [66] phi from initscreen to initscreen::@1 [phi:initscreen->initscreen::@1] + //SEG121 [66] phi (byte*) initscreen::b#2 = (const byte*) BITMAP#0 [phi:initscreen->initscreen::@1#0] -- zpptrby1=cowo1 + lda #BITMAP + sta b+1 + //SEG122 [66] phi from initscreen::@1 to initscreen::@1 [phi:initscreen::@1->initscreen::@1] + //SEG123 [66] phi (byte*) initscreen::b#2 = (byte*) initscreen::b#1 [phi:initscreen::@1->initscreen::@1#0] -- register_copy + //SEG124 initscreen::@1 + b1: + //SEG125 [67] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #0 + sta (b),y + //SEG126 [68] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ] -- zpptrby1=_inc_zpptrby1 + inc b + bne !+ + inc b+1 + !: + //SEG127 [69] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda b+1 + cmp #>BITMAP+$2000 + bne b1 + lda b + cmp #initscreen::@2] + //SEG129 [70] phi (byte*) initscreen::c#2 = (const byte*) SCREEN#0 [phi:initscreen::@1->initscreen::@2#0] -- zpptrby1=cowo1 + lda #SCREEN + sta c+1 + //SEG130 [70] phi from initscreen::@2 to initscreen::@2 [phi:initscreen::@2->initscreen::@2] + //SEG131 [70] phi (byte*) initscreen::c#2 = (byte*) initscreen::c#1 [phi:initscreen::@2->initscreen::@2#0] -- register_copy + //SEG132 initscreen::@2 + b2: + //SEG133 [71] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ] -- _star_zpptrby1=coby1 + ldy #0 + lda #$14 + sta (c),y + //SEG134 [72] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ] -- zpptrby1=_inc_zpptrby1 + inc c + bne !+ + inc c+1 + !: + //SEG135 [73] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ] -- zpptrby1_neq_cowo1_then_la1 + lda c+1 + cmp #>SCREEN+$400 + bne b2 + lda c + cmp #