From e64b12e7be8d26912c704a4e4f30e626ad844304 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Fri, 17 Nov 2017 09:37:11 +0100 Subject: [PATCH] Added 8x8 char scroller --- .../kickc/fragment/asm/zpby=zpby1_ror_1.asm | 1 + .../kickc/fragment/asm/zpwo1=aby.asm | 3 + .../kickc/fragment/asm/zpwo1=xby.asm | 3 + .../kickc/fragment/asm/zpwo1=yby.asm | 3 + .../kickc/fragment/asm/zpwo1=zpby1.asm | 4 + .../kickc/fragment/asm/zpwo1=zpwo1_rol_1.asm | 2 + .../kickc/fragment/asm/zpwo1=zpwo2_rol_1.asm | 6 + .../dk/camelot64/kickc/test/TestPrograms.java | 4 + .../dk/camelot64/kickc/test/ref/scrollbig.asm | 191 + .../dk/camelot64/kickc/test/ref/scrollbig.cfg | 152 + .../dk/camelot64/kickc/test/ref/scrollbig.log | 11565 ++++++++++++++++ .../dk/camelot64/kickc/test/ref/scrollbig.sym | 145 + .../java/dk/camelot64/kickc/test/scrollbig.kc | 102 + 13 files changed, 12181 insertions(+) create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpby=zpby1_ror_1.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=aby.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=xby.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=yby.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpby1.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo1_rol_1.asm create mode 100644 src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo2_rol_1.asm create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/scrollbig.asm create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/scrollbig.cfg create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/scrollbig.log create mode 100644 src/main/java/dk/camelot64/kickc/test/ref/scrollbig.sym create mode 100644 src/main/java/dk/camelot64/kickc/test/scrollbig.kc diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpby=zpby1_ror_1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpby=zpby1_ror_1.asm new file mode 100644 index 000000000..958760424 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpby=zpby1_ror_1.asm @@ -0,0 +1 @@ +lsr {zpby1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=aby.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=aby.asm new file mode 100644 index 000000000..704b0857d --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=aby.asm @@ -0,0 +1,3 @@ +sta {zpwo1} +lda #0 +sta {zpwo1}+1 \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=xby.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=xby.asm new file mode 100644 index 000000000..e00420713 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=xby.asm @@ -0,0 +1,3 @@ +stx {zpwo1} +ldx #0 +stx {zpwo1}+1 \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=yby.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=yby.asm new file mode 100644 index 000000000..44565e7cc --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=yby.asm @@ -0,0 +1,3 @@ +sty {zpwo1} +ldy #0 +sty {zpwo1}+1 \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpby1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpby1.asm new file mode 100644 index 000000000..1671e4cb1 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpby1.asm @@ -0,0 +1,4 @@ +lda {zpby1} +sta {zpwo1} +lda #0 +sta {zpwo1}+1 \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo1_rol_1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo1_rol_1.asm new file mode 100644 index 000000000..13d516c93 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo1_rol_1.asm @@ -0,0 +1,2 @@ +asl {zpwo1} +rol {zpwo1}+1 diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo2_rol_1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo2_rol_1.asm new file mode 100644 index 000000000..a61596575 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/zpwo1=zpwo2_rol_1.asm @@ -0,0 +1,6 @@ +lda {zpwo1} +asl +sta {zpwo2} +lda {zpwo1}+1 +rol +sta {zpwo2}+1 diff --git a/src/main/java/dk/camelot64/kickc/test/TestPrograms.java b/src/main/java/dk/camelot64/kickc/test/TestPrograms.java index 157c7d80b..b2c8d45e4 100644 --- a/src/main/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/main/java/dk/camelot64/kickc/test/TestPrograms.java @@ -24,6 +24,10 @@ public class TestPrograms extends TestCase { helper = new ReferenceHelper("dk/camelot64/kickc/test/ref/"); } + public void testScrollBig() throws IOException, URISyntaxException { + compileAndCompare("scrollbig"); + } + public void testPtrComplex() throws IOException, URISyntaxException { compileAndCompare("ptr-complex"); } diff --git a/src/main/java/dk/camelot64/kickc/test/ref/scrollbig.asm b/src/main/java/dk/camelot64/kickc/test/ref/scrollbig.asm new file mode 100644 index 000000000..b0ff96e0d --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/scrollbig.asm @@ -0,0 +1,191 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .const PROCPORT = 1 + .const CHARGEN = $d000 + .const SCREEN = $400 + .const RASTER = $d012 + .const BGCOL = $d020 + .const SCROLL = $d016 + .label current_bit = 2 + .label nxt = 7 + .label current_chargen = 3 + TEXT: .text "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + jsr main +main: { + jsr fillscreen + lda #CHARGEN + sta current_chargen+1 + lda #TEXT + sta nxt+1 + lda #1 + sta current_bit + ldx #7 + b2: + lda RASTER + cmp #$fe + bne b2 + b3: + lda RASTER + cmp #$ff + bne b3 + inc BGCOL + jsr scroll_soft + dec BGCOL + jmp b2 + rts +} +scroll_soft: { + dex + cpx #$ff + bne b1 + jsr scroll_bit + ldx #7 + b1: + stx SCROLL + rts +} +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + jsr scroll_hard + lda current_bit + lsr + sta current_bit + bne b1 + jsr next_char + sta c + lda #0 + sta c+1 + asl c + rol c+1 + asl c + rol c+1 + asl c + rol c+1 + lda #CHARGEN + adc c+1 + sta _8+1 + lda #$80 + sta current_bit + b1: + sei + lda #$32 + sta PROCPORT + lda #SCREEN+$28+$27 + sta sc+1 + ldx #0 + b2: + stx $ff + ldy $ff + lda (current_chargen),y + and current_bit + cmp #0 + beq b3_from_b2 + lda #'*' + jmp b3 + b3_from_b2: + lda #' ' + b3: + ldy #0 + sta (sc),y + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + inx + cpx #8 + bne b2 + lda #$37 + sta PROCPORT + cli + rts +} +next_char: { + ldy #0 + lda (nxt),y + cmp #'@' + bne b1 + lda TEXT + lda #TEXT + sta nxt+1 + b1: + inc nxt + bne !+ + inc nxt+1 + !: + rts +} +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + ldx #0 + b1: + lda line0+1,x + sta line0,x + lda line1+1,x + sta line1,x + lda line2+1,x + sta line2,x + lda line3+1,x + sta line3,x + lda line4+1,x + sta line4,x + lda line5+1,x + sta line5,x + lda line6+1,x + sta line6,x + lda line7+1,x + sta line7,x + inx + cpx #$27 + bne b1 + rts +} +fillscreen: { + .const fill = $20 + .label cursor = 3 + lda #SCREEN + sta cursor+1 + b1: + ldy #0 + lda #fill + sta (cursor),y + inc cursor + bne !+ + inc cursor+1 + !: + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1 + bne !+ + lda cursor + cmp #> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) + [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) + [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) + to:scroll_bit::@4 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) + [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) + [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) + [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) + [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) + [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + to:scroll_bit::@1 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + [29] (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + [29] (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) 128 ) [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + [29] (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + asm { sei } + [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + to:scroll_bit::@2 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + [32] (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) SCREEN#0+(byte) 40+(byte) 39 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + [32] (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) 0 scroll_bit::@3/(byte) scroll_bit::r#1 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) + [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) + [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + to:scroll_bit::@5 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + [36] (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) ' ' scroll_bit::@5/(byte) '*' ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::b#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::b#2 ] ) + [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) + [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) + [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) + to:scroll_bit::@6 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) + [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) + to:next_char::@2 +next_char::@2: scope:[next_char] from next_char + [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) + to:next_char::@1 +next_char::@1: scope:[next_char] from next_char next_char::@2 + [47] (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) [ next_char::c#2 nxt#18 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#18 ] ) + [47] (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) [ next_char::c#2 nxt#18 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#18 ] ) + [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + to:next_char::@return +next_char::@return: scope:[next_char] from next_char::@1 + [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + [50] phi() [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + [51] (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) 0 scroll_hard::@1/(byte) scroll_hard::i#1 ) [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) + [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) + [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) + [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) + [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) + [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) + [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) + [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) + [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) + [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + to:@return +fillscreen: scope:[fillscreen] from main + [71] phi() [ ] ( main:0::fillscreen:2 [ ] ) + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + [72] (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) SCREEN#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) + [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) + [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) + [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + [76] return [ ] ( main:0::fillscreen:2 [ ] ) + to:@return diff --git a/src/main/java/dk/camelot64/kickc/test/ref/scrollbig.log b/src/main/java/dk/camelot64/kickc/test/ref/scrollbig.log new file mode 100644 index 000000000..21a207ced --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/ref/scrollbig.log @@ -0,0 +1,11565 @@ +// An 8x8 char letter scroller + +byte* PROCPORT = $01; +byte* CHARGEN = $d000; +byte* SCREEN = $0400; +byte* RASTER = $d012; +byte* BGCOL = $d020; +byte* SCROLL = $d016; +byte* TEXT = "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @"; + +void main() { + fillscreen(SCREEN, $20); + do { + // Wait for raster + do {} while(*RASTER!=$fe); + do {} while(*RASTER!=$ff); + ++*BGCOL; + scroll_soft(); + --*BGCOL; + } while(true); +} + +// Soft-scroll using $d016 - trigger bit-scroll/char-scroll when needed +byte scroll = 7; +void scroll_soft() { + if(--scroll==$ff) { + scroll = 7; + scroll_bit(); + } + *SCROLL = scroll; +} + +// Scroll the next bit from the current char onto the screen +byte* current_chargen = CHARGEN; +byte current_bit = 1; +void scroll_bit() { + scroll_hard(); + current_bit = current_bit>>1; + if(current_bit==0) { + word c = next_char(); + c = c<<1; + c = c<<1; + c = c<<1; + current_chargen = CHARGEN+c; + current_bit = $80; + } + asm { sei } + *PROCPORT = $32; + byte* sc = SCREEN+40+39; + for(byte r:0..7) { + byte bits = current_chargen[r]; + byte b = ' '; + if((bits & current_bit) != 0) { + b = '*'; + } + *sc = b; + sc = sc+40; + } + *PROCPORT = $37; + asm { cli } +} + +byte* nxt = TEXT; +// Find the next char of the scroll text +byte next_char() { + byte c = *nxt; + if(c=='@') { + nxt = TEXT; + c = *nxt; + } + nxt++; + return c; +} + +void scroll_hard() { + // Hard scroll + byte[] line0 = SCREEN+40*0; + byte[] line1 = SCREEN+40*1; + byte[] line2 = SCREEN+40*2; + byte[] line3 = SCREEN+40*3; + byte[] line4 = SCREEN+40*4; + byte[] line5 = SCREEN+40*5; + byte[] line6 = SCREEN+40*6; + byte[] line7 = SCREEN+40*7; + for(byte i=0;i!=39;i++) { + line0[i]=line0[i+1]; + line1[i]=line1[i+1]; + line2[i]=line2[i+1]; + line3[i]=line3[i+1]; + line4[i]=line4[i+1]; + line5[i]=line5[i+1]; + line6[i]=line6[i+1]; + line7[i]=line7[i+1]; + } +} + +// Fill the screen with one char +void fillscreen(byte* screen, byte fill) { + for( byte* cursor = screen; cursor < screen+1000; cursor++) { + *cursor = fill; + } +} + +Adding pre/post-modifier *((byte*) BGCOL) ← ++ *((byte*) BGCOL) +Adding pre/post-modifier *((byte*) BGCOL) ← -- *((byte*) BGCOL) +Adding pre/post-modifier (byte) scroll ← -- (byte) scroll +Adding pre/post-modifier (byte*) nxt ← ++ (byte*) nxt +Adding pre/post-modifier (byte) scroll_hard::i ← ++ (byte) scroll_hard::i +Adding pre/post-modifier (byte*) fillscreen::cursor ← ++ (byte*) fillscreen::cursor +PROGRAM + (byte*) PROCPORT ← (byte) 1 + (byte*) CHARGEN ← (word) 53248 + (byte*) SCREEN ← (word) 1024 + (byte*) RASTER ← (word) 53266 + (byte*) BGCOL ← (word) 53280 + (byte*) SCROLL ← (word) 53270 + (byte*) TEXT ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" +proc (void()) main() + (void~) main::$0 ← call fillscreen (byte*) SCREEN (byte) 32 +main::@1: +main::@2: + (boolean~) main::$1 ← *((byte*) RASTER) != (byte) 254 + if((boolean~) main::$1) goto main::@2 +main::@3: + (boolean~) main::$2 ← *((byte*) RASTER) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + *((byte*) BGCOL) ← ++ *((byte*) BGCOL) + (void~) main::$3 ← call scroll_soft + *((byte*) BGCOL) ← -- *((byte*) BGCOL) + if(true) goto main::@1 +main::@return: + return +endproc // main() + (byte) scroll ← (byte) 7 +proc (void()) scroll_soft() + (byte) scroll ← -- (byte) scroll + (boolean~) scroll_soft::$0 ← (byte) scroll == (byte) 255 + (boolean~) scroll_soft::$1 ← ! (boolean~) scroll_soft::$0 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + (byte) scroll ← (byte) 7 + (void~) scroll_soft::$2 ← call scroll_bit +scroll_soft::@1: + *((byte*) SCROLL) ← (byte) scroll +scroll_soft::@return: + return +endproc // scroll_soft() + (byte*) current_chargen ← (byte*) CHARGEN + (byte) current_bit ← (byte) 1 +proc (void()) scroll_bit() + (void~) scroll_bit::$0 ← call scroll_hard + (byte~) scroll_bit::$1 ← (byte) current_bit >> (byte) 1 + (byte) current_bit ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$2 ← (byte) current_bit == (byte) 0 + (boolean~) scroll_bit::$3 ← ! (boolean~) scroll_bit::$2 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + (byte~) scroll_bit::$4 ← call next_char + (word) scroll_bit::c ← (byte~) scroll_bit::$4 + (word~) scroll_bit::$5 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$5 + (word~) scroll_bit::$6 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$6 + (word~) scroll_bit::$7 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$7 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN + (word) scroll_bit::c + (byte*) current_chargen ← (byte*~) scroll_bit::$8 + (byte) current_bit ← (byte) 128 +scroll_bit::@1: + asm { sei } + *((byte*) PROCPORT) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN + (byte) 40 + (byte*~) scroll_bit::$10 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$10 + (byte) scroll_bit::r ← (byte) 0 +scroll_bit::@2: + (byte~) scroll_bit::$11 ← (byte*) current_chargen *idx (byte) scroll_bit::r + (byte) scroll_bit::bits ← (byte~) scroll_bit::$11 + (byte) scroll_bit::b ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits & (byte) current_bit + (boolean~) scroll_bit::$13 ← (byte~) scroll_bit::$12 != (byte) 0 + (boolean~) scroll_bit::$14 ← ! (boolean~) scroll_bit::$13 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + (byte) scroll_bit::b ← (byte) '*' +scroll_bit::@3: + *((byte*) scroll_bit::sc) ← (byte) scroll_bit::b + (byte*~) scroll_bit::$15 ← (byte*) scroll_bit::sc + (byte) 40 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$15 + (byte) scroll_bit::r ← ++ (byte) scroll_bit::r + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + *((byte*) PROCPORT) ← (byte) 55 + asm { cli } +scroll_bit::@return: + return +endproc // scroll_bit() + (byte*) nxt ← (byte*) TEXT +proc (byte()) next_char() + (byte) next_char::c ← *((byte*) nxt) + (boolean~) next_char::$0 ← (byte) next_char::c == (byte) '@' + (boolean~) next_char::$1 ← ! (boolean~) next_char::$0 + if((boolean~) next_char::$1) goto next_char::@1 + (byte*) nxt ← (byte*) TEXT + (byte) next_char::c ← *((byte*) nxt) +next_char::@1: + (byte*) nxt ← ++ (byte*) nxt + (byte) next_char::return ← (byte) next_char::c + goto next_char::@return +next_char::@return: + (byte) next_char::return ← (byte) next_char::return + return (byte) next_char::return +endproc // next_char() +proc (void()) scroll_hard() + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte*~) scroll_hard::$1 ← (byte*) SCREEN + (byte~) scroll_hard::$0 + (byte[]) scroll_hard::line0 ← (byte*~) scroll_hard::$1 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte*~) scroll_hard::$3 ← (byte*) SCREEN + (byte~) scroll_hard::$2 + (byte[]) scroll_hard::line1 ← (byte*~) scroll_hard::$3 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte*~) scroll_hard::$5 ← (byte*) SCREEN + (byte~) scroll_hard::$4 + (byte[]) scroll_hard::line2 ← (byte*~) scroll_hard::$5 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte*~) scroll_hard::$7 ← (byte*) SCREEN + (byte~) scroll_hard::$6 + (byte[]) scroll_hard::line3 ← (byte*~) scroll_hard::$7 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte*~) scroll_hard::$9 ← (byte*) SCREEN + (byte~) scroll_hard::$8 + (byte[]) scroll_hard::line4 ← (byte*~) scroll_hard::$9 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte*~) scroll_hard::$11 ← (byte*) SCREEN + (byte~) scroll_hard::$10 + (byte[]) scroll_hard::line5 ← (byte*~) scroll_hard::$11 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte*~) scroll_hard::$13 ← (byte*) SCREEN + (byte~) scroll_hard::$12 + (byte[]) scroll_hard::line6 ← (byte*~) scroll_hard::$13 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte*~) scroll_hard::$15 ← (byte*) SCREEN + (byte~) scroll_hard::$14 + (byte[]) scroll_hard::line7 ← (byte*~) scroll_hard::$15 + (byte) scroll_hard::i ← (byte) 0 +scroll_hard::@1: + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i ← ++ (byte) scroll_hard::i + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 +scroll_hard::@return: + return +endproc // scroll_hard() +proc (void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) + (byte*) fillscreen::cursor ← (byte*) fillscreen::screen +fillscreen::@1: + *((byte*) fillscreen::cursor) ← (byte) fillscreen::fill + (byte*) fillscreen::cursor ← ++ (byte*) fillscreen::cursor + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 +fillscreen::@return: + return +endproc // fillscreen() + call main + +SYMBOLS +(byte*) BGCOL +(byte*) CHARGEN +(byte*) PROCPORT +(byte*) RASTER +(byte*) SCREEN +(byte*) SCROLL +(byte*) TEXT +(byte) current_bit +(byte*) current_chargen +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) +(byte*~) fillscreen::$0 +(boolean~) fillscreen::$1 +(label) fillscreen::@1 +(label) fillscreen::@return +(byte*) fillscreen::cursor +(byte) fillscreen::fill +(byte*) fillscreen::screen +(void()) main() +(void~) main::$0 +(boolean~) main::$1 +(boolean~) main::$2 +(void~) main::$3 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(byte()) next_char() +(boolean~) next_char::$0 +(boolean~) next_char::$1 +(label) next_char::@1 +(label) next_char::@return +(byte) next_char::c +(byte) next_char::return +(byte*) nxt +(byte) scroll +(void()) scroll_bit() +(void~) scroll_bit::$0 +(byte~) scroll_bit::$1 +(byte*~) scroll_bit::$10 +(byte~) scroll_bit::$11 +(byte~) scroll_bit::$12 +(boolean~) scroll_bit::$13 +(boolean~) scroll_bit::$14 +(byte*~) scroll_bit::$15 +(boolean~) scroll_bit::$16 +(boolean~) scroll_bit::$2 +(boolean~) scroll_bit::$3 +(byte~) scroll_bit::$4 +(word~) scroll_bit::$5 +(word~) scroll_bit::$6 +(word~) scroll_bit::$7 +(byte*~) scroll_bit::$8 +(byte*~) scroll_bit::$9 +(label) scroll_bit::@1 +(label) scroll_bit::@2 +(label) scroll_bit::@3 +(label) scroll_bit::@return +(byte) scroll_bit::b +(byte) scroll_bit::bits +(word) scroll_bit::c +(byte) scroll_bit::r +(byte*) scroll_bit::sc +(void()) scroll_hard() +(byte~) scroll_hard::$0 +(byte*~) scroll_hard::$1 +(byte~) scroll_hard::$10 +(byte*~) scroll_hard::$11 +(byte~) scroll_hard::$12 +(byte*~) scroll_hard::$13 +(byte~) scroll_hard::$14 +(byte*~) scroll_hard::$15 +(byte~) scroll_hard::$16 +(byte~) scroll_hard::$17 +(byte~) scroll_hard::$18 +(byte~) scroll_hard::$19 +(byte~) scroll_hard::$2 +(byte~) scroll_hard::$20 +(byte~) scroll_hard::$21 +(byte~) scroll_hard::$22 +(byte~) scroll_hard::$23 +(byte~) scroll_hard::$24 +(byte~) scroll_hard::$25 +(byte~) scroll_hard::$26 +(byte~) scroll_hard::$27 +(byte~) scroll_hard::$28 +(byte~) scroll_hard::$29 +(byte*~) scroll_hard::$3 +(byte~) scroll_hard::$30 +(byte~) scroll_hard::$31 +(boolean~) scroll_hard::$32 +(byte~) scroll_hard::$4 +(byte*~) scroll_hard::$5 +(byte~) scroll_hard::$6 +(byte*~) scroll_hard::$7 +(byte~) scroll_hard::$8 +(byte*~) scroll_hard::$9 +(label) scroll_hard::@1 +(label) scroll_hard::@return +(byte) scroll_hard::i +(byte[]) scroll_hard::line0 +(byte[]) scroll_hard::line1 +(byte[]) scroll_hard::line2 +(byte[]) scroll_hard::line3 +(byte[]) scroll_hard::line4 +(byte[]) scroll_hard::line5 +(byte[]) scroll_hard::line6 +(byte[]) scroll_hard::line7 +(void()) scroll_soft() +(boolean~) scroll_soft::$0 +(boolean~) scroll_soft::$1 +(void~) scroll_soft::$2 +(label) scroll_soft::@1 +(label) scroll_soft::@return + +INITIAL CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT ← (byte) 1 + (byte*) CHARGEN ← (word) 53248 + (byte*) SCREEN ← (word) 1024 + (byte*) RASTER ← (word) 53266 + (byte*) BGCOL ← (word) 53280 + (byte*) SCROLL ← (word) 53270 + (byte*) TEXT ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from + (void~) main::$0 ← call fillscreen (byte*) SCREEN (byte) 32 + to:main::@1 +main::@1: scope:[main] from main main::@5 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 + (boolean~) main::$1 ← *((byte*) RASTER) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@4 +main::@4: scope:[main] from main::@2 + to:main::@3 +main::@3: scope:[main] from main::@3 main::@4 + (boolean~) main::$2 ← *((byte*) RASTER) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL) ← ++ *((byte*) BGCOL) + (void~) main::$3 ← call scroll_soft + *((byte*) BGCOL) ← -- *((byte*) BGCOL) + if(true) goto main::@1 + to:main::@6 +main::@6: scope:[main] from main::@5 + to:main::@return +main::@return: scope:[main] from main::@6 + return + to:@return +@1: scope:[] from @begin + (byte) scroll ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from + (byte) scroll ← -- (byte) scroll + (boolean~) scroll_soft::$0 ← (byte) scroll == (byte) 255 + (boolean~) scroll_soft::$1 ← ! (boolean~) scroll_soft::$0 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + *((byte*) SCROLL) ← (byte) scroll + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll ← (byte) 7 + (void~) scroll_soft::$2 ← call scroll_bit + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + (byte*) current_chargen ← (byte*) CHARGEN + (byte) current_bit ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from + (void~) scroll_bit::$0 ← call scroll_hard + (byte~) scroll_bit::$1 ← (byte) current_bit >> (byte) 1 + (byte) current_bit ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$2 ← (byte) current_bit == (byte) 0 + (boolean~) scroll_bit::$3 ← ! (boolean~) scroll_bit::$2 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit scroll_bit::@4 + asm { sei } + *((byte*) PROCPORT) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN + (byte) 40 + (byte*~) scroll_bit::$10 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$10 + (byte) scroll_bit::r ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$4 ← call next_char + (word) scroll_bit::c ← (byte~) scroll_bit::$4 + (word~) scroll_bit::$5 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$5 + (word~) scroll_bit::$6 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$6 + (word~) scroll_bit::$7 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$7 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN + (word) scroll_bit::c + (byte*) current_chargen ← (byte*~) scroll_bit::$8 + (byte) current_bit ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte~) scroll_bit::$11 ← (byte*) current_chargen *idx (byte) scroll_bit::r + (byte) scroll_bit::bits ← (byte~) scroll_bit::$11 + (byte) scroll_bit::b ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits & (byte) current_bit + (boolean~) scroll_bit::$13 ← (byte~) scroll_bit::$12 != (byte) 0 + (boolean~) scroll_bit::$14 ← ! (boolean~) scroll_bit::$13 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + *((byte*) scroll_bit::sc) ← (byte) scroll_bit::b + (byte*~) scroll_bit::$15 ← (byte*) scroll_bit::sc + (byte) 40 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$15 + (byte) scroll_bit::r ← ++ (byte) scroll_bit::r + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + (byte*) nxt ← (byte*) TEXT + to:@4 +next_char: scope:[next_char] from + (byte) next_char::c ← *((byte*) nxt) + (boolean~) next_char::$0 ← (byte) next_char::c == (byte) '@' + (boolean~) next_char::$1 ← ! (boolean~) next_char::$0 + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte*) nxt ← ++ (byte*) nxt + (byte) next_char::return ← (byte) next_char::c + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte*) nxt ← (byte*) TEXT + (byte) next_char::c ← *((byte*) nxt) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 next_char::@3 + (byte) next_char::return ← (byte) next_char::return + return (byte) next_char::return + to:@return +next_char::@3: scope:[next_char] from + to:next_char::@return +@4: scope:[] from @3 + to:@5 +scroll_hard: scope:[scroll_hard] from + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte*~) scroll_hard::$1 ← (byte*) SCREEN + (byte~) scroll_hard::$0 + (byte[]) scroll_hard::line0 ← (byte*~) scroll_hard::$1 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte*~) scroll_hard::$3 ← (byte*) SCREEN + (byte~) scroll_hard::$2 + (byte[]) scroll_hard::line1 ← (byte*~) scroll_hard::$3 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte*~) scroll_hard::$5 ← (byte*) SCREEN + (byte~) scroll_hard::$4 + (byte[]) scroll_hard::line2 ← (byte*~) scroll_hard::$5 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte*~) scroll_hard::$7 ← (byte*) SCREEN + (byte~) scroll_hard::$6 + (byte[]) scroll_hard::line3 ← (byte*~) scroll_hard::$7 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte*~) scroll_hard::$9 ← (byte*) SCREEN + (byte~) scroll_hard::$8 + (byte[]) scroll_hard::line4 ← (byte*~) scroll_hard::$9 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte*~) scroll_hard::$11 ← (byte*) SCREEN + (byte~) scroll_hard::$10 + (byte[]) scroll_hard::line5 ← (byte*~) scroll_hard::$11 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte*~) scroll_hard::$13 ← (byte*) SCREEN + (byte~) scroll_hard::$12 + (byte[]) scroll_hard::line6 ← (byte*~) scroll_hard::$13 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte*~) scroll_hard::$15 ← (byte*) SCREEN + (byte~) scroll_hard::$14 + (byte[]) scroll_hard::line7 ← (byte*~) scroll_hard::$15 + (byte) scroll_hard::i ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i ← ++ (byte) scroll_hard::i + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@2 +scroll_hard::@2: scope:[scroll_hard] from scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@2 + return + to:@return +@5: scope:[] from @4 + to:@6 +fillscreen: scope:[fillscreen] from + (byte*) fillscreen::cursor ← (byte*) fillscreen::screen + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + *((byte*) fillscreen::cursor) ← (byte) fillscreen::fill + (byte*) fillscreen::cursor ← ++ (byte*) fillscreen::cursor + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@2 +fillscreen::@2: scope:[fillscreen] from fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@2 + return + to:@return +@6: scope:[] from @5 + call main + to:@end +@end: scope:[] from @6 + +Removing empty block main::@4 +Removing empty block main::@6 +Removing empty block next_char::@3 +Removing empty block @4 +Removing empty block scroll_hard::@2 +Removing empty block @5 +Removing empty block fillscreen::@2 +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT ← (byte) 1 + (byte*) CHARGEN ← (word) 53248 + (byte*) SCREEN ← (word) 1024 + (byte*) RASTER ← (word) 53266 + (byte*) BGCOL ← (word) 53280 + (byte*) SCROLL ← (word) 53270 + (byte*) TEXT ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from + (void~) main::$0 ← call fillscreen (byte*) SCREEN (byte) 32 + to:main::@2 +main::@1: scope:[main] from main::@5 + to:main::@2 +main::@2: scope:[main] from main main::@1 main::@2 + (boolean~) main::$1 ← *((byte*) RASTER) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (boolean~) main::$2 ← *((byte*) RASTER) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL) ← ++ *((byte*) BGCOL) + (void~) main::$3 ← call scroll_soft + *((byte*) BGCOL) ← -- *((byte*) BGCOL) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@5 + return + to:@return +@1: scope:[] from @begin + (byte) scroll ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from + (byte) scroll ← -- (byte) scroll + (boolean~) scroll_soft::$0 ← (byte) scroll == (byte) 255 + (boolean~) scroll_soft::$1 ← ! (boolean~) scroll_soft::$0 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + *((byte*) SCROLL) ← (byte) scroll + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll ← (byte) 7 + (void~) scroll_soft::$2 ← call scroll_bit + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + (byte*) current_chargen ← (byte*) CHARGEN + (byte) current_bit ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from + (void~) scroll_bit::$0 ← call scroll_hard + (byte~) scroll_bit::$1 ← (byte) current_bit >> (byte) 1 + (byte) current_bit ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$2 ← (byte) current_bit == (byte) 0 + (boolean~) scroll_bit::$3 ← ! (boolean~) scroll_bit::$2 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit scroll_bit::@4 + asm { sei } + *((byte*) PROCPORT) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN + (byte) 40 + (byte*~) scroll_bit::$10 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$10 + (byte) scroll_bit::r ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$4 ← call next_char + (word) scroll_bit::c ← (byte~) scroll_bit::$4 + (word~) scroll_bit::$5 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$5 + (word~) scroll_bit::$6 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$6 + (word~) scroll_bit::$7 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$7 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN + (word) scroll_bit::c + (byte*) current_chargen ← (byte*~) scroll_bit::$8 + (byte) current_bit ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte~) scroll_bit::$11 ← (byte*) current_chargen *idx (byte) scroll_bit::r + (byte) scroll_bit::bits ← (byte~) scroll_bit::$11 + (byte) scroll_bit::b ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits & (byte) current_bit + (boolean~) scroll_bit::$13 ← (byte~) scroll_bit::$12 != (byte) 0 + (boolean~) scroll_bit::$14 ← ! (boolean~) scroll_bit::$13 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + *((byte*) scroll_bit::sc) ← (byte) scroll_bit::b + (byte*~) scroll_bit::$15 ← (byte*) scroll_bit::sc + (byte) 40 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$15 + (byte) scroll_bit::r ← ++ (byte) scroll_bit::r + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + (byte*) nxt ← (byte*) TEXT + to:@6 +next_char: scope:[next_char] from + (byte) next_char::c ← *((byte*) nxt) + (boolean~) next_char::$0 ← (byte) next_char::c == (byte) '@' + (boolean~) next_char::$1 ← ! (boolean~) next_char::$0 + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte*) nxt ← ++ (byte*) nxt + (byte) next_char::return ← (byte) next_char::c + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte*) nxt ← (byte*) TEXT + (byte) next_char::c ← *((byte*) nxt) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + (byte) next_char::return ← (byte) next_char::return + return (byte) next_char::return + to:@return +scroll_hard: scope:[scroll_hard] from + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte*~) scroll_hard::$1 ← (byte*) SCREEN + (byte~) scroll_hard::$0 + (byte[]) scroll_hard::line0 ← (byte*~) scroll_hard::$1 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte*~) scroll_hard::$3 ← (byte*) SCREEN + (byte~) scroll_hard::$2 + (byte[]) scroll_hard::line1 ← (byte*~) scroll_hard::$3 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte*~) scroll_hard::$5 ← (byte*) SCREEN + (byte~) scroll_hard::$4 + (byte[]) scroll_hard::line2 ← (byte*~) scroll_hard::$5 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte*~) scroll_hard::$7 ← (byte*) SCREEN + (byte~) scroll_hard::$6 + (byte[]) scroll_hard::line3 ← (byte*~) scroll_hard::$7 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte*~) scroll_hard::$9 ← (byte*) SCREEN + (byte~) scroll_hard::$8 + (byte[]) scroll_hard::line4 ← (byte*~) scroll_hard::$9 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte*~) scroll_hard::$11 ← (byte*) SCREEN + (byte~) scroll_hard::$10 + (byte[]) scroll_hard::line5 ← (byte*~) scroll_hard::$11 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte*~) scroll_hard::$13 ← (byte*) SCREEN + (byte~) scroll_hard::$12 + (byte[]) scroll_hard::line6 ← (byte*~) scroll_hard::$13 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte*~) scroll_hard::$15 ← (byte*) SCREEN + (byte~) scroll_hard::$14 + (byte[]) scroll_hard::line7 ← (byte*~) scroll_hard::$15 + (byte) scroll_hard::i ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i ← ++ (byte) scroll_hard::i + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from + (byte*) fillscreen::cursor ← (byte*) fillscreen::screen + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + *((byte*) fillscreen::cursor) ← (byte) fillscreen::fill + (byte*) fillscreen::cursor ← ++ (byte*) fillscreen::cursor + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main + to:@end +@end: scope:[] from @6 + +PROCEDURE MODIFY VARIABLE ANALYSIS +main modifies scroll +main modifies current_bit +main modifies nxt +main modifies current_chargen +scroll_soft modifies scroll +scroll_soft modifies current_bit +scroll_soft modifies nxt +scroll_soft modifies current_chargen +scroll_bit modifies current_bit +scroll_bit modifies nxt +scroll_bit modifies current_chargen +next_char modifies nxt + +CONTROL FLOW GRAPH WITH ASSIGNMENT CALL +@begin: scope:[] from + (byte*) PROCPORT ← (byte) 1 + (byte*) CHARGEN ← (word) 53248 + (byte*) SCREEN ← (word) 1024 + (byte*) RASTER ← (word) 53266 + (byte*) BGCOL ← (word) 53280 + (byte*) SCROLL ← (word) 53270 + (byte*) TEXT ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) fillscreen::screen ← (byte*) SCREEN + (byte) fillscreen::fill ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (boolean~) main::$1 ← *((byte*) RASTER) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (boolean~) main::$2 ← *((byte*) RASTER) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL) ← ++ *((byte*) BGCOL) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + (byte) scroll ← (byte) scroll + (byte) current_bit ← (byte) current_bit + (byte*) nxt ← (byte*) nxt + (byte*) current_chargen ← (byte*) current_chargen + *((byte*) BGCOL) ← -- *((byte*) BGCOL) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + (byte) scroll ← (byte) scroll + (byte) current_bit ← (byte) current_bit + (byte*) nxt ← (byte*) nxt + (byte*) current_chargen ← (byte*) current_chargen + return + to:@return +@1: scope:[] from @begin + (byte) scroll ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll ← -- (byte) scroll + (boolean~) scroll_soft::$0 ← (byte) scroll == (byte) 255 + (boolean~) scroll_soft::$1 ← ! (boolean~) scroll_soft::$0 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + *((byte*) SCROLL) ← (byte) scroll + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + (byte) current_bit ← (byte) current_bit + (byte*) nxt ← (byte*) nxt + (byte*) current_chargen ← (byte*) current_chargen + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + (byte) scroll ← (byte) scroll + (byte) current_bit ← (byte) current_bit + (byte*) nxt ← (byte*) nxt + (byte*) current_chargen ← (byte*) current_chargen + return + to:@return +@2: scope:[] from @1 + (byte*) current_chargen ← (byte*) CHARGEN + (byte) current_bit ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit >> (byte) 1 + (byte) current_bit ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$2 ← (byte) current_bit == (byte) 0 + (boolean~) scroll_bit::$3 ← ! (boolean~) scroll_bit::$2 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + asm { sei } + *((byte*) PROCPORT) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN + (byte) 40 + (byte*~) scroll_bit::$10 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$10 + (byte) scroll_bit::r ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + (byte) next_char::return ← call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (byte~) scroll_bit::$4 ← (byte) next_char::return + (byte*) nxt ← (byte*) nxt + (word) scroll_bit::c ← (byte~) scroll_bit::$4 + (word~) scroll_bit::$5 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$5 + (word~) scroll_bit::$6 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$6 + (word~) scroll_bit::$7 ← (word) scroll_bit::c << (byte) 1 + (word) scroll_bit::c ← (word~) scroll_bit::$7 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN + (word) scroll_bit::c + (byte*) current_chargen ← (byte*~) scroll_bit::$8 + (byte) current_bit ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte~) scroll_bit::$11 ← (byte*) current_chargen *idx (byte) scroll_bit::r + (byte) scroll_bit::bits ← (byte~) scroll_bit::$11 + (byte) scroll_bit::b ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits & (byte) current_bit + (boolean~) scroll_bit::$13 ← (byte~) scroll_bit::$12 != (byte) 0 + (boolean~) scroll_bit::$14 ← ! (boolean~) scroll_bit::$13 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + *((byte*) scroll_bit::sc) ← (byte) scroll_bit::b + (byte*~) scroll_bit::$15 ← (byte*) scroll_bit::sc + (byte) 40 + (byte*) scroll_bit::sc ← (byte*~) scroll_bit::$15 + (byte) scroll_bit::r ← ++ (byte) scroll_bit::r + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + (byte) current_bit ← (byte) current_bit + (byte*) nxt ← (byte*) nxt + (byte*) current_chargen ← (byte*) current_chargen + return + to:@return +@3: scope:[] from @2 + (byte*) nxt ← (byte*) TEXT + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c ← *((byte*) nxt) + (boolean~) next_char::$0 ← (byte) next_char::c == (byte) '@' + (boolean~) next_char::$1 ← ! (boolean~) next_char::$0 + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte*) nxt ← ++ (byte*) nxt + (byte) next_char::return ← (byte) next_char::c + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte*) nxt ← (byte*) TEXT + (byte) next_char::c ← *((byte*) nxt) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + (byte) next_char::return ← (byte) next_char::return + (byte*) nxt ← (byte*) nxt + return (byte) next_char::return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte*~) scroll_hard::$1 ← (byte*) SCREEN + (byte~) scroll_hard::$0 + (byte[]) scroll_hard::line0 ← (byte*~) scroll_hard::$1 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte*~) scroll_hard::$3 ← (byte*) SCREEN + (byte~) scroll_hard::$2 + (byte[]) scroll_hard::line1 ← (byte*~) scroll_hard::$3 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte*~) scroll_hard::$5 ← (byte*) SCREEN + (byte~) scroll_hard::$4 + (byte[]) scroll_hard::line2 ← (byte*~) scroll_hard::$5 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte*~) scroll_hard::$7 ← (byte*) SCREEN + (byte~) scroll_hard::$6 + (byte[]) scroll_hard::line3 ← (byte*~) scroll_hard::$7 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte*~) scroll_hard::$9 ← (byte*) SCREEN + (byte~) scroll_hard::$8 + (byte[]) scroll_hard::line4 ← (byte*~) scroll_hard::$9 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte*~) scroll_hard::$11 ← (byte*) SCREEN + (byte~) scroll_hard::$10 + (byte[]) scroll_hard::line5 ← (byte*~) scroll_hard::$11 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte*~) scroll_hard::$13 ← (byte*) SCREEN + (byte~) scroll_hard::$12 + (byte[]) scroll_hard::line6 ← (byte*~) scroll_hard::$13 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte*~) scroll_hard::$15 ← (byte*) SCREEN + (byte~) scroll_hard::$14 + (byte[]) scroll_hard::line7 ← (byte*~) scroll_hard::$15 + (byte) scroll_hard::i ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7 + (byte) scroll_hard::i) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i ← ++ (byte) scroll_hard::i + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + (byte*) fillscreen::cursor ← (byte*) fillscreen::screen + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + *((byte*) fillscreen::cursor) ← (byte) fillscreen::fill + (byte*) fillscreen::cursor ← ++ (byte*) fillscreen::cursor + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + (byte) scroll ← (byte) scroll + (byte) current_bit ← (byte) current_bit + (byte*) nxt ← (byte*) nxt + (byte*) current_chargen ← (byte*) current_chargen + to:@end +@end: scope:[] from @7 + +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) TEXT#16 ← phi( @6/(byte*) TEXT#18 ) + (byte*) CHARGEN#14 ← phi( @6/(byte*) CHARGEN#16 ) + (byte*) PROCPORT#17 ← phi( @6/(byte*) PROCPORT#19 ) + (byte*) SCROLL#10 ← phi( @6/(byte*) SCROLL#12 ) + (byte*) current_chargen#31 ← phi( @6/(byte*) current_chargen#21 ) + (byte*) nxt#38 ← phi( @6/(byte*) nxt#26 ) + (byte) current_bit#32 ← phi( @6/(byte) current_bit#24 ) + (byte) scroll#22 ← phi( @6/(byte) scroll#15 ) + (byte*) BGCOL#7 ← phi( @6/(byte*) BGCOL#8 ) + (byte*) RASTER#5 ← phi( @6/(byte*) RASTER#7 ) + (byte*) SCREEN#1 ← phi( @6/(byte*) SCREEN#4 ) + (byte*) fillscreen::screen#0 ← (byte*) SCREEN#1 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + (byte*) TEXT#15 ← phi( main/(byte*) TEXT#16 ) + (byte*) CHARGEN#13 ← phi( main/(byte*) CHARGEN#14 ) + (byte*) PROCPORT#16 ← phi( main/(byte*) PROCPORT#17 ) + (byte*) SCREEN#18 ← phi( main/(byte*) SCREEN#1 ) + (byte*) SCROLL#9 ← phi( main/(byte*) SCROLL#10 ) + (byte*) current_chargen#30 ← phi( main/(byte*) current_chargen#31 ) + (byte*) nxt#36 ← phi( main/(byte*) nxt#38 ) + (byte) current_bit#31 ← phi( main/(byte) current_bit#32 ) + (byte) scroll#21 ← phi( main/(byte) scroll#22 ) + (byte*) BGCOL#6 ← phi( main/(byte*) BGCOL#7 ) + (byte*) RASTER#4 ← phi( main/(byte*) RASTER#5 ) + to:main::@2 +main::@1: scope:[main] from main::@8 + (byte*) TEXT#14 ← phi( main::@8/(byte*) TEXT#17 ) + (byte*) CHARGEN#12 ← phi( main::@8/(byte*) CHARGEN#15 ) + (byte*) PROCPORT#15 ← phi( main::@8/(byte*) PROCPORT#18 ) + (byte*) SCREEN#17 ← phi( main::@8/(byte*) SCREEN#19 ) + (byte*) SCROLL#8 ← phi( main::@8/(byte*) SCROLL#11 ) + (byte*) current_chargen#29 ← phi( main::@8/(byte*) current_chargen#0 ) + (byte*) nxt#35 ← phi( main::@8/(byte*) nxt#0 ) + (byte) current_bit#30 ← phi( main::@8/(byte) current_bit#0 ) + (byte) scroll#20 ← phi( main::@8/(byte) scroll#0 ) + (byte*) BGCOL#5 ← phi( main::@8/(byte*) BGCOL#2 ) + (byte*) RASTER#3 ← phi( main::@8/(byte*) RASTER#6 ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#14 main::@2/(byte*) TEXT#13 main::@7/(byte*) TEXT#15 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#12 main::@2/(byte*) CHARGEN#11 main::@7/(byte*) CHARGEN#13 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#15 main::@2/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#16 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#17 main::@2/(byte*) SCREEN#16 main::@7/(byte*) SCREEN#18 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#8 main::@2/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#9 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#29 main::@2/(byte*) current_chargen#27 main::@7/(byte*) current_chargen#30 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#35 main::@2/(byte*) nxt#31 main::@7/(byte*) nxt#36 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#30 main::@2/(byte) current_bit#29 main::@7/(byte) current_bit#31 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#20 main::@2/(byte) scroll#18 main::@7/(byte) scroll#21 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#5 main::@2/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#6 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#3 main::@2/(byte*) RASTER#1 main::@7/(byte*) RASTER#4 ) + (boolean~) main::$1 ← *((byte*) RASTER#1) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (byte*) TEXT#12 ← phi( main::@2/(byte*) TEXT#13 main::@3/(byte*) TEXT#12 ) + (byte*) CHARGEN#10 ← phi( main::@2/(byte*) CHARGEN#11 main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#13 ← phi( main::@2/(byte*) PROCPORT#14 main::@3/(byte*) PROCPORT#13 ) + (byte*) SCREEN#15 ← phi( main::@2/(byte*) SCREEN#16 main::@3/(byte*) SCREEN#15 ) + (byte*) SCROLL#6 ← phi( main::@2/(byte*) SCROLL#7 main::@3/(byte*) SCROLL#6 ) + (byte*) current_chargen#22 ← phi( main::@2/(byte*) current_chargen#27 main::@3/(byte*) current_chargen#22 ) + (byte*) nxt#27 ← phi( main::@2/(byte*) nxt#31 main::@3/(byte*) nxt#27 ) + (byte) current_bit#25 ← phi( main::@2/(byte) current_bit#29 main::@3/(byte) current_bit#25 ) + (byte) scroll#16 ← phi( main::@2/(byte) scroll#18 main::@3/(byte) scroll#16 ) + (byte*) BGCOL#3 ← phi( main::@2/(byte*) BGCOL#4 main::@3/(byte*) BGCOL#3 ) + (byte*) RASTER#2 ← phi( main::@2/(byte*) RASTER#1 main::@3/(byte*) RASTER#2 ) + (boolean~) main::$2 ← *((byte*) RASTER#2) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + (byte*) TEXT#11 ← phi( main::@3/(byte*) TEXT#12 ) + (byte*) CHARGEN#9 ← phi( main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#12 ← phi( main::@3/(byte*) PROCPORT#13 ) + (byte*) SCREEN#13 ← phi( main::@3/(byte*) SCREEN#15 ) + (byte*) RASTER#8 ← phi( main::@3/(byte*) RASTER#2 ) + (byte*) SCROLL#4 ← phi( main::@3/(byte*) SCROLL#6 ) + (byte*) current_chargen#15 ← phi( main::@3/(byte*) current_chargen#22 ) + (byte*) nxt#21 ← phi( main::@3/(byte*) nxt#27 ) + (byte) current_bit#17 ← phi( main::@3/(byte) current_bit#25 ) + (byte) scroll#13 ← phi( main::@3/(byte) scroll#16 ) + (byte*) BGCOL#1 ← phi( main::@3/(byte*) BGCOL#3 ) + *((byte*) BGCOL#1) ← ++ *((byte*) BGCOL#1) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + (byte*) TEXT#17 ← phi( main::@5/(byte*) TEXT#11 ) + (byte*) CHARGEN#15 ← phi( main::@5/(byte*) CHARGEN#9 ) + (byte*) PROCPORT#18 ← phi( main::@5/(byte*) PROCPORT#12 ) + (byte*) SCREEN#19 ← phi( main::@5/(byte*) SCREEN#13 ) + (byte*) SCROLL#11 ← phi( main::@5/(byte*) SCROLL#4 ) + (byte*) RASTER#6 ← phi( main::@5/(byte*) RASTER#8 ) + (byte*) BGCOL#2 ← phi( main::@5/(byte*) BGCOL#1 ) + (byte*) current_chargen#8 ← phi( main::@5/(byte*) current_chargen#15 ) + (byte*) nxt#11 ← phi( main::@5/(byte*) nxt#21 ) + (byte) current_bit#9 ← phi( main::@5/(byte) current_bit#17 ) + (byte) scroll#7 ← phi( main::@5/(byte) scroll#13 ) + (byte) scroll#0 ← (byte) scroll#7 + (byte) current_bit#0 ← (byte) current_bit#9 + (byte*) nxt#0 ← (byte*) nxt#11 + (byte*) current_chargen#0 ← (byte*) current_chargen#8 + *((byte*) BGCOL#2) ← -- *((byte*) BGCOL#2) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + (byte*) current_chargen#9 ← phi( main::@8/(byte*) current_chargen#0 ) + (byte*) nxt#12 ← phi( main::@8/(byte*) nxt#0 ) + (byte) current_bit#10 ← phi( main::@8/(byte) current_bit#0 ) + (byte) scroll#8 ← phi( main::@8/(byte) scroll#0 ) + (byte) scroll#1 ← (byte) scroll#8 + (byte) current_bit#1 ← (byte) current_bit#10 + (byte*) nxt#1 ← (byte*) nxt#12 + (byte*) current_chargen#1 ← (byte*) current_chargen#9 + return + to:@return +@1: scope:[] from @begin + (byte*) PROCPORT#22 ← phi( @begin/(byte*) PROCPORT#0 ) + (byte*) SCROLL#15 ← phi( @begin/(byte*) SCROLL#0 ) + (byte*) BGCOL#11 ← phi( @begin/(byte*) BGCOL#0 ) + (byte*) RASTER#11 ← phi( @begin/(byte*) RASTER#0 ) + (byte*) SCREEN#14 ← phi( @begin/(byte*) SCREEN#0 ) + (byte*) TEXT#5 ← phi( @begin/(byte*) TEXT#0 ) + (byte*) CHARGEN#3 ← phi( @begin/(byte*) CHARGEN#0 ) + (byte) scroll#2 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte*) TEXT#10 ← phi( main::@5/(byte*) TEXT#11 ) + (byte*) CHARGEN#8 ← phi( main::@5/(byte*) CHARGEN#9 ) + (byte*) PROCPORT#11 ← phi( main::@5/(byte*) PROCPORT#12 ) + (byte*) SCREEN#11 ← phi( main::@5/(byte*) SCREEN#13 ) + (byte*) current_chargen#23 ← phi( main::@5/(byte*) current_chargen#15 ) + (byte*) nxt#28 ← phi( main::@5/(byte*) nxt#21 ) + (byte) current_bit#26 ← phi( main::@5/(byte) current_bit#17 ) + (byte*) SCROLL#2 ← phi( main::@5/(byte*) SCROLL#4 ) + (byte) scroll#9 ← phi( main::@5/(byte) scroll#13 ) + (byte) scroll#3 ← -- (byte) scroll#9 + (boolean~) scroll_soft::$0 ← (byte) scroll#3 == (byte) 255 + (boolean~) scroll_soft::$1 ← ! (boolean~) scroll_soft::$0 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#17 ← phi( scroll_soft/(byte*) current_chargen#23 scroll_soft::@3/(byte*) current_chargen#2 ) + (byte*) nxt#23 ← phi( scroll_soft/(byte*) nxt#28 scroll_soft::@3/(byte*) nxt#2 ) + (byte) current_bit#19 ← phi( scroll_soft/(byte) current_bit#26 scroll_soft::@3/(byte) current_bit#2 ) + (byte*) SCROLL#1 ← phi( scroll_soft/(byte*) SCROLL#2 scroll_soft::@3/(byte*) SCROLL#3 ) + (byte) scroll#10 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#1) ← (byte) scroll#10 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte*) TEXT#9 ← phi( scroll_soft/(byte*) TEXT#10 ) + (byte*) CHARGEN#7 ← phi( scroll_soft/(byte*) CHARGEN#8 ) + (byte*) PROCPORT#10 ← phi( scroll_soft/(byte*) PROCPORT#11 ) + (byte*) SCREEN#8 ← phi( scroll_soft/(byte*) SCREEN#11 ) + (byte*) SCROLL#5 ← phi( scroll_soft/(byte*) SCROLL#2 ) + (byte*) current_chargen#16 ← phi( scroll_soft/(byte*) current_chargen#23 ) + (byte*) nxt#22 ← phi( scroll_soft/(byte*) nxt#28 ) + (byte) current_bit#18 ← phi( scroll_soft/(byte) current_bit#26 ) + (byte) scroll#4 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + (byte*) SCROLL#3 ← phi( scroll_soft::@2/(byte*) SCROLL#5 ) + (byte) scroll#14 ← phi( scroll_soft::@2/(byte) scroll#4 ) + (byte*) current_chargen#10 ← phi( scroll_soft::@2/(byte*) current_chargen#16 ) + (byte*) nxt#13 ← phi( scroll_soft::@2/(byte*) nxt#22 ) + (byte) current_bit#11 ← phi( scroll_soft::@2/(byte) current_bit#18 ) + (byte) current_bit#2 ← (byte) current_bit#11 + (byte*) nxt#2 ← (byte*) nxt#13 + (byte*) current_chargen#2 ← (byte*) current_chargen#10 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + (byte*) current_chargen#11 ← phi( scroll_soft::@1/(byte*) current_chargen#17 ) + (byte*) nxt#14 ← phi( scroll_soft::@1/(byte*) nxt#23 ) + (byte) current_bit#12 ← phi( scroll_soft::@1/(byte) current_bit#19 ) + (byte) scroll#11 ← phi( scroll_soft::@1/(byte) scroll#10 ) + (byte) scroll#5 ← (byte) scroll#11 + (byte) current_bit#3 ← (byte) current_bit#12 + (byte*) nxt#3 ← (byte*) nxt#14 + (byte*) current_chargen#3 ← (byte*) current_chargen#11 + return + to:@return +@2: scope:[] from @1 + (byte*) PROCPORT#21 ← phi( @1/(byte*) PROCPORT#22 ) + (byte*) SCROLL#14 ← phi( @1/(byte*) SCROLL#15 ) + (byte*) BGCOL#10 ← phi( @1/(byte*) BGCOL#11 ) + (byte*) RASTER#10 ← phi( @1/(byte*) RASTER#11 ) + (byte) scroll#19 ← phi( @1/(byte) scroll#2 ) + (byte*) SCREEN#12 ← phi( @1/(byte*) SCREEN#14 ) + (byte*) TEXT#3 ← phi( @1/(byte*) TEXT#5 ) + (byte*) CHARGEN#1 ← phi( @1/(byte*) CHARGEN#3 ) + (byte*) current_chargen#4 ← (byte*) CHARGEN#1 + (byte) current_bit#4 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + (byte*) TEXT#8 ← phi( scroll_soft::@2/(byte*) TEXT#9 ) + (byte*) CHARGEN#6 ← phi( scroll_soft::@2/(byte*) CHARGEN#7 ) + (byte*) nxt#32 ← phi( scroll_soft::@2/(byte*) nxt#22 ) + (byte*) current_chargen#28 ← phi( scroll_soft::@2/(byte*) current_chargen#16 ) + (byte*) PROCPORT#6 ← phi( scroll_soft::@2/(byte*) PROCPORT#10 ) + (byte*) SCREEN#7 ← phi( scroll_soft::@2/(byte*) SCREEN#8 ) + (byte) current_bit#20 ← phi( scroll_soft::@2/(byte) current_bit#18 ) + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte*) TEXT#7 ← phi( scroll_bit/(byte*) TEXT#8 ) + (byte*) CHARGEN#5 ← phi( scroll_bit/(byte*) CHARGEN#6 ) + (byte*) nxt#29 ← phi( scroll_bit/(byte*) nxt#32 ) + (byte*) current_chargen#24 ← phi( scroll_bit/(byte*) current_chargen#28 ) + (byte*) SCREEN#5 ← phi( scroll_bit/(byte*) SCREEN#7 ) + (byte*) PROCPORT#3 ← phi( scroll_bit/(byte*) PROCPORT#6 ) + (byte) current_bit#13 ← phi( scroll_bit/(byte) current_bit#20 ) + (byte~) scroll_bit::$1 ← (byte) current_bit#13 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$2 ← (byte) current_bit#5 == (byte) 0 + (boolean~) scroll_bit::$3 ← ! (boolean~) scroll_bit::$2 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#29 scroll_bit::@8/(byte*) nxt#4 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#24 scroll_bit::@8/(byte*) current_chargen#5 ) + (byte*) SCREEN#2 ← phi( scroll_bit::@7/(byte*) SCREEN#5 scroll_bit::@8/(byte*) SCREEN#6 ) + (byte*) PROCPORT#1 ← phi( scroll_bit::@7/(byte*) PROCPORT#3 scroll_bit::@8/(byte*) PROCPORT#4 ) + asm { sei } + *((byte*) PROCPORT#1) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#2 + (byte) 40 + (byte*~) scroll_bit::$10 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$10 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + (byte*) TEXT#6 ← phi( scroll_bit::@7/(byte*) TEXT#7 ) + (byte*) SCREEN#9 ← phi( scroll_bit::@7/(byte*) SCREEN#5 ) + (byte*) PROCPORT#7 ← phi( scroll_bit::@7/(byte*) PROCPORT#3 ) + (byte*) CHARGEN#4 ← phi( scroll_bit::@7/(byte*) CHARGEN#5 ) + (byte*) nxt#24 ← phi( scroll_bit::@7/(byte*) nxt#29 ) + (byte) next_char::return#0 ← call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (byte*) SCREEN#6 ← phi( scroll_bit::@4/(byte*) SCREEN#9 ) + (byte*) PROCPORT#4 ← phi( scroll_bit::@4/(byte*) PROCPORT#7 ) + (byte*) CHARGEN#2 ← phi( scroll_bit::@4/(byte*) CHARGEN#4 ) + (byte*) nxt#15 ← phi( scroll_bit::@4/(byte*) nxt#24 ) + (byte) next_char::return#3 ← phi( scroll_bit::@4/(byte) next_char::return#0 ) + (byte~) scroll_bit::$4 ← (byte) next_char::return#3 + (byte*) nxt#4 ← (byte*) nxt#15 + (word) scroll_bit::c#0 ← (byte~) scroll_bit::$4 + (word~) scroll_bit::$5 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#1 ← (word~) scroll_bit::$5 + (word~) scroll_bit::$6 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#2 ← (word~) scroll_bit::$6 + (word~) scroll_bit::$7 ← (word) scroll_bit::c#2 << (byte) 1 + (word) scroll_bit::c#3 ← (word~) scroll_bit::$7 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#2 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) nxt#33 ← phi( scroll_bit::@1/(byte*) nxt#37 scroll_bit::@3/(byte*) nxt#30 ) + (byte*) PROCPORT#8 ← phi( scroll_bit::@1/(byte*) PROCPORT#1 scroll_bit::@3/(byte*) PROCPORT#5 ) + (byte*) scroll_bit::sc#3 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) current_bit#14 ← phi( scroll_bit::@1/(byte) current_bit#21 scroll_bit::@3/(byte) current_bit#22 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte*) current_chargen#12 ← phi( scroll_bit::@1/(byte*) current_chargen#18 scroll_bit::@3/(byte*) current_chargen#19 ) + (byte~) scroll_bit::$11 ← (byte*) current_chargen#12 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::bits#0 ← (byte~) scroll_bit::$11 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#14 + (boolean~) scroll_bit::$13 ← (byte~) scroll_bit::$12 != (byte) 0 + (boolean~) scroll_bit::$14 ← ! (boolean~) scroll_bit::$13 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte*) nxt#30 ← phi( scroll_bit::@2/(byte*) nxt#33 scroll_bit::@5/(byte*) nxt#34 ) + (byte*) PROCPORT#5 ← phi( scroll_bit::@2/(byte*) PROCPORT#8 scroll_bit::@5/(byte*) PROCPORT#9 ) + (byte) current_bit#22 ← phi( scroll_bit::@2/(byte) current_bit#14 scroll_bit::@5/(byte) current_bit#27 ) + (byte*) current_chargen#19 ← phi( scroll_bit::@2/(byte*) current_chargen#12 scroll_bit::@5/(byte*) current_chargen#25 ) + (byte) scroll_bit::r#3 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 scroll_bit::@5/(byte) scroll_bit::r#4 ) + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 scroll_bit::@5/(byte*) scroll_bit::sc#4 ) + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*~) scroll_bit::$15 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte*) scroll_bit::sc#1 ← (byte*~) scroll_bit::$15 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#3 + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r#1 != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte*) nxt#34 ← phi( scroll_bit::@2/(byte*) nxt#33 ) + (byte*) PROCPORT#9 ← phi( scroll_bit::@2/(byte*) PROCPORT#8 ) + (byte) current_bit#27 ← phi( scroll_bit::@2/(byte) current_bit#14 ) + (byte*) current_chargen#25 ← phi( scroll_bit::@2/(byte*) current_chargen#12 ) + (byte) scroll_bit::r#4 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 ) + (byte*) scroll_bit::sc#4 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 ) + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + (byte*) current_chargen#20 ← phi( scroll_bit::@3/(byte*) current_chargen#19 ) + (byte*) nxt#25 ← phi( scroll_bit::@3/(byte*) nxt#30 ) + (byte) current_bit#23 ← phi( scroll_bit::@3/(byte) current_bit#22 ) + (byte*) PROCPORT#2 ← phi( scroll_bit::@3/(byte*) PROCPORT#5 ) + *((byte*) PROCPORT#2) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + (byte*) current_chargen#13 ← phi( scroll_bit::@6/(byte*) current_chargen#20 ) + (byte*) nxt#16 ← phi( scroll_bit::@6/(byte*) nxt#25 ) + (byte) current_bit#15 ← phi( scroll_bit::@6/(byte) current_bit#23 ) + (byte) current_bit#7 ← (byte) current_bit#15 + (byte*) nxt#5 ← (byte*) nxt#16 + (byte*) current_chargen#6 ← (byte*) current_chargen#13 + return + to:@return +@3: scope:[] from @2 + (byte*) CHARGEN#17 ← phi( @2/(byte*) CHARGEN#1 ) + (byte*) PROCPORT#20 ← phi( @2/(byte*) PROCPORT#21 ) + (byte*) SCROLL#13 ← phi( @2/(byte*) SCROLL#14 ) + (byte*) BGCOL#9 ← phi( @2/(byte*) BGCOL#10 ) + (byte*) RASTER#9 ← phi( @2/(byte*) RASTER#10 ) + (byte*) current_chargen#26 ← phi( @2/(byte*) current_chargen#4 ) + (byte) current_bit#28 ← phi( @2/(byte) current_bit#4 ) + (byte) scroll#17 ← phi( @2/(byte) scroll#19 ) + (byte*) SCREEN#10 ← phi( @2/(byte*) SCREEN#12 ) + (byte*) TEXT#1 ← phi( @2/(byte*) TEXT#3 ) + (byte*) nxt#6 ← (byte*) TEXT#1 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte*) TEXT#4 ← phi( scroll_bit::@4/(byte*) TEXT#6 ) + (byte*) nxt#17 ← phi( scroll_bit::@4/(byte*) nxt#24 ) + (byte) next_char::c#0 ← *((byte*) nxt#17) + (boolean~) next_char::$0 ← (byte) next_char::c#0 == (byte) '@' + (boolean~) next_char::$1 ← ! (boolean~) next_char::$0 + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#17 next_char::@2/(byte*) nxt#8 ) + (byte*) nxt#7 ← ++ (byte*) nxt#18 + (byte) next_char::return#1 ← (byte) next_char::c#2 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte*) TEXT#2 ← phi( next_char/(byte*) TEXT#4 ) + (byte*) nxt#8 ← (byte*) TEXT#2 + (byte) next_char::c#1 ← *((byte*) nxt#8) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + (byte*) nxt#19 ← phi( next_char::@1/(byte*) nxt#7 ) + (byte) next_char::return#4 ← phi( next_char::@1/(byte) next_char::return#1 ) + (byte) next_char::return#2 ← (byte) next_char::return#4 + (byte*) nxt#9 ← (byte*) nxt#19 + return (byte) next_char::return#2 + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte*) SCREEN#3 ← phi( scroll_bit/(byte*) SCREEN#7 ) + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte*~) scroll_hard::$1 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$0 + (byte[]) scroll_hard::line0#0 ← (byte*~) scroll_hard::$1 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte*~) scroll_hard::$3 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$2 + (byte[]) scroll_hard::line1#0 ← (byte*~) scroll_hard::$3 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte*~) scroll_hard::$5 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$4 + (byte[]) scroll_hard::line2#0 ← (byte*~) scroll_hard::$5 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte*~) scroll_hard::$7 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$6 + (byte[]) scroll_hard::line3#0 ← (byte*~) scroll_hard::$7 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte*~) scroll_hard::$9 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$8 + (byte[]) scroll_hard::line4#0 ← (byte*~) scroll_hard::$9 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte*~) scroll_hard::$11 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$10 + (byte[]) scroll_hard::line5#0 ← (byte*~) scroll_hard::$11 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte*~) scroll_hard::$13 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$12 + (byte[]) scroll_hard::line6#0 ← (byte*~) scroll_hard::$13 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte*~) scroll_hard::$15 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$14 + (byte[]) scroll_hard::line7#0 ← (byte*~) scroll_hard::$15 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte[]) scroll_hard::line7#1 ← phi( scroll_hard/(byte[]) scroll_hard::line7#0 scroll_hard::@1/(byte[]) scroll_hard::line7#1 ) + (byte[]) scroll_hard::line6#1 ← phi( scroll_hard/(byte[]) scroll_hard::line6#0 scroll_hard::@1/(byte[]) scroll_hard::line6#1 ) + (byte[]) scroll_hard::line5#1 ← phi( scroll_hard/(byte[]) scroll_hard::line5#0 scroll_hard::@1/(byte[]) scroll_hard::line5#1 ) + (byte[]) scroll_hard::line4#1 ← phi( scroll_hard/(byte[]) scroll_hard::line4#0 scroll_hard::@1/(byte[]) scroll_hard::line4#1 ) + (byte[]) scroll_hard::line3#1 ← phi( scroll_hard/(byte[]) scroll_hard::line3#0 scroll_hard::@1/(byte[]) scroll_hard::line3#1 ) + (byte[]) scroll_hard::line2#1 ← phi( scroll_hard/(byte[]) scroll_hard::line2#0 scroll_hard::@1/(byte[]) scroll_hard::line2#1 ) + (byte[]) scroll_hard::line1#1 ← phi( scroll_hard/(byte[]) scroll_hard::line1#0 scroll_hard::@1/(byte[]) scroll_hard::line1#1 ) + (byte[]) scroll_hard::line0#1 ← phi( scroll_hard/(byte[]) scroll_hard::line0#0 scroll_hard::@1/(byte[]) scroll_hard::line0#1 ) + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#1 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#1 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#1 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#1 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#1 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#1 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#1 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i#1 != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + (byte) fillscreen::fill#2 ← phi( main/(byte) fillscreen::fill#0 ) + (byte*) fillscreen::screen#1 ← phi( main/(byte*) fillscreen::screen#0 ) + (byte*) fillscreen::cursor#0 ← (byte*) fillscreen::screen#1 + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::screen#2 ← phi( fillscreen/(byte*) fillscreen::screen#1 fillscreen::@1/(byte*) fillscreen::screen#2 ) + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + (byte) fillscreen::fill#1 ← phi( fillscreen/(byte) fillscreen::fill#2 fillscreen::@1/(byte) fillscreen::fill#1 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#1 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen#2 + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + (byte*) TEXT#18 ← phi( @3/(byte*) TEXT#1 ) + (byte*) CHARGEN#16 ← phi( @3/(byte*) CHARGEN#17 ) + (byte*) PROCPORT#19 ← phi( @3/(byte*) PROCPORT#20 ) + (byte*) SCROLL#12 ← phi( @3/(byte*) SCROLL#13 ) + (byte*) BGCOL#8 ← phi( @3/(byte*) BGCOL#9 ) + (byte*) RASTER#7 ← phi( @3/(byte*) RASTER#9 ) + (byte*) current_chargen#21 ← phi( @3/(byte*) current_chargen#26 ) + (byte*) nxt#26 ← phi( @3/(byte*) nxt#6 ) + (byte) current_bit#24 ← phi( @3/(byte) current_bit#28 ) + (byte) scroll#15 ← phi( @3/(byte) scroll#17 ) + (byte*) SCREEN#4 ← phi( @3/(byte*) SCREEN#10 ) + call main param-assignment + to:@7 +@7: scope:[] from @6 + (byte*) current_chargen#14 ← phi( @6/(byte*) current_chargen#21 ) + (byte*) nxt#20 ← phi( @6/(byte*) nxt#26 ) + (byte) current_bit#16 ← phi( @6/(byte) current_bit#24 ) + (byte) scroll#12 ← phi( @6/(byte) scroll#15 ) + (byte) scroll#6 ← (byte) scroll#12 + (byte) current_bit#8 ← (byte) current_bit#16 + (byte*) nxt#10 ← (byte*) nxt#20 + (byte*) current_chargen#7 ← (byte*) current_chargen#14 + to:@end +@end: scope:[] from @7 + +CONTROL FLOW GRAPH WITH ASSIGNMENT CALL & RETURN +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) TEXT#16 ← phi( @6/(byte*) TEXT#18 ) + (byte*) CHARGEN#14 ← phi( @6/(byte*) CHARGEN#16 ) + (byte*) PROCPORT#17 ← phi( @6/(byte*) PROCPORT#19 ) + (byte*) SCROLL#10 ← phi( @6/(byte*) SCROLL#12 ) + (byte*) current_chargen#31 ← phi( @6/(byte*) current_chargen#21 ) + (byte*) nxt#38 ← phi( @6/(byte*) nxt#26 ) + (byte) current_bit#32 ← phi( @6/(byte) current_bit#24 ) + (byte) scroll#22 ← phi( @6/(byte) scroll#15 ) + (byte*) BGCOL#7 ← phi( @6/(byte*) BGCOL#8 ) + (byte*) RASTER#5 ← phi( @6/(byte*) RASTER#7 ) + (byte*) SCREEN#1 ← phi( @6/(byte*) SCREEN#4 ) + (byte*) fillscreen::screen#0 ← (byte*) SCREEN#1 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + (byte*) TEXT#15 ← phi( main/(byte*) TEXT#16 ) + (byte*) CHARGEN#13 ← phi( main/(byte*) CHARGEN#14 ) + (byte*) PROCPORT#16 ← phi( main/(byte*) PROCPORT#17 ) + (byte*) SCREEN#18 ← phi( main/(byte*) SCREEN#1 ) + (byte*) SCROLL#9 ← phi( main/(byte*) SCROLL#10 ) + (byte*) current_chargen#30 ← phi( main/(byte*) current_chargen#31 ) + (byte*) nxt#36 ← phi( main/(byte*) nxt#38 ) + (byte) current_bit#31 ← phi( main/(byte) current_bit#32 ) + (byte) scroll#21 ← phi( main/(byte) scroll#22 ) + (byte*) BGCOL#6 ← phi( main/(byte*) BGCOL#7 ) + (byte*) RASTER#4 ← phi( main/(byte*) RASTER#5 ) + to:main::@2 +main::@1: scope:[main] from main::@8 + (byte*) TEXT#14 ← phi( main::@8/(byte*) TEXT#17 ) + (byte*) CHARGEN#12 ← phi( main::@8/(byte*) CHARGEN#15 ) + (byte*) PROCPORT#15 ← phi( main::@8/(byte*) PROCPORT#18 ) + (byte*) SCREEN#17 ← phi( main::@8/(byte*) SCREEN#19 ) + (byte*) SCROLL#8 ← phi( main::@8/(byte*) SCROLL#11 ) + (byte*) current_chargen#29 ← phi( main::@8/(byte*) current_chargen#0 ) + (byte*) nxt#35 ← phi( main::@8/(byte*) nxt#0 ) + (byte) current_bit#30 ← phi( main::@8/(byte) current_bit#0 ) + (byte) scroll#20 ← phi( main::@8/(byte) scroll#0 ) + (byte*) BGCOL#5 ← phi( main::@8/(byte*) BGCOL#2 ) + (byte*) RASTER#3 ← phi( main::@8/(byte*) RASTER#6 ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#14 main::@2/(byte*) TEXT#13 main::@7/(byte*) TEXT#15 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#12 main::@2/(byte*) CHARGEN#11 main::@7/(byte*) CHARGEN#13 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#15 main::@2/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#16 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#17 main::@2/(byte*) SCREEN#16 main::@7/(byte*) SCREEN#18 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#8 main::@2/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#9 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#29 main::@2/(byte*) current_chargen#27 main::@7/(byte*) current_chargen#30 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#35 main::@2/(byte*) nxt#31 main::@7/(byte*) nxt#36 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#30 main::@2/(byte) current_bit#29 main::@7/(byte) current_bit#31 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#20 main::@2/(byte) scroll#18 main::@7/(byte) scroll#21 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#5 main::@2/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#6 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#3 main::@2/(byte*) RASTER#1 main::@7/(byte*) RASTER#4 ) + (boolean~) main::$1 ← *((byte*) RASTER#1) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (byte*) TEXT#12 ← phi( main::@2/(byte*) TEXT#13 main::@3/(byte*) TEXT#12 ) + (byte*) CHARGEN#10 ← phi( main::@2/(byte*) CHARGEN#11 main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#13 ← phi( main::@2/(byte*) PROCPORT#14 main::@3/(byte*) PROCPORT#13 ) + (byte*) SCREEN#15 ← phi( main::@2/(byte*) SCREEN#16 main::@3/(byte*) SCREEN#15 ) + (byte*) SCROLL#6 ← phi( main::@2/(byte*) SCROLL#7 main::@3/(byte*) SCROLL#6 ) + (byte*) current_chargen#22 ← phi( main::@2/(byte*) current_chargen#27 main::@3/(byte*) current_chargen#22 ) + (byte*) nxt#27 ← phi( main::@2/(byte*) nxt#31 main::@3/(byte*) nxt#27 ) + (byte) current_bit#25 ← phi( main::@2/(byte) current_bit#29 main::@3/(byte) current_bit#25 ) + (byte) scroll#16 ← phi( main::@2/(byte) scroll#18 main::@3/(byte) scroll#16 ) + (byte*) BGCOL#3 ← phi( main::@2/(byte*) BGCOL#4 main::@3/(byte*) BGCOL#3 ) + (byte*) RASTER#2 ← phi( main::@2/(byte*) RASTER#1 main::@3/(byte*) RASTER#2 ) + (boolean~) main::$2 ← *((byte*) RASTER#2) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + (byte*) TEXT#11 ← phi( main::@3/(byte*) TEXT#12 ) + (byte*) CHARGEN#9 ← phi( main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#12 ← phi( main::@3/(byte*) PROCPORT#13 ) + (byte*) SCREEN#13 ← phi( main::@3/(byte*) SCREEN#15 ) + (byte*) RASTER#8 ← phi( main::@3/(byte*) RASTER#2 ) + (byte*) SCROLL#4 ← phi( main::@3/(byte*) SCROLL#6 ) + (byte*) current_chargen#15 ← phi( main::@3/(byte*) current_chargen#22 ) + (byte*) nxt#21 ← phi( main::@3/(byte*) nxt#27 ) + (byte) current_bit#17 ← phi( main::@3/(byte) current_bit#25 ) + (byte) scroll#13 ← phi( main::@3/(byte) scroll#16 ) + (byte*) BGCOL#1 ← phi( main::@3/(byte*) BGCOL#3 ) + *((byte*) BGCOL#1) ← ++ *((byte*) BGCOL#1) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + (byte*) TEXT#17 ← phi( main::@5/(byte*) TEXT#11 ) + (byte*) CHARGEN#15 ← phi( main::@5/(byte*) CHARGEN#9 ) + (byte*) PROCPORT#18 ← phi( main::@5/(byte*) PROCPORT#12 ) + (byte*) SCREEN#19 ← phi( main::@5/(byte*) SCREEN#13 ) + (byte*) SCROLL#11 ← phi( main::@5/(byte*) SCROLL#4 ) + (byte*) RASTER#6 ← phi( main::@5/(byte*) RASTER#8 ) + (byte*) BGCOL#2 ← phi( main::@5/(byte*) BGCOL#1 ) + (byte*) current_chargen#8 ← phi( main::@5/(byte*) current_chargen#3 ) + (byte*) nxt#11 ← phi( main::@5/(byte*) nxt#3 ) + (byte) current_bit#9 ← phi( main::@5/(byte) current_bit#3 ) + (byte) scroll#7 ← phi( main::@5/(byte) scroll#5 ) + (byte) scroll#0 ← (byte) scroll#7 + (byte) current_bit#0 ← (byte) current_bit#9 + (byte*) nxt#0 ← (byte*) nxt#11 + (byte*) current_chargen#0 ← (byte*) current_chargen#8 + *((byte*) BGCOL#2) ← -- *((byte*) BGCOL#2) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + (byte*) current_chargen#9 ← phi( main::@8/(byte*) current_chargen#0 ) + (byte*) nxt#12 ← phi( main::@8/(byte*) nxt#0 ) + (byte) current_bit#10 ← phi( main::@8/(byte) current_bit#0 ) + (byte) scroll#8 ← phi( main::@8/(byte) scroll#0 ) + (byte) scroll#1 ← (byte) scroll#8 + (byte) current_bit#1 ← (byte) current_bit#10 + (byte*) nxt#1 ← (byte*) nxt#12 + (byte*) current_chargen#1 ← (byte*) current_chargen#9 + return + to:@return +@1: scope:[] from @begin + (byte*) PROCPORT#22 ← phi( @begin/(byte*) PROCPORT#0 ) + (byte*) SCROLL#15 ← phi( @begin/(byte*) SCROLL#0 ) + (byte*) BGCOL#11 ← phi( @begin/(byte*) BGCOL#0 ) + (byte*) RASTER#11 ← phi( @begin/(byte*) RASTER#0 ) + (byte*) SCREEN#14 ← phi( @begin/(byte*) SCREEN#0 ) + (byte*) TEXT#5 ← phi( @begin/(byte*) TEXT#0 ) + (byte*) CHARGEN#3 ← phi( @begin/(byte*) CHARGEN#0 ) + (byte) scroll#2 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte*) TEXT#10 ← phi( main::@5/(byte*) TEXT#11 ) + (byte*) CHARGEN#8 ← phi( main::@5/(byte*) CHARGEN#9 ) + (byte*) PROCPORT#11 ← phi( main::@5/(byte*) PROCPORT#12 ) + (byte*) SCREEN#11 ← phi( main::@5/(byte*) SCREEN#13 ) + (byte*) current_chargen#23 ← phi( main::@5/(byte*) current_chargen#15 ) + (byte*) nxt#28 ← phi( main::@5/(byte*) nxt#21 ) + (byte) current_bit#26 ← phi( main::@5/(byte) current_bit#17 ) + (byte*) SCROLL#2 ← phi( main::@5/(byte*) SCROLL#4 ) + (byte) scroll#9 ← phi( main::@5/(byte) scroll#13 ) + (byte) scroll#3 ← -- (byte) scroll#9 + (boolean~) scroll_soft::$0 ← (byte) scroll#3 == (byte) 255 + (boolean~) scroll_soft::$1 ← ! (boolean~) scroll_soft::$0 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#17 ← phi( scroll_soft/(byte*) current_chargen#23 scroll_soft::@3/(byte*) current_chargen#2 ) + (byte*) nxt#23 ← phi( scroll_soft/(byte*) nxt#28 scroll_soft::@3/(byte*) nxt#2 ) + (byte) current_bit#19 ← phi( scroll_soft/(byte) current_bit#26 scroll_soft::@3/(byte) current_bit#2 ) + (byte*) SCROLL#1 ← phi( scroll_soft/(byte*) SCROLL#2 scroll_soft::@3/(byte*) SCROLL#3 ) + (byte) scroll#10 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#1) ← (byte) scroll#10 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte*) TEXT#9 ← phi( scroll_soft/(byte*) TEXT#10 ) + (byte*) CHARGEN#7 ← phi( scroll_soft/(byte*) CHARGEN#8 ) + (byte*) PROCPORT#10 ← phi( scroll_soft/(byte*) PROCPORT#11 ) + (byte*) SCREEN#8 ← phi( scroll_soft/(byte*) SCREEN#11 ) + (byte*) SCROLL#5 ← phi( scroll_soft/(byte*) SCROLL#2 ) + (byte*) current_chargen#16 ← phi( scroll_soft/(byte*) current_chargen#23 ) + (byte*) nxt#22 ← phi( scroll_soft/(byte*) nxt#28 ) + (byte) current_bit#18 ← phi( scroll_soft/(byte) current_bit#26 ) + (byte) scroll#4 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + (byte*) SCROLL#3 ← phi( scroll_soft::@2/(byte*) SCROLL#5 ) + (byte) scroll#14 ← phi( scroll_soft::@2/(byte) scroll#4 ) + (byte*) current_chargen#10 ← phi( scroll_soft::@2/(byte*) current_chargen#6 ) + (byte*) nxt#13 ← phi( scroll_soft::@2/(byte*) nxt#5 ) + (byte) current_bit#11 ← phi( scroll_soft::@2/(byte) current_bit#7 ) + (byte) current_bit#2 ← (byte) current_bit#11 + (byte*) nxt#2 ← (byte*) nxt#13 + (byte*) current_chargen#2 ← (byte*) current_chargen#10 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + (byte*) current_chargen#11 ← phi( scroll_soft::@1/(byte*) current_chargen#17 ) + (byte*) nxt#14 ← phi( scroll_soft::@1/(byte*) nxt#23 ) + (byte) current_bit#12 ← phi( scroll_soft::@1/(byte) current_bit#19 ) + (byte) scroll#11 ← phi( scroll_soft::@1/(byte) scroll#10 ) + (byte) scroll#5 ← (byte) scroll#11 + (byte) current_bit#3 ← (byte) current_bit#12 + (byte*) nxt#3 ← (byte*) nxt#14 + (byte*) current_chargen#3 ← (byte*) current_chargen#11 + return + to:@return +@2: scope:[] from @1 + (byte*) PROCPORT#21 ← phi( @1/(byte*) PROCPORT#22 ) + (byte*) SCROLL#14 ← phi( @1/(byte*) SCROLL#15 ) + (byte*) BGCOL#10 ← phi( @1/(byte*) BGCOL#11 ) + (byte*) RASTER#10 ← phi( @1/(byte*) RASTER#11 ) + (byte) scroll#19 ← phi( @1/(byte) scroll#2 ) + (byte*) SCREEN#12 ← phi( @1/(byte*) SCREEN#14 ) + (byte*) TEXT#3 ← phi( @1/(byte*) TEXT#5 ) + (byte*) CHARGEN#1 ← phi( @1/(byte*) CHARGEN#3 ) + (byte*) current_chargen#4 ← (byte*) CHARGEN#1 + (byte) current_bit#4 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + (byte*) TEXT#8 ← phi( scroll_soft::@2/(byte*) TEXT#9 ) + (byte*) CHARGEN#6 ← phi( scroll_soft::@2/(byte*) CHARGEN#7 ) + (byte*) nxt#32 ← phi( scroll_soft::@2/(byte*) nxt#22 ) + (byte*) current_chargen#28 ← phi( scroll_soft::@2/(byte*) current_chargen#16 ) + (byte*) PROCPORT#6 ← phi( scroll_soft::@2/(byte*) PROCPORT#10 ) + (byte*) SCREEN#7 ← phi( scroll_soft::@2/(byte*) SCREEN#8 ) + (byte) current_bit#20 ← phi( scroll_soft::@2/(byte) current_bit#18 ) + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte*) TEXT#7 ← phi( scroll_bit/(byte*) TEXT#8 ) + (byte*) CHARGEN#5 ← phi( scroll_bit/(byte*) CHARGEN#6 ) + (byte*) nxt#29 ← phi( scroll_bit/(byte*) nxt#32 ) + (byte*) current_chargen#24 ← phi( scroll_bit/(byte*) current_chargen#28 ) + (byte*) SCREEN#5 ← phi( scroll_bit/(byte*) SCREEN#7 ) + (byte*) PROCPORT#3 ← phi( scroll_bit/(byte*) PROCPORT#6 ) + (byte) current_bit#13 ← phi( scroll_bit/(byte) current_bit#20 ) + (byte~) scroll_bit::$1 ← (byte) current_bit#13 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$2 ← (byte) current_bit#5 == (byte) 0 + (boolean~) scroll_bit::$3 ← ! (boolean~) scroll_bit::$2 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#29 scroll_bit::@8/(byte*) nxt#4 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#24 scroll_bit::@8/(byte*) current_chargen#5 ) + (byte*) SCREEN#2 ← phi( scroll_bit::@7/(byte*) SCREEN#5 scroll_bit::@8/(byte*) SCREEN#6 ) + (byte*) PROCPORT#1 ← phi( scroll_bit::@7/(byte*) PROCPORT#3 scroll_bit::@8/(byte*) PROCPORT#4 ) + asm { sei } + *((byte*) PROCPORT#1) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#2 + (byte) 40 + (byte*~) scroll_bit::$10 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$10 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + (byte*) TEXT#6 ← phi( scroll_bit::@7/(byte*) TEXT#7 ) + (byte*) SCREEN#9 ← phi( scroll_bit::@7/(byte*) SCREEN#5 ) + (byte*) PROCPORT#7 ← phi( scroll_bit::@7/(byte*) PROCPORT#3 ) + (byte*) CHARGEN#4 ← phi( scroll_bit::@7/(byte*) CHARGEN#5 ) + (byte*) nxt#24 ← phi( scroll_bit::@7/(byte*) nxt#29 ) + call next_char param-assignment + (byte) next_char::return#0 ← (byte) next_char::return#2 + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (byte*) SCREEN#6 ← phi( scroll_bit::@4/(byte*) SCREEN#9 ) + (byte*) PROCPORT#4 ← phi( scroll_bit::@4/(byte*) PROCPORT#7 ) + (byte*) CHARGEN#2 ← phi( scroll_bit::@4/(byte*) CHARGEN#4 ) + (byte*) nxt#15 ← phi( scroll_bit::@4/(byte*) nxt#9 ) + (byte) next_char::return#3 ← phi( scroll_bit::@4/(byte) next_char::return#0 ) + (byte~) scroll_bit::$4 ← (byte) next_char::return#3 + (byte*) nxt#4 ← (byte*) nxt#15 + (word) scroll_bit::c#0 ← (byte~) scroll_bit::$4 + (word~) scroll_bit::$5 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#1 ← (word~) scroll_bit::$5 + (word~) scroll_bit::$6 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#2 ← (word~) scroll_bit::$6 + (word~) scroll_bit::$7 ← (word) scroll_bit::c#2 << (byte) 1 + (word) scroll_bit::c#3 ← (word~) scroll_bit::$7 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#2 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) nxt#33 ← phi( scroll_bit::@1/(byte*) nxt#37 scroll_bit::@3/(byte*) nxt#30 ) + (byte*) PROCPORT#8 ← phi( scroll_bit::@1/(byte*) PROCPORT#1 scroll_bit::@3/(byte*) PROCPORT#5 ) + (byte*) scroll_bit::sc#3 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) current_bit#14 ← phi( scroll_bit::@1/(byte) current_bit#21 scroll_bit::@3/(byte) current_bit#22 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte*) current_chargen#12 ← phi( scroll_bit::@1/(byte*) current_chargen#18 scroll_bit::@3/(byte*) current_chargen#19 ) + (byte~) scroll_bit::$11 ← (byte*) current_chargen#12 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::bits#0 ← (byte~) scroll_bit::$11 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#14 + (boolean~) scroll_bit::$13 ← (byte~) scroll_bit::$12 != (byte) 0 + (boolean~) scroll_bit::$14 ← ! (boolean~) scroll_bit::$13 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte*) nxt#30 ← phi( scroll_bit::@2/(byte*) nxt#33 scroll_bit::@5/(byte*) nxt#34 ) + (byte*) PROCPORT#5 ← phi( scroll_bit::@2/(byte*) PROCPORT#8 scroll_bit::@5/(byte*) PROCPORT#9 ) + (byte) current_bit#22 ← phi( scroll_bit::@2/(byte) current_bit#14 scroll_bit::@5/(byte) current_bit#27 ) + (byte*) current_chargen#19 ← phi( scroll_bit::@2/(byte*) current_chargen#12 scroll_bit::@5/(byte*) current_chargen#25 ) + (byte) scroll_bit::r#3 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 scroll_bit::@5/(byte) scroll_bit::r#4 ) + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 scroll_bit::@5/(byte*) scroll_bit::sc#4 ) + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*~) scroll_bit::$15 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte*) scroll_bit::sc#1 ← (byte*~) scroll_bit::$15 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#3 + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r#1 != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte*) nxt#34 ← phi( scroll_bit::@2/(byte*) nxt#33 ) + (byte*) PROCPORT#9 ← phi( scroll_bit::@2/(byte*) PROCPORT#8 ) + (byte) current_bit#27 ← phi( scroll_bit::@2/(byte) current_bit#14 ) + (byte*) current_chargen#25 ← phi( scroll_bit::@2/(byte*) current_chargen#12 ) + (byte) scroll_bit::r#4 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 ) + (byte*) scroll_bit::sc#4 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 ) + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + (byte*) current_chargen#20 ← phi( scroll_bit::@3/(byte*) current_chargen#19 ) + (byte*) nxt#25 ← phi( scroll_bit::@3/(byte*) nxt#30 ) + (byte) current_bit#23 ← phi( scroll_bit::@3/(byte) current_bit#22 ) + (byte*) PROCPORT#2 ← phi( scroll_bit::@3/(byte*) PROCPORT#5 ) + *((byte*) PROCPORT#2) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + (byte*) current_chargen#13 ← phi( scroll_bit::@6/(byte*) current_chargen#20 ) + (byte*) nxt#16 ← phi( scroll_bit::@6/(byte*) nxt#25 ) + (byte) current_bit#15 ← phi( scroll_bit::@6/(byte) current_bit#23 ) + (byte) current_bit#7 ← (byte) current_bit#15 + (byte*) nxt#5 ← (byte*) nxt#16 + (byte*) current_chargen#6 ← (byte*) current_chargen#13 + return + to:@return +@3: scope:[] from @2 + (byte*) CHARGEN#17 ← phi( @2/(byte*) CHARGEN#1 ) + (byte*) PROCPORT#20 ← phi( @2/(byte*) PROCPORT#21 ) + (byte*) SCROLL#13 ← phi( @2/(byte*) SCROLL#14 ) + (byte*) BGCOL#9 ← phi( @2/(byte*) BGCOL#10 ) + (byte*) RASTER#9 ← phi( @2/(byte*) RASTER#10 ) + (byte*) current_chargen#26 ← phi( @2/(byte*) current_chargen#4 ) + (byte) current_bit#28 ← phi( @2/(byte) current_bit#4 ) + (byte) scroll#17 ← phi( @2/(byte) scroll#19 ) + (byte*) SCREEN#10 ← phi( @2/(byte*) SCREEN#12 ) + (byte*) TEXT#1 ← phi( @2/(byte*) TEXT#3 ) + (byte*) nxt#6 ← (byte*) TEXT#1 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte*) TEXT#4 ← phi( scroll_bit::@4/(byte*) TEXT#6 ) + (byte*) nxt#17 ← phi( scroll_bit::@4/(byte*) nxt#24 ) + (byte) next_char::c#0 ← *((byte*) nxt#17) + (boolean~) next_char::$0 ← (byte) next_char::c#0 == (byte) '@' + (boolean~) next_char::$1 ← ! (boolean~) next_char::$0 + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#17 next_char::@2/(byte*) nxt#8 ) + (byte*) nxt#7 ← ++ (byte*) nxt#18 + (byte) next_char::return#1 ← (byte) next_char::c#2 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte*) TEXT#2 ← phi( next_char/(byte*) TEXT#4 ) + (byte*) nxt#8 ← (byte*) TEXT#2 + (byte) next_char::c#1 ← *((byte*) nxt#8) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + (byte*) nxt#19 ← phi( next_char::@1/(byte*) nxt#7 ) + (byte) next_char::return#4 ← phi( next_char::@1/(byte) next_char::return#1 ) + (byte) next_char::return#2 ← (byte) next_char::return#4 + (byte*) nxt#9 ← (byte*) nxt#19 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte*) SCREEN#3 ← phi( scroll_bit/(byte*) SCREEN#7 ) + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte*~) scroll_hard::$1 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$0 + (byte[]) scroll_hard::line0#0 ← (byte*~) scroll_hard::$1 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte*~) scroll_hard::$3 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$2 + (byte[]) scroll_hard::line1#0 ← (byte*~) scroll_hard::$3 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte*~) scroll_hard::$5 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$4 + (byte[]) scroll_hard::line2#0 ← (byte*~) scroll_hard::$5 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte*~) scroll_hard::$7 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$6 + (byte[]) scroll_hard::line3#0 ← (byte*~) scroll_hard::$7 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte*~) scroll_hard::$9 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$8 + (byte[]) scroll_hard::line4#0 ← (byte*~) scroll_hard::$9 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte*~) scroll_hard::$11 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$10 + (byte[]) scroll_hard::line5#0 ← (byte*~) scroll_hard::$11 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte*~) scroll_hard::$13 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$12 + (byte[]) scroll_hard::line6#0 ← (byte*~) scroll_hard::$13 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte*~) scroll_hard::$15 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$14 + (byte[]) scroll_hard::line7#0 ← (byte*~) scroll_hard::$15 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte[]) scroll_hard::line7#1 ← phi( scroll_hard/(byte[]) scroll_hard::line7#0 scroll_hard::@1/(byte[]) scroll_hard::line7#1 ) + (byte[]) scroll_hard::line6#1 ← phi( scroll_hard/(byte[]) scroll_hard::line6#0 scroll_hard::@1/(byte[]) scroll_hard::line6#1 ) + (byte[]) scroll_hard::line5#1 ← phi( scroll_hard/(byte[]) scroll_hard::line5#0 scroll_hard::@1/(byte[]) scroll_hard::line5#1 ) + (byte[]) scroll_hard::line4#1 ← phi( scroll_hard/(byte[]) scroll_hard::line4#0 scroll_hard::@1/(byte[]) scroll_hard::line4#1 ) + (byte[]) scroll_hard::line3#1 ← phi( scroll_hard/(byte[]) scroll_hard::line3#0 scroll_hard::@1/(byte[]) scroll_hard::line3#1 ) + (byte[]) scroll_hard::line2#1 ← phi( scroll_hard/(byte[]) scroll_hard::line2#0 scroll_hard::@1/(byte[]) scroll_hard::line2#1 ) + (byte[]) scroll_hard::line1#1 ← phi( scroll_hard/(byte[]) scroll_hard::line1#0 scroll_hard::@1/(byte[]) scroll_hard::line1#1 ) + (byte[]) scroll_hard::line0#1 ← phi( scroll_hard/(byte[]) scroll_hard::line0#0 scroll_hard::@1/(byte[]) scroll_hard::line0#1 ) + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#1 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#1 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#1 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#1 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#1 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#1 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#1 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i#1 != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + (byte) fillscreen::fill#2 ← phi( main/(byte) fillscreen::fill#0 ) + (byte*) fillscreen::screen#1 ← phi( main/(byte*) fillscreen::screen#0 ) + (byte*) fillscreen::cursor#0 ← (byte*) fillscreen::screen#1 + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::screen#2 ← phi( fillscreen/(byte*) fillscreen::screen#1 fillscreen::@1/(byte*) fillscreen::screen#2 ) + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + (byte) fillscreen::fill#1 ← phi( fillscreen/(byte) fillscreen::fill#2 fillscreen::@1/(byte) fillscreen::fill#1 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#1 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen#2 + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + (byte*) TEXT#18 ← phi( @3/(byte*) TEXT#1 ) + (byte*) CHARGEN#16 ← phi( @3/(byte*) CHARGEN#17 ) + (byte*) PROCPORT#19 ← phi( @3/(byte*) PROCPORT#20 ) + (byte*) SCROLL#12 ← phi( @3/(byte*) SCROLL#13 ) + (byte*) BGCOL#8 ← phi( @3/(byte*) BGCOL#9 ) + (byte*) RASTER#7 ← phi( @3/(byte*) RASTER#9 ) + (byte*) current_chargen#21 ← phi( @3/(byte*) current_chargen#26 ) + (byte*) nxt#26 ← phi( @3/(byte*) nxt#6 ) + (byte) current_bit#24 ← phi( @3/(byte) current_bit#28 ) + (byte) scroll#15 ← phi( @3/(byte) scroll#17 ) + (byte*) SCREEN#4 ← phi( @3/(byte*) SCREEN#10 ) + call main param-assignment + to:@7 +@7: scope:[] from @6 + (byte*) current_chargen#14 ← phi( @6/(byte*) current_chargen#1 ) + (byte*) nxt#20 ← phi( @6/(byte*) nxt#1 ) + (byte) current_bit#16 ← phi( @6/(byte) current_bit#1 ) + (byte) scroll#12 ← phi( @6/(byte) scroll#1 ) + (byte) scroll#6 ← (byte) scroll#12 + (byte) current_bit#8 ← (byte) current_bit#16 + (byte*) nxt#10 ← (byte*) nxt#20 + (byte*) current_chargen#7 ← (byte*) current_chargen#14 + to:@end +@end: scope:[] from @7 + +INITIAL SSA SYMBOL TABLE +(label) @1 +(label) @2 +(label) @3 +(label) @6 +(label) @7 +(label) @begin +(label) @end +(byte*) BGCOL +(byte*) BGCOL#0 +(byte*) BGCOL#1 +(byte*) BGCOL#10 +(byte*) BGCOL#11 +(byte*) BGCOL#2 +(byte*) BGCOL#3 +(byte*) BGCOL#4 +(byte*) BGCOL#5 +(byte*) BGCOL#6 +(byte*) BGCOL#7 +(byte*) BGCOL#8 +(byte*) BGCOL#9 +(byte*) CHARGEN +(byte*) CHARGEN#0 +(byte*) CHARGEN#1 +(byte*) CHARGEN#10 +(byte*) CHARGEN#11 +(byte*) CHARGEN#12 +(byte*) CHARGEN#13 +(byte*) CHARGEN#14 +(byte*) CHARGEN#15 +(byte*) CHARGEN#16 +(byte*) CHARGEN#17 +(byte*) CHARGEN#2 +(byte*) CHARGEN#3 +(byte*) CHARGEN#4 +(byte*) CHARGEN#5 +(byte*) CHARGEN#6 +(byte*) CHARGEN#7 +(byte*) CHARGEN#8 +(byte*) CHARGEN#9 +(byte*) PROCPORT +(byte*) PROCPORT#0 +(byte*) PROCPORT#1 +(byte*) PROCPORT#10 +(byte*) PROCPORT#11 +(byte*) PROCPORT#12 +(byte*) PROCPORT#13 +(byte*) PROCPORT#14 +(byte*) PROCPORT#15 +(byte*) PROCPORT#16 +(byte*) PROCPORT#17 +(byte*) PROCPORT#18 +(byte*) PROCPORT#19 +(byte*) PROCPORT#2 +(byte*) PROCPORT#20 +(byte*) PROCPORT#21 +(byte*) PROCPORT#22 +(byte*) PROCPORT#3 +(byte*) PROCPORT#4 +(byte*) PROCPORT#5 +(byte*) PROCPORT#6 +(byte*) PROCPORT#7 +(byte*) PROCPORT#8 +(byte*) PROCPORT#9 +(byte*) RASTER +(byte*) RASTER#0 +(byte*) RASTER#1 +(byte*) RASTER#10 +(byte*) RASTER#11 +(byte*) RASTER#2 +(byte*) RASTER#3 +(byte*) RASTER#4 +(byte*) RASTER#5 +(byte*) RASTER#6 +(byte*) RASTER#7 +(byte*) RASTER#8 +(byte*) RASTER#9 +(byte*) SCREEN +(byte*) SCREEN#0 +(byte*) SCREEN#1 +(byte*) SCREEN#10 +(byte*) SCREEN#11 +(byte*) SCREEN#12 +(byte*) SCREEN#13 +(byte*) SCREEN#14 +(byte*) SCREEN#15 +(byte*) SCREEN#16 +(byte*) SCREEN#17 +(byte*) SCREEN#18 +(byte*) SCREEN#19 +(byte*) SCREEN#2 +(byte*) SCREEN#3 +(byte*) SCREEN#4 +(byte*) SCREEN#5 +(byte*) SCREEN#6 +(byte*) SCREEN#7 +(byte*) SCREEN#8 +(byte*) SCREEN#9 +(byte*) SCROLL +(byte*) SCROLL#0 +(byte*) SCROLL#1 +(byte*) SCROLL#10 +(byte*) SCROLL#11 +(byte*) SCROLL#12 +(byte*) SCROLL#13 +(byte*) SCROLL#14 +(byte*) SCROLL#15 +(byte*) SCROLL#2 +(byte*) SCROLL#3 +(byte*) SCROLL#4 +(byte*) SCROLL#5 +(byte*) SCROLL#6 +(byte*) SCROLL#7 +(byte*) SCROLL#8 +(byte*) SCROLL#9 +(byte*) TEXT +(byte*) TEXT#0 +(byte*) TEXT#1 +(byte*) TEXT#10 +(byte*) TEXT#11 +(byte*) TEXT#12 +(byte*) TEXT#13 +(byte*) TEXT#14 +(byte*) TEXT#15 +(byte*) TEXT#16 +(byte*) TEXT#17 +(byte*) TEXT#18 +(byte*) TEXT#2 +(byte*) TEXT#3 +(byte*) TEXT#4 +(byte*) TEXT#5 +(byte*) TEXT#6 +(byte*) TEXT#7 +(byte*) TEXT#8 +(byte*) TEXT#9 +(byte) current_bit +(byte) current_bit#0 +(byte) current_bit#1 +(byte) current_bit#10 +(byte) current_bit#11 +(byte) current_bit#12 +(byte) current_bit#13 +(byte) current_bit#14 +(byte) current_bit#15 +(byte) current_bit#16 +(byte) current_bit#17 +(byte) current_bit#18 +(byte) current_bit#19 +(byte) current_bit#2 +(byte) current_bit#20 +(byte) current_bit#21 +(byte) current_bit#22 +(byte) current_bit#23 +(byte) current_bit#24 +(byte) current_bit#25 +(byte) current_bit#26 +(byte) current_bit#27 +(byte) current_bit#28 +(byte) current_bit#29 +(byte) current_bit#3 +(byte) current_bit#30 +(byte) current_bit#31 +(byte) current_bit#32 +(byte) current_bit#4 +(byte) current_bit#5 +(byte) current_bit#6 +(byte) current_bit#7 +(byte) current_bit#8 +(byte) current_bit#9 +(byte*) current_chargen +(byte*) current_chargen#0 +(byte*) current_chargen#1 +(byte*) current_chargen#10 +(byte*) current_chargen#11 +(byte*) current_chargen#12 +(byte*) current_chargen#13 +(byte*) current_chargen#14 +(byte*) current_chargen#15 +(byte*) current_chargen#16 +(byte*) current_chargen#17 +(byte*) current_chargen#18 +(byte*) current_chargen#19 +(byte*) current_chargen#2 +(byte*) current_chargen#20 +(byte*) current_chargen#21 +(byte*) current_chargen#22 +(byte*) current_chargen#23 +(byte*) current_chargen#24 +(byte*) current_chargen#25 +(byte*) current_chargen#26 +(byte*) current_chargen#27 +(byte*) current_chargen#28 +(byte*) current_chargen#29 +(byte*) current_chargen#3 +(byte*) current_chargen#30 +(byte*) current_chargen#31 +(byte*) current_chargen#4 +(byte*) current_chargen#5 +(byte*) current_chargen#6 +(byte*) current_chargen#7 +(byte*) current_chargen#8 +(byte*) current_chargen#9 +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) +(byte*~) fillscreen::$0 +(boolean~) fillscreen::$1 +(label) fillscreen::@1 +(label) fillscreen::@return +(byte*) fillscreen::cursor +(byte*) fillscreen::cursor#0 +(byte*) fillscreen::cursor#1 +(byte*) fillscreen::cursor#2 +(byte) fillscreen::fill +(byte) fillscreen::fill#0 +(byte) fillscreen::fill#1 +(byte) fillscreen::fill#2 +(byte*) fillscreen::screen +(byte*) fillscreen::screen#0 +(byte*) fillscreen::screen#1 +(byte*) fillscreen::screen#2 +(void()) main() +(boolean~) main::$1 +(boolean~) main::$2 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@5 +(label) main::@7 +(label) main::@8 +(label) main::@return +(byte()) next_char() +(boolean~) next_char::$0 +(boolean~) next_char::$1 +(label) next_char::@1 +(label) next_char::@2 +(label) next_char::@return +(byte) next_char::c +(byte) next_char::c#0 +(byte) next_char::c#1 +(byte) next_char::c#2 +(byte) next_char::return +(byte) next_char::return#0 +(byte) next_char::return#1 +(byte) next_char::return#2 +(byte) next_char::return#3 +(byte) next_char::return#4 +(byte*) nxt +(byte*) nxt#0 +(byte*) nxt#1 +(byte*) nxt#10 +(byte*) nxt#11 +(byte*) nxt#12 +(byte*) nxt#13 +(byte*) nxt#14 +(byte*) nxt#15 +(byte*) nxt#16 +(byte*) nxt#17 +(byte*) nxt#18 +(byte*) nxt#19 +(byte*) nxt#2 +(byte*) nxt#20 +(byte*) nxt#21 +(byte*) nxt#22 +(byte*) nxt#23 +(byte*) nxt#24 +(byte*) nxt#25 +(byte*) nxt#26 +(byte*) nxt#27 +(byte*) nxt#28 +(byte*) nxt#29 +(byte*) nxt#3 +(byte*) nxt#30 +(byte*) nxt#31 +(byte*) nxt#32 +(byte*) nxt#33 +(byte*) nxt#34 +(byte*) nxt#35 +(byte*) nxt#36 +(byte*) nxt#37 +(byte*) nxt#38 +(byte*) nxt#4 +(byte*) nxt#5 +(byte*) nxt#6 +(byte*) nxt#7 +(byte*) nxt#8 +(byte*) nxt#9 +(byte) scroll +(byte) scroll#0 +(byte) scroll#1 +(byte) scroll#10 +(byte) scroll#11 +(byte) scroll#12 +(byte) scroll#13 +(byte) scroll#14 +(byte) scroll#15 +(byte) scroll#16 +(byte) scroll#17 +(byte) scroll#18 +(byte) scroll#19 +(byte) scroll#2 +(byte) scroll#20 +(byte) scroll#21 +(byte) scroll#22 +(byte) scroll#3 +(byte) scroll#4 +(byte) scroll#5 +(byte) scroll#6 +(byte) scroll#7 +(byte) scroll#8 +(byte) scroll#9 +(void()) scroll_bit() +(byte~) scroll_bit::$1 +(byte*~) scroll_bit::$10 +(byte~) scroll_bit::$11 +(byte~) scroll_bit::$12 +(boolean~) scroll_bit::$13 +(boolean~) scroll_bit::$14 +(byte*~) scroll_bit::$15 +(boolean~) scroll_bit::$16 +(boolean~) scroll_bit::$2 +(boolean~) scroll_bit::$3 +(byte~) scroll_bit::$4 +(word~) scroll_bit::$5 +(word~) scroll_bit::$6 +(word~) scroll_bit::$7 +(byte*~) scroll_bit::$8 +(byte*~) scroll_bit::$9 +(label) scroll_bit::@1 +(label) scroll_bit::@2 +(label) scroll_bit::@3 +(label) scroll_bit::@4 +(label) scroll_bit::@5 +(label) scroll_bit::@6 +(label) scroll_bit::@7 +(label) scroll_bit::@8 +(label) scroll_bit::@return +(byte) scroll_bit::b +(byte) scroll_bit::b#0 +(byte) scroll_bit::b#1 +(byte) scroll_bit::b#2 +(byte) scroll_bit::bits +(byte) scroll_bit::bits#0 +(word) scroll_bit::c +(word) scroll_bit::c#0 +(word) scroll_bit::c#1 +(word) scroll_bit::c#2 +(word) scroll_bit::c#3 +(byte) scroll_bit::r +(byte) scroll_bit::r#0 +(byte) scroll_bit::r#1 +(byte) scroll_bit::r#2 +(byte) scroll_bit::r#3 +(byte) scroll_bit::r#4 +(byte*) scroll_bit::sc +(byte*) scroll_bit::sc#0 +(byte*) scroll_bit::sc#1 +(byte*) scroll_bit::sc#2 +(byte*) scroll_bit::sc#3 +(byte*) scroll_bit::sc#4 +(void()) scroll_hard() +(byte~) scroll_hard::$0 +(byte*~) scroll_hard::$1 +(byte~) scroll_hard::$10 +(byte*~) scroll_hard::$11 +(byte~) scroll_hard::$12 +(byte*~) scroll_hard::$13 +(byte~) scroll_hard::$14 +(byte*~) scroll_hard::$15 +(byte~) scroll_hard::$16 +(byte~) scroll_hard::$17 +(byte~) scroll_hard::$18 +(byte~) scroll_hard::$19 +(byte~) scroll_hard::$2 +(byte~) scroll_hard::$20 +(byte~) scroll_hard::$21 +(byte~) scroll_hard::$22 +(byte~) scroll_hard::$23 +(byte~) scroll_hard::$24 +(byte~) scroll_hard::$25 +(byte~) scroll_hard::$26 +(byte~) scroll_hard::$27 +(byte~) scroll_hard::$28 +(byte~) scroll_hard::$29 +(byte*~) scroll_hard::$3 +(byte~) scroll_hard::$30 +(byte~) scroll_hard::$31 +(boolean~) scroll_hard::$32 +(byte~) scroll_hard::$4 +(byte*~) scroll_hard::$5 +(byte~) scroll_hard::$6 +(byte*~) scroll_hard::$7 +(byte~) scroll_hard::$8 +(byte*~) scroll_hard::$9 +(label) scroll_hard::@1 +(label) scroll_hard::@return +(byte) scroll_hard::i +(byte) scroll_hard::i#0 +(byte) scroll_hard::i#1 +(byte) scroll_hard::i#2 +(byte[]) scroll_hard::line0 +(byte[]) scroll_hard::line0#0 +(byte[]) scroll_hard::line0#1 +(byte[]) scroll_hard::line1 +(byte[]) scroll_hard::line1#0 +(byte[]) scroll_hard::line1#1 +(byte[]) scroll_hard::line2 +(byte[]) scroll_hard::line2#0 +(byte[]) scroll_hard::line2#1 +(byte[]) scroll_hard::line3 +(byte[]) scroll_hard::line3#0 +(byte[]) scroll_hard::line3#1 +(byte[]) scroll_hard::line4 +(byte[]) scroll_hard::line4#0 +(byte[]) scroll_hard::line4#1 +(byte[]) scroll_hard::line5 +(byte[]) scroll_hard::line5#0 +(byte[]) scroll_hard::line5#1 +(byte[]) scroll_hard::line6 +(byte[]) scroll_hard::line6#0 +(byte[]) scroll_hard::line6#1 +(byte[]) scroll_hard::line7 +(byte[]) scroll_hard::line7#0 +(byte[]) scroll_hard::line7#1 +(void()) scroll_soft() +(boolean~) scroll_soft::$0 +(boolean~) scroll_soft::$1 +(label) scroll_soft::@1 +(label) scroll_soft::@2 +(label) scroll_soft::@3 +(label) scroll_soft::@return + +Inversing boolean not (boolean~) scroll_soft::$1 ← (byte) scroll#3 != (byte) 255 from (boolean~) scroll_soft::$0 ← (byte) scroll#3 == (byte) 255 +Inversing boolean not (boolean~) scroll_bit::$3 ← (byte) current_bit#5 != (byte) 0 from (boolean~) scroll_bit::$2 ← (byte) current_bit#5 == (byte) 0 +Inversing boolean not (boolean~) scroll_bit::$14 ← (byte~) scroll_bit::$12 == (byte) 0 from (boolean~) scroll_bit::$13 ← (byte~) scroll_bit::$12 != (byte) 0 +Inversing boolean not (boolean~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' from (boolean~) next_char::$0 ← (byte) next_char::c#0 == (byte) '@' +Succesful SSA optimization Pass2UnaryNotSimplification +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) TEXT#16 ← phi( @6/(byte*) TEXT#18 ) + (byte*) CHARGEN#14 ← phi( @6/(byte*) CHARGEN#16 ) + (byte*) PROCPORT#17 ← phi( @6/(byte*) PROCPORT#19 ) + (byte*) SCROLL#10 ← phi( @6/(byte*) SCROLL#12 ) + (byte*) current_chargen#31 ← phi( @6/(byte*) current_chargen#21 ) + (byte*) nxt#38 ← phi( @6/(byte*) nxt#26 ) + (byte) current_bit#32 ← phi( @6/(byte) current_bit#24 ) + (byte) scroll#22 ← phi( @6/(byte) scroll#15 ) + (byte*) BGCOL#7 ← phi( @6/(byte*) BGCOL#8 ) + (byte*) RASTER#5 ← phi( @6/(byte*) RASTER#7 ) + (byte*) SCREEN#1 ← phi( @6/(byte*) SCREEN#4 ) + (byte*) fillscreen::screen#0 ← (byte*) SCREEN#1 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + (byte*) TEXT#15 ← phi( main/(byte*) TEXT#16 ) + (byte*) CHARGEN#13 ← phi( main/(byte*) CHARGEN#14 ) + (byte*) PROCPORT#16 ← phi( main/(byte*) PROCPORT#17 ) + (byte*) SCREEN#18 ← phi( main/(byte*) SCREEN#1 ) + (byte*) SCROLL#9 ← phi( main/(byte*) SCROLL#10 ) + (byte*) current_chargen#30 ← phi( main/(byte*) current_chargen#31 ) + (byte*) nxt#36 ← phi( main/(byte*) nxt#38 ) + (byte) current_bit#31 ← phi( main/(byte) current_bit#32 ) + (byte) scroll#21 ← phi( main/(byte) scroll#22 ) + (byte*) BGCOL#6 ← phi( main/(byte*) BGCOL#7 ) + (byte*) RASTER#4 ← phi( main/(byte*) RASTER#5 ) + to:main::@2 +main::@1: scope:[main] from main::@8 + (byte*) TEXT#14 ← phi( main::@8/(byte*) TEXT#17 ) + (byte*) CHARGEN#12 ← phi( main::@8/(byte*) CHARGEN#15 ) + (byte*) PROCPORT#15 ← phi( main::@8/(byte*) PROCPORT#18 ) + (byte*) SCREEN#17 ← phi( main::@8/(byte*) SCREEN#19 ) + (byte*) SCROLL#8 ← phi( main::@8/(byte*) SCROLL#11 ) + (byte*) current_chargen#29 ← phi( main::@8/(byte*) current_chargen#0 ) + (byte*) nxt#35 ← phi( main::@8/(byte*) nxt#0 ) + (byte) current_bit#30 ← phi( main::@8/(byte) current_bit#0 ) + (byte) scroll#20 ← phi( main::@8/(byte) scroll#0 ) + (byte*) BGCOL#5 ← phi( main::@8/(byte*) BGCOL#2 ) + (byte*) RASTER#3 ← phi( main::@8/(byte*) RASTER#6 ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#14 main::@2/(byte*) TEXT#13 main::@7/(byte*) TEXT#15 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#12 main::@2/(byte*) CHARGEN#11 main::@7/(byte*) CHARGEN#13 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#15 main::@2/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#16 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#17 main::@2/(byte*) SCREEN#16 main::@7/(byte*) SCREEN#18 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#8 main::@2/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#9 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#29 main::@2/(byte*) current_chargen#27 main::@7/(byte*) current_chargen#30 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#35 main::@2/(byte*) nxt#31 main::@7/(byte*) nxt#36 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#30 main::@2/(byte) current_bit#29 main::@7/(byte) current_bit#31 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#20 main::@2/(byte) scroll#18 main::@7/(byte) scroll#21 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#5 main::@2/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#6 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#3 main::@2/(byte*) RASTER#1 main::@7/(byte*) RASTER#4 ) + (boolean~) main::$1 ← *((byte*) RASTER#1) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (byte*) TEXT#12 ← phi( main::@2/(byte*) TEXT#13 main::@3/(byte*) TEXT#12 ) + (byte*) CHARGEN#10 ← phi( main::@2/(byte*) CHARGEN#11 main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#13 ← phi( main::@2/(byte*) PROCPORT#14 main::@3/(byte*) PROCPORT#13 ) + (byte*) SCREEN#15 ← phi( main::@2/(byte*) SCREEN#16 main::@3/(byte*) SCREEN#15 ) + (byte*) SCROLL#6 ← phi( main::@2/(byte*) SCROLL#7 main::@3/(byte*) SCROLL#6 ) + (byte*) current_chargen#22 ← phi( main::@2/(byte*) current_chargen#27 main::@3/(byte*) current_chargen#22 ) + (byte*) nxt#27 ← phi( main::@2/(byte*) nxt#31 main::@3/(byte*) nxt#27 ) + (byte) current_bit#25 ← phi( main::@2/(byte) current_bit#29 main::@3/(byte) current_bit#25 ) + (byte) scroll#16 ← phi( main::@2/(byte) scroll#18 main::@3/(byte) scroll#16 ) + (byte*) BGCOL#3 ← phi( main::@2/(byte*) BGCOL#4 main::@3/(byte*) BGCOL#3 ) + (byte*) RASTER#2 ← phi( main::@2/(byte*) RASTER#1 main::@3/(byte*) RASTER#2 ) + (boolean~) main::$2 ← *((byte*) RASTER#2) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + (byte*) TEXT#11 ← phi( main::@3/(byte*) TEXT#12 ) + (byte*) CHARGEN#9 ← phi( main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#12 ← phi( main::@3/(byte*) PROCPORT#13 ) + (byte*) SCREEN#13 ← phi( main::@3/(byte*) SCREEN#15 ) + (byte*) RASTER#8 ← phi( main::@3/(byte*) RASTER#2 ) + (byte*) SCROLL#4 ← phi( main::@3/(byte*) SCROLL#6 ) + (byte*) current_chargen#15 ← phi( main::@3/(byte*) current_chargen#22 ) + (byte*) nxt#21 ← phi( main::@3/(byte*) nxt#27 ) + (byte) current_bit#17 ← phi( main::@3/(byte) current_bit#25 ) + (byte) scroll#13 ← phi( main::@3/(byte) scroll#16 ) + (byte*) BGCOL#1 ← phi( main::@3/(byte*) BGCOL#3 ) + *((byte*) BGCOL#1) ← ++ *((byte*) BGCOL#1) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + (byte*) TEXT#17 ← phi( main::@5/(byte*) TEXT#11 ) + (byte*) CHARGEN#15 ← phi( main::@5/(byte*) CHARGEN#9 ) + (byte*) PROCPORT#18 ← phi( main::@5/(byte*) PROCPORT#12 ) + (byte*) SCREEN#19 ← phi( main::@5/(byte*) SCREEN#13 ) + (byte*) SCROLL#11 ← phi( main::@5/(byte*) SCROLL#4 ) + (byte*) RASTER#6 ← phi( main::@5/(byte*) RASTER#8 ) + (byte*) BGCOL#2 ← phi( main::@5/(byte*) BGCOL#1 ) + (byte*) current_chargen#8 ← phi( main::@5/(byte*) current_chargen#3 ) + (byte*) nxt#11 ← phi( main::@5/(byte*) nxt#3 ) + (byte) current_bit#9 ← phi( main::@5/(byte) current_bit#3 ) + (byte) scroll#7 ← phi( main::@5/(byte) scroll#5 ) + (byte) scroll#0 ← (byte) scroll#7 + (byte) current_bit#0 ← (byte) current_bit#9 + (byte*) nxt#0 ← (byte*) nxt#11 + (byte*) current_chargen#0 ← (byte*) current_chargen#8 + *((byte*) BGCOL#2) ← -- *((byte*) BGCOL#2) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + (byte*) current_chargen#9 ← phi( main::@8/(byte*) current_chargen#0 ) + (byte*) nxt#12 ← phi( main::@8/(byte*) nxt#0 ) + (byte) current_bit#10 ← phi( main::@8/(byte) current_bit#0 ) + (byte) scroll#8 ← phi( main::@8/(byte) scroll#0 ) + (byte) scroll#1 ← (byte) scroll#8 + (byte) current_bit#1 ← (byte) current_bit#10 + (byte*) nxt#1 ← (byte*) nxt#12 + (byte*) current_chargen#1 ← (byte*) current_chargen#9 + return + to:@return +@1: scope:[] from @begin + (byte*) PROCPORT#22 ← phi( @begin/(byte*) PROCPORT#0 ) + (byte*) SCROLL#15 ← phi( @begin/(byte*) SCROLL#0 ) + (byte*) BGCOL#11 ← phi( @begin/(byte*) BGCOL#0 ) + (byte*) RASTER#11 ← phi( @begin/(byte*) RASTER#0 ) + (byte*) SCREEN#14 ← phi( @begin/(byte*) SCREEN#0 ) + (byte*) TEXT#5 ← phi( @begin/(byte*) TEXT#0 ) + (byte*) CHARGEN#3 ← phi( @begin/(byte*) CHARGEN#0 ) + (byte) scroll#2 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte*) TEXT#10 ← phi( main::@5/(byte*) TEXT#11 ) + (byte*) CHARGEN#8 ← phi( main::@5/(byte*) CHARGEN#9 ) + (byte*) PROCPORT#11 ← phi( main::@5/(byte*) PROCPORT#12 ) + (byte*) SCREEN#11 ← phi( main::@5/(byte*) SCREEN#13 ) + (byte*) current_chargen#23 ← phi( main::@5/(byte*) current_chargen#15 ) + (byte*) nxt#28 ← phi( main::@5/(byte*) nxt#21 ) + (byte) current_bit#26 ← phi( main::@5/(byte) current_bit#17 ) + (byte*) SCROLL#2 ← phi( main::@5/(byte*) SCROLL#4 ) + (byte) scroll#9 ← phi( main::@5/(byte) scroll#13 ) + (byte) scroll#3 ← -- (byte) scroll#9 + (boolean~) scroll_soft::$1 ← (byte) scroll#3 != (byte) 255 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#17 ← phi( scroll_soft/(byte*) current_chargen#23 scroll_soft::@3/(byte*) current_chargen#2 ) + (byte*) nxt#23 ← phi( scroll_soft/(byte*) nxt#28 scroll_soft::@3/(byte*) nxt#2 ) + (byte) current_bit#19 ← phi( scroll_soft/(byte) current_bit#26 scroll_soft::@3/(byte) current_bit#2 ) + (byte*) SCROLL#1 ← phi( scroll_soft/(byte*) SCROLL#2 scroll_soft::@3/(byte*) SCROLL#3 ) + (byte) scroll#10 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#1) ← (byte) scroll#10 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte*) TEXT#9 ← phi( scroll_soft/(byte*) TEXT#10 ) + (byte*) CHARGEN#7 ← phi( scroll_soft/(byte*) CHARGEN#8 ) + (byte*) PROCPORT#10 ← phi( scroll_soft/(byte*) PROCPORT#11 ) + (byte*) SCREEN#8 ← phi( scroll_soft/(byte*) SCREEN#11 ) + (byte*) SCROLL#5 ← phi( scroll_soft/(byte*) SCROLL#2 ) + (byte*) current_chargen#16 ← phi( scroll_soft/(byte*) current_chargen#23 ) + (byte*) nxt#22 ← phi( scroll_soft/(byte*) nxt#28 ) + (byte) current_bit#18 ← phi( scroll_soft/(byte) current_bit#26 ) + (byte) scroll#4 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + (byte*) SCROLL#3 ← phi( scroll_soft::@2/(byte*) SCROLL#5 ) + (byte) scroll#14 ← phi( scroll_soft::@2/(byte) scroll#4 ) + (byte*) current_chargen#10 ← phi( scroll_soft::@2/(byte*) current_chargen#6 ) + (byte*) nxt#13 ← phi( scroll_soft::@2/(byte*) nxt#5 ) + (byte) current_bit#11 ← phi( scroll_soft::@2/(byte) current_bit#7 ) + (byte) current_bit#2 ← (byte) current_bit#11 + (byte*) nxt#2 ← (byte*) nxt#13 + (byte*) current_chargen#2 ← (byte*) current_chargen#10 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + (byte*) current_chargen#11 ← phi( scroll_soft::@1/(byte*) current_chargen#17 ) + (byte*) nxt#14 ← phi( scroll_soft::@1/(byte*) nxt#23 ) + (byte) current_bit#12 ← phi( scroll_soft::@1/(byte) current_bit#19 ) + (byte) scroll#11 ← phi( scroll_soft::@1/(byte) scroll#10 ) + (byte) scroll#5 ← (byte) scroll#11 + (byte) current_bit#3 ← (byte) current_bit#12 + (byte*) nxt#3 ← (byte*) nxt#14 + (byte*) current_chargen#3 ← (byte*) current_chargen#11 + return + to:@return +@2: scope:[] from @1 + (byte*) PROCPORT#21 ← phi( @1/(byte*) PROCPORT#22 ) + (byte*) SCROLL#14 ← phi( @1/(byte*) SCROLL#15 ) + (byte*) BGCOL#10 ← phi( @1/(byte*) BGCOL#11 ) + (byte*) RASTER#10 ← phi( @1/(byte*) RASTER#11 ) + (byte) scroll#19 ← phi( @1/(byte) scroll#2 ) + (byte*) SCREEN#12 ← phi( @1/(byte*) SCREEN#14 ) + (byte*) TEXT#3 ← phi( @1/(byte*) TEXT#5 ) + (byte*) CHARGEN#1 ← phi( @1/(byte*) CHARGEN#3 ) + (byte*) current_chargen#4 ← (byte*) CHARGEN#1 + (byte) current_bit#4 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + (byte*) TEXT#8 ← phi( scroll_soft::@2/(byte*) TEXT#9 ) + (byte*) CHARGEN#6 ← phi( scroll_soft::@2/(byte*) CHARGEN#7 ) + (byte*) nxt#32 ← phi( scroll_soft::@2/(byte*) nxt#22 ) + (byte*) current_chargen#28 ← phi( scroll_soft::@2/(byte*) current_chargen#16 ) + (byte*) PROCPORT#6 ← phi( scroll_soft::@2/(byte*) PROCPORT#10 ) + (byte*) SCREEN#7 ← phi( scroll_soft::@2/(byte*) SCREEN#8 ) + (byte) current_bit#20 ← phi( scroll_soft::@2/(byte) current_bit#18 ) + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte*) TEXT#7 ← phi( scroll_bit/(byte*) TEXT#8 ) + (byte*) CHARGEN#5 ← phi( scroll_bit/(byte*) CHARGEN#6 ) + (byte*) nxt#29 ← phi( scroll_bit/(byte*) nxt#32 ) + (byte*) current_chargen#24 ← phi( scroll_bit/(byte*) current_chargen#28 ) + (byte*) SCREEN#5 ← phi( scroll_bit/(byte*) SCREEN#7 ) + (byte*) PROCPORT#3 ← phi( scroll_bit/(byte*) PROCPORT#6 ) + (byte) current_bit#13 ← phi( scroll_bit/(byte) current_bit#20 ) + (byte~) scroll_bit::$1 ← (byte) current_bit#13 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$3 ← (byte) current_bit#5 != (byte) 0 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#29 scroll_bit::@8/(byte*) nxt#4 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#24 scroll_bit::@8/(byte*) current_chargen#5 ) + (byte*) SCREEN#2 ← phi( scroll_bit::@7/(byte*) SCREEN#5 scroll_bit::@8/(byte*) SCREEN#6 ) + (byte*) PROCPORT#1 ← phi( scroll_bit::@7/(byte*) PROCPORT#3 scroll_bit::@8/(byte*) PROCPORT#4 ) + asm { sei } + *((byte*) PROCPORT#1) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#2 + (byte) 40 + (byte*~) scroll_bit::$10 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$10 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + (byte*) TEXT#6 ← phi( scroll_bit::@7/(byte*) TEXT#7 ) + (byte*) SCREEN#9 ← phi( scroll_bit::@7/(byte*) SCREEN#5 ) + (byte*) PROCPORT#7 ← phi( scroll_bit::@7/(byte*) PROCPORT#3 ) + (byte*) CHARGEN#4 ← phi( scroll_bit::@7/(byte*) CHARGEN#5 ) + (byte*) nxt#24 ← phi( scroll_bit::@7/(byte*) nxt#29 ) + call next_char param-assignment + (byte) next_char::return#0 ← (byte) next_char::return#2 + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (byte*) SCREEN#6 ← phi( scroll_bit::@4/(byte*) SCREEN#9 ) + (byte*) PROCPORT#4 ← phi( scroll_bit::@4/(byte*) PROCPORT#7 ) + (byte*) CHARGEN#2 ← phi( scroll_bit::@4/(byte*) CHARGEN#4 ) + (byte*) nxt#15 ← phi( scroll_bit::@4/(byte*) nxt#9 ) + (byte) next_char::return#3 ← phi( scroll_bit::@4/(byte) next_char::return#0 ) + (byte~) scroll_bit::$4 ← (byte) next_char::return#3 + (byte*) nxt#4 ← (byte*) nxt#15 + (word) scroll_bit::c#0 ← (byte~) scroll_bit::$4 + (word~) scroll_bit::$5 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#1 ← (word~) scroll_bit::$5 + (word~) scroll_bit::$6 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#2 ← (word~) scroll_bit::$6 + (word~) scroll_bit::$7 ← (word) scroll_bit::c#2 << (byte) 1 + (word) scroll_bit::c#3 ← (word~) scroll_bit::$7 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#2 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) nxt#33 ← phi( scroll_bit::@1/(byte*) nxt#37 scroll_bit::@3/(byte*) nxt#30 ) + (byte*) PROCPORT#8 ← phi( scroll_bit::@1/(byte*) PROCPORT#1 scroll_bit::@3/(byte*) PROCPORT#5 ) + (byte*) scroll_bit::sc#3 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) current_bit#14 ← phi( scroll_bit::@1/(byte) current_bit#21 scroll_bit::@3/(byte) current_bit#22 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte*) current_chargen#12 ← phi( scroll_bit::@1/(byte*) current_chargen#18 scroll_bit::@3/(byte*) current_chargen#19 ) + (byte~) scroll_bit::$11 ← (byte*) current_chargen#12 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::bits#0 ← (byte~) scroll_bit::$11 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#14 + (boolean~) scroll_bit::$14 ← (byte~) scroll_bit::$12 == (byte) 0 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte*) nxt#30 ← phi( scroll_bit::@2/(byte*) nxt#33 scroll_bit::@5/(byte*) nxt#34 ) + (byte*) PROCPORT#5 ← phi( scroll_bit::@2/(byte*) PROCPORT#8 scroll_bit::@5/(byte*) PROCPORT#9 ) + (byte) current_bit#22 ← phi( scroll_bit::@2/(byte) current_bit#14 scroll_bit::@5/(byte) current_bit#27 ) + (byte*) current_chargen#19 ← phi( scroll_bit::@2/(byte*) current_chargen#12 scroll_bit::@5/(byte*) current_chargen#25 ) + (byte) scroll_bit::r#3 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 scroll_bit::@5/(byte) scroll_bit::r#4 ) + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 scroll_bit::@5/(byte*) scroll_bit::sc#4 ) + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*~) scroll_bit::$15 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte*) scroll_bit::sc#1 ← (byte*~) scroll_bit::$15 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#3 + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r#1 != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte*) nxt#34 ← phi( scroll_bit::@2/(byte*) nxt#33 ) + (byte*) PROCPORT#9 ← phi( scroll_bit::@2/(byte*) PROCPORT#8 ) + (byte) current_bit#27 ← phi( scroll_bit::@2/(byte) current_bit#14 ) + (byte*) current_chargen#25 ← phi( scroll_bit::@2/(byte*) current_chargen#12 ) + (byte) scroll_bit::r#4 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 ) + (byte*) scroll_bit::sc#4 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 ) + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + (byte*) current_chargen#20 ← phi( scroll_bit::@3/(byte*) current_chargen#19 ) + (byte*) nxt#25 ← phi( scroll_bit::@3/(byte*) nxt#30 ) + (byte) current_bit#23 ← phi( scroll_bit::@3/(byte) current_bit#22 ) + (byte*) PROCPORT#2 ← phi( scroll_bit::@3/(byte*) PROCPORT#5 ) + *((byte*) PROCPORT#2) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + (byte*) current_chargen#13 ← phi( scroll_bit::@6/(byte*) current_chargen#20 ) + (byte*) nxt#16 ← phi( scroll_bit::@6/(byte*) nxt#25 ) + (byte) current_bit#15 ← phi( scroll_bit::@6/(byte) current_bit#23 ) + (byte) current_bit#7 ← (byte) current_bit#15 + (byte*) nxt#5 ← (byte*) nxt#16 + (byte*) current_chargen#6 ← (byte*) current_chargen#13 + return + to:@return +@3: scope:[] from @2 + (byte*) CHARGEN#17 ← phi( @2/(byte*) CHARGEN#1 ) + (byte*) PROCPORT#20 ← phi( @2/(byte*) PROCPORT#21 ) + (byte*) SCROLL#13 ← phi( @2/(byte*) SCROLL#14 ) + (byte*) BGCOL#9 ← phi( @2/(byte*) BGCOL#10 ) + (byte*) RASTER#9 ← phi( @2/(byte*) RASTER#10 ) + (byte*) current_chargen#26 ← phi( @2/(byte*) current_chargen#4 ) + (byte) current_bit#28 ← phi( @2/(byte) current_bit#4 ) + (byte) scroll#17 ← phi( @2/(byte) scroll#19 ) + (byte*) SCREEN#10 ← phi( @2/(byte*) SCREEN#12 ) + (byte*) TEXT#1 ← phi( @2/(byte*) TEXT#3 ) + (byte*) nxt#6 ← (byte*) TEXT#1 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte*) TEXT#4 ← phi( scroll_bit::@4/(byte*) TEXT#6 ) + (byte*) nxt#17 ← phi( scroll_bit::@4/(byte*) nxt#24 ) + (byte) next_char::c#0 ← *((byte*) nxt#17) + (boolean~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#17 next_char::@2/(byte*) nxt#8 ) + (byte*) nxt#7 ← ++ (byte*) nxt#18 + (byte) next_char::return#1 ← (byte) next_char::c#2 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte*) TEXT#2 ← phi( next_char/(byte*) TEXT#4 ) + (byte*) nxt#8 ← (byte*) TEXT#2 + (byte) next_char::c#1 ← *((byte*) nxt#8) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + (byte*) nxt#19 ← phi( next_char::@1/(byte*) nxt#7 ) + (byte) next_char::return#4 ← phi( next_char::@1/(byte) next_char::return#1 ) + (byte) next_char::return#2 ← (byte) next_char::return#4 + (byte*) nxt#9 ← (byte*) nxt#19 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte*) SCREEN#3 ← phi( scroll_bit/(byte*) SCREEN#7 ) + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte*~) scroll_hard::$1 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$0 + (byte[]) scroll_hard::line0#0 ← (byte*~) scroll_hard::$1 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte*~) scroll_hard::$3 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$2 + (byte[]) scroll_hard::line1#0 ← (byte*~) scroll_hard::$3 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte*~) scroll_hard::$5 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$4 + (byte[]) scroll_hard::line2#0 ← (byte*~) scroll_hard::$5 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte*~) scroll_hard::$7 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$6 + (byte[]) scroll_hard::line3#0 ← (byte*~) scroll_hard::$7 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte*~) scroll_hard::$9 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$8 + (byte[]) scroll_hard::line4#0 ← (byte*~) scroll_hard::$9 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte*~) scroll_hard::$11 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$10 + (byte[]) scroll_hard::line5#0 ← (byte*~) scroll_hard::$11 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte*~) scroll_hard::$13 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$12 + (byte[]) scroll_hard::line6#0 ← (byte*~) scroll_hard::$13 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte*~) scroll_hard::$15 ← (byte*) SCREEN#3 + (byte~) scroll_hard::$14 + (byte[]) scroll_hard::line7#0 ← (byte*~) scroll_hard::$15 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte[]) scroll_hard::line7#1 ← phi( scroll_hard/(byte[]) scroll_hard::line7#0 scroll_hard::@1/(byte[]) scroll_hard::line7#1 ) + (byte[]) scroll_hard::line6#1 ← phi( scroll_hard/(byte[]) scroll_hard::line6#0 scroll_hard::@1/(byte[]) scroll_hard::line6#1 ) + (byte[]) scroll_hard::line5#1 ← phi( scroll_hard/(byte[]) scroll_hard::line5#0 scroll_hard::@1/(byte[]) scroll_hard::line5#1 ) + (byte[]) scroll_hard::line4#1 ← phi( scroll_hard/(byte[]) scroll_hard::line4#0 scroll_hard::@1/(byte[]) scroll_hard::line4#1 ) + (byte[]) scroll_hard::line3#1 ← phi( scroll_hard/(byte[]) scroll_hard::line3#0 scroll_hard::@1/(byte[]) scroll_hard::line3#1 ) + (byte[]) scroll_hard::line2#1 ← phi( scroll_hard/(byte[]) scroll_hard::line2#0 scroll_hard::@1/(byte[]) scroll_hard::line2#1 ) + (byte[]) scroll_hard::line1#1 ← phi( scroll_hard/(byte[]) scroll_hard::line1#0 scroll_hard::@1/(byte[]) scroll_hard::line1#1 ) + (byte[]) scroll_hard::line0#1 ← phi( scroll_hard/(byte[]) scroll_hard::line0#0 scroll_hard::@1/(byte[]) scroll_hard::line0#1 ) + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#1 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#1 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#1 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#1 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#1 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#1 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#1 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i#1 != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + (byte) fillscreen::fill#2 ← phi( main/(byte) fillscreen::fill#0 ) + (byte*) fillscreen::screen#1 ← phi( main/(byte*) fillscreen::screen#0 ) + (byte*) fillscreen::cursor#0 ← (byte*) fillscreen::screen#1 + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::screen#2 ← phi( fillscreen/(byte*) fillscreen::screen#1 fillscreen::@1/(byte*) fillscreen::screen#2 ) + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + (byte) fillscreen::fill#1 ← phi( fillscreen/(byte) fillscreen::fill#2 fillscreen::@1/(byte) fillscreen::fill#1 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#1 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen#2 + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + (byte*) TEXT#18 ← phi( @3/(byte*) TEXT#1 ) + (byte*) CHARGEN#16 ← phi( @3/(byte*) CHARGEN#17 ) + (byte*) PROCPORT#19 ← phi( @3/(byte*) PROCPORT#20 ) + (byte*) SCROLL#12 ← phi( @3/(byte*) SCROLL#13 ) + (byte*) BGCOL#8 ← phi( @3/(byte*) BGCOL#9 ) + (byte*) RASTER#7 ← phi( @3/(byte*) RASTER#9 ) + (byte*) current_chargen#21 ← phi( @3/(byte*) current_chargen#26 ) + (byte*) nxt#26 ← phi( @3/(byte*) nxt#6 ) + (byte) current_bit#24 ← phi( @3/(byte) current_bit#28 ) + (byte) scroll#15 ← phi( @3/(byte) scroll#17 ) + (byte*) SCREEN#4 ← phi( @3/(byte*) SCREEN#10 ) + call main param-assignment + to:@7 +@7: scope:[] from @6 + (byte*) current_chargen#14 ← phi( @6/(byte*) current_chargen#1 ) + (byte*) nxt#20 ← phi( @6/(byte*) nxt#1 ) + (byte) current_bit#16 ← phi( @6/(byte) current_bit#1 ) + (byte) scroll#12 ← phi( @6/(byte) scroll#1 ) + (byte) scroll#6 ← (byte) scroll#12 + (byte) current_bit#8 ← (byte) current_bit#16 + (byte*) nxt#10 ← (byte*) nxt#20 + (byte*) current_chargen#7 ← (byte*) current_chargen#14 + to:@end +@end: scope:[] from @7 + +Not aliassing across scopes: fillscreen::screen#0 SCREEN#1 +Not aliassing across scopes: current_bit#5 scroll_bit::$1 +Not aliassing across scopes: scroll_bit::$4 next_char::return#3 +Not aliassing across scopes: current_chargen#5 scroll_bit::$8 +Alias candidate removed (byte*) CHARGEN#16 +Alias candidate removed (byte*) CHARGEN#14 +Alias candidate removed (byte*) CHARGEN#1 +Alias candidate removed (byte*) CHARGEN#17 +Alias candidate removed (byte*) TEXT#18 +Alias candidate removed (byte*) TEXT#16 +Alias candidate removed (byte*) TEXT#1 +Alias (byte*) SCREEN#0 = (byte*) SCREEN#1 (byte*) SCREEN#4 (byte*) SCREEN#18 (byte*) SCREEN#14 (byte*) SCREEN#12 (byte*) SCREEN#10 +Alias (byte*) RASTER#0 = (byte*) RASTER#5 (byte*) RASTER#7 (byte*) RASTER#4 (byte*) RASTER#11 (byte*) RASTER#10 (byte*) RASTER#9 +Alias (byte*) BGCOL#0 = (byte*) BGCOL#7 (byte*) BGCOL#8 (byte*) BGCOL#6 (byte*) BGCOL#11 (byte*) BGCOL#10 (byte*) BGCOL#9 +Alias (byte) scroll#15 = (byte) scroll#22 (byte) scroll#21 (byte) scroll#19 (byte) scroll#2 (byte) scroll#17 +Alias (byte) current_bit#24 = (byte) current_bit#32 (byte) current_bit#31 (byte) current_bit#28 (byte) current_bit#4 +Alias (byte*) SCROLL#0 = (byte*) SCROLL#10 (byte*) SCROLL#12 (byte*) SCROLL#9 (byte*) SCROLL#15 (byte*) SCROLL#14 (byte*) SCROLL#13 +Alias (byte*) PROCPORT#0 = (byte*) PROCPORT#17 (byte*) PROCPORT#19 (byte*) PROCPORT#16 (byte*) PROCPORT#22 (byte*) PROCPORT#21 (byte*) PROCPORT#20 +Alias (byte*) CHARGEN#0 = (byte*) CHARGEN#13 (byte*) current_chargen#31 (byte*) current_chargen#21 (byte*) current_chargen#30 (byte*) CHARGEN#3 (byte*) current_chargen#4 (byte*) current_chargen#26 +Alias (byte*) TEXT#0 = (byte*) TEXT#15 (byte*) nxt#38 (byte*) nxt#26 (byte*) nxt#36 (byte*) TEXT#5 (byte*) TEXT#3 (byte*) nxt#6 +Alias (byte*) RASTER#2 = (byte*) RASTER#3 (byte*) RASTER#6 (byte*) RASTER#8 +Alias (byte*) BGCOL#1 = (byte*) BGCOL#5 (byte*) BGCOL#2 (byte*) BGCOL#3 +Alias (byte) scroll#0 = (byte) scroll#20 (byte) scroll#7 (byte) scroll#5 (byte) scroll#8 (byte) scroll#1 (byte) scroll#11 (byte) scroll#10 (byte) scroll#12 (byte) scroll#6 +Alias (byte) current_bit#0 = (byte) current_bit#30 (byte) current_bit#9 (byte) current_bit#3 (byte) current_bit#10 (byte) current_bit#1 (byte) current_bit#12 (byte) current_bit#19 (byte) current_bit#16 (byte) current_bit#8 +Alias (byte*) nxt#0 = (byte*) nxt#35 (byte*) nxt#11 (byte*) nxt#3 (byte*) nxt#12 (byte*) nxt#1 (byte*) nxt#14 (byte*) nxt#23 (byte*) nxt#20 (byte*) nxt#10 +Alias (byte*) current_chargen#0 = (byte*) current_chargen#29 (byte*) current_chargen#8 (byte*) current_chargen#3 (byte*) current_chargen#9 (byte*) current_chargen#1 (byte*) current_chargen#11 (byte*) current_chargen#17 (byte*) current_chargen#14 (byte*) current_chargen#7 +Alias (byte*) SCROLL#11 = (byte*) SCROLL#8 (byte*) SCROLL#4 (byte*) SCROLL#6 (byte*) SCROLL#2 (byte*) SCROLL#5 (byte*) SCROLL#3 +Alias (byte*) SCREEN#11 = (byte*) SCREEN#17 (byte*) SCREEN#19 (byte*) SCREEN#13 (byte*) SCREEN#15 (byte*) SCREEN#8 (byte*) SCREEN#7 (byte*) SCREEN#5 (byte*) SCREEN#9 (byte*) SCREEN#6 (byte*) SCREEN#3 +Alias (byte*) PROCPORT#10 = (byte*) PROCPORT#15 (byte*) PROCPORT#18 (byte*) PROCPORT#12 (byte*) PROCPORT#13 (byte*) PROCPORT#11 (byte*) PROCPORT#6 (byte*) PROCPORT#3 (byte*) PROCPORT#7 (byte*) PROCPORT#4 +Alias (byte*) CHARGEN#10 = (byte*) CHARGEN#12 (byte*) CHARGEN#15 (byte*) CHARGEN#9 (byte*) CHARGEN#8 (byte*) CHARGEN#7 (byte*) CHARGEN#6 (byte*) CHARGEN#5 (byte*) CHARGEN#4 (byte*) CHARGEN#2 +Alias (byte*) TEXT#10 = (byte*) TEXT#14 (byte*) TEXT#17 (byte*) TEXT#11 (byte*) TEXT#12 (byte*) TEXT#9 (byte*) TEXT#8 (byte*) TEXT#7 (byte*) TEXT#6 (byte*) TEXT#4 (byte*) TEXT#2 (byte*) nxt#8 +Alias (byte) scroll#13 = (byte) scroll#16 (byte) scroll#9 +Alias (byte) current_bit#13 = (byte) current_bit#17 (byte) current_bit#25 (byte) current_bit#26 (byte) current_bit#18 (byte) current_bit#20 +Alias (byte*) nxt#17 = (byte*) nxt#21 (byte*) nxt#27 (byte*) nxt#28 (byte*) nxt#22 (byte*) nxt#32 (byte*) nxt#29 (byte*) nxt#24 +Alias (byte*) current_chargen#15 = (byte*) current_chargen#22 (byte*) current_chargen#23 (byte*) current_chargen#16 (byte*) current_chargen#28 (byte*) current_chargen#24 +Alias (byte) current_bit#11 = (byte) current_bit#7 (byte) current_bit#2 (byte) current_bit#23 (byte) current_bit#22 (byte) current_bit#15 +Alias (byte*) nxt#13 = (byte*) nxt#5 (byte*) nxt#2 (byte*) nxt#25 (byte*) nxt#30 (byte*) nxt#16 +Alias (byte*) current_chargen#10 = (byte*) current_chargen#6 (byte*) current_chargen#2 (byte*) current_chargen#20 (byte*) current_chargen#19 (byte*) current_chargen#13 +Alias (byte) scroll#14 = (byte) scroll#4 +Alias (byte*) scroll_bit::sc#0 = (byte*~) scroll_bit::$10 +Alias (byte) next_char::c#2 = (byte) next_char::return#0 (byte) next_char::return#2 (byte) next_char::return#3 (byte) next_char::return#1 (byte) next_char::return#4 +Alias (byte*) nxt#15 = (byte*) nxt#9 (byte*) nxt#4 (byte*) nxt#19 (byte*) nxt#7 +Alias (word) scroll_bit::c#0 = (byte~) scroll_bit::$4 +Alias (word) scroll_bit::c#1 = (word~) scroll_bit::$5 +Alias (word) scroll_bit::c#2 = (word~) scroll_bit::$6 +Alias (word) scroll_bit::c#3 = (word~) scroll_bit::$7 +Alias (byte) scroll_bit::bits#0 = (byte~) scroll_bit::$11 +Alias (byte*) scroll_bit::sc#1 = (byte*~) scroll_bit::$15 +Alias (byte*) scroll_bit::sc#3 = (byte*) scroll_bit::sc#4 +Alias (byte) scroll_bit::r#2 = (byte) scroll_bit::r#4 +Alias (byte*) current_chargen#12 = (byte*) current_chargen#25 +Alias (byte) current_bit#14 = (byte) current_bit#27 +Alias (byte*) PROCPORT#8 = (byte*) PROCPORT#9 +Alias (byte*) nxt#33 = (byte*) nxt#34 +Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#5 +Alias (byte[]) scroll_hard::line0#0 = (byte*~) scroll_hard::$1 +Alias (byte[]) scroll_hard::line1#0 = (byte*~) scroll_hard::$3 +Alias (byte[]) scroll_hard::line2#0 = (byte*~) scroll_hard::$5 +Alias (byte[]) scroll_hard::line3#0 = (byte*~) scroll_hard::$7 +Alias (byte[]) scroll_hard::line4#0 = (byte*~) scroll_hard::$9 +Alias (byte[]) scroll_hard::line5#0 = (byte*~) scroll_hard::$11 +Alias (byte[]) scroll_hard::line6#0 = (byte*~) scroll_hard::$13 +Alias (byte[]) scroll_hard::line7#0 = (byte*~) scroll_hard::$15 +Alias (byte*) fillscreen::cursor#0 = (byte*) fillscreen::screen#1 (byte*) fillscreen::screen#0 +Alias (byte) fillscreen::fill#0 = (byte) fillscreen::fill#2 +Succesful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) TEXT#16 ← phi( @6/(byte*) TEXT#18 ) + (byte*) CHARGEN#14 ← phi( @6/(byte*) CHARGEN#16 ) + (byte*) fillscreen::cursor#0 ← (byte*) SCREEN#0 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + (byte*) TEXT#0 ← phi( main/(byte*) TEXT#16 ) + (byte*) CHARGEN#0 ← phi( main/(byte*) CHARGEN#14 ) + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#10 main::@2/(byte*) TEXT#13 main::@7/(byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#10 main::@2/(byte*) CHARGEN#11 main::@7/(byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#10 main::@2/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#11 main::@2/(byte*) SCREEN#16 main::@7/(byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#11 main::@2/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@2/(byte*) current_chargen#27 main::@7/(byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@2/(byte*) nxt#31 main::@7/(byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@2/(byte) current_bit#29 main::@7/(byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@2/(byte) scroll#18 main::@7/(byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#1 main::@2/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#2 main::@2/(byte*) RASTER#1 main::@7/(byte*) RASTER#0 ) + (boolean~) main::$1 ← *((byte*) RASTER#1) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (byte*) TEXT#10 ← phi( main::@2/(byte*) TEXT#13 main::@3/(byte*) TEXT#10 ) + (byte*) CHARGEN#10 ← phi( main::@2/(byte*) CHARGEN#11 main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#10 ← phi( main::@2/(byte*) PROCPORT#14 main::@3/(byte*) PROCPORT#10 ) + (byte*) SCREEN#11 ← phi( main::@2/(byte*) SCREEN#16 main::@3/(byte*) SCREEN#11 ) + (byte*) SCROLL#11 ← phi( main::@2/(byte*) SCROLL#7 main::@3/(byte*) SCROLL#11 ) + (byte*) current_chargen#15 ← phi( main::@2/(byte*) current_chargen#27 main::@3/(byte*) current_chargen#15 ) + (byte*) nxt#17 ← phi( main::@2/(byte*) nxt#31 main::@3/(byte*) nxt#17 ) + (byte) current_bit#13 ← phi( main::@2/(byte) current_bit#29 main::@3/(byte) current_bit#13 ) + (byte) scroll#13 ← phi( main::@2/(byte) scroll#18 main::@3/(byte) scroll#13 ) + (byte*) BGCOL#1 ← phi( main::@2/(byte*) BGCOL#4 main::@3/(byte*) BGCOL#1 ) + (byte*) RASTER#2 ← phi( main::@2/(byte*) RASTER#1 main::@3/(byte*) RASTER#2 ) + (boolean~) main::$2 ← *((byte*) RASTER#2) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#1) ← ++ *((byte*) BGCOL#1) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#1) ← -- *((byte*) BGCOL#1) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + (byte) scroll#15 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#13 + (boolean~) scroll_soft::$1 ← (byte) scroll#3 != (byte) 255 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#15 scroll_soft::@3/(byte*) current_chargen#10 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#17 scroll_soft::@3/(byte*) nxt#13 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#13 scroll_soft::@3/(byte) current_bit#11 ) + (byte*) SCROLL#1 ← phi( scroll_soft/(byte*) SCROLL#11 scroll_soft::@3/(byte*) SCROLL#11 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#1) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll#14 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + (byte*) CHARGEN#1 ← phi( @1/(byte*) CHARGEN#0 ) + (byte*) CHARGEN#0 ← (byte*) CHARGEN#1 + (byte) current_bit#24 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#13 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$3 ← (byte) current_bit#5 != (byte) 0 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#17 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#15 scroll_bit::@8/(byte*) current_chargen#5 ) + (byte*) SCREEN#2 ← phi( scroll_bit::@7/(byte*) SCREEN#11 scroll_bit::@8/(byte*) SCREEN#11 ) + (byte*) PROCPORT#1 ← phi( scroll_bit::@7/(byte*) PROCPORT#10 scroll_bit::@8/(byte*) PROCPORT#10 ) + asm { sei } + *((byte*) PROCPORT#1) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#2 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#10 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) nxt#33 ← phi( scroll_bit::@1/(byte*) nxt#37 scroll_bit::@3/(byte*) nxt#13 ) + (byte*) PROCPORT#8 ← phi( scroll_bit::@1/(byte*) PROCPORT#1 scroll_bit::@3/(byte*) PROCPORT#2 ) + (byte*) scroll_bit::sc#3 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) current_bit#14 ← phi( scroll_bit::@1/(byte) current_bit#21 scroll_bit::@3/(byte) current_bit#11 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte*) current_chargen#12 ← phi( scroll_bit::@1/(byte*) current_chargen#18 scroll_bit::@3/(byte*) current_chargen#10 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#12 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#14 + (boolean~) scroll_bit::$14 ← (byte~) scroll_bit::$12 == (byte) 0 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte*) nxt#13 ← phi( scroll_bit::@2/(byte*) nxt#33 scroll_bit::@5/(byte*) nxt#33 ) + (byte*) PROCPORT#2 ← phi( scroll_bit::@2/(byte*) PROCPORT#8 scroll_bit::@5/(byte*) PROCPORT#8 ) + (byte) current_bit#11 ← phi( scroll_bit::@2/(byte) current_bit#14 scroll_bit::@5/(byte) current_bit#14 ) + (byte*) current_chargen#10 ← phi( scroll_bit::@2/(byte*) current_chargen#12 scroll_bit::@5/(byte*) current_chargen#12 ) + (byte) scroll_bit::r#3 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 scroll_bit::@5/(byte) scroll_bit::r#2 ) + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 scroll_bit::@5/(byte*) scroll_bit::sc#3 ) + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#3 + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r#1 != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#2) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + (byte*) CHARGEN#17 ← phi( @2/(byte*) CHARGEN#1 ) + (byte*) TEXT#1 ← phi( @2/(byte*) TEXT#0 ) + (byte*) TEXT#0 ← (byte*) TEXT#1 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#17) + (boolean~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#17 next_char::@2/(byte*) TEXT#10 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#10) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$0 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$2 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$4 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$6 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$8 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$10 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$12 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$14 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte[]) scroll_hard::line7#1 ← phi( scroll_hard/(byte[]) scroll_hard::line7#0 scroll_hard::@1/(byte[]) scroll_hard::line7#1 ) + (byte[]) scroll_hard::line6#1 ← phi( scroll_hard/(byte[]) scroll_hard::line6#0 scroll_hard::@1/(byte[]) scroll_hard::line6#1 ) + (byte[]) scroll_hard::line5#1 ← phi( scroll_hard/(byte[]) scroll_hard::line5#0 scroll_hard::@1/(byte[]) scroll_hard::line5#1 ) + (byte[]) scroll_hard::line4#1 ← phi( scroll_hard/(byte[]) scroll_hard::line4#0 scroll_hard::@1/(byte[]) scroll_hard::line4#1 ) + (byte[]) scroll_hard::line3#1 ← phi( scroll_hard/(byte[]) scroll_hard::line3#0 scroll_hard::@1/(byte[]) scroll_hard::line3#1 ) + (byte[]) scroll_hard::line2#1 ← phi( scroll_hard/(byte[]) scroll_hard::line2#0 scroll_hard::@1/(byte[]) scroll_hard::line2#1 ) + (byte[]) scroll_hard::line1#1 ← phi( scroll_hard/(byte[]) scroll_hard::line1#0 scroll_hard::@1/(byte[]) scroll_hard::line1#1 ) + (byte[]) scroll_hard::line0#1 ← phi( scroll_hard/(byte[]) scroll_hard::line0#0 scroll_hard::@1/(byte[]) scroll_hard::line0#1 ) + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#1 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#1 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#1 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#1 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#1 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#1 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#1 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i#1 != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::screen#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::screen#2 ) + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + (byte) fillscreen::fill#1 ← phi( fillscreen/(byte) fillscreen::fill#0 fillscreen::@1/(byte) fillscreen::fill#1 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#1 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen#2 + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + (byte*) TEXT#18 ← phi( @3/(byte*) TEXT#1 ) + (byte*) CHARGEN#16 ← phi( @3/(byte*) CHARGEN#17 ) + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Not aliassing across scopes: fillscreen::cursor#0 SCREEN#0 +Not aliassing across scopes: current_bit#5 scroll_bit::$1 +Not aliassing across scopes: scroll_bit::c#0 next_char::c#2 +Not aliassing across scopes: current_chargen#5 scroll_bit::$8 +Alias (byte*) CHARGEN#0 = (byte*) CHARGEN#14 (byte*) CHARGEN#16 (byte*) CHARGEN#1 (byte*) CHARGEN#17 +Alias (byte*) TEXT#0 = (byte*) TEXT#16 (byte*) TEXT#18 (byte*) TEXT#1 +Alias (byte*) SCROLL#1 = (byte*) SCROLL#11 +Alias (byte*) PROCPORT#1 = (byte*) PROCPORT#10 +Alias (byte*) SCREEN#11 = (byte*) SCREEN#2 +Alias (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#3 +Alias (byte) scroll_bit::r#2 = (byte) scroll_bit::r#3 +Alias (byte*) current_chargen#10 = (byte*) current_chargen#12 +Alias (byte) current_bit#11 = (byte) current_bit#14 +Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#8 +Alias (byte*) nxt#13 = (byte*) nxt#33 +Succesful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) fillscreen::cursor#0 ← (byte*) SCREEN#0 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#10 main::@2/(byte*) TEXT#13 main::@7/(byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#10 main::@2/(byte*) CHARGEN#11 main::@7/(byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#1 main::@2/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#11 main::@2/(byte*) SCREEN#16 main::@7/(byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#1 main::@2/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@2/(byte*) current_chargen#27 main::@7/(byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@2/(byte*) nxt#31 main::@7/(byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@2/(byte) current_bit#29 main::@7/(byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@2/(byte) scroll#18 main::@7/(byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#1 main::@2/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#2 main::@2/(byte*) RASTER#1 main::@7/(byte*) RASTER#0 ) + (boolean~) main::$1 ← *((byte*) RASTER#1) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (byte*) TEXT#10 ← phi( main::@2/(byte*) TEXT#13 main::@3/(byte*) TEXT#10 ) + (byte*) CHARGEN#10 ← phi( main::@2/(byte*) CHARGEN#11 main::@3/(byte*) CHARGEN#10 ) + (byte*) PROCPORT#1 ← phi( main::@2/(byte*) PROCPORT#14 main::@3/(byte*) PROCPORT#1 ) + (byte*) SCREEN#11 ← phi( main::@2/(byte*) SCREEN#16 main::@3/(byte*) SCREEN#11 ) + (byte*) SCROLL#1 ← phi( main::@2/(byte*) SCROLL#7 main::@3/(byte*) SCROLL#1 ) + (byte*) current_chargen#15 ← phi( main::@2/(byte*) current_chargen#27 main::@3/(byte*) current_chargen#15 ) + (byte*) nxt#17 ← phi( main::@2/(byte*) nxt#31 main::@3/(byte*) nxt#17 ) + (byte) current_bit#13 ← phi( main::@2/(byte) current_bit#29 main::@3/(byte) current_bit#13 ) + (byte) scroll#13 ← phi( main::@2/(byte) scroll#18 main::@3/(byte) scroll#13 ) + (byte*) BGCOL#1 ← phi( main::@2/(byte*) BGCOL#4 main::@3/(byte*) BGCOL#1 ) + (byte*) RASTER#2 ← phi( main::@2/(byte*) RASTER#1 main::@3/(byte*) RASTER#2 ) + (boolean~) main::$2 ← *((byte*) RASTER#2) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#1) ← ++ *((byte*) BGCOL#1) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#1) ← -- *((byte*) BGCOL#1) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + (byte) scroll#15 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#13 + (boolean~) scroll_soft::$1 ← (byte) scroll#3 != (byte) 255 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#15 scroll_soft::@3/(byte*) current_chargen#10 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#17 scroll_soft::@3/(byte*) nxt#13 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#13 scroll_soft::@3/(byte) current_bit#11 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#1) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll#14 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + (byte) current_bit#24 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#13 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$3 ← (byte) current_bit#5 != (byte) 0 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#17 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#15 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#1) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#11 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#10 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) nxt#13 ← phi( scroll_bit::@1/(byte*) nxt#37 scroll_bit::@3/(byte*) nxt#13 ) + (byte*) PROCPORT#2 ← phi( scroll_bit::@1/(byte*) PROCPORT#1 scroll_bit::@3/(byte*) PROCPORT#2 ) + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) current_bit#11 ← phi( scroll_bit::@1/(byte) current_bit#21 scroll_bit::@3/(byte) current_bit#11 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte*) current_chargen#10 ← phi( scroll_bit::@1/(byte*) current_chargen#18 scroll_bit::@3/(byte*) current_chargen#10 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#10 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#11 + (boolean~) scroll_bit::$14 ← (byte~) scroll_bit::$12 == (byte) 0 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r#1 != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#2) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#17) + (boolean~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#17 next_char::@2/(byte*) TEXT#10 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#10) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$0 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$2 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$4 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$6 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$8 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$10 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$12 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$14 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte[]) scroll_hard::line7#1 ← phi( scroll_hard/(byte[]) scroll_hard::line7#0 scroll_hard::@1/(byte[]) scroll_hard::line7#1 ) + (byte[]) scroll_hard::line6#1 ← phi( scroll_hard/(byte[]) scroll_hard::line6#0 scroll_hard::@1/(byte[]) scroll_hard::line6#1 ) + (byte[]) scroll_hard::line5#1 ← phi( scroll_hard/(byte[]) scroll_hard::line5#0 scroll_hard::@1/(byte[]) scroll_hard::line5#1 ) + (byte[]) scroll_hard::line4#1 ← phi( scroll_hard/(byte[]) scroll_hard::line4#0 scroll_hard::@1/(byte[]) scroll_hard::line4#1 ) + (byte[]) scroll_hard::line3#1 ← phi( scroll_hard/(byte[]) scroll_hard::line3#0 scroll_hard::@1/(byte[]) scroll_hard::line3#1 ) + (byte[]) scroll_hard::line2#1 ← phi( scroll_hard/(byte[]) scroll_hard::line2#0 scroll_hard::@1/(byte[]) scroll_hard::line2#1 ) + (byte[]) scroll_hard::line1#1 ← phi( scroll_hard/(byte[]) scroll_hard::line1#0 scroll_hard::@1/(byte[]) scroll_hard::line1#1 ) + (byte[]) scroll_hard::line0#1 ← phi( scroll_hard/(byte[]) scroll_hard::line0#0 scroll_hard::@1/(byte[]) scroll_hard::line0#1 ) + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#1 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#1 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#1 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#1 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#1 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#1 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#1 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i#1 != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::screen#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::screen#2 ) + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + (byte) fillscreen::fill#1 ← phi( fillscreen/(byte) fillscreen::fill#0 fillscreen::@1/(byte) fillscreen::fill#1 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#1 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen#2 + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Not aliassing across scopes: fillscreen::cursor#0 SCREEN#0 +Not aliassing across scopes: current_bit#5 scroll_bit::$1 +Not aliassing across scopes: scroll_bit::c#0 next_char::c#2 +Not aliassing across scopes: current_chargen#5 scroll_bit::$8 +Self Phi Eliminated (byte*) RASTER#1 +Self Phi Eliminated (byte*) BGCOL#4 +Self Phi Eliminated (byte) scroll#18 +Self Phi Eliminated (byte) current_bit#29 +Self Phi Eliminated (byte*) nxt#31 +Self Phi Eliminated (byte*) current_chargen#27 +Self Phi Eliminated (byte*) SCROLL#7 +Self Phi Eliminated (byte*) SCREEN#16 +Self Phi Eliminated (byte*) PROCPORT#14 +Self Phi Eliminated (byte*) CHARGEN#11 +Self Phi Eliminated (byte*) TEXT#13 +Self Phi Eliminated (byte*) RASTER#2 +Self Phi Eliminated (byte*) BGCOL#1 +Self Phi Eliminated (byte) scroll#13 +Self Phi Eliminated (byte) current_bit#13 +Self Phi Eliminated (byte*) nxt#17 +Self Phi Eliminated (byte*) current_chargen#15 +Self Phi Eliminated (byte*) SCROLL#1 +Self Phi Eliminated (byte*) SCREEN#11 +Self Phi Eliminated (byte*) PROCPORT#1 +Self Phi Eliminated (byte*) CHARGEN#10 +Self Phi Eliminated (byte*) TEXT#10 +Self Phi Eliminated (byte*) current_chargen#10 +Self Phi Eliminated (byte) current_bit#11 +Self Phi Eliminated (byte*) PROCPORT#2 +Self Phi Eliminated (byte*) nxt#13 +Self Phi Eliminated (byte[]) scroll_hard::line0#1 +Self Phi Eliminated (byte[]) scroll_hard::line1#1 +Self Phi Eliminated (byte[]) scroll_hard::line2#1 +Self Phi Eliminated (byte[]) scroll_hard::line3#1 +Self Phi Eliminated (byte[]) scroll_hard::line4#1 +Self Phi Eliminated (byte[]) scroll_hard::line5#1 +Self Phi Eliminated (byte[]) scroll_hard::line6#1 +Self Phi Eliminated (byte[]) scroll_hard::line7#1 +Self Phi Eliminated (byte) fillscreen::fill#1 +Self Phi Eliminated (byte*) fillscreen::screen#2 +Succesful SSA optimization Pass2SelfPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) fillscreen::cursor#0 ← (byte*) SCREEN#0 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#10 main::@7/(byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#10 main::@7/(byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#1 main::@7/(byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#11 main::@7/(byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#1 main::@7/(byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@7/(byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@7/(byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@7/(byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@7/(byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#1 main::@7/(byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#2 main::@7/(byte*) RASTER#0 ) + (boolean~) main::$1 ← *((byte*) RASTER#1) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (byte*) TEXT#10 ← phi( main::@2/(byte*) TEXT#13 ) + (byte*) CHARGEN#10 ← phi( main::@2/(byte*) CHARGEN#11 ) + (byte*) PROCPORT#1 ← phi( main::@2/(byte*) PROCPORT#14 ) + (byte*) SCREEN#11 ← phi( main::@2/(byte*) SCREEN#16 ) + (byte*) SCROLL#1 ← phi( main::@2/(byte*) SCROLL#7 ) + (byte*) current_chargen#15 ← phi( main::@2/(byte*) current_chargen#27 ) + (byte*) nxt#17 ← phi( main::@2/(byte*) nxt#31 ) + (byte) current_bit#13 ← phi( main::@2/(byte) current_bit#29 ) + (byte) scroll#13 ← phi( main::@2/(byte) scroll#18 ) + (byte*) BGCOL#1 ← phi( main::@2/(byte*) BGCOL#4 ) + (byte*) RASTER#2 ← phi( main::@2/(byte*) RASTER#1 ) + (boolean~) main::$2 ← *((byte*) RASTER#2) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#1) ← ++ *((byte*) BGCOL#1) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#1) ← -- *((byte*) BGCOL#1) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + (byte) scroll#15 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#13 + (boolean~) scroll_soft::$1 ← (byte) scroll#3 != (byte) 255 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#15 scroll_soft::@3/(byte*) current_chargen#10 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#17 scroll_soft::@3/(byte*) nxt#13 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#13 scroll_soft::@3/(byte) current_bit#11 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#1) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll#14 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + (byte) current_bit#24 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#13 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$3 ← (byte) current_bit#5 != (byte) 0 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#17 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#15 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#1) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#11 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#10 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) nxt#13 ← phi( scroll_bit::@1/(byte*) nxt#37 ) + (byte*) PROCPORT#2 ← phi( scroll_bit::@1/(byte*) PROCPORT#1 ) + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) current_bit#11 ← phi( scroll_bit::@1/(byte) current_bit#21 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte*) current_chargen#10 ← phi( scroll_bit::@1/(byte*) current_chargen#18 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#10 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#11 + (boolean~) scroll_bit::$14 ← (byte~) scroll_bit::$12 == (byte) 0 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r#1 != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#2) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#17) + (boolean~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#17 next_char::@2/(byte*) TEXT#10 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#10) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$0 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$2 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$4 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$6 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$8 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$10 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$12 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#11 + (byte~) scroll_hard::$14 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte[]) scroll_hard::line7#1 ← phi( scroll_hard/(byte[]) scroll_hard::line7#0 ) + (byte[]) scroll_hard::line6#1 ← phi( scroll_hard/(byte[]) scroll_hard::line6#0 ) + (byte[]) scroll_hard::line5#1 ← phi( scroll_hard/(byte[]) scroll_hard::line5#0 ) + (byte[]) scroll_hard::line4#1 ← phi( scroll_hard/(byte[]) scroll_hard::line4#0 ) + (byte[]) scroll_hard::line3#1 ← phi( scroll_hard/(byte[]) scroll_hard::line3#0 ) + (byte[]) scroll_hard::line2#1 ← phi( scroll_hard/(byte[]) scroll_hard::line2#0 ) + (byte[]) scroll_hard::line1#1 ← phi( scroll_hard/(byte[]) scroll_hard::line1#0 ) + (byte[]) scroll_hard::line0#1 ← phi( scroll_hard/(byte[]) scroll_hard::line0#0 ) + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#1 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#1 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#1 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#1 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#1 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#1 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#1 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#1 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#1 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i#1 != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::screen#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 ) + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + (byte) fillscreen::fill#1 ← phi( fillscreen/(byte) fillscreen::fill#0 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#1 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen#2 + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Redundant Phi (byte*) RASTER#2 (byte*) RASTER#1 +Redundant Phi (byte*) BGCOL#1 (byte*) BGCOL#4 +Redundant Phi (byte) scroll#13 (byte) scroll#18 +Redundant Phi (byte) current_bit#13 (byte) current_bit#29 +Redundant Phi (byte*) nxt#17 (byte*) nxt#31 +Redundant Phi (byte*) current_chargen#15 (byte*) current_chargen#27 +Redundant Phi (byte*) SCROLL#1 (byte*) SCROLL#7 +Redundant Phi (byte*) SCREEN#11 (byte*) SCREEN#16 +Redundant Phi (byte*) PROCPORT#1 (byte*) PROCPORT#14 +Redundant Phi (byte*) CHARGEN#10 (byte*) CHARGEN#11 +Redundant Phi (byte*) TEXT#10 (byte*) TEXT#13 +Redundant Phi (byte*) current_chargen#10 (byte*) current_chargen#18 +Redundant Phi (byte) current_bit#11 (byte) current_bit#21 +Redundant Phi (byte*) PROCPORT#2 (byte*) PROCPORT#1 +Redundant Phi (byte*) nxt#13 (byte*) nxt#37 +Redundant Phi (byte[]) scroll_hard::line0#1 (byte[]) scroll_hard::line0#0 +Redundant Phi (byte[]) scroll_hard::line1#1 (byte[]) scroll_hard::line1#0 +Redundant Phi (byte[]) scroll_hard::line2#1 (byte[]) scroll_hard::line2#0 +Redundant Phi (byte[]) scroll_hard::line3#1 (byte[]) scroll_hard::line3#0 +Redundant Phi (byte[]) scroll_hard::line4#1 (byte[]) scroll_hard::line4#0 +Redundant Phi (byte[]) scroll_hard::line5#1 (byte[]) scroll_hard::line5#0 +Redundant Phi (byte[]) scroll_hard::line6#1 (byte[]) scroll_hard::line6#0 +Redundant Phi (byte[]) scroll_hard::line7#1 (byte[]) scroll_hard::line7#0 +Redundant Phi (byte) fillscreen::fill#1 (byte) fillscreen::fill#0 +Redundant Phi (byte*) fillscreen::screen#2 (byte*) fillscreen::cursor#0 +Succesful SSA optimization Pass2RedundantPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) fillscreen::cursor#0 ← (byte*) SCREEN#0 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#13 main::@7/(byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#11 main::@7/(byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#16 main::@7/(byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@7/(byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@7/(byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@7/(byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@7/(byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#1 main::@7/(byte*) RASTER#0 ) + (boolean~) main::$1 ← *((byte*) RASTER#1) != (byte) 254 + if((boolean~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + (boolean~) main::$2 ← *((byte*) RASTER#1) != (byte) 255 + if((boolean~) main::$2) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + (byte) scroll#15 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + (boolean~) scroll_soft::$1 ← (byte) scroll#3 != (byte) 255 + if((boolean~) scroll_soft::$1) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@3/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@3/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@3/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll#14 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + (byte) current_bit#24 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + (boolean~) scroll_bit::$3 ← (byte) current_bit#5 != (byte) 0 + if((boolean~) scroll_bit::$3) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + (boolean~) scroll_bit::$14 ← (byte~) scroll_bit::$12 == (byte) 0 + if((boolean~) scroll_bit::$14) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + (boolean~) scroll_bit::$16 ← (byte) scroll_bit::r#1 != (byte) 8 + if((boolean~) scroll_bit::$16) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + (boolean~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' + if((boolean~) next_char::$1) goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$0 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$2 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$4 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$6 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$8 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$10 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$12 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$14 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + (boolean~) scroll_hard::$32 ← (byte) scroll_hard::i#1 != (byte) 39 + if((boolean~) scroll_hard::$32) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::cursor#0 + (word) 1000 + (boolean~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0 + if((boolean~) fillscreen::$1) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Simple Condition (boolean~) main::$1 if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 +Simple Condition (boolean~) main::$2 if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 +Simple Condition (boolean~) scroll_soft::$1 if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 +Simple Condition (boolean~) scroll_bit::$3 if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 +Simple Condition (boolean~) scroll_bit::$14 if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 +Simple Condition (boolean~) scroll_bit::$16 if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 +Simple Condition (boolean~) next_char::$1 if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 +Simple Condition (boolean~) scroll_hard::$32 if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 +Simple Condition (boolean~) fillscreen::$1 if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 +Succesful SSA optimization Pass2ConditionalJumpSimplification +CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT#0 ← (byte) 1 + (byte*) CHARGEN#0 ← (word) 53248 + (byte*) SCREEN#0 ← (word) 1024 + (byte*) RASTER#0 ← (word) 53266 + (byte*) BGCOL#0 ← (word) 53280 + (byte*) SCROLL#0 ← (word) 53270 + (byte*) TEXT#0 ← (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" + to:@1 +main: scope:[main] from @6 + (byte*) fillscreen::cursor#0 ← (byte*) SCREEN#0 + (byte) fillscreen::fill#0 ← (byte) 32 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#13 main::@7/(byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#11 main::@7/(byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#16 main::@7/(byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@7/(byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@7/(byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@7/(byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@7/(byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#1 main::@7/(byte*) RASTER#0 ) + if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + (byte) scroll#15 ← (byte) 7 + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@3/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@3/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@3/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + (byte) scroll#14 ← (byte) 7 + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + (byte) current_bit#24 ← (byte) 1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + (byte) scroll_bit::r#0 ← (byte) 0 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte) current_bit#6 ← (byte) 128 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte) scroll_bit::b#0 ← (byte) ' ' + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + (byte) scroll_bit::b#1 ← (byte) '*' + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte~) scroll_hard::$0 ← (byte) 40 * (byte) 0 + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$0 + (byte~) scroll_hard::$2 ← (byte) 40 * (byte) 1 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$2 + (byte~) scroll_hard::$4 ← (byte) 40 * (byte) 2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$4 + (byte~) scroll_hard::$6 ← (byte) 40 * (byte) 3 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$6 + (byte~) scroll_hard::$8 ← (byte) 40 * (byte) 4 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$8 + (byte~) scroll_hard::$10 ← (byte) 40 * (byte) 5 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$10 + (byte~) scroll_hard::$12 ← (byte) 40 * (byte) 6 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$12 + (byte~) scroll_hard::$14 ← (byte) 40 * (byte) 7 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (byte~) scroll_hard::$14 + (byte) scroll_hard::i#0 ← (byte) 0 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::cursor#0 + (word) 1000 + if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Constant (const byte*) PROCPORT#0 = 1 +Constant (const byte*) CHARGEN#0 = 53248 +Constant (const byte*) SCREEN#0 = 1024 +Constant (const byte*) RASTER#0 = 53266 +Constant (const byte*) BGCOL#0 = 53280 +Constant (const byte*) SCROLL#0 = 53270 +Constant (const byte*) TEXT#0 = "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" +Constant (const byte) fillscreen::fill#0 = 32 +Constant (const byte) scroll#15 = 7 +Constant (const byte) scroll#14 = 7 +Constant (const byte) current_bit#24 = 1 +Constant (const byte) scroll_bit::r#0 = 0 +Constant (const byte) current_bit#6 = 128 +Constant (const byte) scroll_bit::b#0 = ' ' +Constant (const byte) scroll_bit::b#1 = '*' +Constant (const byte) scroll_hard::$0 = 40*0 +Constant (const byte) scroll_hard::$2 = 40*1 +Constant (const byte) scroll_hard::$4 = 40*2 +Constant (const byte) scroll_hard::$6 = 40*3 +Constant (const byte) scroll_hard::$8 = 40*4 +Constant (const byte) scroll_hard::$10 = 40*5 +Constant (const byte) scroll_hard::$12 = 40*6 +Constant (const byte) scroll_hard::$14 = 40*7 +Constant (const byte) scroll_hard::i#0 = 0 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @6 + (byte*) fillscreen::cursor#0 ← (const byte*) SCREEN#0 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#13 main::@7/(const byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#11 main::@7/(const byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#14 main::@7/(const byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#16 main::@7/(const byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#7 main::@7/(const byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@7/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@7/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@7/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@7/(const byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#4 main::@7/(const byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#1 main::@7/(const byte*) RASTER#0 ) + if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@3/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@3/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@3/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(const byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$0 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$4 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$6 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$8 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$10 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$12 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$14 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (byte*) fillscreen::cursor#0 + (word) 1000 + if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Constant (const byte*) fillscreen::cursor#0 = SCREEN#0 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#13 main::@7/(const byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#11 main::@7/(const byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#14 main::@7/(const byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#16 main::@7/(const byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#7 main::@7/(const byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@7/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@7/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@7/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@7/(const byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#4 main::@7/(const byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#1 main::@7/(const byte*) RASTER#0 ) + if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@3/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@3/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@3/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(const byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$0 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$4 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$6 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$8 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$10 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$12 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$14 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + (byte*~) fillscreen::$0 ← (const byte*) fillscreen::cursor#0 + (word) 1000 + if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Constant (const byte*) fillscreen::$0 = fillscreen::cursor#0+1000 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#13 main::@7/(const byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#11 main::@7/(const byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#14 main::@7/(const byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#16 main::@7/(const byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#7 main::@7/(const byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@7/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@7/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@7/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@7/(const byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#4 main::@7/(const byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#1 main::@7/(const byte*) RASTER#0 ) + if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@3/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@3/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@3/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(const byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte) 40 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$0 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$4 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$6 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$8 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$10 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$12 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$14 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Consolidated constant in assignment scroll_bit::sc#0 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Succesful SSA optimization Pass2ConstantAdditionElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@7 +main::@7: scope:[main] from main + to:main::@2 +main::@1: scope:[main] from main::@8 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 main::@7 + (byte*) TEXT#13 ← phi( main::@1/(byte*) TEXT#13 main::@7/(const byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@1/(byte*) CHARGEN#11 main::@7/(const byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#14 main::@7/(const byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@1/(byte*) SCREEN#16 main::@7/(const byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#7 main::@7/(const byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#0 main::@7/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#0 main::@7/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#0 main::@7/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@1/(byte) scroll#0 main::@7/(const byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#4 main::@7/(const byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#1 main::@7/(const byte*) RASTER#0 ) + if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +@1: scope:[] from @begin + to:@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@3 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@3/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@3/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@3/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(const byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@3 +scroll_soft::@3: scope:[scroll_soft] from scroll_soft::@2 + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +@2: scope:[] from @1 + to:@3 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 40+(byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +@3: scope:[] from @2 + to:@6 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$0 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$4 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$6 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$8 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$10 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$12 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$14 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @3 + call main param-assignment + to:@7 +@7: scope:[] from @6 + to:@end +@end: scope:[] from @7 + +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte*) SCREEN#16 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Culled Empty Block (label) main::@7 +Culled Empty Block (label) main::@1 +Culled Empty Block (label) @1 +Culled Empty Block (label) scroll_soft::@3 +Culled Empty Block (label) @2 +Not culling empty block because it shares successor with its predecessor. (label) scroll_bit::@5 +Culled Empty Block (label) @3 +Culled Empty Block (label) @7 +Succesful SSA optimization Pass2CullEmptyBlocks +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) TEXT#13 ← phi( main::@8/(byte*) TEXT#13 main/(const byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main::@8/(byte*) CHARGEN#11 main/(const byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main::@8/(byte*) PROCPORT#14 main/(const byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main::@8/(byte*) SCREEN#16 main/(const byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main::@8/(byte*) SCROLL#7 main/(const byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(const byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main::@8/(byte*) BGCOL#4 main/(const byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main::@8/(byte*) RASTER#1 main/(const byte*) RASTER#0 ) + if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(const byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 40+(byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$0 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$4 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$6 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$8 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$10 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$12 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$14 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +Not culling empty block because it shares successor with its predecessor. (label) scroll_bit::@5 +Not aliassing identity: RASTER#1 RASTER#1 +Not aliassing identity: BGCOL#4 BGCOL#4 +Not aliassing identity: SCROLL#7 SCROLL#7 +Not aliassing identity: SCREEN#16 SCREEN#16 +Not aliassing identity: PROCPORT#14 PROCPORT#14 +Not aliassing identity: CHARGEN#11 CHARGEN#11 +Not aliassing identity: TEXT#13 TEXT#13 +Not aliassing across scopes: current_bit#5 scroll_bit::$1 +Not aliassing across scopes: scroll_bit::$9 SCREEN#16 +Not aliassing across scopes: scroll_bit::c#0 next_char::c#2 +Not aliassing across scopes: current_chargen#5 scroll_bit::$8 +Self Phi Eliminated (byte*) RASTER#1 +Self Phi Eliminated (byte*) BGCOL#4 +Self Phi Eliminated (byte*) SCROLL#7 +Self Phi Eliminated (byte*) SCREEN#16 +Self Phi Eliminated (byte*) PROCPORT#14 +Self Phi Eliminated (byte*) CHARGEN#11 +Self Phi Eliminated (byte*) TEXT#13 +Succesful SSA optimization Pass2SelfPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) TEXT#13 ← phi( main/(const byte*) TEXT#0 ) + (byte*) CHARGEN#11 ← phi( main/(const byte*) CHARGEN#0 ) + (byte*) PROCPORT#14 ← phi( main/(const byte*) PROCPORT#0 ) + (byte*) SCREEN#16 ← phi( main/(const byte*) SCREEN#0 ) + (byte*) SCROLL#7 ← phi( main/(const byte*) SCROLL#0 ) + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(const byte) scroll#15 ) + (byte*) BGCOL#4 ← phi( main/(const byte*) BGCOL#0 ) + (byte*) RASTER#1 ← phi( main/(const byte*) RASTER#0 ) + if(*((byte*) RASTER#1)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((byte*) RASTER#1)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((byte*) BGCOL#4) ← ++ *((byte*) BGCOL#4) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((byte*) BGCOL#4) ← -- *((byte*) BGCOL#4) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(const byte) scroll#14 ) + *((byte*) SCROLL#7) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((byte*) PROCPORT#14) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (byte*) SCREEN#16 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 40+(byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (byte*) CHARGEN#11 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((byte*) PROCPORT#14) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(byte*) TEXT#13 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((byte*) TEXT#13) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte[]) scroll_hard::line0#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$0 + (byte[]) scroll_hard::line1#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$2 + (byte[]) scroll_hard::line2#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$4 + (byte[]) scroll_hard::line3#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$6 + (byte[]) scroll_hard::line4#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$8 + (byte[]) scroll_hard::line5#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$10 + (byte[]) scroll_hard::line6#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$12 + (byte[]) scroll_hard::line7#0 ← (byte*) SCREEN#16 + (const byte) scroll_hard::$14 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +Redundant Phi (byte*) RASTER#1 (const byte*) RASTER#0 +Redundant Phi (byte*) BGCOL#4 (const byte*) BGCOL#0 +Redundant Phi (byte*) SCROLL#7 (const byte*) SCROLL#0 +Redundant Phi (byte*) SCREEN#16 (const byte*) SCREEN#0 +Redundant Phi (byte*) PROCPORT#14 (const byte*) PROCPORT#0 +Redundant Phi (byte*) CHARGEN#11 (const byte*) CHARGEN#0 +Redundant Phi (byte*) TEXT#13 (const byte*) TEXT#0 +Succesful SSA optimization Pass2RedundantPhiElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(const byte) scroll#15 ) + if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(const byte) scroll#14 ) + *((const byte*) SCROLL#0) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((const byte*) PROCPORT#0) ← (byte) 50 + (byte*~) scroll_bit::$9 ← (const byte*) SCREEN#0 + (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$9 + (byte) 40+(byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((const byte*) PROCPORT#0) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((const byte*) TEXT#0) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + (byte[]) scroll_hard::line0#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$0 + (byte[]) scroll_hard::line1#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$2 + (byte[]) scroll_hard::line2#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$4 + (byte[]) scroll_hard::line3#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$6 + (byte[]) scroll_hard::line4#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$8 + (byte[]) scroll_hard::line5#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$10 + (byte[]) scroll_hard::line6#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$12 + (byte[]) scroll_hard::line7#0 ← (const byte*) SCREEN#0 + (const byte) scroll_hard::$14 + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +Constant (const byte*) scroll_bit::$9 = SCREEN#0 +Constant (const byte[]) scroll_hard::line0#0 = SCREEN#0+scroll_hard::$0 +Constant (const byte[]) scroll_hard::line1#0 = SCREEN#0+scroll_hard::$2 +Constant (const byte[]) scroll_hard::line2#0 = SCREEN#0+scroll_hard::$4 +Constant (const byte[]) scroll_hard::line3#0 = SCREEN#0+scroll_hard::$6 +Constant (const byte[]) scroll_hard::line4#0 = SCREEN#0+scroll_hard::$8 +Constant (const byte[]) scroll_hard::line5#0 = SCREEN#0+scroll_hard::$10 +Constant (const byte[]) scroll_hard::line6#0 = SCREEN#0+scroll_hard::$12 +Constant (const byte[]) scroll_hard::line7#0 = SCREEN#0+scroll_hard::$14 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(const byte) scroll#15 ) + if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(const byte) scroll#14 ) + *((const byte*) SCROLL#0) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((const byte*) PROCPORT#0) ← (byte) 50 + (byte*) scroll_bit::sc#0 ← (const byte*) scroll_bit::$9 + (byte) 40+(byte) 39 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((const byte*) PROCPORT#0) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((const byte*) TEXT#0) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +Constant (const byte*) scroll_bit::sc#0 = scroll_bit::$9+40+39 +Succesful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(const byte) scroll#15 ) + if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(const byte) scroll#14 ) + *((const byte*) SCROLL#0) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((const byte*) PROCPORT#0) ← (byte) 50 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((const byte*) PROCPORT#0) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((const byte*) TEXT#0) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0 *idx (byte~) scroll_hard::$16 + *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0 *idx (byte~) scroll_hard::$18 + *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0 *idx (byte~) scroll_hard::$20 + *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0 *idx (byte~) scroll_hard::$22 + *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0 *idx (byte~) scroll_hard::$24 + *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0 *idx (byte~) scroll_hard::$26 + *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0 *idx (byte~) scroll_hard::$28 + *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte) 1 + (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0 *idx (byte~) scroll_hard::$30 + *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$17 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$19 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$21 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$23 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$25 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$27 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$29 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Consolidated referenced array index constant in assignment scroll_hard::$31 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Succesful SSA optimization Pass2ConstantAdditionElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(const byte) scroll#15 ) + if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(const byte) scroll#14 ) + *((const byte*) SCROLL#0) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((const byte*) PROCPORT#0) ← (byte) 50 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((const byte*) PROCPORT#0) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((const byte*) TEXT#0) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$16 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte~) scroll_hard::$16 + *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$18 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte~) scroll_hard::$18 + *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$20 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte~) scroll_hard::$20 + *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$22 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte~) scroll_hard::$22 + *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte~) scroll_hard::$24 + *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$26 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte~) scroll_hard::$26 + *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$28 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte~) scroll_hard::$28 + *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$30 ← (byte) scroll_hard::i#2 + (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte~) scroll_hard::$30 + *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Not culling empty block because it shares successor with its predecessor. (label) scroll_bit::@5 +Not aliassing across scopes: current_bit#5 scroll_bit::$1 +Not aliassing across scopes: scroll_bit::c#0 next_char::c#2 +Not aliassing across scopes: current_chargen#5 scroll_bit::$8 +Alias (byte) scroll_hard::i#2 = (byte~) scroll_hard::$16 (byte~) scroll_hard::$18 (byte~) scroll_hard::$20 (byte~) scroll_hard::$22 (byte~) scroll_hard::$24 (byte~) scroll_hard::$26 (byte~) scroll_hard::$28 (byte~) scroll_hard::$30 +Succesful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(const byte) current_bit#24 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(const byte) scroll#15 ) + if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(const byte) scroll#14 ) + *((const byte*) SCROLL#0) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(const byte) current_bit#6 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((const byte*) PROCPORT#0) ← (byte) 50 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) scroll_bit::sc#0 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(const byte) scroll_bit::r#0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(const byte) scroll_bit::b#0 scroll_bit::@5/(const byte) scroll_bit::b#1 ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((const byte*) PROCPORT#0) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((const byte*) TEXT#0) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(const byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) fillscreen::$0) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +Not aliassing across scopes: current_bit#5 scroll_bit::$1 +Not aliassing across scopes: scroll_bit::c#0 next_char::c#2 +Not aliassing across scopes: current_chargen#5 scroll_bit::$8 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Not culling empty block because it shares successor with its predecessor. (label) scroll_bit::@5 +Not aliassing across scopes: current_bit#5 scroll_bit::$1 +Not aliassing across scopes: scroll_bit::c#0 next_char::c#2 +Not aliassing across scopes: current_chargen#5 scroll_bit::$8 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Multiple usages for variable. Not optimizing sub-constant (byte) scroll_hard::i#2 +Inlining constant with var siblings (const byte) scroll_bit::r#0 +Inlining constant with var siblings (const byte) scroll_bit::r#0 +Inlining constant with var siblings (const byte) scroll_bit::b#0 +Inlining constant with different constant siblings (const byte) scroll_bit::b#0 +Inlining constant with var siblings (const byte) scroll_bit::b#1 +Inlining constant with different constant siblings (const byte) scroll_bit::b#1 +Inlining constant with var siblings (const byte*) scroll_bit::sc#0 +Inlining constant with var siblings (const byte*) scroll_bit::sc#0 +Inlining constant with var siblings (const byte) scroll_hard::i#0 +Inlining constant with var siblings (const byte) scroll_hard::i#0 +Inlining constant with var siblings (const byte*) fillscreen::cursor#0 +Inlining constant with var siblings (const byte*) fillscreen::cursor#0 +Inlining constant with var siblings (const byte) scroll#15 +Inlining constant with var siblings (const byte) scroll#15 +Inlining constant with var siblings (const byte) scroll#15 +Inlining constant with var siblings (const byte) scroll#14 +Inlining constant with var siblings (const byte) scroll#14 +Inlining constant with var siblings (const byte) scroll#14 +Inlining constant with var siblings (const byte) current_bit#24 +Inlining constant with var siblings (const byte) current_bit#24 +Inlining constant with var siblings (const byte) current_bit#24 +Inlining constant with var siblings (const byte) current_bit#24 +Inlining constant with different constant siblings (const byte) current_bit#24 +Inlining constant with var siblings (const byte) current_bit#6 +Inlining constant with var siblings (const byte) current_bit#6 +Inlining constant with var siblings (const byte) current_bit#6 +Inlining constant with var siblings (const byte) current_bit#6 +Inlining constant with different constant siblings (const byte) current_bit#6 +Constant inlined scroll_hard::$10 = (byte) 40*(byte) 5 +Constant inlined scroll_hard::$8 = (byte) 40*(byte) 4 +Constant inlined scroll#14 = (byte) 7 +Constant inlined scroll#15 = (byte) 7 +Constant inlined scroll_hard::$14 = (byte) 40*(byte) 7 +Constant inlined scroll_hard::$12 = (byte) 40*(byte) 6 +Constant inlined scroll_bit::$9 = (const byte*) SCREEN#0 +Constant inlined scroll_hard::$0 = (byte) 40*(byte) 0 +Constant inlined scroll_bit::r#0 = (byte) 0 +Constant inlined scroll_hard::$2 = (byte) 40*(byte) 1 +Constant inlined scroll_bit::b#1 = (byte) '*' +Constant inlined scroll_bit::b#0 = (byte) ' ' +Constant inlined fillscreen::$0 = (const byte*) SCREEN#0+(word) 1000 +Constant inlined scroll_hard::$4 = (byte) 40*(byte) 2 +Constant inlined fillscreen::cursor#0 = (const byte*) SCREEN#0 +Constant inlined current_bit#24 = (byte) 1 +Constant inlined scroll_hard::$6 = (byte) 40*(byte) 3 +Constant inlined scroll_bit::sc#0 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 +Constant inlined scroll_hard::i#0 = (byte) 0 +Constant inlined current_bit#6 = (byte) 128 +Succesful SSA optimization Pass2ConstantInlining +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(byte) 1 ) + (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(byte) 7 ) + if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) + if(true) goto main::@2 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 + to:scroll_soft::@2 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) + (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) + (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) + (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(byte) 7 ) + *((const byte*) SCROLL#0) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + to:scroll_soft::@1 +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 + to:scroll_bit::@4 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) + (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) 128 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) + asm { sei } + *((const byte*) PROCPORT#0) ← (byte) 50 + to:scroll_bit::@2 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + to:scroll_bit::@1 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) SCREEN#0+(byte) 40+(byte) 39 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) 0 scroll_bit::@3/(byte) scroll_bit::r#1 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) ' ' scroll_bit::@5/(byte) '*' ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 + to:scroll_bit::@6 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((const byte*) PROCPORT#0) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 + to:next_char::@2 +next_char::@1: scope:[next_char] from next_char next_char::@2 + (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) + (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((const byte*) TEXT#0) + to:next_char::@1 +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) 0 scroll_hard::@1/(byte) scroll_hard::i#1 ) + (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) SCREEN#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 + +FINAL SYMBOL TABLE +(label) @6 +(label) @begin +(label) @end +(byte*) BGCOL +(const byte*) BGCOL#0 = (word) 53280 +(byte*) CHARGEN +(const byte*) CHARGEN#0 = (word) 53248 +(byte*) PROCPORT +(const byte*) PROCPORT#0 = (byte) 1 +(byte*) RASTER +(const byte*) RASTER#0 = (word) 53266 +(byte*) SCREEN +(const byte*) SCREEN#0 = (word) 1024 +(byte*) SCROLL +(const byte*) SCROLL#0 = (word) 53270 +(byte*) TEXT +(const byte*) TEXT#0 = (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" +(byte) current_bit +(byte) current_bit#0 +(byte) current_bit#21 +(byte) current_bit#29 +(byte) current_bit#5 +(byte*) current_chargen +(byte*) current_chargen#0 +(byte*) current_chargen#18 +(byte*) current_chargen#27 +(byte*) current_chargen#5 +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) +(label) fillscreen::@1 +(label) fillscreen::@return +(byte*) fillscreen::cursor +(byte*) fillscreen::cursor#1 +(byte*) fillscreen::cursor#2 +(byte) fillscreen::fill +(const byte) fillscreen::fill#0 = (byte) 32 +(byte*) fillscreen::screen +(void()) main() +(label) main::@2 +(label) main::@3 +(label) main::@5 +(label) main::@8 +(label) main::@return +(byte()) next_char() +(label) next_char::@1 +(label) next_char::@2 +(label) next_char::@return +(byte) next_char::c +(byte) next_char::c#0 +(byte) next_char::c#1 +(byte) next_char::c#2 +(byte) next_char::return +(byte*) nxt +(byte*) nxt#0 +(byte*) nxt#15 +(byte*) nxt#18 +(byte*) nxt#31 +(byte*) nxt#37 +(byte) scroll +(byte) scroll#0 +(byte) scroll#18 +(byte) scroll#3 +(void()) scroll_bit() +(byte~) scroll_bit::$1 +(byte~) scroll_bit::$12 +(byte*~) scroll_bit::$8 +(label) scroll_bit::@1 +(label) scroll_bit::@2 +(label) scroll_bit::@3 +(label) scroll_bit::@4 +(label) scroll_bit::@5 +(label) scroll_bit::@6 +(label) scroll_bit::@7 +(label) scroll_bit::@8 +(label) scroll_bit::@return +(byte) scroll_bit::b +(byte) scroll_bit::b#2 +(byte) scroll_bit::bits +(byte) scroll_bit::bits#0 +(word) scroll_bit::c +(word) scroll_bit::c#0 +(word) scroll_bit::c#1 +(word) scroll_bit::c#2 +(word) scroll_bit::c#3 +(byte) scroll_bit::r +(byte) scroll_bit::r#1 +(byte) scroll_bit::r#2 +(byte*) scroll_bit::sc +(byte*) scroll_bit::sc#1 +(byte*) scroll_bit::sc#2 +(void()) scroll_hard() +(byte~) scroll_hard::$17 +(byte~) scroll_hard::$19 +(byte~) scroll_hard::$21 +(byte~) scroll_hard::$23 +(byte~) scroll_hard::$25 +(byte~) scroll_hard::$27 +(byte~) scroll_hard::$29 +(byte~) scroll_hard::$31 +(label) scroll_hard::@1 +(label) scroll_hard::@return +(byte) scroll_hard::i +(byte) scroll_hard::i#1 +(byte) scroll_hard::i#2 +(byte[]) scroll_hard::line0 +(const byte[]) scroll_hard::line0#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 0 +(byte[]) scroll_hard::line1 +(const byte[]) scroll_hard::line1#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 1 +(byte[]) scroll_hard::line2 +(const byte[]) scroll_hard::line2#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 2 +(byte[]) scroll_hard::line3 +(const byte[]) scroll_hard::line3#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 3 +(byte[]) scroll_hard::line4 +(const byte[]) scroll_hard::line4#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 4 +(byte[]) scroll_hard::line5 +(const byte[]) scroll_hard::line5#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 5 +(byte[]) scroll_hard::line6 +(const byte[]) scroll_hard::line6#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 6 +(byte[]) scroll_hard::line7 +(const byte[]) scroll_hard::line7#0 = (const byte*) SCREEN#0+(byte) 40*(byte) 7 +(void()) scroll_soft() +(label) scroll_soft::@1 +(label) scroll_soft::@2 +(label) scroll_soft::@return + +Block Sequence Planned @begin @6 @end main main::@2 main::@3 main::@5 main::@8 main::@return scroll_soft scroll_soft::@2 scroll_soft::@1 scroll_soft::@return scroll_bit scroll_bit::@7 scroll_bit::@4 scroll_bit::@8 scroll_bit::@1 scroll_bit::@2 scroll_bit::@5 scroll_bit::@3 scroll_bit::@6 scroll_bit::@return next_char next_char::@2 next_char::@1 next_char::@return scroll_hard scroll_hard::@1 scroll_hard::@return fillscreen fillscreen::@1 fillscreen::@return +Added new block during phi lifting main::@9(between main::@8 and main::@2) +Added new block during phi lifting scroll_soft::@4(between scroll_soft and scroll_soft::@1) +Added new block during phi lifting scroll_bit::@9(between scroll_bit::@7 and scroll_bit::@1) +Added new block during phi lifting scroll_bit::@10(between scroll_bit::@3 and scroll_bit::@2) +Added new block during phi lifting next_char::@4(between next_char and next_char::@1) +Added new block during phi lifting scroll_hard::@3(between scroll_hard::@1 and scroll_hard::@1) +Added new block during phi lifting fillscreen::@3(between fillscreen::@1 and fillscreen::@1) +Block Sequence Planned @begin @6 @end main main::@2 main::@3 main::@5 main::@8 main::@return main::@9 scroll_soft scroll_soft::@2 scroll_soft::@1 scroll_soft::@return scroll_soft::@4 scroll_bit scroll_bit::@7 scroll_bit::@4 scroll_bit::@8 scroll_bit::@1 scroll_bit::@2 scroll_bit::@5 scroll_bit::@3 scroll_bit::@6 scroll_bit::@return scroll_bit::@10 scroll_bit::@9 next_char next_char::@2 next_char::@1 next_char::@return next_char::@4 scroll_hard scroll_hard::@1 scroll_hard::@return scroll_hard::@3 fillscreen fillscreen::@1 fillscreen::@return fillscreen::@3 +CONTROL FLOW GRAPH - PHI LIFTED +@begin: scope:[] from + to:@6 +@6: scope:[] from @begin + call main param-assignment + to:@end +@end: scope:[] from @6 +main: scope:[main] from @6 + call fillscreen param-assignment + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@9 + (byte*) current_chargen#27 ← phi( main::@9/(byte*~) current_chargen#32 main/(const byte*) CHARGEN#0 ) + (byte*) nxt#31 ← phi( main::@9/(byte*~) nxt#39 main/(const byte*) TEXT#0 ) + (byte) current_bit#29 ← phi( main::@9/(byte~) current_bit#33 main/(byte) 1 ) + (byte) scroll#18 ← phi( main::@9/(byte~) scroll#23 main/(byte) 7 ) + if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@3 + *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) + call scroll_soft param-assignment + to:main::@8 +main::@8: scope:[main] from main::@5 + *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) + if(true) goto main::@9 + to:main::@return +main::@return: scope:[main] from main::@8 + return + to:@return +main::@9: scope:[main] from main::@8 + (byte~) scroll#23 ← (byte) scroll#0 + (byte~) current_bit#33 ← (byte) current_bit#0 + (byte*~) nxt#39 ← (byte*) nxt#0 + (byte*~) current_chargen#32 ← (byte*) current_chargen#0 + to:main::@2 +scroll_soft: scope:[scroll_soft] from main::@5 + (byte) scroll#3 ← -- (byte) scroll#18 + if((byte) scroll#3!=(byte) 255) goto scroll_soft::@4 + to:scroll_soft::@2 +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + call scroll_bit param-assignment + (byte~) current_bit#35 ← (byte) current_bit#21 + (byte*~) nxt#41 ← (byte*) nxt#37 + (byte*~) current_chargen#34 ← (byte*) current_chargen#18 + to:scroll_soft::@1 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft::@2 scroll_soft::@4 + (byte*) current_chargen#0 ← phi( scroll_soft::@4/(byte*~) current_chargen#33 scroll_soft::@2/(byte*~) current_chargen#34 ) + (byte*) nxt#0 ← phi( scroll_soft::@4/(byte*~) nxt#40 scroll_soft::@2/(byte*~) nxt#41 ) + (byte) current_bit#0 ← phi( scroll_soft::@4/(byte~) current_bit#34 scroll_soft::@2/(byte~) current_bit#35 ) + (byte) scroll#0 ← phi( scroll_soft::@4/(byte~) scroll#24 scroll_soft::@2/(byte) 7 ) + *((const byte*) SCROLL#0) ← (byte) scroll#0 + to:scroll_soft::@return +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + return + to:@return +scroll_soft::@4: scope:[scroll_soft] from scroll_soft + (byte~) scroll#24 ← (byte) scroll#3 + (byte~) current_bit#34 ← (byte) current_bit#29 + (byte*~) nxt#40 ← (byte*) nxt#31 + (byte*~) current_chargen#33 ← (byte*) current_chargen#27 + to:scroll_soft::@1 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + call scroll_hard param-assignment + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 + (byte) current_bit#5 ← (byte~) scroll_bit::$1 + if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@9 + to:scroll_bit::@4 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + call next_char param-assignment + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + (word) scroll_bit::c#0 ← (byte) next_char::c#2 + (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 + (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 + (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 + (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 + (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 + (byte*~) current_chargen#36 ← (byte*) current_chargen#5 + (byte*~) nxt#43 ← (byte*) nxt#15 + to:scroll_bit::@1 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@8 scroll_bit::@9 + (byte*) nxt#37 ← phi( scroll_bit::@9/(byte*~) nxt#42 scroll_bit::@8/(byte*~) nxt#43 ) + (byte) current_bit#21 ← phi( scroll_bit::@9/(byte~) current_bit#36 scroll_bit::@8/(byte) 128 ) + (byte*) current_chargen#18 ← phi( scroll_bit::@9/(byte*~) current_chargen#35 scroll_bit::@8/(byte*~) current_chargen#36 ) + asm { sei } + *((const byte*) PROCPORT#0) ← (byte) 50 + to:scroll_bit::@2 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@10 + (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) SCREEN#0+(byte) 40+(byte) 39 scroll_bit::@10/(byte*~) scroll_bit::sc#5 ) + (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) 0 scroll_bit::@10/(byte~) scroll_bit::r#5 ) + (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 + (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 + if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 + to:scroll_bit::@5 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) ' ' scroll_bit::@5/(byte) '*' ) + *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 + (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 + (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 + if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@10 + to:scroll_bit::@6 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + *((const byte*) PROCPORT#0) ← (byte) 55 + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + return + to:@return +scroll_bit::@10: scope:[scroll_bit] from scroll_bit::@3 + (byte~) scroll_bit::r#5 ← (byte) scroll_bit::r#1 + (byte*~) scroll_bit::sc#5 ← (byte*) scroll_bit::sc#1 + to:scroll_bit::@2 +scroll_bit::@9: scope:[scroll_bit] from scroll_bit::@7 + (byte*~) current_chargen#35 ← (byte*) current_chargen#27 + (byte~) current_bit#36 ← (byte) current_bit#5 + (byte*~) nxt#42 ← (byte*) nxt#31 + to:scroll_bit::@1 +next_char: scope:[next_char] from scroll_bit::@4 + (byte) next_char::c#0 ← *((byte*) nxt#31) + if((byte) next_char::c#0!=(byte) '@') goto next_char::@4 + to:next_char::@2 +next_char::@2: scope:[next_char] from next_char + (byte) next_char::c#1 ← *((const byte*) TEXT#0) + (byte~) next_char::c#4 ← (byte) next_char::c#1 + to:next_char::@1 +next_char::@1: scope:[next_char] from next_char::@2 next_char::@4 + (byte) next_char::c#2 ← phi( next_char::@4/(byte~) next_char::c#3 next_char::@2/(byte~) next_char::c#4 ) + (byte*) nxt#18 ← phi( next_char::@4/(byte*~) nxt#44 next_char::@2/(const byte*) TEXT#0 ) + (byte*) nxt#15 ← ++ (byte*) nxt#18 + to:next_char::@return +next_char::@return: scope:[next_char] from next_char::@1 + return + to:@return +next_char::@4: scope:[next_char] from next_char + (byte*~) nxt#44 ← (byte*) nxt#31 + (byte~) next_char::c#3 ← (byte) next_char::c#0 + to:next_char::@1 +scroll_hard: scope:[scroll_hard] from scroll_bit + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@3 + (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) 0 scroll_hard::@3/(byte~) scroll_hard::i#3 ) + (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 + (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 + (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 + (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 + (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 + (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 + (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 + (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 + *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 + (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 + if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@3 + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + return + to:@return +scroll_hard::@3: scope:[scroll_hard] from scroll_hard::@1 + (byte~) scroll_hard::i#3 ← (byte) scroll_hard::i#1 + to:scroll_hard::@1 +fillscreen: scope:[fillscreen] from main + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@3 + (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) SCREEN#0 fillscreen::@3/(byte*~) fillscreen::cursor#3 ) + *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 + (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 + if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@3 + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + return + to:@return +fillscreen::@3: scope:[fillscreen] from fillscreen::@1 + (byte*~) fillscreen::cursor#3 ← (byte*) fillscreen::cursor#1 + to:fillscreen::@1 + +Adding NOP phi() at start of main +Adding NOP phi() at start of scroll_bit +Adding NOP phi() at start of scroll_hard +Adding NOP phi() at start of fillscreen +CALL GRAPH +Calls in [] to main:0 +Calls in [main] to fillscreen:2 scroll_soft:7 +Calls in [scroll_soft] to scroll_bit:17 +Calls in [scroll_bit] to scroll_hard:29 next_char:33 + +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +CONTROL FLOW GRAPH - LIVE RANGES FOUND +@begin: scope:[] from + to:@6 +@6: scope:[] from @begin + [0] call main param-assignment [ ] + to:@end +@end: scope:[] from @6 +main: scope:[main] from @6 + [1] phi() [ ] + [2] call fillscreen param-assignment [ ] + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@9 + [3] (byte*) current_chargen#27 ← phi( main::@9/(byte*~) current_chargen#32 main/(const byte*) CHARGEN#0 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [3] (byte*) nxt#31 ← phi( main::@9/(byte*~) nxt#39 main/(const byte*) TEXT#0 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [3] (byte) current_bit#29 ← phi( main::@9/(byte~) current_bit#33 main/(byte) 1 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [3] (byte) scroll#18 ← phi( main::@9/(byte~) scroll#23 main/(byte) 7 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + to:main::@5 +main::@5: scope:[main] from main::@3 + [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:main::@8 +main::@8: scope:[main] from main::@5 + [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [9] if(true) goto main::@9 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:main::@return +main::@return: scope:[main] from main::@8 + [10] return [ ] + to:@return +main::@9: scope:[main] from main::@8 + [11] (byte~) scroll#23 ← (byte) scroll#0 [ scroll#23 current_bit#0 nxt#0 current_chargen#0 ] + [12] (byte~) current_bit#33 ← (byte) current_bit#0 [ scroll#23 current_bit#33 nxt#0 current_chargen#0 ] + [13] (byte*~) nxt#39 ← (byte*) nxt#0 [ scroll#23 current_bit#33 nxt#39 current_chargen#0 ] + [14] (byte*~) current_chargen#32 ← (byte*) current_chargen#0 [ scroll#23 current_bit#33 nxt#39 current_chargen#32 ] + to:main::@2 +scroll_soft: scope:[scroll_soft] from main::@5 + [15] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] + [16] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@4 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] + to:scroll_soft::@2 +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + [17] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] + [18] (byte~) current_bit#35 ← (byte) current_bit#21 [ current_bit#35 nxt#37 current_chargen#18 ] + [19] (byte*~) nxt#41 ← (byte*) nxt#37 [ current_bit#35 nxt#41 current_chargen#18 ] + [20] (byte*~) current_chargen#34 ← (byte*) current_chargen#18 [ current_bit#35 nxt#41 current_chargen#34 ] + to:scroll_soft::@1 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft::@2 scroll_soft::@4 + [21] (byte*) current_chargen#0 ← phi( scroll_soft::@4/(byte*~) current_chargen#33 scroll_soft::@2/(byte*~) current_chargen#34 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [21] (byte*) nxt#0 ← phi( scroll_soft::@4/(byte*~) nxt#40 scroll_soft::@2/(byte*~) nxt#41 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [21] (byte) current_bit#0 ← phi( scroll_soft::@4/(byte~) current_bit#34 scroll_soft::@2/(byte~) current_bit#35 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [21] (byte) scroll#0 ← phi( scroll_soft::@4/(byte~) scroll#24 scroll_soft::@2/(byte) 7 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [22] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:scroll_soft::@return +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + [23] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:@return +scroll_soft::@4: scope:[scroll_soft] from scroll_soft + [24] (byte~) scroll#24 ← (byte) scroll#3 [ current_bit#29 nxt#31 current_chargen#27 scroll#24 ] + [25] (byte~) current_bit#34 ← (byte) current_bit#29 [ nxt#31 current_chargen#27 scroll#24 current_bit#34 ] + [26] (byte*~) nxt#40 ← (byte*) nxt#31 [ current_chargen#27 scroll#24 current_bit#34 nxt#40 ] + [27] (byte*~) current_chargen#33 ← (byte*) current_chargen#27 [ scroll#24 current_bit#34 nxt#40 current_chargen#33 ] + to:scroll_soft::@1 +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + [28] phi() [ current_bit#29 nxt#31 current_chargen#27 ] + [29] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + [30] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] + [31] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] + [32] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@9 [ nxt#31 current_chargen#27 current_bit#5 ] + to:scroll_bit::@4 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + [33] call next_char param-assignment [ next_char::c#2 nxt#15 ] + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + [34] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] + [35] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] + [36] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] + [37] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] + [38] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] + [39] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] + [40] (byte*~) current_chargen#36 ← (byte*) current_chargen#5 [ current_chargen#36 nxt#15 ] + [41] (byte*~) nxt#43 ← (byte*) nxt#15 [ current_chargen#36 nxt#43 ] + to:scroll_bit::@1 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@8 scroll_bit::@9 + [42] (byte*) nxt#37 ← phi( scroll_bit::@9/(byte*~) nxt#42 scroll_bit::@8/(byte*~) nxt#43 ) [ current_bit#21 nxt#37 current_chargen#18 ] + [42] (byte) current_bit#21 ← phi( scroll_bit::@9/(byte~) current_bit#36 scroll_bit::@8/(byte) 128 ) [ current_bit#21 nxt#37 current_chargen#18 ] + [42] (byte*) current_chargen#18 ← phi( scroll_bit::@9/(byte*~) current_chargen#35 scroll_bit::@8/(byte*~) current_chargen#36 ) [ current_bit#21 nxt#37 current_chargen#18 ] + asm { sei } + [44] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] + to:scroll_bit::@2 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@10 + [45] (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) SCREEN#0+(byte) 40+(byte) 39 scroll_bit::@10/(byte*~) scroll_bit::sc#5 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + [45] (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) 0 scroll_bit::@10/(byte~) scroll_bit::r#5 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + [46] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] + [47] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] + [48] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + to:scroll_bit::@5 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + [49] (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) ' ' scroll_bit::@5/(byte) '*' ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::b#2 ] + [50] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + [51] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] + [52] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::sc#1 scroll_bit::r#1 ] + [53] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@10 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::sc#1 scroll_bit::r#1 ] + to:scroll_bit::@6 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + [54] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + [56] return [ current_bit#21 nxt#37 current_chargen#18 ] + to:@return +scroll_bit::@10: scope:[scroll_bit] from scroll_bit::@3 + [57] (byte~) scroll_bit::r#5 ← (byte) scroll_bit::r#1 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#5 scroll_bit::sc#1 ] + [58] (byte*~) scroll_bit::sc#5 ← (byte*) scroll_bit::sc#1 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#5 scroll_bit::sc#5 ] + to:scroll_bit::@2 +scroll_bit::@9: scope:[scroll_bit] from scroll_bit::@7 + [59] (byte*~) current_chargen#35 ← (byte*) current_chargen#27 [ nxt#31 current_bit#5 current_chargen#35 ] + [60] (byte~) current_bit#36 ← (byte) current_bit#5 [ nxt#31 current_chargen#35 current_bit#36 ] + [61] (byte*~) nxt#42 ← (byte*) nxt#31 [ current_chargen#35 current_bit#36 nxt#42 ] + to:scroll_bit::@1 +next_char: scope:[next_char] from scroll_bit::@4 + [62] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] + [63] if((byte) next_char::c#0!=(byte) '@') goto next_char::@4 [ nxt#31 next_char::c#0 ] + to:next_char::@2 +next_char::@2: scope:[next_char] from next_char + [64] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] + [65] (byte~) next_char::c#4 ← (byte) next_char::c#1 [ next_char::c#4 ] + to:next_char::@1 +next_char::@1: scope:[next_char] from next_char::@2 next_char::@4 + [66] (byte) next_char::c#2 ← phi( next_char::@4/(byte~) next_char::c#3 next_char::@2/(byte~) next_char::c#4 ) [ next_char::c#2 nxt#18 ] + [66] (byte*) nxt#18 ← phi( next_char::@4/(byte*~) nxt#44 next_char::@2/(const byte*) TEXT#0 ) [ next_char::c#2 nxt#18 ] + [67] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] + to:next_char::@return +next_char::@return: scope:[next_char] from next_char::@1 + [68] return [ next_char::c#2 nxt#15 ] + to:@return +next_char::@4: scope:[next_char] from next_char + [69] (byte*~) nxt#44 ← (byte*) nxt#31 [ next_char::c#0 nxt#44 ] + [70] (byte~) next_char::c#3 ← (byte) next_char::c#0 [ nxt#44 next_char::c#3 ] + to:next_char::@1 +scroll_hard: scope:[scroll_hard] from scroll_bit + [71] phi() [ ] + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@3 + [72] (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) 0 scroll_hard::@3/(byte~) scroll_hard::i#3 ) [ scroll_hard::i#2 ] + [73] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] + [74] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] + [75] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] + [76] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] + [77] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] + [78] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] + [79] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] + [80] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] + [81] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] + [82] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] + [83] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] + [84] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] + [85] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] + [86] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] + [87] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] + [88] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] + [89] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] + [90] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@3 [ scroll_hard::i#1 ] + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + [91] return [ ] + to:@return +scroll_hard::@3: scope:[scroll_hard] from scroll_hard::@1 + [92] (byte~) scroll_hard::i#3 ← (byte) scroll_hard::i#1 [ scroll_hard::i#3 ] + to:scroll_hard::@1 +fillscreen: scope:[fillscreen] from main + [93] phi() [ ] + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@3 + [94] (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) SCREEN#0 fillscreen::@3/(byte*~) fillscreen::cursor#3 ) [ fillscreen::cursor#2 ] + [95] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] + [96] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] + [97] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@3 [ fillscreen::cursor#1 ] + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + [98] return [ ] + to:@return +fillscreen::@3: scope:[fillscreen] from fillscreen::@1 + [99] (byte*~) fillscreen::cursor#3 ← (byte*) fillscreen::cursor#1 [ fillscreen::cursor#3 ] + to:fillscreen::@1 + +Created 18 initial phi equivalence classes +Coalesced [11] scroll#23 ← scroll#0 +Coalesced [12] current_bit#33 ← current_bit#0 +Coalesced [13] nxt#39 ← nxt#0 +Coalesced [14] current_chargen#32 ← current_chargen#0 +Coalesced [18] current_bit#35 ← current_bit#21 +Coalesced [19] nxt#41 ← nxt#37 +Coalesced [20] current_chargen#34 ← current_chargen#18 +Coalesced [24] scroll#24 ← scroll#3 +Coalesced (already) [25] current_bit#34 ← current_bit#29 +Coalesced (already) [26] nxt#40 ← nxt#31 +Coalesced (already) [27] current_chargen#33 ← current_chargen#27 +Coalesced [40] current_chargen#36 ← current_chargen#5 +Coalesced [41] nxt#43 ← nxt#15 +Coalesced [57] scroll_bit::r#5 ← scroll_bit::r#1 +Coalesced [58] scroll_bit::sc#5 ← scroll_bit::sc#1 +Coalesced (already) [59] current_chargen#35 ← current_chargen#27 +Coalesced [60] current_bit#36 ← current_bit#5 +Coalesced (already) [61] nxt#42 ← nxt#31 +Coalesced [65] next_char::c#4 ← next_char::c#1 +Coalesced [69] nxt#44 ← nxt#31 +Coalesced [70] next_char::c#3 ← next_char::c#0 +Coalesced [92] scroll_hard::i#3 ← scroll_hard::i#1 +Coalesced [99] fillscreen::cursor#3 ← fillscreen::cursor#1 +Coalesced down to 10 phi equivalence classes +Culled Empty Block (label) main::@9 +Culled Empty Block (label) scroll_soft::@4 +Not culling empty block because it shares successor with its predecessor. (label) scroll_bit::@5 +Culled Empty Block (label) scroll_bit::@10 +Culled Empty Block (label) scroll_bit::@9 +Culled Empty Block (label) next_char::@4 +Culled Empty Block (label) scroll_hard::@3 +Culled Empty Block (label) fillscreen::@3 +Block Sequence Planned @begin @6 @end main main::@2 main::@3 main::@5 main::@8 main::@return scroll_soft scroll_soft::@2 scroll_soft::@1 scroll_soft::@return scroll_bit scroll_bit::@7 scroll_bit::@4 scroll_bit::@8 scroll_bit::@1 scroll_bit::@2 scroll_bit::@5 scroll_bit::@3 scroll_bit::@6 scroll_bit::@return next_char next_char::@2 next_char::@1 next_char::@return scroll_hard scroll_hard::@1 scroll_hard::@return fillscreen fillscreen::@1 fillscreen::@return +Adding NOP phi() at start of main +Adding NOP phi() at start of scroll_bit +Adding NOP phi() at start of scroll_hard +Adding NOP phi() at start of fillscreen +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +CONTROL FLOW GRAPH - BEFORE EFFECTIVE LIVE RANGES +@begin: scope:[] from + to:@6 +@6: scope:[] from @begin + [0] call main param-assignment [ ] + to:@end +@end: scope:[] from @6 +main: scope:[main] from @6 + [1] phi() [ ] + [2] call fillscreen param-assignment [ ] + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + [3] (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [3] (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [3] (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(byte) 1 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [3] (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(byte) 7 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + to:main::@5 +main::@5: scope:[main] from main::@3 + [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] + [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:main::@8 +main::@8: scope:[main] from main::@5 + [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:main::@return +main::@return: scope:[main] from main::@8 + [10] return [ ] + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] + [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] + to:scroll_soft::@2 +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] + to:scroll_soft::@1 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + [14] (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [14] (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [14] (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [14] (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(byte) 7 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:scroll_soft::@return +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + [17] phi() [ current_bit#29 nxt#31 current_chargen#27 ] + [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] + [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] + [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] + to:scroll_bit::@4 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] + [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] + [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] + [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] + [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] + [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] + to:scroll_bit::@1 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + [29] (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) [ current_bit#21 nxt#37 current_chargen#18 ] + [29] (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) 128 ) [ current_bit#21 nxt#37 current_chargen#18 ] + [29] (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) [ current_bit#21 nxt#37 current_chargen#18 ] + asm { sei } + [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] + to:scroll_bit::@2 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + [32] (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) SCREEN#0+(byte) 40+(byte) 39 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + [32] (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) 0 scroll_bit::@3/(byte) scroll_bit::r#1 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] + [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] + [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + to:scroll_bit::@5 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + [36] (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) ' ' scroll_bit::@5/(byte) '*' ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::b#2 ] + [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] + [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] + [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] + [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] + to:scroll_bit::@6 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + [43] return [ current_bit#21 nxt#37 current_chargen#18 ] + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] + [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] + to:next_char::@2 +next_char::@2: scope:[next_char] from next_char + [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] + to:next_char::@1 +next_char::@1: scope:[next_char] from next_char next_char::@2 + [47] (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) [ next_char::c#2 nxt#18 ] + [47] (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) [ next_char::c#2 nxt#18 ] + [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] + to:next_char::@return +next_char::@return: scope:[next_char] from next_char::@1 + [49] return [ next_char::c#2 nxt#15 ] + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + [50] phi() [ ] + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + [51] (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) 0 scroll_hard::@1/(byte) scroll_hard::i#1 ) [ scroll_hard::i#2 ] + [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] + [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] + [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] + [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] + [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] + [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] + [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] + [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] + [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] + [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] + [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] + [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] + [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] + [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] + [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] + [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] + [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] + [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + [70] return [ ] + to:@return +fillscreen: scope:[fillscreen] from main + [71] phi() [ ] + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + [72] (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) SCREEN#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) [ fillscreen::cursor#2 ] + [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] + [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] + [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + [76] return [ ] + to:@return + +CONTROL FLOW GRAPH - PHI MEM COALESCED +@begin: scope:[] from + to:@6 +@6: scope:[] from @begin + [0] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @6 +main: scope:[main] from @6 + [1] phi() [ ] ( main:0 [ ] ) + [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@8 + [3] (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#0 main/(const byte*) CHARGEN#0 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) + [3] (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#0 main/(const byte*) TEXT#0 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) + [3] (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#0 main/(byte) 1 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) + [3] (byte) scroll#18 ← phi( main::@8/(byte) scroll#0 main/(byte) 7 ) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) + [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) + to:main::@3 +main::@3: scope:[main] from main::@2 main::@3 + [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) + to:main::@5 +main::@5: scope:[main] from main::@3 + [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) + [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + to:main::@8 +main::@8: scope:[main] from main::@5 + [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + to:main::@return +main::@return: scope:[main] from main::@8 + [10] return [ ] ( main:0 [ ] ) + to:@return +scroll_soft: scope:[scroll_soft] from main::@5 + [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) + [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) + to:scroll_soft::@2 +scroll_soft::@2: scope:[scroll_soft] from scroll_soft + [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + to:scroll_soft::@1 +scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 + [14] (byte*) current_chargen#0 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#18 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + [14] (byte*) nxt#0 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#37 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + [14] (byte) current_bit#0 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + [14] (byte) scroll#0 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(byte) 7 ) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + to:scroll_soft::@return +scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 + [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + to:@return +scroll_bit: scope:[scroll_bit] from scroll_soft::@2 + [17] phi() [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + to:scroll_bit::@7 +scroll_bit::@7: scope:[scroll_bit] from scroll_bit + [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) + [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) + [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) + to:scroll_bit::@4 +scroll_bit::@4: scope:[scroll_bit] from scroll_bit::@7 + [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + to:scroll_bit::@8 +scroll_bit::@8: scope:[scroll_bit] from scroll_bit::@4 + [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) + [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) + [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) + [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) + [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) + [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + to:scroll_bit::@1 +scroll_bit::@1: scope:[scroll_bit] from scroll_bit::@7 scroll_bit::@8 + [29] (byte*) nxt#37 ← phi( scroll_bit::@7/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#15 ) [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + [29] (byte) current_bit#21 ← phi( scroll_bit::@7/(byte) current_bit#5 scroll_bit::@8/(byte) 128 ) [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + [29] (byte*) current_chargen#18 ← phi( scroll_bit::@7/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 ) [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + asm { sei } + [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + to:scroll_bit::@2 +scroll_bit::@2: scope:[scroll_bit] from scroll_bit::@1 scroll_bit::@3 + [32] (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@1/(const byte*) SCREEN#0+(byte) 40+(byte) 39 scroll_bit::@3/(byte*) scroll_bit::sc#1 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + [32] (byte) scroll_bit::r#2 ← phi( scroll_bit::@1/(byte) 0 scroll_bit::@3/(byte) scroll_bit::r#1 ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) + [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) + [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + to:scroll_bit::@5 +scroll_bit::@5: scope:[scroll_bit] from scroll_bit::@2 + to:scroll_bit::@3 +scroll_bit::@3: scope:[scroll_bit] from scroll_bit::@2 scroll_bit::@5 + [36] (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) ' ' scroll_bit::@5/(byte) '*' ) [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::b#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::b#2 ] ) + [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) + [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) + [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) + [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) + to:scroll_bit::@6 +scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@3 + [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + asm { cli } + to:scroll_bit::@return +scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 + [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + to:@return +next_char: scope:[next_char] from scroll_bit::@4 + [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) + [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) + to:next_char::@2 +next_char::@2: scope:[next_char] from next_char + [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) + to:next_char::@1 +next_char::@1: scope:[next_char] from next_char next_char::@2 + [47] (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 ) [ next_char::c#2 nxt#18 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#18 ] ) + [47] (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 ) [ next_char::c#2 nxt#18 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#18 ] ) + [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + to:next_char::@return +next_char::@return: scope:[next_char] from next_char::@1 + [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + to:@return +scroll_hard: scope:[scroll_hard] from scroll_bit + [50] phi() [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + to:scroll_hard::@1 +scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1 + [51] (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) 0 scroll_hard::@1/(byte) scroll_hard::i#1 ) [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) + [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) + [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) + [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) + [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) + [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) + [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) + [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) + [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) + [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) + [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) + to:scroll_hard::@return +scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 + [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + to:@return +fillscreen: scope:[fillscreen] from main + [71] phi() [ ] ( main:0::fillscreen:2 [ ] ) + to:fillscreen::@1 +fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1 + [72] (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) SCREEN#0 fillscreen::@1/(byte*) fillscreen::cursor#1 ) [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) + [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) + [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) + [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) + to:fillscreen::@return +fillscreen::@return: scope:[fillscreen] from fillscreen::@1 + [76] return [ ] ( main:0::fillscreen:2 [ ] ) + to:@return + +DOMINATORS +@begin dominated by @begin +@6 dominated by @6 @begin +@end dominated by @6 @begin @end +main dominated by @6 @begin main +main::@2 dominated by @6 @begin main::@2 main +main::@3 dominated by @6 @begin main::@2 main::@3 main +main::@5 dominated by @6 @begin main::@2 main::@3 main::@5 main +main::@8 dominated by @6 @begin main::@2 main::@3 main::@5 main::@8 main +main::@return dominated by @6 @begin main::@2 main::@3 main::@5 main::@8 main main::@return +scroll_soft dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 main +scroll_soft::@2 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 main +scroll_soft::@1 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@1 main +scroll_soft::@return dominated by @6 @begin scroll_soft main::@2 scroll_soft::@return main::@3 main::@5 scroll_soft::@1 main +scroll_bit dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit main +scroll_bit::@7 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit main scroll_bit::@7 +scroll_bit::@4 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@4 main scroll_bit::@7 +scroll_bit::@8 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@4 main scroll_bit::@8 scroll_bit::@7 +scroll_bit::@1 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@1 main scroll_bit::@7 +scroll_bit::@2 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@1 scroll_bit::@2 main scroll_bit::@7 +scroll_bit::@5 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@1 main scroll_bit::@2 scroll_bit::@7 scroll_bit::@5 +scroll_bit::@3 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@3 scroll_bit::@1 main scroll_bit::@2 scroll_bit::@7 +scroll_bit::@6 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@3 scroll_bit::@1 main scroll_bit::@2 scroll_bit::@7 scroll_bit::@6 +scroll_bit::@return dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@3 scroll_bit::@1 main scroll_bit::@2 scroll_bit::@7 scroll_bit::@6 scroll_bit::@return +next_char dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_bit::@4 main scroll_bit::@7 next_char +next_char::@2 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit next_char::@2 scroll_bit::@4 main scroll_bit::@7 next_char +next_char::@1 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit next_char::@1 scroll_bit::@4 main scroll_bit::@7 next_char +next_char::@return dominated by next_char::@return @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit next_char::@1 scroll_bit::@4 main scroll_bit::@7 next_char +scroll_hard dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_hard main +scroll_hard::@1 dominated by @6 @begin scroll_soft main::@2 main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_hard scroll_hard::@1 main +scroll_hard::@return dominated by @6 @begin scroll_soft main::@2 scroll_hard::@return main::@3 main::@5 scroll_soft::@2 scroll_bit scroll_hard scroll_hard::@1 main +fillscreen dominated by @6 @begin fillscreen main +fillscreen::@1 dominated by @6 @begin fillscreen fillscreen::@1 main +fillscreen::@return dominated by @6 @begin fillscreen::@return fillscreen fillscreen::@1 main + +Found back edge: Loop head: main::@2 tails: main::@2 blocks: null +Found back edge: Loop head: main::@3 tails: main::@3 blocks: null +Found back edge: Loop head: main::@2 tails: main::@8 blocks: null +Found back edge: Loop head: scroll_bit::@2 tails: scroll_bit::@3 blocks: null +Found back edge: Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: null +Found back edge: Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: null +Populated: Loop head: main::@2 tails: main::@2 blocks: main::@2 +Populated: Loop head: main::@3 tails: main::@3 blocks: main::@3 +Populated: Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@5 main::@3 main::@2 +Populated: Loop head: scroll_bit::@2 tails: scroll_bit::@3 blocks: scroll_bit::@3 scroll_bit::@2 scroll_bit::@5 +Populated: Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: scroll_hard::@1 +Populated: Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 +NATURAL LOOPS +Loop head: main::@2 tails: main::@2 blocks: main::@2 +Loop head: main::@3 tails: main::@3 blocks: main::@3 +Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@5 main::@3 main::@2 +Loop head: scroll_bit::@2 tails: scroll_bit::@3 blocks: scroll_bit::@3 scroll_bit::@2 scroll_bit::@5 +Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: scroll_hard::@1 +Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 + +Found 0 loops in scope [] +Found 3 loops in scope [main] + Loop head: main::@2 tails: main::@2 blocks: main::@2 + Loop head: main::@3 tails: main::@3 blocks: main::@3 + Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@5 main::@3 main::@2 +Found 1 loops in scope [fillscreen] + Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 +Found 0 loops in scope [scroll_soft] +Found 1 loops in scope [scroll_bit] + Loop head: scroll_bit::@2 tails: scroll_bit::@3 blocks: scroll_bit::@3 scroll_bit::@2 scroll_bit::@5 +Found 1 loops in scope [scroll_hard] + Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: scroll_hard::@1 +Found 0 loops in scope [next_char] +NATURAL LOOPS WITH DEPTH +Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 +Loop head: main::@3 tails: main::@3 blocks: main::@3 depth: 2 +Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@5 main::@3 main::@2 depth: 1 +Loop head: scroll_bit::@2 tails: scroll_bit::@3 blocks: scroll_bit::@3 scroll_bit::@2 scroll_bit::@5 depth: 1 +Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: scroll_hard::@1 depth: 1 +Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 depth: 1 + + +VARIABLE REGISTER WEIGHTS +(byte*) BGCOL +(byte*) CHARGEN +(byte*) PROCPORT +(byte*) RASTER +(byte*) SCREEN +(byte*) SCROLL +(byte*) TEXT +(byte) current_bit +(byte) current_bit#0 2.5 +(byte) current_bit#21 0.9375 +(byte) current_bit#29 1.875 +(byte) current_bit#5 3.0 +(byte*) current_chargen +(byte*) current_chargen#0 2.5 +(byte*) current_chargen#18 1.0625 +(byte*) current_chargen#27 1.3636363636363638 +(byte*) current_chargen#5 4.0 +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) +(byte*) fillscreen::cursor +(byte*) fillscreen::cursor#1 16.5 +(byte*) fillscreen::cursor#2 16.5 +(byte) fillscreen::fill +(byte*) fillscreen::screen +(void()) main() +(byte()) next_char() +(byte) next_char::c +(byte) next_char::c#0 3.0 +(byte) next_char::c#1 4.0 +(byte) next_char::c#2 1.5 +(byte) next_char::return +(byte*) nxt +(byte*) nxt#0 2.5 +(byte*) nxt#15 0.4444444444444444 +(byte*) nxt#18 4.0 +(byte*) nxt#31 1.3076923076923075 +(byte*) nxt#37 0.375 +(byte) scroll +(byte) scroll#0 2.5 +(byte) scroll#18 3.25 +(byte) scroll#3 3.0 +(void()) scroll_bit() +(byte~) scroll_bit::$1 4.0 +(byte~) scroll_bit::$12 22.0 +(byte*~) scroll_bit::$8 4.0 +(byte) scroll_bit::b +(byte) scroll_bit::b#2 11.0 +(byte) scroll_bit::bits +(byte) scroll_bit::bits#0 22.0 +(word) scroll_bit::c +(word) scroll_bit::c#0 4.0 +(word) scroll_bit::c#1 4.0 +(word) scroll_bit::c#2 4.0 +(word) scroll_bit::c#3 4.0 +(byte) scroll_bit::r +(byte) scroll_bit::r#1 16.5 +(byte) scroll_bit::r#2 4.714285714285714 +(byte*) scroll_bit::sc +(byte*) scroll_bit::sc#1 7.333333333333333 +(byte*) scroll_bit::sc#2 5.5 +(void()) scroll_hard() +(byte~) scroll_hard::$17 22.0 +(byte~) scroll_hard::$19 22.0 +(byte~) scroll_hard::$21 22.0 +(byte~) scroll_hard::$23 22.0 +(byte~) scroll_hard::$25 22.0 +(byte~) scroll_hard::$27 22.0 +(byte~) scroll_hard::$29 22.0 +(byte~) scroll_hard::$31 22.0 +(byte) scroll_hard::i +(byte) scroll_hard::i#1 16.5 +(byte) scroll_hard::i#2 11.647058823529411 +(byte[]) scroll_hard::line0 +(byte[]) scroll_hard::line1 +(byte[]) scroll_hard::line2 +(byte[]) scroll_hard::line3 +(byte[]) scroll_hard::line4 +(byte[]) scroll_hard::line5 +(byte[]) scroll_hard::line6 +(byte[]) scroll_hard::line7 +(void()) scroll_soft() + +Initial phi equivalence classes +[ scroll#18 scroll#0 scroll#3 ] +[ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +[ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 ] +[ scroll_bit::r#2 scroll_bit::r#1 ] +[ scroll_bit::sc#2 scroll_bit::sc#1 ] +[ scroll_bit::b#2 ] +[ nxt#18 nxt#31 nxt#0 nxt#37 nxt#15 ] +[ next_char::c#2 next_char::c#0 next_char::c#1 ] +[ scroll_hard::i#2 scroll_hard::i#1 ] +[ fillscreen::cursor#2 fillscreen::cursor#1 ] +Added variable scroll_bit::$1 to zero page equivalence class [ scroll_bit::$1 ] +Added variable scroll_bit::c#0 to zero page equivalence class [ scroll_bit::c#0 ] +Added variable scroll_bit::c#1 to zero page equivalence class [ scroll_bit::c#1 ] +Added variable scroll_bit::c#2 to zero page equivalence class [ scroll_bit::c#2 ] +Added variable scroll_bit::c#3 to zero page equivalence class [ scroll_bit::c#3 ] +Added variable scroll_bit::$8 to zero page equivalence class [ scroll_bit::$8 ] +Added variable scroll_bit::bits#0 to zero page equivalence class [ scroll_bit::bits#0 ] +Added variable scroll_bit::$12 to zero page equivalence class [ scroll_bit::$12 ] +Added variable scroll_hard::$17 to zero page equivalence class [ scroll_hard::$17 ] +Added variable scroll_hard::$19 to zero page equivalence class [ scroll_hard::$19 ] +Added variable scroll_hard::$21 to zero page equivalence class [ scroll_hard::$21 ] +Added variable scroll_hard::$23 to zero page equivalence class [ scroll_hard::$23 ] +Added variable scroll_hard::$25 to zero page equivalence class [ scroll_hard::$25 ] +Added variable scroll_hard::$27 to zero page equivalence class [ scroll_hard::$27 ] +Added variable scroll_hard::$29 to zero page equivalence class [ scroll_hard::$29 ] +Added variable scroll_hard::$31 to zero page equivalence class [ scroll_hard::$31 ] +Complete equivalence classes +[ scroll#18 scroll#0 scroll#3 ] +[ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +[ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 ] +[ scroll_bit::r#2 scroll_bit::r#1 ] +[ scroll_bit::sc#2 scroll_bit::sc#1 ] +[ scroll_bit::b#2 ] +[ nxt#18 nxt#31 nxt#0 nxt#37 nxt#15 ] +[ next_char::c#2 next_char::c#0 next_char::c#1 ] +[ scroll_hard::i#2 scroll_hard::i#1 ] +[ fillscreen::cursor#2 fillscreen::cursor#1 ] +[ scroll_bit::$1 ] +[ scroll_bit::c#0 ] +[ scroll_bit::c#1 ] +[ scroll_bit::c#2 ] +[ scroll_bit::c#3 ] +[ scroll_bit::$8 ] +[ scroll_bit::bits#0 ] +[ scroll_bit::$12 ] +[ scroll_hard::$17 ] +[ scroll_hard::$19 ] +[ scroll_hard::$21 ] +[ scroll_hard::$23 ] +[ scroll_hard::$25 ] +[ scroll_hard::$27 ] +[ scroll_hard::$29 ] +[ scroll_hard::$31 ] +Allocated zp ZP_BYTE:2 [ scroll#18 scroll#0 scroll#3 ] +Allocated zp ZP_BYTE:3 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +Allocated zp ZP_PTR_BYTE:4 [ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 ] +Allocated zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] +Allocated zp ZP_PTR_BYTE:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] +Allocated zp ZP_BYTE:9 [ scroll_bit::b#2 ] +Allocated zp ZP_PTR_BYTE:10 [ nxt#18 nxt#31 nxt#0 nxt#37 nxt#15 ] +Allocated zp ZP_BYTE:12 [ next_char::c#2 next_char::c#0 next_char::c#1 ] +Allocated zp ZP_BYTE:13 [ scroll_hard::i#2 scroll_hard::i#1 ] +Allocated zp ZP_PTR_BYTE:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] +Allocated zp ZP_BYTE:16 [ scroll_bit::$1 ] +Allocated zp ZP_WORD:17 [ scroll_bit::c#0 ] +Allocated zp ZP_WORD:19 [ scroll_bit::c#1 ] +Allocated zp ZP_WORD:21 [ scroll_bit::c#2 ] +Allocated zp ZP_WORD:23 [ scroll_bit::c#3 ] +Allocated zp ZP_PTR_BYTE:25 [ scroll_bit::$8 ] +Allocated zp ZP_BYTE:27 [ scroll_bit::bits#0 ] +Allocated zp ZP_BYTE:28 [ scroll_bit::$12 ] +Allocated zp ZP_BYTE:29 [ scroll_hard::$17 ] +Allocated zp ZP_BYTE:30 [ scroll_hard::$19 ] +Allocated zp ZP_BYTE:31 [ scroll_hard::$21 ] +Allocated zp ZP_BYTE:32 [ scroll_hard::$23 ] +Allocated zp ZP_BYTE:33 [ scroll_hard::$25 ] +Allocated zp ZP_BYTE:34 [ scroll_hard::$27 ] +Allocated zp ZP_BYTE:35 [ scroll_hard::$29 ] +Allocated zp ZP_BYTE:36 [ scroll_hard::$31 ] +INITIAL ASM +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .const PROCPORT = 1 + .const CHARGEN = $d000 + .const SCREEN = $400 + .const RASTER = $d012 + .const BGCOL = $d020 + .const SCROLL = $d016 + .label scroll = 2 + .label current_bit = 3 + .label nxt = $a + .label current_chargen = 4 + TEXT: .text "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" +//SEG2 @begin +bbegin: + jmp b6 +//SEG3 @6 +b6: +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @6 to main [phi:@6->main] +main_from_b6: + jsr main + jmp bend +//SEG6 @end +bend: +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + fillscreen_from_main: + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- zpby1=coby1 + lda #7 + sta scroll + jmp b2 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + jmp b2 + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + b2_from_b8: + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + jmp b2 + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2_from_b2 + jmp b3 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + jmp b5 + //SEG25 main::@5 + b5: + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + jmp b8 + //SEG28 main::@8 + b8: + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2_from_b8 + jmp breturn + //SEG31 main::@return + breturn: + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- zpby1=_dec_zpby1 + dec scroll + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- zpby1_neq_coby1_then_la1 + lda scroll + cmp #$ff + bne b1_from_scroll_soft + jmp b2 + //SEG36 scroll_soft::@2 + b2: + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + scroll_bit_from_b2: + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + b1_from_b2: + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- zpby1=coby1 + lda #7 + sta scroll + jmp b1 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + b1_from_scroll_soft: + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + jmp b1 + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=zpby1 + lda scroll + sta SCROLL + jmp breturn + //SEG51 scroll_soft::@return + breturn: + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _1 = $10 + .label _8 = $19 + .label _12 = $1c + .label c = $11 + .label c_1 = $13 + .label c_2 = $15 + .label c_3 = $17 + .label bits = $1b + .label sc = 7 + .label r = 6 + .label b = 9 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + scroll_hard_from_scroll_bit: + jsr scroll_hard + jmp b7 + //SEG56 scroll_bit::@7 + b7: + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- zpby1=zpby2_ror_1 + lda current_bit + lsr + sta _1 + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=zpby2 + lda _1 + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + lda current_bit + bne b1_from_b7 + jmp b4 + //SEG60 scroll_bit::@4 + b4: + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + jmp b8 + //SEG62 scroll_bit::@8 + b8: + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=zpby1 + lda next_char.c + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo2_rol_1 + lda c_1 + asl + sta c + lda c_1+1 + rol + sta c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo2_rol_1 + lda c_2 + asl + sta c_1 + lda c_2+1 + rol + sta c_1+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo2_rol_1 + lda c_3 + asl + sta c_2 + lda c_3+1 + rol + sta c_2+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c_3+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) -- zpptrby1=zpptrby2 + lda _8 + sta current_chargen + lda _8+1 + sta current_chargen+1 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + b1_from_b8: + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + jmp b1 + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + b1_from_b7: + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + jmp b1 + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + b2_from_b1: + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- zpby1=coby1 + lda #0 + sta r + jmp b2 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + b2_from_b3: + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + jmp b2 + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- zpby1=zpptrby1_derefidx_zpby2 + ldy r + lda (current_chargen),y + sta bits + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- zpby1=zpby2_band_zpby3 + lda bits + and current_bit + sta _12 + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- zpby1_eq_0_then_la1 + lda _12 + beq b3_from_b2 + jmp b5 + //SEG90 scroll_bit::@5 + b5: + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + b3_from_b5: + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- zpby1=coby1 + lda #'*' + sta b + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- zpby1=coby1 + lda #' ' + sta b + jmp b3 + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=zpby1 + ldy #0 + lda b + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- zpby1=_inc_zpby1 + inc r + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- zpby1_neq_coby1_then_la1 + lda r + cmp #8 + bne b2_from_b3 + jmp b6 + //SEG100 scroll_bit::@6 + b6: + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + jmp breturn + //SEG103 scroll_bit::@return + breturn: + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + .label c = $c + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- zpby1=_deref_zpptrby1 + ldy #0 + lda (nxt),y + sta c + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- zpby1_neq_coby1_then_la1 + lda c + cmp #'@' + bne b1_from_next_char + jmp b2 + //SEG108 next_char::@2 + b2: + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- zpby1=_deref_cowo1 + lda TEXT + sta c + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + b1_from_b2: + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + jmp b1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + b1_from_next_char: + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + jmp b1 + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + jmp breturn + //SEG118 next_char::@return + breturn: + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + .label _17 = $1d + .label _19 = $1e + .label _21 = $1f + .label _23 = $20 + .label _25 = $21 + .label _27 = $22 + .label _29 = $23 + .label _31 = $24 + .label i = $d + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + b1_from_scroll_hard: + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- zpby1=coby1 + lda #0 + sta i + jmp b1 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + b1_from_b1: + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + jmp b1 + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line0+1,x + sta _17 + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _17 + ldx i + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line1+1,x + sta _19 + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _19 + ldx i + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line2+1,x + sta _21 + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _21 + ldx i + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line3+1,x + sta _23 + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _23 + ldx i + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line4+1,x + sta _25 + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _25 + ldx i + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line5+1,x + sta _27 + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _27 + ldx i + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line6+1,x + sta _29 + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _29 + ldx i + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- zpby1=cowo1_derefidx_zpby2 + ldx i + lda line7+1,x + sta _31 + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_zpby1=zpby2 + lda _31 + ldx i + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- zpby1=_inc_zpby1 + inc i + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- zpby1_neq_coby1_then_la1 + lda i + cmp #$27 + bne b1_from_b1 + jmp breturn + //SEG144 scroll_hard::@return + breturn: + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = $e + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + b1_from_fillscreen: + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + jmp b1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + b1_from_b1: + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + jmp b1 + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1_from_b1 + bne !+ + lda cursor + cmp #> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) always clobbers reg byte a +Statement [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) always clobbers reg byte a +Statement [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) always clobbers reg byte a +Statement [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) always clobbers reg byte a +Statement [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) always clobbers reg byte a +Statement [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) always clobbers reg byte a +Statement [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) always clobbers reg byte a +Statement [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] +Statement [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) always clobbers reg byte a +Statement [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] +Statement [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) always clobbers reg byte a +Statement [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) always clobbers reg byte a +Statement [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) always clobbers reg byte a reg byte y +Statement [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) always clobbers reg byte a +Statement [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) always clobbers reg byte a +Statement [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) always clobbers reg byte a +Statement [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) always clobbers reg byte a +Statement [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) always clobbers reg byte a +Statement [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) always clobbers reg byte a +Statement [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) always clobbers reg byte a +Statement [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) always clobbers reg byte a +Statement [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) always clobbers reg byte a +Statement [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) always clobbers reg byte a +Statement [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) always clobbers reg byte a reg byte y +Statement [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) always clobbers reg byte a +Statement [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) always clobbers reg byte y +Statement [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) always clobbers reg byte a +Statement [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) always clobbers reg byte a +Statement [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) always clobbers reg byte a reg byte y +Statement [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ scroll#18 scroll#0 scroll#3 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] : zp ZP_BYTE:3 , reg byte x , +Potential registers zp ZP_PTR_BYTE:4 [ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 ] : zp ZP_PTR_BYTE:4 , +Potential registers zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] : zp ZP_BYTE:6 , reg byte x , +Potential registers zp ZP_PTR_BYTE:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] : zp ZP_PTR_BYTE:7 , +Potential registers zp ZP_BYTE:9 [ scroll_bit::b#2 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_PTR_BYTE:10 [ nxt#18 nxt#31 nxt#0 nxt#37 nxt#15 ] : zp ZP_PTR_BYTE:10 , +Potential registers zp ZP_BYTE:12 [ next_char::c#2 next_char::c#0 next_char::c#1 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:13 [ scroll_hard::i#2 scroll_hard::i#1 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_PTR_BYTE:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] : zp ZP_PTR_BYTE:14 , +Potential registers zp ZP_BYTE:16 [ scroll_bit::$1 ] : zp ZP_BYTE:16 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:17 [ scroll_bit::c#0 ] : zp ZP_WORD:17 , +Potential registers zp ZP_WORD:19 [ scroll_bit::c#1 ] : zp ZP_WORD:19 , +Potential registers zp ZP_WORD:21 [ scroll_bit::c#2 ] : zp ZP_WORD:21 , +Potential registers zp ZP_WORD:23 [ scroll_bit::c#3 ] : zp ZP_WORD:23 , +Potential registers zp ZP_PTR_BYTE:25 [ scroll_bit::$8 ] : zp ZP_PTR_BYTE:25 , +Potential registers zp ZP_BYTE:27 [ scroll_bit::bits#0 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:28 [ scroll_bit::$12 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:29 [ scroll_hard::$17 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:30 [ scroll_hard::$19 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:31 [ scroll_hard::$21 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:32 [ scroll_hard::$23 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:33 [ scroll_hard::$25 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:34 [ scroll_hard::$27 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:35 [ scroll_hard::$29 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:36 [ scroll_hard::$31 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [scroll_hard] 28.15: zp ZP_BYTE:13 [ scroll_hard::i#2 scroll_hard::i#1 ] 22: zp ZP_BYTE:29 [ scroll_hard::$17 ] 22: zp ZP_BYTE:30 [ scroll_hard::$19 ] 22: zp ZP_BYTE:31 [ scroll_hard::$21 ] 22: zp ZP_BYTE:32 [ scroll_hard::$23 ] 22: zp ZP_BYTE:33 [ scroll_hard::$25 ] 22: zp ZP_BYTE:34 [ scroll_hard::$27 ] 22: zp ZP_BYTE:35 [ scroll_hard::$29 ] 22: zp ZP_BYTE:36 [ scroll_hard::$31 ] +Uplift Scope [scroll_bit] 22: zp ZP_BYTE:27 [ scroll_bit::bits#0 ] 22: zp ZP_BYTE:28 [ scroll_bit::$12 ] 21.21: zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] 12.83: zp ZP_PTR_BYTE:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] 11: zp ZP_BYTE:9 [ scroll_bit::b#2 ] 4: zp ZP_BYTE:16 [ scroll_bit::$1 ] 4: zp ZP_WORD:17 [ scroll_bit::c#0 ] 4: zp ZP_WORD:19 [ scroll_bit::c#1 ] 4: zp ZP_WORD:21 [ scroll_bit::c#2 ] 4: zp ZP_WORD:23 [ scroll_bit::c#3 ] 4: zp ZP_PTR_BYTE:25 [ scroll_bit::$8 ] +Uplift Scope [] 8.93: zp ZP_PTR_BYTE:4 [ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 ] 8.75: zp ZP_BYTE:2 [ scroll#18 scroll#0 scroll#3 ] 8.63: zp ZP_PTR_BYTE:10 [ nxt#18 nxt#31 nxt#0 nxt#37 nxt#15 ] 8.31: zp ZP_BYTE:3 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +Uplift Scope [fillscreen] 33: zp ZP_PTR_BYTE:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] +Uplift Scope [next_char] 8.5: zp ZP_BYTE:12 [ next_char::c#2 next_char::c#0 next_char::c#1 ] +Uplift Scope [main] +Uplift Scope [scroll_soft] + +Uplift attempts [scroll_hard] 10000/262144 (limiting to 10000) +Uplifting [scroll_hard] best 9555 combination reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ] reg byte a [ scroll_hard::$17 ] reg byte a [ scroll_hard::$19 ] reg byte a [ scroll_hard::$21 ] reg byte a [ scroll_hard::$23 ] reg byte a [ scroll_hard::$25 ] reg byte a [ scroll_hard::$27 ] zp ZP_BYTE:35 [ scroll_hard::$29 ] zp ZP_BYTE:36 [ scroll_hard::$31 ] +Limited combination testing to 10000 combinations of 262144 possible. +Uplifting [scroll_bit] best 9299 combination reg byte a [ scroll_bit::bits#0 ] reg byte a [ scroll_bit::$12 ] reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ] zp ZP_PTR_BYTE:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] reg byte a [ scroll_bit::b#2 ] reg byte a [ scroll_bit::$1 ] zp ZP_WORD:17 [ scroll_bit::c#0 ] zp ZP_WORD:19 [ scroll_bit::c#1 ] zp ZP_WORD:21 [ scroll_bit::c#2 ] zp ZP_WORD:23 [ scroll_bit::c#3 ] zp ZP_PTR_BYTE:25 [ scroll_bit::$8 ] +Uplifting [] best 8987 combination zp ZP_PTR_BYTE:4 [ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 ] reg byte x [ scroll#18 scroll#0 scroll#3 ] zp ZP_PTR_BYTE:10 [ nxt#18 nxt#31 nxt#0 nxt#37 nxt#15 ] zp ZP_BYTE:3 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +Uplifting [fillscreen] best 8987 combination zp ZP_PTR_BYTE:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] +Uplifting [next_char] best 8975 combination reg byte a [ next_char::c#2 next_char::c#0 next_char::c#1 ] +Uplifting [main] best 8975 combination +Uplifting [scroll_soft] best 8975 combination +Attempting to uplift remaining variables inzp ZP_BYTE:35 [ scroll_hard::$29 ] +Uplifting [scroll_hard] best 8915 combination reg byte a [ scroll_hard::$29 ] +Attempting to uplift remaining variables inzp ZP_BYTE:36 [ scroll_hard::$31 ] +Uplifting [scroll_hard] best 8855 combination reg byte a [ scroll_hard::$31 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +Uplifting [] best 8855 combination zp ZP_BYTE:3 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +Coalescing zero page register [ zp ZP_PTR_BYTE:4 [ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 ] ] with [ zp ZP_PTR_BYTE:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] ] +Coalescing zero page register [ zp ZP_PTR_BYTE:4 [ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 fillscreen::cursor#2 fillscreen::cursor#1 ] ] with [ zp ZP_PTR_BYTE:25 [ scroll_bit::$8 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ scroll_bit::c#0 ] ] with [ zp ZP_WORD:19 [ scroll_bit::c#1 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ scroll_bit::c#0 scroll_bit::c#1 ] ] with [ zp ZP_WORD:21 [ scroll_bit::c#2 ] ] +Coalescing zero page register [ zp ZP_WORD:17 [ scroll_bit::c#0 scroll_bit::c#1 scroll_bit::c#2 ] ] with [ zp ZP_WORD:23 [ scroll_bit::c#3 ] ] +Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ current_bit#29 current_bit#0 current_bit#21 current_bit#5 ] +Allocated (was zp ZP_PTR_BYTE:4) zp ZP_PTR_BYTE:3 [ current_chargen#27 current_chargen#0 current_chargen#18 current_chargen#5 fillscreen::cursor#2 fillscreen::cursor#1 scroll_bit::$8 ] +Allocated (was zp ZP_PTR_BYTE:7) zp ZP_PTR_BYTE:5 [ scroll_bit::sc#2 scroll_bit::sc#1 ] +Allocated (was zp ZP_PTR_BYTE:10) zp ZP_PTR_BYTE:7 [ nxt#18 nxt#31 nxt#0 nxt#37 nxt#15 ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:9 [ scroll_bit::c#0 scroll_bit::c#1 scroll_bit::c#2 scroll_bit::c#3 ] +Removing instruction jmp b6 +Removing instruction jmp bend +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b5 +Removing instruction jmp b8 +Removing instruction jmp breturn +Removing instruction jmp b2 +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b7 +Removing instruction jmp b4 +Removing instruction jmp b8 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b5 +Removing instruction jmp b3 +Removing instruction jmp b6 +Removing instruction jmp breturn +Removing instruction jmp b2 +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +ASSEMBLER +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .const PROCPORT = 1 + .const CHARGEN = $d000 + .const SCREEN = $400 + .const RASTER = $d012 + .const BGCOL = $d020 + .const SCROLL = $d016 + .label current_bit = 2 + .label nxt = 7 + .label current_chargen = 3 + TEXT: .text "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =- @" +//SEG2 @begin +bbegin: +//SEG3 @6 +b6: +//SEG4 [0] call main param-assignment [ ] ( ) +//SEG5 [1] phi from @6 to main [phi:@6->main] +main_from_b6: + jsr main +//SEG6 @end +bend: +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + fillscreen_from_main: + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + jmp b2 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + jmp b2 + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + b2_from_b8: + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2_from_b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + b5: + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + b8: + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2_from_b8 + //SEG31 main::@return + breturn: + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1_from_scroll_soft + //SEG36 scroll_soft::@2 + b2: + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + scroll_bit_from_b2: + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + b1_from_b2: + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + jmp b1 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + b1_from_scroll_soft: + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + breturn: + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + scroll_hard_from_scroll_bit: + jsr scroll_hard + //SEG56 scroll_bit::@7 + b7: + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + lda current_bit + bne b1_from_b7 + //SEG60 scroll_bit::@4 + b4: + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + b8: + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + b1_from_b8: + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + jmp b1 + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + b1_from_b7: + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + b2_from_b1: + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + jmp b2 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + b2_from_b3: + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + b5: + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + b3_from_b5: + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2_from_b3 + //SEG100 scroll_bit::@6 + b6: + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + breturn: + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1_from_next_char + //SEG108 next_char::@2 + b2: + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + b1_from_b2: + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + jmp b1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + b1_from_next_char: + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + breturn: + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + b1_from_scroll_hard: + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + jmp b1 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + b1_from_b1: + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1_from_b1 + //SEG144 scroll_hard::@return + breturn: + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + b1_from_fillscreen: + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + jmp b1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + b1_from_b1: + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1_from_b1 + bne !+ + lda cursor + cmp #main] +main_from_b6: + jsr main +//SEG6 @end +bend: +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + fillscreen_from_main: + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + jmp b2 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + jmp b2 + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + b2_from_b8: + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2_from_b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + b5: + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + b8: + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2_from_b8 + //SEG31 main::@return + breturn: + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1_from_scroll_soft + //SEG36 scroll_soft::@2 + b2: + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + scroll_bit_from_b2: + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + b1_from_b2: + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + jmp b1 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + b1_from_scroll_soft: + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + breturn: + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + scroll_hard_from_scroll_bit: + jsr scroll_hard + //SEG56 scroll_bit::@7 + b7: + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + bne b1_from_b7 + //SEG60 scroll_bit::@4 + b4: + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + b8: + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + b1_from_b8: + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + jmp b1 + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + b1_from_b7: + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + b2_from_b1: + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + jmp b2 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + b2_from_b3: + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + b5: + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + b3_from_b5: + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2_from_b3 + //SEG100 scroll_bit::@6 + b6: + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + breturn: + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1_from_next_char + //SEG108 next_char::@2 + b2: + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + b1_from_b2: + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + jmp b1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + b1_from_next_char: + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + breturn: + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + b1_from_scroll_hard: + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + jmp b1 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + b1_from_b1: + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1_from_b1 + //SEG144 scroll_hard::@return + breturn: + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + b1_from_fillscreen: + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + jmp b1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + b1_from_b1: + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1_from_b1 + bne !+ + lda cursor + cmp #main] + jsr main +//SEG6 @end +bend: +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + fillscreen_from_main: + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + jmp b2 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + jmp b2 + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2_from_b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + b5: + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + b8: + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2 + //SEG31 main::@return + breturn: + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1 + //SEG36 scroll_soft::@2 + b2: + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + b1_from_b2: + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + jmp b1 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + breturn: + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + scroll_hard_from_scroll_bit: + jsr scroll_hard + //SEG56 scroll_bit::@7 + b7: + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + bne b1 + //SEG60 scroll_bit::@4 + b4: + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + b8: + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + b1_from_b8: + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + jmp b1 + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + b2_from_b1: + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + jmp b2 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + b5: + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2 + //SEG100 scroll_bit::@6 + b6: + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + breturn: + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1 + //SEG108 next_char::@2 + b2: + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + b1_from_b2: + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + jmp b1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + breturn: + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + b1_from_scroll_hard: + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + jmp b1 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1 + //SEG144 scroll_hard::@return + breturn: + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + b1_from_fillscreen: + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + jmp b1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1 + bne !+ + lda cursor + cmp #main] + jsr main +//SEG6 @end +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + jmp b2 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + jmp b2 + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2_from_b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2 + //SEG31 main::@return + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1 + //SEG36 scroll_soft::@2 + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + jmp b1 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + jsr scroll_hard + //SEG56 scroll_bit::@7 + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + bne b1 + //SEG60 scroll_bit::@4 + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + jmp b1 + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + jmp b2 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2 + //SEG100 scroll_bit::@6 + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1 + //SEG108 next_char::@2 + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + jmp b1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + jmp b1 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1 + //SEG144 scroll_hard::@return + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + jmp b1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1 + bne !+ + lda cursor + cmp #main] + jsr main +//SEG6 @end +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + jmp b2 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2_from_b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2 + //SEG31 main::@return + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1 + //SEG36 scroll_soft::@2 + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + jsr scroll_hard + //SEG56 scroll_bit::@7 + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + bne b1 + //SEG60 scroll_bit::@4 + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2 + //SEG100 scroll_bit::@6 + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1 + //SEG108 next_char::@2 + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1 + //SEG144 scroll_hard::@return + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1 + bne !+ + lda cursor + cmp #main] + jsr main +//SEG6 @end +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + jmp b2 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2 + //SEG31 main::@return + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1 + //SEG36 scroll_soft::@2 + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + jsr scroll_hard + //SEG56 scroll_bit::@7 + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + bne b1 + //SEG60 scroll_bit::@4 + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2 + //SEG100 scroll_bit::@6 + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1 + //SEG108 next_char::@2 + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1 + //SEG144 scroll_hard::@return + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1 + bne !+ + lda cursor + cmp #main] + jsr main +//SEG6 @end +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2 + //SEG31 main::@return + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1 + //SEG36 scroll_soft::@2 + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + jsr scroll_hard + //SEG56 scroll_bit::@7 + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + bne b1 + //SEG60 scroll_bit::@4 + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2 + //SEG100 scroll_bit::@6 + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1 + //SEG108 next_char::@2 + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1 + //SEG144 scroll_hard::@return + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1 + bne !+ + lda cursor + cmp #main] + jsr main +//SEG6 @end +//SEG7 main +main: { + //SEG8 [2] call fillscreen param-assignment [ ] ( main:0 [ ] ) + //SEG9 [71] phi from main to fillscreen [phi:main->fillscreen] + jsr fillscreen + //SEG10 [3] phi from main to main::@2 [phi:main->main::@2] + //SEG11 [3] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- zpptrby1=cowo1 + lda #CHARGEN + sta current_chargen+1 + //SEG12 [3] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG13 [3] phi (byte) current_bit#29 = (byte) 1 [phi:main->main::@2#2] -- zpby1=coby1 + lda #1 + sta current_bit + //SEG14 [3] phi (byte) scroll#18 = (byte) 7 [phi:main->main::@2#3] -- xby=coby1 + ldx #7 + //SEG15 [3] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + //SEG16 [3] phi from main::@8 to main::@2 [phi:main::@8->main::@2] + //SEG17 [3] phi (byte*) current_chargen#27 = (byte*) current_chargen#0 [phi:main::@8->main::@2#0] -- register_copy + //SEG18 [3] phi (byte*) nxt#31 = (byte*) nxt#0 [phi:main::@8->main::@2#1] -- register_copy + //SEG19 [3] phi (byte) current_bit#29 = (byte) current_bit#0 [phi:main::@8->main::@2#2] -- register_copy + //SEG20 [3] phi (byte) scroll#18 = (byte) scroll#0 [phi:main::@8->main::@2#3] -- register_copy + //SEG21 main::@2 + b2: + //SEG22 [4] if(*((const byte*) RASTER#0)!=(byte) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$fe + bne b2 + //SEG23 main::@3 + b3: + //SEG24 [5] if(*((const byte*) RASTER#0)!=(byte) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1_neq_coby2_then_la1 + lda RASTER + cmp #$ff + bne b3 + //SEG25 main::@5 + //SEG26 [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:0 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) -- _deref_cowo1=_inc__deref_cowo1 + inc BGCOL + //SEG27 [7] call scroll_soft param-assignment [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + jsr scroll_soft + //SEG28 main::@8 + //SEG29 [8] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=_dec__deref_cowo1 + dec BGCOL + //SEG30 [9] if(true) goto main::@2 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- true_then_la1 + jmp b2 + //SEG31 main::@return + //SEG32 [10] return [ ] ( main:0 [ ] ) + rts +} +//SEG33 scroll_soft +scroll_soft: { + //SEG34 [11] (byte) scroll#3 ← -- (byte) scroll#18 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby=_dec_xby + dex + //SEG35 [12] if((byte) scroll#3!=(byte) 255) goto scroll_soft::@1 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ( main:0::scroll_soft:7 [ current_bit#29 nxt#31 current_chargen#27 scroll#3 ] ) -- xby_neq_coby1_then_la1 + cpx #$ff + bne b1 + //SEG36 scroll_soft::@2 + //SEG37 [13] call scroll_bit param-assignment [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7 [ current_bit#21 nxt#37 current_chargen#18 ] ) + //SEG38 [17] phi from scroll_soft::@2 to scroll_bit [phi:scroll_soft::@2->scroll_bit] + jsr scroll_bit + //SEG39 [14] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1] + //SEG40 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#18 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy + //SEG41 [14] phi (byte*) nxt#0 = (byte*) nxt#37 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy + //SEG42 [14] phi (byte) current_bit#0 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy + //SEG43 [14] phi (byte) scroll#0 = (byte) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- xby=coby1 + ldx #7 + //SEG44 [14] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1] + //SEG45 [14] phi (byte*) current_chargen#0 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy + //SEG46 [14] phi (byte*) nxt#0 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy + //SEG47 [14] phi (byte) current_bit#0 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy + //SEG48 [14] phi (byte) scroll#0 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy + //SEG49 scroll_soft::@1 + b1: + //SEG50 [15] *((const byte*) SCROLL#0) ← (byte) scroll#0 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) -- _deref_cowo1=xby + stx SCROLL + //SEG51 scroll_soft::@return + //SEG52 [16] return [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ( main:0::scroll_soft:7 [ scroll#0 current_bit#0 nxt#0 current_chargen#0 ] ) + rts +} +//SEG53 scroll_bit +scroll_bit: { + .label _8 = 3 + .label c = 9 + .label sc = 5 + //SEG54 [18] call scroll_hard param-assignment [ current_bit#29 nxt#31 current_chargen#27 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#29 nxt#31 current_chargen#27 ] ) + //SEG55 [50] phi from scroll_bit to scroll_hard [phi:scroll_bit->scroll_hard] + jsr scroll_hard + //SEG56 scroll_bit::@7 + //SEG57 [19] (byte~) scroll_bit::$1 ← (byte) current_bit#29 >> (byte) 1 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 scroll_bit::$1 ] ) -- aby=zpby1_ror_1 + lda current_bit + lsr + //SEG58 [20] (byte) current_bit#5 ← (byte~) scroll_bit::$1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1=aby + sta current_bit + //SEG59 [21] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 [ nxt#31 current_chargen#27 current_bit#5 ] ( main:0::scroll_soft:7::scroll_bit:13 [ nxt#31 current_chargen#27 current_bit#5 ] ) -- zpby1_neq_0_then_la1 + bne b1 + //SEG60 scroll_bit::@4 + //SEG61 [22] call next_char param-assignment [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ next_char::c#2 nxt#15 ] ) + jsr next_char + //SEG62 scroll_bit::@8 + //SEG63 [23] (word) scroll_bit::c#0 ← (byte) next_char::c#2 [ scroll_bit::c#0 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#0 nxt#15 ] ) -- zpwo1=aby + sta c + lda #0 + sta c+1 + //SEG64 [24] (word) scroll_bit::c#1 ← (word) scroll_bit::c#0 << (byte) 1 [ scroll_bit::c#1 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#1 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG65 [25] (word) scroll_bit::c#2 ← (word) scroll_bit::c#1 << (byte) 1 [ scroll_bit::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#2 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG66 [26] (word) scroll_bit::c#3 ← (word) scroll_bit::c#2 << (byte) 1 [ scroll_bit::c#3 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::c#3 nxt#15 ] ) -- zpwo1=zpwo1_rol_1 + asl c + rol c+1 + //SEG67 [27] (byte*~) scroll_bit::$8 ← (const byte*) CHARGEN#0 + (word) scroll_bit::c#3 [ scroll_bit::$8 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ scroll_bit::$8 nxt#15 ] ) -- zpptrby1=cowo1_plus_zpwo1 + lda #CHARGEN + adc c+1 + sta _8+1 + //SEG68 [28] (byte*) current_chargen#5 ← (byte*~) scroll_bit::$8 [ current_chargen#5 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_chargen#5 nxt#15 ] ) + // (byte*) current_chargen#5 = (byte*~) scroll_bit::$8 // register copy zp ZP_PTR_BYTE:3 + //SEG69 [29] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1] + //SEG70 [29] phi (byte*) nxt#37 = (byte*) nxt#15 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy + //SEG71 [29] phi (byte) current_bit#21 = (byte) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- zpby1=coby1 + lda #$80 + sta current_bit + //SEG72 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy + //SEG73 [29] phi from scroll_bit::@7 to scroll_bit::@1 [phi:scroll_bit::@7->scroll_bit::@1] + //SEG74 [29] phi (byte*) nxt#37 = (byte*) nxt#31 [phi:scroll_bit::@7->scroll_bit::@1#0] -- register_copy + //SEG75 [29] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit::@7->scroll_bit::@1#1] -- register_copy + //SEG76 [29] phi (byte*) current_chargen#18 = (byte*) current_chargen#27 [phi:scroll_bit::@7->scroll_bit::@1#2] -- register_copy + //SEG77 scroll_bit::@1 + b1: + //SEG78 asm { sei } + sei + //SEG79 [31] *((const byte*) PROCPORT#0) ← (byte) 50 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$32 + sta PROCPORT + //SEG80 [32] phi from scroll_bit::@1 to scroll_bit::@2 [phi:scroll_bit::@1->scroll_bit::@2] + //SEG81 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte) 40+(byte) 39 [phi:scroll_bit::@1->scroll_bit::@2#0] -- zpptrby1=cowo1 + lda #SCREEN+$28+$27 + sta sc+1 + //SEG82 [32] phi (byte) scroll_bit::r#2 = (byte) 0 [phi:scroll_bit::@1->scroll_bit::@2#1] -- xby=coby1 + ldx #0 + //SEG83 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2] + //SEG84 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy + //SEG85 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy + //SEG86 scroll_bit::@2 + b2: + //SEG87 [33] (byte) scroll_bit::bits#0 ← (byte*) current_chargen#18 *idx (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) -- aby=zpptrby1_derefidx_xby + stx $ff + ldy $ff + lda (current_chargen),y + //SEG88 [34] (byte~) scroll_bit::$12 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$12 ] ) -- aby=aby_band_zpby1 + and current_bit + //SEG89 [35] if((byte~) scroll_bit::$12==(byte) 0) goto scroll_bit::@3 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- aby_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + //SEG90 scroll_bit::@5 + //SEG91 [36] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3] + //SEG92 [36] phi (byte) scroll_bit::b#2 = (byte) '*' [phi:scroll_bit::@5->scroll_bit::@3#0] -- aby=coby1 + lda #'*' + jmp b3 + //SEG93 [36] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3] + b3_from_b2: + //SEG94 [36] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- aby=coby1 + lda #' ' + //SEG95 scroll_bit::@3 + b3: + //SEG96 [37] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#2 ] ) -- _deref_zpptrby1=aby + ldy #0 + sta (sc),y + //SEG97 [38] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte) 40 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#2 scroll_bit::sc#1 ] ) -- zpptrby1=zpptrby1_plus_coby1 + lda sc + clc + adc #$28 + sta sc + bcc !+ + inc sc+1 + !: + //SEG98 [39] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby=_inc_xby + inx + //SEG99 [40] if((byte) scroll_bit::r#1!=(byte) 8) goto scroll_bit::@2 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 scroll_bit::r#1 scroll_bit::sc#1 ] ) -- xby_neq_coby1_then_la1 + cpx #8 + bne b2 + //SEG100 scroll_bit::@6 + //SEG101 [41] *((const byte*) PROCPORT#0) ← (byte) 55 [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) -- _deref_cowo1=coby2 + lda #$37 + sta PROCPORT + //SEG102 asm { cli } + cli + //SEG103 scroll_bit::@return + //SEG104 [43] return [ current_bit#21 nxt#37 current_chargen#18 ] ( main:0::scroll_soft:7::scroll_bit:13 [ current_bit#21 nxt#37 current_chargen#18 ] ) + rts +} +//SEG105 next_char +next_char: { + //SEG106 [44] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby=_deref_zpptrby1 + ldy #0 + lda (nxt),y + //SEG107 [45] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 [ nxt#31 next_char::c#0 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ nxt#31 next_char::c#0 ] ) -- aby_neq_coby1_then_la1 + cmp #'@' + bne b1 + //SEG108 next_char::@2 + //SEG109 [46] (byte) next_char::c#1 ← *((const byte*) TEXT#0) [ next_char::c#1 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#1 ] ) -- aby=_deref_cowo1 + lda TEXT + //SEG110 [47] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1] + //SEG111 [47] phi (byte) next_char::c#2 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy + //SEG112 [47] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- zpptrby1=cowo1 + lda #TEXT + sta nxt+1 + //SEG113 [47] phi from next_char to next_char::@1 [phi:next_char->next_char::@1] + //SEG114 [47] phi (byte) next_char::c#2 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy + //SEG115 [47] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy + //SEG116 next_char::@1 + b1: + //SEG117 [48] (byte*) nxt#15 ← ++ (byte*) nxt#18 [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) -- zpptrby1=_inc_zpptrby1 + inc nxt + bne !+ + inc nxt+1 + !: + //SEG118 next_char::@return + //SEG119 [49] return [ next_char::c#2 nxt#15 ] ( main:0::scroll_soft:7::scroll_bit:13::next_char:22 [ next_char::c#2 nxt#15 ] ) + rts +} +//SEG120 scroll_hard +scroll_hard: { + .const line0 = SCREEN+$28*0 + .const line1 = SCREEN+$28*1 + .const line2 = SCREEN+$28*2 + .const line3 = SCREEN+$28*3 + .const line4 = SCREEN+$28*4 + .const line5 = SCREEN+$28*5 + .const line6 = SCREEN+$28*6 + .const line7 = SCREEN+$28*7 + //SEG121 [51] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1] + //SEG122 [51] phi (byte) scroll_hard::i#2 = (byte) 0 [phi:scroll_hard->scroll_hard::@1#0] -- xby=coby1 + ldx #0 + //SEG123 [51] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1] + //SEG124 [51] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy + //SEG125 scroll_hard::@1 + b1: + //SEG126 [52] (byte~) scroll_hard::$17 ← (const byte[]) scroll_hard::line0#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$17 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$17 ] ) -- aby=cowo1_derefidx_xby + lda line0+1,x + //SEG127 [53] *((const byte[]) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$17 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line0,x + //SEG128 [54] (byte~) scroll_hard::$19 ← (const byte[]) scroll_hard::line1#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$19 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$19 ] ) -- aby=cowo1_derefidx_xby + lda line1+1,x + //SEG129 [55] *((const byte[]) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$19 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line1,x + //SEG130 [56] (byte~) scroll_hard::$21 ← (const byte[]) scroll_hard::line2#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$21 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$21 ] ) -- aby=cowo1_derefidx_xby + lda line2+1,x + //SEG131 [57] *((const byte[]) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$21 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line2,x + //SEG132 [58] (byte~) scroll_hard::$23 ← (const byte[]) scroll_hard::line3#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$23 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$23 ] ) -- aby=cowo1_derefidx_xby + lda line3+1,x + //SEG133 [59] *((const byte[]) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$23 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line3,x + //SEG134 [60] (byte~) scroll_hard::$25 ← (const byte[]) scroll_hard::line4#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$25 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$25 ] ) -- aby=cowo1_derefidx_xby + lda line4+1,x + //SEG135 [61] *((const byte[]) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$25 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line4,x + //SEG136 [62] (byte~) scroll_hard::$27 ← (const byte[]) scroll_hard::line5#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$27 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$27 ] ) -- aby=cowo1_derefidx_xby + lda line5+1,x + //SEG137 [63] *((const byte[]) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$27 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line5,x + //SEG138 [64] (byte~) scroll_hard::$29 ← (const byte[]) scroll_hard::line6#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$29 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$29 ] ) -- aby=cowo1_derefidx_xby + lda line6+1,x + //SEG139 [65] *((const byte[]) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$29 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line6,x + //SEG140 [66] (byte~) scroll_hard::$31 ← (const byte[]) scroll_hard::line7#0+(byte) 1 *idx (byte) scroll_hard::i#2 [ scroll_hard::i#2 scroll_hard::$31 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 scroll_hard::$31 ] ) -- aby=cowo1_derefidx_xby + lda line7+1,x + //SEG141 [67] *((const byte[]) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← (byte~) scroll_hard::$31 [ scroll_hard::i#2 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#2 ] ) -- cowo1_derefidx_xby=aby + sta line7,x + //SEG142 [68] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby=_inc_xby + inx + //SEG143 [69] if((byte) scroll_hard::i#1!=(byte) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 scroll_hard::i#1 ] ) -- xby_neq_coby1_then_la1 + cpx #$27 + bne b1 + //SEG144 scroll_hard::@return + //SEG145 [70] return [ ] ( main:0::scroll_soft:7::scroll_bit:13::scroll_hard:18 [ current_bit#29 nxt#31 current_chargen#27 ] ) + rts +} +//SEG146 fillscreen +fillscreen: { + .const fill = $20 + .label cursor = 3 + //SEG147 [72] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1] + //SEG148 [72] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- zpptrby1=cowo1 + lda #SCREEN + sta cursor+1 + //SEG149 [72] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1] + //SEG150 [72] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy + //SEG151 fillscreen::@1 + b1: + //SEG152 [73] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:0::fillscreen:2 [ fillscreen::cursor#2 ] ) -- _deref_zpptrby1=coby1 + ldy #0 + lda #fill + sta (cursor),y + //SEG153 [74] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1=_inc_zpptrby1 + inc cursor + bne !+ + inc cursor+1 + !: + //SEG154 [75] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:0::fillscreen:2 [ fillscreen::cursor#1 ] ) -- zpptrby1_lt_cowo1_then_la1 + lda cursor+1 + cmp #>SCREEN+$3e8 + bcc b1 + bne !+ + lda cursor + cmp #>1; + if(current_bit==0) { + word c = next_char(); + c = c<<1; + c = c<<1; + c = c<<1; + current_chargen = CHARGEN+c; + current_bit = $80; + } + asm { sei } + *PROCPORT = $32; + byte* sc = SCREEN+40+39; + for(byte r:0..7) { + byte bits = current_chargen[r]; + byte b = ' '; + if((bits & current_bit) != 0) { + b = '*'; + } + *sc = b; + sc = sc+40; + } + *PROCPORT = $37; + asm { cli } +} + +byte* nxt = TEXT; +// Find the next char of the scroll text +byte next_char() { + byte c = *nxt; + if(c=='@') { + nxt = TEXT; + c = *nxt; + } + nxt++; + return c; +} + +void scroll_hard() { + // Hard scroll + byte[] line0 = SCREEN+40*0; + byte[] line1 = SCREEN+40*1; + byte[] line2 = SCREEN+40*2; + byte[] line3 = SCREEN+40*3; + byte[] line4 = SCREEN+40*4; + byte[] line5 = SCREEN+40*5; + byte[] line6 = SCREEN+40*6; + byte[] line7 = SCREEN+40*7; + for(byte i=0;i!=39;i++) { + line0[i]=line0[i+1]; + line1[i]=line1[i+1]; + line2[i]=line2[i+1]; + line3[i]=line3[i+1]; + line4[i]=line4[i+1]; + line5[i]=line5[i+1]; + line6[i]=line6[i+1]; + line7[i]=line7[i+1]; + } +} + +// Fill the screen with one char +void fillscreen(byte* screen, byte fill) { + for( byte* cursor = screen; cursor < screen+1000; cursor++) { + *cursor = fill; + } +}