From 41029fec170dfb284f03a58a62455eb2bcc17471 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Mon, 8 Apr 2019 09:00:48 +0200 Subject: [PATCH] Added plasma with unrolled inner loop for ~50fps. --- .../Pass2ConstantAdditionElimination.java | 17 + .../dk/camelot64/kickc/test/TestPrograms.java | 10 + src/test/kc/examples/plasma/plasma-unroll.kc | 91 + src/test/kc/plus-0.kc | 14 + .../ref/examples/plasma/plasma-unroll.asm | 401 ++ .../ref/examples/plasma/plasma-unroll.cfg | 282 + .../ref/examples/plasma/plasma-unroll.log | 6197 +++++++++++++++++ .../ref/examples/plasma/plasma-unroll.sym | 346 + src/test/ref/plus-0.asm | 51 + src/test/ref/plus-0.cfg | 45 + src/test/ref/plus-0.log | 765 ++ src/test/ref/plus-0.sym | 28 + 12 files changed, 8247 insertions(+) create mode 100644 src/test/kc/examples/plasma/plasma-unroll.kc create mode 100644 src/test/kc/plus-0.kc create mode 100644 src/test/ref/examples/plasma/plasma-unroll.asm create mode 100644 src/test/ref/examples/plasma/plasma-unroll.cfg create mode 100644 src/test/ref/examples/plasma/plasma-unroll.log create mode 100644 src/test/ref/examples/plasma/plasma-unroll.sym create mode 100644 src/test/ref/plus-0.asm create mode 100644 src/test/ref/plus-0.cfg create mode 100644 src/test/ref/plus-0.log create mode 100644 src/test/ref/plus-0.sym diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java b/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java index 6ccb5f0b2..8c6aa5e5b 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java @@ -129,6 +129,14 @@ public class Pass2ConstantAdditionElimination extends Pass2SsaOptimization { assignment.setrValue1(new ConstantBinary(const1, Operators.PLUS, consolidated)); getLog().append("Consolidated constant in assignment " + assignment.getlValue()); return true; + } else { + // Check if the constant is zero + ConstantLiteral constantLiteral = ((ConstantValue) assignment.getrValue1()).calculateLiteral(getScope()); + if(constantLiteral.getValue().equals(new Long(0))) { + getLog().append("Removed zero-constant in assignment " + assignment.getlValue()); + assignment.setrValue1(null); + assignment.setOperator(null); + } } } else if(assignment.getrValue1() instanceof VariableRef && assignment.getrValue2() instanceof ConstantValue) { VariableRef variable = (VariableRef) assignment.getrValue1(); @@ -140,6 +148,15 @@ public class Pass2ConstantAdditionElimination extends Pass2SsaOptimization { // Handling of negative consolidated numbers? getLog().append("Consolidated constant in assignment " + assignment.getlValue()); return true; + } else { + // Check if the constant is zero + ConstantLiteral constantLiteral = ((ConstantValue) assignment.getrValue2()).calculateLiteral(getScope()); + if(constantLiteral.getValue().equals(new Long(0))) { + getLog().append("Removed zero-constant in assignment " + assignment.getlValue()); + assignment.setrValue2(assignment.getrValue1()); + assignment.setOperator(null); + assignment.setrValue1(null); + } } } return false; diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 27595456d..110d86724 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -32,6 +32,16 @@ public class TestPrograms { public TestPrograms() { } + @Test + public void testPlus0() throws IOException, URISyntaxException { + compileAndCompare("plus-0"); + } + + @Test + public void testPlasma2() throws IOException, URISyntaxException { + compileAndCompare("examples/plasma/plasma-unroll"); + } + @Test public void testPlasma() throws IOException, URISyntaxException { compileAndCompare("examples/plasma/plasma"); diff --git a/src/test/kc/examples/plasma/plasma-unroll.kc b/src/test/kc/examples/plasma/plasma-unroll.kc new file mode 100644 index 000000000..5400666f5 --- /dev/null +++ b/src/test/kc/examples/plasma/plasma-unroll.kc @@ -0,0 +1,91 @@ +// A KickC version of the plasma routine from the CC65 samples +// This version has an unrolled inner loop to reach ~50FPS +// (w)2001 by groepaz/hitmen +// Cleanup and porting to CC65 by Ullrich von Bassewitz. +// Ported to KickC by Jesper Gravgaard. +// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c + +import "c64" +import "print" +import "sid" + +const byte* SCREEN1 = $2800; +const byte* CHARSET = $2000; +const byte* SINTABLE = $1f00; + +kickasm(pc SINTABLE) {{ + .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) +}} + +void main() { + asm { sei } + *BORDERCOL = BLUE; + *BGCOL = BLUE; + for(byte* col : COLS..COLS+1000) *col = BLACK; + makecharset(CHARSET); + *D018 = toD018(SCREEN1, CHARSET); + while(true) { + // Show single-buffered plasma + doplasma(SCREEN1); + } +} + +// Plasma state variables +byte c1A = 0; +byte c1B = 0; +byte c2A = 0; +byte c2B = 0; + +// Render plasma to the passed screen +void doplasma(byte* screen) { + + byte[40] xbuf; + byte[25] ybuf; + + byte c1a = c1A; + byte c1b = c1B; + for (byte i = 0; i < 25; ++i) { + ybuf[i] = (SINTABLE[c1a] + SINTABLE[c1b]); + c1a += 4; + c1b += 9; + } + c1A += 3; + c1B -= 5; + byte c2a = c2A; + byte c2b = c2B; + for (byte i = 0; i < 40; ++i) { + xbuf[i] = (SINTABLE[c2a] + SINTABLE[c2b]); + c2a += 3; + c2b += 7; + } + c2A += 2; + c2B -= 3; + for (byte i = 0; i < 40; ++i) { + inline for (byte ii = 0; ii < 25; ++ii) { + (screen+ii*40)[i] = (xbuf[i] + ybuf[ii]); + } + } +} + +// Make a plasma-friendly charset where the chars are randomly filled +void makecharset(byte* charset) { + const byte[8] bittab = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; + sid_rnd_init(); + print_cls(); + for (word c = 0; c < 0x100; ++c) { + byte s = SINTABLE[ s) { + b |= bittab[ii]; + } + } + charset[(c<<3) + i] = b; + } + if ((c & 0x07) == 0) { + print_char('.'); + } + } +} diff --git a/src/test/kc/plus-0.kc b/src/test/kc/plus-0.kc new file mode 100644 index 000000000..bb133f7ee --- /dev/null +++ b/src/test/kc/plus-0.kc @@ -0,0 +1,14 @@ +// Tests elimination of plus 0 + +void main() { + fill((byte*)$400,'a'); + fill((byte*)$2000,'b'); +} + +void fill(byte* screen, byte ch) { + for(byte i: 0..39) { + inline for( byte j: 0..2 ) { + (screen+j*40)[i] = ch; + } + } +} \ No newline at end of file diff --git a/src/test/ref/examples/plasma/plasma-unroll.asm b/src/test/ref/examples/plasma/plasma-unroll.asm new file mode 100644 index 000000000..52949adc1 --- /dev/null +++ b/src/test/ref/examples/plasma/plasma-unroll.asm @@ -0,0 +1,401 @@ +// A KickC version of the plasma routine from the CC65 samples +// This version has an unrolled inner loop to reach ~50FPS +// (w)2001 by groepaz/hitmen +// Cleanup and porting to CC65 by Ullrich von Bassewitz. +// Ported to KickC by Jesper Gravgaard. +// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + .const BLUE = 6 + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + .label SCREEN1 = $2800 + .label CHARSET = $2000 + .label SINTABLE = $1f00 + .label print_char_cursor = $b + .label c1A = 4 + .label c1B = 5 + .label c2A = 6 + .label c2B = 7 +main: { + .const toD0181_return = (>(SCREEN1&$3fff)<<2)|(>CHARSET)>>2&$f + .label col = 2 + sei + lda #BLUE + sta BORDERCOL + sta BGCOL + lda #COLS + sta col+1 + b1: + lda #BLACK + ldy #0 + sta (col),y + inc col + bne !+ + inc col+1 + !: + lda col+1 + cmp #>COLS+$3e8+1 + bne b1 + lda col + cmp #print_line_cursor + sta print_char_cursor+1 + lda #0 + sta c + sta c+1 + b1: + lda c + tay + lda SINTABLE,y + sta s + lda #0 + sta i + b2: + ldy #0 + ldx #0 + b3: + jsr sid_rnd + and #$ff + sta _4 + lda s + cmp _4 + bcs b4 + tya + ora bittab,x + tay + b4: + inx + cpx #8 + bcc b3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + lda i + clc + adc _9 + sta _9 + bcc !+ + inc _9+1 + !: + tya + sta !v++1 + lda #CHARSET + adc _9+1 + sta !a++2 + !v: + lda #0 + !a: + sta CHARSET + inc i + lda i + cmp #8 + bcc b2 + lda c + and #7 + cmp #0 + bne b9 + jsr print_char + b9: + inc c + bne !+ + inc c+1 + !: + lda c+1 + cmp #>$100 + bcc b1 + bne !+ + lda c + cmp #<$100 + bcs !b1+ + jmp b1 + !b1: + !: + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +// Print a single char +print_char: { + .const ch = '.' + lda #ch + ldy #0 + sta (print_char_cursor),y + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + rts +} +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + lda SID_VOICE3_OSC + rts +} +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = 2 + lda #print_line_cursor + sta sc+1 + b1: + lda #' ' + ldy #0 + sta (sc),y + inc sc + bne !+ + inc sc+1 + !: + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + rts +} +.pc = SINTABLE "SINTABLE" + .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) + diff --git a/src/test/ref/examples/plasma/plasma-unroll.cfg b/src/test/ref/examples/plasma/plasma-unroll.cfg new file mode 100644 index 000000000..ad49260d4 --- /dev/null +++ b/src/test/ref/examples/plasma/plasma-unroll.cfg @@ -0,0 +1,282 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + kickasm(location (const byte*) SINTABLE#0) {{ .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) + }} + to:@2 +@2: scope:[] from @1 + [2] phi() + [3] call main + to:@end +@end: scope:[] from @2 + [4] phi() +main: scope:[main] from @2 + asm { sei } + [6] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 + [7] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [8] (byte*) main::col#2 ← phi( main/(const byte*) COLS#0 main::@1/(byte*) main::col#1 ) + [9] *((byte*) main::col#2) ← (const byte) BLACK#0 + [10] (byte*) main::col#1 ← ++ (byte*) main::col#2 + [11] if((byte*) main::col#1!=(byte*)(const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 + [12] phi() + [13] call makecharset + to:main::toD0181 +main::toD0181: scope:[main] from main::@2 + [14] phi() + to:main::@5 +main::@5: scope:[main] from main::toD0181 + [15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 + to:main::@3 +main::@3: scope:[main] from main::@4 main::@5 + [16] (byte) c2B#1 ← phi( main::@4/(byte) c2B#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [16] (byte) c2A#1 ← phi( main::@4/(byte) c2A#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [16] (byte) c1B#1 ← phi( main::@4/(byte) c1B#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [16] (byte) c1A#1 ← phi( main::@4/(byte) c1A#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + to:main::@4 +main::@4: scope:[main] from main::@3 + [17] phi() + [18] call doplasma + to:main::@3 +doplasma: scope:[doplasma] from main::@4 + [19] (byte) doplasma::c1a#0 ← (byte) c1A#1 + [20] (byte) doplasma::c1b#0 ← (byte) c1B#1 + to:doplasma::@1 +doplasma::@1: scope:[doplasma] from doplasma doplasma::@1 + [21] (byte) doplasma::i#2 ← phi( doplasma/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@1/(byte) doplasma::i#1 ) + [21] (byte) doplasma::c1b#2 ← phi( doplasma/(byte) doplasma::c1b#0 doplasma::@1/(byte) doplasma::c1b#1 ) + [21] (byte) doplasma::c1a#2 ← phi( doplasma/(byte) doplasma::c1a#0 doplasma::@1/(byte) doplasma::c1a#1 ) + [22] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2) + [23] *((const byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$0 + [24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 + [25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 + [26] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 + [27] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@1 + to:doplasma::@2 +doplasma::@2: scope:[doplasma] from doplasma::@1 + [28] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3 + [29] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5 + [30] (byte) doplasma::c2a#0 ← (byte) c2A#1 + [31] (byte) doplasma::c2b#0 ← (byte) c2B#1 + to:doplasma::@3 +doplasma::@3: scope:[doplasma] from doplasma::@2 doplasma::@3 + [32] (byte) doplasma::i1#2 ← phi( doplasma::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@3/(byte) doplasma::i1#1 ) + [32] (byte) doplasma::c2b#2 ← phi( doplasma::@2/(byte) doplasma::c2b#0 doplasma::@3/(byte) doplasma::c2b#1 ) + [32] (byte) doplasma::c2a#2 ← phi( doplasma::@2/(byte) doplasma::c2a#0 doplasma::@3/(byte) doplasma::c2a#1 ) + [33] (byte~) doplasma::$2 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2) + [34] *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$2 + [35] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 + [36] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 + [37] (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2 + [38] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3 + to:doplasma::@4 +doplasma::@4: scope:[doplasma] from doplasma::@3 + [39] (byte) c2A#3 ← (byte) c2A#1 + (byte/signed byte/word/signed word/dword/signed dword) 2 + [40] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3 + to:doplasma::@5 +doplasma::@5: scope:[doplasma] from doplasma::@4 doplasma::@7 + [41] (byte) doplasma::i2#4 ← phi( doplasma::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@7/(byte) doplasma::i2#1 ) + to:doplasma::@6 +doplasma::@6: scope:[doplasma] from doplasma::@5 + [42] (byte~) doplasma::$6 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0) + [43] *((const byte*) SCREEN1#0 + (byte) doplasma::i2#4) ← (byte~) doplasma::$6 + to:doplasma::@6_1 +doplasma::@6_1: scope:[doplasma] from doplasma::@6 + [44] (byte~) doplasma::$11 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1) + [45] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$11 + to:doplasma::@6_2 +doplasma::@6_2: scope:[doplasma] from doplasma::@6_1 + [46] (byte~) doplasma::$14 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + [47] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$14 + to:doplasma::@6_3 +doplasma::@6_3: scope:[doplasma] from doplasma::@6_2 + [48] (byte~) doplasma::$17 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + [49] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 3*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$17 + to:doplasma::@6_4 +doplasma::@6_4: scope:[doplasma] from doplasma::@6_3 + [50] (byte~) doplasma::$20 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4) + [51] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$20 + to:doplasma::@6_5 +doplasma::@6_5: scope:[doplasma] from doplasma::@6_4 + [52] (byte~) doplasma::$23 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5) + [53] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 5*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$23 + to:doplasma::@6_6 +doplasma::@6_6: scope:[doplasma] from doplasma::@6_5 + [54] (byte~) doplasma::$26 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6) + [55] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 6*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$26 + to:doplasma::@6_7 +doplasma::@6_7: scope:[doplasma] from doplasma::@6_6 + [56] (byte~) doplasma::$29 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7) + [57] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 7*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$29 + to:doplasma::@6_8 +doplasma::@6_8: scope:[doplasma] from doplasma::@6_7 + [58] (byte~) doplasma::$32 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8) + [59] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 8*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$32 + to:doplasma::@6_9 +doplasma::@6_9: scope:[doplasma] from doplasma::@6_8 + [60] (byte~) doplasma::$35 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9) + [61] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 9*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$35 + to:doplasma::@6_10 +doplasma::@6_10: scope:[doplasma] from doplasma::@6_9 + [62] (byte~) doplasma::$38 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a) + [63] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $a*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$38 + to:doplasma::@6_11 +doplasma::@6_11: scope:[doplasma] from doplasma::@6_10 + [64] (byte~) doplasma::$41 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b) + [65] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $b*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$41 + to:doplasma::@6_12 +doplasma::@6_12: scope:[doplasma] from doplasma::@6_11 + [66] (byte~) doplasma::$44 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c) + [67] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $c*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$44 + to:doplasma::@6_13 +doplasma::@6_13: scope:[doplasma] from doplasma::@6_12 + [68] (byte~) doplasma::$47 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d) + [69] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $d*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$47 + to:doplasma::@6_14 +doplasma::@6_14: scope:[doplasma] from doplasma::@6_13 + [70] (byte~) doplasma::$50 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e) + [71] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $e*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$50 + to:doplasma::@6_15 +doplasma::@6_15: scope:[doplasma] from doplasma::@6_14 + [72] (byte~) doplasma::$53 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f) + [73] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $f*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$53 + to:doplasma::@6_16 +doplasma::@6_16: scope:[doplasma] from doplasma::@6_15 + [74] (byte~) doplasma::$56 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10) + [75] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $10*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$56 + to:doplasma::@6_17 +doplasma::@6_17: scope:[doplasma] from doplasma::@6_16 + [76] (byte~) doplasma::$59 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11) + [77] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $11*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$59 + to:doplasma::@6_18 +doplasma::@6_18: scope:[doplasma] from doplasma::@6_17 + [78] (byte~) doplasma::$62 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12) + [79] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $12*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$62 + to:doplasma::@6_19 +doplasma::@6_19: scope:[doplasma] from doplasma::@6_18 + [80] (byte~) doplasma::$65 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13) + [81] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $13*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$65 + to:doplasma::@6_20 +doplasma::@6_20: scope:[doplasma] from doplasma::@6_19 + [82] (byte~) doplasma::$68 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14) + [83] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $14*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$68 + to:doplasma::@6_21 +doplasma::@6_21: scope:[doplasma] from doplasma::@6_20 + [84] (byte~) doplasma::$71 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15) + [85] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $15*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$71 + to:doplasma::@6_22 +doplasma::@6_22: scope:[doplasma] from doplasma::@6_21 + [86] (byte~) doplasma::$74 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16) + [87] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $16*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$74 + to:doplasma::@6_23 +doplasma::@6_23: scope:[doplasma] from doplasma::@6_22 + [88] (byte~) doplasma::$77 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17) + [89] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $17*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$77 + to:doplasma::@6_24 +doplasma::@6_24: scope:[doplasma] from doplasma::@6_23 + [90] (byte~) doplasma::$80 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18) + [91] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$80 + to:doplasma::@7 +doplasma::@7: scope:[doplasma] from doplasma::@6_24 + [92] (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#4 + [93] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5 + to:doplasma::@return +doplasma::@return: scope:[doplasma] from doplasma::@7 + [94] return + to:@return +makecharset: scope:[makecharset] from main::@2 + [95] phi() + [96] call sid_rnd_init + to:makecharset::@10 +makecharset::@10: scope:[makecharset] from makecharset + [97] phi() + [98] call print_cls + to:makecharset::@1 +makecharset::@1: scope:[makecharset] from makecharset::@10 makecharset::@9 + [99] (byte*) print_char_cursor#45 ← phi( makecharset::@10/(const byte*) print_line_cursor#0 makecharset::@9/(byte*) print_char_cursor#18 ) + [99] (word) makecharset::c#2 ← phi( makecharset::@10/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@9/(word) makecharset::c#1 ) + [100] (byte~) makecharset::$2 ← < (word) makecharset::c#2 + [101] (byte) makecharset::s#0 ← *((const byte*) SINTABLE#0 + (byte~) makecharset::$2) + to:makecharset::@2 +makecharset::@2: scope:[makecharset] from makecharset::@1 makecharset::@6 + [102] (byte) makecharset::i#7 ← phi( makecharset::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::i#1 ) + to:makecharset::@3 +makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@4 + [103] (byte) makecharset::b#2 ← phi( makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@4/(byte) makecharset::b#3 ) + [103] (byte) makecharset::ii#2 ← phi( makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@4/(byte) makecharset::ii#1 ) + [104] call sid_rnd + [105] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:makecharset::@11 +makecharset::@11: scope:[makecharset] from makecharset::@3 + [106] (byte~) makecharset::$3 ← (byte) sid_rnd::return#2 + [107] (byte~) makecharset::$4 ← (byte~) makecharset::$3 & (byte/word/signed word/dword/signed dword) $ff + [108] if((byte~) makecharset::$4<=(byte) makecharset::s#0) goto makecharset::@4 + to:makecharset::@5 +makecharset::@5: scope:[makecharset] from makecharset::@11 + [109] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#2) + to:makecharset::@4 +makecharset::@4: scope:[makecharset] from makecharset::@11 makecharset::@5 + [110] (byte) makecharset::b#3 ← phi( makecharset::@11/(byte) makecharset::b#2 makecharset::@5/(byte) makecharset::b#1 ) + [111] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 + [112] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@3 + to:makecharset::@6 +makecharset::@6: scope:[makecharset] from makecharset::@4 + [113] (word~) makecharset::$8 ← (word) makecharset::c#2 << (byte/signed byte/word/signed word/dword/signed dword) 3 + [114] (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#7 + [115] *((const byte*) CHARSET#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3 + [116] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#7 + [117] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 + to:makecharset::@7 +makecharset::@7: scope:[makecharset] from makecharset::@6 + [118] (byte/word~) makecharset::$11 ← (word) makecharset::c#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 + [119] if((byte/word~) makecharset::$11!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto makecharset::@9 + to:makecharset::@8 +makecharset::@8: scope:[makecharset] from makecharset::@7 + [120] phi() + [121] call print_char + to:makecharset::@9 +makecharset::@9: scope:[makecharset] from makecharset::@7 makecharset::@8 + [122] (byte*) print_char_cursor#18 ← phi( makecharset::@8/(byte*) print_char_cursor#1 makecharset::@7/(byte*) print_char_cursor#45 ) + [123] (word) makecharset::c#1 ← ++ (word) makecharset::c#2 + [124] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 + to:makecharset::@return +makecharset::@return: scope:[makecharset] from makecharset::@9 + [125] return + to:@return +print_char: scope:[print_char] from makecharset::@8 + [126] *((byte*) print_char_cursor#45) ← (const byte) print_char::ch#0 + [127] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#45 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [128] return + to:@return +sid_rnd: scope:[sid_rnd] from makecharset::@3 + [129] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + [130] return + to:@return +print_cls: scope:[print_cls] from makecharset::@10 + [131] phi() + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + [132] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) print_line_cursor#0 print_cls::@1/(byte*) print_cls::sc#1 ) + [133] *((byte*) print_cls::sc#2) ← (byte) ' ' + [134] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + [135] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [136] return + to:@return +sid_rnd_init: scope:[sid_rnd_init] from makecharset + [137] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff + [138] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [139] return + to:@return diff --git a/src/test/ref/examples/plasma/plasma-unroll.log b/src/test/ref/examples/plasma/plasma-unroll.log new file mode 100644 index 000000000..7c52b5cf2 --- /dev/null +++ b/src/test/ref/examples/plasma/plasma-unroll.log @@ -0,0 +1,6197 @@ +Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx +Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN1 (byte*) CHARSET + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) PROCPORT_DDR#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) PROCPORT_RAM_ALL#0 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte) PROCPORT_RAM_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) $35 + (byte) PROCPORT_RAM_CHARROM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $31 + (byte) PROCPORT_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) $36 + (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) $37 + (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) $d000 + (word) SPRITE_PTRS#0 ← (word/signed word/dword/signed dword) $3f8 + (byte*) SPRITES_XPOS#0 ← ((byte*)) (word/dword/signed dword) $d000 + (byte*) SPRITES_YPOS#0 ← ((byte*)) (word/dword/signed dword) $d001 + (byte*) SPRITES_XMSB#0 ← ((byte*)) (word/dword/signed dword) $d010 + (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) $d012 + (byte*) SPRITES_ENABLE#0 ← ((byte*)) (word/dword/signed dword) $d015 + (byte*) SPRITES_EXPAND_Y#0 ← ((byte*)) (word/dword/signed dword) $d017 + (byte*) SPRITES_PRIORITY#0 ← ((byte*)) (word/dword/signed dword) $d01b + (byte*) SPRITES_MC#0 ← ((byte*)) (word/dword/signed dword) $d01c + (byte*) SPRITES_EXPAND_X#0 ← ((byte*)) (word/dword/signed dword) $d01d + (byte*) BORDERCOL#0 ← ((byte*)) (word/dword/signed dword) $d020 + (byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) $d021 + (byte*) BGCOL1#0 ← ((byte*)) (word/dword/signed dword) $d021 + (byte*) BGCOL2#0 ← ((byte*)) (word/dword/signed dword) $d022 + (byte*) BGCOL3#0 ← ((byte*)) (word/dword/signed dword) $d023 + (byte*) BGCOL4#0 ← ((byte*)) (word/dword/signed dword) $d024 + (byte*) SPRITES_MC1#0 ← ((byte*)) (word/dword/signed dword) $d025 + (byte*) SPRITES_MC2#0 ← ((byte*)) (word/dword/signed dword) $d026 + (byte*) SPRITES_COLS#0 ← ((byte*)) (word/dword/signed dword) $d027 + (byte*) VIC_CONTROL#0 ← ((byte*)) (word/dword/signed dword) $d011 + (byte*) D011#0 ← ((byte*)) (word/dword/signed dword) $d011 + (byte) VIC_RST8#0 ← (byte/word/signed word/dword/signed dword) $80 + (byte) VIC_ECM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $40 + (byte) VIC_BMM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $20 + (byte) VIC_DEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) $10 + (byte) VIC_RSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) VIC_CONTROL2#0 ← ((byte*)) (word/dword/signed dword) $d016 + (byte*) D016#0 ← ((byte*)) (word/dword/signed dword) $d016 + (byte) VIC_MCM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $10 + (byte) VIC_CSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) D018#0 ← ((byte*)) (word/dword/signed dword) $d018 + (byte*) VIC_MEMORY#0 ← ((byte*)) (word/dword/signed dword) $d018 + (byte*) LIGHTPEN_X#0 ← ((byte*)) (word/dword/signed dword) $d013 + (byte*) LIGHTPEN_Y#0 ← ((byte*)) (word/dword/signed dword) $d014 + (byte*) IRQ_STATUS#0 ← ((byte*)) (word/dword/signed dword) $d019 + (byte*) IRQ_ENABLE#0 ← ((byte*)) (word/dword/signed dword) $d01a + (byte) IRQ_RASTER#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) IRQ_COLLISION_BG#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) IRQ_COLLISION_SPRITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) IRQ_LIGHTPEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) COLS#0 ← ((byte*)) (word/dword/signed dword) $d800 + (byte*) CIA1_PORT_A#0 ← ((byte*)) (word/dword/signed dword) $dc00 + (byte*) CIA1_PORT_B#0 ← ((byte*)) (word/dword/signed dword) $dc01 + (byte*) CIA1_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) $dc02 + (byte*) CIA1_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) $dc03 + (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) $dc0d + (byte) CIA_INTERRUPT_CLEAR#0 ← (byte/signed byte/word/signed word/dword/signed dword) $7f + (byte*) CIA2_PORT_A#0 ← ((byte*)) (word/dword/signed dword) $dd00 + (byte*) CIA2_PORT_B#0 ← ((byte*)) (word/dword/signed dword) $dd01 + (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) $dd02 + (byte*) CIA2_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) $dd03 + (byte*) CIA2_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) $dd0d + (void()**) KERNEL_IRQ#0 ← ((void()**)) (word/signed word/dword/signed dword) $314 + (void()**) HARDWARE_IRQ#0 ← ((void()**)) (word/dword/signed dword) $fffe + (byte) BLACK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) WHITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) RED#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) CYAN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) PURPLE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) YELLOW#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) ORANGE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) BROWN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) PINK#0 ← (byte/signed byte/word/signed word/dword/signed dword) $a + (byte) DARK_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) $b + (byte) GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) $c + (byte) LIGHT_GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) $d + (byte) LIGHT_BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) $e + (byte) LIGHT_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) $f + to:@4 +@4: scope:[] from @begin + (byte*) print_screen#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte*) print_line_cursor#0 ← (byte*) print_screen#0 + (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 + to:@16 +@16: scope:[] from @4 + (byte*) print_screen#13 ← phi( @4/(byte*) print_screen#0 ) + (byte*) print_char_cursor#40 ← phi( @4/(byte*) print_char_cursor#0 ) + (byte*) print_line_cursor#35 ← phi( @4/(byte*) print_line_cursor#0 ) + (byte[]) print_hextab#0 ← (const string) $0 + to:@23 +print_char: scope:[print_char] from makecharset::@8 + (byte*) print_char_cursor#11 ← phi( makecharset::@8/(byte*) print_char_cursor#20 ) + (byte) print_char::ch#1 ← phi( makecharset::@8/(byte) print_char::ch#0 ) + *((byte*) print_char_cursor#11) ← (byte) print_char::ch#1 + (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#11 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + (byte*) print_char_cursor#12 ← phi( print_char/(byte*) print_char_cursor#1 ) + (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#12 + return + to:@return +print_cls: scope:[print_cls] from makecharset::@11 + (byte*) print_screen#1 ← phi( makecharset::@11/(byte*) print_screen#4 ) + (byte*) print_cls::sc#0 ← (byte*) print_screen#1 + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + (byte*) print_screen#2 ← phi( print_cls/(byte*) print_screen#1 print_cls::@1/(byte*) print_screen#2 ) + (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) print_cls::sc#0 print_cls::@1/(byte*) print_cls::sc#1 ) + *((byte*) print_cls::sc#2) ← (byte) ' ' + (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + (byte*~) print_cls::$0 ← (byte*) print_screen#2 + (word/signed word/dword/signed dword) $3e8 + (bool~) print_cls::$1 ← (byte*) print_cls::sc#1 != (byte*~) print_cls::$0 + if((bool~) print_cls::$1) goto print_cls::@1 + to:print_cls::@2 +print_cls::@2: scope:[print_cls] from print_cls::@1 + (byte*) print_screen#3 ← phi( print_cls::@1/(byte*) print_screen#2 ) + (byte*) print_line_cursor#1 ← (byte*) print_screen#3 + (byte*) print_char_cursor#3 ← (byte*) print_line_cursor#1 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@2 + (byte*) print_char_cursor#13 ← phi( print_cls::@2/(byte*) print_char_cursor#3 ) + (byte*) print_line_cursor#8 ← phi( print_cls::@2/(byte*) print_line_cursor#1 ) + (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#8 + (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#13 + return + to:@return +@23: scope:[] from @16 + (byte*) print_screen#12 ← phi( @16/(byte*) print_screen#13 ) + (byte*) print_char_cursor#37 ← phi( @16/(byte*) print_char_cursor#40 ) + (byte*) print_line_cursor#32 ← phi( @16/(byte*) print_line_cursor#35 ) + (word*) SID_VOICE3_FREQ#0 ← ((word*)) (word/dword/signed dword) $d40e + (byte*) SID_VOICE3_FREQ_LOW#0 ← ((byte*)) (word/dword/signed dword) $d40e + (byte*) SID_VOICE3_FREQ_HIGH#0 ← ((byte*)) (word/dword/signed dword) $d40f + (byte*) SID_VOICE3_CONTROL#0 ← ((byte*)) (word/dword/signed dword) $d412 + (byte) SID_CONTROL_NOISE#0 ← (byte/word/signed word/dword/signed dword) $80 + (byte) SID_CONTROL_PULSE#0 ← (byte/signed byte/word/signed word/dword/signed dword) $40 + (byte) SID_CONTROL_SAWTOOTH#0 ← (byte/signed byte/word/signed word/dword/signed dword) $20 + (byte) SID_CONTROL_TRIANGLE#0 ← (byte/signed byte/word/signed word/dword/signed dword) $10 + (byte) SID_CONTROL_TEST#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) SID_CONTROL_RING#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) SID_CONTROL_SYNC#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) SID_CONTROL_GATE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (word/dword/signed dword) $d41b + to:@25 +sid_rnd_init: scope:[sid_rnd_init] from makecharset + *((word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff + *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + return + to:@return +sid_rnd: scope:[sid_rnd] from makecharset::@3 + (byte) sid_rnd::return#0 ← *((byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + (byte) sid_rnd::return#3 ← phi( sid_rnd/(byte) sid_rnd::return#0 ) + (byte) sid_rnd::return#1 ← (byte) sid_rnd::return#3 + return + to:@return +@25: scope:[] from @23 + (byte*) print_screen#11 ← phi( @23/(byte*) print_screen#12 ) + (byte*) print_char_cursor#35 ← phi( @23/(byte*) print_char_cursor#37 ) + (byte*) print_line_cursor#29 ← phi( @23/(byte*) print_line_cursor#32 ) + (byte*) SCREEN1#0 ← ((byte*)) (word/signed word/dword/signed dword) $2800 + (byte*) CHARSET#0 ← ((byte*)) (word/signed word/dword/signed dword) $2000 + (byte*) SINTABLE#0 ← ((byte*)) (word/signed word/dword/signed dword) $1f00 + kickasm(location (byte*) SINTABLE#0) {{ .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) + }} + to:@26 +main: scope:[main] from @28 + (byte) c2B#27 ← phi( @28/(byte) c2B#17 ) + (byte) c2A#27 ← phi( @28/(byte) c2A#17 ) + (byte) c1B#27 ← phi( @28/(byte) c1B#16 ) + (byte) c1A#27 ← phi( @28/(byte) c1A#16 ) + (byte*) print_screen#8 ← phi( @28/(byte*) print_screen#9 ) + (byte*) print_char_cursor#32 ← phi( @28/(byte*) print_char_cursor#25 ) + (byte*) print_line_cursor#26 ← phi( @28/(byte*) print_line_cursor#18 ) + asm { sei } + *((byte*) BORDERCOL#0) ← (byte) BLUE#0 + *((byte*) BGCOL#0) ← (byte) BLUE#0 + (byte*~) main::$2 ← (byte*) COLS#0 + (word/signed word/dword/signed dword) $3e8 + (byte*) main::col#0 ← (byte*) COLS#0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + (byte) c2B#26 ← phi( main/(byte) c2B#27 main::@1/(byte) c2B#26 ) + (byte) c2A#26 ← phi( main/(byte) c2A#27 main::@1/(byte) c2A#26 ) + (byte) c1B#26 ← phi( main/(byte) c1B#27 main::@1/(byte) c1B#26 ) + (byte) c1A#26 ← phi( main/(byte) c1A#27 main::@1/(byte) c1A#26 ) + (byte*) print_screen#7 ← phi( main/(byte*) print_screen#8 main::@1/(byte*) print_screen#7 ) + (byte*) print_char_cursor#26 ← phi( main/(byte*) print_char_cursor#32 main::@1/(byte*) print_char_cursor#26 ) + (byte*) print_line_cursor#19 ← phi( main/(byte*) print_line_cursor#26 main::@1/(byte*) print_line_cursor#19 ) + (byte*) main::col#2 ← phi( main/(byte*) main::col#0 main::@1/(byte*) main::col#1 ) + *((byte*) main::col#2) ← (byte) BLACK#0 + (byte*) main::col#1 ← (byte*) main::col#2 + rangenext(COLS#0,main::$2) + (bool~) main::$3 ← (byte*) main::col#1 != rangelast(COLS#0,main::$2) + if((bool~) main::$3) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 + (byte) c2B#25 ← phi( main::@1/(byte) c2B#26 ) + (byte) c2A#25 ← phi( main::@1/(byte) c2A#26 ) + (byte) c1B#25 ← phi( main::@1/(byte) c1B#26 ) + (byte) c1A#25 ← phi( main::@1/(byte) c1A#26 ) + (byte*) print_screen#6 ← phi( main::@1/(byte*) print_screen#7 ) + (byte*) print_char_cursor#21 ← phi( main::@1/(byte*) print_char_cursor#26 ) + (byte*) print_line_cursor#14 ← phi( main::@1/(byte*) print_line_cursor#19 ) + (byte*) makecharset::charset#0 ← (byte*) CHARSET#0 + call makecharset + to:main::@10 +main::@10: scope:[main] from main::@2 + (byte) c2B#24 ← phi( main::@2/(byte) c2B#25 ) + (byte) c2A#24 ← phi( main::@2/(byte) c2A#25 ) + (byte) c1B#23 ← phi( main::@2/(byte) c1B#25 ) + (byte) c1A#23 ← phi( main::@2/(byte) c1A#25 ) + (byte*) print_char_cursor#14 ← phi( main::@2/(byte*) print_char_cursor#9 ) + (byte*) print_line_cursor#9 ← phi( main::@2/(byte*) print_line_cursor#6 ) + (byte*) print_line_cursor#3 ← (byte*) print_line_cursor#9 + (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#14 + (byte*) main::toD0181_screen#0 ← (byte*) SCREEN1#0 + (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0 + to:main::toD0181 +main::toD0181: scope:[main] from main::@10 + (byte) c2B#23 ← phi( main::@10/(byte) c2B#24 ) + (byte) c2A#23 ← phi( main::@10/(byte) c2A#24 ) + (byte) c1B#21 ← phi( main::@10/(byte) c1B#23 ) + (byte) c1A#21 ← phi( main::@10/(byte) c1A#23 ) + (byte*) print_char_cursor#38 ← phi( main::@10/(byte*) print_char_cursor#5 ) + (byte*) print_line_cursor#33 ← phi( main::@10/(byte*) print_line_cursor#3 ) + (byte*) main::toD0181_gfx#1 ← phi( main::@10/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main::@10/(byte*) main::toD0181_screen#0 ) + (word) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 + (word) main::toD0181_$1#0 ← (word) main::toD0181_$0#0 & (word/signed word/dword/signed dword) $3fff + (word) main::toD0181_$2#0 ← (word) main::toD0181_$1#0 << (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::toD0181_$3#0 ← > (word) main::toD0181_$2#0 + (word) main::toD0181_$4#0 ← ((word)) (byte*) main::toD0181_gfx#1 + (byte) main::toD0181_$5#0 ← > (word) main::toD0181_$4#0 + (byte) main::toD0181_$6#0 ← (byte) main::toD0181_$5#0 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) main::toD0181_$7#0 ← (byte) main::toD0181_$6#0 & (byte/signed byte/word/signed word/dword/signed dword) $f + (byte) main::toD0181_$8#0 ← (byte) main::toD0181_$3#0 | (byte) main::toD0181_$7#0 + (byte) main::toD0181_return#0 ← (byte) main::toD0181_$8#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + (byte) c2B#21 ← phi( main::toD0181/(byte) c2B#23 ) + (byte) c2A#21 ← phi( main::toD0181/(byte) c2A#23 ) + (byte) c1B#19 ← phi( main::toD0181/(byte) c1B#21 ) + (byte) c1A#19 ← phi( main::toD0181/(byte) c1A#21 ) + (byte*) print_char_cursor#33 ← phi( main::toD0181/(byte*) print_char_cursor#38 ) + (byte*) print_line_cursor#27 ← phi( main::toD0181/(byte*) print_line_cursor#33 ) + (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) + (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 + to:main::@9 +main::@9: scope:[main] from main::toD0181_@return + (byte) c2B#18 ← phi( main::toD0181_@return/(byte) c2B#21 ) + (byte) c2A#18 ← phi( main::toD0181_@return/(byte) c2A#21 ) + (byte) c1B#17 ← phi( main::toD0181_@return/(byte) c1B#19 ) + (byte) c1A#17 ← phi( main::toD0181_@return/(byte) c1A#19 ) + (byte*) print_char_cursor#28 ← phi( main::toD0181_@return/(byte*) print_char_cursor#33 ) + (byte*) print_line_cursor#21 ← phi( main::toD0181_@return/(byte*) print_line_cursor#27 ) + (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) + (byte~) main::$1 ← (byte) main::toD0181_return#3 + *((byte*) D018#0) ← (byte~) main::$1 + to:main::@3 +main::@3: scope:[main] from main::@11 main::@9 + (byte) c2B#13 ← phi( main::@11/(byte) c2B#0 main::@9/(byte) c2B#18 ) + (byte) c2A#13 ← phi( main::@11/(byte) c2A#0 main::@9/(byte) c2A#18 ) + (byte) c1B#13 ← phi( main::@11/(byte) c1B#0 main::@9/(byte) c1B#17 ) + (byte) c1A#13 ← phi( main::@11/(byte) c1A#0 main::@9/(byte) c1A#17 ) + (byte*) print_char_cursor#22 ← phi( main::@11/(byte*) print_char_cursor#27 main::@9/(byte*) print_char_cursor#28 ) + (byte*) print_line_cursor#15 ← phi( main::@11/(byte*) print_line_cursor#20 main::@9/(byte*) print_line_cursor#21 ) + if(true) goto main::@4 + to:main::@return +main::@4: scope:[main] from main::@3 + (byte*) print_char_cursor#34 ← phi( main::@3/(byte*) print_char_cursor#22 ) + (byte*) print_line_cursor#28 ← phi( main::@3/(byte*) print_line_cursor#15 ) + (byte) c2B#12 ← phi( main::@3/(byte) c2B#13 ) + (byte) c2A#12 ← phi( main::@3/(byte) c2A#13 ) + (byte) c1B#12 ← phi( main::@3/(byte) c1B#13 ) + (byte) c1A#12 ← phi( main::@3/(byte) c1A#13 ) + (byte*) doplasma::screen#0 ← (byte*) SCREEN1#0 + call doplasma + to:main::@11 +main::@11: scope:[main] from main::@4 + (byte*) print_char_cursor#27 ← phi( main::@4/(byte*) print_char_cursor#34 ) + (byte*) print_line_cursor#20 ← phi( main::@4/(byte*) print_line_cursor#28 ) + (byte) c2B#6 ← phi( main::@4/(byte) c2B#4 ) + (byte) c2A#6 ← phi( main::@4/(byte) c2A#4 ) + (byte) c1B#6 ← phi( main::@4/(byte) c1B#4 ) + (byte) c1A#6 ← phi( main::@4/(byte) c1A#4 ) + (byte) c1A#0 ← (byte) c1A#6 + (byte) c1B#0 ← (byte) c1B#6 + (byte) c2A#0 ← (byte) c2A#6 + (byte) c2B#0 ← (byte) c2B#6 + to:main::@3 +main::@return: scope:[main] from main::@3 + (byte) c2B#7 ← phi( main::@3/(byte) c2B#13 ) + (byte) c2A#7 ← phi( main::@3/(byte) c2A#13 ) + (byte) c1B#7 ← phi( main::@3/(byte) c1B#13 ) + (byte) c1A#7 ← phi( main::@3/(byte) c1A#13 ) + (byte*) print_char_cursor#15 ← phi( main::@3/(byte*) print_char_cursor#22 ) + (byte*) print_line_cursor#10 ← phi( main::@3/(byte*) print_line_cursor#15 ) + (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#10 + (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#15 + (byte) c1A#1 ← (byte) c1A#7 + (byte) c1B#1 ← (byte) c1B#7 + (byte) c2A#1 ← (byte) c2A#7 + (byte) c2B#1 ← (byte) c2B#7 + return + to:@return +@26: scope:[] from @25 + (byte*) print_screen#10 ← phi( @25/(byte*) print_screen#11 ) + (byte*) print_char_cursor#31 ← phi( @25/(byte*) print_char_cursor#35 ) + (byte*) print_line_cursor#25 ← phi( @25/(byte*) print_line_cursor#29 ) + (byte) c1A#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) c1B#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) c2A#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) c2B#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:@28 +doplasma: scope:[doplasma] from main::@4 + (byte*) doplasma::screen#8 ← phi( main::@4/(byte*) doplasma::screen#0 ) + (byte) c2B#19 ← phi( main::@4/(byte) c2B#12 ) + (byte) c2A#19 ← phi( main::@4/(byte) c2A#12 ) + (byte) c1B#8 ← phi( main::@4/(byte) c1B#12 ) + (byte) c1A#8 ← phi( main::@4/(byte) c1A#12 ) + (byte[$28]) doplasma::xbuf#0 ← { fill( $28, 0) } + (byte[$19]) doplasma::ybuf#0 ← { fill( $19, 0) } + (byte) doplasma::c1a#0 ← (byte) c1A#8 + (byte) doplasma::c1b#0 ← (byte) c1B#8 + (byte) doplasma::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:doplasma::@1 +doplasma::@1: scope:[doplasma] from doplasma doplasma::@1 + (byte*) doplasma::screen#7 ← phi( doplasma/(byte*) doplasma::screen#8 doplasma::@1/(byte*) doplasma::screen#7 ) + (byte) c2B#14 ← phi( doplasma/(byte) c2B#19 doplasma::@1/(byte) c2B#14 ) + (byte) c2A#14 ← phi( doplasma/(byte) c2A#19 doplasma::@1/(byte) c2A#14 ) + (byte) c1B#14 ← phi( doplasma/(byte) c1B#8 doplasma::@1/(byte) c1B#14 ) + (byte) c1A#14 ← phi( doplasma/(byte) c1A#8 doplasma::@1/(byte) c1A#14 ) + (byte) doplasma::i#2 ← phi( doplasma/(byte) doplasma::i#0 doplasma::@1/(byte) doplasma::i#1 ) + (byte) doplasma::c1b#2 ← phi( doplasma/(byte) doplasma::c1b#0 doplasma::@1/(byte) doplasma::c1b#1 ) + (byte) doplasma::c1a#2 ← phi( doplasma/(byte) doplasma::c1a#0 doplasma::@1/(byte) doplasma::c1a#1 ) + (byte~) doplasma::$0 ← *((byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((byte*) SINTABLE#0 + (byte) doplasma::c1b#2) + *((byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$0 + (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 + (bool~) doplasma::$1 ← (byte) doplasma::i#1 < (byte/signed byte/word/signed word/dword/signed dword) $19 + if((bool~) doplasma::$1) goto doplasma::@1 + to:doplasma::@2 +doplasma::@2: scope:[doplasma] from doplasma::@1 + (byte*) doplasma::screen#6 ← phi( doplasma::@1/(byte*) doplasma::screen#7 ) + (byte) c2B#8 ← phi( doplasma::@1/(byte) c2B#14 ) + (byte) c2A#8 ← phi( doplasma::@1/(byte) c2A#14 ) + (byte) c1B#9 ← phi( doplasma::@1/(byte) c1B#14 ) + (byte) c1A#9 ← phi( doplasma::@1/(byte) c1A#14 ) + (byte) c1A#3 ← (byte) c1A#9 + (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) c1B#3 ← (byte) c1B#9 - (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) doplasma::c2a#0 ← (byte) c2A#8 + (byte) doplasma::c2b#0 ← (byte) c2B#8 + (byte) doplasma::i1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:doplasma::@3 +doplasma::@3: scope:[doplasma] from doplasma::@2 doplasma::@3 + (byte) c1B#24 ← phi( doplasma::@2/(byte) c1B#3 doplasma::@3/(byte) c1B#24 ) + (byte) c1A#24 ← phi( doplasma::@2/(byte) c1A#3 doplasma::@3/(byte) c1A#24 ) + (byte*) doplasma::screen#5 ← phi( doplasma::@2/(byte*) doplasma::screen#6 doplasma::@3/(byte*) doplasma::screen#5 ) + (byte) c2B#15 ← phi( doplasma::@2/(byte) c2B#8 doplasma::@3/(byte) c2B#15 ) + (byte) c2A#15 ← phi( doplasma::@2/(byte) c2A#8 doplasma::@3/(byte) c2A#15 ) + (byte) doplasma::i1#2 ← phi( doplasma::@2/(byte) doplasma::i1#0 doplasma::@3/(byte) doplasma::i1#1 ) + (byte) doplasma::c2b#2 ← phi( doplasma::@2/(byte) doplasma::c2b#0 doplasma::@3/(byte) doplasma::c2b#1 ) + (byte) doplasma::c2a#2 ← phi( doplasma::@2/(byte) doplasma::c2a#0 doplasma::@3/(byte) doplasma::c2a#1 ) + (byte~) doplasma::$2 ← *((byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((byte*) SINTABLE#0 + (byte) doplasma::c2b#2) + *((byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$2 + (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2 + (bool~) doplasma::$3 ← (byte) doplasma::i1#1 < (byte/signed byte/word/signed word/dword/signed dword) $28 + if((bool~) doplasma::$3) goto doplasma::@3 + to:doplasma::@4 +doplasma::@4: scope:[doplasma] from doplasma::@3 + (byte) c1B#22 ← phi( doplasma::@3/(byte) c1B#24 ) + (byte) c1A#22 ← phi( doplasma::@3/(byte) c1A#24 ) + (byte*) doplasma::screen#3 ← phi( doplasma::@3/(byte*) doplasma::screen#5 ) + (byte) c2B#9 ← phi( doplasma::@3/(byte) c2B#15 ) + (byte) c2A#9 ← phi( doplasma::@3/(byte) c2A#15 ) + (byte) c2A#3 ← (byte) c2A#9 + (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) c2B#3 ← (byte) c2B#9 - (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) doplasma::i2#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:doplasma::@5 +doplasma::@5: scope:[doplasma] from doplasma::@4 doplasma::@7 + (byte) c2B#22 ← phi( doplasma::@4/(byte) c2B#3 doplasma::@7/(byte) c2B#16 ) + (byte) c2A#22 ← phi( doplasma::@4/(byte) c2A#3 doplasma::@7/(byte) c2A#16 ) + (byte) c1B#20 ← phi( doplasma::@4/(byte) c1B#22 doplasma::@7/(byte) c1B#15 ) + (byte) c1A#20 ← phi( doplasma::@4/(byte) c1A#22 doplasma::@7/(byte) c1A#15 ) + (byte) doplasma::i2#4 ← phi( doplasma::@4/(byte) doplasma::i2#0 doplasma::@7/(byte) doplasma::i2#1 ) + (byte*) doplasma::screen#2 ← phi( doplasma::@4/(byte*) doplasma::screen#3 doplasma::@7/(byte*) doplasma::screen#4 ) + (byte) doplasma::ii#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:doplasma::@6 +doplasma::@6: scope:[doplasma] from doplasma::@5 doplasma::@6 + (byte) c2B#20 ← phi( doplasma::@5/(byte) c2B#22 doplasma::@6/(byte) c2B#20 ) + (byte) c2A#20 ← phi( doplasma::@5/(byte) c2A#22 doplasma::@6/(byte) c2A#20 ) + (byte) c1B#18 ← phi( doplasma::@5/(byte) c1B#20 doplasma::@6/(byte) c1B#18 ) + (byte) c1A#18 ← phi( doplasma::@5/(byte) c1A#20 doplasma::@6/(byte) c1A#18 ) + (byte) doplasma::i2#2 ← phi( doplasma::@5/(byte) doplasma::i2#4 doplasma::@6/(byte) doplasma::i2#2 ) + (byte*) doplasma::screen#1 ← phi( doplasma::@5/(byte*) doplasma::screen#2 doplasma::@6/(byte*) doplasma::screen#1 ) + (byte) doplasma::ii#2 ← phi( doplasma::@5/(byte) doplasma::ii#0 doplasma::@6/(byte) doplasma::ii#1 ) + (byte/signed word/word/dword/signed dword~) doplasma::$4 ← (byte) doplasma::ii#2 * (byte/signed byte/word/signed word/dword/signed dword) $28 + (byte*~) doplasma::$5 ← (byte*) doplasma::screen#1 + (byte/signed word/word/dword/signed dword~) doplasma::$4 + (byte~) doplasma::$6 ← *((byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#2) + *((byte[$19]) doplasma::ybuf#0 + (byte) doplasma::ii#2) + *((byte*~) doplasma::$5 + (byte) doplasma::i2#2) ← (byte~) doplasma::$6 + (byte) doplasma::ii#1 ← ++ (byte) doplasma::ii#2 + (bool~) doplasma::$7 ← (byte) doplasma::ii#1 < (byte/signed byte/word/signed word/dword/signed dword) $19 + unroll if((bool~) doplasma::$7) goto doplasma::@6 + to:doplasma::@7 +doplasma::@7: scope:[doplasma] from doplasma::@6 + (byte*) doplasma::screen#4 ← phi( doplasma::@6/(byte*) doplasma::screen#1 ) + (byte) c2B#16 ← phi( doplasma::@6/(byte) c2B#20 ) + (byte) c2A#16 ← phi( doplasma::@6/(byte) c2A#20 ) + (byte) c1B#15 ← phi( doplasma::@6/(byte) c1B#18 ) + (byte) c1A#15 ← phi( doplasma::@6/(byte) c1A#18 ) + (byte) doplasma::i2#3 ← phi( doplasma::@6/(byte) doplasma::i2#2 ) + (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#3 + (bool~) doplasma::$8 ← (byte) doplasma::i2#1 < (byte/signed byte/word/signed word/dword/signed dword) $28 + if((bool~) doplasma::$8) goto doplasma::@5 + to:doplasma::@return +doplasma::@return: scope:[doplasma] from doplasma::@7 + (byte) c2B#10 ← phi( doplasma::@7/(byte) c2B#16 ) + (byte) c2A#10 ← phi( doplasma::@7/(byte) c2A#16 ) + (byte) c1B#10 ← phi( doplasma::@7/(byte) c1B#15 ) + (byte) c1A#10 ← phi( doplasma::@7/(byte) c1A#15 ) + (byte) c1A#4 ← (byte) c1A#10 + (byte) c1B#4 ← (byte) c1B#10 + (byte) c2A#4 ← (byte) c2A#10 + (byte) c2B#4 ← (byte) c2B#10 + return + to:@return +makecharset: scope:[makecharset] from main::@2 + (byte*) makecharset::charset#13 ← phi( main::@2/(byte*) makecharset::charset#0 ) + (byte*) print_char_cursor#29 ← phi( main::@2/(byte*) print_char_cursor#21 ) + (byte*) print_line_cursor#22 ← phi( main::@2/(byte*) print_line_cursor#14 ) + (byte*) print_screen#5 ← phi( main::@2/(byte*) print_screen#6 ) + (byte[8]) makecharset::bittab#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) $10, (byte/signed byte/word/signed word/dword/signed dword) $20, (byte/signed byte/word/signed word/dword/signed dword) $40, (byte/word/signed word/dword/signed dword) $80 } + call sid_rnd_init + to:makecharset::@11 +makecharset::@11: scope:[makecharset] from makecharset + (byte*) makecharset::charset#10 ← phi( makecharset/(byte*) makecharset::charset#13 ) + (byte*) print_char_cursor#23 ← phi( makecharset/(byte*) print_char_cursor#29 ) + (byte*) print_line_cursor#16 ← phi( makecharset/(byte*) print_line_cursor#22 ) + (byte*) print_screen#4 ← phi( makecharset/(byte*) print_screen#5 ) + call print_cls + to:makecharset::@12 +makecharset::@12: scope:[makecharset] from makecharset::@11 + (byte*) makecharset::charset#8 ← phi( makecharset::@11/(byte*) makecharset::charset#10 ) + (byte*) print_char_cursor#16 ← phi( makecharset::@11/(byte*) print_char_cursor#4 ) + (byte*) print_line_cursor#11 ← phi( makecharset::@11/(byte*) print_line_cursor#2 ) + (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#11 + (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#16 + (word) makecharset::c#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:makecharset::@1 +makecharset::@1: scope:[makecharset] from makecharset::@12 makecharset::@9 + (byte*) print_char_cursor#45 ← phi( makecharset::@12/(byte*) print_char_cursor#7 makecharset::@9/(byte*) print_char_cursor#24 ) + (byte*) print_line_cursor#40 ← phi( makecharset::@12/(byte*) print_line_cursor#5 makecharset::@9/(byte*) print_line_cursor#17 ) + (byte*) makecharset::charset#7 ← phi( makecharset::@12/(byte*) makecharset::charset#8 makecharset::@9/(byte*) makecharset::charset#9 ) + (word) makecharset::c#2 ← phi( makecharset::@12/(word) makecharset::c#0 makecharset::@9/(word) makecharset::c#1 ) + (byte~) makecharset::$2 ← < (word) makecharset::c#2 + (byte) makecharset::s#0 ← *((byte*) SINTABLE#0 + (byte~) makecharset::$2) + (byte) makecharset::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:makecharset::@2 +makecharset::@2: scope:[makecharset] from makecharset::@1 makecharset::@6 + (byte*) print_char_cursor#44 ← phi( makecharset::@1/(byte*) print_char_cursor#45 makecharset::@6/(byte*) print_char_cursor#36 ) + (byte*) print_line_cursor#39 ← phi( makecharset::@1/(byte*) print_line_cursor#40 makecharset::@6/(byte*) print_line_cursor#30 ) + (byte*) makecharset::charset#6 ← phi( makecharset::@1/(byte*) makecharset::charset#7 makecharset::@6/(byte*) makecharset::charset#1 ) + (byte) makecharset::i#7 ← phi( makecharset::@1/(byte) makecharset::i#0 makecharset::@6/(byte) makecharset::i#1 ) + (word) makecharset::c#12 ← phi( makecharset::@1/(word) makecharset::c#2 makecharset::@6/(word) makecharset::c#3 ) + (byte) makecharset::s#3 ← phi( makecharset::@1/(byte) makecharset::s#0 makecharset::@6/(byte) makecharset::s#5 ) + (byte) makecharset::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) makecharset::ii#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:makecharset::@3 +makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@4 + (byte*) print_char_cursor#43 ← phi( makecharset::@2/(byte*) print_char_cursor#44 makecharset::@4/(byte*) print_char_cursor#39 ) + (byte*) print_line_cursor#38 ← phi( makecharset::@2/(byte*) print_line_cursor#39 makecharset::@4/(byte*) print_line_cursor#34 ) + (byte*) makecharset::charset#5 ← phi( makecharset::@2/(byte*) makecharset::charset#6 makecharset::@4/(byte*) makecharset::charset#2 ) + (byte) makecharset::i#6 ← phi( makecharset::@2/(byte) makecharset::i#7 makecharset::@4/(byte) makecharset::i#3 ) + (word) makecharset::c#11 ← phi( makecharset::@2/(word) makecharset::c#12 makecharset::@4/(word) makecharset::c#6 ) + (byte) makecharset::b#6 ← phi( makecharset::@2/(byte) makecharset::b#0 makecharset::@4/(byte) makecharset::b#5 ) + (byte) makecharset::ii#5 ← phi( makecharset::@2/(byte) makecharset::ii#0 makecharset::@4/(byte) makecharset::ii#1 ) + (byte) makecharset::s#2 ← phi( makecharset::@2/(byte) makecharset::s#3 makecharset::@4/(byte) makecharset::s#4 ) + call sid_rnd + (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#1 + to:makecharset::@13 +makecharset::@13: scope:[makecharset] from makecharset::@3 + (byte*) print_char_cursor#41 ← phi( makecharset::@3/(byte*) print_char_cursor#43 ) + (byte*) print_line_cursor#36 ← phi( makecharset::@3/(byte*) print_line_cursor#38 ) + (byte*) makecharset::charset#3 ← phi( makecharset::@3/(byte*) makecharset::charset#5 ) + (byte) makecharset::i#4 ← phi( makecharset::@3/(byte) makecharset::i#6 ) + (word) makecharset::c#8 ← phi( makecharset::@3/(word) makecharset::c#11 ) + (byte) makecharset::b#4 ← phi( makecharset::@3/(byte) makecharset::b#6 ) + (byte) makecharset::ii#4 ← phi( makecharset::@3/(byte) makecharset::ii#5 ) + (byte) makecharset::s#1 ← phi( makecharset::@3/(byte) makecharset::s#2 ) + (byte) sid_rnd::return#4 ← phi( makecharset::@3/(byte) sid_rnd::return#2 ) + (byte~) makecharset::$3 ← (byte) sid_rnd::return#4 + (byte~) makecharset::$4 ← (byte~) makecharset::$3 & (byte/word/signed word/dword/signed dword) $ff + (bool~) makecharset::$5 ← (byte~) makecharset::$4 > (byte) makecharset::s#1 + (bool~) makecharset::$6 ← ! (bool~) makecharset::$5 + if((bool~) makecharset::$6) goto makecharset::@4 + to:makecharset::@5 +makecharset::@4: scope:[makecharset] from makecharset::@13 makecharset::@5 + (byte*) print_char_cursor#39 ← phi( makecharset::@13/(byte*) print_char_cursor#41 makecharset::@5/(byte*) print_char_cursor#42 ) + (byte*) print_line_cursor#34 ← phi( makecharset::@13/(byte*) print_line_cursor#36 makecharset::@5/(byte*) print_line_cursor#37 ) + (byte) makecharset::s#4 ← phi( makecharset::@13/(byte) makecharset::s#1 makecharset::@5/(byte) makecharset::s#6 ) + (byte*) makecharset::charset#2 ← phi( makecharset::@13/(byte*) makecharset::charset#3 makecharset::@5/(byte*) makecharset::charset#4 ) + (byte) makecharset::b#5 ← phi( makecharset::@13/(byte) makecharset::b#4 makecharset::@5/(byte) makecharset::b#1 ) + (byte) makecharset::i#3 ← phi( makecharset::@13/(byte) makecharset::i#4 makecharset::@5/(byte) makecharset::i#5 ) + (word) makecharset::c#6 ← phi( makecharset::@13/(word) makecharset::c#8 makecharset::@5/(word) makecharset::c#9 ) + (byte) makecharset::ii#2 ← phi( makecharset::@13/(byte) makecharset::ii#4 makecharset::@5/(byte) makecharset::ii#3 ) + (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 + (bool~) makecharset::$7 ← (byte) makecharset::ii#1 < (byte/signed byte/word/signed word/dword/signed dword) 8 + if((bool~) makecharset::$7) goto makecharset::@3 + to:makecharset::@6 +makecharset::@5: scope:[makecharset] from makecharset::@13 + (byte*) print_char_cursor#42 ← phi( makecharset::@13/(byte*) print_char_cursor#41 ) + (byte*) print_line_cursor#37 ← phi( makecharset::@13/(byte*) print_line_cursor#36 ) + (byte) makecharset::s#6 ← phi( makecharset::@13/(byte) makecharset::s#1 ) + (byte*) makecharset::charset#4 ← phi( makecharset::@13/(byte*) makecharset::charset#3 ) + (byte) makecharset::i#5 ← phi( makecharset::@13/(byte) makecharset::i#4 ) + (word) makecharset::c#9 ← phi( makecharset::@13/(word) makecharset::c#8 ) + (byte) makecharset::ii#3 ← phi( makecharset::@13/(byte) makecharset::ii#4 ) + (byte) makecharset::b#2 ← phi( makecharset::@13/(byte) makecharset::b#4 ) + (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#3) + to:makecharset::@4 +makecharset::@6: scope:[makecharset] from makecharset::@4 + (byte*) print_char_cursor#36 ← phi( makecharset::@4/(byte*) print_char_cursor#39 ) + (byte*) print_line_cursor#30 ← phi( makecharset::@4/(byte*) print_line_cursor#34 ) + (byte) makecharset::s#5 ← phi( makecharset::@4/(byte) makecharset::s#4 ) + (byte*) makecharset::charset#1 ← phi( makecharset::@4/(byte*) makecharset::charset#2 ) + (byte) makecharset::b#3 ← phi( makecharset::@4/(byte) makecharset::b#5 ) + (byte) makecharset::i#2 ← phi( makecharset::@4/(byte) makecharset::i#3 ) + (word) makecharset::c#3 ← phi( makecharset::@4/(word) makecharset::c#6 ) + (word~) makecharset::$8 ← (word) makecharset::c#3 << (byte/signed byte/word/signed word/dword/signed dword) 3 + (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#2 + *((byte*) makecharset::charset#1 + (word~) makecharset::$9) ← (byte) makecharset::b#3 + (byte) makecharset::i#1 ← ++ (byte) makecharset::i#2 + (bool~) makecharset::$10 ← (byte) makecharset::i#1 < (byte/signed byte/word/signed word/dword/signed dword) 8 + if((bool~) makecharset::$10) goto makecharset::@2 + to:makecharset::@7 +makecharset::@7: scope:[makecharset] from makecharset::@6 + (byte*) makecharset::charset#12 ← phi( makecharset::@6/(byte*) makecharset::charset#1 ) + (byte*) print_char_cursor#30 ← phi( makecharset::@6/(byte*) print_char_cursor#36 ) + (byte*) print_line_cursor#24 ← phi( makecharset::@6/(byte*) print_line_cursor#30 ) + (word) makecharset::c#4 ← phi( makecharset::@6/(word) makecharset::c#3 ) + (byte/word~) makecharset::$11 ← (word) makecharset::c#4 & (byte/signed byte/word/signed word/dword/signed dword) 7 + (bool~) makecharset::$12 ← (byte/word~) makecharset::$11 == (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) makecharset::$13 ← ! (bool~) makecharset::$12 + if((bool~) makecharset::$13) goto makecharset::@9 + to:makecharset::@8 +makecharset::@9: scope:[makecharset] from makecharset::@14 makecharset::@7 + (byte*) makecharset::charset#9 ← phi( makecharset::@14/(byte*) makecharset::charset#11 makecharset::@7/(byte*) makecharset::charset#12 ) + (byte*) print_char_cursor#24 ← phi( makecharset::@14/(byte*) print_char_cursor#8 makecharset::@7/(byte*) print_char_cursor#30 ) + (byte*) print_line_cursor#17 ← phi( makecharset::@14/(byte*) print_line_cursor#23 makecharset::@7/(byte*) print_line_cursor#24 ) + (word) makecharset::c#5 ← phi( makecharset::@14/(word) makecharset::c#7 makecharset::@7/(word) makecharset::c#4 ) + (word) makecharset::c#1 ← ++ (word) makecharset::c#5 + (bool~) makecharset::$15 ← (word) makecharset::c#1 < (word/signed word/dword/signed dword) $100 + if((bool~) makecharset::$15) goto makecharset::@1 + to:makecharset::@return +makecharset::@8: scope:[makecharset] from makecharset::@7 + (byte*) makecharset::charset#14 ← phi( makecharset::@7/(byte*) makecharset::charset#12 ) + (byte*) print_line_cursor#31 ← phi( makecharset::@7/(byte*) print_line_cursor#24 ) + (word) makecharset::c#10 ← phi( makecharset::@7/(word) makecharset::c#4 ) + (byte*) print_char_cursor#20 ← phi( makecharset::@7/(byte*) print_char_cursor#30 ) + (byte) print_char::ch#0 ← (byte) '.' + call print_char + to:makecharset::@14 +makecharset::@14: scope:[makecharset] from makecharset::@8 + (byte*) makecharset::charset#11 ← phi( makecharset::@8/(byte*) makecharset::charset#14 ) + (byte*) print_line_cursor#23 ← phi( makecharset::@8/(byte*) print_line_cursor#31 ) + (word) makecharset::c#7 ← phi( makecharset::@8/(word) makecharset::c#10 ) + (byte*) print_char_cursor#17 ← phi( makecharset::@8/(byte*) print_char_cursor#2 ) + (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#17 + to:makecharset::@9 +makecharset::@return: scope:[makecharset] from makecharset::@9 + (byte*) print_char_cursor#18 ← phi( makecharset::@9/(byte*) print_char_cursor#24 ) + (byte*) print_line_cursor#12 ← phi( makecharset::@9/(byte*) print_line_cursor#17 ) + (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#12 + (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#18 + return + to:@return +@28: scope:[] from @26 + (byte*) print_screen#9 ← phi( @26/(byte*) print_screen#10 ) + (byte) c2B#17 ← phi( @26/(byte) c2B#2 ) + (byte) c2A#17 ← phi( @26/(byte) c2A#2 ) + (byte) c1B#16 ← phi( @26/(byte) c1B#2 ) + (byte) c1A#16 ← phi( @26/(byte) c1A#2 ) + (byte*) print_char_cursor#25 ← phi( @26/(byte*) print_char_cursor#31 ) + (byte*) print_line_cursor#18 ← phi( @26/(byte*) print_line_cursor#25 ) + call main + to:@29 +@29: scope:[] from @28 + (byte) c2B#11 ← phi( @28/(byte) c2B#1 ) + (byte) c2A#11 ← phi( @28/(byte) c2A#1 ) + (byte) c1B#11 ← phi( @28/(byte) c1B#1 ) + (byte) c1A#11 ← phi( @28/(byte) c1A#1 ) + (byte*) print_char_cursor#19 ← phi( @28/(byte*) print_char_cursor#6 ) + (byte*) print_line_cursor#13 ← phi( @28/(byte*) print_line_cursor#4 ) + (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#13 + (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#19 + (byte) c1A#5 ← (byte) c1A#11 + (byte) c1B#5 ← (byte) c1B#11 + (byte) c2A#5 ← (byte) c2A#11 + (byte) c2B#5 ← (byte) c2B#11 + to:@end +@end: scope:[] from @29 + +SYMBOL TABLE SSA +(const string) $0 = (string) "0123456789abcdef" +(label) @16 +(label) @23 +(label) @25 +(label) @26 +(label) @28 +(label) @29 +(label) @4 +(label) @begin +(label) @end +(byte*) BGCOL +(byte*) BGCOL#0 +(byte*) BGCOL1 +(byte*) BGCOL1#0 +(byte*) BGCOL2 +(byte*) BGCOL2#0 +(byte*) BGCOL3 +(byte*) BGCOL3#0 +(byte*) BGCOL4 +(byte*) BGCOL4#0 +(byte) BLACK +(byte) BLACK#0 +(byte) BLUE +(byte) BLUE#0 +(byte*) BORDERCOL +(byte*) BORDERCOL#0 +(byte) BROWN +(byte) BROWN#0 +(byte*) CHARGEN +(byte*) CHARGEN#0 +(byte*) CHARSET +(byte*) CHARSET#0 +(byte*) CIA1_INTERRUPT +(byte*) CIA1_INTERRUPT#0 +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A#0 +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_A_DDR#0 +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B#0 +(byte*) CIA1_PORT_B_DDR +(byte*) CIA1_PORT_B_DDR#0 +(byte*) CIA2_INTERRUPT +(byte*) CIA2_INTERRUPT#0 +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A#0 +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_A_DDR#0 +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B#0 +(byte*) CIA2_PORT_B_DDR +(byte*) CIA2_PORT_B_DDR#0 +(byte) CIA_INTERRUPT_CLEAR +(byte) CIA_INTERRUPT_CLEAR#0 +(byte*) COLS +(byte*) COLS#0 +(byte) CYAN +(byte) CYAN#0 +(byte*) D011 +(byte*) D011#0 +(byte*) D016 +(byte*) D016#0 +(byte*) D018 +(byte*) D018#0 +(byte) DARK_GREY +(byte) DARK_GREY#0 +(byte) GREEN +(byte) GREEN#0 +(byte) GREY +(byte) GREY#0 +(void()**) HARDWARE_IRQ +(void()**) HARDWARE_IRQ#0 +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_BG#0 +(byte) IRQ_COLLISION_SPRITE +(byte) IRQ_COLLISION_SPRITE#0 +(byte*) IRQ_ENABLE +(byte*) IRQ_ENABLE#0 +(byte) IRQ_LIGHTPEN +(byte) IRQ_LIGHTPEN#0 +(byte) IRQ_RASTER +(byte) IRQ_RASTER#0 +(byte*) IRQ_STATUS +(byte*) IRQ_STATUS#0 +(void()**) KERNEL_IRQ +(void()**) KERNEL_IRQ#0 +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_X#0 +(byte*) LIGHTPEN_Y +(byte*) LIGHTPEN_Y#0 +(byte) LIGHT_BLUE +(byte) LIGHT_BLUE#0 +(byte) LIGHT_GREEN +(byte) LIGHT_GREEN#0 +(byte) LIGHT_GREY +(byte) LIGHT_GREY#0 +(byte) ORANGE +(byte) ORANGE#0 +(byte) PINK +(byte) PINK#0 +(byte*) PROCPORT +(byte*) PROCPORT#0 +(byte) PROCPORT_BASIC_KERNEL_IO +(byte) PROCPORT_BASIC_KERNEL_IO#0 +(byte*) PROCPORT_DDR +(byte*) PROCPORT_DDR#0 +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_DDR_MEMORY_MASK#0 +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_KERNEL_IO#0 +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_ALL#0 +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_CHARROM#0 +(byte) PROCPORT_RAM_IO +(byte) PROCPORT_RAM_IO#0 +(byte) PURPLE +(byte) PURPLE#0 +(byte*) RASTER +(byte*) RASTER#0 +(byte) RED +(byte) RED#0 +(byte*) SCREEN1 +(byte*) SCREEN1#0 +(byte) SID_CONTROL_GATE +(byte) SID_CONTROL_GATE#0 +(byte) SID_CONTROL_NOISE +(byte) SID_CONTROL_NOISE#0 +(byte) SID_CONTROL_PULSE +(byte) SID_CONTROL_PULSE#0 +(byte) SID_CONTROL_RING +(byte) SID_CONTROL_RING#0 +(byte) SID_CONTROL_SAWTOOTH +(byte) SID_CONTROL_SAWTOOTH#0 +(byte) SID_CONTROL_SYNC +(byte) SID_CONTROL_SYNC#0 +(byte) SID_CONTROL_TEST +(byte) SID_CONTROL_TEST#0 +(byte) SID_CONTROL_TRIANGLE +(byte) SID_CONTROL_TRIANGLE#0 +(byte*) SID_VOICE3_CONTROL +(byte*) SID_VOICE3_CONTROL#0 +(word*) SID_VOICE3_FREQ +(word*) SID_VOICE3_FREQ#0 +(byte*) SID_VOICE3_FREQ_HIGH +(byte*) SID_VOICE3_FREQ_HIGH#0 +(byte*) SID_VOICE3_FREQ_LOW +(byte*) SID_VOICE3_FREQ_LOW#0 +(byte*) SID_VOICE3_OSC +(byte*) SID_VOICE3_OSC#0 +(byte*) SINTABLE +(byte*) SINTABLE#0 +(byte*) SPRITES_COLS +(byte*) SPRITES_COLS#0 +(byte*) SPRITES_ENABLE +(byte*) SPRITES_ENABLE#0 +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_X#0 +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_EXPAND_Y#0 +(byte*) SPRITES_MC +(byte*) SPRITES_MC#0 +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC1#0 +(byte*) SPRITES_MC2 +(byte*) SPRITES_MC2#0 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_PRIORITY#0 +(byte*) SPRITES_XMSB +(byte*) SPRITES_XMSB#0 +(byte*) SPRITES_XPOS +(byte*) SPRITES_XPOS#0 +(byte*) SPRITES_YPOS +(byte*) SPRITES_YPOS#0 +(word) SPRITE_PTRS +(word) SPRITE_PTRS#0 +(byte) VIC_BMM +(byte) VIC_BMM#0 +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL#0 +(byte*) VIC_CONTROL2 +(byte*) VIC_CONTROL2#0 +(byte) VIC_CSEL +(byte) VIC_CSEL#0 +(byte) VIC_DEN +(byte) VIC_DEN#0 +(byte) VIC_ECM +(byte) VIC_ECM#0 +(byte) VIC_MCM +(byte) VIC_MCM#0 +(byte*) VIC_MEMORY +(byte*) VIC_MEMORY#0 +(byte) VIC_RSEL +(byte) VIC_RSEL#0 +(byte) VIC_RST8 +(byte) VIC_RST8#0 +(byte) WHITE +(byte) WHITE#0 +(byte) YELLOW +(byte) YELLOW#0 +(byte) c1A +(byte) c1A#0 +(byte) c1A#1 +(byte) c1A#10 +(byte) c1A#11 +(byte) c1A#12 +(byte) c1A#13 +(byte) c1A#14 +(byte) c1A#15 +(byte) c1A#16 +(byte) c1A#17 +(byte) c1A#18 +(byte) c1A#19 +(byte) c1A#2 +(byte) c1A#20 +(byte) c1A#21 +(byte) c1A#22 +(byte) c1A#23 +(byte) c1A#24 +(byte) c1A#25 +(byte) c1A#26 +(byte) c1A#27 +(byte) c1A#3 +(byte) c1A#4 +(byte) c1A#5 +(byte) c1A#6 +(byte) c1A#7 +(byte) c1A#8 +(byte) c1A#9 +(byte) c1B +(byte) c1B#0 +(byte) c1B#1 +(byte) c1B#10 +(byte) c1B#11 +(byte) c1B#12 +(byte) c1B#13 +(byte) c1B#14 +(byte) c1B#15 +(byte) c1B#16 +(byte) c1B#17 +(byte) c1B#18 +(byte) c1B#19 +(byte) c1B#2 +(byte) c1B#20 +(byte) c1B#21 +(byte) c1B#22 +(byte) c1B#23 +(byte) c1B#24 +(byte) c1B#25 +(byte) c1B#26 +(byte) c1B#27 +(byte) c1B#3 +(byte) c1B#4 +(byte) c1B#5 +(byte) c1B#6 +(byte) c1B#7 +(byte) c1B#8 +(byte) c1B#9 +(byte) c2A +(byte) c2A#0 +(byte) c2A#1 +(byte) c2A#10 +(byte) c2A#11 +(byte) c2A#12 +(byte) c2A#13 +(byte) c2A#14 +(byte) c2A#15 +(byte) c2A#16 +(byte) c2A#17 +(byte) c2A#18 +(byte) c2A#19 +(byte) c2A#2 +(byte) c2A#20 +(byte) c2A#21 +(byte) c2A#22 +(byte) c2A#23 +(byte) c2A#24 +(byte) c2A#25 +(byte) c2A#26 +(byte) c2A#27 +(byte) c2A#3 +(byte) c2A#4 +(byte) c2A#5 +(byte) c2A#6 +(byte) c2A#7 +(byte) c2A#8 +(byte) c2A#9 +(byte) c2B +(byte) c2B#0 +(byte) c2B#1 +(byte) c2B#10 +(byte) c2B#11 +(byte) c2B#12 +(byte) c2B#13 +(byte) c2B#14 +(byte) c2B#15 +(byte) c2B#16 +(byte) c2B#17 +(byte) c2B#18 +(byte) c2B#19 +(byte) c2B#2 +(byte) c2B#20 +(byte) c2B#21 +(byte) c2B#22 +(byte) c2B#23 +(byte) c2B#24 +(byte) c2B#25 +(byte) c2B#26 +(byte) c2B#27 +(byte) c2B#3 +(byte) c2B#4 +(byte) c2B#5 +(byte) c2B#6 +(byte) c2B#7 +(byte) c2B#8 +(byte) c2B#9 +(void()) doplasma((byte*) doplasma::screen) +(byte~) doplasma::$0 +(bool~) doplasma::$1 +(byte~) doplasma::$2 +(bool~) doplasma::$3 +(byte/signed word/word/dword/signed dword~) doplasma::$4 +(byte*~) doplasma::$5 +(byte~) doplasma::$6 +(bool~) doplasma::$7 +(bool~) doplasma::$8 +(label) doplasma::@1 +(label) doplasma::@2 +(label) doplasma::@3 +(label) doplasma::@4 +(label) doplasma::@5 +(label) doplasma::@6 +(label) doplasma::@7 +(label) doplasma::@return +(byte) doplasma::c1a +(byte) doplasma::c1a#0 +(byte) doplasma::c1a#1 +(byte) doplasma::c1a#2 +(byte) doplasma::c1b +(byte) doplasma::c1b#0 +(byte) doplasma::c1b#1 +(byte) doplasma::c1b#2 +(byte) doplasma::c2a +(byte) doplasma::c2a#0 +(byte) doplasma::c2a#1 +(byte) doplasma::c2a#2 +(byte) doplasma::c2b +(byte) doplasma::c2b#0 +(byte) doplasma::c2b#1 +(byte) doplasma::c2b#2 +(byte) doplasma::i +(byte) doplasma::i#0 +(byte) doplasma::i#1 +(byte) doplasma::i#2 +(byte) doplasma::i1 +(byte) doplasma::i1#0 +(byte) doplasma::i1#1 +(byte) doplasma::i1#2 +(byte) doplasma::i2 +(byte) doplasma::i2#0 +(byte) doplasma::i2#1 +(byte) doplasma::i2#2 +(byte) doplasma::i2#3 +(byte) doplasma::i2#4 +(byte) doplasma::ii +(byte) doplasma::ii#0 +(byte) doplasma::ii#1 +(byte) doplasma::ii#2 +(byte*) doplasma::screen +(byte*) doplasma::screen#0 +(byte*) doplasma::screen#1 +(byte*) doplasma::screen#2 +(byte*) doplasma::screen#3 +(byte*) doplasma::screen#4 +(byte*) doplasma::screen#5 +(byte*) doplasma::screen#6 +(byte*) doplasma::screen#7 +(byte*) doplasma::screen#8 +(byte[$28]) doplasma::xbuf +(byte[$28]) doplasma::xbuf#0 +(byte[$19]) doplasma::ybuf +(byte[$19]) doplasma::ybuf#0 +(void()) main() +(byte~) main::$1 +(byte*~) main::$2 +(bool~) main::$3 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@9 +(label) main::@return +(byte*) main::col +(byte*) main::col#0 +(byte*) main::col#1 +(byte*) main::col#2 +(label) main::toD0181 +(word~) main::toD0181_$0 +(word) main::toD0181_$0#0 +(word~) main::toD0181_$1 +(word) main::toD0181_$1#0 +(word~) main::toD0181_$2 +(word) main::toD0181_$2#0 +(byte~) main::toD0181_$3 +(byte) main::toD0181_$3#0 +(word~) main::toD0181_$4 +(word) main::toD0181_$4#0 +(byte~) main::toD0181_$5 +(byte) main::toD0181_$5#0 +(byte~) main::toD0181_$6 +(byte) main::toD0181_$6#0 +(byte~) main::toD0181_$7 +(byte) main::toD0181_$7#0 +(byte~) main::toD0181_$8 +(byte) main::toD0181_$8#0 +(label) main::toD0181_@return +(byte*) main::toD0181_gfx +(byte*) main::toD0181_gfx#0 +(byte*) main::toD0181_gfx#1 +(byte) main::toD0181_return +(byte) main::toD0181_return#0 +(byte) main::toD0181_return#1 +(byte) main::toD0181_return#2 +(byte) main::toD0181_return#3 +(byte*) main::toD0181_screen +(byte*) main::toD0181_screen#0 +(byte*) main::toD0181_screen#1 +(void()) makecharset((byte*) makecharset::charset) +(bool~) makecharset::$10 +(byte/word~) makecharset::$11 +(bool~) makecharset::$12 +(bool~) makecharset::$13 +(bool~) makecharset::$15 +(byte~) makecharset::$2 +(byte~) makecharset::$3 +(byte~) makecharset::$4 +(bool~) makecharset::$5 +(bool~) makecharset::$6 +(bool~) makecharset::$7 +(word~) makecharset::$8 +(word~) makecharset::$9 +(label) makecharset::@1 +(label) makecharset::@11 +(label) makecharset::@12 +(label) makecharset::@13 +(label) makecharset::@14 +(label) makecharset::@2 +(label) makecharset::@3 +(label) makecharset::@4 +(label) makecharset::@5 +(label) makecharset::@6 +(label) makecharset::@7 +(label) makecharset::@8 +(label) makecharset::@9 +(label) makecharset::@return +(byte) makecharset::b +(byte) makecharset::b#0 +(byte) makecharset::b#1 +(byte) makecharset::b#2 +(byte) makecharset::b#3 +(byte) makecharset::b#4 +(byte) makecharset::b#5 +(byte) makecharset::b#6 +(byte[8]) makecharset::bittab +(byte[8]) makecharset::bittab#0 +(word) makecharset::c +(word) makecharset::c#0 +(word) makecharset::c#1 +(word) makecharset::c#10 +(word) makecharset::c#11 +(word) makecharset::c#12 +(word) makecharset::c#2 +(word) makecharset::c#3 +(word) makecharset::c#4 +(word) makecharset::c#5 +(word) makecharset::c#6 +(word) makecharset::c#7 +(word) makecharset::c#8 +(word) makecharset::c#9 +(byte*) makecharset::charset +(byte*) makecharset::charset#0 +(byte*) makecharset::charset#1 +(byte*) makecharset::charset#10 +(byte*) makecharset::charset#11 +(byte*) makecharset::charset#12 +(byte*) makecharset::charset#13 +(byte*) makecharset::charset#14 +(byte*) makecharset::charset#2 +(byte*) makecharset::charset#3 +(byte*) makecharset::charset#4 +(byte*) makecharset::charset#5 +(byte*) makecharset::charset#6 +(byte*) makecharset::charset#7 +(byte*) makecharset::charset#8 +(byte*) makecharset::charset#9 +(byte) makecharset::i +(byte) makecharset::i#0 +(byte) makecharset::i#1 +(byte) makecharset::i#2 +(byte) makecharset::i#3 +(byte) makecharset::i#4 +(byte) makecharset::i#5 +(byte) makecharset::i#6 +(byte) makecharset::i#7 +(byte) makecharset::ii +(byte) makecharset::ii#0 +(byte) makecharset::ii#1 +(byte) makecharset::ii#2 +(byte) makecharset::ii#3 +(byte) makecharset::ii#4 +(byte) makecharset::ii#5 +(byte) makecharset::s +(byte) makecharset::s#0 +(byte) makecharset::s#1 +(byte) makecharset::s#2 +(byte) makecharset::s#3 +(byte) makecharset::s#4 +(byte) makecharset::s#5 +(byte) makecharset::s#6 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(byte) print_char::ch#0 +(byte) print_char::ch#1 +(byte*) print_char_cursor +(byte*) print_char_cursor#0 +(byte*) print_char_cursor#1 +(byte*) print_char_cursor#10 +(byte*) print_char_cursor#11 +(byte*) print_char_cursor#12 +(byte*) print_char_cursor#13 +(byte*) print_char_cursor#14 +(byte*) print_char_cursor#15 +(byte*) print_char_cursor#16 +(byte*) print_char_cursor#17 +(byte*) print_char_cursor#18 +(byte*) print_char_cursor#19 +(byte*) print_char_cursor#2 +(byte*) print_char_cursor#20 +(byte*) print_char_cursor#21 +(byte*) print_char_cursor#22 +(byte*) print_char_cursor#23 +(byte*) print_char_cursor#24 +(byte*) print_char_cursor#25 +(byte*) print_char_cursor#26 +(byte*) print_char_cursor#27 +(byte*) print_char_cursor#28 +(byte*) print_char_cursor#29 +(byte*) print_char_cursor#3 +(byte*) print_char_cursor#30 +(byte*) print_char_cursor#31 +(byte*) print_char_cursor#32 +(byte*) print_char_cursor#33 +(byte*) print_char_cursor#34 +(byte*) print_char_cursor#35 +(byte*) print_char_cursor#36 +(byte*) print_char_cursor#37 +(byte*) print_char_cursor#38 +(byte*) print_char_cursor#39 +(byte*) print_char_cursor#4 +(byte*) print_char_cursor#40 +(byte*) print_char_cursor#41 +(byte*) print_char_cursor#42 +(byte*) print_char_cursor#43 +(byte*) print_char_cursor#44 +(byte*) print_char_cursor#45 +(byte*) print_char_cursor#5 +(byte*) print_char_cursor#6 +(byte*) print_char_cursor#7 +(byte*) print_char_cursor#8 +(byte*) print_char_cursor#9 +(void()) print_cls() +(byte*~) print_cls::$0 +(bool~) print_cls::$1 +(label) print_cls::@1 +(label) print_cls::@2 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#0 +(byte*) print_cls::sc#1 +(byte*) print_cls::sc#2 +(byte[]) print_hextab +(byte[]) print_hextab#0 +(byte*) print_line_cursor +(byte*) print_line_cursor#0 +(byte*) print_line_cursor#1 +(byte*) print_line_cursor#10 +(byte*) print_line_cursor#11 +(byte*) print_line_cursor#12 +(byte*) print_line_cursor#13 +(byte*) print_line_cursor#14 +(byte*) print_line_cursor#15 +(byte*) print_line_cursor#16 +(byte*) print_line_cursor#17 +(byte*) print_line_cursor#18 +(byte*) print_line_cursor#19 +(byte*) print_line_cursor#2 +(byte*) print_line_cursor#20 +(byte*) print_line_cursor#21 +(byte*) print_line_cursor#22 +(byte*) print_line_cursor#23 +(byte*) print_line_cursor#24 +(byte*) print_line_cursor#25 +(byte*) print_line_cursor#26 +(byte*) print_line_cursor#27 +(byte*) print_line_cursor#28 +(byte*) print_line_cursor#29 +(byte*) print_line_cursor#3 +(byte*) print_line_cursor#30 +(byte*) print_line_cursor#31 +(byte*) print_line_cursor#32 +(byte*) print_line_cursor#33 +(byte*) print_line_cursor#34 +(byte*) print_line_cursor#35 +(byte*) print_line_cursor#36 +(byte*) print_line_cursor#37 +(byte*) print_line_cursor#38 +(byte*) print_line_cursor#39 +(byte*) print_line_cursor#4 +(byte*) print_line_cursor#40 +(byte*) print_line_cursor#5 +(byte*) print_line_cursor#6 +(byte*) print_line_cursor#7 +(byte*) print_line_cursor#8 +(byte*) print_line_cursor#9 +(byte*) print_screen +(byte*) print_screen#0 +(byte*) print_screen#1 +(byte*) print_screen#10 +(byte*) print_screen#11 +(byte*) print_screen#12 +(byte*) print_screen#13 +(byte*) print_screen#2 +(byte*) print_screen#3 +(byte*) print_screen#4 +(byte*) print_screen#5 +(byte*) print_screen#6 +(byte*) print_screen#7 +(byte*) print_screen#8 +(byte*) print_screen#9 +(byte()) sid_rnd() +(label) sid_rnd::@return +(byte) sid_rnd::return +(byte) sid_rnd::return#0 +(byte) sid_rnd::return#1 +(byte) sid_rnd::return#2 +(byte) sid_rnd::return#3 +(byte) sid_rnd::return#4 +(void()) sid_rnd_init() +(label) sid_rnd_init::@return + +Inversing boolean not [264] (bool~) makecharset::$6 ← (byte~) makecharset::$4 <= (byte) makecharset::s#1 from [263] (bool~) makecharset::$5 ← (byte~) makecharset::$4 > (byte) makecharset::s#1 +Inversing boolean not [282] (bool~) makecharset::$13 ← (byte/word~) makecharset::$11 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [281] (bool~) makecharset::$12 ← (byte/word~) makecharset::$11 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Successful SSA optimization Pass2UnaryNotSimplification +Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#35 (byte*) print_char_cursor#40 (byte*) print_screen#13 (byte*) print_line_cursor#32 (byte*) print_char_cursor#37 (byte*) print_screen#12 (byte*) print_line_cursor#29 (byte*) print_char_cursor#35 (byte*) print_screen#11 (byte*) print_line_cursor#25 (byte*) print_char_cursor#31 (byte*) print_screen#10 (byte*) print_line_cursor#18 (byte*) print_char_cursor#25 (byte*) print_screen#9 +Alias (byte*) print_char_cursor#1 = (byte*) print_char_cursor#12 (byte*) print_char_cursor#2 +Alias (byte*) print_line_cursor#1 = (byte*) print_screen#3 (byte*) print_screen#2 (byte*) print_char_cursor#3 (byte*) print_line_cursor#8 (byte*) print_char_cursor#13 (byte*) print_line_cursor#2 (byte*) print_char_cursor#4 +Alias (byte) sid_rnd::return#0 = (byte) sid_rnd::return#3 (byte) sid_rnd::return#1 +Alias (byte*) print_line_cursor#14 = (byte*) print_line_cursor#19 +Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#26 +Alias (byte*) print_screen#6 = (byte*) print_screen#7 +Alias (byte) c1A#17 = (byte) c1A#25 (byte) c1A#26 (byte) c1A#23 (byte) c1A#21 (byte) c1A#19 +Alias (byte) c1B#17 = (byte) c1B#25 (byte) c1B#26 (byte) c1B#23 (byte) c1B#21 (byte) c1B#19 +Alias (byte) c2A#18 = (byte) c2A#25 (byte) c2A#26 (byte) c2A#24 (byte) c2A#23 (byte) c2A#21 +Alias (byte) c2B#18 = (byte) c2B#25 (byte) c2B#26 (byte) c2B#24 (byte) c2B#23 (byte) c2B#21 +Alias (byte*) print_line_cursor#21 = (byte*) print_line_cursor#3 (byte*) print_line_cursor#9 (byte*) print_line_cursor#33 (byte*) print_line_cursor#27 +Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#5 (byte*) print_char_cursor#38 (byte*) print_char_cursor#33 (byte*) print_char_cursor#28 +Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 +Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 +Alias (byte) main::toD0181_return#0 = (byte) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 +Alias (byte) c1A#1 = (byte) c1A#12 (byte) c1A#13 (byte) c1A#7 +Alias (byte) c1B#1 = (byte) c1B#12 (byte) c1B#13 (byte) c1B#7 +Alias (byte) c2A#1 = (byte) c2A#12 (byte) c2A#13 (byte) c2A#7 +Alias (byte) c2B#1 = (byte) c2B#12 (byte) c2B#13 (byte) c2B#7 +Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#28 (byte*) print_line_cursor#15 (byte*) print_line_cursor#20 (byte*) print_line_cursor#4 +Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#34 (byte*) print_char_cursor#22 (byte*) print_char_cursor#27 (byte*) print_char_cursor#6 +Alias (byte) c1A#0 = (byte) c1A#6 +Alias (byte) c1B#0 = (byte) c1B#6 +Alias (byte) c2A#0 = (byte) c2A#6 +Alias (byte) c2B#0 = (byte) c2B#6 +Alias (byte) c1A#14 = (byte) c1A#9 +Alias (byte) c1B#14 = (byte) c1B#9 +Alias (byte) c2A#14 = (byte) c2A#8 +Alias (byte) c2B#14 = (byte) c2B#8 +Alias (byte*) doplasma::screen#6 = (byte*) doplasma::screen#7 +Alias (byte) c2A#15 = (byte) c2A#9 +Alias (byte) c2B#15 = (byte) c2B#9 +Alias (byte*) doplasma::screen#3 = (byte*) doplasma::screen#5 +Alias (byte) c1A#22 = (byte) c1A#24 +Alias (byte) c1B#22 = (byte) c1B#24 +Alias (byte) doplasma::i2#2 = (byte) doplasma::i2#3 +Alias (byte) c1A#10 = (byte) c1A#15 (byte) c1A#18 (byte) c1A#4 +Alias (byte) c1B#10 = (byte) c1B#15 (byte) c1B#18 (byte) c1B#4 +Alias (byte) c2A#10 = (byte) c2A#16 (byte) c2A#20 (byte) c2A#4 +Alias (byte) c2B#10 = (byte) c2B#16 (byte) c2B#20 (byte) c2B#4 +Alias (byte*) doplasma::screen#1 = (byte*) doplasma::screen#4 +Alias (byte*) print_screen#4 = (byte*) print_screen#5 +Alias (byte*) print_line_cursor#16 = (byte*) print_line_cursor#22 +Alias (byte*) print_char_cursor#23 = (byte*) print_char_cursor#29 +Alias (byte*) makecharset::charset#10 = (byte*) makecharset::charset#13 (byte*) makecharset::charset#8 +Alias (byte*) print_line_cursor#11 = (byte*) print_line_cursor#5 +Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#7 +Alias (byte) sid_rnd::return#2 = (byte) sid_rnd::return#4 +Alias (byte) makecharset::s#1 = (byte) makecharset::s#2 (byte) makecharset::s#6 +Alias (byte) makecharset::ii#3 = (byte) makecharset::ii#4 (byte) makecharset::ii#5 +Alias (byte) makecharset::b#2 = (byte) makecharset::b#4 (byte) makecharset::b#6 +Alias (word) makecharset::c#11 = (word) makecharset::c#8 (word) makecharset::c#9 +Alias (byte) makecharset::i#4 = (byte) makecharset::i#6 (byte) makecharset::i#5 +Alias (byte*) makecharset::charset#3 = (byte*) makecharset::charset#5 (byte*) makecharset::charset#4 +Alias (byte*) print_line_cursor#36 = (byte*) print_line_cursor#38 (byte*) print_line_cursor#37 +Alias (byte*) print_char_cursor#41 = (byte*) print_char_cursor#43 (byte*) print_char_cursor#42 +Alias (word) makecharset::c#10 = (word) makecharset::c#3 (word) makecharset::c#6 (word) makecharset::c#4 (word) makecharset::c#7 +Alias (byte) makecharset::i#2 = (byte) makecharset::i#3 +Alias (byte) makecharset::b#3 = (byte) makecharset::b#5 +Alias (byte*) makecharset::charset#1 = (byte*) makecharset::charset#2 (byte*) makecharset::charset#12 (byte*) makecharset::charset#14 (byte*) makecharset::charset#11 +Alias (byte) makecharset::s#4 = (byte) makecharset::s#5 +Alias (byte*) print_line_cursor#23 = (byte*) print_line_cursor#30 (byte*) print_line_cursor#34 (byte*) print_line_cursor#24 (byte*) print_line_cursor#31 +Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#36 (byte*) print_char_cursor#39 (byte*) print_char_cursor#30 +Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#8 +Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#17 (byte*) print_line_cursor#6 +Alias (byte*) print_char_cursor#18 = (byte*) print_char_cursor#24 (byte*) print_char_cursor#9 +Alias (byte) c1A#16 = (byte) c1A#2 +Alias (byte) c1B#16 = (byte) c1B#2 +Alias (byte) c2A#17 = (byte) c2A#2 +Alias (byte) c2B#17 = (byte) c2B#2 +Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#7 +Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#19 +Alias (byte) c1A#11 = (byte) c1A#5 +Alias (byte) c1B#11 = (byte) c1B#5 +Alias (byte) c2A#11 = (byte) c2A#5 +Alias (byte) c2B#11 = (byte) c2B#5 +Successful SSA optimization Pass2AliasElimination +Alias (byte) makecharset::ii#2 = (byte) makecharset::ii#3 +Alias (word) makecharset::c#10 = (word) makecharset::c#11 (word) makecharset::c#5 +Alias (byte) makecharset::i#2 = (byte) makecharset::i#4 +Alias (byte*) makecharset::charset#1 = (byte*) makecharset::charset#3 (byte*) makecharset::charset#9 +Alias (byte) makecharset::s#1 = (byte) makecharset::s#4 +Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#23 (byte*) print_line_cursor#36 +Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#41 +Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (byte*) print_line_cursor#1 +Self Phi Eliminated (byte*) print_line_cursor#14 +Self Phi Eliminated (byte*) print_char_cursor#21 +Self Phi Eliminated (byte*) print_screen#6 +Self Phi Eliminated (byte) c1A#17 +Self Phi Eliminated (byte) c1B#17 +Self Phi Eliminated (byte) c2A#18 +Self Phi Eliminated (byte) c2B#18 +Self Phi Eliminated (byte*) print_line_cursor#10 +Self Phi Eliminated (byte*) print_char_cursor#15 +Self Phi Eliminated (byte) c1A#14 +Self Phi Eliminated (byte) c1B#14 +Self Phi Eliminated (byte) c2A#14 +Self Phi Eliminated (byte) c2B#14 +Self Phi Eliminated (byte*) doplasma::screen#6 +Self Phi Eliminated (byte) c2A#15 +Self Phi Eliminated (byte) c2B#15 +Self Phi Eliminated (byte*) doplasma::screen#3 +Self Phi Eliminated (byte) c1A#22 +Self Phi Eliminated (byte) c1B#22 +Self Phi Eliminated (byte*) doplasma::screen#1 +Self Phi Eliminated (byte) doplasma::i2#2 +Self Phi Eliminated (byte) c1A#10 +Self Phi Eliminated (byte) c1B#10 +Self Phi Eliminated (byte) c2A#10 +Self Phi Eliminated (byte) c2B#10 +Self Phi Eliminated (byte) makecharset::s#1 +Self Phi Eliminated (word) makecharset::c#10 +Self Phi Eliminated (byte) makecharset::i#2 +Self Phi Eliminated (byte*) makecharset::charset#1 +Self Phi Eliminated (byte*) print_line_cursor#12 +Self Phi Eliminated (byte*) print_char_cursor#20 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte) print_char::ch#1 (byte) print_char::ch#0 +Redundant Phi (byte*) print_char_cursor#11 (byte*) print_char_cursor#20 +Redundant Phi (byte*) print_screen#1 (byte*) print_screen#4 +Redundant Phi (byte*) print_line_cursor#1 (byte*) print_screen#1 +Redundant Phi (byte*) print_line_cursor#26 (byte*) print_line_cursor#0 +Redundant Phi (byte*) print_char_cursor#32 (byte*) print_line_cursor#0 +Redundant Phi (byte*) print_screen#8 (byte*) print_line_cursor#0 +Redundant Phi (byte) c1A#27 (byte) c1A#16 +Redundant Phi (byte) c1B#27 (byte) c1B#16 +Redundant Phi (byte) c2A#27 (byte) c2A#17 +Redundant Phi (byte) c2B#27 (byte) c2B#17 +Redundant Phi (byte*) print_line_cursor#14 (byte*) print_line_cursor#26 +Redundant Phi (byte*) print_char_cursor#21 (byte*) print_char_cursor#32 +Redundant Phi (byte*) print_screen#6 (byte*) print_screen#8 +Redundant Phi (byte) c1A#17 (byte) c1A#27 +Redundant Phi (byte) c1B#17 (byte) c1B#27 +Redundant Phi (byte) c2A#18 (byte) c2A#27 +Redundant Phi (byte) c2B#18 (byte) c2B#27 +Redundant Phi (byte*) print_line_cursor#21 (byte*) print_line_cursor#12 +Redundant Phi (byte*) print_char_cursor#14 (byte*) print_char_cursor#18 +Redundant Phi (byte*) print_line_cursor#10 (byte*) print_line_cursor#21 +Redundant Phi (byte*) print_char_cursor#15 (byte*) print_char_cursor#14 +Redundant Phi (byte) c1A#0 (byte) c1A#10 +Redundant Phi (byte) c1B#0 (byte) c1B#10 +Redundant Phi (byte) c2A#0 (byte) c2A#10 +Redundant Phi (byte) c2B#0 (byte) c2B#10 +Redundant Phi (byte) c1A#8 (byte) c1A#1 +Redundant Phi (byte) c1B#8 (byte) c1B#1 +Redundant Phi (byte) c2A#19 (byte) c2A#1 +Redundant Phi (byte) c2B#19 (byte) c2B#1 +Redundant Phi (byte*) doplasma::screen#8 (byte*) doplasma::screen#0 +Redundant Phi (byte) c1A#14 (byte) c1A#8 +Redundant Phi (byte) c1B#14 (byte) c1B#8 +Redundant Phi (byte) c2A#14 (byte) c2A#19 +Redundant Phi (byte) c2B#14 (byte) c2B#19 +Redundant Phi (byte*) doplasma::screen#6 (byte*) doplasma::screen#8 +Redundant Phi (byte) c2A#15 (byte) c2A#14 +Redundant Phi (byte) c2B#15 (byte) c2B#14 +Redundant Phi (byte*) doplasma::screen#3 (byte*) doplasma::screen#6 +Redundant Phi (byte) c1A#22 (byte) c1A#3 +Redundant Phi (byte) c1B#22 (byte) c1B#3 +Redundant Phi (byte*) doplasma::screen#1 (byte*) doplasma::screen#2 +Redundant Phi (byte) doplasma::i2#2 (byte) doplasma::i2#4 +Redundant Phi (byte) c1A#10 (byte) c1A#20 +Redundant Phi (byte) c1B#10 (byte) c1B#20 +Redundant Phi (byte) c2A#10 (byte) c2A#22 +Redundant Phi (byte) c2B#10 (byte) c2B#22 +Redundant Phi (byte*) print_screen#4 (byte*) print_screen#6 +Redundant Phi (byte*) print_line_cursor#16 (byte*) print_line_cursor#14 +Redundant Phi (byte*) print_char_cursor#23 (byte*) print_char_cursor#21 +Redundant Phi (byte*) makecharset::charset#10 (byte*) makecharset::charset#0 +Redundant Phi (byte*) print_line_cursor#11 (byte*) print_line_cursor#1 +Redundant Phi (byte*) print_char_cursor#16 (byte*) print_line_cursor#1 +Redundant Phi (byte) makecharset::s#1 (byte) makecharset::s#3 +Redundant Phi (word) makecharset::c#10 (word) makecharset::c#12 +Redundant Phi (byte) makecharset::i#2 (byte) makecharset::i#7 +Redundant Phi (byte*) makecharset::charset#1 (byte*) makecharset::charset#6 +Redundant Phi (byte*) print_line_cursor#12 (byte*) print_line_cursor#39 +Redundant Phi (byte*) print_char_cursor#20 (byte*) print_char_cursor#44 +Redundant Phi (byte*) print_char_cursor#17 (byte*) print_char_cursor#1 +Redundant Phi (byte*) print_line_cursor#13 (byte*) print_line_cursor#10 +Redundant Phi (byte*) print_char_cursor#10 (byte*) print_char_cursor#15 +Redundant Phi (byte) c1A#11 (byte) c1A#1 +Redundant Phi (byte) c1B#11 (byte) c1B#1 +Redundant Phi (byte) c2A#11 (byte) c2A#1 +Redundant Phi (byte) c2B#11 (byte) c2B#1 +Successful SSA optimization Pass2RedundantPhiElimination +Simple Condition (bool~) print_cls::$1 [97] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$3 [141] if((byte*) main::col#1!=rangelast(COLS#0,main::$2)) goto main::@1 +Simple Condition (bool~) doplasma::$1 [202] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@1 +Simple Condition (bool~) doplasma::$3 [216] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3 +Simple Condition (bool~) doplasma::$7 [230] unroll if((byte) doplasma::ii#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6 +Simple Condition (bool~) doplasma::$8 [234] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5 +Simple Condition (bool~) makecharset::$6 [265] if((byte~) makecharset::$4<=(byte) makecharset::s#3) goto makecharset::@4 +Simple Condition (bool~) makecharset::$7 [269] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@3 +Simple Condition (bool~) makecharset::$10 [278] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 +Simple Condition (bool~) makecharset::$13 [283] if((byte/word~) makecharset::$11!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto makecharset::@9 +Simple Condition (bool~) makecharset::$15 [287] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 +Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 +Constant (const byte*) PROCPORT#0 = ((byte*))1 +Constant (const byte) PROCPORT_RAM_ALL#0 = $30 +Constant (const byte) PROCPORT_RAM_IO#0 = $35 +Constant (const byte) PROCPORT_RAM_CHARROM#0 = $31 +Constant (const byte) PROCPORT_KERNEL_IO#0 = $36 +Constant (const byte) PROCPORT_BASIC_KERNEL_IO#0 = $37 +Constant (const byte*) CHARGEN#0 = ((byte*))$d000 +Constant (const word) SPRITE_PTRS#0 = $3f8 +Constant (const byte*) SPRITES_XPOS#0 = ((byte*))$d000 +Constant (const byte*) SPRITES_YPOS#0 = ((byte*))$d001 +Constant (const byte*) SPRITES_XMSB#0 = ((byte*))$d010 +Constant (const byte*) RASTER#0 = ((byte*))$d012 +Constant (const byte*) SPRITES_ENABLE#0 = ((byte*))$d015 +Constant (const byte*) SPRITES_EXPAND_Y#0 = ((byte*))$d017 +Constant (const byte*) SPRITES_PRIORITY#0 = ((byte*))$d01b +Constant (const byte*) SPRITES_MC#0 = ((byte*))$d01c +Constant (const byte*) SPRITES_EXPAND_X#0 = ((byte*))$d01d +Constant (const byte*) BORDERCOL#0 = ((byte*))$d020 +Constant (const byte*) BGCOL#0 = ((byte*))$d021 +Constant (const byte*) BGCOL1#0 = ((byte*))$d021 +Constant (const byte*) BGCOL2#0 = ((byte*))$d022 +Constant (const byte*) BGCOL3#0 = ((byte*))$d023 +Constant (const byte*) BGCOL4#0 = ((byte*))$d024 +Constant (const byte*) SPRITES_MC1#0 = ((byte*))$d025 +Constant (const byte*) SPRITES_MC2#0 = ((byte*))$d026 +Constant (const byte*) SPRITES_COLS#0 = ((byte*))$d027 +Constant (const byte*) VIC_CONTROL#0 = ((byte*))$d011 +Constant (const byte*) D011#0 = ((byte*))$d011 +Constant (const byte) VIC_RST8#0 = $80 +Constant (const byte) VIC_ECM#0 = $40 +Constant (const byte) VIC_BMM#0 = $20 +Constant (const byte) VIC_DEN#0 = $10 +Constant (const byte) VIC_RSEL#0 = 8 +Constant (const byte*) VIC_CONTROL2#0 = ((byte*))$d016 +Constant (const byte*) D016#0 = ((byte*))$d016 +Constant (const byte) VIC_MCM#0 = $10 +Constant (const byte) VIC_CSEL#0 = 8 +Constant (const byte*) D018#0 = ((byte*))$d018 +Constant (const byte*) VIC_MEMORY#0 = ((byte*))$d018 +Constant (const byte*) LIGHTPEN_X#0 = ((byte*))$d013 +Constant (const byte*) LIGHTPEN_Y#0 = ((byte*))$d014 +Constant (const byte*) IRQ_STATUS#0 = ((byte*))$d019 +Constant (const byte*) IRQ_ENABLE#0 = ((byte*))$d01a +Constant (const byte) IRQ_RASTER#0 = 1 +Constant (const byte) IRQ_COLLISION_BG#0 = 2 +Constant (const byte) IRQ_COLLISION_SPRITE#0 = 4 +Constant (const byte) IRQ_LIGHTPEN#0 = 8 +Constant (const byte*) COLS#0 = ((byte*))$d800 +Constant (const byte*) CIA1_PORT_A#0 = ((byte*))$dc00 +Constant (const byte*) CIA1_PORT_B#0 = ((byte*))$dc01 +Constant (const byte*) CIA1_PORT_A_DDR#0 = ((byte*))$dc02 +Constant (const byte*) CIA1_PORT_B_DDR#0 = ((byte*))$dc03 +Constant (const byte*) CIA1_INTERRUPT#0 = ((byte*))$dc0d +Constant (const byte) CIA_INTERRUPT_CLEAR#0 = $7f +Constant (const byte*) CIA2_PORT_A#0 = ((byte*))$dd00 +Constant (const byte*) CIA2_PORT_B#0 = ((byte*))$dd01 +Constant (const byte*) CIA2_PORT_A_DDR#0 = ((byte*))$dd02 +Constant (const byte*) CIA2_PORT_B_DDR#0 = ((byte*))$dd03 +Constant (const byte*) CIA2_INTERRUPT#0 = ((byte*))$dd0d +Constant (const void()**) KERNEL_IRQ#0 = ((void()**))$314 +Constant (const void()**) HARDWARE_IRQ#0 = ((void()**))$fffe +Constant (const byte) BLACK#0 = 0 +Constant (const byte) WHITE#0 = 1 +Constant (const byte) RED#0 = 2 +Constant (const byte) CYAN#0 = 3 +Constant (const byte) PURPLE#0 = 4 +Constant (const byte) GREEN#0 = 5 +Constant (const byte) BLUE#0 = 6 +Constant (const byte) YELLOW#0 = 7 +Constant (const byte) ORANGE#0 = 8 +Constant (const byte) BROWN#0 = 9 +Constant (const byte) PINK#0 = $a +Constant (const byte) DARK_GREY#0 = $b +Constant (const byte) GREY#0 = $c +Constant (const byte) LIGHT_GREEN#0 = $d +Constant (const byte) LIGHT_BLUE#0 = $e +Constant (const byte) LIGHT_GREY#0 = $f +Constant (const byte*) print_line_cursor#0 = ((byte*))$400 +Constant (const byte[]) print_hextab#0 = $0 +Constant (const word*) SID_VOICE3_FREQ#0 = ((word*))$d40e +Constant (const byte*) SID_VOICE3_FREQ_LOW#0 = ((byte*))$d40e +Constant (const byte*) SID_VOICE3_FREQ_HIGH#0 = ((byte*))$d40f +Constant (const byte*) SID_VOICE3_CONTROL#0 = ((byte*))$d412 +Constant (const byte) SID_CONTROL_NOISE#0 = $80 +Constant (const byte) SID_CONTROL_PULSE#0 = $40 +Constant (const byte) SID_CONTROL_SAWTOOTH#0 = $20 +Constant (const byte) SID_CONTROL_TRIANGLE#0 = $10 +Constant (const byte) SID_CONTROL_TEST#0 = 8 +Constant (const byte) SID_CONTROL_RING#0 = 4 +Constant (const byte) SID_CONTROL_SYNC#0 = 2 +Constant (const byte) SID_CONTROL_GATE#0 = 1 +Constant (const byte*) SID_VOICE3_OSC#0 = ((byte*))$d41b +Constant (const byte*) SCREEN1#0 = ((byte*))$2800 +Constant (const byte*) CHARSET#0 = ((byte*))$2000 +Constant (const byte*) SINTABLE#0 = ((byte*))$1f00 +Constant (const byte) c1A#16 = 0 +Constant (const byte) c1B#16 = 0 +Constant (const byte) c2A#17 = 0 +Constant (const byte) c2B#17 = 0 +Constant (const byte[$28]) doplasma::xbuf#0 = { fill( $28, 0) } +Constant (const byte[$19]) doplasma::ybuf#0 = { fill( $19, 0) } +Constant (const byte) doplasma::i#0 = 0 +Constant (const byte) doplasma::i1#0 = 0 +Constant (const byte) doplasma::i2#0 = 0 +Constant (const byte) doplasma::ii#0 = 0 +Constant (const byte[8]) makecharset::bittab#0 = { 1, 2, 4, 8, $10, $20, $40, $80 } +Constant (const word) makecharset::c#0 = 0 +Constant (const byte) makecharset::i#0 = 0 +Constant (const byte) makecharset::b#0 = 0 +Constant (const byte) makecharset::ii#0 = 0 +Constant (const byte) print_char::ch#0 = '.' +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) print_cls::sc#0 = print_line_cursor#0 +Constant (const byte*) print_cls::$0 = print_line_cursor#0+$3e8 +Constant (const byte*) main::$2 = COLS#0+$3e8 +Constant (const byte*) main::col#0 = COLS#0 +Constant (const byte*) makecharset::charset#0 = CHARSET#0 +Constant (const byte*) main::toD0181_screen#0 = SCREEN1#0 +Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 +Constant (const byte*) doplasma::screen#0 = SCREEN1#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const word) main::toD0181_$0#0 = ((word))main::toD0181_screen#0 +Constant (const word) main::toD0181_$4#0 = ((word))main::toD0181_gfx#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff +Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0<<2 +Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0>>2 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 +Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 +Successful SSA optimization Pass2ConstantIdentification +if() condition always true - replacing block destination [24] if(true) goto main::@4 +Successful SSA optimization Pass2ConstantIfs +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Removing unused block main::@return +Successful SSA optimization Pass2EliminateUnusedBlocks +Resolved ranged next value main::col#1 ← ++ main::col#2 to ++ +Resolved ranged comparison value if(main::col#1!=rangelast(COLS#0,main::$2)) goto main::@1 to (byte*)(const byte*) main::$2+(byte/signed byte/word/signed word/dword/signed dword) 1 +Culled Empty Block (label) @4 +Culled Empty Block (label) @16 +Culled Empty Block (label) print_cls::@2 +Culled Empty Block (label) @23 +Culled Empty Block (label) main::@10 +Culled Empty Block (label) main::toD0181_@return +Culled Empty Block (label) main::@11 +Culled Empty Block (label) @26 +Culled Empty Block (label) makecharset::@12 +Culled Empty Block (label) makecharset::@14 +Culled Empty Block (label) @29 +Successful SSA optimization Pass2CullEmptyBlocks +Self Phi Eliminated (byte*) doplasma::screen#2 +Self Phi Eliminated (byte) c1A#20 +Self Phi Eliminated (byte) c1B#20 +Self Phi Eliminated (byte) c2A#22 +Self Phi Eliminated (byte) c2B#22 +Self Phi Eliminated (byte) makecharset::s#3 +Self Phi Eliminated (word) makecharset::c#12 +Self Phi Eliminated (byte*) makecharset::charset#6 +Self Phi Eliminated (byte*) print_line_cursor#39 +Self Phi Eliminated (byte*) print_char_cursor#44 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) doplasma::screen#2 (const byte*) doplasma::screen#0 +Redundant Phi (byte) c1A#20 (byte) c1A#3 +Redundant Phi (byte) c1B#20 (byte) c1B#3 +Redundant Phi (byte) c2A#22 (byte) c2A#3 +Redundant Phi (byte) c2B#22 (byte) c2B#3 +Redundant Phi (byte) makecharset::s#3 (byte) makecharset::s#0 +Redundant Phi (word) makecharset::c#12 (word) makecharset::c#2 +Redundant Phi (byte*) makecharset::charset#6 (byte*) makecharset::charset#7 +Redundant Phi (byte*) print_line_cursor#39 (byte*) print_line_cursor#40 +Redundant Phi (byte*) print_char_cursor#44 (byte*) print_char_cursor#45 +Successful SSA optimization Pass2RedundantPhiElimination +Successful SSA optimization PassNEliminateUnusedVars +Self Phi Eliminated (byte*) makecharset::charset#7 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) makecharset::charset#7 (const byte*) makecharset::charset#0 +Successful SSA optimization Pass2RedundantPhiElimination +Unrolling loop Loop head: doplasma::@6 tails: doplasma::@6 blocks: doplasma::@6 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#2 (const byte) doplasma::ii#0 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) doplasma::$4 = doplasma::ii#0*$28 +Constant (const byte) doplasma::ii#1 = ++doplasma::ii#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$5 = doplasma::screen#0+doplasma::$4 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#0) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [50] if((const byte) doplasma::ii#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_1 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_1 tails: doplasma::@6_1 blocks: doplasma::@6_1 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#3 (const byte) doplasma::ii#1 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) doplasma::$9 = doplasma::ii#1*$28 +Constant (const byte) doplasma::ii#4 = ++doplasma::ii#1 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$10 = doplasma::screen#0+doplasma::$9 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#1) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [40] if((const byte) doplasma::ii#4<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_2 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_2 tails: doplasma::@6_2 blocks: doplasma::@6_2 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#5 (const byte) doplasma::ii#4 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) doplasma::$12 = doplasma::ii#4*$28 +Constant (const byte) doplasma::ii#6 = ++doplasma::ii#4 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$13 = doplasma::screen#0+doplasma::$12 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#4) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [42] if((const byte) doplasma::ii#6<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_3 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_3 tails: doplasma::@6_3 blocks: doplasma::@6_3 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#7 (const byte) doplasma::ii#6 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) doplasma::$15 = doplasma::ii#6*$28 +Constant (const byte) doplasma::ii#8 = ++doplasma::ii#6 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$16 = doplasma::screen#0+doplasma::$15 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#6) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [44] if((const byte) doplasma::ii#8<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_4 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_4 tails: doplasma::@6_4 blocks: doplasma::@6_4 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#9 (const byte) doplasma::ii#8 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) doplasma::$18 = doplasma::ii#8*$28 +Constant (const byte) doplasma::ii#10 = ++doplasma::ii#8 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$19 = doplasma::screen#0+doplasma::$18 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#8) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [46] if((const byte) doplasma::ii#10<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_5 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_5 tails: doplasma::@6_5 blocks: doplasma::@6_5 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#11 (const byte) doplasma::ii#10 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) doplasma::$21 = doplasma::ii#10*$28 +Constant (const byte) doplasma::ii#12 = ++doplasma::ii#10 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$22 = doplasma::screen#0+doplasma::$21 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#10) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [48] if((const byte) doplasma::ii#12<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_6 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_6 tails: doplasma::@6_6 blocks: doplasma::@6_6 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#13 (const byte) doplasma::ii#12 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) doplasma::$24 = doplasma::ii#12*$28 +Constant (const byte) doplasma::ii#14 = ++doplasma::ii#12 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$25 = doplasma::screen#0+doplasma::$24 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#12) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [50] if((const byte) doplasma::ii#14<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_7 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_7 tails: doplasma::@6_7 blocks: doplasma::@6_7 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#15 (const byte) doplasma::ii#14 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$27 = doplasma::ii#14*$28 +Constant (const byte) doplasma::ii#16 = ++doplasma::ii#14 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$28 = doplasma::screen#0+doplasma::$27 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#14) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [52] if((const byte) doplasma::ii#16<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_8 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_8 tails: doplasma::@6_8 blocks: doplasma::@6_8 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#17 (const byte) doplasma::ii#16 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$30 = doplasma::ii#16*$28 +Constant (const byte) doplasma::ii#18 = ++doplasma::ii#16 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$31 = doplasma::screen#0+doplasma::$30 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#16) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [54] if((const byte) doplasma::ii#18<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_9 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_9 tails: doplasma::@6_9 blocks: doplasma::@6_9 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#19 (const byte) doplasma::ii#18 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$33 = doplasma::ii#18*$28 +Constant (const byte) doplasma::ii#20 = ++doplasma::ii#18 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$34 = doplasma::screen#0+doplasma::$33 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#18) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [56] if((const byte) doplasma::ii#20<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_10 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_10 tails: doplasma::@6_10 blocks: doplasma::@6_10 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#21 (const byte) doplasma::ii#20 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$36 = doplasma::ii#20*$28 +Constant (const byte) doplasma::ii#22 = ++doplasma::ii#20 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$37 = doplasma::screen#0+doplasma::$36 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#20) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [58] if((const byte) doplasma::ii#22<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_11 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_11 tails: doplasma::@6_11 blocks: doplasma::@6_11 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#23 (const byte) doplasma::ii#22 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$39 = doplasma::ii#22*$28 +Constant (const byte) doplasma::ii#24 = ++doplasma::ii#22 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$40 = doplasma::screen#0+doplasma::$39 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#22) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [60] if((const byte) doplasma::ii#24<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_12 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_12 tails: doplasma::@6_12 blocks: doplasma::@6_12 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#25 (const byte) doplasma::ii#24 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$42 = doplasma::ii#24*$28 +Constant (const byte) doplasma::ii#26 = ++doplasma::ii#24 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$43 = doplasma::screen#0+doplasma::$42 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#24) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [62] if((const byte) doplasma::ii#26<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_13 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_13 tails: doplasma::@6_13 blocks: doplasma::@6_13 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#27 (const byte) doplasma::ii#26 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$45 = doplasma::ii#26*$28 +Constant (const byte) doplasma::ii#28 = ++doplasma::ii#26 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$46 = doplasma::screen#0+doplasma::$45 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#26) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [64] if((const byte) doplasma::ii#28<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_14 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_14 tails: doplasma::@6_14 blocks: doplasma::@6_14 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#29 (const byte) doplasma::ii#28 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$48 = doplasma::ii#28*$28 +Constant (const byte) doplasma::ii#30 = ++doplasma::ii#28 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$49 = doplasma::screen#0+doplasma::$48 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#28) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [66] if((const byte) doplasma::ii#30<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_15 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_15 tails: doplasma::@6_15 blocks: doplasma::@6_15 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#31 (const byte) doplasma::ii#30 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$51 = doplasma::ii#30*$28 +Constant (const byte) doplasma::ii#32 = ++doplasma::ii#30 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$52 = doplasma::screen#0+doplasma::$51 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#30) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [68] if((const byte) doplasma::ii#32<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_16 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_16 tails: doplasma::@6_16 blocks: doplasma::@6_16 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#33 (const byte) doplasma::ii#32 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$54 = doplasma::ii#32*$28 +Constant (const byte) doplasma::ii#34 = ++doplasma::ii#32 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$55 = doplasma::screen#0+doplasma::$54 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#32) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [70] if((const byte) doplasma::ii#34<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_17 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_17 tails: doplasma::@6_17 blocks: doplasma::@6_17 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#35 (const byte) doplasma::ii#34 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$57 = doplasma::ii#34*$28 +Constant (const byte) doplasma::ii#36 = ++doplasma::ii#34 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$58 = doplasma::screen#0+doplasma::$57 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#34) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [72] if((const byte) doplasma::ii#36<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_18 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_18 tails: doplasma::@6_18 blocks: doplasma::@6_18 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#37 (const byte) doplasma::ii#36 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$60 = doplasma::ii#36*$28 +Constant (const byte) doplasma::ii#38 = ++doplasma::ii#36 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$61 = doplasma::screen#0+doplasma::$60 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#36) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [74] if((const byte) doplasma::ii#38<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_19 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_19 tails: doplasma::@6_19 blocks: doplasma::@6_19 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#39 (const byte) doplasma::ii#38 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$63 = doplasma::ii#38*$28 +Constant (const byte) doplasma::ii#40 = ++doplasma::ii#38 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$64 = doplasma::screen#0+doplasma::$63 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#38) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [76] if((const byte) doplasma::ii#40<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_20 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_20 tails: doplasma::@6_20 blocks: doplasma::@6_20 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#41 (const byte) doplasma::ii#40 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$66 = doplasma::ii#40*$28 +Constant (const byte) doplasma::ii#42 = ++doplasma::ii#40 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$67 = doplasma::screen#0+doplasma::$66 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#40) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [78] if((const byte) doplasma::ii#42<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_21 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_21 tails: doplasma::@6_21 blocks: doplasma::@6_21 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#43 (const byte) doplasma::ii#42 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$69 = doplasma::ii#42*$28 +Constant (const byte) doplasma::ii#44 = ++doplasma::ii#42 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$70 = doplasma::screen#0+doplasma::$69 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#42) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [80] if((const byte) doplasma::ii#44<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_22 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_22 tails: doplasma::@6_22 blocks: doplasma::@6_22 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#45 (const byte) doplasma::ii#44 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$72 = doplasma::ii#44*$28 +Constant (const byte) doplasma::ii#46 = ++doplasma::ii#44 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$73 = doplasma::screen#0+doplasma::$72 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#44) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [82] if((const byte) doplasma::ii#46<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_23 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_23 tails: doplasma::@6_23 blocks: doplasma::@6_23 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#47 (const byte) doplasma::ii#46 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$75 = doplasma::ii#46*$28 +Constant (const byte) doplasma::ii#48 = ++doplasma::ii#46 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$76 = doplasma::screen#0+doplasma::$75 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#46) +Successful SSA optimization Pass2ConstantAdditionElimination +if() condition always true - replacing block destination [84] if((const byte) doplasma::ii#48<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_24 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: doplasma::@6_24 tails: doplasma::@6_24 blocks: doplasma::@6_24 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) doplasma::ii#49 (const byte) doplasma::ii#48 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const word/signed word/dword/signed dword) doplasma::$78 = doplasma::ii#48*$28 +Constant (const byte) doplasma::ii#50 = ++doplasma::ii#48 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) doplasma::$79 = doplasma::screen#0+doplasma::$78 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(doplasma::ybuf#0+doplasma::ii#48) +Successful SSA optimization Pass2ConstantAdditionElimination +Removing PHI-reference to removed block (doplasma::@6_24) in block doplasma::@6_25 +if() condition always false - eliminating [86] if((const byte) doplasma::ii#50<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@6_25 +Successful SSA optimization Pass2ConstantIfs +Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable (byte) doplasma::ii#51 from unused block doplasma::@6_25 +Eliminating variable (byte/signed word/word/dword/signed dword~) doplasma::$81 from unused block doplasma::@6_25 +Eliminating variable (byte*~) doplasma::$82 from unused block doplasma::@6_25 +Eliminating variable (byte~) doplasma::$83 from unused block doplasma::@6_25 +Eliminating variable (byte) doplasma::ii#52 from unused block doplasma::@6_25 +Removing unused block doplasma::@6_25 +Successful SSA optimization Pass2EliminateUnusedBlocks +Inlining constant with var siblings (const byte*) print_cls::sc#0 +Inlining constant with var siblings (const byte*) main::col#0 +Inlining constant with var siblings (const byte) doplasma::i#0 +Inlining constant with var siblings (const byte) doplasma::i1#0 +Inlining constant with var siblings (const byte) doplasma::i2#0 +Inlining constant with different constant siblings (const byte) doplasma::ii#0 +Inlining constant with different constant siblings (const byte) doplasma::ii#1 +Inlining constant with different constant siblings (const byte) doplasma::ii#4 +Inlining constant with different constant siblings (const byte) doplasma::ii#6 +Inlining constant with different constant siblings (const byte) doplasma::ii#8 +Inlining constant with different constant siblings (const byte) doplasma::ii#10 +Inlining constant with different constant siblings (const byte) doplasma::ii#12 +Inlining constant with different constant siblings (const byte) doplasma::ii#14 +Inlining constant with different constant siblings (const byte) doplasma::ii#16 +Inlining constant with different constant siblings (const byte) doplasma::ii#18 +Inlining constant with different constant siblings (const byte) doplasma::ii#20 +Inlining constant with different constant siblings (const byte) doplasma::ii#22 +Inlining constant with different constant siblings (const byte) doplasma::ii#24 +Inlining constant with different constant siblings (const byte) doplasma::ii#26 +Inlining constant with different constant siblings (const byte) doplasma::ii#28 +Inlining constant with different constant siblings (const byte) doplasma::ii#30 +Inlining constant with different constant siblings (const byte) doplasma::ii#32 +Inlining constant with different constant siblings (const byte) doplasma::ii#34 +Inlining constant with different constant siblings (const byte) doplasma::ii#36 +Inlining constant with different constant siblings (const byte) doplasma::ii#38 +Inlining constant with different constant siblings (const byte) doplasma::ii#40 +Inlining constant with different constant siblings (const byte) doplasma::ii#42 +Inlining constant with different constant siblings (const byte) doplasma::ii#44 +Inlining constant with different constant siblings (const byte) doplasma::ii#46 +Inlining constant with different constant siblings (const byte) doplasma::ii#48 +Inlining constant with var siblings (const word) makecharset::c#0 +Inlining constant with var siblings (const byte) makecharset::i#0 +Inlining constant with var siblings (const byte) makecharset::b#0 +Inlining constant with var siblings (const byte) makecharset::ii#0 +Inlining constant with var siblings (const byte) c1A#16 +Inlining constant with var siblings (const byte) c1B#16 +Inlining constant with var siblings (const byte) c2A#17 +Inlining constant with var siblings (const byte) c2B#17 +Constant inlined doplasma::ii#46 = ++++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#48 = ++++++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::col#0 = (const byte*) COLS#0 +Constant inlined doplasma::ii#40 = ++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#42 = ++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#44 = ++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#6 = ++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#8 = ++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$67 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined c1A#16 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$69 = ++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$64 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$63 = ++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$66 = ++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$60 = ++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$61 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::ii#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#1 = ++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#4 = ++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::toD0181_$7#0 = >((word))(const byte*) CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) $f +Constant inlined doplasma::$57 = ++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::toD0181_$3#0 = >((word))(const byte*) SCREEN1#0&(word/signed word/dword/signed dword) $3fff<<(byte/signed byte/word/signed word/dword/signed dword) 2 +Constant inlined doplasma::$58 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$52 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$55 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined makecharset::c#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$54 = ++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$51 = ++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN1#0 +Constant inlined doplasma::ii#24 = ++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#26 = ++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined print_cls::$0 = (const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8 +Constant inlined doplasma::ii#28 = ++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#20 = ++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#22 = ++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$9 = ++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::ii#36 = ++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$5 = (const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$4 = (byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::ii#38 = ++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::toD0181_$0#0 = ((word))(const byte*) SCREEN1#0 +Constant inlined doplasma::ii#30 = ++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined print_cls::sc#0 = (const byte*) print_line_cursor#0 +Constant inlined doplasma::ii#32 = ++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#34 = ++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$79 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::$2 = (const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8 +Constant inlined doplasma::$78 = ++++++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::toD0181_$4#0 = ((word))(const byte*) CHARSET#0 +Constant inlined doplasma::$75 = ++++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined c2B#17 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$76 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$70 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$73 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$72 = ++++++++++++++++++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::i2#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$28 = (const byte*) SCREEN1#0+++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$27 = ++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$24 = ++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$25 = (const byte*) SCREEN1#0+++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined c2A#17 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$22 = (const byte*) SCREEN1#0+++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$21 = ++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::ii#14 = ++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#16 = ++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#18 = ++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::toD0181_$1#0 = ((word))(const byte*) SCREEN1#0&(word/signed word/dword/signed dword) $3fff +Constant inlined doplasma::ii#10 = ++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::ii#12 = ++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined makecharset::ii#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined makecharset::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$16 = (const byte*) SCREEN1#0+++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined makecharset::charset#0 = (const byte*) CHARSET#0 +Constant inlined doplasma::$19 = (const byte*) SCREEN1#0+++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$18 = ++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$13 = (const byte*) SCREEN1#0+++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::screen#0 = (const byte*) SCREEN1#0 +Constant inlined doplasma::$12 = ++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$15 = ++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::toD0181_$5#0 = >((word))(const byte*) CHARSET#0 +Constant inlined doplasma::$10 = (const byte*) SCREEN1#0+++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 +Constant inlined doplasma::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::i1#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$49 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$46 = (const byte*) SCREEN1#0+++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$45 = ++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$48 = ++++++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$42 = ++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$43 = (const byte*) SCREEN1#0+++++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$40 = (const byte*) SCREEN1#0+++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::toD0181_$6#0 = >((word))(const byte*) CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2 +Constant inlined doplasma::$39 = ++++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined main::toD0181_$2#0 = ((word))(const byte*) SCREEN1#0&(word/signed word/dword/signed dword) $3fff<<(byte/signed byte/word/signed word/dword/signed dword) 2 +Constant inlined c1B#16 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$34 = (const byte*) SCREEN1#0+++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$37 = (const byte*) SCREEN1#0+++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$36 = ++++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$31 = (const byte*) SCREEN1#0+++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined doplasma::$30 = ++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined makecharset::b#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined doplasma::$33 = ++++++++++++++++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Successful SSA optimization Pass2ConstantInlining +Simplifying constant plus zero doplasma::ybuf#0+0 +Simplifying constant multiply by zero 0*$28 +Simplifying constant integer increment ++0 +Simplifying constant integer increment ++0 +Simplifying constant integer increment ++0 +Simplifying constant integer increment ++1 +Simplifying constant integer increment ++1 +Simplifying constant integer increment ++2 +Simplifying constant integer increment ++2 +Simplifying constant integer increment ++3 +Simplifying constant integer increment ++3 +Simplifying constant integer increment ++4 +Simplifying constant integer increment ++4 +Simplifying constant integer increment ++5 +Simplifying constant integer increment ++5 +Simplifying constant integer increment ++6 +Simplifying constant integer increment ++6 +Simplifying constant integer increment ++7 +Simplifying constant integer increment ++7 +Simplifying constant integer increment ++8 +Simplifying constant integer increment ++8 +Simplifying constant integer increment ++9 +Simplifying constant integer increment ++9 +Simplifying constant integer increment ++$a +Simplifying constant integer increment ++$a +Simplifying constant integer increment ++$b +Simplifying constant integer increment ++$b +Simplifying constant integer increment ++$c +Simplifying constant integer increment ++$c +Simplifying constant integer increment ++$d +Simplifying constant integer increment ++$d +Simplifying constant integer increment ++$e +Simplifying constant integer increment ++$e +Simplifying constant integer increment ++$f +Simplifying constant integer increment ++$f +Simplifying constant integer increment ++$10 +Simplifying constant integer increment ++$10 +Simplifying constant integer increment ++$11 +Simplifying constant integer increment ++$11 +Simplifying constant integer increment ++$12 +Simplifying constant integer increment ++$12 +Simplifying constant integer increment ++$13 +Simplifying constant integer increment ++$13 +Simplifying constant integer increment ++$14 +Simplifying constant integer increment ++$14 +Simplifying constant integer increment ++$15 +Simplifying constant integer increment ++$15 +Simplifying constant integer increment ++$16 +Simplifying constant integer increment ++$16 +Simplifying constant integer increment ++$17 +Successful SSA optimization Pass2ConstantSimplification +Simplifying constant plus zero SCREEN1#0+0 +Simplifying constant integer increment ++1 +Simplifying constant integer increment ++2 +Simplifying constant integer increment ++3 +Simplifying constant integer increment ++4 +Simplifying constant integer increment ++5 +Simplifying constant integer increment ++6 +Simplifying constant integer increment ++7 +Simplifying constant integer increment ++8 +Simplifying constant integer increment ++9 +Simplifying constant integer increment ++$a +Simplifying constant integer increment ++$b +Simplifying constant integer increment ++$c +Simplifying constant integer increment ++$d +Simplifying constant integer increment ++$e +Simplifying constant integer increment ++$f +Simplifying constant integer increment ++$10 +Simplifying constant integer increment ++$11 +Simplifying constant integer increment ++$12 +Simplifying constant integer increment ++$13 +Simplifying constant integer increment ++$14 +Simplifying constant integer increment ++$15 +Simplifying constant integer increment ++$16 +Simplifying constant integer increment ++$17 +Successful SSA optimization Pass2ConstantSimplification +Added new block during phi lifting main::@12(between main::@1 and main::@1) +Added new block during phi lifting doplasma::@9(between doplasma::@1 and doplasma::@1) +Added new block during phi lifting doplasma::@10(between doplasma::@3 and doplasma::@3) +Added new block during phi lifting doplasma::@11(between doplasma::@7 and doplasma::@5) +Added new block during phi lifting makecharset::@15(between makecharset::@9 and makecharset::@1) +Added new block during phi lifting makecharset::@16(between makecharset::@6 and makecharset::@2) +Added new block during phi lifting makecharset::@17(between makecharset::@4 and makecharset::@3) +Added new block during phi lifting makecharset::@18(between makecharset::@13 and makecharset::@4) +Added new block during phi lifting makecharset::@19(between makecharset::@7 and makecharset::@9) +Added new block during phi lifting print_cls::@3(between print_cls::@1 and print_cls::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @28 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main::@2 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::@4 +Adding NOP phi() at start of makecharset +Adding NOP phi() at start of makecharset::@11 +Adding NOP phi() at start of makecharset::@8 +Adding NOP phi() at start of print_cls +CALL GRAPH +Calls in [] to main:3 +Calls in [main] to makecharset:13 doplasma:18 +Calls in [makecharset] to sid_rnd_init:112 print_cls:114 sid_rnd:120 print_char:138 + +Created 20 initial phi equivalence classes +Coalesced [19] c1A#28 ← c1A#3 +Coalesced [20] c1B#28 ← c1B#3 +Coalesced [21] c2A#28 ← c2A#3 +Coalesced [22] c2B#28 ← c2B#3 +Coalesced [23] main::col#3 ← main::col#1 +Coalesced [26] doplasma::c1a#3 ← doplasma::c1a#0 +Coalesced [27] doplasma::c1b#3 ← doplasma::c1b#0 +Coalesced [39] doplasma::c2a#3 ← doplasma::c2a#0 +Coalesced [40] doplasma::c2b#3 ← doplasma::c2b#0 +Coalesced [104] doplasma::i2#5 ← doplasma::i2#1 +Coalesced [105] doplasma::c2a#4 ← doplasma::c2a#1 +Coalesced [106] doplasma::c2b#4 ← doplasma::c2b#1 +Coalesced [107] doplasma::i1#3 ← doplasma::i1#1 +Coalesced [108] doplasma::c1a#4 ← doplasma::c1a#1 +Coalesced [109] doplasma::c1b#4 ← doplasma::c1b#1 +Coalesced [110] doplasma::i#3 ← doplasma::i#1 +Coalesced [126] makecharset::b#9 ← makecharset::b#1 +Coalesced [139] print_char_cursor#47 ← print_char_cursor#1 +Coalesced [144] makecharset::c#13 ← makecharset::c#1 +Coalesced [145] print_char_cursor#46 ← print_char_cursor#18 +Coalesced (already) [146] print_char_cursor#48 ← print_char_cursor#45 +Coalesced [147] makecharset::i#8 ← makecharset::i#1 +Coalesced [148] makecharset::ii#6 ← makecharset::ii#1 +Coalesced [149] makecharset::b#7 ← makecharset::b#3 +Coalesced (already) [150] makecharset::b#8 ← makecharset::b#2 +Coalesced [162] print_cls::sc#3 ← print_cls::sc#1 +Coalesced down to 18 phi equivalence classes +Culled Empty Block (label) main::@12 +Culled Empty Block (label) doplasma::@11 +Culled Empty Block (label) doplasma::@10 +Culled Empty Block (label) doplasma::@9 +Culled Empty Block (label) makecharset::@15 +Culled Empty Block (label) makecharset::@19 +Culled Empty Block (label) makecharset::@16 +Culled Empty Block (label) makecharset::@17 +Culled Empty Block (label) makecharset::@18 +Culled Empty Block (label) print_cls::@3 +Renumbering block @25 to @1 +Renumbering block @28 to @2 +Renumbering block main::@9 to main::@5 +Renumbering block makecharset::@11 to makecharset::@10 +Renumbering block makecharset::@13 to makecharset::@11 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main::@2 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::@4 +Adding NOP phi() at start of makecharset +Adding NOP phi() at start of makecharset::@10 +Adding NOP phi() at start of makecharset::@8 +Adding NOP phi() at start of print_cls + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + kickasm(location (const byte*) SINTABLE#0) {{ .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) + }} + to:@2 +@2: scope:[] from @1 + [2] phi() + [3] call main + to:@end +@end: scope:[] from @2 + [4] phi() +main: scope:[main] from @2 + asm { sei } + [6] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 + [7] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [8] (byte*) main::col#2 ← phi( main/(const byte*) COLS#0 main::@1/(byte*) main::col#1 ) + [9] *((byte*) main::col#2) ← (const byte) BLACK#0 + [10] (byte*) main::col#1 ← ++ (byte*) main::col#2 + [11] if((byte*) main::col#1!=(byte*)(const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 + [12] phi() + [13] call makecharset + to:main::toD0181 +main::toD0181: scope:[main] from main::@2 + [14] phi() + to:main::@5 +main::@5: scope:[main] from main::toD0181 + [15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 + to:main::@3 +main::@3: scope:[main] from main::@4 main::@5 + [16] (byte) c2B#1 ← phi( main::@4/(byte) c2B#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [16] (byte) c2A#1 ← phi( main::@4/(byte) c2A#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [16] (byte) c1B#1 ← phi( main::@4/(byte) c1B#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [16] (byte) c1A#1 ← phi( main::@4/(byte) c1A#3 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + to:main::@4 +main::@4: scope:[main] from main::@3 + [17] phi() + [18] call doplasma + to:main::@3 +doplasma: scope:[doplasma] from main::@4 + [19] (byte) doplasma::c1a#0 ← (byte) c1A#1 + [20] (byte) doplasma::c1b#0 ← (byte) c1B#1 + to:doplasma::@1 +doplasma::@1: scope:[doplasma] from doplasma doplasma::@1 + [21] (byte) doplasma::i#2 ← phi( doplasma/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@1/(byte) doplasma::i#1 ) + [21] (byte) doplasma::c1b#2 ← phi( doplasma/(byte) doplasma::c1b#0 doplasma::@1/(byte) doplasma::c1b#1 ) + [21] (byte) doplasma::c1a#2 ← phi( doplasma/(byte) doplasma::c1a#0 doplasma::@1/(byte) doplasma::c1a#1 ) + [22] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2) + [23] *((const byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$0 + [24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 + [25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 + [26] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 + [27] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@1 + to:doplasma::@2 +doplasma::@2: scope:[doplasma] from doplasma::@1 + [28] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3 + [29] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5 + [30] (byte) doplasma::c2a#0 ← (byte) c2A#1 + [31] (byte) doplasma::c2b#0 ← (byte) c2B#1 + to:doplasma::@3 +doplasma::@3: scope:[doplasma] from doplasma::@2 doplasma::@3 + [32] (byte) doplasma::i1#2 ← phi( doplasma::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@3/(byte) doplasma::i1#1 ) + [32] (byte) doplasma::c2b#2 ← phi( doplasma::@2/(byte) doplasma::c2b#0 doplasma::@3/(byte) doplasma::c2b#1 ) + [32] (byte) doplasma::c2a#2 ← phi( doplasma::@2/(byte) doplasma::c2a#0 doplasma::@3/(byte) doplasma::c2a#1 ) + [33] (byte~) doplasma::$2 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2) + [34] *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$2 + [35] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 + [36] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 + [37] (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2 + [38] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3 + to:doplasma::@4 +doplasma::@4: scope:[doplasma] from doplasma::@3 + [39] (byte) c2A#3 ← (byte) c2A#1 + (byte/signed byte/word/signed word/dword/signed dword) 2 + [40] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3 + to:doplasma::@5 +doplasma::@5: scope:[doplasma] from doplasma::@4 doplasma::@7 + [41] (byte) doplasma::i2#4 ← phi( doplasma::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@7/(byte) doplasma::i2#1 ) + to:doplasma::@6 +doplasma::@6: scope:[doplasma] from doplasma::@5 + [42] (byte~) doplasma::$6 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0) + [43] *((const byte*) SCREEN1#0 + (byte) doplasma::i2#4) ← (byte~) doplasma::$6 + to:doplasma::@6_1 +doplasma::@6_1: scope:[doplasma] from doplasma::@6 + [44] (byte~) doplasma::$11 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1) + [45] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$11 + to:doplasma::@6_2 +doplasma::@6_2: scope:[doplasma] from doplasma::@6_1 + [46] (byte~) doplasma::$14 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + [47] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$14 + to:doplasma::@6_3 +doplasma::@6_3: scope:[doplasma] from doplasma::@6_2 + [48] (byte~) doplasma::$17 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3) + [49] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 3*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$17 + to:doplasma::@6_4 +doplasma::@6_4: scope:[doplasma] from doplasma::@6_3 + [50] (byte~) doplasma::$20 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4) + [51] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$20 + to:doplasma::@6_5 +doplasma::@6_5: scope:[doplasma] from doplasma::@6_4 + [52] (byte~) doplasma::$23 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5) + [53] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 5*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$23 + to:doplasma::@6_6 +doplasma::@6_6: scope:[doplasma] from doplasma::@6_5 + [54] (byte~) doplasma::$26 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6) + [55] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 6*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$26 + to:doplasma::@6_7 +doplasma::@6_7: scope:[doplasma] from doplasma::@6_6 + [56] (byte~) doplasma::$29 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7) + [57] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 7*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$29 + to:doplasma::@6_8 +doplasma::@6_8: scope:[doplasma] from doplasma::@6_7 + [58] (byte~) doplasma::$32 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8) + [59] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 8*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$32 + to:doplasma::@6_9 +doplasma::@6_9: scope:[doplasma] from doplasma::@6_8 + [60] (byte~) doplasma::$35 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9) + [61] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 9*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$35 + to:doplasma::@6_10 +doplasma::@6_10: scope:[doplasma] from doplasma::@6_9 + [62] (byte~) doplasma::$38 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a) + [63] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $a*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$38 + to:doplasma::@6_11 +doplasma::@6_11: scope:[doplasma] from doplasma::@6_10 + [64] (byte~) doplasma::$41 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b) + [65] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $b*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$41 + to:doplasma::@6_12 +doplasma::@6_12: scope:[doplasma] from doplasma::@6_11 + [66] (byte~) doplasma::$44 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c) + [67] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $c*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$44 + to:doplasma::@6_13 +doplasma::@6_13: scope:[doplasma] from doplasma::@6_12 + [68] (byte~) doplasma::$47 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d) + [69] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $d*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$47 + to:doplasma::@6_14 +doplasma::@6_14: scope:[doplasma] from doplasma::@6_13 + [70] (byte~) doplasma::$50 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e) + [71] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $e*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$50 + to:doplasma::@6_15 +doplasma::@6_15: scope:[doplasma] from doplasma::@6_14 + [72] (byte~) doplasma::$53 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f) + [73] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $f*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$53 + to:doplasma::@6_16 +doplasma::@6_16: scope:[doplasma] from doplasma::@6_15 + [74] (byte~) doplasma::$56 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10) + [75] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $10*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$56 + to:doplasma::@6_17 +doplasma::@6_17: scope:[doplasma] from doplasma::@6_16 + [76] (byte~) doplasma::$59 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11) + [77] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $11*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$59 + to:doplasma::@6_18 +doplasma::@6_18: scope:[doplasma] from doplasma::@6_17 + [78] (byte~) doplasma::$62 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12) + [79] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $12*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$62 + to:doplasma::@6_19 +doplasma::@6_19: scope:[doplasma] from doplasma::@6_18 + [80] (byte~) doplasma::$65 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13) + [81] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $13*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$65 + to:doplasma::@6_20 +doplasma::@6_20: scope:[doplasma] from doplasma::@6_19 + [82] (byte~) doplasma::$68 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14) + [83] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $14*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$68 + to:doplasma::@6_21 +doplasma::@6_21: scope:[doplasma] from doplasma::@6_20 + [84] (byte~) doplasma::$71 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15) + [85] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $15*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$71 + to:doplasma::@6_22 +doplasma::@6_22: scope:[doplasma] from doplasma::@6_21 + [86] (byte~) doplasma::$74 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16) + [87] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $16*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$74 + to:doplasma::@6_23 +doplasma::@6_23: scope:[doplasma] from doplasma::@6_22 + [88] (byte~) doplasma::$77 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17) + [89] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $17*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$77 + to:doplasma::@6_24 +doplasma::@6_24: scope:[doplasma] from doplasma::@6_23 + [90] (byte~) doplasma::$80 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18) + [91] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$80 + to:doplasma::@7 +doplasma::@7: scope:[doplasma] from doplasma::@6_24 + [92] (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#4 + [93] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5 + to:doplasma::@return +doplasma::@return: scope:[doplasma] from doplasma::@7 + [94] return + to:@return +makecharset: scope:[makecharset] from main::@2 + [95] phi() + [96] call sid_rnd_init + to:makecharset::@10 +makecharset::@10: scope:[makecharset] from makecharset + [97] phi() + [98] call print_cls + to:makecharset::@1 +makecharset::@1: scope:[makecharset] from makecharset::@10 makecharset::@9 + [99] (byte*) print_char_cursor#45 ← phi( makecharset::@10/(const byte*) print_line_cursor#0 makecharset::@9/(byte*) print_char_cursor#18 ) + [99] (word) makecharset::c#2 ← phi( makecharset::@10/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@9/(word) makecharset::c#1 ) + [100] (byte~) makecharset::$2 ← < (word) makecharset::c#2 + [101] (byte) makecharset::s#0 ← *((const byte*) SINTABLE#0 + (byte~) makecharset::$2) + to:makecharset::@2 +makecharset::@2: scope:[makecharset] from makecharset::@1 makecharset::@6 + [102] (byte) makecharset::i#7 ← phi( makecharset::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@6/(byte) makecharset::i#1 ) + to:makecharset::@3 +makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@4 + [103] (byte) makecharset::b#2 ← phi( makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@4/(byte) makecharset::b#3 ) + [103] (byte) makecharset::ii#2 ← phi( makecharset::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 makecharset::@4/(byte) makecharset::ii#1 ) + [104] call sid_rnd + [105] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + to:makecharset::@11 +makecharset::@11: scope:[makecharset] from makecharset::@3 + [106] (byte~) makecharset::$3 ← (byte) sid_rnd::return#2 + [107] (byte~) makecharset::$4 ← (byte~) makecharset::$3 & (byte/word/signed word/dword/signed dword) $ff + [108] if((byte~) makecharset::$4<=(byte) makecharset::s#0) goto makecharset::@4 + to:makecharset::@5 +makecharset::@5: scope:[makecharset] from makecharset::@11 + [109] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#2) + to:makecharset::@4 +makecharset::@4: scope:[makecharset] from makecharset::@11 makecharset::@5 + [110] (byte) makecharset::b#3 ← phi( makecharset::@11/(byte) makecharset::b#2 makecharset::@5/(byte) makecharset::b#1 ) + [111] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 + [112] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@3 + to:makecharset::@6 +makecharset::@6: scope:[makecharset] from makecharset::@4 + [113] (word~) makecharset::$8 ← (word) makecharset::c#2 << (byte/signed byte/word/signed word/dword/signed dword) 3 + [114] (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#7 + [115] *((const byte*) CHARSET#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3 + [116] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#7 + [117] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 + to:makecharset::@7 +makecharset::@7: scope:[makecharset] from makecharset::@6 + [118] (byte/word~) makecharset::$11 ← (word) makecharset::c#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 + [119] if((byte/word~) makecharset::$11!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto makecharset::@9 + to:makecharset::@8 +makecharset::@8: scope:[makecharset] from makecharset::@7 + [120] phi() + [121] call print_char + to:makecharset::@9 +makecharset::@9: scope:[makecharset] from makecharset::@7 makecharset::@8 + [122] (byte*) print_char_cursor#18 ← phi( makecharset::@8/(byte*) print_char_cursor#1 makecharset::@7/(byte*) print_char_cursor#45 ) + [123] (word) makecharset::c#1 ← ++ (word) makecharset::c#2 + [124] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 + to:makecharset::@return +makecharset::@return: scope:[makecharset] from makecharset::@9 + [125] return + to:@return +print_char: scope:[print_char] from makecharset::@8 + [126] *((byte*) print_char_cursor#45) ← (const byte) print_char::ch#0 + [127] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#45 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [128] return + to:@return +sid_rnd: scope:[sid_rnd] from makecharset::@3 + [129] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) + to:sid_rnd::@return +sid_rnd::@return: scope:[sid_rnd] from sid_rnd + [130] return + to:@return +print_cls: scope:[print_cls] from makecharset::@10 + [131] phi() + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + [132] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) print_line_cursor#0 print_cls::@1/(byte*) print_cls::sc#1 ) + [133] *((byte*) print_cls::sc#2) ← (byte) ' ' + [134] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + [135] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [136] return + to:@return +sid_rnd_init: scope:[sid_rnd_init] from makecharset + [137] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff + [138] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 + to:sid_rnd_init::@return +sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init + [139] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(byte*) BGCOL +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(byte) BLUE +(byte*) BORDERCOL +(byte) BROWN +(byte*) CHARGEN +(byte*) CHARSET +(byte*) CIA1_INTERRUPT +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B_DDR +(byte*) CIA2_INTERRUPT +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B_DDR +(byte) CIA_INTERRUPT_CLEAR +(byte*) COLS +(byte) CYAN +(byte*) D011 +(byte*) D016 +(byte*) D018 +(byte) DARK_GREY +(byte) GREEN +(byte) GREY +(void()**) HARDWARE_IRQ +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_SPRITE +(byte*) IRQ_ENABLE +(byte) IRQ_LIGHTPEN +(byte) IRQ_RASTER +(byte*) IRQ_STATUS +(void()**) KERNEL_IRQ +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_Y +(byte) LIGHT_BLUE +(byte) LIGHT_GREEN +(byte) LIGHT_GREY +(byte) ORANGE +(byte) PINK +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte) PURPLE +(byte*) RASTER +(byte) RED +(byte*) SCREEN1 +(byte) SID_CONTROL_GATE +(byte) SID_CONTROL_NOISE +(byte) SID_CONTROL_PULSE +(byte) SID_CONTROL_RING +(byte) SID_CONTROL_SAWTOOTH +(byte) SID_CONTROL_SYNC +(byte) SID_CONTROL_TEST +(byte) SID_CONTROL_TRIANGLE +(byte*) SID_VOICE3_CONTROL +(word*) SID_VOICE3_FREQ +(byte*) SID_VOICE3_FREQ_HIGH +(byte*) SID_VOICE3_FREQ_LOW +(byte*) SID_VOICE3_OSC +(byte*) SINTABLE +(byte*) SPRITES_COLS +(byte*) SPRITES_ENABLE +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_MC +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC2 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_XMSB +(byte*) SPRITES_XPOS +(byte*) SPRITES_YPOS +(word) SPRITE_PTRS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(byte) VIC_RST8 +(byte) WHITE +(byte) YELLOW +(byte) c1A +(byte) c1A#1 1.3636363636363638 +(byte) c1A#3 0.1911764705882353 +(byte) c1B +(byte) c1B#1 1.25 +(byte) c1B#3 0.19402985074626866 +(byte) c2A +(byte) c2A#1 0.6818181818181819 +(byte) c2A#3 0.22807017543859648 +(byte) c2B +(byte) c2B#1 0.6521739130434783 +(byte) c2B#3 0.23214285714285715 +(void()) doplasma((byte*) doplasma::screen) +(byte~) doplasma::$0 202.0 +(byte~) doplasma::$11 202.0 +(byte~) doplasma::$14 202.0 +(byte~) doplasma::$17 202.0 +(byte~) doplasma::$2 202.0 +(byte~) doplasma::$20 202.0 +(byte~) doplasma::$23 202.0 +(byte~) doplasma::$26 202.0 +(byte~) doplasma::$29 202.0 +(byte~) doplasma::$32 202.0 +(byte~) doplasma::$35 202.0 +(byte~) doplasma::$38 202.0 +(byte~) doplasma::$41 202.0 +(byte~) doplasma::$44 202.0 +(byte~) doplasma::$47 202.0 +(byte~) doplasma::$50 202.0 +(byte~) doplasma::$53 202.0 +(byte~) doplasma::$56 202.0 +(byte~) doplasma::$59 202.0 +(byte~) doplasma::$6 202.0 +(byte~) doplasma::$62 202.0 +(byte~) doplasma::$65 202.0 +(byte~) doplasma::$68 202.0 +(byte~) doplasma::$71 202.0 +(byte~) doplasma::$74 202.0 +(byte~) doplasma::$77 202.0 +(byte~) doplasma::$80 202.0 +(byte) doplasma::c1a +(byte) doplasma::c1a#0 2.0 +(byte) doplasma::c1a#1 50.5 +(byte) doplasma::c1a#2 101.66666666666666 +(byte) doplasma::c1b +(byte) doplasma::c1b#0 4.0 +(byte) doplasma::c1b#1 67.33333333333333 +(byte) doplasma::c1b#2 76.25 +(byte) doplasma::c2a +(byte) doplasma::c2a#0 2.0 +(byte) doplasma::c2a#1 50.5 +(byte) doplasma::c2a#2 101.66666666666666 +(byte) doplasma::c2b +(byte) doplasma::c2b#0 4.0 +(byte) doplasma::c2b#1 67.33333333333333 +(byte) doplasma::c2b#2 76.25 +(byte) doplasma::i +(byte) doplasma::i#1 151.5 +(byte) doplasma::i#2 60.599999999999994 +(byte) doplasma::i1 +(byte) doplasma::i1#1 151.5 +(byte) doplasma::i1#2 60.599999999999994 +(byte) doplasma::i2 +(byte) doplasma::i2#1 151.5 +(byte) doplasma::i2#4 102.98039215686288 +(byte) doplasma::ii +(byte*) doplasma::screen +(byte[$28]) doplasma::xbuf +(byte[$19]) doplasma::ybuf +(void()) main() +(byte*) main::col +(byte*) main::col#1 16.5 +(byte*) main::col#2 16.5 +(word~) main::toD0181_$0 +(word~) main::toD0181_$1 +(word~) main::toD0181_$2 +(byte~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(byte~) main::toD0181_$6 +(byte~) main::toD0181_$7 +(byte~) main::toD0181_$8 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(byte*) main::toD0181_screen +(void()) makecharset((byte*) makecharset::charset) +(byte/word~) makecharset::$11 22.0 +(byte~) makecharset::$2 22.0 +(byte~) makecharset::$3 2002.0 +(byte~) makecharset::$4 2002.0 +(word~) makecharset::$8 202.0 +(word~) makecharset::$9 202.0 +(byte) makecharset::b +(byte) makecharset::b#1 2002.0 +(byte) makecharset::b#2 500.5 +(byte) makecharset::b#3 620.8 +(byte[8]) makecharset::bittab +(word) makecharset::c +(word) makecharset::c#1 16.5 +(word) makecharset::c#2 6.041666666666666 +(byte*) makecharset::charset +(byte) makecharset::i +(byte) makecharset::i#1 151.5 +(byte) makecharset::i#7 21.642857142857142 +(byte) makecharset::ii +(byte) makecharset::ii#1 1501.5 +(byte) makecharset::ii#2 375.375 +(byte) makecharset::s +(byte) makecharset::s#0 59.529411764705884 +(void()) print_char((byte) print_char::ch) +(byte) print_char::ch +(byte*) print_char_cursor +(byte*) print_char_cursor#1 4.333333333333333 +(byte*) print_char_cursor#18 11.0 +(byte*) print_char_cursor#45 1.1304347826086956 +(void()) print_cls() +(byte*) print_cls::sc +(byte*) print_cls::sc#1 16.5 +(byte*) print_cls::sc#2 16.5 +(byte[]) print_hextab +(byte*) print_line_cursor +(byte*) print_screen +(byte()) sid_rnd() +(byte) sid_rnd::return +(byte) sid_rnd::return#0 334.33333333333337 +(byte) sid_rnd::return#2 2002.0 +(void()) sid_rnd_init() + +Initial phi equivalence classes +[ main::col#2 main::col#1 ] +[ c1A#1 c1A#3 ] +[ c1B#1 c1B#3 ] +[ c2A#1 c2A#3 ] +[ c2B#1 c2B#3 ] +[ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] +[ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] +[ doplasma::i#2 doplasma::i#1 ] +[ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +[ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +[ doplasma::i1#2 doplasma::i1#1 ] +[ doplasma::i2#4 doplasma::i2#1 ] +[ makecharset::c#2 makecharset::c#1 ] +[ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] +[ makecharset::i#7 makecharset::i#1 ] +[ makecharset::ii#2 makecharset::ii#1 ] +[ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] +[ print_cls::sc#2 print_cls::sc#1 ] +Added variable doplasma::$0 to zero page equivalence class [ doplasma::$0 ] +Added variable doplasma::$2 to zero page equivalence class [ doplasma::$2 ] +Added variable doplasma::$6 to zero page equivalence class [ doplasma::$6 ] +Added variable doplasma::$11 to zero page equivalence class [ doplasma::$11 ] +Added variable doplasma::$14 to zero page equivalence class [ doplasma::$14 ] +Added variable doplasma::$17 to zero page equivalence class [ doplasma::$17 ] +Added variable doplasma::$20 to zero page equivalence class [ doplasma::$20 ] +Added variable doplasma::$23 to zero page equivalence class [ doplasma::$23 ] +Added variable doplasma::$26 to zero page equivalence class [ doplasma::$26 ] +Added variable doplasma::$29 to zero page equivalence class [ doplasma::$29 ] +Added variable doplasma::$32 to zero page equivalence class [ doplasma::$32 ] +Added variable doplasma::$35 to zero page equivalence class [ doplasma::$35 ] +Added variable doplasma::$38 to zero page equivalence class [ doplasma::$38 ] +Added variable doplasma::$41 to zero page equivalence class [ doplasma::$41 ] +Added variable doplasma::$44 to zero page equivalence class [ doplasma::$44 ] +Added variable doplasma::$47 to zero page equivalence class [ doplasma::$47 ] +Added variable doplasma::$50 to zero page equivalence class [ doplasma::$50 ] +Added variable doplasma::$53 to zero page equivalence class [ doplasma::$53 ] +Added variable doplasma::$56 to zero page equivalence class [ doplasma::$56 ] +Added variable doplasma::$59 to zero page equivalence class [ doplasma::$59 ] +Added variable doplasma::$62 to zero page equivalence class [ doplasma::$62 ] +Added variable doplasma::$65 to zero page equivalence class [ doplasma::$65 ] +Added variable doplasma::$68 to zero page equivalence class [ doplasma::$68 ] +Added variable doplasma::$71 to zero page equivalence class [ doplasma::$71 ] +Added variable doplasma::$74 to zero page equivalence class [ doplasma::$74 ] +Added variable doplasma::$77 to zero page equivalence class [ doplasma::$77 ] +Added variable doplasma::$80 to zero page equivalence class [ doplasma::$80 ] +Added variable makecharset::$2 to zero page equivalence class [ makecharset::$2 ] +Added variable makecharset::s#0 to zero page equivalence class [ makecharset::s#0 ] +Added variable sid_rnd::return#2 to zero page equivalence class [ sid_rnd::return#2 ] +Added variable makecharset::$3 to zero page equivalence class [ makecharset::$3 ] +Added variable makecharset::$4 to zero page equivalence class [ makecharset::$4 ] +Added variable makecharset::$8 to zero page equivalence class [ makecharset::$8 ] +Added variable makecharset::$9 to zero page equivalence class [ makecharset::$9 ] +Added variable makecharset::$11 to zero page equivalence class [ makecharset::$11 ] +Added variable sid_rnd::return#0 to zero page equivalence class [ sid_rnd::return#0 ] +Complete equivalence classes +[ main::col#2 main::col#1 ] +[ c1A#1 c1A#3 ] +[ c1B#1 c1B#3 ] +[ c2A#1 c2A#3 ] +[ c2B#1 c2B#3 ] +[ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] +[ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] +[ doplasma::i#2 doplasma::i#1 ] +[ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +[ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +[ doplasma::i1#2 doplasma::i1#1 ] +[ doplasma::i2#4 doplasma::i2#1 ] +[ makecharset::c#2 makecharset::c#1 ] +[ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] +[ makecharset::i#7 makecharset::i#1 ] +[ makecharset::ii#2 makecharset::ii#1 ] +[ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] +[ print_cls::sc#2 print_cls::sc#1 ] +[ doplasma::$0 ] +[ doplasma::$2 ] +[ doplasma::$6 ] +[ doplasma::$11 ] +[ doplasma::$14 ] +[ doplasma::$17 ] +[ doplasma::$20 ] +[ doplasma::$23 ] +[ doplasma::$26 ] +[ doplasma::$29 ] +[ doplasma::$32 ] +[ doplasma::$35 ] +[ doplasma::$38 ] +[ doplasma::$41 ] +[ doplasma::$44 ] +[ doplasma::$47 ] +[ doplasma::$50 ] +[ doplasma::$53 ] +[ doplasma::$56 ] +[ doplasma::$59 ] +[ doplasma::$62 ] +[ doplasma::$65 ] +[ doplasma::$68 ] +[ doplasma::$71 ] +[ doplasma::$74 ] +[ doplasma::$77 ] +[ doplasma::$80 ] +[ makecharset::$2 ] +[ makecharset::s#0 ] +[ sid_rnd::return#2 ] +[ makecharset::$3 ] +[ makecharset::$4 ] +[ makecharset::$8 ] +[ makecharset::$9 ] +[ makecharset::$11 ] +[ sid_rnd::return#0 ] +Allocated zp ZP_WORD:2 [ main::col#2 main::col#1 ] +Allocated zp ZP_BYTE:4 [ c1A#1 c1A#3 ] +Allocated zp ZP_BYTE:5 [ c1B#1 c1B#3 ] +Allocated zp ZP_BYTE:6 [ c2A#1 c2A#3 ] +Allocated zp ZP_BYTE:7 [ c2B#1 c2B#3 ] +Allocated zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] +Allocated zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] +Allocated zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 ] +Allocated zp ZP_BYTE:11 [ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +Allocated zp ZP_BYTE:12 [ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +Allocated zp ZP_BYTE:13 [ doplasma::i1#2 doplasma::i1#1 ] +Allocated zp ZP_BYTE:14 [ doplasma::i2#4 doplasma::i2#1 ] +Allocated zp ZP_WORD:15 [ makecharset::c#2 makecharset::c#1 ] +Allocated zp ZP_WORD:17 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] +Allocated zp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] +Allocated zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] +Allocated zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] +Allocated zp ZP_WORD:22 [ print_cls::sc#2 print_cls::sc#1 ] +Allocated zp ZP_BYTE:24 [ doplasma::$0 ] +Allocated zp ZP_BYTE:25 [ doplasma::$2 ] +Allocated zp ZP_BYTE:26 [ doplasma::$6 ] +Allocated zp ZP_BYTE:27 [ doplasma::$11 ] +Allocated zp ZP_BYTE:28 [ doplasma::$14 ] +Allocated zp ZP_BYTE:29 [ doplasma::$17 ] +Allocated zp ZP_BYTE:30 [ doplasma::$20 ] +Allocated zp ZP_BYTE:31 [ doplasma::$23 ] +Allocated zp ZP_BYTE:32 [ doplasma::$26 ] +Allocated zp ZP_BYTE:33 [ doplasma::$29 ] +Allocated zp ZP_BYTE:34 [ doplasma::$32 ] +Allocated zp ZP_BYTE:35 [ doplasma::$35 ] +Allocated zp ZP_BYTE:36 [ doplasma::$38 ] +Allocated zp ZP_BYTE:37 [ doplasma::$41 ] +Allocated zp ZP_BYTE:38 [ doplasma::$44 ] +Allocated zp ZP_BYTE:39 [ doplasma::$47 ] +Allocated zp ZP_BYTE:40 [ doplasma::$50 ] +Allocated zp ZP_BYTE:41 [ doplasma::$53 ] +Allocated zp ZP_BYTE:42 [ doplasma::$56 ] +Allocated zp ZP_BYTE:43 [ doplasma::$59 ] +Allocated zp ZP_BYTE:44 [ doplasma::$62 ] +Allocated zp ZP_BYTE:45 [ doplasma::$65 ] +Allocated zp ZP_BYTE:46 [ doplasma::$68 ] +Allocated zp ZP_BYTE:47 [ doplasma::$71 ] +Allocated zp ZP_BYTE:48 [ doplasma::$74 ] +Allocated zp ZP_BYTE:49 [ doplasma::$77 ] +Allocated zp ZP_BYTE:50 [ doplasma::$80 ] +Allocated zp ZP_BYTE:51 [ makecharset::$2 ] +Allocated zp ZP_BYTE:52 [ makecharset::s#0 ] +Allocated zp ZP_BYTE:53 [ sid_rnd::return#2 ] +Allocated zp ZP_BYTE:54 [ makecharset::$3 ] +Allocated zp ZP_BYTE:55 [ makecharset::$4 ] +Allocated zp ZP_WORD:56 [ makecharset::$8 ] +Allocated zp ZP_WORD:58 [ makecharset::$9 ] +Allocated zp ZP_BYTE:60 [ makecharset::$11 ] +Allocated zp ZP_BYTE:61 [ sid_rnd::return#0 ] + +INITIAL ASM +//SEG0 File Comments +// A KickC version of the plasma routine from the CC65 samples +// This version has an unrolled inner loop to reach ~50FPS +// (w)2001 by groepaz/hitmen +// Cleanup and porting to CC65 by Ullrich von Bassewitz. +// Ported to KickC by Jesper Gravgaard. +// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + .const BLUE = 6 + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + .label SCREEN1 = $2800 + .label CHARSET = $2000 + .label SINTABLE = $1f00 + .label print_char_cursor = $11 + .label c1A = 4 + .label c1B = 5 + .label c2A = 6 + .label c2B = 7 +//SEG3 @begin +bbegin: + jmp b1 +//SEG4 @1 +b1: +//SEG5 kickasm(location (const byte*) SINTABLE#0) {{ .for(var i=0;i<$100;i++) .byte round(127.5+127.5*sin(toRadians(360*i/256))) }} +//SEG6 [2] phi from @1 to @2 [phi:@1->@2] +b2_from_b1: + jmp b2 +//SEG7 @2 +b2: +//SEG8 [3] call main + jsr main +//SEG9 [4] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG10 @end +bend: +//SEG11 main +main: { + .const toD0181_return = (>(SCREEN1&$3fff)<<2)|(>CHARSET)>>2&$f + .label col = 2 + //SEG12 asm { sei } + sei + //SEG13 [6] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + lda #BLUE + sta BORDERCOL + //SEG14 [7] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + lda #BLUE + sta BGCOL + //SEG15 [8] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG16 [8] phi (byte*) main::col#2 = (const byte*) COLS#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #COLS + sta col+1 + jmp b1 + //SEG17 [8] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG18 [8] phi (byte*) main::col#2 = (byte*) main::col#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG19 main::@1 + b1: + //SEG20 [9] *((byte*) main::col#2) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + lda #BLACK + ldy #0 + sta (col),y + //SEG21 [10] (byte*) main::col#1 ← ++ (byte*) main::col#2 -- pbuz1=_inc_pbuz1 + inc col + bne !+ + inc col+1 + !: + //SEG22 [11] if((byte*) main::col#1!=(byte*)(const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 + lda col+1 + cmp #>COLS+$3e8+1 + bne b1_from_b1 + lda col + cmp #main::@2] + b2_from_b1: + jmp b2 + //SEG24 main::@2 + b2: + //SEG25 [13] call makecharset + //SEG26 [95] phi from main::@2 to makecharset [phi:main::@2->makecharset] + makecharset_from_b2: + jsr makecharset + //SEG27 [14] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181] + toD0181_from_b2: + jmp toD0181 + //SEG28 main::toD0181 + toD0181: + jmp b5 + //SEG29 main::@5 + b5: + //SEG30 [15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG31 [16] phi from main::@5 to main::@3 [phi:main::@5->main::@3] + b3_from_b5: + //SEG32 [16] phi (byte) c2B#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#0] -- vbuz1=vbuc1 + lda #0 + sta c2B + //SEG33 [16] phi (byte) c2A#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#1] -- vbuz1=vbuc1 + lda #0 + sta c2A + //SEG34 [16] phi (byte) c1B#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#2] -- vbuz1=vbuc1 + lda #0 + sta c1B + //SEG35 [16] phi (byte) c1A#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#3] -- vbuz1=vbuc1 + lda #0 + sta c1A + jmp b3 + //SEG36 main::@3 + b3: + //SEG37 [17] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + b4_from_b3: + jmp b4 + //SEG38 main::@4 + b4: + //SEG39 [18] call doplasma + jsr doplasma + //SEG40 [16] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + b3_from_b4: + //SEG41 [16] phi (byte) c2B#1 = (byte) c2B#3 [phi:main::@4->main::@3#0] -- register_copy + //SEG42 [16] phi (byte) c2A#1 = (byte) c2A#3 [phi:main::@4->main::@3#1] -- register_copy + //SEG43 [16] phi (byte) c1B#1 = (byte) c1B#3 [phi:main::@4->main::@3#2] -- register_copy + //SEG44 [16] phi (byte) c1A#1 = (byte) c1A#3 [phi:main::@4->main::@3#3] -- register_copy + jmp b3 +} +//SEG45 doplasma +// Render plasma to the passed screen +doplasma: { + .label _0 = $18 + .label _2 = $19 + .label _6 = $1a + .label c1a = 8 + .label c1b = 9 + .label i = $a + .label c2a = $b + .label c2b = $c + .label i1 = $d + .label i2 = $e + .label _11 = $1b + .label _14 = $1c + .label _17 = $1d + .label _20 = $1e + .label _23 = $1f + .label _26 = $20 + .label _29 = $21 + .label _32 = $22 + .label _35 = $23 + .label _38 = $24 + .label _41 = $25 + .label _44 = $26 + .label _47 = $27 + .label _50 = $28 + .label _53 = $29 + .label _56 = $2a + .label _59 = $2b + .label _62 = $2c + .label _65 = $2d + .label _68 = $2e + .label _71 = $2f + .label _74 = $30 + .label _77 = $31 + .label _80 = $32 + //SEG46 [19] (byte) doplasma::c1a#0 ← (byte) c1A#1 -- vbuz1=vbuz2 + lda c1A + sta c1a + //SEG47 [20] (byte) doplasma::c1b#0 ← (byte) c1B#1 -- vbuz1=vbuz2 + lda c1B + sta c1b + //SEG48 [21] phi from doplasma to doplasma::@1 [phi:doplasma->doplasma::@1] + b1_from_doplasma: + //SEG49 [21] phi (byte) doplasma::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma->doplasma::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG50 [21] phi (byte) doplasma::c1b#2 = (byte) doplasma::c1b#0 [phi:doplasma->doplasma::@1#1] -- register_copy + //SEG51 [21] phi (byte) doplasma::c1a#2 = (byte) doplasma::c1a#0 [phi:doplasma->doplasma::@1#2] -- register_copy + jmp b1 + //SEG52 [21] phi from doplasma::@1 to doplasma::@1 [phi:doplasma::@1->doplasma::@1] + b1_from_b1: + //SEG53 [21] phi (byte) doplasma::i#2 = (byte) doplasma::i#1 [phi:doplasma::@1->doplasma::@1#0] -- register_copy + //SEG54 [21] phi (byte) doplasma::c1b#2 = (byte) doplasma::c1b#1 [phi:doplasma::@1->doplasma::@1#1] -- register_copy + //SEG55 [21] phi (byte) doplasma::c1a#2 = (byte) doplasma::c1a#1 [phi:doplasma::@1->doplasma::@1#2] -- register_copy + jmp b1 + //SEG56 doplasma::@1 + b1: + //SEG57 [22] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2) -- vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc1_derefidx_vbuz3 + ldy c1a + lda SINTABLE,y + ldy c1b + clc + adc SINTABLE,y + sta _0 + //SEG58 [23] *((const byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$0 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _0 + ldy i + sta ybuf,y + //SEG59 [24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz1_plus_vbuc1 + lax c1a + axs #-[4] + stx c1a + //SEG60 [25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 -- vbuz1=vbuz1_plus_vbuc1 + lax c1b + axs #-[9] + stx c1b + //SEG61 [26] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG62 [27] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@1 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$19 + bcc b1_from_b1 + jmp b2 + //SEG63 doplasma::@2 + b2: + //SEG64 [28] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 + lax c1A + axs #-[3] + stx c1A + //SEG65 [29] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5 -- vbuz1=vbuz1_minus_vbuc1 + lax c1B + axs #5 + stx c1B + //SEG66 [30] (byte) doplasma::c2a#0 ← (byte) c2A#1 -- vbuz1=vbuz2 + lda c2A + sta c2a + //SEG67 [31] (byte) doplasma::c2b#0 ← (byte) c2B#1 -- vbuz1=vbuz2 + lda c2B + sta c2b + //SEG68 [32] phi from doplasma::@2 to doplasma::@3 [phi:doplasma::@2->doplasma::@3] + b3_from_b2: + //SEG69 [32] phi (byte) doplasma::i1#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma::@2->doplasma::@3#0] -- vbuz1=vbuc1 + lda #0 + sta i1 + //SEG70 [32] phi (byte) doplasma::c2b#2 = (byte) doplasma::c2b#0 [phi:doplasma::@2->doplasma::@3#1] -- register_copy + //SEG71 [32] phi (byte) doplasma::c2a#2 = (byte) doplasma::c2a#0 [phi:doplasma::@2->doplasma::@3#2] -- register_copy + jmp b3 + //SEG72 [32] phi from doplasma::@3 to doplasma::@3 [phi:doplasma::@3->doplasma::@3] + b3_from_b3: + //SEG73 [32] phi (byte) doplasma::i1#2 = (byte) doplasma::i1#1 [phi:doplasma::@3->doplasma::@3#0] -- register_copy + //SEG74 [32] phi (byte) doplasma::c2b#2 = (byte) doplasma::c2b#1 [phi:doplasma::@3->doplasma::@3#1] -- register_copy + //SEG75 [32] phi (byte) doplasma::c2a#2 = (byte) doplasma::c2a#1 [phi:doplasma::@3->doplasma::@3#2] -- register_copy + jmp b3 + //SEG76 doplasma::@3 + b3: + //SEG77 [33] (byte~) doplasma::$2 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2) -- vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc1_derefidx_vbuz3 + ldy c2a + lda SINTABLE,y + ldy c2b + clc + adc SINTABLE,y + sta _2 + //SEG78 [34] *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$2 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _2 + ldy i1 + sta xbuf,y + //SEG79 [35] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 + lax c2a + axs #-[3] + stx c2a + //SEG80 [36] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz1_plus_vbuc1 + lax c2b + axs #-[7] + stx c2b + //SEG81 [37] (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2 -- vbuz1=_inc_vbuz1 + inc i1 + //SEG82 [38] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3 -- vbuz1_lt_vbuc1_then_la1 + lda i1 + cmp #$28 + bcc b3_from_b3 + jmp b4 + //SEG83 doplasma::@4 + b4: + //SEG84 [39] (byte) c2A#3 ← (byte) c2A#1 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuz1=vbuz1_plus_2 + lda c2A + clc + adc #2 + sta c2A + //SEG85 [40] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_minus_vbuc1 + lax c2B + axs #3 + stx c2B + //SEG86 [41] phi from doplasma::@4 to doplasma::@5 [phi:doplasma::@4->doplasma::@5] + b5_from_b4: + //SEG87 [41] phi (byte) doplasma::i2#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma::@4->doplasma::@5#0] -- vbuz1=vbuc1 + lda #0 + sta i2 + jmp b5 + //SEG88 [41] phi from doplasma::@7 to doplasma::@5 [phi:doplasma::@7->doplasma::@5] + b5_from_b7: + //SEG89 [41] phi (byte) doplasma::i2#4 = (byte) doplasma::i2#1 [phi:doplasma::@7->doplasma::@5#0] -- register_copy + jmp b5 + //SEG90 doplasma::@5 + b5: + jmp b6 + //SEG91 doplasma::@6 + b6: + //SEG92 [42] (byte~) doplasma::$6 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf + sta _6 + //SEG93 [43] *((const byte*) SCREEN1#0 + (byte) doplasma::i2#4) ← (byte~) doplasma::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _6 + ldy i2 + sta SCREEN1,y + jmp b6_1 + //SEG94 doplasma::@6_1 + b6_1: + //SEG95 [44] (byte~) doplasma::$11 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+1 + sta _11 + //SEG96 [45] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$11 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _11 + ldy i2 + sta SCREEN1+1*$28,y + jmp b6_2 + //SEG97 doplasma::@6_2 + b6_2: + //SEG98 [46] (byte~) doplasma::$14 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+2 + sta _14 + //SEG99 [47] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$14 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _14 + ldy i2 + sta SCREEN1+2*$28,y + jmp b6_3 + //SEG100 doplasma::@6_3 + b6_3: + //SEG101 [48] (byte~) doplasma::$17 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+3 + sta _17 + //SEG102 [49] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 3*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$17 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _17 + ldy i2 + sta SCREEN1+3*$28,y + jmp b6_4 + //SEG103 doplasma::@6_4 + b6_4: + //SEG104 [50] (byte~) doplasma::$20 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+4 + sta _20 + //SEG105 [51] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$20 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _20 + ldy i2 + sta SCREEN1+4*$28,y + jmp b6_5 + //SEG106 doplasma::@6_5 + b6_5: + //SEG107 [52] (byte~) doplasma::$23 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+5 + sta _23 + //SEG108 [53] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 5*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$23 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _23 + ldy i2 + sta SCREEN1+5*$28,y + jmp b6_6 + //SEG109 doplasma::@6_6 + b6_6: + //SEG110 [54] (byte~) doplasma::$26 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+6 + sta _26 + //SEG111 [55] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 6*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$26 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _26 + ldy i2 + sta SCREEN1+6*$28,y + jmp b6_7 + //SEG112 doplasma::@6_7 + b6_7: + //SEG113 [56] (byte~) doplasma::$29 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+7 + sta _29 + //SEG114 [57] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 7*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$29 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _29 + ldy i2 + sta SCREEN1+7*$28,y + jmp b6_8 + //SEG115 doplasma::@6_8 + b6_8: + //SEG116 [58] (byte~) doplasma::$32 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+8 + sta _32 + //SEG117 [59] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 8*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$32 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _32 + ldy i2 + sta SCREEN1+8*$28,y + jmp b6_9 + //SEG118 doplasma::@6_9 + b6_9: + //SEG119 [60] (byte~) doplasma::$35 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+9 + sta _35 + //SEG120 [61] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 9*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$35 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _35 + ldy i2 + sta SCREEN1+9*$28,y + jmp b6_10 + //SEG121 doplasma::@6_10 + b6_10: + //SEG122 [62] (byte~) doplasma::$38 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$a + sta _38 + //SEG123 [63] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $a*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$38 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _38 + ldy i2 + sta SCREEN1+$a*$28,y + jmp b6_11 + //SEG124 doplasma::@6_11 + b6_11: + //SEG125 [64] (byte~) doplasma::$41 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$b + sta _41 + //SEG126 [65] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $b*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$41 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _41 + ldy i2 + sta SCREEN1+$b*$28,y + jmp b6_12 + //SEG127 doplasma::@6_12 + b6_12: + //SEG128 [66] (byte~) doplasma::$44 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$c + sta _44 + //SEG129 [67] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $c*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$44 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _44 + ldy i2 + sta SCREEN1+$c*$28,y + jmp b6_13 + //SEG130 doplasma::@6_13 + b6_13: + //SEG131 [68] (byte~) doplasma::$47 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$d + sta _47 + //SEG132 [69] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $d*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$47 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _47 + ldy i2 + sta SCREEN1+$d*$28,y + jmp b6_14 + //SEG133 doplasma::@6_14 + b6_14: + //SEG134 [70] (byte~) doplasma::$50 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$e + sta _50 + //SEG135 [71] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $e*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$50 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _50 + ldy i2 + sta SCREEN1+$e*$28,y + jmp b6_15 + //SEG136 doplasma::@6_15 + b6_15: + //SEG137 [72] (byte~) doplasma::$53 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$f + sta _53 + //SEG138 [73] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $f*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$53 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _53 + ldy i2 + sta SCREEN1+$f*$28,y + jmp b6_16 + //SEG139 doplasma::@6_16 + b6_16: + //SEG140 [74] (byte~) doplasma::$56 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$10 + sta _56 + //SEG141 [75] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $10*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$56 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _56 + ldy i2 + sta SCREEN1+$10*$28,y + jmp b6_17 + //SEG142 doplasma::@6_17 + b6_17: + //SEG143 [76] (byte~) doplasma::$59 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$11 + sta _59 + //SEG144 [77] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $11*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$59 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _59 + ldy i2 + sta SCREEN1+$11*$28,y + jmp b6_18 + //SEG145 doplasma::@6_18 + b6_18: + //SEG146 [78] (byte~) doplasma::$62 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$12 + sta _62 + //SEG147 [79] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $12*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$62 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _62 + ldy i2 + sta SCREEN1+$12*$28,y + jmp b6_19 + //SEG148 doplasma::@6_19 + b6_19: + //SEG149 [80] (byte~) doplasma::$65 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$13 + sta _65 + //SEG150 [81] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $13*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$65 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _65 + ldy i2 + sta SCREEN1+$13*$28,y + jmp b6_20 + //SEG151 doplasma::@6_20 + b6_20: + //SEG152 [82] (byte~) doplasma::$68 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$14 + sta _68 + //SEG153 [83] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $14*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$68 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _68 + ldy i2 + sta SCREEN1+$14*$28,y + jmp b6_21 + //SEG154 doplasma::@6_21 + b6_21: + //SEG155 [84] (byte~) doplasma::$71 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$15 + sta _71 + //SEG156 [85] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $15*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$71 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _71 + ldy i2 + sta SCREEN1+$15*$28,y + jmp b6_22 + //SEG157 doplasma::@6_22 + b6_22: + //SEG158 [86] (byte~) doplasma::$74 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$16 + sta _74 + //SEG159 [87] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $16*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$74 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _74 + ldy i2 + sta SCREEN1+$16*$28,y + jmp b6_23 + //SEG160 doplasma::@6_23 + b6_23: + //SEG161 [88] (byte~) doplasma::$77 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$17 + sta _77 + //SEG162 [89] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $17*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$77 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _77 + ldy i2 + sta SCREEN1+$17*$28,y + jmp b6_24 + //SEG163 doplasma::@6_24 + b6_24: + //SEG164 [90] (byte~) doplasma::$80 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18) -- vbuz1=pbuc1_derefidx_vbuz2_plus__deref_pbuc2 + ldy i2 + lda xbuf,y + clc + adc ybuf+$18 + sta _80 + //SEG165 [91] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$80 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _80 + ldy i2 + sta SCREEN1+$18*$28,y + jmp b7 + //SEG166 doplasma::@7 + b7: + //SEG167 [92] (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#4 -- vbuz1=_inc_vbuz1 + inc i2 + //SEG168 [93] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5 -- vbuz1_lt_vbuc1_then_la1 + lda i2 + cmp #$28 + bcc b5_from_b7 + jmp breturn + //SEG169 doplasma::@return + breturn: + //SEG170 [94] return + rts + xbuf: .fill $28, 0 + ybuf: .fill $19, 0 +} +//SEG171 makecharset +// Make a plasma-friendly charset where the chars are randomly filled +makecharset: { + .label _2 = $33 + .label _3 = $36 + .label _4 = $37 + .label _8 = $38 + .label _9 = $3a + .label _11 = $3c + .label s = $34 + .label ii = $14 + .label b = $15 + .label i = $13 + .label c = $f + //SEG172 [96] call sid_rnd_init + jsr sid_rnd_init + //SEG173 [97] phi from makecharset to makecharset::@10 [phi:makecharset->makecharset::@10] + b10_from_makecharset: + jmp b10 + //SEG174 makecharset::@10 + b10: + //SEG175 [98] call print_cls + //SEG176 [131] phi from makecharset::@10 to print_cls [phi:makecharset::@10->print_cls] + print_cls_from_b10: + jsr print_cls + //SEG177 [99] phi from makecharset::@10 to makecharset::@1 [phi:makecharset::@10->makecharset::@1] + b1_from_b10: + //SEG178 [99] phi (byte*) print_char_cursor#45 = (const byte*) print_line_cursor#0 [phi:makecharset::@10->makecharset::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta print_char_cursor+1 + //SEG179 [99] phi (word) makecharset::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@10->makecharset::@1#1] -- vwuz1=vbuc1 + lda #0 + sta c + lda #0 + sta c+1 + jmp b1 + //SEG180 [99] phi from makecharset::@9 to makecharset::@1 [phi:makecharset::@9->makecharset::@1] + b1_from_b9: + //SEG181 [99] phi (byte*) print_char_cursor#45 = (byte*) print_char_cursor#18 [phi:makecharset::@9->makecharset::@1#0] -- register_copy + //SEG182 [99] phi (word) makecharset::c#2 = (word) makecharset::c#1 [phi:makecharset::@9->makecharset::@1#1] -- register_copy + jmp b1 + //SEG183 makecharset::@1 + b1: + //SEG184 [100] (byte~) makecharset::$2 ← < (word) makecharset::c#2 -- vbuz1=_lo_vwuz2 + lda c + sta _2 + //SEG185 [101] (byte) makecharset::s#0 ← *((const byte*) SINTABLE#0 + (byte~) makecharset::$2) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy _2 + lda SINTABLE,y + sta s + //SEG186 [102] phi from makecharset::@1 to makecharset::@2 [phi:makecharset::@1->makecharset::@2] + b2_from_b1: + //SEG187 [102] phi (byte) makecharset::i#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@1->makecharset::@2#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b2 + //SEG188 [102] phi from makecharset::@6 to makecharset::@2 [phi:makecharset::@6->makecharset::@2] + b2_from_b6: + //SEG189 [102] phi (byte) makecharset::i#7 = (byte) makecharset::i#1 [phi:makecharset::@6->makecharset::@2#0] -- register_copy + jmp b2 + //SEG190 makecharset::@2 + b2: + //SEG191 [103] phi from makecharset::@2 to makecharset::@3 [phi:makecharset::@2->makecharset::@3] + b3_from_b2: + //SEG192 [103] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuz1=vbuc1 + lda #0 + sta b + //SEG193 [103] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#1] -- vbuz1=vbuc1 + lda #0 + sta ii + jmp b3 + //SEG194 [103] phi from makecharset::@4 to makecharset::@3 [phi:makecharset::@4->makecharset::@3] + b3_from_b4: + //SEG195 [103] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@4->makecharset::@3#0] -- register_copy + //SEG196 [103] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@4->makecharset::@3#1] -- register_copy + jmp b3 + //SEG197 makecharset::@3 + b3: + //SEG198 [104] call sid_rnd + jsr sid_rnd + //SEG199 [105] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 -- vbuz1=vbuz2 + lda sid_rnd.return + sta sid_rnd.return_2 + jmp b11 + //SEG200 makecharset::@11 + b11: + //SEG201 [106] (byte~) makecharset::$3 ← (byte) sid_rnd::return#2 -- vbuz1=vbuz2 + lda sid_rnd.return_2 + sta _3 + //SEG202 [107] (byte~) makecharset::$4 ← (byte~) makecharset::$3 & (byte/word/signed word/dword/signed dword) $ff -- vbuz1=vbuz2_band_vbuc1 + lda #$ff + and _3 + sta _4 + //SEG203 [108] if((byte~) makecharset::$4<=(byte) makecharset::s#0) goto makecharset::@4 -- vbuz1_le_vbuz2_then_la1 + lda s + cmp _4 + bcs b4_from_b11 + jmp b5 + //SEG204 makecharset::@5 + b5: + //SEG205 [109] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#2) -- vbuz1=vbuz1_bor_pbuc1_derefidx_vbuz2 + lda b + ldy ii + ora bittab,y + sta b + //SEG206 [110] phi from makecharset::@11 makecharset::@5 to makecharset::@4 [phi:makecharset::@11/makecharset::@5->makecharset::@4] + b4_from_b11: + b4_from_b5: + //SEG207 [110] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@11/makecharset::@5->makecharset::@4#0] -- register_copy + jmp b4 + //SEG208 makecharset::@4 + b4: + //SEG209 [111] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuz1=_inc_vbuz1 + inc ii + //SEG210 [112] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@3 -- vbuz1_lt_vbuc1_then_la1 + lda ii + cmp #8 + bcc b3_from_b4 + jmp b6 + //SEG211 makecharset::@6 + b6: + //SEG212 [113] (word~) makecharset::$8 ← (word) makecharset::c#2 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz2_rol_3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG213 [114] (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#7 -- vwuz1=vwuz2_plus_vbuz3 + lda i + clc + adc _8 + sta _9 + lda #0 + adc _8+1 + sta _9+1 + //SEG214 [115] *((const byte*) CHARSET#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuz2 + lda b + sta !v++1 + lda #CHARSET + adc _9+1 + sta !a++2 + !v: + lda #0 + !a: + sta CHARSET + //SEG215 [116] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#7 -- vbuz1=_inc_vbuz1 + inc i + //SEG216 [117] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #8 + bcc b2_from_b6 + jmp b7 + //SEG217 makecharset::@7 + b7: + //SEG218 [118] (byte/word~) makecharset::$11 ← (word) makecharset::c#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vwuz2_band_vbuc1 + lda c + and #7 + sta _11 + //SEG219 [119] if((byte/word~) makecharset::$11!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto makecharset::@9 -- vbuz1_neq_0_then_la1 + lda _11 + cmp #0 + bne b9_from_b7 + //SEG220 [120] phi from makecharset::@7 to makecharset::@8 [phi:makecharset::@7->makecharset::@8] + b8_from_b7: + jmp b8 + //SEG221 makecharset::@8 + b8: + //SEG222 [121] call print_char + jsr print_char + //SEG223 [122] phi from makecharset::@7 makecharset::@8 to makecharset::@9 [phi:makecharset::@7/makecharset::@8->makecharset::@9] + b9_from_b7: + b9_from_b8: + //SEG224 [122] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#45 [phi:makecharset::@7/makecharset::@8->makecharset::@9#0] -- register_copy + jmp b9 + //SEG225 makecharset::@9 + b9: + //SEG226 [123] (word) makecharset::c#1 ← ++ (word) makecharset::c#2 -- vwuz1=_inc_vwuz1 + inc c + bne !+ + inc c+1 + !: + //SEG227 [124] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 -- vwuz1_lt_vwuc1_then_la1 + lda c+1 + cmp #>$100 + bcc b1_from_b9 + bne !+ + lda c + cmp #<$100 + bcc b1_from_b9 + !: + jmp breturn + //SEG228 makecharset::@return + breturn: + //SEG229 [125] return + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +//SEG230 print_char +// Print a single char +print_char: { + .const ch = '.' + //SEG231 [126] *((byte*) print_char_cursor#45) ← (const byte) print_char::ch#0 -- _deref_pbuz1=vbuc1 + lda #ch + ldy #0 + sta (print_char_cursor),y + //SEG232 [127] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#45 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + jmp breturn + //SEG233 print_char::@return + breturn: + //SEG234 [128] return + rts +} +//SEG235 sid_rnd +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + .label return = $3d + .label return_2 = $35 + //SEG236 [129] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuz1=_deref_pbuc1 + lda SID_VOICE3_OSC + sta return + jmp breturn + //SEG237 sid_rnd::@return + breturn: + //SEG238 [130] return + rts +} +//SEG239 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = $16 + //SEG240 [132] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + b1_from_print_cls: + //SEG241 [132] phi (byte*) print_cls::sc#2 = (const byte*) print_line_cursor#0 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta sc+1 + jmp b1 + //SEG242 [132] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + b1_from_b1: + //SEG243 [132] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + jmp b1 + //SEG244 print_cls::@1 + b1: + //SEG245 [133] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG246 [134] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG247 [135] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1_from_b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + //SEG252 [138] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + jmp breturn + //SEG253 sid_rnd_init::@return + breturn: + //SEG254 [139] return + rts +} +.pc = SINTABLE "SINTABLE" + .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) + + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [6] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 [ ] ( main:3 [ ] ) always clobbers reg byte a +Statement [7] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( main:3 [ ] ) always clobbers reg byte a +Statement [9] *((byte*) main::col#2) ← (const byte) BLACK#0 [ main::col#2 ] ( main:3 [ main::col#2 ] ) always clobbers reg byte a reg byte y +Statement [11] if((byte*) main::col#1!=(byte*)(const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 [ main::col#1 ] ( main:3 [ main::col#1 ] ) always clobbers reg byte a +Statement [15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:3 [ ] ) always clobbers reg byte a +Statement [22] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2) [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1a#2 doplasma::c1b#2 doplasma::i#2 doplasma::$0 ] ( main:3::doplasma:18 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1a#2 doplasma::c1b#2 doplasma::i#2 doplasma::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ c1A#1 c1A#3 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ c1B#1 c1B#3 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ c2A#1 c2A#3 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ c2B#1 c2B#3 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 ] +Statement [24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1b#2 doplasma::i#2 doplasma::c1a#1 ] ( main:3::doplasma:18 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1b#2 doplasma::i#2 doplasma::c1a#1 ] ) always clobbers reg byte a +Statement [25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::i#2 doplasma::c1a#1 doplasma::c1b#1 ] ( main:3::doplasma:18 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::i#2 doplasma::c1a#1 doplasma::c1b#1 ] ) always clobbers reg byte a +Statement [28] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ c1B#1 c2A#1 c2B#1 c1A#3 ] ( main:3::doplasma:18 [ c1B#1 c2A#1 c2B#1 c1A#3 ] ) always clobbers reg byte a +Statement [29] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5 [ c2A#1 c2B#1 c1A#3 c1B#3 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 ] ) always clobbers reg byte a +Statement [33] (byte~) doplasma::$2 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2) [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2a#2 doplasma::c2b#2 doplasma::i1#2 doplasma::$2 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2a#2 doplasma::c2b#2 doplasma::i1#2 doplasma::$2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ doplasma::i1#2 doplasma::i1#1 ] +Statement [35] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2b#2 doplasma::i1#2 doplasma::c2a#1 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2b#2 doplasma::i1#2 doplasma::c2a#1 ] ) always clobbers reg byte a +Statement [36] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::i1#2 doplasma::c2a#1 doplasma::c2b#1 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::i1#2 doplasma::c2a#1 doplasma::c2b#1 ] ) always clobbers reg byte a +Statement [40] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ c1A#3 c1B#3 c2A#3 c2B#3 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 ] ) always clobbers reg byte a +Statement [42] (byte~) doplasma::$6 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$6 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ doplasma::i2#4 doplasma::i2#1 ] +Statement [44] (byte~) doplasma::$11 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$11 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$11 ] ) always clobbers reg byte a +Statement [46] (byte~) doplasma::$14 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$14 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$14 ] ) always clobbers reg byte a +Statement [48] (byte~) doplasma::$17 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$17 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$17 ] ) always clobbers reg byte a +Statement [50] (byte~) doplasma::$20 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$20 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$20 ] ) always clobbers reg byte a +Statement [52] (byte~) doplasma::$23 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$23 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$23 ] ) always clobbers reg byte a +Statement [54] (byte~) doplasma::$26 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$26 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$26 ] ) always clobbers reg byte a +Statement [56] (byte~) doplasma::$29 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$29 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$29 ] ) always clobbers reg byte a +Statement [58] (byte~) doplasma::$32 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$32 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$32 ] ) always clobbers reg byte a +Statement [60] (byte~) doplasma::$35 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$35 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$35 ] ) always clobbers reg byte a +Statement [62] (byte~) doplasma::$38 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$38 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$38 ] ) always clobbers reg byte a +Statement [64] (byte~) doplasma::$41 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$41 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$41 ] ) always clobbers reg byte a +Statement [66] (byte~) doplasma::$44 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$44 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$44 ] ) always clobbers reg byte a +Statement [68] (byte~) doplasma::$47 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$47 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$47 ] ) always clobbers reg byte a +Statement [70] (byte~) doplasma::$50 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$50 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$50 ] ) always clobbers reg byte a +Statement [72] (byte~) doplasma::$53 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$53 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$53 ] ) always clobbers reg byte a +Statement [74] (byte~) doplasma::$56 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$56 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$56 ] ) always clobbers reg byte a +Statement [76] (byte~) doplasma::$59 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$59 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$59 ] ) always clobbers reg byte a +Statement [78] (byte~) doplasma::$62 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$62 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$62 ] ) always clobbers reg byte a +Statement [80] (byte~) doplasma::$65 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$65 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$65 ] ) always clobbers reg byte a +Statement [82] (byte~) doplasma::$68 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$68 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$68 ] ) always clobbers reg byte a +Statement [84] (byte~) doplasma::$71 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$71 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$71 ] ) always clobbers reg byte a +Statement [86] (byte~) doplasma::$74 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$74 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$74 ] ) always clobbers reg byte a +Statement [88] (byte~) doplasma::$77 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$77 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$77 ] ) always clobbers reg byte a +Statement [90] (byte~) doplasma::$80 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$80 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$80 ] ) always clobbers reg byte a +Statement [100] (byte~) makecharset::$2 ← < (word) makecharset::c#2 [ makecharset::c#2 print_char_cursor#45 makecharset::$2 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::$2 ] ) always clobbers reg byte a +Statement [109] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#2) [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::ii#2 makecharset::b#1 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::ii#2 makecharset::b#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:52 [ makecharset::s#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] +Statement [113] (word~) makecharset::$8 ← (word) makecharset::c#2 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$8 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$8 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] +Statement [114] (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#7 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$9 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$9 ] ) always clobbers reg byte a +Statement [115] *((const byte*) CHARSET#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 ] ) always clobbers reg byte a +Statement [118] (byte/word~) makecharset::$11 ← (word) makecharset::c#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ makecharset::c#2 print_char_cursor#45 makecharset::$11 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::$11 ] ) always clobbers reg byte a +Statement [124] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 [ makecharset::c#1 print_char_cursor#18 ] ( main:3::makecharset:13 [ makecharset::c#1 print_char_cursor#18 ] ) always clobbers reg byte a +Statement [126] *((byte*) print_char_cursor#45) ← (const byte) print_char::ch#0 [ print_char_cursor#45 ] ( main:3::makecharset:13::print_char:121 [ makecharset::c#2 print_char_cursor#45 ] ) always clobbers reg byte a reg byte y +Statement [133] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:3::makecharset:13::print_cls:98 [ print_cls::sc#2 ] ) always clobbers reg byte a reg byte y +Statement [135] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 [ print_cls::sc#1 ] ( main:3::makecharset:13::print_cls:98 [ print_cls::sc#1 ] ) always clobbers reg byte a +Statement [137] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff [ ] ( main:3::makecharset:13::sid_rnd_init:96 [ ] ) always clobbers reg byte a +Statement [138] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:3::makecharset:13::sid_rnd_init:96 [ ] ) always clobbers reg byte a +Statement [6] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 [ ] ( main:3 [ ] ) always clobbers reg byte a +Statement [7] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( main:3 [ ] ) always clobbers reg byte a +Statement [9] *((byte*) main::col#2) ← (const byte) BLACK#0 [ main::col#2 ] ( main:3 [ main::col#2 ] ) always clobbers reg byte a reg byte y +Statement [11] if((byte*) main::col#1!=(byte*)(const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 [ main::col#1 ] ( main:3 [ main::col#1 ] ) always clobbers reg byte a +Statement [15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:3 [ ] ) always clobbers reg byte a +Statement [22] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2) [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1a#2 doplasma::c1b#2 doplasma::i#2 doplasma::$0 ] ( main:3::doplasma:18 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1a#2 doplasma::c1b#2 doplasma::i#2 doplasma::$0 ] ) always clobbers reg byte a +Statement [24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1b#2 doplasma::i#2 doplasma::c1a#1 ] ( main:3::doplasma:18 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::c1b#2 doplasma::i#2 doplasma::c1a#1 ] ) always clobbers reg byte a +Statement [25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::i#2 doplasma::c1a#1 doplasma::c1b#1 ] ( main:3::doplasma:18 [ c1A#1 c1B#1 c2A#1 c2B#1 doplasma::i#2 doplasma::c1a#1 doplasma::c1b#1 ] ) always clobbers reg byte a +Statement [28] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ c1B#1 c2A#1 c2B#1 c1A#3 ] ( main:3::doplasma:18 [ c1B#1 c2A#1 c2B#1 c1A#3 ] ) always clobbers reg byte a +Statement [29] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5 [ c2A#1 c2B#1 c1A#3 c1B#3 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 ] ) always clobbers reg byte a +Statement [33] (byte~) doplasma::$2 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2) [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2a#2 doplasma::c2b#2 doplasma::i1#2 doplasma::$2 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2a#2 doplasma::c2b#2 doplasma::i1#2 doplasma::$2 ] ) always clobbers reg byte a +Statement [35] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2b#2 doplasma::i1#2 doplasma::c2a#1 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::c2b#2 doplasma::i1#2 doplasma::c2a#1 ] ) always clobbers reg byte a +Statement [36] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::i1#2 doplasma::c2a#1 doplasma::c2b#1 ] ( main:3::doplasma:18 [ c2A#1 c2B#1 c1A#3 c1B#3 doplasma::i1#2 doplasma::c2a#1 doplasma::c2b#1 ] ) always clobbers reg byte a +Statement [40] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3 [ c1A#3 c1B#3 c2A#3 c2B#3 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 ] ) always clobbers reg byte a +Statement [42] (byte~) doplasma::$6 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$6 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$6 ] ) always clobbers reg byte a +Statement [44] (byte~) doplasma::$11 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$11 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$11 ] ) always clobbers reg byte a +Statement [46] (byte~) doplasma::$14 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$14 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$14 ] ) always clobbers reg byte a +Statement [48] (byte~) doplasma::$17 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$17 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$17 ] ) always clobbers reg byte a +Statement [50] (byte~) doplasma::$20 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$20 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$20 ] ) always clobbers reg byte a +Statement [52] (byte~) doplasma::$23 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$23 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$23 ] ) always clobbers reg byte a +Statement [54] (byte~) doplasma::$26 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$26 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$26 ] ) always clobbers reg byte a +Statement [56] (byte~) doplasma::$29 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$29 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$29 ] ) always clobbers reg byte a +Statement [58] (byte~) doplasma::$32 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$32 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$32 ] ) always clobbers reg byte a +Statement [60] (byte~) doplasma::$35 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$35 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$35 ] ) always clobbers reg byte a +Statement [62] (byte~) doplasma::$38 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$38 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$38 ] ) always clobbers reg byte a +Statement [64] (byte~) doplasma::$41 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$41 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$41 ] ) always clobbers reg byte a +Statement [66] (byte~) doplasma::$44 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$44 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$44 ] ) always clobbers reg byte a +Statement [68] (byte~) doplasma::$47 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$47 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$47 ] ) always clobbers reg byte a +Statement [70] (byte~) doplasma::$50 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$50 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$50 ] ) always clobbers reg byte a +Statement [72] (byte~) doplasma::$53 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$53 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$53 ] ) always clobbers reg byte a +Statement [74] (byte~) doplasma::$56 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$56 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$56 ] ) always clobbers reg byte a +Statement [76] (byte~) doplasma::$59 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$59 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$59 ] ) always clobbers reg byte a +Statement [78] (byte~) doplasma::$62 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$62 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$62 ] ) always clobbers reg byte a +Statement [80] (byte~) doplasma::$65 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$65 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$65 ] ) always clobbers reg byte a +Statement [82] (byte~) doplasma::$68 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$68 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$68 ] ) always clobbers reg byte a +Statement [84] (byte~) doplasma::$71 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$71 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$71 ] ) always clobbers reg byte a +Statement [86] (byte~) doplasma::$74 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$74 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$74 ] ) always clobbers reg byte a +Statement [88] (byte~) doplasma::$77 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$77 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$77 ] ) always clobbers reg byte a +Statement [90] (byte~) doplasma::$80 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18) [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$80 ] ( main:3::doplasma:18 [ c1A#3 c1B#3 c2A#3 c2B#3 doplasma::i2#4 doplasma::$80 ] ) always clobbers reg byte a +Statement [100] (byte~) makecharset::$2 ← < (word) makecharset::c#2 [ makecharset::c#2 print_char_cursor#45 makecharset::$2 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::$2 ] ) always clobbers reg byte a +Statement [109] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#2) [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::ii#2 makecharset::b#1 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::ii#2 makecharset::b#1 ] ) always clobbers reg byte a +Statement [113] (word~) makecharset::$8 ← (word) makecharset::c#2 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$8 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$8 ] ) always clobbers reg byte a +Statement [114] (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#7 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$9 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 makecharset::b#3 makecharset::$9 ] ) always clobbers reg byte a +Statement [115] *((const byte*) CHARSET#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::s#0 makecharset::i#7 ] ) always clobbers reg byte a +Statement [118] (byte/word~) makecharset::$11 ← (word) makecharset::c#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ makecharset::c#2 print_char_cursor#45 makecharset::$11 ] ( main:3::makecharset:13 [ makecharset::c#2 print_char_cursor#45 makecharset::$11 ] ) always clobbers reg byte a +Statement [124] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 [ makecharset::c#1 print_char_cursor#18 ] ( main:3::makecharset:13 [ makecharset::c#1 print_char_cursor#18 ] ) always clobbers reg byte a +Statement [126] *((byte*) print_char_cursor#45) ← (const byte) print_char::ch#0 [ print_char_cursor#45 ] ( main:3::makecharset:13::print_char:121 [ makecharset::c#2 print_char_cursor#45 ] ) always clobbers reg byte a reg byte y +Statement [133] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:3::makecharset:13::print_cls:98 [ print_cls::sc#2 ] ) always clobbers reg byte a reg byte y +Statement [135] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 [ print_cls::sc#1 ] ( main:3::makecharset:13::print_cls:98 [ print_cls::sc#1 ] ) always clobbers reg byte a +Statement [137] *((const word*) SID_VOICE3_FREQ#0) ← (word/dword/signed dword) $ffff [ ] ( main:3::makecharset:13::sid_rnd_init:96 [ ] ) always clobbers reg byte a +Statement [138] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 [ ] ( main:3::makecharset:13::sid_rnd_init:96 [ ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ main::col#2 main::col#1 ] : zp ZP_WORD:2 , +Potential registers zp ZP_BYTE:4 [ c1A#1 c1A#3 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:5 [ c1B#1 c1B#3 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:6 [ c2A#1 c2A#3 ] : zp ZP_BYTE:6 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:7 [ c2B#1 c2B#3 ] : zp ZP_BYTE:7 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:11 [ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] : zp ZP_BYTE:11 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:12 [ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] : zp ZP_BYTE:12 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:13 [ doplasma::i1#2 doplasma::i1#1 ] : zp ZP_BYTE:13 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:14 [ doplasma::i2#4 doplasma::i2#1 ] : zp ZP_BYTE:14 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:15 [ makecharset::c#2 makecharset::c#1 ] : zp ZP_WORD:15 , +Potential registers zp ZP_WORD:17 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] : zp ZP_WORD:17 , +Potential registers zp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] : zp ZP_BYTE:19 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:22 [ print_cls::sc#2 print_cls::sc#1 ] : zp ZP_WORD:22 , +Potential registers zp ZP_BYTE:24 [ doplasma::$0 ] : zp ZP_BYTE:24 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:25 [ doplasma::$2 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:26 [ doplasma::$6 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:27 [ doplasma::$11 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:28 [ doplasma::$14 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:29 [ doplasma::$17 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:30 [ doplasma::$20 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:31 [ doplasma::$23 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:32 [ doplasma::$26 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:33 [ doplasma::$29 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:34 [ doplasma::$32 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:35 [ doplasma::$35 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:36 [ doplasma::$38 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:37 [ doplasma::$41 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:38 [ doplasma::$44 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:39 [ doplasma::$47 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:40 [ doplasma::$50 ] : zp ZP_BYTE:40 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:41 [ doplasma::$53 ] : zp ZP_BYTE:41 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:42 [ doplasma::$56 ] : zp ZP_BYTE:42 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:43 [ doplasma::$59 ] : zp ZP_BYTE:43 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:44 [ doplasma::$62 ] : zp ZP_BYTE:44 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:45 [ doplasma::$65 ] : zp ZP_BYTE:45 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:46 [ doplasma::$68 ] : zp ZP_BYTE:46 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:47 [ doplasma::$71 ] : zp ZP_BYTE:47 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:48 [ doplasma::$74 ] : zp ZP_BYTE:48 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:49 [ doplasma::$77 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:50 [ doplasma::$80 ] : zp ZP_BYTE:50 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:51 [ makecharset::$2 ] : zp ZP_BYTE:51 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:52 [ makecharset::s#0 ] : zp ZP_BYTE:52 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:53 [ sid_rnd::return#2 ] : zp ZP_BYTE:53 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:54 [ makecharset::$3 ] : zp ZP_BYTE:54 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:55 [ makecharset::$4 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:56 [ makecharset::$8 ] : zp ZP_WORD:56 , +Potential registers zp ZP_WORD:58 [ makecharset::$9 ] : zp ZP_WORD:58 , +Potential registers zp ZP_BYTE:60 [ makecharset::$11 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:61 [ sid_rnd::return#0 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [makecharset] 3,123.3: zp ZP_BYTE:21 [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] 2,002: zp ZP_BYTE:54 [ makecharset::$3 ] 2,002: zp ZP_BYTE:55 [ makecharset::$4 ] 1,876.88: zp ZP_BYTE:20 [ makecharset::ii#2 makecharset::ii#1 ] 202: zp ZP_WORD:56 [ makecharset::$8 ] 202: zp ZP_WORD:58 [ makecharset::$9 ] 173.14: zp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] 59.53: zp ZP_BYTE:52 [ makecharset::s#0 ] 22.54: zp ZP_WORD:15 [ makecharset::c#2 makecharset::c#1 ] 22: zp ZP_BYTE:51 [ makecharset::$2 ] 22: zp ZP_BYTE:60 [ makecharset::$11 ] +Uplift Scope [doplasma] 254.48: zp ZP_BYTE:14 [ doplasma::i2#4 doplasma::i2#1 ] 212.1: zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 ] 212.1: zp ZP_BYTE:13 [ doplasma::i1#2 doplasma::i1#1 ] 202: zp ZP_BYTE:24 [ doplasma::$0 ] 202: zp ZP_BYTE:25 [ doplasma::$2 ] 202: zp ZP_BYTE:26 [ doplasma::$6 ] 202: zp ZP_BYTE:27 [ doplasma::$11 ] 202: zp ZP_BYTE:28 [ doplasma::$14 ] 202: zp ZP_BYTE:29 [ doplasma::$17 ] 202: zp ZP_BYTE:30 [ doplasma::$20 ] 202: zp ZP_BYTE:31 [ doplasma::$23 ] 202: zp ZP_BYTE:32 [ doplasma::$26 ] 202: zp ZP_BYTE:33 [ doplasma::$29 ] 202: zp ZP_BYTE:34 [ doplasma::$32 ] 202: zp ZP_BYTE:35 [ doplasma::$35 ] 202: zp ZP_BYTE:36 [ doplasma::$38 ] 202: zp ZP_BYTE:37 [ doplasma::$41 ] 202: zp ZP_BYTE:38 [ doplasma::$44 ] 202: zp ZP_BYTE:39 [ doplasma::$47 ] 202: zp ZP_BYTE:40 [ doplasma::$50 ] 202: zp ZP_BYTE:41 [ doplasma::$53 ] 202: zp ZP_BYTE:42 [ doplasma::$56 ] 202: zp ZP_BYTE:43 [ doplasma::$59 ] 202: zp ZP_BYTE:44 [ doplasma::$62 ] 202: zp ZP_BYTE:45 [ doplasma::$65 ] 202: zp ZP_BYTE:46 [ doplasma::$68 ] 202: zp ZP_BYTE:47 [ doplasma::$71 ] 202: zp ZP_BYTE:48 [ doplasma::$74 ] 202: zp ZP_BYTE:49 [ doplasma::$77 ] 202: zp ZP_BYTE:50 [ doplasma::$80 ] 154.17: zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] 154.17: zp ZP_BYTE:11 [ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] 147.58: zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] 147.58: zp ZP_BYTE:12 [ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +Uplift Scope [sid_rnd] 2,002: zp ZP_BYTE:53 [ sid_rnd::return#2 ] 334.33: zp ZP_BYTE:61 [ sid_rnd::return#0 ] +Uplift Scope [print_cls] 33: zp ZP_WORD:22 [ print_cls::sc#2 print_cls::sc#1 ] +Uplift Scope [main] 33: zp ZP_WORD:2 [ main::col#2 main::col#1 ] +Uplift Scope [] 16.46: zp ZP_WORD:17 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] 1.55: zp ZP_BYTE:4 [ c1A#1 c1A#3 ] 1.44: zp ZP_BYTE:5 [ c1B#1 c1B#3 ] 0.91: zp ZP_BYTE:6 [ c2A#1 c2A#3 ] 0.88: zp ZP_BYTE:7 [ c2B#1 c2B#3 ] +Uplift Scope [print_char] +Uplift Scope [sid_rnd_init] + +Uplifting [makecharset] best 173485 combination reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] reg byte a [ makecharset::$3 ] zp ZP_BYTE:55 [ makecharset::$4 ] reg byte x [ makecharset::ii#2 makecharset::ii#1 ] zp ZP_WORD:56 [ makecharset::$8 ] zp ZP_WORD:58 [ makecharset::$9 ] zp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] zp ZP_BYTE:52 [ makecharset::s#0 ] zp ZP_WORD:15 [ makecharset::c#2 makecharset::c#1 ] zp ZP_BYTE:51 [ makecharset::$2 ] zp ZP_BYTE:60 [ makecharset::$11 ] +Limited combination testing to 100 combinations of 20736 possible. +Uplifting [sid_rnd] best 164482 combination reg byte a [ sid_rnd::return#2 ] reg byte a [ sid_rnd::return#0 ] +Uplifting [print_cls] best 164482 combination zp ZP_WORD:22 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [main] best 164482 combination zp ZP_WORD:2 [ main::col#2 main::col#1 ] +Uplifting [] best 164482 combination zp ZP_WORD:17 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] zp ZP_BYTE:4 [ c1A#1 c1A#3 ] zp ZP_BYTE:5 [ c1B#1 c1B#3 ] zp ZP_BYTE:6 [ c2A#1 c2A#3 ] zp ZP_BYTE:7 [ c2B#1 c2B#3 ] +Uplifting [print_char] best 164482 combination +Uplifting [sid_rnd_init] best 164482 combination +Attempting to uplift remaining variables inzp ZP_BYTE:55 [ makecharset::$4 ] +Uplifting [makecharset] best 164482 combination zp ZP_BYTE:55 [ makecharset::$4 ] +Attempting to uplift remaining variables inzp ZP_BYTE:14 [ doplasma::i2#4 doplasma::i2#1 ] +Uplifting [doplasma] best 148582 combination reg byte x [ doplasma::i2#4 doplasma::i2#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 ] +Uplifting [doplasma] best 148582 combination zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:13 [ doplasma::i1#2 doplasma::i1#1 ] +Uplifting [doplasma] best 148582 combination zp ZP_BYTE:13 [ doplasma::i1#2 doplasma::i1#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:24 [ doplasma::$0 ] +Uplifting [doplasma] best 147982 combination reg byte a [ doplasma::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:25 [ doplasma::$2 ] +Uplifting [doplasma] best 147382 combination reg byte a [ doplasma::$2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:26 [ doplasma::$6 ] +Uplifting [doplasma] best 146782 combination reg byte a [ doplasma::$6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ doplasma::$11 ] +Uplifting [doplasma] best 146182 combination reg byte a [ doplasma::$11 ] +Attempting to uplift remaining variables inzp ZP_BYTE:28 [ doplasma::$14 ] +Uplifting [doplasma] best 145582 combination reg byte a [ doplasma::$14 ] +Attempting to uplift remaining variables inzp ZP_BYTE:29 [ doplasma::$17 ] +Uplifting [doplasma] best 144982 combination reg byte a [ doplasma::$17 ] +Attempting to uplift remaining variables inzp ZP_BYTE:30 [ doplasma::$20 ] +Uplifting [doplasma] best 144382 combination reg byte a [ doplasma::$20 ] +Attempting to uplift remaining variables inzp ZP_BYTE:31 [ doplasma::$23 ] +Uplifting [doplasma] best 143782 combination reg byte a [ doplasma::$23 ] +Attempting to uplift remaining variables inzp ZP_BYTE:32 [ doplasma::$26 ] +Uplifting [doplasma] best 143182 combination reg byte a [ doplasma::$26 ] +Attempting to uplift remaining variables inzp ZP_BYTE:33 [ doplasma::$29 ] +Uplifting [doplasma] best 142582 combination reg byte a [ doplasma::$29 ] +Attempting to uplift remaining variables inzp ZP_BYTE:34 [ doplasma::$32 ] +Uplifting [doplasma] best 141982 combination reg byte a [ doplasma::$32 ] +Attempting to uplift remaining variables inzp ZP_BYTE:35 [ doplasma::$35 ] +Uplifting [doplasma] best 141382 combination reg byte a [ doplasma::$35 ] +Attempting to uplift remaining variables inzp ZP_BYTE:36 [ doplasma::$38 ] +Uplifting [doplasma] best 140782 combination reg byte a [ doplasma::$38 ] +Attempting to uplift remaining variables inzp ZP_BYTE:37 [ doplasma::$41 ] +Uplifting [doplasma] best 140182 combination reg byte a [ doplasma::$41 ] +Attempting to uplift remaining variables inzp ZP_BYTE:38 [ doplasma::$44 ] +Uplifting [doplasma] best 139582 combination reg byte a [ doplasma::$44 ] +Attempting to uplift remaining variables inzp ZP_BYTE:39 [ doplasma::$47 ] +Uplifting [doplasma] best 138982 combination reg byte a [ doplasma::$47 ] +Attempting to uplift remaining variables inzp ZP_BYTE:40 [ doplasma::$50 ] +Uplifting [doplasma] best 138382 combination reg byte a [ doplasma::$50 ] +Attempting to uplift remaining variables inzp ZP_BYTE:41 [ doplasma::$53 ] +Uplifting [doplasma] best 137782 combination reg byte a [ doplasma::$53 ] +Attempting to uplift remaining variables inzp ZP_BYTE:42 [ doplasma::$56 ] +Uplifting [doplasma] best 137182 combination reg byte a [ doplasma::$56 ] +Attempting to uplift remaining variables inzp ZP_BYTE:43 [ doplasma::$59 ] +Uplifting [doplasma] best 136582 combination reg byte a [ doplasma::$59 ] +Attempting to uplift remaining variables inzp ZP_BYTE:44 [ doplasma::$62 ] +Uplifting [doplasma] best 135982 combination reg byte a [ doplasma::$62 ] +Attempting to uplift remaining variables inzp ZP_BYTE:45 [ doplasma::$65 ] +Uplifting [doplasma] best 135382 combination reg byte a [ doplasma::$65 ] +Attempting to uplift remaining variables inzp ZP_BYTE:46 [ doplasma::$68 ] +Uplifting [doplasma] best 134782 combination reg byte a [ doplasma::$68 ] +Attempting to uplift remaining variables inzp ZP_BYTE:47 [ doplasma::$71 ] +Uplifting [doplasma] best 134182 combination reg byte a [ doplasma::$71 ] +Attempting to uplift remaining variables inzp ZP_BYTE:48 [ doplasma::$74 ] +Uplifting [doplasma] best 133582 combination reg byte a [ doplasma::$74 ] +Attempting to uplift remaining variables inzp ZP_BYTE:49 [ doplasma::$77 ] +Uplifting [doplasma] best 132982 combination reg byte a [ doplasma::$77 ] +Attempting to uplift remaining variables inzp ZP_BYTE:50 [ doplasma::$80 ] +Uplifting [doplasma] best 132382 combination reg byte a [ doplasma::$80 ] +Attempting to uplift remaining variables inzp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] +Uplifting [makecharset] best 132382 combination zp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] +Uplifting [doplasma] best 132382 combination zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:11 [ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +Uplifting [doplasma] best 132382 combination zp ZP_BYTE:11 [ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] +Uplifting [doplasma] best 132382 combination zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:12 [ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +Uplifting [doplasma] best 132382 combination zp ZP_BYTE:12 [ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:52 [ makecharset::s#0 ] +Uplifting [makecharset] best 132382 combination zp ZP_BYTE:52 [ makecharset::s#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:51 [ makecharset::$2 ] +Uplifting [makecharset] best 132342 combination reg byte a [ makecharset::$2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:60 [ makecharset::$11 ] +Uplifting [makecharset] best 132282 combination reg byte a [ makecharset::$11 ] +Attempting to uplift remaining variables inzp ZP_BYTE:4 [ c1A#1 c1A#3 ] +Uplifting [] best 132282 combination zp ZP_BYTE:4 [ c1A#1 c1A#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:5 [ c1B#1 c1B#3 ] +Uplifting [] best 132282 combination zp ZP_BYTE:5 [ c1B#1 c1B#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:6 [ c2A#1 c2A#3 ] +Uplifting [] best 132282 combination zp ZP_BYTE:6 [ c2A#1 c2A#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:7 [ c2B#1 c2B#3 ] +Uplifting [] best 132282 combination zp ZP_BYTE:7 [ c2B#1 c2B#3 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ makecharset::$8 ] ] with [ zp ZP_WORD:58 [ makecharset::$9 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:2 [ main::col#2 main::col#1 ] ] with [ zp ZP_WORD:15 [ makecharset::c#2 makecharset::c#1 ] ] +Coalescing zero page register [ zp ZP_WORD:2 [ main::col#2 main::col#1 makecharset::c#2 makecharset::c#1 ] ] with [ zp ZP_WORD:22 [ print_cls::sc#2 print_cls::sc#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ c1A#1 c1A#3 ] ] with [ zp ZP_BYTE:19 [ makecharset::i#7 makecharset::i#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:5 [ c1B#1 c1B#3 ] ] with [ zp ZP_BYTE:52 [ makecharset::s#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:6 [ c2A#1 c2A#3 ] ] with [ zp ZP_BYTE:55 [ makecharset::$4 ] ] +Coalescing zero page register [ zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ] ] with [ zp ZP_BYTE:11 [ doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ] ] with [ zp ZP_BYTE:12 [ doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 ] ] with [ zp ZP_BYTE:13 [ doplasma::i1#2 doplasma::i1#1 ] ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:11 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] +Allocated (was zp ZP_WORD:56) zp ZP_WORD:13 [ makecharset::$8 makecharset::$9 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// A KickC version of the plasma routine from the CC65 samples +// This version has an unrolled inner loop to reach ~50FPS +// (w)2001 by groepaz/hitmen +// Cleanup and porting to CC65 by Ullrich von Bassewitz. +// Ported to KickC by Jesper Gravgaard. +// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + .const BLUE = 6 + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + .label SCREEN1 = $2800 + .label CHARSET = $2000 + .label SINTABLE = $1f00 + .label print_char_cursor = $b + .label c1A = 4 + .label c1B = 5 + .label c2A = 6 + .label c2B = 7 +//SEG3 @begin +bbegin: + jmp b1 +//SEG4 @1 +b1: +//SEG5 kickasm(location (const byte*) SINTABLE#0) {{ .for(var i=0;i<$100;i++) .byte round(127.5+127.5*sin(toRadians(360*i/256))) }} +//SEG6 [2] phi from @1 to @2 [phi:@1->@2] +b2_from_b1: + jmp b2 +//SEG7 @2 +b2: +//SEG8 [3] call main + jsr main +//SEG9 [4] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG10 @end +bend: +//SEG11 main +main: { + .const toD0181_return = (>(SCREEN1&$3fff)<<2)|(>CHARSET)>>2&$f + .label col = 2 + //SEG12 asm { sei } + sei + //SEG13 [6] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + lda #BLUE + sta BORDERCOL + //SEG14 [7] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + lda #BLUE + sta BGCOL + //SEG15 [8] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG16 [8] phi (byte*) main::col#2 = (const byte*) COLS#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #COLS + sta col+1 + jmp b1 + //SEG17 [8] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG18 [8] phi (byte*) main::col#2 = (byte*) main::col#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG19 main::@1 + b1: + //SEG20 [9] *((byte*) main::col#2) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + lda #BLACK + ldy #0 + sta (col),y + //SEG21 [10] (byte*) main::col#1 ← ++ (byte*) main::col#2 -- pbuz1=_inc_pbuz1 + inc col + bne !+ + inc col+1 + !: + //SEG22 [11] if((byte*) main::col#1!=(byte*)(const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 + lda col+1 + cmp #>COLS+$3e8+1 + bne b1_from_b1 + lda col + cmp #main::@2] + b2_from_b1: + jmp b2 + //SEG24 main::@2 + b2: + //SEG25 [13] call makecharset + //SEG26 [95] phi from main::@2 to makecharset [phi:main::@2->makecharset] + makecharset_from_b2: + jsr makecharset + //SEG27 [14] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181] + toD0181_from_b2: + jmp toD0181 + //SEG28 main::toD0181 + toD0181: + jmp b5 + //SEG29 main::@5 + b5: + //SEG30 [15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG31 [16] phi from main::@5 to main::@3 [phi:main::@5->main::@3] + b3_from_b5: + //SEG32 [16] phi (byte) c2B#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#0] -- vbuz1=vbuc1 + lda #0 + sta c2B + //SEG33 [16] phi (byte) c2A#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#1] -- vbuz1=vbuc1 + lda #0 + sta c2A + //SEG34 [16] phi (byte) c1B#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#2] -- vbuz1=vbuc1 + lda #0 + sta c1B + //SEG35 [16] phi (byte) c1A#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#3] -- vbuz1=vbuc1 + lda #0 + sta c1A + jmp b3 + //SEG36 main::@3 + b3: + //SEG37 [17] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + b4_from_b3: + jmp b4 + //SEG38 main::@4 + b4: + //SEG39 [18] call doplasma + jsr doplasma + //SEG40 [16] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + b3_from_b4: + //SEG41 [16] phi (byte) c2B#1 = (byte) c2B#3 [phi:main::@4->main::@3#0] -- register_copy + //SEG42 [16] phi (byte) c2A#1 = (byte) c2A#3 [phi:main::@4->main::@3#1] -- register_copy + //SEG43 [16] phi (byte) c1B#1 = (byte) c1B#3 [phi:main::@4->main::@3#2] -- register_copy + //SEG44 [16] phi (byte) c1A#1 = (byte) c1A#3 [phi:main::@4->main::@3#3] -- register_copy + jmp b3 +} +//SEG45 doplasma +// Render plasma to the passed screen +doplasma: { + .label c1a = 8 + .label c1b = 9 + .label i = $a + .label c2a = 8 + .label c2b = 9 + .label i1 = $a + //SEG46 [19] (byte) doplasma::c1a#0 ← (byte) c1A#1 -- vbuz1=vbuz2 + lda c1A + sta c1a + //SEG47 [20] (byte) doplasma::c1b#0 ← (byte) c1B#1 -- vbuz1=vbuz2 + lda c1B + sta c1b + //SEG48 [21] phi from doplasma to doplasma::@1 [phi:doplasma->doplasma::@1] + b1_from_doplasma: + //SEG49 [21] phi (byte) doplasma::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma->doplasma::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG50 [21] phi (byte) doplasma::c1b#2 = (byte) doplasma::c1b#0 [phi:doplasma->doplasma::@1#1] -- register_copy + //SEG51 [21] phi (byte) doplasma::c1a#2 = (byte) doplasma::c1a#0 [phi:doplasma->doplasma::@1#2] -- register_copy + jmp b1 + //SEG52 [21] phi from doplasma::@1 to doplasma::@1 [phi:doplasma::@1->doplasma::@1] + b1_from_b1: + //SEG53 [21] phi (byte) doplasma::i#2 = (byte) doplasma::i#1 [phi:doplasma::@1->doplasma::@1#0] -- register_copy + //SEG54 [21] phi (byte) doplasma::c1b#2 = (byte) doplasma::c1b#1 [phi:doplasma::@1->doplasma::@1#1] -- register_copy + //SEG55 [21] phi (byte) doplasma::c1a#2 = (byte) doplasma::c1a#1 [phi:doplasma::@1->doplasma::@1#2] -- register_copy + jmp b1 + //SEG56 doplasma::@1 + b1: + //SEG57 [22] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2) -- vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuz2 + ldy c1a + lda SINTABLE,y + ldy c1b + clc + adc SINTABLE,y + //SEG58 [23] *((const byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$0 -- pbuc1_derefidx_vbuz1=vbuaa + ldy i + sta ybuf,y + //SEG59 [24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz1_plus_vbuc1 + lax c1a + axs #-[4] + stx c1a + //SEG60 [25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 -- vbuz1=vbuz1_plus_vbuc1 + lax c1b + axs #-[9] + stx c1b + //SEG61 [26] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG62 [27] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@1 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$19 + bcc b1_from_b1 + jmp b2 + //SEG63 doplasma::@2 + b2: + //SEG64 [28] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 + lax c1A + axs #-[3] + stx c1A + //SEG65 [29] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5 -- vbuz1=vbuz1_minus_vbuc1 + lax c1B + axs #5 + stx c1B + //SEG66 [30] (byte) doplasma::c2a#0 ← (byte) c2A#1 -- vbuz1=vbuz2 + lda c2A + sta c2a + //SEG67 [31] (byte) doplasma::c2b#0 ← (byte) c2B#1 -- vbuz1=vbuz2 + lda c2B + sta c2b + //SEG68 [32] phi from doplasma::@2 to doplasma::@3 [phi:doplasma::@2->doplasma::@3] + b3_from_b2: + //SEG69 [32] phi (byte) doplasma::i1#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma::@2->doplasma::@3#0] -- vbuz1=vbuc1 + lda #0 + sta i1 + //SEG70 [32] phi (byte) doplasma::c2b#2 = (byte) doplasma::c2b#0 [phi:doplasma::@2->doplasma::@3#1] -- register_copy + //SEG71 [32] phi (byte) doplasma::c2a#2 = (byte) doplasma::c2a#0 [phi:doplasma::@2->doplasma::@3#2] -- register_copy + jmp b3 + //SEG72 [32] phi from doplasma::@3 to doplasma::@3 [phi:doplasma::@3->doplasma::@3] + b3_from_b3: + //SEG73 [32] phi (byte) doplasma::i1#2 = (byte) doplasma::i1#1 [phi:doplasma::@3->doplasma::@3#0] -- register_copy + //SEG74 [32] phi (byte) doplasma::c2b#2 = (byte) doplasma::c2b#1 [phi:doplasma::@3->doplasma::@3#1] -- register_copy + //SEG75 [32] phi (byte) doplasma::c2a#2 = (byte) doplasma::c2a#1 [phi:doplasma::@3->doplasma::@3#2] -- register_copy + jmp b3 + //SEG76 doplasma::@3 + b3: + //SEG77 [33] (byte~) doplasma::$2 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2) -- vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuz2 + ldy c2a + lda SINTABLE,y + ldy c2b + clc + adc SINTABLE,y + //SEG78 [34] *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$2 -- pbuc1_derefidx_vbuz1=vbuaa + ldy i1 + sta xbuf,y + //SEG79 [35] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 + lax c2a + axs #-[3] + stx c2a + //SEG80 [36] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz1_plus_vbuc1 + lax c2b + axs #-[7] + stx c2b + //SEG81 [37] (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2 -- vbuz1=_inc_vbuz1 + inc i1 + //SEG82 [38] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3 -- vbuz1_lt_vbuc1_then_la1 + lda i1 + cmp #$28 + bcc b3_from_b3 + jmp b4 + //SEG83 doplasma::@4 + b4: + //SEG84 [39] (byte) c2A#3 ← (byte) c2A#1 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuz1=vbuz1_plus_2 + lda c2A + clc + adc #2 + sta c2A + //SEG85 [40] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_minus_vbuc1 + lax c2B + axs #3 + stx c2B + //SEG86 [41] phi from doplasma::@4 to doplasma::@5 [phi:doplasma::@4->doplasma::@5] + b5_from_b4: + //SEG87 [41] phi (byte) doplasma::i2#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma::@4->doplasma::@5#0] -- vbuxx=vbuc1 + ldx #0 + jmp b5 + //SEG88 [41] phi from doplasma::@7 to doplasma::@5 [phi:doplasma::@7->doplasma::@5] + b5_from_b7: + //SEG89 [41] phi (byte) doplasma::i2#4 = (byte) doplasma::i2#1 [phi:doplasma::@7->doplasma::@5#0] -- register_copy + jmp b5 + //SEG90 doplasma::@5 + b5: + jmp b6 + //SEG91 doplasma::@6 + b6: + //SEG92 [42] (byte~) doplasma::$6 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf + //SEG93 [43] *((const byte*) SCREEN1#0 + (byte) doplasma::i2#4) ← (byte~) doplasma::$6 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1,x + jmp b6_1 + //SEG94 doplasma::@6_1 + b6_1: + //SEG95 [44] (byte~) doplasma::$11 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+1 + //SEG96 [45] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$11 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+1*$28,x + jmp b6_2 + //SEG97 doplasma::@6_2 + b6_2: + //SEG98 [46] (byte~) doplasma::$14 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+2 + //SEG99 [47] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$14 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+2*$28,x + jmp b6_3 + //SEG100 doplasma::@6_3 + b6_3: + //SEG101 [48] (byte~) doplasma::$17 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+3 + //SEG102 [49] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 3*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$17 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+3*$28,x + jmp b6_4 + //SEG103 doplasma::@6_4 + b6_4: + //SEG104 [50] (byte~) doplasma::$20 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+4 + //SEG105 [51] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$20 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+4*$28,x + jmp b6_5 + //SEG106 doplasma::@6_5 + b6_5: + //SEG107 [52] (byte~) doplasma::$23 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+5 + //SEG108 [53] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 5*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$23 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+5*$28,x + jmp b6_6 + //SEG109 doplasma::@6_6 + b6_6: + //SEG110 [54] (byte~) doplasma::$26 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+6 + //SEG111 [55] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 6*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$26 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+6*$28,x + jmp b6_7 + //SEG112 doplasma::@6_7 + b6_7: + //SEG113 [56] (byte~) doplasma::$29 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+7 + //SEG114 [57] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 7*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$29 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+7*$28,x + jmp b6_8 + //SEG115 doplasma::@6_8 + b6_8: + //SEG116 [58] (byte~) doplasma::$32 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+8 + //SEG117 [59] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 8*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$32 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+8*$28,x + jmp b6_9 + //SEG118 doplasma::@6_9 + b6_9: + //SEG119 [60] (byte~) doplasma::$35 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+9 + //SEG120 [61] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 9*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$35 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+9*$28,x + jmp b6_10 + //SEG121 doplasma::@6_10 + b6_10: + //SEG122 [62] (byte~) doplasma::$38 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$a + //SEG123 [63] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $a*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$38 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$a*$28,x + jmp b6_11 + //SEG124 doplasma::@6_11 + b6_11: + //SEG125 [64] (byte~) doplasma::$41 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$b + //SEG126 [65] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $b*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$41 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$b*$28,x + jmp b6_12 + //SEG127 doplasma::@6_12 + b6_12: + //SEG128 [66] (byte~) doplasma::$44 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$c + //SEG129 [67] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $c*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$44 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$c*$28,x + jmp b6_13 + //SEG130 doplasma::@6_13 + b6_13: + //SEG131 [68] (byte~) doplasma::$47 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$d + //SEG132 [69] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $d*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$47 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$d*$28,x + jmp b6_14 + //SEG133 doplasma::@6_14 + b6_14: + //SEG134 [70] (byte~) doplasma::$50 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$e + //SEG135 [71] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $e*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$50 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$e*$28,x + jmp b6_15 + //SEG136 doplasma::@6_15 + b6_15: + //SEG137 [72] (byte~) doplasma::$53 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$f + //SEG138 [73] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $f*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$53 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$f*$28,x + jmp b6_16 + //SEG139 doplasma::@6_16 + b6_16: + //SEG140 [74] (byte~) doplasma::$56 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$10 + //SEG141 [75] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $10*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$56 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$10*$28,x + jmp b6_17 + //SEG142 doplasma::@6_17 + b6_17: + //SEG143 [76] (byte~) doplasma::$59 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$11 + //SEG144 [77] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $11*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$59 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$11*$28,x + jmp b6_18 + //SEG145 doplasma::@6_18 + b6_18: + //SEG146 [78] (byte~) doplasma::$62 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$12 + //SEG147 [79] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $12*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$62 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$12*$28,x + jmp b6_19 + //SEG148 doplasma::@6_19 + b6_19: + //SEG149 [80] (byte~) doplasma::$65 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$13 + //SEG150 [81] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $13*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$65 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$13*$28,x + jmp b6_20 + //SEG151 doplasma::@6_20 + b6_20: + //SEG152 [82] (byte~) doplasma::$68 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$14 + //SEG153 [83] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $14*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$68 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$14*$28,x + jmp b6_21 + //SEG154 doplasma::@6_21 + b6_21: + //SEG155 [84] (byte~) doplasma::$71 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$15 + //SEG156 [85] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $15*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$71 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$15*$28,x + jmp b6_22 + //SEG157 doplasma::@6_22 + b6_22: + //SEG158 [86] (byte~) doplasma::$74 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$16 + //SEG159 [87] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $16*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$74 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$16*$28,x + jmp b6_23 + //SEG160 doplasma::@6_23 + b6_23: + //SEG161 [88] (byte~) doplasma::$77 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$17 + //SEG162 [89] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $17*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$77 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$17*$28,x + jmp b6_24 + //SEG163 doplasma::@6_24 + b6_24: + //SEG164 [90] (byte~) doplasma::$80 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$18 + //SEG165 [91] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$80 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$18*$28,x + jmp b7 + //SEG166 doplasma::@7 + b7: + //SEG167 [92] (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#4 -- vbuxx=_inc_vbuxx + inx + //SEG168 [93] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5 -- vbuxx_lt_vbuc1_then_la1 + cpx #$28 + bcc b5_from_b7 + jmp breturn + //SEG169 doplasma::@return + breturn: + //SEG170 [94] return + rts + xbuf: .fill $28, 0 + ybuf: .fill $19, 0 +} +//SEG171 makecharset +// Make a plasma-friendly charset where the chars are randomly filled +makecharset: { + .label _4 = 6 + .label _8 = $d + .label _9 = $d + .label s = 5 + .label i = 4 + .label c = 2 + //SEG172 [96] call sid_rnd_init + jsr sid_rnd_init + //SEG173 [97] phi from makecharset to makecharset::@10 [phi:makecharset->makecharset::@10] + b10_from_makecharset: + jmp b10 + //SEG174 makecharset::@10 + b10: + //SEG175 [98] call print_cls + //SEG176 [131] phi from makecharset::@10 to print_cls [phi:makecharset::@10->print_cls] + print_cls_from_b10: + jsr print_cls + //SEG177 [99] phi from makecharset::@10 to makecharset::@1 [phi:makecharset::@10->makecharset::@1] + b1_from_b10: + //SEG178 [99] phi (byte*) print_char_cursor#45 = (const byte*) print_line_cursor#0 [phi:makecharset::@10->makecharset::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta print_char_cursor+1 + //SEG179 [99] phi (word) makecharset::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@10->makecharset::@1#1] -- vwuz1=vbuc1 + lda #0 + sta c + lda #0 + sta c+1 + jmp b1 + //SEG180 [99] phi from makecharset::@9 to makecharset::@1 [phi:makecharset::@9->makecharset::@1] + b1_from_b9: + //SEG181 [99] phi (byte*) print_char_cursor#45 = (byte*) print_char_cursor#18 [phi:makecharset::@9->makecharset::@1#0] -- register_copy + //SEG182 [99] phi (word) makecharset::c#2 = (word) makecharset::c#1 [phi:makecharset::@9->makecharset::@1#1] -- register_copy + jmp b1 + //SEG183 makecharset::@1 + b1: + //SEG184 [100] (byte~) makecharset::$2 ← < (word) makecharset::c#2 -- vbuaa=_lo_vwuz1 + lda c + //SEG185 [101] (byte) makecharset::s#0 ← *((const byte*) SINTABLE#0 + (byte~) makecharset::$2) -- vbuz1=pbuc1_derefidx_vbuaa + tay + lda SINTABLE,y + sta s + //SEG186 [102] phi from makecharset::@1 to makecharset::@2 [phi:makecharset::@1->makecharset::@2] + b2_from_b1: + //SEG187 [102] phi (byte) makecharset::i#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@1->makecharset::@2#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b2 + //SEG188 [102] phi from makecharset::@6 to makecharset::@2 [phi:makecharset::@6->makecharset::@2] + b2_from_b6: + //SEG189 [102] phi (byte) makecharset::i#7 = (byte) makecharset::i#1 [phi:makecharset::@6->makecharset::@2#0] -- register_copy + jmp b2 + //SEG190 makecharset::@2 + b2: + //SEG191 [103] phi from makecharset::@2 to makecharset::@3 [phi:makecharset::@2->makecharset::@3] + b3_from_b2: + //SEG192 [103] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuyy=vbuc1 + ldy #0 + //SEG193 [103] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#1] -- vbuxx=vbuc1 + ldx #0 + jmp b3 + //SEG194 [103] phi from makecharset::@4 to makecharset::@3 [phi:makecharset::@4->makecharset::@3] + b3_from_b4: + //SEG195 [103] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@4->makecharset::@3#0] -- register_copy + //SEG196 [103] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@4->makecharset::@3#1] -- register_copy + jmp b3 + //SEG197 makecharset::@3 + b3: + //SEG198 [104] call sid_rnd + jsr sid_rnd + //SEG199 [105] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + jmp b11 + //SEG200 makecharset::@11 + b11: + //SEG201 [106] (byte~) makecharset::$3 ← (byte) sid_rnd::return#2 + //SEG202 [107] (byte~) makecharset::$4 ← (byte~) makecharset::$3 & (byte/word/signed word/dword/signed dword) $ff -- vbuz1=vbuaa_band_vbuc1 + and #$ff + sta _4 + //SEG203 [108] if((byte~) makecharset::$4<=(byte) makecharset::s#0) goto makecharset::@4 -- vbuz1_le_vbuz2_then_la1 + lda s + cmp _4 + bcs b4_from_b11 + jmp b5 + //SEG204 makecharset::@5 + b5: + //SEG205 [109] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#2) -- vbuyy=vbuyy_bor_pbuc1_derefidx_vbuxx + tya + ora bittab,x + tay + //SEG206 [110] phi from makecharset::@11 makecharset::@5 to makecharset::@4 [phi:makecharset::@11/makecharset::@5->makecharset::@4] + b4_from_b11: + b4_from_b5: + //SEG207 [110] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@11/makecharset::@5->makecharset::@4#0] -- register_copy + jmp b4 + //SEG208 makecharset::@4 + b4: + //SEG209 [111] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuxx=_inc_vbuxx + inx + //SEG210 [112] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@3 -- vbuxx_lt_vbuc1_then_la1 + cpx #8 + bcc b3_from_b4 + jmp b6 + //SEG211 makecharset::@6 + b6: + //SEG212 [113] (word~) makecharset::$8 ← (word) makecharset::c#2 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz2_rol_3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG213 [114] (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#7 -- vwuz1=vwuz1_plus_vbuz2 + lda i + clc + adc _9 + sta _9 + bcc !+ + inc _9+1 + !: + //SEG214 [115] *((const byte*) CHARSET#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuyy + tya + sta !v++1 + lda #CHARSET + adc _9+1 + sta !a++2 + !v: + lda #0 + !a: + sta CHARSET + //SEG215 [116] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#7 -- vbuz1=_inc_vbuz1 + inc i + //SEG216 [117] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #8 + bcc b2_from_b6 + jmp b7 + //SEG217 makecharset::@7 + b7: + //SEG218 [118] (byte/word~) makecharset::$11 ← (word) makecharset::c#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vwuz1_band_vbuc1 + lda c + and #7 + //SEG219 [119] if((byte/word~) makecharset::$11!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto makecharset::@9 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b9_from_b7 + //SEG220 [120] phi from makecharset::@7 to makecharset::@8 [phi:makecharset::@7->makecharset::@8] + b8_from_b7: + jmp b8 + //SEG221 makecharset::@8 + b8: + //SEG222 [121] call print_char + jsr print_char + //SEG223 [122] phi from makecharset::@7 makecharset::@8 to makecharset::@9 [phi:makecharset::@7/makecharset::@8->makecharset::@9] + b9_from_b7: + b9_from_b8: + //SEG224 [122] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#45 [phi:makecharset::@7/makecharset::@8->makecharset::@9#0] -- register_copy + jmp b9 + //SEG225 makecharset::@9 + b9: + //SEG226 [123] (word) makecharset::c#1 ← ++ (word) makecharset::c#2 -- vwuz1=_inc_vwuz1 + inc c + bne !+ + inc c+1 + !: + //SEG227 [124] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 -- vwuz1_lt_vwuc1_then_la1 + lda c+1 + cmp #>$100 + bcc b1_from_b9 + bne !+ + lda c + cmp #<$100 + bcc b1_from_b9 + !: + jmp breturn + //SEG228 makecharset::@return + breturn: + //SEG229 [125] return + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +//SEG230 print_char +// Print a single char +print_char: { + .const ch = '.' + //SEG231 [126] *((byte*) print_char_cursor#45) ← (const byte) print_char::ch#0 -- _deref_pbuz1=vbuc1 + lda #ch + ldy #0 + sta (print_char_cursor),y + //SEG232 [127] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#45 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + jmp breturn + //SEG233 print_char::@return + breturn: + //SEG234 [128] return + rts +} +//SEG235 sid_rnd +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + //SEG236 [129] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + lda SID_VOICE3_OSC + jmp breturn + //SEG237 sid_rnd::@return + breturn: + //SEG238 [130] return + rts +} +//SEG239 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = 2 + //SEG240 [132] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + b1_from_print_cls: + //SEG241 [132] phi (byte*) print_cls::sc#2 = (const byte*) print_line_cursor#0 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta sc+1 + jmp b1 + //SEG242 [132] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + b1_from_b1: + //SEG243 [132] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + jmp b1 + //SEG244 print_cls::@1 + b1: + //SEG245 [133] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG246 [134] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG247 [135] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1_from_b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + //SEG252 [138] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + jmp breturn + //SEG253 sid_rnd_init::@return + breturn: + //SEG254 [139] return + rts +} +.pc = SINTABLE "SINTABLE" + .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) + + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp toD0181 +Removing instruction jmp b5 +Removing instruction jmp b3 +Removing instruction jmp b4 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b4 +Removing instruction jmp b5 +Removing instruction jmp b6 +Removing instruction jmp b6_1 +Removing instruction jmp b6_2 +Removing instruction jmp b6_3 +Removing instruction jmp b6_4 +Removing instruction jmp b6_5 +Removing instruction jmp b6_6 +Removing instruction jmp b6_7 +Removing instruction jmp b6_8 +Removing instruction jmp b6_9 +Removing instruction jmp b6_10 +Removing instruction jmp b6_11 +Removing instruction jmp b6_12 +Removing instruction jmp b6_13 +Removing instruction jmp b6_14 +Removing instruction jmp b6_15 +Removing instruction jmp b6_16 +Removing instruction jmp b6_17 +Removing instruction jmp b6_18 +Removing instruction jmp b6_19 +Removing instruction jmp b6_20 +Removing instruction jmp b6_21 +Removing instruction jmp b6_22 +Removing instruction jmp b6_23 +Removing instruction jmp b6_24 +Removing instruction jmp b7 +Removing instruction jmp breturn +Removing instruction jmp b10 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b11 +Removing instruction jmp b5 +Removing instruction jmp b4 +Removing instruction jmp b6 +Removing instruction jmp b7 +Removing instruction jmp b8 +Removing instruction jmp b9 +Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #BLUE +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b1 with b1 +Replacing label b3 with b4 +Replacing label b1_from_b1 with b1 +Replacing label b3_from_b3 with b3 +Replacing label b5 with b6 +Replacing label b5_from_b7 with b6 +Replacing label b4_from_b11 with b4 +Replacing label b3_from_b4 with b3 +Replacing label b2_from_b6 with b2 +Replacing label b9_from_b7 with b9 +Replacing label b1_from_b9 with b1 +Replacing label b1_from_b9 with b1 +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b1 with b1 +Removing instruction b1: +Removing instruction b2_from_b1: +Removing instruction b2: +Removing instruction bend_from_b2: +Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction makecharset_from_b2: +Removing instruction toD0181_from_b2: +Removing instruction toD0181: +Removing instruction b3: +Removing instruction b4_from_b3: +Removing instruction b1_from_b1: +Removing instruction b3_from_b3: +Removing instruction b5_from_b7: +Removing instruction b5: +Removing instruction b10_from_makecharset: +Removing instruction print_cls_from_b10: +Removing instruction b1_from_b9: +Removing instruction b2_from_b6: +Removing instruction b3_from_b2: +Removing instruction b3_from_b4: +Removing instruction b4_from_b11: +Removing instruction b4_from_b5: +Removing instruction b8_from_b7: +Removing instruction b9_from_b7: +Removing instruction b9_from_b8: +Removing instruction b1_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction b1_from_main: +Removing instruction b2: +Removing instruction b5: +Removing instruction b3_from_b5: +Removing instruction b3_from_b4: +Removing instruction b1_from_doplasma: +Removing instruction b2: +Removing instruction b3_from_b2: +Removing instruction b4: +Removing instruction b5_from_b4: +Removing instruction b6_1: +Removing instruction b6_2: +Removing instruction b6_3: +Removing instruction b6_4: +Removing instruction b6_5: +Removing instruction b6_6: +Removing instruction b6_7: +Removing instruction b6_8: +Removing instruction b6_9: +Removing instruction b6_10: +Removing instruction b6_11: +Removing instruction b6_12: +Removing instruction b6_13: +Removing instruction b6_14: +Removing instruction b6_15: +Removing instruction b6_16: +Removing instruction b6_17: +Removing instruction b6_18: +Removing instruction b6_19: +Removing instruction b6_20: +Removing instruction b6_21: +Removing instruction b6_22: +Removing instruction b6_23: +Removing instruction b6_24: +Removing instruction b7: +Removing instruction breturn: +Removing instruction b10: +Removing instruction b1_from_b10: +Removing instruction b2_from_b1: +Removing instruction b11: +Removing instruction b5: +Removing instruction b6: +Removing instruction b7: +Removing instruction b8: +Removing instruction breturn: +Removing instruction breturn: +Removing instruction breturn: +Removing instruction b1_from_print_cls: +Removing instruction breturn: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b1 +Removing instruction jmp b1 +Removing instruction jmp b3 +Removing instruction jmp b6 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination +Fixing long branch [241] bcc b6 to bcs +Fixing long branch [339] bcc b1 to bcs + +FINAL SYMBOL TABLE +(label) @1 +(label) @2 +(label) @begin +(label) @end +(byte*) BGCOL +(const byte*) BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) $d021 +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(const byte) BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0 +(byte) BLUE +(const byte) BLUE#0 BLUE = (byte/signed byte/word/signed word/dword/signed dword) 6 +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) $d020 +(byte) BROWN +(byte*) CHARGEN +(byte*) CHARSET +(const byte*) CHARSET#0 CHARSET = ((byte*))(word/signed word/dword/signed dword) $2000 +(byte*) CIA1_INTERRUPT +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B_DDR +(byte*) CIA2_INTERRUPT +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B_DDR +(byte) CIA_INTERRUPT_CLEAR +(byte*) COLS +(const byte*) COLS#0 COLS = ((byte*))(word/dword/signed dword) $d800 +(byte) CYAN +(byte*) D011 +(byte*) D016 +(byte*) D018 +(const byte*) D018#0 D018 = ((byte*))(word/dword/signed dword) $d018 +(byte) DARK_GREY +(byte) GREEN +(byte) GREY +(void()**) HARDWARE_IRQ +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_SPRITE +(byte*) IRQ_ENABLE +(byte) IRQ_LIGHTPEN +(byte) IRQ_RASTER +(byte*) IRQ_STATUS +(void()**) KERNEL_IRQ +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_Y +(byte) LIGHT_BLUE +(byte) LIGHT_GREEN +(byte) LIGHT_GREY +(byte) ORANGE +(byte) PINK +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte) PURPLE +(byte*) RASTER +(byte) RED +(byte*) SCREEN1 +(const byte*) SCREEN1#0 SCREEN1 = ((byte*))(word/signed word/dword/signed dword) $2800 +(byte) SID_CONTROL_GATE +(byte) SID_CONTROL_NOISE +(const byte) SID_CONTROL_NOISE#0 SID_CONTROL_NOISE = (byte/word/signed word/dword/signed dword) $80 +(byte) SID_CONTROL_PULSE +(byte) SID_CONTROL_RING +(byte) SID_CONTROL_SAWTOOTH +(byte) SID_CONTROL_SYNC +(byte) SID_CONTROL_TEST +(byte) SID_CONTROL_TRIANGLE +(byte*) SID_VOICE3_CONTROL +(const byte*) SID_VOICE3_CONTROL#0 SID_VOICE3_CONTROL = ((byte*))(word/dword/signed dword) $d412 +(word*) SID_VOICE3_FREQ +(const word*) SID_VOICE3_FREQ#0 SID_VOICE3_FREQ = ((word*))(word/dword/signed dword) $d40e +(byte*) SID_VOICE3_FREQ_HIGH +(byte*) SID_VOICE3_FREQ_LOW +(byte*) SID_VOICE3_OSC +(const byte*) SID_VOICE3_OSC#0 SID_VOICE3_OSC = ((byte*))(word/dword/signed dword) $d41b +(byte*) SINTABLE +(const byte*) SINTABLE#0 SINTABLE = ((byte*))(word/signed word/dword/signed dword) $1f00 +(byte*) SPRITES_COLS +(byte*) SPRITES_ENABLE +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_MC +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC2 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_XMSB +(byte*) SPRITES_XPOS +(byte*) SPRITES_YPOS +(word) SPRITE_PTRS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(byte) VIC_RST8 +(byte) WHITE +(byte) YELLOW +(byte) c1A +(byte) c1A#1 c1A zp ZP_BYTE:4 1.3636363636363638 +(byte) c1A#3 c1A zp ZP_BYTE:4 0.1911764705882353 +(byte) c1B +(byte) c1B#1 c1B zp ZP_BYTE:5 1.25 +(byte) c1B#3 c1B zp ZP_BYTE:5 0.19402985074626866 +(byte) c2A +(byte) c2A#1 c2A zp ZP_BYTE:6 0.6818181818181819 +(byte) c2A#3 c2A zp ZP_BYTE:6 0.22807017543859648 +(byte) c2B +(byte) c2B#1 c2B zp ZP_BYTE:7 0.6521739130434783 +(byte) c2B#3 c2B zp ZP_BYTE:7 0.23214285714285715 +(void()) doplasma((byte*) doplasma::screen) +(byte~) doplasma::$0 reg byte a 202.0 +(byte~) doplasma::$11 reg byte a 202.0 +(byte~) doplasma::$14 reg byte a 202.0 +(byte~) doplasma::$17 reg byte a 202.0 +(byte~) doplasma::$2 reg byte a 202.0 +(byte~) doplasma::$20 reg byte a 202.0 +(byte~) doplasma::$23 reg byte a 202.0 +(byte~) doplasma::$26 reg byte a 202.0 +(byte~) doplasma::$29 reg byte a 202.0 +(byte~) doplasma::$32 reg byte a 202.0 +(byte~) doplasma::$35 reg byte a 202.0 +(byte~) doplasma::$38 reg byte a 202.0 +(byte~) doplasma::$41 reg byte a 202.0 +(byte~) doplasma::$44 reg byte a 202.0 +(byte~) doplasma::$47 reg byte a 202.0 +(byte~) doplasma::$50 reg byte a 202.0 +(byte~) doplasma::$53 reg byte a 202.0 +(byte~) doplasma::$56 reg byte a 202.0 +(byte~) doplasma::$59 reg byte a 202.0 +(byte~) doplasma::$6 reg byte a 202.0 +(byte~) doplasma::$62 reg byte a 202.0 +(byte~) doplasma::$65 reg byte a 202.0 +(byte~) doplasma::$68 reg byte a 202.0 +(byte~) doplasma::$71 reg byte a 202.0 +(byte~) doplasma::$74 reg byte a 202.0 +(byte~) doplasma::$77 reg byte a 202.0 +(byte~) doplasma::$80 reg byte a 202.0 +(label) doplasma::@1 +(label) doplasma::@2 +(label) doplasma::@3 +(label) doplasma::@4 +(label) doplasma::@5 +(label) doplasma::@6 +(label) doplasma::@6_1 +(label) doplasma::@6_10 +(label) doplasma::@6_11 +(label) doplasma::@6_12 +(label) doplasma::@6_13 +(label) doplasma::@6_14 +(label) doplasma::@6_15 +(label) doplasma::@6_16 +(label) doplasma::@6_17 +(label) doplasma::@6_18 +(label) doplasma::@6_19 +(label) doplasma::@6_2 +(label) doplasma::@6_20 +(label) doplasma::@6_21 +(label) doplasma::@6_22 +(label) doplasma::@6_23 +(label) doplasma::@6_24 +(label) doplasma::@6_3 +(label) doplasma::@6_4 +(label) doplasma::@6_5 +(label) doplasma::@6_6 +(label) doplasma::@6_7 +(label) doplasma::@6_8 +(label) doplasma::@6_9 +(label) doplasma::@7 +(label) doplasma::@return +(byte) doplasma::c1a +(byte) doplasma::c1a#0 c1a zp ZP_BYTE:8 2.0 +(byte) doplasma::c1a#1 c1a zp ZP_BYTE:8 50.5 +(byte) doplasma::c1a#2 c1a zp ZP_BYTE:8 101.66666666666666 +(byte) doplasma::c1b +(byte) doplasma::c1b#0 c1b zp ZP_BYTE:9 4.0 +(byte) doplasma::c1b#1 c1b zp ZP_BYTE:9 67.33333333333333 +(byte) doplasma::c1b#2 c1b zp ZP_BYTE:9 76.25 +(byte) doplasma::c2a +(byte) doplasma::c2a#0 c2a zp ZP_BYTE:8 2.0 +(byte) doplasma::c2a#1 c2a zp ZP_BYTE:8 50.5 +(byte) doplasma::c2a#2 c2a zp ZP_BYTE:8 101.66666666666666 +(byte) doplasma::c2b +(byte) doplasma::c2b#0 c2b zp ZP_BYTE:9 4.0 +(byte) doplasma::c2b#1 c2b zp ZP_BYTE:9 67.33333333333333 +(byte) doplasma::c2b#2 c2b zp ZP_BYTE:9 76.25 +(byte) doplasma::i +(byte) doplasma::i#1 i zp ZP_BYTE:10 151.5 +(byte) doplasma::i#2 i zp ZP_BYTE:10 60.599999999999994 +(byte) doplasma::i1 +(byte) doplasma::i1#1 i1 zp ZP_BYTE:10 151.5 +(byte) doplasma::i1#2 i1 zp ZP_BYTE:10 60.599999999999994 +(byte) doplasma::i2 +(byte) doplasma::i2#1 reg byte x 151.5 +(byte) doplasma::i2#4 reg byte x 102.98039215686288 +(byte) doplasma::ii +(byte*) doplasma::screen +(byte[$28]) doplasma::xbuf +(const byte[$28]) doplasma::xbuf#0 xbuf = { fill( $28, 0) } +(byte[$19]) doplasma::ybuf +(const byte[$19]) doplasma::ybuf#0 ybuf = { fill( $19, 0) } +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(byte*) main::col +(byte*) main::col#1 col zp ZP_WORD:2 16.5 +(byte*) main::col#2 col zp ZP_WORD:2 16.5 +(label) main::toD0181 +(word~) main::toD0181_$0 +(word~) main::toD0181_$1 +(word~) main::toD0181_$2 +(byte~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(byte~) main::toD0181_$6 +(byte~) main::toD0181_$7 +(byte~) main::toD0181_$8 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >((word))(const byte*) SCREEN1#0&(word/signed word/dword/signed dword) $3fff<<(byte/signed byte/word/signed word/dword/signed dword) 2|>((word))(const byte*) CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) $f +(byte*) main::toD0181_screen +(void()) makecharset((byte*) makecharset::charset) +(byte/word~) makecharset::$11 reg byte a 22.0 +(byte~) makecharset::$2 reg byte a 22.0 +(byte~) makecharset::$3 reg byte a 2002.0 +(byte~) makecharset::$4 $4 zp ZP_BYTE:6 2002.0 +(word~) makecharset::$8 $8 zp ZP_WORD:13 202.0 +(word~) makecharset::$9 $9 zp ZP_WORD:13 202.0 +(label) makecharset::@1 +(label) makecharset::@10 +(label) makecharset::@11 +(label) makecharset::@2 +(label) makecharset::@3 +(label) makecharset::@4 +(label) makecharset::@5 +(label) makecharset::@6 +(label) makecharset::@7 +(label) makecharset::@8 +(label) makecharset::@9 +(label) makecharset::@return +(byte) makecharset::b +(byte) makecharset::b#1 reg byte y 2002.0 +(byte) makecharset::b#2 reg byte y 500.5 +(byte) makecharset::b#3 reg byte y 620.8 +(byte[8]) makecharset::bittab +(const byte[8]) makecharset::bittab#0 bittab = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) $10, (byte/signed byte/word/signed word/dword/signed dword) $20, (byte/signed byte/word/signed word/dword/signed dword) $40, (byte/word/signed word/dword/signed dword) $80 } +(word) makecharset::c +(word) makecharset::c#1 c zp ZP_WORD:2 16.5 +(word) makecharset::c#2 c zp ZP_WORD:2 6.041666666666666 +(byte*) makecharset::charset +(byte) makecharset::i +(byte) makecharset::i#1 i zp ZP_BYTE:4 151.5 +(byte) makecharset::i#7 i zp ZP_BYTE:4 21.642857142857142 +(byte) makecharset::ii +(byte) makecharset::ii#1 reg byte x 1501.5 +(byte) makecharset::ii#2 reg byte x 375.375 +(byte) makecharset::s +(byte) makecharset::s#0 s zp ZP_BYTE:5 59.529411764705884 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(const byte) print_char::ch#0 ch = (byte) '.' +(byte*) print_char_cursor +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:11 4.333333333333333 +(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:11 11.0 +(byte*) print_char_cursor#45 print_char_cursor zp ZP_WORD:11 1.1304347826086956 +(void()) print_cls() +(label) print_cls::@1 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5 +(byte[]) print_hextab +(byte*) print_line_cursor +(const byte*) print_line_cursor#0 print_line_cursor = ((byte*))(word/signed word/dword/signed dword) $400 +(byte*) print_screen +(byte()) sid_rnd() +(label) sid_rnd::@return +(byte) sid_rnd::return +(byte) sid_rnd::return#0 reg byte a 334.33333333333337 +(byte) sid_rnd::return#2 reg byte a 2002.0 +(void()) sid_rnd_init() +(label) sid_rnd_init::@return + +zp ZP_WORD:2 [ main::col#2 main::col#1 makecharset::c#2 makecharset::c#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_BYTE:4 [ c1A#1 c1A#3 makecharset::i#7 makecharset::i#1 ] +zp ZP_BYTE:5 [ c1B#1 c1B#3 makecharset::s#0 ] +zp ZP_BYTE:6 [ c2A#1 c2A#3 makecharset::$4 ] +zp ZP_BYTE:7 [ c2B#1 c2B#3 ] +zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 doplasma::i1#2 doplasma::i1#1 ] +reg byte x [ doplasma::i2#4 doplasma::i2#1 ] +zp ZP_WORD:11 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] +reg byte x [ makecharset::ii#2 makecharset::ii#1 ] +reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] +reg byte a [ doplasma::$0 ] +reg byte a [ doplasma::$2 ] +reg byte a [ doplasma::$6 ] +reg byte a [ doplasma::$11 ] +reg byte a [ doplasma::$14 ] +reg byte a [ doplasma::$17 ] +reg byte a [ doplasma::$20 ] +reg byte a [ doplasma::$23 ] +reg byte a [ doplasma::$26 ] +reg byte a [ doplasma::$29 ] +reg byte a [ doplasma::$32 ] +reg byte a [ doplasma::$35 ] +reg byte a [ doplasma::$38 ] +reg byte a [ doplasma::$41 ] +reg byte a [ doplasma::$44 ] +reg byte a [ doplasma::$47 ] +reg byte a [ doplasma::$50 ] +reg byte a [ doplasma::$53 ] +reg byte a [ doplasma::$56 ] +reg byte a [ doplasma::$59 ] +reg byte a [ doplasma::$62 ] +reg byte a [ doplasma::$65 ] +reg byte a [ doplasma::$68 ] +reg byte a [ doplasma::$71 ] +reg byte a [ doplasma::$74 ] +reg byte a [ doplasma::$77 ] +reg byte a [ doplasma::$80 ] +reg byte a [ makecharset::$2 ] +reg byte a [ sid_rnd::return#2 ] +reg byte a [ makecharset::$3 ] +zp ZP_WORD:13 [ makecharset::$8 makecharset::$9 ] +reg byte a [ makecharset::$11 ] +reg byte a [ sid_rnd::return#0 ] + + +FINAL ASSEMBLER +Score: 102900 + +//SEG0 File Comments +// A KickC version of the plasma routine from the CC65 samples +// This version has an unrolled inner loop to reach ~50FPS +// (w)2001 by groepaz/hitmen +// Cleanup and porting to CC65 by Ullrich von Bassewitz. +// Ported to KickC by Jesper Gravgaard. +// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label D018 = $d018 + // Color Ram + .label COLS = $d800 + // The colors of the C64 + .const BLACK = 0 + .const BLUE = 6 + .label print_line_cursor = $400 + // SID registers for random number generation + .label SID_VOICE3_FREQ = $d40e + .label SID_VOICE3_CONTROL = $d412 + .const SID_CONTROL_NOISE = $80 + .label SID_VOICE3_OSC = $d41b + .label SCREEN1 = $2800 + .label CHARSET = $2000 + .label SINTABLE = $1f00 + .label print_char_cursor = $b + .label c1A = 4 + .label c1B = 5 + .label c2A = 6 + .label c2B = 7 +//SEG3 @begin +//SEG4 @1 +//SEG5 kickasm(location (const byte*) SINTABLE#0) {{ .for(var i=0;i<$100;i++) .byte round(127.5+127.5*sin(toRadians(360*i/256))) }} +//SEG6 [2] phi from @1 to @2 [phi:@1->@2] +//SEG7 @2 +//SEG8 [3] call main +//SEG9 [4] phi from @2 to @end [phi:@2->@end] +//SEG10 @end +//SEG11 main +main: { + .const toD0181_return = (>(SCREEN1&$3fff)<<2)|(>CHARSET)>>2&$f + .label col = 2 + //SEG12 asm { sei } + sei + //SEG13 [6] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + lda #BLUE + sta BORDERCOL + //SEG14 [7] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + sta BGCOL + //SEG15 [8] phi from main to main::@1 [phi:main->main::@1] + //SEG16 [8] phi (byte*) main::col#2 = (const byte*) COLS#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #COLS + sta col+1 + //SEG17 [8] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG18 [8] phi (byte*) main::col#2 = (byte*) main::col#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG19 main::@1 + b1: + //SEG20 [9] *((byte*) main::col#2) ← (const byte) BLACK#0 -- _deref_pbuz1=vbuc1 + lda #BLACK + ldy #0 + sta (col),y + //SEG21 [10] (byte*) main::col#1 ← ++ (byte*) main::col#2 -- pbuz1=_inc_pbuz1 + inc col + bne !+ + inc col+1 + !: + //SEG22 [11] if((byte*) main::col#1!=(byte*)(const byte*) COLS#0+(word/signed word/dword/signed dword) $3e8+(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@1 -- pbuz1_neq_pbuc1_then_la1 + lda col+1 + cmp #>COLS+$3e8+1 + bne b1 + lda col + cmp #main::@2] + //SEG24 main::@2 + //SEG25 [13] call makecharset + //SEG26 [95] phi from main::@2 to makecharset [phi:main::@2->makecharset] + jsr makecharset + //SEG27 [14] phi from main::@2 to main::toD0181 [phi:main::@2->main::toD0181] + //SEG28 main::toD0181 + //SEG29 main::@5 + //SEG30 [15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG31 [16] phi from main::@5 to main::@3 [phi:main::@5->main::@3] + //SEG32 [16] phi (byte) c2B#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#0] -- vbuz1=vbuc1 + lda #0 + sta c2B + //SEG33 [16] phi (byte) c2A#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#1] -- vbuz1=vbuc1 + sta c2A + //SEG34 [16] phi (byte) c1B#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#2] -- vbuz1=vbuc1 + sta c1B + //SEG35 [16] phi (byte) c1A#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@5->main::@3#3] -- vbuz1=vbuc1 + sta c1A + //SEG36 main::@3 + //SEG37 [17] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + //SEG38 main::@4 + b4: + //SEG39 [18] call doplasma + jsr doplasma + //SEG40 [16] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + //SEG41 [16] phi (byte) c2B#1 = (byte) c2B#3 [phi:main::@4->main::@3#0] -- register_copy + //SEG42 [16] phi (byte) c2A#1 = (byte) c2A#3 [phi:main::@4->main::@3#1] -- register_copy + //SEG43 [16] phi (byte) c1B#1 = (byte) c1B#3 [phi:main::@4->main::@3#2] -- register_copy + //SEG44 [16] phi (byte) c1A#1 = (byte) c1A#3 [phi:main::@4->main::@3#3] -- register_copy + jmp b4 +} +//SEG45 doplasma +// Render plasma to the passed screen +doplasma: { + .label c1a = 8 + .label c1b = 9 + .label i = $a + .label c2a = 8 + .label c2b = 9 + .label i1 = $a + //SEG46 [19] (byte) doplasma::c1a#0 ← (byte) c1A#1 -- vbuz1=vbuz2 + lda c1A + sta c1a + //SEG47 [20] (byte) doplasma::c1b#0 ← (byte) c1B#1 -- vbuz1=vbuz2 + lda c1B + sta c1b + //SEG48 [21] phi from doplasma to doplasma::@1 [phi:doplasma->doplasma::@1] + //SEG49 [21] phi (byte) doplasma::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma->doplasma::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG50 [21] phi (byte) doplasma::c1b#2 = (byte) doplasma::c1b#0 [phi:doplasma->doplasma::@1#1] -- register_copy + //SEG51 [21] phi (byte) doplasma::c1a#2 = (byte) doplasma::c1a#0 [phi:doplasma->doplasma::@1#2] -- register_copy + //SEG52 [21] phi from doplasma::@1 to doplasma::@1 [phi:doplasma::@1->doplasma::@1] + //SEG53 [21] phi (byte) doplasma::i#2 = (byte) doplasma::i#1 [phi:doplasma::@1->doplasma::@1#0] -- register_copy + //SEG54 [21] phi (byte) doplasma::c1b#2 = (byte) doplasma::c1b#1 [phi:doplasma::@1->doplasma::@1#1] -- register_copy + //SEG55 [21] phi (byte) doplasma::c1a#2 = (byte) doplasma::c1a#1 [phi:doplasma::@1->doplasma::@1#2] -- register_copy + //SEG56 doplasma::@1 + b1: + //SEG57 [22] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2) -- vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuz2 + ldy c1a + lda SINTABLE,y + ldy c1b + clc + adc SINTABLE,y + //SEG58 [23] *((const byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$0 -- pbuc1_derefidx_vbuz1=vbuaa + ldy i + sta ybuf,y + //SEG59 [24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz1_plus_vbuc1 + lax c1a + axs #-[4] + stx c1a + //SEG60 [25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 -- vbuz1=vbuz1_plus_vbuc1 + lax c1b + axs #-[9] + stx c1b + //SEG61 [26] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG62 [27] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@1 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$19 + bcc b1 + //SEG63 doplasma::@2 + //SEG64 [28] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 + lax c1A + axs #-[3] + stx c1A + //SEG65 [29] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5 -- vbuz1=vbuz1_minus_vbuc1 + lax c1B + axs #5 + stx c1B + //SEG66 [30] (byte) doplasma::c2a#0 ← (byte) c2A#1 -- vbuz1=vbuz2 + lda c2A + sta c2a + //SEG67 [31] (byte) doplasma::c2b#0 ← (byte) c2B#1 -- vbuz1=vbuz2 + lda c2B + sta c2b + //SEG68 [32] phi from doplasma::@2 to doplasma::@3 [phi:doplasma::@2->doplasma::@3] + //SEG69 [32] phi (byte) doplasma::i1#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma::@2->doplasma::@3#0] -- vbuz1=vbuc1 + lda #0 + sta i1 + //SEG70 [32] phi (byte) doplasma::c2b#2 = (byte) doplasma::c2b#0 [phi:doplasma::@2->doplasma::@3#1] -- register_copy + //SEG71 [32] phi (byte) doplasma::c2a#2 = (byte) doplasma::c2a#0 [phi:doplasma::@2->doplasma::@3#2] -- register_copy + //SEG72 [32] phi from doplasma::@3 to doplasma::@3 [phi:doplasma::@3->doplasma::@3] + //SEG73 [32] phi (byte) doplasma::i1#2 = (byte) doplasma::i1#1 [phi:doplasma::@3->doplasma::@3#0] -- register_copy + //SEG74 [32] phi (byte) doplasma::c2b#2 = (byte) doplasma::c2b#1 [phi:doplasma::@3->doplasma::@3#1] -- register_copy + //SEG75 [32] phi (byte) doplasma::c2a#2 = (byte) doplasma::c2a#1 [phi:doplasma::@3->doplasma::@3#2] -- register_copy + //SEG76 doplasma::@3 + b3: + //SEG77 [33] (byte~) doplasma::$2 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2) -- vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuz2 + ldy c2a + lda SINTABLE,y + ldy c2b + clc + adc SINTABLE,y + //SEG78 [34] *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$2 -- pbuc1_derefidx_vbuz1=vbuaa + ldy i1 + sta xbuf,y + //SEG79 [35] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1 + lax c2a + axs #-[3] + stx c2a + //SEG80 [36] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz1_plus_vbuc1 + lax c2b + axs #-[7] + stx c2b + //SEG81 [37] (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2 -- vbuz1=_inc_vbuz1 + inc i1 + //SEG82 [38] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3 -- vbuz1_lt_vbuc1_then_la1 + lda i1 + cmp #$28 + bcc b3 + //SEG83 doplasma::@4 + //SEG84 [39] (byte) c2A#3 ← (byte) c2A#1 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuz1=vbuz1_plus_2 + lda c2A + clc + adc #2 + sta c2A + //SEG85 [40] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_minus_vbuc1 + lax c2B + axs #3 + stx c2B + //SEG86 [41] phi from doplasma::@4 to doplasma::@5 [phi:doplasma::@4->doplasma::@5] + //SEG87 [41] phi (byte) doplasma::i2#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:doplasma::@4->doplasma::@5#0] -- vbuxx=vbuc1 + ldx #0 + //SEG88 [41] phi from doplasma::@7 to doplasma::@5 [phi:doplasma::@7->doplasma::@5] + //SEG89 [41] phi (byte) doplasma::i2#4 = (byte) doplasma::i2#1 [phi:doplasma::@7->doplasma::@5#0] -- register_copy + //SEG90 doplasma::@5 + //SEG91 doplasma::@6 + b6: + //SEG92 [42] (byte~) doplasma::$6 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf + //SEG93 [43] *((const byte*) SCREEN1#0 + (byte) doplasma::i2#4) ← (byte~) doplasma::$6 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1,x + //SEG94 doplasma::@6_1 + //SEG95 [44] (byte~) doplasma::$11 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+1 + //SEG96 [45] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$11 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+1*$28,x + //SEG97 doplasma::@6_2 + //SEG98 [46] (byte~) doplasma::$14 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+2 + //SEG99 [47] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$14 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+2*$28,x + //SEG100 doplasma::@6_3 + //SEG101 [48] (byte~) doplasma::$17 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+3 + //SEG102 [49] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 3*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$17 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+3*$28,x + //SEG103 doplasma::@6_4 + //SEG104 [50] (byte~) doplasma::$20 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+4 + //SEG105 [51] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$20 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+4*$28,x + //SEG106 doplasma::@6_5 + //SEG107 [52] (byte~) doplasma::$23 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+5 + //SEG108 [53] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 5*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$23 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+5*$28,x + //SEG109 doplasma::@6_6 + //SEG110 [54] (byte~) doplasma::$26 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+6 + //SEG111 [55] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 6*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$26 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+6*$28,x + //SEG112 doplasma::@6_7 + //SEG113 [56] (byte~) doplasma::$29 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+7 + //SEG114 [57] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 7*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$29 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+7*$28,x + //SEG115 doplasma::@6_8 + //SEG116 [58] (byte~) doplasma::$32 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+8 + //SEG117 [59] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 8*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$32 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+8*$28,x + //SEG118 doplasma::@6_9 + //SEG119 [60] (byte~) doplasma::$35 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+9 + //SEG120 [61] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 9*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$35 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+9*$28,x + //SEG121 doplasma::@6_10 + //SEG122 [62] (byte~) doplasma::$38 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$a + //SEG123 [63] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $a*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$38 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$a*$28,x + //SEG124 doplasma::@6_11 + //SEG125 [64] (byte~) doplasma::$41 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$b + //SEG126 [65] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $b*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$41 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$b*$28,x + //SEG127 doplasma::@6_12 + //SEG128 [66] (byte~) doplasma::$44 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$c + //SEG129 [67] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $c*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$44 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$c*$28,x + //SEG130 doplasma::@6_13 + //SEG131 [68] (byte~) doplasma::$47 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$d + //SEG132 [69] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $d*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$47 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$d*$28,x + //SEG133 doplasma::@6_14 + //SEG134 [70] (byte~) doplasma::$50 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$e + //SEG135 [71] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $e*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$50 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$e*$28,x + //SEG136 doplasma::@6_15 + //SEG137 [72] (byte~) doplasma::$53 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$f + //SEG138 [73] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $f*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$53 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$f*$28,x + //SEG139 doplasma::@6_16 + //SEG140 [74] (byte~) doplasma::$56 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$10 + //SEG141 [75] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $10*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$56 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$10*$28,x + //SEG142 doplasma::@6_17 + //SEG143 [76] (byte~) doplasma::$59 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$11 + //SEG144 [77] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $11*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$59 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$11*$28,x + //SEG145 doplasma::@6_18 + //SEG146 [78] (byte~) doplasma::$62 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$12 + //SEG147 [79] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $12*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$62 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$12*$28,x + //SEG148 doplasma::@6_19 + //SEG149 [80] (byte~) doplasma::$65 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$13 + //SEG150 [81] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $13*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$65 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$13*$28,x + //SEG151 doplasma::@6_20 + //SEG152 [82] (byte~) doplasma::$68 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$14 + //SEG153 [83] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $14*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$68 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$14*$28,x + //SEG154 doplasma::@6_21 + //SEG155 [84] (byte~) doplasma::$71 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$15 + //SEG156 [85] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $15*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$71 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$15*$28,x + //SEG157 doplasma::@6_22 + //SEG158 [86] (byte~) doplasma::$74 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$16 + //SEG159 [87] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $16*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$74 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$16*$28,x + //SEG160 doplasma::@6_23 + //SEG161 [88] (byte~) doplasma::$77 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$17 + //SEG162 [89] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $17*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$77 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$17*$28,x + //SEG163 doplasma::@6_24 + //SEG164 [90] (byte~) doplasma::$80 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#4) + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18) -- vbuaa=pbuc1_derefidx_vbuxx_plus__deref_pbuc2 + lda xbuf,x + clc + adc ybuf+$18 + //SEG165 [91] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#4) ← (byte~) doplasma::$80 -- pbuc1_derefidx_vbuxx=vbuaa + sta SCREEN1+$18*$28,x + //SEG166 doplasma::@7 + //SEG167 [92] (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#4 -- vbuxx=_inc_vbuxx + inx + //SEG168 [93] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5 -- vbuxx_lt_vbuc1_then_la1 + cpx #$28 + bcs !b6+ + jmp b6 + !b6: + //SEG169 doplasma::@return + //SEG170 [94] return + rts + xbuf: .fill $28, 0 + ybuf: .fill $19, 0 +} +//SEG171 makecharset +// Make a plasma-friendly charset where the chars are randomly filled +makecharset: { + .label _4 = 6 + .label _8 = $d + .label _9 = $d + .label s = 5 + .label i = 4 + .label c = 2 + //SEG172 [96] call sid_rnd_init + jsr sid_rnd_init + //SEG173 [97] phi from makecharset to makecharset::@10 [phi:makecharset->makecharset::@10] + //SEG174 makecharset::@10 + //SEG175 [98] call print_cls + //SEG176 [131] phi from makecharset::@10 to print_cls [phi:makecharset::@10->print_cls] + jsr print_cls + //SEG177 [99] phi from makecharset::@10 to makecharset::@1 [phi:makecharset::@10->makecharset::@1] + //SEG178 [99] phi (byte*) print_char_cursor#45 = (const byte*) print_line_cursor#0 [phi:makecharset::@10->makecharset::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta print_char_cursor+1 + //SEG179 [99] phi (word) makecharset::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@10->makecharset::@1#1] -- vwuz1=vbuc1 + lda #0 + sta c + sta c+1 + //SEG180 [99] phi from makecharset::@9 to makecharset::@1 [phi:makecharset::@9->makecharset::@1] + //SEG181 [99] phi (byte*) print_char_cursor#45 = (byte*) print_char_cursor#18 [phi:makecharset::@9->makecharset::@1#0] -- register_copy + //SEG182 [99] phi (word) makecharset::c#2 = (word) makecharset::c#1 [phi:makecharset::@9->makecharset::@1#1] -- register_copy + //SEG183 makecharset::@1 + b1: + //SEG184 [100] (byte~) makecharset::$2 ← < (word) makecharset::c#2 -- vbuaa=_lo_vwuz1 + lda c + //SEG185 [101] (byte) makecharset::s#0 ← *((const byte*) SINTABLE#0 + (byte~) makecharset::$2) -- vbuz1=pbuc1_derefidx_vbuaa + tay + lda SINTABLE,y + sta s + //SEG186 [102] phi from makecharset::@1 to makecharset::@2 [phi:makecharset::@1->makecharset::@2] + //SEG187 [102] phi (byte) makecharset::i#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@1->makecharset::@2#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG188 [102] phi from makecharset::@6 to makecharset::@2 [phi:makecharset::@6->makecharset::@2] + //SEG189 [102] phi (byte) makecharset::i#7 = (byte) makecharset::i#1 [phi:makecharset::@6->makecharset::@2#0] -- register_copy + //SEG190 makecharset::@2 + b2: + //SEG191 [103] phi from makecharset::@2 to makecharset::@3 [phi:makecharset::@2->makecharset::@3] + //SEG192 [103] phi (byte) makecharset::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#0] -- vbuyy=vbuc1 + ldy #0 + //SEG193 [103] phi (byte) makecharset::ii#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:makecharset::@2->makecharset::@3#1] -- vbuxx=vbuc1 + ldx #0 + //SEG194 [103] phi from makecharset::@4 to makecharset::@3 [phi:makecharset::@4->makecharset::@3] + //SEG195 [103] phi (byte) makecharset::b#2 = (byte) makecharset::b#3 [phi:makecharset::@4->makecharset::@3#0] -- register_copy + //SEG196 [103] phi (byte) makecharset::ii#2 = (byte) makecharset::ii#1 [phi:makecharset::@4->makecharset::@3#1] -- register_copy + //SEG197 makecharset::@3 + b3: + //SEG198 [104] call sid_rnd + jsr sid_rnd + //SEG199 [105] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0 + //SEG200 makecharset::@11 + //SEG201 [106] (byte~) makecharset::$3 ← (byte) sid_rnd::return#2 + //SEG202 [107] (byte~) makecharset::$4 ← (byte~) makecharset::$3 & (byte/word/signed word/dword/signed dword) $ff -- vbuz1=vbuaa_band_vbuc1 + and #$ff + sta _4 + //SEG203 [108] if((byte~) makecharset::$4<=(byte) makecharset::s#0) goto makecharset::@4 -- vbuz1_le_vbuz2_then_la1 + lda s + cmp _4 + bcs b4 + //SEG204 makecharset::@5 + //SEG205 [109] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const byte[8]) makecharset::bittab#0 + (byte) makecharset::ii#2) -- vbuyy=vbuyy_bor_pbuc1_derefidx_vbuxx + tya + ora bittab,x + tay + //SEG206 [110] phi from makecharset::@11 makecharset::@5 to makecharset::@4 [phi:makecharset::@11/makecharset::@5->makecharset::@4] + //SEG207 [110] phi (byte) makecharset::b#3 = (byte) makecharset::b#2 [phi:makecharset::@11/makecharset::@5->makecharset::@4#0] -- register_copy + //SEG208 makecharset::@4 + b4: + //SEG209 [111] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 -- vbuxx=_inc_vbuxx + inx + //SEG210 [112] if((byte) makecharset::ii#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@3 -- vbuxx_lt_vbuc1_then_la1 + cpx #8 + bcc b3 + //SEG211 makecharset::@6 + //SEG212 [113] (word~) makecharset::$8 ← (word) makecharset::c#2 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz2_rol_3 + lda c + asl + sta _8 + lda c+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG213 [114] (word~) makecharset::$9 ← (word~) makecharset::$8 + (byte) makecharset::i#7 -- vwuz1=vwuz1_plus_vbuz2 + lda i + clc + adc _9 + sta _9 + bcc !+ + inc _9+1 + !: + //SEG214 [115] *((const byte*) CHARSET#0 + (word~) makecharset::$9) ← (byte) makecharset::b#3 -- pbuc1_derefidx_vwuz1=vbuyy + tya + sta !v++1 + lda #CHARSET + adc _9+1 + sta !a++2 + !v: + lda #0 + !a: + sta CHARSET + //SEG215 [116] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#7 -- vbuz1=_inc_vbuz1 + inc i + //SEG216 [117] if((byte) makecharset::i#1<(byte/signed byte/word/signed word/dword/signed dword) 8) goto makecharset::@2 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #8 + bcc b2 + //SEG217 makecharset::@7 + //SEG218 [118] (byte/word~) makecharset::$11 ← (word) makecharset::c#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vwuz1_band_vbuc1 + lda c + and #7 + //SEG219 [119] if((byte/word~) makecharset::$11!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto makecharset::@9 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b9 + //SEG220 [120] phi from makecharset::@7 to makecharset::@8 [phi:makecharset::@7->makecharset::@8] + //SEG221 makecharset::@8 + //SEG222 [121] call print_char + jsr print_char + //SEG223 [122] phi from makecharset::@7 makecharset::@8 to makecharset::@9 [phi:makecharset::@7/makecharset::@8->makecharset::@9] + //SEG224 [122] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#45 [phi:makecharset::@7/makecharset::@8->makecharset::@9#0] -- register_copy + //SEG225 makecharset::@9 + b9: + //SEG226 [123] (word) makecharset::c#1 ← ++ (word) makecharset::c#2 -- vwuz1=_inc_vwuz1 + inc c + bne !+ + inc c+1 + !: + //SEG227 [124] if((word) makecharset::c#1<(word/signed word/dword/signed dword) $100) goto makecharset::@1 -- vwuz1_lt_vwuc1_then_la1 + lda c+1 + cmp #>$100 + bcc b1 + bne !+ + lda c + cmp #<$100 + bcs !b1+ + jmp b1 + !b1: + !: + //SEG228 makecharset::@return + //SEG229 [125] return + rts + bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 +} +//SEG230 print_char +// Print a single char +print_char: { + .const ch = '.' + //SEG231 [126] *((byte*) print_char_cursor#45) ← (const byte) print_char::ch#0 -- _deref_pbuz1=vbuc1 + lda #ch + ldy #0 + sta (print_char_cursor),y + //SEG232 [127] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#45 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + //SEG233 print_char::@return + //SEG234 [128] return + rts +} +//SEG235 sid_rnd +// Get a random number from the SID voice 3, +// Must be initialized with sid_rnd_init() +sid_rnd: { + //SEG236 [129] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) -- vbuaa=_deref_pbuc1 + lda SID_VOICE3_OSC + //SEG237 sid_rnd::@return + //SEG238 [130] return + rts +} +//SEG239 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = 2 + //SEG240 [132] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + //SEG241 [132] phi (byte*) print_cls::sc#2 = (const byte*) print_line_cursor#0 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #print_line_cursor + sta sc+1 + //SEG242 [132] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + //SEG243 [132] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + //SEG244 print_cls::@1 + b1: + //SEG245 [133] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG246 [134] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG247 [135] if((byte*) print_cls::sc#1!=(const byte*) print_line_cursor#0+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>print_line_cursor+$3e8 + bne b1 + lda sc + cmp #$ffff + sta SID_VOICE3_FREQ+1 + //SEG252 [138] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 -- _deref_pbuc1=vbuc2 + lda #SID_CONTROL_NOISE + sta SID_VOICE3_CONTROL + //SEG253 sid_rnd_init::@return + //SEG254 [139] return + rts +} +.pc = SINTABLE "SINTABLE" + .for(var i=0;i<$100;i++) + .byte round(127.5+127.5*sin(toRadians(360*i/256))) + + diff --git a/src/test/ref/examples/plasma/plasma-unroll.sym b/src/test/ref/examples/plasma/plasma-unroll.sym new file mode 100644 index 000000000..608a2a329 --- /dev/null +++ b/src/test/ref/examples/plasma/plasma-unroll.sym @@ -0,0 +1,346 @@ +(label) @1 +(label) @2 +(label) @begin +(label) @end +(byte*) BGCOL +(const byte*) BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) $d021 +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(const byte) BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0 +(byte) BLUE +(const byte) BLUE#0 BLUE = (byte/signed byte/word/signed word/dword/signed dword) 6 +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) $d020 +(byte) BROWN +(byte*) CHARGEN +(byte*) CHARSET +(const byte*) CHARSET#0 CHARSET = ((byte*))(word/signed word/dword/signed dword) $2000 +(byte*) CIA1_INTERRUPT +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B_DDR +(byte*) CIA2_INTERRUPT +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B_DDR +(byte) CIA_INTERRUPT_CLEAR +(byte*) COLS +(const byte*) COLS#0 COLS = ((byte*))(word/dword/signed dword) $d800 +(byte) CYAN +(byte*) D011 +(byte*) D016 +(byte*) D018 +(const byte*) D018#0 D018 = ((byte*))(word/dword/signed dword) $d018 +(byte) DARK_GREY +(byte) GREEN +(byte) GREY +(void()**) HARDWARE_IRQ +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_SPRITE +(byte*) IRQ_ENABLE +(byte) IRQ_LIGHTPEN +(byte) IRQ_RASTER +(byte*) IRQ_STATUS +(void()**) KERNEL_IRQ +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_Y +(byte) LIGHT_BLUE +(byte) LIGHT_GREEN +(byte) LIGHT_GREY +(byte) ORANGE +(byte) PINK +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte) PURPLE +(byte*) RASTER +(byte) RED +(byte*) SCREEN1 +(const byte*) SCREEN1#0 SCREEN1 = ((byte*))(word/signed word/dword/signed dword) $2800 +(byte) SID_CONTROL_GATE +(byte) SID_CONTROL_NOISE +(const byte) SID_CONTROL_NOISE#0 SID_CONTROL_NOISE = (byte/word/signed word/dword/signed dword) $80 +(byte) SID_CONTROL_PULSE +(byte) SID_CONTROL_RING +(byte) SID_CONTROL_SAWTOOTH +(byte) SID_CONTROL_SYNC +(byte) SID_CONTROL_TEST +(byte) SID_CONTROL_TRIANGLE +(byte*) SID_VOICE3_CONTROL +(const byte*) SID_VOICE3_CONTROL#0 SID_VOICE3_CONTROL = ((byte*))(word/dword/signed dword) $d412 +(word*) SID_VOICE3_FREQ +(const word*) SID_VOICE3_FREQ#0 SID_VOICE3_FREQ = ((word*))(word/dword/signed dword) $d40e +(byte*) SID_VOICE3_FREQ_HIGH +(byte*) SID_VOICE3_FREQ_LOW +(byte*) SID_VOICE3_OSC +(const byte*) SID_VOICE3_OSC#0 SID_VOICE3_OSC = ((byte*))(word/dword/signed dword) $d41b +(byte*) SINTABLE +(const byte*) SINTABLE#0 SINTABLE = ((byte*))(word/signed word/dword/signed dword) $1f00 +(byte*) SPRITES_COLS +(byte*) SPRITES_ENABLE +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_MC +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC2 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_XMSB +(byte*) SPRITES_XPOS +(byte*) SPRITES_YPOS +(word) SPRITE_PTRS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(byte) VIC_RST8 +(byte) WHITE +(byte) YELLOW +(byte) c1A +(byte) c1A#1 c1A zp ZP_BYTE:4 1.3636363636363638 +(byte) c1A#3 c1A zp ZP_BYTE:4 0.1911764705882353 +(byte) c1B +(byte) c1B#1 c1B zp ZP_BYTE:5 1.25 +(byte) c1B#3 c1B zp ZP_BYTE:5 0.19402985074626866 +(byte) c2A +(byte) c2A#1 c2A zp ZP_BYTE:6 0.6818181818181819 +(byte) c2A#3 c2A zp ZP_BYTE:6 0.22807017543859648 +(byte) c2B +(byte) c2B#1 c2B zp ZP_BYTE:7 0.6521739130434783 +(byte) c2B#3 c2B zp ZP_BYTE:7 0.23214285714285715 +(void()) doplasma((byte*) doplasma::screen) +(byte~) doplasma::$0 reg byte a 202.0 +(byte~) doplasma::$11 reg byte a 202.0 +(byte~) doplasma::$14 reg byte a 202.0 +(byte~) doplasma::$17 reg byte a 202.0 +(byte~) doplasma::$2 reg byte a 202.0 +(byte~) doplasma::$20 reg byte a 202.0 +(byte~) doplasma::$23 reg byte a 202.0 +(byte~) doplasma::$26 reg byte a 202.0 +(byte~) doplasma::$29 reg byte a 202.0 +(byte~) doplasma::$32 reg byte a 202.0 +(byte~) doplasma::$35 reg byte a 202.0 +(byte~) doplasma::$38 reg byte a 202.0 +(byte~) doplasma::$41 reg byte a 202.0 +(byte~) doplasma::$44 reg byte a 202.0 +(byte~) doplasma::$47 reg byte a 202.0 +(byte~) doplasma::$50 reg byte a 202.0 +(byte~) doplasma::$53 reg byte a 202.0 +(byte~) doplasma::$56 reg byte a 202.0 +(byte~) doplasma::$59 reg byte a 202.0 +(byte~) doplasma::$6 reg byte a 202.0 +(byte~) doplasma::$62 reg byte a 202.0 +(byte~) doplasma::$65 reg byte a 202.0 +(byte~) doplasma::$68 reg byte a 202.0 +(byte~) doplasma::$71 reg byte a 202.0 +(byte~) doplasma::$74 reg byte a 202.0 +(byte~) doplasma::$77 reg byte a 202.0 +(byte~) doplasma::$80 reg byte a 202.0 +(label) doplasma::@1 +(label) doplasma::@2 +(label) doplasma::@3 +(label) doplasma::@4 +(label) doplasma::@5 +(label) doplasma::@6 +(label) doplasma::@6_1 +(label) doplasma::@6_10 +(label) doplasma::@6_11 +(label) doplasma::@6_12 +(label) doplasma::@6_13 +(label) doplasma::@6_14 +(label) doplasma::@6_15 +(label) doplasma::@6_16 +(label) doplasma::@6_17 +(label) doplasma::@6_18 +(label) doplasma::@6_19 +(label) doplasma::@6_2 +(label) doplasma::@6_20 +(label) doplasma::@6_21 +(label) doplasma::@6_22 +(label) doplasma::@6_23 +(label) doplasma::@6_24 +(label) doplasma::@6_3 +(label) doplasma::@6_4 +(label) doplasma::@6_5 +(label) doplasma::@6_6 +(label) doplasma::@6_7 +(label) doplasma::@6_8 +(label) doplasma::@6_9 +(label) doplasma::@7 +(label) doplasma::@return +(byte) doplasma::c1a +(byte) doplasma::c1a#0 c1a zp ZP_BYTE:8 2.0 +(byte) doplasma::c1a#1 c1a zp ZP_BYTE:8 50.5 +(byte) doplasma::c1a#2 c1a zp ZP_BYTE:8 101.66666666666666 +(byte) doplasma::c1b +(byte) doplasma::c1b#0 c1b zp ZP_BYTE:9 4.0 +(byte) doplasma::c1b#1 c1b zp ZP_BYTE:9 67.33333333333333 +(byte) doplasma::c1b#2 c1b zp ZP_BYTE:9 76.25 +(byte) doplasma::c2a +(byte) doplasma::c2a#0 c2a zp ZP_BYTE:8 2.0 +(byte) doplasma::c2a#1 c2a zp ZP_BYTE:8 50.5 +(byte) doplasma::c2a#2 c2a zp ZP_BYTE:8 101.66666666666666 +(byte) doplasma::c2b +(byte) doplasma::c2b#0 c2b zp ZP_BYTE:9 4.0 +(byte) doplasma::c2b#1 c2b zp ZP_BYTE:9 67.33333333333333 +(byte) doplasma::c2b#2 c2b zp ZP_BYTE:9 76.25 +(byte) doplasma::i +(byte) doplasma::i#1 i zp ZP_BYTE:10 151.5 +(byte) doplasma::i#2 i zp ZP_BYTE:10 60.599999999999994 +(byte) doplasma::i1 +(byte) doplasma::i1#1 i1 zp ZP_BYTE:10 151.5 +(byte) doplasma::i1#2 i1 zp ZP_BYTE:10 60.599999999999994 +(byte) doplasma::i2 +(byte) doplasma::i2#1 reg byte x 151.5 +(byte) doplasma::i2#4 reg byte x 102.98039215686288 +(byte) doplasma::ii +(byte*) doplasma::screen +(byte[$28]) doplasma::xbuf +(const byte[$28]) doplasma::xbuf#0 xbuf = { fill( $28, 0) } +(byte[$19]) doplasma::ybuf +(const byte[$19]) doplasma::ybuf#0 ybuf = { fill( $19, 0) } +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(byte*) main::col +(byte*) main::col#1 col zp ZP_WORD:2 16.5 +(byte*) main::col#2 col zp ZP_WORD:2 16.5 +(label) main::toD0181 +(word~) main::toD0181_$0 +(word~) main::toD0181_$1 +(word~) main::toD0181_$2 +(byte~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(byte~) main::toD0181_$6 +(byte~) main::toD0181_$7 +(byte~) main::toD0181_$8 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >((word))(const byte*) SCREEN1#0&(word/signed word/dword/signed dword) $3fff<<(byte/signed byte/word/signed word/dword/signed dword) 2|>((word))(const byte*) CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) $f +(byte*) main::toD0181_screen +(void()) makecharset((byte*) makecharset::charset) +(byte/word~) makecharset::$11 reg byte a 22.0 +(byte~) makecharset::$2 reg byte a 22.0 +(byte~) makecharset::$3 reg byte a 2002.0 +(byte~) makecharset::$4 $4 zp ZP_BYTE:6 2002.0 +(word~) makecharset::$8 $8 zp ZP_WORD:13 202.0 +(word~) makecharset::$9 $9 zp ZP_WORD:13 202.0 +(label) makecharset::@1 +(label) makecharset::@10 +(label) makecharset::@11 +(label) makecharset::@2 +(label) makecharset::@3 +(label) makecharset::@4 +(label) makecharset::@5 +(label) makecharset::@6 +(label) makecharset::@7 +(label) makecharset::@8 +(label) makecharset::@9 +(label) makecharset::@return +(byte) makecharset::b +(byte) makecharset::b#1 reg byte y 2002.0 +(byte) makecharset::b#2 reg byte y 500.5 +(byte) makecharset::b#3 reg byte y 620.8 +(byte[8]) makecharset::bittab +(const byte[8]) makecharset::bittab#0 bittab = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) $10, (byte/signed byte/word/signed word/dword/signed dword) $20, (byte/signed byte/word/signed word/dword/signed dword) $40, (byte/word/signed word/dword/signed dword) $80 } +(word) makecharset::c +(word) makecharset::c#1 c zp ZP_WORD:2 16.5 +(word) makecharset::c#2 c zp ZP_WORD:2 6.041666666666666 +(byte*) makecharset::charset +(byte) makecharset::i +(byte) makecharset::i#1 i zp ZP_BYTE:4 151.5 +(byte) makecharset::i#7 i zp ZP_BYTE:4 21.642857142857142 +(byte) makecharset::ii +(byte) makecharset::ii#1 reg byte x 1501.5 +(byte) makecharset::ii#2 reg byte x 375.375 +(byte) makecharset::s +(byte) makecharset::s#0 s zp ZP_BYTE:5 59.529411764705884 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(const byte) print_char::ch#0 ch = (byte) '.' +(byte*) print_char_cursor +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:11 4.333333333333333 +(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:11 11.0 +(byte*) print_char_cursor#45 print_char_cursor zp ZP_WORD:11 1.1304347826086956 +(void()) print_cls() +(label) print_cls::@1 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5 +(byte[]) print_hextab +(byte*) print_line_cursor +(const byte*) print_line_cursor#0 print_line_cursor = ((byte*))(word/signed word/dword/signed dword) $400 +(byte*) print_screen +(byte()) sid_rnd() +(label) sid_rnd::@return +(byte) sid_rnd::return +(byte) sid_rnd::return#0 reg byte a 334.33333333333337 +(byte) sid_rnd::return#2 reg byte a 2002.0 +(void()) sid_rnd_init() +(label) sid_rnd_init::@return + +zp ZP_WORD:2 [ main::col#2 main::col#1 makecharset::c#2 makecharset::c#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_BYTE:4 [ c1A#1 c1A#3 makecharset::i#7 makecharset::i#1 ] +zp ZP_BYTE:5 [ c1B#1 c1B#3 makecharset::s#0 ] +zp ZP_BYTE:6 [ c2A#1 c2A#3 makecharset::$4 ] +zp ZP_BYTE:7 [ c2B#1 c2B#3 ] +zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ] +zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ] +zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 doplasma::i1#2 doplasma::i1#1 ] +reg byte x [ doplasma::i2#4 doplasma::i2#1 ] +zp ZP_WORD:11 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ] +reg byte x [ makecharset::ii#2 makecharset::ii#1 ] +reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ] +reg byte a [ doplasma::$0 ] +reg byte a [ doplasma::$2 ] +reg byte a [ doplasma::$6 ] +reg byte a [ doplasma::$11 ] +reg byte a [ doplasma::$14 ] +reg byte a [ doplasma::$17 ] +reg byte a [ doplasma::$20 ] +reg byte a [ doplasma::$23 ] +reg byte a [ doplasma::$26 ] +reg byte a [ doplasma::$29 ] +reg byte a [ doplasma::$32 ] +reg byte a [ doplasma::$35 ] +reg byte a [ doplasma::$38 ] +reg byte a [ doplasma::$41 ] +reg byte a [ doplasma::$44 ] +reg byte a [ doplasma::$47 ] +reg byte a [ doplasma::$50 ] +reg byte a [ doplasma::$53 ] +reg byte a [ doplasma::$56 ] +reg byte a [ doplasma::$59 ] +reg byte a [ doplasma::$62 ] +reg byte a [ doplasma::$65 ] +reg byte a [ doplasma::$68 ] +reg byte a [ doplasma::$71 ] +reg byte a [ doplasma::$74 ] +reg byte a [ doplasma::$77 ] +reg byte a [ doplasma::$80 ] +reg byte a [ makecharset::$2 ] +reg byte a [ sid_rnd::return#2 ] +reg byte a [ makecharset::$3 ] +zp ZP_WORD:13 [ makecharset::$8 makecharset::$9 ] +reg byte a [ makecharset::$11 ] +reg byte a [ sid_rnd::return#0 ] diff --git a/src/test/ref/plus-0.asm b/src/test/ref/plus-0.asm new file mode 100644 index 000000000..aaf83299d --- /dev/null +++ b/src/test/ref/plus-0.asm @@ -0,0 +1,51 @@ +// Tests elimination of plus 0 +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + ldx #'a' + lda #<$400 + sta fill.screen + lda #>$400 + sta fill.screen+1 + jsr fill + ldx #'b' + lda #<$2000 + sta fill.screen + lda #>$2000 + sta fill.screen+1 + jsr fill + rts +} +// fill(byte* zeropage(2) screen, byte register(X) ch) +fill: { + .label screen = 2 + .label _5 = 4 + .label _7 = 4 + ldy #0 + b2: + txa + sta (screen),y + lda #1*$28 + clc + adc screen + sta _5 + lda #0 + adc screen+1 + sta _5+1 + txa + sta (_5),y + lda #2*$28 + clc + adc screen + sta _7 + lda #0 + adc screen+1 + sta _7+1 + txa + sta (_7),y + iny + cpy #$28 + bne b2 + rts +} diff --git a/src/test/ref/plus-0.cfg b/src/test/ref/plus-0.cfg new file mode 100644 index 000000000..49b5feafa --- /dev/null +++ b/src/test/ref/plus-0.cfg @@ -0,0 +1,45 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + [5] call fill + to:main::@1 +main::@1: scope:[main] from main + [6] phi() + [7] call fill + to:main::@return +main::@return: scope:[main] from main::@1 + [8] return + to:@return +fill: scope:[fill] from main main::@1 + [9] (byte) fill::ch#4 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) + [9] (byte*) fill::screen#4 ← phi( main/((byte*))(word/signed word/dword/signed dword) $400 main::@1/((byte*))(word/signed word/dword/signed dword) $2000 ) + to:fill::@1 +fill::@1: scope:[fill] from fill fill::@3 + [10] (byte) fill::i#4 ← phi( fill/(byte/signed byte/word/signed word/dword/signed dword) 0 fill::@3/(byte) fill::i#1 ) + to:fill::@2 +fill::@2: scope:[fill] from fill::@1 + [11] *((byte*) fill::screen#4 + (byte) fill::i#4) ← (byte) fill::ch#4 + to:fill::@2_1 +fill::@2_1: scope:[fill] from fill::@2 + [12] (byte*~) fill::$5 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + [13] *((byte*~) fill::$5 + (byte) fill::i#4) ← (byte) fill::ch#4 + to:fill::@2_2 +fill::@2_2: scope:[fill] from fill::@2_1 + [14] (byte*~) fill::$7 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + [15] *((byte*~) fill::$7 + (byte) fill::i#4) ← (byte) fill::ch#4 + to:fill::@3 +fill::@3: scope:[fill] from fill::@2_2 + [16] (byte) fill::i#1 ← ++ (byte) fill::i#4 + [17] if((byte) fill::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto fill::@1 + to:fill::@return +fill::@return: scope:[fill] from fill::@3 + [18] return + to:@return diff --git a/src/test/ref/plus-0.log b/src/test/ref/plus-0.log new file mode 100644 index 000000000..4e0ab4d75 --- /dev/null +++ b/src/test/ref/plus-0.log @@ -0,0 +1,765 @@ + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@2 +main: scope:[main] from @2 + (byte*~) main::$0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte*) fill::screen#0 ← (byte*~) main::$0 + (byte) fill::ch#0 ← (byte) 'a' + call fill + to:main::@1 +main::@1: scope:[main] from main + (byte*~) main::$2 ← ((byte*)) (word/signed word/dword/signed dword) $2000 + (byte*) fill::screen#1 ← (byte*~) main::$2 + (byte) fill::ch#1 ← (byte) 'b' + call fill + to:main::@2 +main::@2: scope:[main] from main::@1 + to:main::@return +main::@return: scope:[main] from main::@2 + return + to:@return +fill: scope:[fill] from main main::@1 + (byte) fill::ch#4 ← phi( main/(byte) fill::ch#0 main::@1/(byte) fill::ch#1 ) + (byte*) fill::screen#4 ← phi( main/(byte*) fill::screen#0 main::@1/(byte*) fill::screen#1 ) + (byte) fill::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:fill::@1 +fill::@1: scope:[fill] from fill fill::@3 + (byte) fill::i#4 ← phi( fill/(byte) fill::i#0 fill::@3/(byte) fill::i#1 ) + (byte) fill::ch#3 ← phi( fill/(byte) fill::ch#4 fill::@3/(byte) fill::ch#5 ) + (byte*) fill::screen#3 ← phi( fill/(byte*) fill::screen#4 fill::@3/(byte*) fill::screen#5 ) + (byte) fill::j#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:fill::@2 +fill::@2: scope:[fill] from fill::@1 fill::@2 + (byte) fill::i#2 ← phi( fill::@1/(byte) fill::i#4 fill::@2/(byte) fill::i#2 ) + (byte) fill::ch#2 ← phi( fill::@1/(byte) fill::ch#3 fill::@2/(byte) fill::ch#2 ) + (byte*) fill::screen#2 ← phi( fill::@1/(byte*) fill::screen#3 fill::@2/(byte*) fill::screen#2 ) + (byte) fill::j#2 ← phi( fill::@1/(byte) fill::j#0 fill::@2/(byte) fill::j#1 ) + (byte/signed word/word/dword/signed dword~) fill::$0 ← (byte) fill::j#2 * (byte/signed byte/word/signed word/dword/signed dword) $28 + (byte*~) fill::$1 ← (byte*) fill::screen#2 + (byte/signed word/word/dword/signed dword~) fill::$0 + *((byte*~) fill::$1 + (byte) fill::i#2) ← (byte) fill::ch#2 + (byte) fill::j#1 ← (byte) fill::j#2 + rangenext(0,2) + (bool~) fill::$2 ← (byte) fill::j#1 != rangelast(0,2) + unroll if((bool~) fill::$2) goto fill::@2 + to:fill::@3 +fill::@3: scope:[fill] from fill::@2 + (byte) fill::ch#5 ← phi( fill::@2/(byte) fill::ch#2 ) + (byte*) fill::screen#5 ← phi( fill::@2/(byte*) fill::screen#2 ) + (byte) fill::i#3 ← phi( fill::@2/(byte) fill::i#2 ) + (byte) fill::i#1 ← (byte) fill::i#3 + rangenext(0,$27) + (bool~) fill::$3 ← (byte) fill::i#1 != rangelast(0,$27) + if((bool~) fill::$3) goto fill::@1 + to:fill::@return +fill::@return: scope:[fill] from fill::@3 + return + to:@return +@2: scope:[] from @begin + call main + to:@3 +@3: scope:[] from @2 + to:@end +@end: scope:[] from @3 + +SYMBOL TABLE SSA +(label) @2 +(label) @3 +(label) @begin +(label) @end +(void()) fill((byte*) fill::screen , (byte) fill::ch) +(byte/signed word/word/dword/signed dword~) fill::$0 +(byte*~) fill::$1 +(bool~) fill::$2 +(bool~) fill::$3 +(label) fill::@1 +(label) fill::@2 +(label) fill::@3 +(label) fill::@return +(byte) fill::ch +(byte) fill::ch#0 +(byte) fill::ch#1 +(byte) fill::ch#2 +(byte) fill::ch#3 +(byte) fill::ch#4 +(byte) fill::ch#5 +(byte) fill::i +(byte) fill::i#0 +(byte) fill::i#1 +(byte) fill::i#2 +(byte) fill::i#3 +(byte) fill::i#4 +(byte) fill::j +(byte) fill::j#0 +(byte) fill::j#1 +(byte) fill::j#2 +(byte*) fill::screen +(byte*) fill::screen#0 +(byte*) fill::screen#1 +(byte*) fill::screen#2 +(byte*) fill::screen#3 +(byte*) fill::screen#4 +(byte*) fill::screen#5 +(void()) main() +(byte*~) main::$0 +(byte*~) main::$2 +(label) main::@1 +(label) main::@2 +(label) main::@return + +Culled Empty Block (label) main::@2 +Culled Empty Block (label) @3 +Successful SSA optimization Pass2CullEmptyBlocks +Alias (byte*) fill::screen#0 = (byte*~) main::$0 +Alias (byte*) fill::screen#1 = (byte*~) main::$2 +Alias (byte) fill::i#2 = (byte) fill::i#3 +Alias (byte*) fill::screen#2 = (byte*) fill::screen#5 +Alias (byte) fill::ch#2 = (byte) fill::ch#5 +Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (byte*) fill::screen#2 +Self Phi Eliminated (byte) fill::ch#2 +Self Phi Eliminated (byte) fill::i#2 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) fill::screen#2 (byte*) fill::screen#3 +Redundant Phi (byte) fill::ch#2 (byte) fill::ch#3 +Redundant Phi (byte) fill::i#2 (byte) fill::i#4 +Successful SSA optimization Pass2RedundantPhiElimination +Simple Condition (bool~) fill::$2 [19] unroll if((byte) fill::j#1!=rangelast(0,2)) goto fill::@2 +Simple Condition (bool~) fill::$3 [23] if((byte) fill::i#1!=rangelast(0,$27)) goto fill::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) fill::screen#0 = ((byte*))$400 +Constant (const byte) fill::ch#0 = 'a' +Constant (const byte*) fill::screen#1 = ((byte*))$2000 +Constant (const byte) fill::ch#1 = 'b' +Constant (const byte) fill::i#0 = 0 +Constant (const byte) fill::j#0 = 0 +Successful SSA optimization Pass2ConstantIdentification +Resolved ranged next value fill::j#1 ← ++ fill::j#2 to ++ +Resolved ranged comparison value unroll if(fill::j#1!=rangelast(0,2)) goto fill::@2 to (byte/signed byte/word/signed word/dword/signed dword) 3 +Resolved ranged next value fill::i#1 ← ++ fill::i#4 to ++ +Resolved ranged comparison value if(fill::i#1!=rangelast(0,$27)) goto fill::@1 to (byte/signed byte/word/signed word/dword/signed dword) $28 +Self Phi Eliminated (byte*) fill::screen#3 +Self Phi Eliminated (byte) fill::ch#3 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) fill::screen#3 (byte*) fill::screen#4 +Redundant Phi (byte) fill::ch#3 (byte) fill::ch#4 +Successful SSA optimization Pass2RedundantPhiElimination +Unrolling loop Loop head: fill::@2 tails: fill::@2 blocks: fill::@2 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) fill::j#2 (const byte) fill::j#0 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) fill::$0 = fill::j#0*$28 +Constant (const byte) fill::j#1 = ++fill::j#0 +Successful SSA optimization Pass2ConstantIdentification +Removed zero-constant in assignment fill::$1 +if() condition always true - replacing block destination [7] if((const byte) fill::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto fill::@2_1 +Successful SSA optimization Pass2ConstantIfs +Successful SSA optimization PassNEliminateUnusedVars +Alias (byte*) fill::screen#4 = (byte*~) fill::$1 +Successful SSA optimization Pass2AliasElimination +Unrolling loop Loop head: fill::@2_1 tails: fill::@2_1 blocks: fill::@2_1 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) fill::j#3 (const byte) fill::j#1 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) fill::$4 = fill::j#1*$28 +Constant (const byte) fill::j#4 = ++fill::j#1 +Successful SSA optimization Pass2ConstantIdentification +if() condition always true - replacing block destination [9] if((const byte) fill::j#4!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto fill::@2_2 +Successful SSA optimization Pass2ConstantIfs +Unrolling loop Loop head: fill::@2_2 tails: fill::@2_2 blocks: fill::@2_2 +Successful SSA optimization Pass2LoopUnroll +Redundant Phi (byte) fill::j#5 (const byte) fill::j#4 +Successful SSA optimization Pass2RedundantPhiElimination +Constant (const byte/signed word/word/dword/signed dword) fill::$6 = fill::j#4*$28 +Constant (const byte) fill::j#6 = ++fill::j#4 +Successful SSA optimization Pass2ConstantIdentification +Removing PHI-reference to removed block (fill::@2_2) in block fill::@2_3 +if() condition always false - eliminating [11] if((const byte) fill::j#6!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto fill::@2_3 +Successful SSA optimization Pass2ConstantIfs +Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable (byte) fill::j#7 from unused block fill::@2_3 +Eliminating variable (byte/signed word/word/dword/signed dword~) fill::$8 from unused block fill::@2_3 +Eliminating variable (byte*~) fill::$9 from unused block fill::@2_3 +Eliminating variable (byte) fill::j#8 from unused block fill::@2_3 +Removing unused block fill::@2_3 +Successful SSA optimization Pass2EliminateUnusedBlocks +Inlining constant with var siblings (const byte*) fill::screen#0 +Inlining constant with var siblings (const byte) fill::ch#0 +Inlining constant with var siblings (const byte*) fill::screen#1 +Inlining constant with var siblings (const byte) fill::ch#1 +Inlining constant with var siblings (const byte) fill::i#0 +Inlining constant with different constant siblings (const byte) fill::j#0 +Inlining constant with different constant siblings (const byte) fill::j#1 +Inlining constant with different constant siblings (const byte) fill::j#4 +Constant inlined fill::j#4 = ++++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined fill::ch#0 = (byte) 'a' +Constant inlined fill::screen#1 = ((byte*))(word/signed word/dword/signed dword) $2000 +Constant inlined fill::screen#0 = ((byte*))(word/signed word/dword/signed dword) $400 +Constant inlined fill::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined fill::$6 = ++++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined fill::ch#1 = (byte) 'b' +Constant inlined fill::j#1 = ++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined fill::$4 = ++(byte/signed byte/word/signed word/dword/signed dword) 0*(byte/signed byte/word/signed word/dword/signed dword) $28 +Constant inlined fill::j#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Successful SSA optimization Pass2ConstantInlining +Simplifying constant integer increment ++0 +Simplifying constant integer increment ++0 +Successful SSA optimization Pass2ConstantSimplification +Simplifying constant integer increment ++1 +Successful SSA optimization Pass2ConstantSimplification +Added new block during phi lifting fill::@5(between fill::@3 and fill::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1 +CALL GRAPH +Calls in [] to main:2 +Calls in [main] to fill:5 fill:7 + +Created 3 initial phi equivalence classes +Coalesced [19] fill::i#5 ← fill::i#1 +Coalesced down to 3 phi equivalence classes +Culled Empty Block (label) fill::@5 +Renumbering block @2 to @1 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@1 + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + [5] call fill + to:main::@1 +main::@1: scope:[main] from main + [6] phi() + [7] call fill + to:main::@return +main::@return: scope:[main] from main::@1 + [8] return + to:@return +fill: scope:[fill] from main main::@1 + [9] (byte) fill::ch#4 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) + [9] (byte*) fill::screen#4 ← phi( main/((byte*))(word/signed word/dword/signed dword) $400 main::@1/((byte*))(word/signed word/dword/signed dword) $2000 ) + to:fill::@1 +fill::@1: scope:[fill] from fill fill::@3 + [10] (byte) fill::i#4 ← phi( fill/(byte/signed byte/word/signed word/dword/signed dword) 0 fill::@3/(byte) fill::i#1 ) + to:fill::@2 +fill::@2: scope:[fill] from fill::@1 + [11] *((byte*) fill::screen#4 + (byte) fill::i#4) ← (byte) fill::ch#4 + to:fill::@2_1 +fill::@2_1: scope:[fill] from fill::@2 + [12] (byte*~) fill::$5 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + [13] *((byte*~) fill::$5 + (byte) fill::i#4) ← (byte) fill::ch#4 + to:fill::@2_2 +fill::@2_2: scope:[fill] from fill::@2_1 + [14] (byte*~) fill::$7 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + [15] *((byte*~) fill::$7 + (byte) fill::i#4) ← (byte) fill::ch#4 + to:fill::@3 +fill::@3: scope:[fill] from fill::@2_2 + [16] (byte) fill::i#1 ← ++ (byte) fill::i#4 + [17] if((byte) fill::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto fill::@1 + to:fill::@return +fill::@return: scope:[fill] from fill::@3 + [18] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) fill((byte*) fill::screen , (byte) fill::ch) +(byte*~) fill::$5 22.0 +(byte*~) fill::$7 22.0 +(byte) fill::ch +(byte) fill::ch#4 3.666666666666667 +(byte) fill::i +(byte) fill::i#1 16.5 +(byte) fill::i#4 9.166666666666666 +(byte) fill::j +(byte*) fill::screen +(byte*) fill::screen#4 3.666666666666667 +(void()) main() + +Initial phi equivalence classes +[ fill::screen#4 ] +[ fill::ch#4 ] +[ fill::i#4 fill::i#1 ] +Added variable fill::$5 to zero page equivalence class [ fill::$5 ] +Added variable fill::$7 to zero page equivalence class [ fill::$7 ] +Complete equivalence classes +[ fill::screen#4 ] +[ fill::ch#4 ] +[ fill::i#4 fill::i#1 ] +[ fill::$5 ] +[ fill::$7 ] +Allocated zp ZP_WORD:2 [ fill::screen#4 ] +Allocated zp ZP_BYTE:4 [ fill::ch#4 ] +Allocated zp ZP_BYTE:5 [ fill::i#4 fill::i#1 ] +Allocated zp ZP_WORD:6 [ fill::$5 ] +Allocated zp ZP_WORD:8 [ fill::$7 ] + +INITIAL ASM +//SEG0 File Comments +// Tests elimination of plus 0 +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + //SEG11 [5] call fill + //SEG12 [9] phi from main to fill [phi:main->fill] + fill_from_main: + //SEG13 [9] phi (byte) fill::ch#4 = (byte) 'a' [phi:main->fill#0] -- vbuz1=vbuc1 + lda #'a' + sta fill.ch + //SEG14 [9] phi (byte*) fill::screen#4 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->fill#1] -- pbuz1=pbuc1 + lda #<$400 + sta fill.screen + lda #>$400 + sta fill.screen+1 + jsr fill + //SEG15 [6] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + jmp b1 + //SEG16 main::@1 + b1: + //SEG17 [7] call fill + //SEG18 [9] phi from main::@1 to fill [phi:main::@1->fill] + fill_from_b1: + //SEG19 [9] phi (byte) fill::ch#4 = (byte) 'b' [phi:main::@1->fill#0] -- vbuz1=vbuc1 + lda #'b' + sta fill.ch + //SEG20 [9] phi (byte*) fill::screen#4 = ((byte*))(word/signed word/dword/signed dword) $2000 [phi:main::@1->fill#1] -- pbuz1=pbuc1 + lda #<$2000 + sta fill.screen + lda #>$2000 + sta fill.screen+1 + jsr fill + jmp breturn + //SEG21 main::@return + breturn: + //SEG22 [8] return + rts +} +//SEG23 fill +// fill(byte* zeropage(2) screen, byte zeropage(4) ch) +fill: { + .label i = 5 + .label screen = 2 + .label ch = 4 + .label _5 = 6 + .label _7 = 8 + //SEG24 [10] phi from fill to fill::@1 [phi:fill->fill::@1] + b1_from_fill: + //SEG25 [10] phi (byte) fill::i#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fill->fill::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b1 + //SEG26 [10] phi from fill::@3 to fill::@1 [phi:fill::@3->fill::@1] + b1_from_b3: + //SEG27 [10] phi (byte) fill::i#4 = (byte) fill::i#1 [phi:fill::@3->fill::@1#0] -- register_copy + jmp b1 + //SEG28 fill::@1 + b1: + jmp b2 + //SEG29 fill::@2 + b2: + //SEG30 [11] *((byte*) fill::screen#4 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ch + ldy i + sta (screen),y + jmp b2_1 + //SEG31 fill::@2_1 + b2_1: + //SEG32 [12] (byte*~) fill::$5 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz2_plus_vbuc1 + lda #1*$28 + clc + adc screen + sta _5 + lda #0 + adc screen+1 + sta _5+1 + //SEG33 [13] *((byte*~) fill::$5 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ch + ldy i + sta (_5),y + jmp b2_2 + //SEG34 fill::@2_2 + b2_2: + //SEG35 [14] (byte*~) fill::$7 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz2_plus_vbuc1 + lda #2*$28 + clc + adc screen + sta _7 + lda #0 + adc screen+1 + sta _7+1 + //SEG36 [15] *((byte*~) fill::$7 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ch + ldy i + sta (_7),y + jmp b3 + //SEG37 fill::@3 + b3: + //SEG38 [16] (byte) fill::i#1 ← ++ (byte) fill::i#4 -- vbuz1=_inc_vbuz1 + inc i + //SEG39 [17] if((byte) fill::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto fill::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$28 + cmp i + bne b1_from_b3 + jmp breturn + //SEG40 fill::@return + breturn: + //SEG41 [18] return + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [12] (byte*~) fill::$5 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$5 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$5 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$5 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ fill::ch#4 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ fill::i#4 fill::i#1 ] +Statement [13] *((byte*~) fill::$5 + (byte) fill::i#4) ← (byte) fill::ch#4 [ fill::screen#4 fill::ch#4 fill::i#4 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 ] ) always clobbers reg byte a +Statement [14] (byte*~) fill::$7 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$7 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$7 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$7 ] ) always clobbers reg byte a +Statement [15] *((byte*~) fill::$7 + (byte) fill::i#4) ← (byte) fill::ch#4 [ fill::screen#4 fill::ch#4 fill::i#4 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 ] ) always clobbers reg byte a +Statement [11] *((byte*) fill::screen#4 + (byte) fill::i#4) ← (byte) fill::ch#4 [ fill::screen#4 fill::ch#4 fill::i#4 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 ] ) always clobbers reg byte a +Statement [12] (byte*~) fill::$5 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$5 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$5 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$5 ] ) always clobbers reg byte a +Statement [13] *((byte*~) fill::$5 + (byte) fill::i#4) ← (byte) fill::ch#4 [ fill::screen#4 fill::ch#4 fill::i#4 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 ] ) always clobbers reg byte a +Statement [14] (byte*~) fill::$7 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$7 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$7 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 fill::$7 ] ) always clobbers reg byte a +Statement [15] *((byte*~) fill::$7 + (byte) fill::i#4) ← (byte) fill::ch#4 [ fill::screen#4 fill::ch#4 fill::i#4 ] ( main:2::fill:5 [ fill::screen#4 fill::ch#4 fill::i#4 ] main:2::fill:7 [ fill::screen#4 fill::ch#4 fill::i#4 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ fill::screen#4 ] : zp ZP_WORD:2 , +Potential registers zp ZP_BYTE:4 [ fill::ch#4 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:5 [ fill::i#4 fill::i#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:6 [ fill::$5 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ fill::$7 ] : zp ZP_WORD:8 , + +REGISTER UPLIFT SCOPES +Uplift Scope [fill] 25.67: zp ZP_BYTE:5 [ fill::i#4 fill::i#1 ] 22: zp ZP_WORD:6 [ fill::$5 ] 22: zp ZP_WORD:8 [ fill::$7 ] 3.67: zp ZP_WORD:2 [ fill::screen#4 ] 3.67: zp ZP_BYTE:4 [ fill::ch#4 ] +Uplift Scope [main] +Uplift Scope [] + +Uplifting [fill] best 961 combination reg byte y [ fill::i#4 fill::i#1 ] zp ZP_WORD:6 [ fill::$5 ] zp ZP_WORD:8 [ fill::$7 ] zp ZP_WORD:2 [ fill::screen#4 ] reg byte x [ fill::ch#4 ] +Uplifting [main] best 961 combination +Uplifting [] best 961 combination +Coalescing zero page register [ zp ZP_WORD:6 [ fill::$5 ] ] with [ zp ZP_WORD:8 [ fill::$7 ] ] +Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ fill::$5 fill::$7 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Tests elimination of plus 0 +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + //SEG11 [5] call fill + //SEG12 [9] phi from main to fill [phi:main->fill] + fill_from_main: + //SEG13 [9] phi (byte) fill::ch#4 = (byte) 'a' [phi:main->fill#0] -- vbuxx=vbuc1 + ldx #'a' + //SEG14 [9] phi (byte*) fill::screen#4 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->fill#1] -- pbuz1=pbuc1 + lda #<$400 + sta fill.screen + lda #>$400 + sta fill.screen+1 + jsr fill + //SEG15 [6] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + jmp b1 + //SEG16 main::@1 + b1: + //SEG17 [7] call fill + //SEG18 [9] phi from main::@1 to fill [phi:main::@1->fill] + fill_from_b1: + //SEG19 [9] phi (byte) fill::ch#4 = (byte) 'b' [phi:main::@1->fill#0] -- vbuxx=vbuc1 + ldx #'b' + //SEG20 [9] phi (byte*) fill::screen#4 = ((byte*))(word/signed word/dword/signed dword) $2000 [phi:main::@1->fill#1] -- pbuz1=pbuc1 + lda #<$2000 + sta fill.screen + lda #>$2000 + sta fill.screen+1 + jsr fill + jmp breturn + //SEG21 main::@return + breturn: + //SEG22 [8] return + rts +} +//SEG23 fill +// fill(byte* zeropage(2) screen, byte register(X) ch) +fill: { + .label screen = 2 + .label _5 = 4 + .label _7 = 4 + //SEG24 [10] phi from fill to fill::@1 [phi:fill->fill::@1] + b1_from_fill: + //SEG25 [10] phi (byte) fill::i#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fill->fill::@1#0] -- vbuyy=vbuc1 + ldy #0 + jmp b1 + //SEG26 [10] phi from fill::@3 to fill::@1 [phi:fill::@3->fill::@1] + b1_from_b3: + //SEG27 [10] phi (byte) fill::i#4 = (byte) fill::i#1 [phi:fill::@3->fill::@1#0] -- register_copy + jmp b1 + //SEG28 fill::@1 + b1: + jmp b2 + //SEG29 fill::@2 + b2: + //SEG30 [11] *((byte*) fill::screen#4 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuyy=vbuxx + txa + sta (screen),y + jmp b2_1 + //SEG31 fill::@2_1 + b2_1: + //SEG32 [12] (byte*~) fill::$5 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz2_plus_vbuc1 + lda #1*$28 + clc + adc screen + sta _5 + lda #0 + adc screen+1 + sta _5+1 + //SEG33 [13] *((byte*~) fill::$5 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuyy=vbuxx + txa + sta (_5),y + jmp b2_2 + //SEG34 fill::@2_2 + b2_2: + //SEG35 [14] (byte*~) fill::$7 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz2_plus_vbuc1 + lda #2*$28 + clc + adc screen + sta _7 + lda #0 + adc screen+1 + sta _7+1 + //SEG36 [15] *((byte*~) fill::$7 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuyy=vbuxx + txa + sta (_7),y + jmp b3 + //SEG37 fill::@3 + b3: + //SEG38 [16] (byte) fill::i#1 ← ++ (byte) fill::i#4 -- vbuyy=_inc_vbuyy + iny + //SEG39 [17] if((byte) fill::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto fill::@1 -- vbuyy_neq_vbuc1_then_la1 + cpy #$28 + bne b1_from_b3 + jmp breturn + //SEG40 fill::@return + breturn: + //SEG41 [18] return + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b2_1 +Removing instruction jmp b2_2 +Removing instruction jmp b3 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Replacing label b1 with b2 +Replacing label b1_from_b3 with b2 +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction main_from_b1: +Removing instruction bend_from_b1: +Removing instruction b1_from_main: +Removing instruction fill_from_b1: +Removing instruction b1_from_b3: +Removing instruction b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction fill_from_main: +Removing instruction b1: +Removing instruction breturn: +Removing instruction b1_from_fill: +Removing instruction b2_1: +Removing instruction b2_2: +Removing instruction b3: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) fill((byte*) fill::screen , (byte) fill::ch) +(byte*~) fill::$5 $5 zp ZP_WORD:4 22.0 +(byte*~) fill::$7 $7 zp ZP_WORD:4 22.0 +(label) fill::@1 +(label) fill::@2 +(label) fill::@2_1 +(label) fill::@2_2 +(label) fill::@3 +(label) fill::@return +(byte) fill::ch +(byte) fill::ch#4 reg byte x 3.666666666666667 +(byte) fill::i +(byte) fill::i#1 reg byte y 16.5 +(byte) fill::i#4 reg byte y 9.166666666666666 +(byte) fill::j +(byte*) fill::screen +(byte*) fill::screen#4 screen zp ZP_WORD:2 3.666666666666667 +(void()) main() +(label) main::@1 +(label) main::@return + +zp ZP_WORD:2 [ fill::screen#4 ] +reg byte x [ fill::ch#4 ] +reg byte y [ fill::i#4 fill::i#1 ] +zp ZP_WORD:4 [ fill::$5 fill::$7 ] + + +FINAL ASSEMBLER +Score: 733 + +//SEG0 File Comments +// Tests elimination of plus 0 +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +//SEG9 @end +//SEG10 main +main: { + //SEG11 [5] call fill + //SEG12 [9] phi from main to fill [phi:main->fill] + //SEG13 [9] phi (byte) fill::ch#4 = (byte) 'a' [phi:main->fill#0] -- vbuxx=vbuc1 + ldx #'a' + //SEG14 [9] phi (byte*) fill::screen#4 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->fill#1] -- pbuz1=pbuc1 + lda #<$400 + sta fill.screen + lda #>$400 + sta fill.screen+1 + jsr fill + //SEG15 [6] phi from main to main::@1 [phi:main->main::@1] + //SEG16 main::@1 + //SEG17 [7] call fill + //SEG18 [9] phi from main::@1 to fill [phi:main::@1->fill] + //SEG19 [9] phi (byte) fill::ch#4 = (byte) 'b' [phi:main::@1->fill#0] -- vbuxx=vbuc1 + ldx #'b' + //SEG20 [9] phi (byte*) fill::screen#4 = ((byte*))(word/signed word/dword/signed dword) $2000 [phi:main::@1->fill#1] -- pbuz1=pbuc1 + lda #<$2000 + sta fill.screen + lda #>$2000 + sta fill.screen+1 + jsr fill + //SEG21 main::@return + //SEG22 [8] return + rts +} +//SEG23 fill +// fill(byte* zeropage(2) screen, byte register(X) ch) +fill: { + .label screen = 2 + .label _5 = 4 + .label _7 = 4 + //SEG24 [10] phi from fill to fill::@1 [phi:fill->fill::@1] + //SEG25 [10] phi (byte) fill::i#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:fill->fill::@1#0] -- vbuyy=vbuc1 + ldy #0 + //SEG26 [10] phi from fill::@3 to fill::@1 [phi:fill::@3->fill::@1] + //SEG27 [10] phi (byte) fill::i#4 = (byte) fill::i#1 [phi:fill::@3->fill::@1#0] -- register_copy + //SEG28 fill::@1 + //SEG29 fill::@2 + b2: + //SEG30 [11] *((byte*) fill::screen#4 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuyy=vbuxx + txa + sta (screen),y + //SEG31 fill::@2_1 + //SEG32 [12] (byte*~) fill::$5 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz2_plus_vbuc1 + lda #1*$28 + clc + adc screen + sta _5 + lda #0 + adc screen+1 + sta _5+1 + //SEG33 [13] *((byte*~) fill::$5 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuyy=vbuxx + txa + sta (_5),y + //SEG34 fill::@2_2 + //SEG35 [14] (byte*~) fill::$7 ← (byte*) fill::screen#4 + (byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz2_plus_vbuc1 + lda #2*$28 + clc + adc screen + sta _7 + lda #0 + adc screen+1 + sta _7+1 + //SEG36 [15] *((byte*~) fill::$7 + (byte) fill::i#4) ← (byte) fill::ch#4 -- pbuz1_derefidx_vbuyy=vbuxx + txa + sta (_7),y + //SEG37 fill::@3 + //SEG38 [16] (byte) fill::i#1 ← ++ (byte) fill::i#4 -- vbuyy=_inc_vbuyy + iny + //SEG39 [17] if((byte) fill::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto fill::@1 -- vbuyy_neq_vbuc1_then_la1 + cpy #$28 + bne b2 + //SEG40 fill::@return + //SEG41 [18] return + rts +} + diff --git a/src/test/ref/plus-0.sym b/src/test/ref/plus-0.sym new file mode 100644 index 000000000..c58f16181 --- /dev/null +++ b/src/test/ref/plus-0.sym @@ -0,0 +1,28 @@ +(label) @1 +(label) @begin +(label) @end +(void()) fill((byte*) fill::screen , (byte) fill::ch) +(byte*~) fill::$5 $5 zp ZP_WORD:4 22.0 +(byte*~) fill::$7 $7 zp ZP_WORD:4 22.0 +(label) fill::@1 +(label) fill::@2 +(label) fill::@2_1 +(label) fill::@2_2 +(label) fill::@3 +(label) fill::@return +(byte) fill::ch +(byte) fill::ch#4 reg byte x 3.666666666666667 +(byte) fill::i +(byte) fill::i#1 reg byte y 16.5 +(byte) fill::i#4 reg byte y 9.166666666666666 +(byte) fill::j +(byte*) fill::screen +(byte*) fill::screen#4 screen zp ZP_WORD:2 3.666666666666667 +(void()) main() +(label) main::@1 +(label) main::@return + +zp ZP_WORD:2 [ fill::screen#4 ] +reg byte x [ fill::ch#4 ] +reg byte y [ fill::i#4 fill::i#1 ] +zp ZP_WORD:4 [ fill::$5 fill::$7 ]