diff --git a/src/main/fragment/pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_1.asm b/src/main/fragment/pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_1.asm new file mode 100644 index 000000000..e75048b8e --- /dev/null +++ b/src/main/fragment/pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_1.asm @@ -0,0 +1,5 @@ +lda {c1},x +bne !+ +dec {c1}+1,x +!: +dec {c1},x \ No newline at end of file diff --git a/src/main/fragment/pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_1.asm b/src/main/fragment/pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_1.asm new file mode 100644 index 000000000..6e9a4f41c --- /dev/null +++ b/src/main/fragment/pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_1.asm @@ -0,0 +1,7 @@ +sec +lda {c1},y +sbc #$01 +sta {c1},y +lda {c1}+1,y +sbc #$00 +sta {c1}+1,y \ No newline at end of file diff --git a/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_minus_vwsc2.asm b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_minus_vwsc2.asm new file mode 100644 index 000000000..80f366824 --- /dev/null +++ b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuxx_minus_vwsc2.asm @@ -0,0 +1,7 @@ +sec +lda {c1},x +sbc #<{c2} +sta {z1} +lda {c1}+1,x +sbc #>{c2} +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1=pwsc1_derefidx_vbuyy_minus_vwsc2.asm b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuyy_minus_vwsc2.asm new file mode 100644 index 000000000..a41992f9d --- /dev/null +++ b/src/main/fragment/vwsz1=pwsc1_derefidx_vbuyy_minus_vwsc2.asm @@ -0,0 +1,7 @@ +sec +lda {c1},y +sbc #<{c2} +sta {z1} +lda {c1}+1,y +sbc #>{c2} +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1_gt_0_then_la1.asm b/src/main/fragment/vwsz1_gt_0_then_la1.asm new file mode 100644 index 000000000..36f613b55 --- /dev/null +++ b/src/main/fragment/vwsz1_gt_0_then_la1.asm @@ -0,0 +1,8 @@ +lda {z1}+1 +bne !+ +lda {z1} +beq !e+ +lsr +!: +bpl {la1} +!e: \ No newline at end of file diff --git a/src/main/fragment/vwsz1_lt_vwuc1_then_la1.asm b/src/main/fragment/vwsz1_lt_vwuc1_then_la1.asm new file mode 100644 index 000000000..258b41040 --- /dev/null +++ b/src/main/fragment/vwsz1_lt_vwuc1_then_la1.asm @@ -0,0 +1,9 @@ +lda {z1}+1 +bmi {la1} +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: \ No newline at end of file diff --git a/src/main/fragment/vwuz1_gt_vbsc1_then_la1.asm b/src/main/fragment/vwuz1_gt_vbsc1_then_la1.asm new file mode 100644 index 000000000..ad560cf7c --- /dev/null +++ b/src/main/fragment/vwuz1_gt_vbsc1_then_la1.asm @@ -0,0 +1,6 @@ +lda #{c1} +bmi {la1} +cmp {z1} +bcc {la1} +lda {z1}+1 +bne {la1} \ No newline at end of file diff --git a/src/main/fragment/vwuz1_le_vwuz2_then_la1.asm b/src/main/fragment/vwuz1_le_vwuz2_then_la1.asm new file mode 100644 index 000000000..54a02388d --- /dev/null +++ b/src/main/fragment/vwuz1_le_vwuz2_then_la1.asm @@ -0,0 +1,8 @@ +lda {z1}+1 +cmp {z2}+1 +bne !+ +lda {z1} +cmp {z2} +!: +bcc {la1} +beq {la1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java index 1bbaea34e..76f23efb6 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateSynthesisRule.java @@ -233,6 +233,14 @@ class AsmFragmentTemplateSynthesisRule { mapSToU.put("pwsc1", "pwuc1"); mapSToU.put("pwsc2", "pwuc2"); mapSToU.put("pwsc3", "pwuc3"); + Map mapZ2Swap = new LinkedHashMap<>(); + mapZ2Swap.put("z2", "zn"); + mapZ2Swap.put("z1", "z2"); + mapZ2Swap.put("zn", "z1"); + Map mapZ3Swap = new LinkedHashMap<>(); + mapZ3Swap.put("z3", "zn"); + mapZ3Swap.put("z2", "z3"); + mapZ3Swap.put("zn", "z2"); // AA/XX/YY/Z1 is an RValue String rvalAa = ".*=.*aa.*|.*_.*aa.*|...aa_(lt|gt|le|ge|eq|neq)_.*"; @@ -379,6 +387,11 @@ class AsmFragmentTemplateSynthesisRule { // Replace Z3 with XX (only one) synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalXx, "ldx {z3}", "$1xx$2", null, mapZ4)); + // Correct wrong ordered Z2/Z1 + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*)z1(.*)", null, null, "$1z1$2z2$3", null, mapZ2Swap, false)); + // Correct wrong ordered Z3/Z2 + synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z3(.*)z2(.*)", null, null, "$1z2$2z3$3", null, mapZ3Swap, false)); + // Rewrite comparisons < to > synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_gt_(.*)_then_(.*)", null, null, "$2_lt_$1_then_$3", null, null)); // Rewrite comparisons > to < diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 949726ea7..8d4de3a45 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -44,6 +44,12 @@ public class TestPrograms { AsmFragmentTemplateUsages.logUsages(log, false, false, false, false, false, false); } + @Test + public void testComparisonsWord() throws IOException, URISyntaxException { + compileAndCompare("test-comparisons-word"); + } + + @Test public void testDuplicateLoopProblem() throws IOException, URISyntaxException { compileAndCompare("duplicate-loop-problem"); diff --git a/src/test/kc/test-comparisons-word.kc b/src/test/kc/test-comparisons-word.kc new file mode 100644 index 000000000..424949e1e --- /dev/null +++ b/src/test/kc/test-comparisons-word.kc @@ -0,0 +1,64 @@ +import "c64" +import "print" + +word[] words = { $0012, $3f34, $cfed }; + + +void main() { + print_cls(); + byte ln = 0; + for( byte i: 0..2) { + word w1 = words[i<<1]; + for( byte j: 0..2) { + word w2 = words[j<<1]; + for( byte op: 0..5 ) { + if(ln<50) { + compare(w1,w2,op); + if((++ln & 1) == 0) print_ln(); + } + } + } + } + // loop forever + while(true) {} +} + +// Compare two words using an operator +void compare(word w1, word w2, byte op) { + byte r = '-'; + byte* ops; + if(op==0) { + // LESS THAN + if(w1w2) r = '+'; + ops = "> @"; + } else if(op==3) { + // GREATER THAN EQUAL + if(w1>=w2) r = '+'; + ops = ">=@"; + } else if(op==4) { + // EQUAL + if(w1==w2) r = '+'; + ops = "==@"; + } else if(op==5) { + // NOT EQUAL + if(w1!=w2) r = '+'; + ops = "!=@"; + } + print_word(w1); + print_str(" @"); + print_str(ops); + print_str(" @"); + print_word(w2); + print_str(" @"); + print_char(r); + print_str(" @"); +} + diff --git a/src/test/ref/test-comparisons-word.asm b/src/test/ref/test-comparisons-word.asm new file mode 100644 index 000000000..184021252 --- /dev/null +++ b/src/test/ref/test-comparisons-word.asm @@ -0,0 +1,387 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label print_char_cursor = $c + .label print_line_cursor = 5 +main: { + .label w1 = $f + .label w2 = $11 + .label ln = 4 + .label j = 3 + .label i = 2 + jsr print_cls + lda #<$400 + sta print_line_cursor + lda #>$400 + sta print_line_cursor+1 + lda #<$400 + sta print_char_cursor + lda #>$400 + sta print_char_cursor+1 + lda #0 + sta ln + sta i + b1: + lda i + asl + tay + lda words,y + sta w1 + lda words+1,y + sta w1+1 + lda #0 + sta j + b2: + lda j + asl + tay + lda words,y + sta w2 + lda words+1,y + sta w2+1 + ldx #0 + b3: + lda ln + cmp #$32 + bcs b4 + lda w1 + sta compare.w1 + lda w1+1 + sta compare.w1+1 + jsr compare + inc ln + lda #1 + and ln + cmp #0 + bne b4 + jsr print_ln + lda print_line_cursor + sta print_char_cursor + lda print_line_cursor+1 + sta print_char_cursor+1 + b4: + inx + cpx #6 + bne b3 + inc j + lda j + cmp #3 + bne b2 + inc i + lda i + cmp #3 + bne b1 + b7: + jmp b7 +} +// Print a newline +print_ln: { + b1: + lda print_line_cursor + clc + adc #$28 + sta print_line_cursor + bcc !+ + inc print_line_cursor+1 + !: + lda print_line_cursor+1 + cmp print_char_cursor+1 + bcc b1 + bne !+ + lda print_line_cursor + cmp print_char_cursor + bcc b1 + !: + rts +} +// Compare two words using an operator +// compare(word zeropage($a) w1, word zeropage($11) w2, byte register(X) op) +compare: { + .label w1 = $a + .label w2 = $11 + .label ops = 7 + .label r = 9 + cpx #0 + bne !b1+ + jmp b1 + !b1: + cpx #1 + bne !b2+ + jmp b2 + !b2: + cpx #2 + bne !b3+ + jmp b3 + !b3: + cpx #3 + bne !b4+ + jmp b4 + !b4: + cpx #4 + bne !b5+ + jmp b5 + !b5: + cpx #5 + bne b8 + lda w1 + cmp w2 + bne !+ + lda w1+1 + cmp w2+1 + beq b6 + !: + lda #'+' + sta r + jmp b7 + b6: + lda #'-' + sta r + b7: + lda #ops_1 + sta ops+1 + jmp b16 + b8: + lda #'-' + sta r + lda #<0 + sta ops + sta ops+1 + b16: + jsr print_word + lda #str + sta print_str.str+1 + jsr print_str + lda ops + sta print_str.str + lda ops+1 + sta print_str.str+1 + jsr print_str + lda #str + sta print_str.str+1 + jsr print_str + lda w2 + sta print_word.w + lda w2+1 + sta print_word.w+1 + jsr print_word + lda #str + sta print_str.str+1 + jsr print_str + lda r + jsr print_char + lda #str + sta print_str.str+1 + jsr print_str + rts + b5: + lda w1+1 + cmp w2+1 + bne b10 + lda w1 + cmp w2 + bne b10 + lda #'+' + sta r + jmp b9 + b10: + lda #'-' + sta r + b9: + lda #ops_2 + sta ops+1 + jmp b16 + b4: + lda w1+1 + cmp w2+1 + bcc b12 + bne !+ + lda w1 + cmp w2 + bcc b12 + !: + lda #'+' + sta r + jmp b11 + b12: + lda #'-' + sta r + b11: + lda #ops_3 + sta ops+1 + jmp b16 + b3: + lda w1+1 + cmp w2+1 + bne !+ + lda w1 + cmp w2 + !: + bcc b14 + beq b14 + lda #'+' + sta r + jmp b13 + b14: + lda #'-' + sta r + b13: + lda #ops_4 + sta ops+1 + jmp b16 + b2: + lda w2+1 + cmp w1+1 + bcc b18 + bne !+ + lda w2 + cmp w1 + bcc b18 + !: + lda #'+' + sta r + jmp b15 + b18: + lda #'-' + sta r + b15: + lda #ops_5 + sta ops+1 + jmp b16 + b1: + lda w2+1 + cmp w1+1 + bne !+ + lda w2 + cmp w1 + !: + bcc b19 + beq b19 + lda #'+' + sta r + jmp b17 + b19: + lda #'-' + sta r + b17: + lda #ops_6 + sta ops+1 + jmp b16 + str: .text " @" + ops_1: .text "!=@" + ops_2: .text "==@" + ops_3: .text ">=@" + ops_4: .text "> @" + ops_5: .text "<=@" + ops_6: .text "< @" +} +// Print a zero-terminated string +// print_str(byte* zeropage($a) str) +print_str: { + .label str = $a + b1: + ldy #0 + lda (str),y + cmp #'@' + bne b2 + rts + b2: + ldy #0 + lda (str),y + sta (print_char_cursor),y + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + inc str + bne !+ + inc str+1 + !: + jmp b1 +} +// Print a single char +// print_char(byte register(A) ch) +print_char: { + ldy #0 + sta (print_char_cursor),y + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + rts +} +// Print a word as HEX +// print_word(word zeropage($a) w) +print_word: { + .label w = $a + lda w+1 + sta print_byte.b + jsr print_byte + lda w + sta print_byte.b + jsr print_byte + rts +} +// Print a byte as HEX +// print_byte(byte zeropage($e) b) +print_byte: { + .label b = $e + lda b + lsr + lsr + lsr + lsr + tay + lda print_hextab,y + jsr print_char + lda #$f + and b + tay + lda print_hextab,y + jsr print_char + rts +} +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = 5 + lda #<$400 + sta sc + lda #>$400 + sta sc+1 + b1: + lda #' ' + ldy #0 + sta (sc),y + inc sc + bne !+ + inc sc+1 + !: + lda sc+1 + cmp #>$400+$3e8 + bne b1 + lda sc + cmp #<$400+$3e8 + bne b1 + rts +} + print_hextab: .text "0123456789abcdef" + words: .word $12, $3f34, $cfed diff --git a/src/test/ref/test-comparisons-word.cfg b/src/test/ref/test-comparisons-word.cfg new file mode 100644 index 000000000..374c8cb05 --- /dev/null +++ b/src/test/ref/test-comparisons-word.cfg @@ -0,0 +1,256 @@ +@begin: scope:[] from + [0] phi() + to:@25 +@25: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @25 + [3] phi() +main: scope:[main] from @25 + [4] phi() + [5] call print_cls + to:main::@1 +main::@1: scope:[main] from main main::@12 + [6] (byte*) print_line_cursor#33 ← phi( main::@12/(byte*) print_line_cursor#23 main/((byte*))(word/signed word/dword/signed dword) $400 ) + [6] (byte*) print_char_cursor#95 ← phi( main::@12/(byte*) print_char_cursor#68 main/((byte*))(word/signed word/dword/signed dword) $400 ) + [6] (byte) main::ln#7 ← phi( main::@12/(byte) main::ln#11 main/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [6] (byte) main::i#2 ← phi( main::@12/(byte) main::i#1 main/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [7] (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [8] (word) main::w1#0 ← *((const word[]) words#0 + (byte~) main::$1) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@11 + [9] (byte*) print_line_cursor#31 ← phi( main::@1/(byte*) print_line_cursor#33 main::@11/(byte*) print_line_cursor#23 ) + [9] (byte*) print_char_cursor#79 ← phi( main::@1/(byte*) print_char_cursor#95 main::@11/(byte*) print_char_cursor#68 ) + [9] (byte) main::ln#4 ← phi( main::@1/(byte) main::ln#7 main::@11/(byte) main::ln#11 ) + [9] (byte) main::j#2 ← phi( main::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@11/(byte) main::j#1 ) + [10] (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [11] (word) main::w2#0 ← *((const word[]) words#0 + (byte~) main::$2) + to:main::@3 +main::@3: scope:[main] from main::@2 main::@4 + [12] (byte*) print_line_cursor#19 ← phi( main::@2/(byte*) print_line_cursor#31 main::@4/(byte*) print_line_cursor#23 ) + [12] (byte*) print_char_cursor#61 ← phi( main::@2/(byte*) print_char_cursor#79 main::@4/(byte*) print_char_cursor#68 ) + [12] (byte) main::op#2 ← phi( main::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@4/(byte) main::op#1 ) + [12] (byte) main::ln#2 ← phi( main::@2/(byte) main::ln#4 main::@4/(byte) main::ln#11 ) + [13] if((byte) main::ln#2>=(byte/signed byte/word/signed word/dword/signed dword) $32) goto main::@4 + to:main::@9 +main::@9: scope:[main] from main::@3 + [14] (word) compare::w1#0 ← (word) main::w1#0 + [15] (word) compare::w2#0 ← (word) main::w2#0 + [16] (byte) compare::op#0 ← (byte) main::op#2 + [17] call compare + to:main::@18 +main::@18: scope:[main] from main::@9 + [18] (byte) main::ln#1 ← ++ (byte) main::ln#2 + [19] (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 + [20] if((byte~) main::$6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 + to:main::@10 +main::@10: scope:[main] from main::@18 + [21] phi() + [22] call print_ln + [23] (byte*~) print_char_cursor#107 ← (byte*) print_line_cursor#1 + to:main::@4 +main::@4: scope:[main] from main::@10 main::@18 main::@3 + [24] (byte*) print_line_cursor#23 ← phi( main::@10/(byte*) print_line_cursor#1 main::@3/(byte*) print_line_cursor#19 main::@18/(byte*) print_line_cursor#19 ) + [24] (byte*) print_char_cursor#68 ← phi( main::@10/(byte*~) print_char_cursor#107 main::@3/(byte*) print_char_cursor#61 main::@18/(byte*) print_char_cursor#2 ) + [24] (byte) main::ln#11 ← phi( main::@10/(byte) main::ln#1 main::@3/(byte) main::ln#2 main::@18/(byte) main::ln#1 ) + [25] (byte) main::op#1 ← ++ (byte) main::op#2 + [26] if((byte) main::op#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@3 + to:main::@11 +main::@11: scope:[main] from main::@4 + [27] (byte) main::j#1 ← ++ (byte) main::j#2 + [28] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@2 + to:main::@12 +main::@12: scope:[main] from main::@11 + [29] (byte) main::i#1 ← ++ (byte) main::i#2 + [30] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 + to:main::@7 +main::@7: scope:[main] from main::@12 main::@7 + [31] phi() + to:main::@7 +print_ln: scope:[print_ln] from main::@10 + [32] phi() + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [33] (byte*) print_line_cursor#9 ← phi( print_ln/(byte*) print_line_cursor#19 print_ln::@1/(byte*) print_line_cursor#1 ) + [34] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 + [35] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@1 + [36] return + to:@return +compare: scope:[compare] from main::@9 + [37] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto compare::@1 + to:compare::@18 +compare::@18: scope:[compare] from compare + [38] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto compare::@2 + to:compare::@19 +compare::@19: scope:[compare] from compare::@18 + [39] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto compare::@3 + to:compare::@20 +compare::@20: scope:[compare] from compare::@19 + [40] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto compare::@4 + to:compare::@21 +compare::@21: scope:[compare] from compare::@20 + [41] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto compare::@5 + to:compare::@22 +compare::@22: scope:[compare] from compare::@21 + [42] if((byte) compare::op#0!=(byte/signed byte/word/signed word/dword/signed dword) 5) goto compare::@16 + to:compare::@23 +compare::@23: scope:[compare] from compare::@22 + [43] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 + to:compare::@24 +compare::@24: scope:[compare] from compare::@23 + [44] phi() + to:compare::@7 +compare::@7: scope:[compare] from compare::@23 compare::@24 + [45] (byte) compare::r#19 ← phi( compare::@23/(byte) '-' compare::@24/(byte) '+' ) + to:compare::@16 +compare::@16: scope:[compare] from compare::@11 compare::@13 compare::@15 compare::@17 compare::@22 compare::@7 compare::@9 + [46] (byte) compare::r#10 ← phi( compare::@11/(byte) compare::r#14 compare::@13/(byte) compare::r#15 compare::@15/(byte) compare::r#16 compare::@17/(byte) compare::r#17 compare::@22/(byte) '-' compare::@7/(byte) compare::r#19 compare::@9/(byte) compare::r#20 ) + [46] (byte*) compare::ops#7 ← phi( compare::@11/(const byte*) compare::ops#3 compare::@13/(const byte*) compare::ops#4 compare::@15/(const byte*) compare::ops#5 compare::@17/(const byte*) compare::ops#6 compare::@22/(byte*) 0 compare::@7/(const byte*) compare::ops#1 compare::@9/(const byte*) compare::ops#2 ) + [47] (word) print_word::w#0 ← (word) compare::w1#0 + [48] call print_word + to:compare::@35 +compare::@35: scope:[compare] from compare::@16 + [49] phi() + [50] call print_str + to:compare::@36 +compare::@36: scope:[compare] from compare::@35 + [51] (byte*) print_str::str#2 ← (byte*) compare::ops#7 + [52] call print_str + to:compare::@37 +compare::@37: scope:[compare] from compare::@36 + [53] phi() + [54] call print_str + to:compare::@38 +compare::@38: scope:[compare] from compare::@37 + [55] (word) print_word::w#1 ← (word) compare::w2#0 + [56] call print_word + to:compare::@39 +compare::@39: scope:[compare] from compare::@38 + [57] phi() + [58] call print_str + to:compare::@40 +compare::@40: scope:[compare] from compare::@39 + [59] (byte) print_char::ch#2 ← (byte) compare::r#10 + [60] call print_char + to:compare::@41 +compare::@41: scope:[compare] from compare::@40 + [61] phi() + [62] call print_str + to:compare::@return +compare::@return: scope:[compare] from compare::@41 + [63] return + to:@return +compare::@5: scope:[compare] from compare::@21 + [64] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 + to:compare::@26 +compare::@26: scope:[compare] from compare::@5 + [65] phi() + to:compare::@9 +compare::@9: scope:[compare] from compare::@26 compare::@5 + [66] (byte) compare::r#20 ← phi( compare::@26/(byte) '+' compare::@5/(byte) '-' ) + to:compare::@16 +compare::@4: scope:[compare] from compare::@20 + [67] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 + to:compare::@28 +compare::@28: scope:[compare] from compare::@4 + [68] phi() + to:compare::@11 +compare::@11: scope:[compare] from compare::@28 compare::@4 + [69] (byte) compare::r#14 ← phi( compare::@28/(byte) '+' compare::@4/(byte) '-' ) + to:compare::@16 +compare::@3: scope:[compare] from compare::@19 + [70] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 + to:compare::@30 +compare::@30: scope:[compare] from compare::@3 + [71] phi() + to:compare::@13 +compare::@13: scope:[compare] from compare::@3 compare::@30 + [72] (byte) compare::r#15 ← phi( compare::@3/(byte) '-' compare::@30/(byte) '+' ) + to:compare::@16 +compare::@2: scope:[compare] from compare::@18 + [73] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 + to:compare::@32 +compare::@32: scope:[compare] from compare::@2 + [74] phi() + to:compare::@15 +compare::@15: scope:[compare] from compare::@2 compare::@32 + [75] (byte) compare::r#16 ← phi( compare::@2/(byte) '-' compare::@32/(byte) '+' ) + to:compare::@16 +compare::@1: scope:[compare] from compare + [76] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 + to:compare::@34 +compare::@34: scope:[compare] from compare::@1 + [77] phi() + to:compare::@17 +compare::@17: scope:[compare] from compare::@1 compare::@34 + [78] (byte) compare::r#17 ← phi( compare::@1/(byte) '-' compare::@34/(byte) '+' ) + to:compare::@16 +print_str: scope:[print_str] from compare::@35 compare::@36 compare::@37 compare::@39 compare::@41 + [79] (byte*) print_char_cursor#66 ← phi( compare::@35/(byte*) print_char_cursor#11 compare::@36/(byte*) print_char_cursor#2 compare::@37/(byte*) print_char_cursor#2 compare::@39/(byte*) print_char_cursor#11 compare::@41/(byte*) print_char_cursor#11 ) + [79] (byte*) print_str::str#8 ← phi( compare::@35/(const string) compare::str compare::@36/(byte*) print_str::str#2 compare::@37/(const string) compare::str compare::@39/(const string) compare::str compare::@41/(const string) compare::str ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [80] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [80] (byte*) print_str::str#6 ← phi( print_str/(byte*) print_str::str#8 print_str::@2/(byte*) print_str::str#0 ) + [81] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@return: scope:[print_str] from print_str::@1 + [82] return + to:@return +print_str::@2: scope:[print_str] from print_str::@1 + [83] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#6) + [84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [85] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#6 + to:print_str::@1 +print_char: scope:[print_char] from compare::@40 print_byte print_byte::@1 + [86] (byte*) print_char_cursor#39 ← phi( compare::@40/(byte*) print_char_cursor#2 print_byte/(byte*) print_char_cursor#59 print_byte::@1/(byte*) print_char_cursor#11 ) + [86] (byte) print_char::ch#3 ← phi( compare::@40/(byte) print_char::ch#2 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) + [87] *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 + [88] (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#39 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [89] return + to:@return +print_word: scope:[print_word] from compare::@16 compare::@38 + [90] (byte*) print_char_cursor#58 ← phi( compare::@16/(byte*) print_char_cursor#61 compare::@38/(byte*) print_char_cursor#2 ) + [90] (word) print_word::w#2 ← phi( compare::@16/(word) print_word::w#0 compare::@38/(word) print_word::w#1 ) + [91] (byte) print_byte::b#0 ← > (word) print_word::w#2 + [92] call print_byte + to:print_word::@1 +print_word::@1: scope:[print_word] from print_word + [93] (byte) print_byte::b#1 ← < (word) print_word::w#2 + [94] call print_byte + to:print_word::@return +print_word::@return: scope:[print_word] from print_word::@1 + [95] return + to:@return +print_byte: scope:[print_byte] from print_word print_word::@1 + [96] (byte*) print_char_cursor#59 ← phi( print_word/(byte*) print_char_cursor#58 print_word::@1/(byte*) print_char_cursor#11 ) + [96] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + [97] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [98] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) + [99] call print_char + to:print_byte::@1 +print_byte::@1: scope:[print_byte] from print_byte + [100] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) $f + [101] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) + [102] call print_char + to:print_byte::@return +print_byte::@return: scope:[print_byte] from print_byte::@1 + [103] return + to:@return +print_cls: scope:[print_cls] from main + [104] phi() + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + [105] (byte*) print_cls::sc#2 ← phi( print_cls/((byte*))(word/signed word/dword/signed dword) $400 print_cls::@1/(byte*) print_cls::sc#1 ) + [106] *((byte*) print_cls::sc#2) ← (byte) ' ' + [107] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + [108] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [109] return + to:@return diff --git a/src/test/ref/test-comparisons-word.log b/src/test/ref/test-comparisons-word.log new file mode 100644 index 000000000..72d106dc4 --- /dev/null +++ b/src/test/ref/test-comparisons-word.log @@ -0,0 +1,5225 @@ +Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) PROCPORT_DDR#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) PROCPORT_RAM_ALL#0 ← (byte/signed byte/word/signed word/dword/signed dword) $30 + (byte) PROCPORT_RAM_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) $35 + (byte) PROCPORT_RAM_CHARROM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $31 + (byte) PROCPORT_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) $36 + (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) $37 + (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) $d000 + (word) SPRITE_PTRS#0 ← (word/signed word/dword/signed dword) $3f8 + (byte*) SPRITES_XPOS#0 ← ((byte*)) (word/dword/signed dword) $d000 + (byte*) SPRITES_YPOS#0 ← ((byte*)) (word/dword/signed dword) $d001 + (byte*) SPRITES_XMSB#0 ← ((byte*)) (word/dword/signed dword) $d010 + (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) $d012 + (byte*) SPRITES_ENABLE#0 ← ((byte*)) (word/dword/signed dword) $d015 + (byte*) SPRITES_EXPAND_Y#0 ← ((byte*)) (word/dword/signed dword) $d017 + (byte*) SPRITES_PRIORITY#0 ← ((byte*)) (word/dword/signed dword) $d01b + (byte*) SPRITES_MC#0 ← ((byte*)) (word/dword/signed dword) $d01c + (byte*) SPRITES_EXPAND_X#0 ← ((byte*)) (word/dword/signed dword) $d01d + (byte*) BORDERCOL#0 ← ((byte*)) (word/dword/signed dword) $d020 + (byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) $d021 + (byte*) BGCOL1#0 ← ((byte*)) (word/dword/signed dword) $d021 + (byte*) BGCOL2#0 ← ((byte*)) (word/dword/signed dword) $d022 + (byte*) BGCOL3#0 ← ((byte*)) (word/dword/signed dword) $d023 + (byte*) BGCOL4#0 ← ((byte*)) (word/dword/signed dword) $d024 + (byte*) SPRITES_MC1#0 ← ((byte*)) (word/dword/signed dword) $d025 + (byte*) SPRITES_MC2#0 ← ((byte*)) (word/dword/signed dword) $d026 + (byte*) SPRITES_COLS#0 ← ((byte*)) (word/dword/signed dword) $d027 + (byte*) VIC_CONTROL#0 ← ((byte*)) (word/dword/signed dword) $d011 + (byte*) D011#0 ← ((byte*)) (word/dword/signed dword) $d011 + (byte) VIC_RST8#0 ← (byte/word/signed word/dword/signed dword) $80 + (byte) VIC_ECM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $40 + (byte) VIC_BMM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $20 + (byte) VIC_DEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) $10 + (byte) VIC_RSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) VIC_CONTROL2#0 ← ((byte*)) (word/dword/signed dword) $d016 + (byte*) D016#0 ← ((byte*)) (word/dword/signed dword) $d016 + (byte) VIC_MCM#0 ← (byte/signed byte/word/signed word/dword/signed dword) $10 + (byte) VIC_CSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) D018#0 ← ((byte*)) (word/dword/signed dword) $d018 + (byte*) VIC_MEMORY#0 ← ((byte*)) (word/dword/signed dword) $d018 + (byte*) LIGHTPEN_X#0 ← ((byte*)) (word/dword/signed dword) $d013 + (byte*) LIGHTPEN_Y#0 ← ((byte*)) (word/dword/signed dword) $d014 + (byte*) IRQ_STATUS#0 ← ((byte*)) (word/dword/signed dword) $d019 + (byte*) IRQ_ENABLE#0 ← ((byte*)) (word/dword/signed dword) $d01a + (byte) IRQ_RASTER#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) IRQ_COLLISION_BG#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) IRQ_COLLISION_SPRITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) IRQ_LIGHTPEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) COLS#0 ← ((byte*)) (word/dword/signed dword) $d800 + (byte*) CIA1_PORT_A#0 ← ((byte*)) (word/dword/signed dword) $dc00 + (byte*) CIA1_PORT_B#0 ← ((byte*)) (word/dword/signed dword) $dc01 + (byte*) CIA1_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) $dc02 + (byte*) CIA1_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) $dc03 + (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) $dc0d + (byte) CIA_INTERRUPT_CLEAR#0 ← (byte/signed byte/word/signed word/dword/signed dword) $7f + (byte*) CIA2_PORT_A#0 ← ((byte*)) (word/dword/signed dword) $dd00 + (byte*) CIA2_PORT_B#0 ← ((byte*)) (word/dword/signed dword) $dd01 + (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) $dd02 + (byte*) CIA2_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) $dd03 + (byte*) CIA2_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) $dd0d + (void()**) KERNEL_IRQ#0 ← ((void()**)) (word/signed word/dword/signed dword) $314 + (void()**) HARDWARE_IRQ#0 ← ((void()**)) (word/dword/signed dword) $fffe + (byte) BLACK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) WHITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) RED#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) CYAN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) PURPLE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) YELLOW#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) ORANGE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) BROWN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) PINK#0 ← (byte/signed byte/word/signed word/dword/signed dword) $a + (byte) DARK_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) $b + (byte) GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) $c + (byte) LIGHT_GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) $d + (byte) LIGHT_BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) $e + (byte) LIGHT_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) $f + to:@4 +@4: scope:[] from @begin + (byte*) print_screen#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte*) print_line_cursor#0 ← (byte*) print_screen#0 + (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 + to:@16 +print_str: scope:[print_str] from compare::@35 compare::@36 compare::@37 compare::@39 compare::@41 + (byte*) print_char_cursor#66 ← phi( compare::@35/(byte*) print_char_cursor#19 compare::@36/(byte*) print_char_cursor#20 compare::@37/(byte*) print_char_cursor#21 compare::@39/(byte*) print_char_cursor#23 compare::@41/(byte*) print_char_cursor#25 ) + (byte*) print_str::str#8 ← phi( compare::@35/(byte*) print_str::str#1 compare::@36/(byte*) print_str::str#2 compare::@37/(byte*) print_str::str#3 compare::@39/(byte*) print_str::str#4 compare::@41/(byte*) print_str::str#5 ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + (byte*) print_char_cursor#56 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + (byte*) print_str::str#6 ← phi( print_str/(byte*) print_str::str#8 print_str::@2/(byte*) print_str::str#0 ) + (bool~) print_str::$0 ← *((byte*) print_str::str#6) != (byte) '@' + if((bool~) print_str::$0) goto print_str::@2 + to:print_str::@return +print_str::@2: scope:[print_str] from print_str::@1 + (byte*) print_char_cursor#29 ← phi( print_str::@1/(byte*) print_char_cursor#56 ) + (byte*) print_str::str#7 ← phi( print_str::@1/(byte*) print_str::str#6 ) + *((byte*) print_char_cursor#29) ← *((byte*) print_str::str#7) + (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#29 + (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 + to:print_str::@1 +print_str::@return: scope:[print_str] from print_str::@1 + (byte*) print_char_cursor#30 ← phi( print_str::@1/(byte*) print_char_cursor#56 ) + (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#30 + return + to:@return +print_ln: scope:[print_ln] from main::@10 + (byte*) print_char_cursor#57 ← phi( main::@10/(byte*) print_char_cursor#62 ) + (byte*) print_line_cursor#17 ← phi( main::@10/(byte*) print_line_cursor#19 ) + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + (byte*) print_char_cursor#31 ← phi( print_ln/(byte*) print_char_cursor#57 print_ln::@1/(byte*) print_char_cursor#31 ) + (byte*) print_line_cursor#9 ← phi( print_ln/(byte*) print_line_cursor#17 print_ln::@1/(byte*) print_line_cursor#1 ) + (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 + (byte*) print_line_cursor#1 ← (byte*~) print_ln::$0 + (bool~) print_ln::$1 ← (byte*) print_line_cursor#1 < (byte*) print_char_cursor#31 + if((bool~) print_ln::$1) goto print_ln::@1 + to:print_ln::@2 +print_ln::@2: scope:[print_ln] from print_ln::@1 + (byte*) print_line_cursor#10 ← phi( print_ln::@1/(byte*) print_line_cursor#1 ) + (byte*) print_char_cursor#3 ← (byte*) print_line_cursor#10 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@2 + (byte*) print_char_cursor#32 ← phi( print_ln::@2/(byte*) print_char_cursor#3 ) + (byte*) print_line_cursor#11 ← phi( print_ln::@2/(byte*) print_line_cursor#10 ) + (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#11 + (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#32 + return + to:@return +print_word: scope:[print_word] from compare::@16 compare::@38 + (byte*) print_char_cursor#58 ← phi( compare::@16/(byte*) print_char_cursor#64 compare::@38/(byte*) print_char_cursor#22 ) + (word) print_word::w#2 ← phi( compare::@16/(word) print_word::w#0 compare::@38/(word) print_word::w#1 ) + (byte~) print_word::$0 ← > (word) print_word::w#2 + (byte) print_byte::b#0 ← (byte~) print_word::$0 + call print_byte + to:print_word::@1 +print_word::@1: scope:[print_word] from print_word + (word) print_word::w#3 ← phi( print_word/(word) print_word::w#2 ) + (byte*) print_char_cursor#33 ← phi( print_word/(byte*) print_char_cursor#10 ) + (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#33 + (byte~) print_word::$2 ← < (word) print_word::w#3 + (byte) print_byte::b#1 ← (byte~) print_word::$2 + call print_byte + to:print_word::@2 +print_word::@2: scope:[print_word] from print_word::@1 + (byte*) print_char_cursor#34 ← phi( print_word::@1/(byte*) print_char_cursor#10 ) + (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#34 + to:print_word::@return +print_word::@return: scope:[print_word] from print_word::@2 + (byte*) print_char_cursor#35 ← phi( print_word::@2/(byte*) print_char_cursor#6 ) + (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#35 + return + to:@return +@16: scope:[] from @4 + (byte*) print_screen#7 ← phi( @4/(byte*) print_screen#0 ) + (byte*) print_char_cursor#78 ← phi( @4/(byte*) print_char_cursor#0 ) + (byte*) print_line_cursor#26 ← phi( @4/(byte*) print_line_cursor#0 ) + (byte[]) print_hextab#0 ← (const string) $0 + to:@23 +print_byte: scope:[print_byte] from print_word print_word::@1 + (byte*) print_char_cursor#59 ← phi( print_word/(byte*) print_char_cursor#58 print_word::@1/(byte*) print_char_cursor#5 ) + (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) print_char::ch#0 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$0) + call print_char + to:print_byte::@1 +print_byte::@1: scope:[print_byte] from print_byte + (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 ) + (byte*) print_char_cursor#36 ← phi( print_byte/(byte*) print_char_cursor#12 ) + (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#36 + (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte/signed byte/word/signed word/dword/signed dword) $f + (byte) print_char::ch#1 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$2) + call print_char + to:print_byte::@2 +print_byte::@2: scope:[print_byte] from print_byte::@1 + (byte*) print_char_cursor#37 ← phi( print_byte::@1/(byte*) print_char_cursor#12 ) + (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#37 + to:print_byte::@return +print_byte::@return: scope:[print_byte] from print_byte::@2 + (byte*) print_char_cursor#38 ← phi( print_byte::@2/(byte*) print_char_cursor#9 ) + (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#38 + return + to:@return +print_char: scope:[print_char] from compare::@40 print_byte print_byte::@1 + (byte*) print_char_cursor#39 ← phi( compare::@40/(byte*) print_char_cursor#24 print_byte/(byte*) print_char_cursor#59 print_byte::@1/(byte*) print_char_cursor#8 ) + (byte) print_char::ch#3 ← phi( compare::@40/(byte) print_char::ch#2 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) + *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 + (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#39 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + (byte*) print_char_cursor#40 ← phi( print_char/(byte*) print_char_cursor#11 ) + (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#40 + return + to:@return +print_cls: scope:[print_cls] from main + (byte*) print_screen#1 ← phi( main/(byte*) print_screen#4 ) + (byte*) print_cls::sc#0 ← (byte*) print_screen#1 + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + (byte*) print_screen#2 ← phi( print_cls/(byte*) print_screen#1 print_cls::@1/(byte*) print_screen#2 ) + (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) print_cls::sc#0 print_cls::@1/(byte*) print_cls::sc#1 ) + *((byte*) print_cls::sc#2) ← (byte) ' ' + (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + (byte*~) print_cls::$0 ← (byte*) print_screen#2 + (word/signed word/dword/signed dword) $3e8 + (bool~) print_cls::$1 ← (byte*) print_cls::sc#1 != (byte*~) print_cls::$0 + if((bool~) print_cls::$1) goto print_cls::@1 + to:print_cls::@2 +print_cls::@2: scope:[print_cls] from print_cls::@1 + (byte*) print_screen#3 ← phi( print_cls::@1/(byte*) print_screen#2 ) + (byte*) print_line_cursor#3 ← (byte*) print_screen#3 + (byte*) print_char_cursor#13 ← (byte*) print_line_cursor#3 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@2 + (byte*) print_char_cursor#41 ← phi( print_cls::@2/(byte*) print_char_cursor#13 ) + (byte*) print_line_cursor#12 ← phi( print_cls::@2/(byte*) print_line_cursor#3 ) + (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#12 + (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#41 + return + to:@return +@23: scope:[] from @16 + (byte*) print_screen#6 ← phi( @16/(byte*) print_screen#7 ) + (byte*) print_char_cursor#77 ← phi( @16/(byte*) print_char_cursor#78 ) + (byte*) print_line_cursor#25 ← phi( @16/(byte*) print_line_cursor#26 ) + (word[]) words#0 ← { (byte/signed byte/word/signed word/dword/signed dword) $12, (word/signed word/dword/signed dword) $3f34, (word/dword/signed dword) $cfed } + to:@25 +main: scope:[main] from @25 + (byte*) print_char_cursor#60 ← phi( @25/(byte*) print_char_cursor#65 ) + (byte*) print_line_cursor#18 ← phi( @25/(byte*) print_line_cursor#21 ) + (byte*) print_screen#4 ← phi( @25/(byte*) print_screen#5 ) + call print_cls + to:main::@17 +main::@17: scope:[main] from main + (byte*) print_char_cursor#42 ← phi( main/(byte*) print_char_cursor#14 ) + (byte*) print_line_cursor#13 ← phi( main/(byte*) print_line_cursor#4 ) + (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#13 + (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#42 + (byte) main::ln#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) main::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main::@12 main::@17 + (byte*) print_line_cursor#33 ← phi( main::@12/(byte*) print_line_cursor#23 main::@17/(byte*) print_line_cursor#5 ) + (byte*) print_char_cursor#95 ← phi( main::@12/(byte*) print_char_cursor#68 main::@17/(byte*) print_char_cursor#15 ) + (byte) main::ln#7 ← phi( main::@12/(byte) main::ln#11 main::@17/(byte) main::ln#0 ) + (byte) main::i#2 ← phi( main::@12/(byte) main::i#1 main::@17/(byte) main::i#0 ) + (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) main::w1#0 ← *((word[]) words#0 + (byte~) main::$1) + (byte) main::j#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@11 + (byte*) print_line_cursor#31 ← phi( main::@1/(byte*) print_line_cursor#33 main::@11/(byte*) print_line_cursor#28 ) + (byte) main::i#9 ← phi( main::@1/(byte) main::i#2 main::@11/(byte) main::i#4 ) + (byte*) print_char_cursor#79 ← phi( main::@1/(byte*) print_char_cursor#95 main::@11/(byte*) print_char_cursor#81 ) + (word) main::w1#3 ← phi( main::@1/(word) main::w1#0 main::@11/(word) main::w1#5 ) + (byte) main::ln#4 ← phi( main::@1/(byte) main::ln#7 main::@11/(byte) main::ln#8 ) + (byte) main::j#2 ← phi( main::@1/(byte) main::j#0 main::@11/(byte) main::j#1 ) + (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) main::w2#0 ← *((word[]) words#0 + (byte~) main::$2) + (byte) main::op#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@3 +main::@3: scope:[main] from main::@2 main::@4 + (byte*) print_line_cursor#29 ← phi( main::@2/(byte*) print_line_cursor#31 main::@4/(byte*) print_line_cursor#30 ) + (byte) main::i#7 ← phi( main::@2/(byte) main::i#9 main::@4/(byte) main::i#5 ) + (byte*) print_char_cursor#67 ← phi( main::@2/(byte*) print_char_cursor#79 main::@4/(byte*) print_char_cursor#80 ) + (byte) main::j#6 ← phi( main::@2/(byte) main::j#2 main::@4/(byte) main::j#4 ) + (word) main::w2#2 ← phi( main::@2/(word) main::w2#0 main::@4/(word) main::w2#3 ) + (word) main::w1#2 ← phi( main::@2/(word) main::w1#3 main::@4/(word) main::w1#4 ) + (byte) main::op#5 ← phi( main::@2/(byte) main::op#0 main::@4/(byte) main::op#1 ) + (byte) main::ln#2 ← phi( main::@2/(byte) main::ln#4 main::@4/(byte) main::ln#5 ) + (bool~) main::$3 ← (byte) main::ln#2 < (byte/signed byte/word/signed word/dword/signed dword) $32 + (bool~) main::$4 ← ! (bool~) main::$3 + if((bool~) main::$4) goto main::@4 + to:main::@9 +main::@4: scope:[main] from main::@19 main::@3 main::@5 + (byte*) print_line_cursor#30 ← phi( main::@19/(byte*) print_line_cursor#6 main::@3/(byte*) print_line_cursor#29 main::@5/(byte*) print_line_cursor#32 ) + (byte*) print_char_cursor#80 ← phi( main::@19/(byte*) print_char_cursor#17 main::@3/(byte*) print_char_cursor#67 main::@5/(byte*) print_char_cursor#96 ) + (byte) main::i#5 ← phi( main::@19/(byte) main::i#6 main::@3/(byte) main::i#7 main::@5/(byte) main::i#8 ) + (word) main::w2#3 ← phi( main::@19/(word) main::w2#4 main::@3/(word) main::w2#2 main::@5/(word) main::w2#5 ) + (word) main::w1#4 ← phi( main::@19/(word) main::w1#6 main::@3/(word) main::w1#2 main::@5/(word) main::w1#7 ) + (byte) main::j#4 ← phi( main::@19/(byte) main::j#5 main::@3/(byte) main::j#6 main::@5/(byte) main::j#7 ) + (byte) main::ln#5 ← phi( main::@19/(byte) main::ln#9 main::@3/(byte) main::ln#2 main::@5/(byte) main::ln#10 ) + (byte) main::op#2 ← phi( main::@19/(byte) main::op#4 main::@3/(byte) main::op#5 main::@5/(byte) main::op#6 ) + (byte) main::op#1 ← (byte) main::op#2 + rangenext(0,5) + (bool~) main::$10 ← (byte) main::op#1 != rangelast(0,5) + if((bool~) main::$10) goto main::@3 + to:main::@11 +main::@9: scope:[main] from main::@3 + (byte) main::i#12 ← phi( main::@3/(byte) main::i#7 ) + (byte) main::j#10 ← phi( main::@3/(byte) main::j#6 ) + (byte*) print_line_cursor#27 ← phi( main::@3/(byte*) print_line_cursor#29 ) + (byte) main::ln#6 ← phi( main::@3/(byte) main::ln#2 ) + (byte*) print_char_cursor#61 ← phi( main::@3/(byte*) print_char_cursor#67 ) + (byte) main::op#3 ← phi( main::@3/(byte) main::op#5 ) + (word) main::w2#1 ← phi( main::@3/(word) main::w2#2 ) + (word) main::w1#1 ← phi( main::@3/(word) main::w1#2 ) + (word) compare::w1#0 ← (word) main::w1#1 + (word) compare::w2#0 ← (word) main::w2#1 + (byte) compare::op#0 ← (byte) main::op#3 + call compare + to:main::@18 +main::@18: scope:[main] from main::@9 + (byte) main::i#10 ← phi( main::@9/(byte) main::i#12 ) + (word) main::w2#6 ← phi( main::@9/(word) main::w2#1 ) + (word) main::w1#8 ← phi( main::@9/(word) main::w1#1 ) + (byte) main::j#8 ← phi( main::@9/(byte) main::j#10 ) + (byte*) print_line_cursor#22 ← phi( main::@9/(byte*) print_line_cursor#27 ) + (byte) main::op#7 ← phi( main::@9/(byte) main::op#3 ) + (byte) main::ln#3 ← phi( main::@9/(byte) main::ln#6 ) + (byte*) print_char_cursor#43 ← phi( main::@9/(byte*) print_char_cursor#27 ) + (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#43 + (byte) main::ln#1 ← ++ (byte) main::ln#3 + (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 + (bool~) main::$7 ← (byte~) main::$6 == (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) main::$8 ← ! (bool~) main::$7 + if((bool~) main::$8) goto main::@5 + to:main::@10 +main::@5: scope:[main] from main::@18 + (byte*) print_line_cursor#32 ← phi( main::@18/(byte*) print_line_cursor#22 ) + (byte*) print_char_cursor#96 ← phi( main::@18/(byte*) print_char_cursor#16 ) + (byte) main::i#8 ← phi( main::@18/(byte) main::i#10 ) + (word) main::w2#5 ← phi( main::@18/(word) main::w2#6 ) + (word) main::w1#7 ← phi( main::@18/(word) main::w1#8 ) + (byte) main::j#7 ← phi( main::@18/(byte) main::j#8 ) + (byte) main::ln#10 ← phi( main::@18/(byte) main::ln#1 ) + (byte) main::op#6 ← phi( main::@18/(byte) main::op#7 ) + to:main::@4 +main::@10: scope:[main] from main::@18 + (byte) main::i#11 ← phi( main::@18/(byte) main::i#10 ) + (word) main::w2#7 ← phi( main::@18/(word) main::w2#6 ) + (word) main::w1#9 ← phi( main::@18/(word) main::w1#8 ) + (byte) main::j#9 ← phi( main::@18/(byte) main::j#8 ) + (byte) main::ln#12 ← phi( main::@18/(byte) main::ln#1 ) + (byte) main::op#8 ← phi( main::@18/(byte) main::op#7 ) + (byte*) print_char_cursor#62 ← phi( main::@18/(byte*) print_char_cursor#16 ) + (byte*) print_line_cursor#19 ← phi( main::@18/(byte*) print_line_cursor#22 ) + call print_ln + to:main::@19 +main::@19: scope:[main] from main::@10 + (byte) main::i#6 ← phi( main::@10/(byte) main::i#11 ) + (word) main::w2#4 ← phi( main::@10/(word) main::w2#7 ) + (word) main::w1#6 ← phi( main::@10/(word) main::w1#9 ) + (byte) main::j#5 ← phi( main::@10/(byte) main::j#9 ) + (byte) main::ln#9 ← phi( main::@10/(byte) main::ln#12 ) + (byte) main::op#4 ← phi( main::@10/(byte) main::op#8 ) + (byte*) print_char_cursor#44 ← phi( main::@10/(byte*) print_char_cursor#4 ) + (byte*) print_line_cursor#14 ← phi( main::@10/(byte*) print_line_cursor#2 ) + (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#14 + (byte*) print_char_cursor#17 ← (byte*) print_char_cursor#44 + to:main::@4 +main::@11: scope:[main] from main::@4 + (byte*) print_char_cursor#81 ← phi( main::@4/(byte*) print_char_cursor#80 ) + (byte*) print_line_cursor#28 ← phi( main::@4/(byte*) print_line_cursor#30 ) + (word) main::w1#5 ← phi( main::@4/(word) main::w1#4 ) + (byte) main::ln#8 ← phi( main::@4/(byte) main::ln#5 ) + (byte) main::i#4 ← phi( main::@4/(byte) main::i#5 ) + (byte) main::j#3 ← phi( main::@4/(byte) main::j#4 ) + (byte) main::j#1 ← (byte) main::j#3 + rangenext(0,2) + (bool~) main::$11 ← (byte) main::j#1 != rangelast(0,2) + if((bool~) main::$11) goto main::@2 + to:main::@12 +main::@12: scope:[main] from main::@11 + (byte) main::ln#11 ← phi( main::@11/(byte) main::ln#8 ) + (byte*) print_char_cursor#68 ← phi( main::@11/(byte*) print_char_cursor#81 ) + (byte*) print_line_cursor#23 ← phi( main::@11/(byte*) print_line_cursor#28 ) + (byte) main::i#3 ← phi( main::@11/(byte) main::i#4 ) + (byte) main::i#1 ← (byte) main::i#3 + rangenext(0,2) + (bool~) main::$12 ← (byte) main::i#1 != rangelast(0,2) + if((bool~) main::$12) goto main::@1 + to:main::@6 +main::@6: scope:[main] from main::@12 main::@7 + (byte*) print_char_cursor#63 ← phi( main::@12/(byte*) print_char_cursor#68 main::@7/(byte*) print_char_cursor#69 ) + (byte*) print_line_cursor#20 ← phi( main::@12/(byte*) print_line_cursor#23 main::@7/(byte*) print_line_cursor#24 ) + if(true) goto main::@7 + to:main::@return +main::@7: scope:[main] from main::@6 + (byte*) print_char_cursor#69 ← phi( main::@6/(byte*) print_char_cursor#63 ) + (byte*) print_line_cursor#24 ← phi( main::@6/(byte*) print_line_cursor#20 ) + to:main::@6 +main::@return: scope:[main] from main::@6 + (byte*) print_char_cursor#45 ← phi( main::@6/(byte*) print_char_cursor#63 ) + (byte*) print_line_cursor#15 ← phi( main::@6/(byte*) print_line_cursor#20 ) + (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#15 + (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#45 + return + to:@return +compare: scope:[compare] from main::@9 + (byte*) print_char_cursor#97 ← phi( main::@9/(byte*) print_char_cursor#61 ) + (word) compare::w2#8 ← phi( main::@9/(word) compare::w2#0 ) + (word) compare::w1#8 ← phi( main::@9/(word) compare::w1#0 ) + (byte) compare::op#1 ← phi( main::@9/(byte) compare::op#0 ) + (byte) compare::r#0 ← (byte) '-' + (byte*) compare::ops#0 ← (byte*) 0 + (bool~) compare::$0 ← (byte) compare::op#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) compare::$0) goto compare::@1 + to:compare::@18 +compare::@1: scope:[compare] from compare + (byte) compare::r#27 ← phi( compare/(byte) compare::r#0 ) + (byte*) print_char_cursor#93 ← phi( compare/(byte*) print_char_cursor#97 ) + (word) compare::w2#1 ← phi( compare/(word) compare::w2#8 ) + (word) compare::w1#1 ← phi( compare/(word) compare::w1#8 ) + (bool~) compare::$17 ← (word) compare::w1#1 < (word) compare::w2#1 + (bool~) compare::$18 ← ! (bool~) compare::$17 + if((bool~) compare::$18) goto compare::@17 + to:compare::@34 +compare::@18: scope:[compare] from compare + (byte) compare::r#28 ← phi( compare/(byte) compare::r#0 ) + (byte*) compare::ops#15 ← phi( compare/(byte*) compare::ops#0 ) + (byte*) print_char_cursor#98 ← phi( compare/(byte*) print_char_cursor#97 ) + (word) compare::w2#9 ← phi( compare/(word) compare::w2#8 ) + (word) compare::w1#9 ← phi( compare/(word) compare::w1#8 ) + (byte) compare::op#2 ← phi( compare/(byte) compare::op#1 ) + (bool~) compare::$1 ← (byte) compare::op#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 + if((bool~) compare::$1) goto compare::@2 + to:compare::@19 +compare::@2: scope:[compare] from compare::@18 + (byte) compare::r#26 ← phi( compare::@18/(byte) compare::r#28 ) + (byte*) print_char_cursor#91 ← phi( compare::@18/(byte*) print_char_cursor#98 ) + (word) compare::w2#2 ← phi( compare::@18/(word) compare::w2#9 ) + (word) compare::w1#2 ← phi( compare::@18/(word) compare::w1#9 ) + (bool~) compare::$15 ← (word) compare::w1#2 <= (word) compare::w2#2 + (bool~) compare::$16 ← ! (bool~) compare::$15 + if((bool~) compare::$16) goto compare::@15 + to:compare::@32 +compare::@19: scope:[compare] from compare::@18 + (byte) compare::r#29 ← phi( compare::@18/(byte) compare::r#28 ) + (byte*) compare::ops#14 ← phi( compare::@18/(byte*) compare::ops#15 ) + (byte*) print_char_cursor#99 ← phi( compare::@18/(byte*) print_char_cursor#98 ) + (word) compare::w2#10 ← phi( compare::@18/(word) compare::w2#9 ) + (word) compare::w1#10 ← phi( compare::@18/(word) compare::w1#9 ) + (byte) compare::op#3 ← phi( compare::@18/(byte) compare::op#2 ) + (bool~) compare::$2 ← (byte) compare::op#3 == (byte/signed byte/word/signed word/dword/signed dword) 2 + if((bool~) compare::$2) goto compare::@3 + to:compare::@20 +compare::@3: scope:[compare] from compare::@19 + (byte) compare::r#25 ← phi( compare::@19/(byte) compare::r#29 ) + (byte*) print_char_cursor#89 ← phi( compare::@19/(byte*) print_char_cursor#99 ) + (word) compare::w2#3 ← phi( compare::@19/(word) compare::w2#10 ) + (word) compare::w1#3 ← phi( compare::@19/(word) compare::w1#10 ) + (bool~) compare::$13 ← (word) compare::w1#3 > (word) compare::w2#3 + (bool~) compare::$14 ← ! (bool~) compare::$13 + if((bool~) compare::$14) goto compare::@13 + to:compare::@30 +compare::@20: scope:[compare] from compare::@19 + (byte) compare::r#30 ← phi( compare::@19/(byte) compare::r#29 ) + (byte*) compare::ops#13 ← phi( compare::@19/(byte*) compare::ops#14 ) + (byte*) print_char_cursor#100 ← phi( compare::@19/(byte*) print_char_cursor#99 ) + (word) compare::w2#11 ← phi( compare::@19/(word) compare::w2#10 ) + (word) compare::w1#11 ← phi( compare::@19/(word) compare::w1#10 ) + (byte) compare::op#4 ← phi( compare::@19/(byte) compare::op#3 ) + (bool~) compare::$3 ← (byte) compare::op#4 == (byte/signed byte/word/signed word/dword/signed dword) 3 + if((bool~) compare::$3) goto compare::@4 + to:compare::@21 +compare::@4: scope:[compare] from compare::@20 + (byte) compare::r#24 ← phi( compare::@20/(byte) compare::r#30 ) + (byte*) print_char_cursor#88 ← phi( compare::@20/(byte*) print_char_cursor#100 ) + (word) compare::w2#4 ← phi( compare::@20/(word) compare::w2#11 ) + (word) compare::w1#4 ← phi( compare::@20/(word) compare::w1#11 ) + (bool~) compare::$11 ← (word) compare::w1#4 >= (word) compare::w2#4 + (bool~) compare::$12 ← ! (bool~) compare::$11 + if((bool~) compare::$12) goto compare::@11 + to:compare::@28 +compare::@21: scope:[compare] from compare::@20 + (byte) compare::r#31 ← phi( compare::@20/(byte) compare::r#30 ) + (byte*) compare::ops#12 ← phi( compare::@20/(byte*) compare::ops#13 ) + (byte*) print_char_cursor#101 ← phi( compare::@20/(byte*) print_char_cursor#100 ) + (word) compare::w2#12 ← phi( compare::@20/(word) compare::w2#11 ) + (word) compare::w1#12 ← phi( compare::@20/(word) compare::w1#11 ) + (byte) compare::op#5 ← phi( compare::@20/(byte) compare::op#4 ) + (bool~) compare::$4 ← (byte) compare::op#5 == (byte/signed byte/word/signed word/dword/signed dword) 4 + if((bool~) compare::$4) goto compare::@5 + to:compare::@22 +compare::@5: scope:[compare] from compare::@21 + (byte) compare::r#23 ← phi( compare::@21/(byte) compare::r#31 ) + (byte*) print_char_cursor#86 ← phi( compare::@21/(byte*) print_char_cursor#101 ) + (word) compare::w2#5 ← phi( compare::@21/(word) compare::w2#12 ) + (word) compare::w1#5 ← phi( compare::@21/(word) compare::w1#12 ) + (bool~) compare::$9 ← (word) compare::w1#5 == (word) compare::w2#5 + (bool~) compare::$10 ← ! (bool~) compare::$9 + if((bool~) compare::$10) goto compare::@9 + to:compare::@26 +compare::@22: scope:[compare] from compare::@21 + (byte) compare::r#21 ← phi( compare::@21/(byte) compare::r#31 ) + (byte*) compare::ops#11 ← phi( compare::@21/(byte*) compare::ops#12 ) + (byte*) print_char_cursor#82 ← phi( compare::@21/(byte*) print_char_cursor#101 ) + (word) compare::w2#13 ← phi( compare::@21/(word) compare::w2#12 ) + (word) compare::w1#13 ← phi( compare::@21/(word) compare::w1#12 ) + (byte) compare::op#6 ← phi( compare::@21/(byte) compare::op#5 ) + (bool~) compare::$5 ← (byte) compare::op#6 == (byte/signed byte/word/signed word/dword/signed dword) 5 + (bool~) compare::$6 ← ! (bool~) compare::$5 + if((bool~) compare::$6) goto compare::@6 + to:compare::@23 +compare::@6: scope:[compare] from compare::@22 + (byte) compare::r#18 ← phi( compare::@22/(byte) compare::r#21 ) + (word) compare::w2#22 ← phi( compare::@22/(word) compare::w2#13 ) + (byte*) compare::ops#10 ← phi( compare::@22/(byte*) compare::ops#11 ) + (byte*) print_char_cursor#74 ← phi( compare::@22/(byte*) print_char_cursor#82 ) + (word) compare::w1#18 ← phi( compare::@22/(word) compare::w1#13 ) + to:compare::@16 +compare::@23: scope:[compare] from compare::@22 + (byte) compare::r#22 ← phi( compare::@22/(byte) compare::r#21 ) + (byte*) print_char_cursor#83 ← phi( compare::@22/(byte*) print_char_cursor#82 ) + (word) compare::w2#6 ← phi( compare::@22/(word) compare::w2#13 ) + (word) compare::w1#6 ← phi( compare::@22/(word) compare::w1#13 ) + (bool~) compare::$7 ← (word) compare::w1#6 != (word) compare::w2#6 + (bool~) compare::$8 ← ! (bool~) compare::$7 + if((bool~) compare::$8) goto compare::@7 + to:compare::@24 +compare::@7: scope:[compare] from compare::@23 compare::@24 + (byte) compare::r#19 ← phi( compare::@23/(byte) compare::r#22 compare::@24/(byte) compare::r#1 ) + (word) compare::w2#23 ← phi( compare::@23/(word) compare::w2#6 compare::@24/(word) compare::w2#25 ) + (byte*) print_char_cursor#75 ← phi( compare::@23/(byte*) print_char_cursor#83 compare::@24/(byte*) print_char_cursor#84 ) + (word) compare::w1#19 ← phi( compare::@23/(word) compare::w1#6 compare::@24/(word) compare::w1#21 ) + (byte*) compare::ops#1 ← (const string) compare::$27 + to:compare::@16 +compare::@24: scope:[compare] from compare::@23 + (word) compare::w2#25 ← phi( compare::@23/(word) compare::w2#6 ) + (byte*) print_char_cursor#84 ← phi( compare::@23/(byte*) print_char_cursor#83 ) + (word) compare::w1#21 ← phi( compare::@23/(word) compare::w1#6 ) + (byte) compare::r#1 ← (byte) '+' + to:compare::@7 +compare::@9: scope:[compare] from compare::@26 compare::@5 + (byte) compare::r#20 ← phi( compare::@26/(byte) compare::r#2 compare::@5/(byte) compare::r#23 ) + (word) compare::w2#24 ← phi( compare::@26/(word) compare::w2#26 compare::@5/(word) compare::w2#5 ) + (byte*) print_char_cursor#76 ← phi( compare::@26/(byte*) print_char_cursor#85 compare::@5/(byte*) print_char_cursor#86 ) + (word) compare::w1#20 ← phi( compare::@26/(word) compare::w1#22 compare::@5/(word) compare::w1#5 ) + (byte*) compare::ops#2 ← (const string) compare::$28 + to:compare::@16 +compare::@26: scope:[compare] from compare::@5 + (word) compare::w2#26 ← phi( compare::@5/(word) compare::w2#5 ) + (byte*) print_char_cursor#85 ← phi( compare::@5/(byte*) print_char_cursor#86 ) + (word) compare::w1#22 ← phi( compare::@5/(word) compare::w1#5 ) + (byte) compare::r#2 ← (byte) '+' + to:compare::@9 +compare::@11: scope:[compare] from compare::@28 compare::@4 + (byte) compare::r#14 ← phi( compare::@28/(byte) compare::r#3 compare::@4/(byte) compare::r#24 ) + (word) compare::w2#18 ← phi( compare::@28/(word) compare::w2#27 compare::@4/(word) compare::w2#4 ) + (byte*) print_char_cursor#70 ← phi( compare::@28/(byte*) print_char_cursor#87 compare::@4/(byte*) print_char_cursor#88 ) + (word) compare::w1#14 ← phi( compare::@28/(word) compare::w1#23 compare::@4/(word) compare::w1#4 ) + (byte*) compare::ops#3 ← (const string) compare::$29 + to:compare::@16 +compare::@28: scope:[compare] from compare::@4 + (word) compare::w2#27 ← phi( compare::@4/(word) compare::w2#4 ) + (byte*) print_char_cursor#87 ← phi( compare::@4/(byte*) print_char_cursor#88 ) + (word) compare::w1#23 ← phi( compare::@4/(word) compare::w1#4 ) + (byte) compare::r#3 ← (byte) '+' + to:compare::@11 +compare::@13: scope:[compare] from compare::@3 compare::@30 + (byte) compare::r#15 ← phi( compare::@3/(byte) compare::r#25 compare::@30/(byte) compare::r#4 ) + (word) compare::w2#19 ← phi( compare::@3/(word) compare::w2#3 compare::@30/(word) compare::w2#28 ) + (byte*) print_char_cursor#71 ← phi( compare::@3/(byte*) print_char_cursor#89 compare::@30/(byte*) print_char_cursor#90 ) + (word) compare::w1#15 ← phi( compare::@3/(word) compare::w1#3 compare::@30/(word) compare::w1#24 ) + (byte*) compare::ops#4 ← (const string) compare::$30 + to:compare::@16 +compare::@30: scope:[compare] from compare::@3 + (word) compare::w2#28 ← phi( compare::@3/(word) compare::w2#3 ) + (byte*) print_char_cursor#90 ← phi( compare::@3/(byte*) print_char_cursor#89 ) + (word) compare::w1#24 ← phi( compare::@3/(word) compare::w1#3 ) + (byte) compare::r#4 ← (byte) '+' + to:compare::@13 +compare::@15: scope:[compare] from compare::@2 compare::@32 + (byte) compare::r#16 ← phi( compare::@2/(byte) compare::r#26 compare::@32/(byte) compare::r#5 ) + (word) compare::w2#20 ← phi( compare::@2/(word) compare::w2#2 compare::@32/(word) compare::w2#29 ) + (byte*) print_char_cursor#72 ← phi( compare::@2/(byte*) print_char_cursor#91 compare::@32/(byte*) print_char_cursor#92 ) + (word) compare::w1#16 ← phi( compare::@2/(word) compare::w1#2 compare::@32/(word) compare::w1#25 ) + (byte*) compare::ops#5 ← (const string) compare::$31 + to:compare::@16 +compare::@32: scope:[compare] from compare::@2 + (word) compare::w2#29 ← phi( compare::@2/(word) compare::w2#2 ) + (byte*) print_char_cursor#92 ← phi( compare::@2/(byte*) print_char_cursor#91 ) + (word) compare::w1#25 ← phi( compare::@2/(word) compare::w1#2 ) + (byte) compare::r#5 ← (byte) '+' + to:compare::@15 +compare::@16: scope:[compare] from compare::@11 compare::@13 compare::@15 compare::@17 compare::@6 compare::@7 compare::@9 + (byte) compare::r#13 ← phi( compare::@11/(byte) compare::r#14 compare::@13/(byte) compare::r#15 compare::@15/(byte) compare::r#16 compare::@17/(byte) compare::r#17 compare::@6/(byte) compare::r#18 compare::@7/(byte) compare::r#19 compare::@9/(byte) compare::r#20 ) + (word) compare::w2#17 ← phi( compare::@11/(word) compare::w2#18 compare::@13/(word) compare::w2#19 compare::@15/(word) compare::w2#20 compare::@17/(word) compare::w2#21 compare::@6/(word) compare::w2#22 compare::@7/(word) compare::w2#23 compare::@9/(word) compare::w2#24 ) + (byte*) compare::ops#9 ← phi( compare::@11/(byte*) compare::ops#3 compare::@13/(byte*) compare::ops#4 compare::@15/(byte*) compare::ops#5 compare::@17/(byte*) compare::ops#6 compare::@6/(byte*) compare::ops#10 compare::@7/(byte*) compare::ops#1 compare::@9/(byte*) compare::ops#2 ) + (byte*) print_char_cursor#64 ← phi( compare::@11/(byte*) print_char_cursor#70 compare::@13/(byte*) print_char_cursor#71 compare::@15/(byte*) print_char_cursor#72 compare::@17/(byte*) print_char_cursor#73 compare::@6/(byte*) print_char_cursor#74 compare::@7/(byte*) print_char_cursor#75 compare::@9/(byte*) print_char_cursor#76 ) + (word) compare::w1#7 ← phi( compare::@11/(word) compare::w1#14 compare::@13/(word) compare::w1#15 compare::@15/(word) compare::w1#16 compare::@17/(word) compare::w1#17 compare::@6/(word) compare::w1#18 compare::@7/(word) compare::w1#19 compare::@9/(word) compare::w1#20 ) + (word) print_word::w#0 ← (word) compare::w1#7 + call print_word + to:compare::@35 +compare::@35: scope:[compare] from compare::@16 + (byte) compare::r#12 ← phi( compare::@16/(byte) compare::r#13 ) + (word) compare::w2#16 ← phi( compare::@16/(word) compare::w2#17 ) + (byte*) compare::ops#8 ← phi( compare::@16/(byte*) compare::ops#9 ) + (byte*) print_char_cursor#46 ← phi( compare::@16/(byte*) print_char_cursor#7 ) + (byte*) print_char_cursor#19 ← (byte*) print_char_cursor#46 + (byte*) print_str::str#1 ← (const string) compare::str + call print_str + to:compare::@36 +compare::@36: scope:[compare] from compare::@35 + (byte) compare::r#11 ← phi( compare::@35/(byte) compare::r#12 ) + (word) compare::w2#15 ← phi( compare::@35/(word) compare::w2#16 ) + (byte*) compare::ops#7 ← phi( compare::@35/(byte*) compare::ops#8 ) + (byte*) print_char_cursor#47 ← phi( compare::@35/(byte*) print_char_cursor#2 ) + (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#47 + (byte*) print_str::str#2 ← (byte*) compare::ops#7 + call print_str + to:compare::@37 +compare::@37: scope:[compare] from compare::@36 + (byte) compare::r#10 ← phi( compare::@36/(byte) compare::r#11 ) + (word) compare::w2#14 ← phi( compare::@36/(word) compare::w2#15 ) + (byte*) print_char_cursor#48 ← phi( compare::@36/(byte*) print_char_cursor#2 ) + (byte*) print_char_cursor#21 ← (byte*) print_char_cursor#48 + (byte*) print_str::str#3 ← (const string) compare::str1 + call print_str + to:compare::@38 +compare::@38: scope:[compare] from compare::@37 + (byte) compare::r#9 ← phi( compare::@37/(byte) compare::r#10 ) + (word) compare::w2#7 ← phi( compare::@37/(word) compare::w2#14 ) + (byte*) print_char_cursor#49 ← phi( compare::@37/(byte*) print_char_cursor#2 ) + (byte*) print_char_cursor#22 ← (byte*) print_char_cursor#49 + (word) print_word::w#1 ← (word) compare::w2#7 + call print_word + to:compare::@39 +compare::@39: scope:[compare] from compare::@38 + (byte) compare::r#8 ← phi( compare::@38/(byte) compare::r#9 ) + (byte*) print_char_cursor#50 ← phi( compare::@38/(byte*) print_char_cursor#7 ) + (byte*) print_char_cursor#23 ← (byte*) print_char_cursor#50 + (byte*) print_str::str#4 ← (const string) compare::str2 + call print_str + to:compare::@40 +compare::@40: scope:[compare] from compare::@39 + (byte) compare::r#7 ← phi( compare::@39/(byte) compare::r#8 ) + (byte*) print_char_cursor#51 ← phi( compare::@39/(byte*) print_char_cursor#2 ) + (byte*) print_char_cursor#24 ← (byte*) print_char_cursor#51 + (byte) print_char::ch#2 ← (byte) compare::r#7 + call print_char + to:compare::@41 +compare::@41: scope:[compare] from compare::@40 + (byte*) print_char_cursor#52 ← phi( compare::@40/(byte*) print_char_cursor#12 ) + (byte*) print_char_cursor#25 ← (byte*) print_char_cursor#52 + (byte*) print_str::str#5 ← (const string) compare::str3 + call print_str + to:compare::@42 +compare::@42: scope:[compare] from compare::@41 + (byte*) print_char_cursor#53 ← phi( compare::@41/(byte*) print_char_cursor#2 ) + (byte*) print_char_cursor#26 ← (byte*) print_char_cursor#53 + to:compare::@return +compare::@17: scope:[compare] from compare::@1 compare::@34 + (byte) compare::r#17 ← phi( compare::@1/(byte) compare::r#27 compare::@34/(byte) compare::r#6 ) + (word) compare::w2#21 ← phi( compare::@1/(word) compare::w2#1 compare::@34/(word) compare::w2#30 ) + (byte*) print_char_cursor#73 ← phi( compare::@1/(byte*) print_char_cursor#93 compare::@34/(byte*) print_char_cursor#94 ) + (word) compare::w1#17 ← phi( compare::@1/(word) compare::w1#1 compare::@34/(word) compare::w1#26 ) + (byte*) compare::ops#6 ← (const string) compare::$32 + to:compare::@16 +compare::@34: scope:[compare] from compare::@1 + (word) compare::w2#30 ← phi( compare::@1/(word) compare::w2#1 ) + (byte*) print_char_cursor#94 ← phi( compare::@1/(byte*) print_char_cursor#93 ) + (word) compare::w1#26 ← phi( compare::@1/(word) compare::w1#1 ) + (byte) compare::r#6 ← (byte) '+' + to:compare::@17 +compare::@return: scope:[compare] from compare::@42 + (byte*) print_char_cursor#54 ← phi( compare::@42/(byte*) print_char_cursor#26 ) + (byte*) print_char_cursor#27 ← (byte*) print_char_cursor#54 + return + to:@return +@25: scope:[] from @23 + (byte*) print_screen#5 ← phi( @23/(byte*) print_screen#6 ) + (byte*) print_char_cursor#65 ← phi( @23/(byte*) print_char_cursor#77 ) + (byte*) print_line_cursor#21 ← phi( @23/(byte*) print_line_cursor#25 ) + call main + to:@26 +@26: scope:[] from @25 + (byte*) print_char_cursor#55 ← phi( @25/(byte*) print_char_cursor#18 ) + (byte*) print_line_cursor#16 ← phi( @25/(byte*) print_line_cursor#7 ) + (byte*) print_line_cursor#8 ← (byte*) print_line_cursor#16 + (byte*) print_char_cursor#28 ← (byte*) print_char_cursor#55 + to:@end +@end: scope:[] from @26 + +SYMBOL TABLE SSA +(const string) $0 = (string) "0123456789abcdef" +(label) @16 +(label) @23 +(label) @25 +(label) @26 +(label) @4 +(label) @begin +(label) @end +(byte*) BGCOL +(byte*) BGCOL#0 +(byte*) BGCOL1 +(byte*) BGCOL1#0 +(byte*) BGCOL2 +(byte*) BGCOL2#0 +(byte*) BGCOL3 +(byte*) BGCOL3#0 +(byte*) BGCOL4 +(byte*) BGCOL4#0 +(byte) BLACK +(byte) BLACK#0 +(byte) BLUE +(byte) BLUE#0 +(byte*) BORDERCOL +(byte*) BORDERCOL#0 +(byte) BROWN +(byte) BROWN#0 +(byte*) CHARGEN +(byte*) CHARGEN#0 +(byte*) CIA1_INTERRUPT +(byte*) CIA1_INTERRUPT#0 +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A#0 +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_A_DDR#0 +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B#0 +(byte*) CIA1_PORT_B_DDR +(byte*) CIA1_PORT_B_DDR#0 +(byte*) CIA2_INTERRUPT +(byte*) CIA2_INTERRUPT#0 +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A#0 +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_A_DDR#0 +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B#0 +(byte*) CIA2_PORT_B_DDR +(byte*) CIA2_PORT_B_DDR#0 +(byte) CIA_INTERRUPT_CLEAR +(byte) CIA_INTERRUPT_CLEAR#0 +(byte*) COLS +(byte*) COLS#0 +(byte) CYAN +(byte) CYAN#0 +(byte*) D011 +(byte*) D011#0 +(byte*) D016 +(byte*) D016#0 +(byte*) D018 +(byte*) D018#0 +(byte) DARK_GREY +(byte) DARK_GREY#0 +(byte) GREEN +(byte) GREEN#0 +(byte) GREY +(byte) GREY#0 +(void()**) HARDWARE_IRQ +(void()**) HARDWARE_IRQ#0 +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_BG#0 +(byte) IRQ_COLLISION_SPRITE +(byte) IRQ_COLLISION_SPRITE#0 +(byte*) IRQ_ENABLE +(byte*) IRQ_ENABLE#0 +(byte) IRQ_LIGHTPEN +(byte) IRQ_LIGHTPEN#0 +(byte) IRQ_RASTER +(byte) IRQ_RASTER#0 +(byte*) IRQ_STATUS +(byte*) IRQ_STATUS#0 +(void()**) KERNEL_IRQ +(void()**) KERNEL_IRQ#0 +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_X#0 +(byte*) LIGHTPEN_Y +(byte*) LIGHTPEN_Y#0 +(byte) LIGHT_BLUE +(byte) LIGHT_BLUE#0 +(byte) LIGHT_GREEN +(byte) LIGHT_GREEN#0 +(byte) LIGHT_GREY +(byte) LIGHT_GREY#0 +(byte) ORANGE +(byte) ORANGE#0 +(byte) PINK +(byte) PINK#0 +(byte*) PROCPORT +(byte*) PROCPORT#0 +(byte) PROCPORT_BASIC_KERNEL_IO +(byte) PROCPORT_BASIC_KERNEL_IO#0 +(byte*) PROCPORT_DDR +(byte*) PROCPORT_DDR#0 +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_DDR_MEMORY_MASK#0 +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_KERNEL_IO#0 +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_ALL#0 +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_CHARROM#0 +(byte) PROCPORT_RAM_IO +(byte) PROCPORT_RAM_IO#0 +(byte) PURPLE +(byte) PURPLE#0 +(byte*) RASTER +(byte*) RASTER#0 +(byte) RED +(byte) RED#0 +(byte*) SPRITES_COLS +(byte*) SPRITES_COLS#0 +(byte*) SPRITES_ENABLE +(byte*) SPRITES_ENABLE#0 +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_X#0 +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_EXPAND_Y#0 +(byte*) SPRITES_MC +(byte*) SPRITES_MC#0 +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC1#0 +(byte*) SPRITES_MC2 +(byte*) SPRITES_MC2#0 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_PRIORITY#0 +(byte*) SPRITES_XMSB +(byte*) SPRITES_XMSB#0 +(byte*) SPRITES_XPOS +(byte*) SPRITES_XPOS#0 +(byte*) SPRITES_YPOS +(byte*) SPRITES_YPOS#0 +(word) SPRITE_PTRS +(word) SPRITE_PTRS#0 +(byte) VIC_BMM +(byte) VIC_BMM#0 +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL#0 +(byte*) VIC_CONTROL2 +(byte*) VIC_CONTROL2#0 +(byte) VIC_CSEL +(byte) VIC_CSEL#0 +(byte) VIC_DEN +(byte) VIC_DEN#0 +(byte) VIC_ECM +(byte) VIC_ECM#0 +(byte) VIC_MCM +(byte) VIC_MCM#0 +(byte*) VIC_MEMORY +(byte*) VIC_MEMORY#0 +(byte) VIC_RSEL +(byte) VIC_RSEL#0 +(byte) VIC_RST8 +(byte) VIC_RST8#0 +(byte) WHITE +(byte) WHITE#0 +(byte) YELLOW +(byte) YELLOW#0 +(void()) compare((word) compare::w1 , (word) compare::w2 , (byte) compare::op) +(bool~) compare::$0 +(bool~) compare::$1 +(bool~) compare::$10 +(bool~) compare::$11 +(bool~) compare::$12 +(bool~) compare::$13 +(bool~) compare::$14 +(bool~) compare::$15 +(bool~) compare::$16 +(bool~) compare::$17 +(bool~) compare::$18 +(bool~) compare::$2 +(const string) compare::$27 = (string) "!=@" +(const string) compare::$28 = (string) "==@" +(const string) compare::$29 = (string) ">=@" +(bool~) compare::$3 +(const string) compare::$30 = (string) "> @" +(const string) compare::$31 = (string) "<=@" +(const string) compare::$32 = (string) "< @" +(bool~) compare::$4 +(bool~) compare::$5 +(bool~) compare::$6 +(bool~) compare::$7 +(bool~) compare::$8 +(bool~) compare::$9 +(label) compare::@1 +(label) compare::@11 +(label) compare::@13 +(label) compare::@15 +(label) compare::@16 +(label) compare::@17 +(label) compare::@18 +(label) compare::@19 +(label) compare::@2 +(label) compare::@20 +(label) compare::@21 +(label) compare::@22 +(label) compare::@23 +(label) compare::@24 +(label) compare::@26 +(label) compare::@28 +(label) compare::@3 +(label) compare::@30 +(label) compare::@32 +(label) compare::@34 +(label) compare::@35 +(label) compare::@36 +(label) compare::@37 +(label) compare::@38 +(label) compare::@39 +(label) compare::@4 +(label) compare::@40 +(label) compare::@41 +(label) compare::@42 +(label) compare::@5 +(label) compare::@6 +(label) compare::@7 +(label) compare::@9 +(label) compare::@return +(byte) compare::op +(byte) compare::op#0 +(byte) compare::op#1 +(byte) compare::op#2 +(byte) compare::op#3 +(byte) compare::op#4 +(byte) compare::op#5 +(byte) compare::op#6 +(byte*) compare::ops +(byte*) compare::ops#0 +(byte*) compare::ops#1 +(byte*) compare::ops#10 +(byte*) compare::ops#11 +(byte*) compare::ops#12 +(byte*) compare::ops#13 +(byte*) compare::ops#14 +(byte*) compare::ops#15 +(byte*) compare::ops#2 +(byte*) compare::ops#3 +(byte*) compare::ops#4 +(byte*) compare::ops#5 +(byte*) compare::ops#6 +(byte*) compare::ops#7 +(byte*) compare::ops#8 +(byte*) compare::ops#9 +(byte) compare::r +(byte) compare::r#0 +(byte) compare::r#1 +(byte) compare::r#10 +(byte) compare::r#11 +(byte) compare::r#12 +(byte) compare::r#13 +(byte) compare::r#14 +(byte) compare::r#15 +(byte) compare::r#16 +(byte) compare::r#17 +(byte) compare::r#18 +(byte) compare::r#19 +(byte) compare::r#2 +(byte) compare::r#20 +(byte) compare::r#21 +(byte) compare::r#22 +(byte) compare::r#23 +(byte) compare::r#24 +(byte) compare::r#25 +(byte) compare::r#26 +(byte) compare::r#27 +(byte) compare::r#28 +(byte) compare::r#29 +(byte) compare::r#3 +(byte) compare::r#30 +(byte) compare::r#31 +(byte) compare::r#4 +(byte) compare::r#5 +(byte) compare::r#6 +(byte) compare::r#7 +(byte) compare::r#8 +(byte) compare::r#9 +(const string) compare::str = (string) " @" +(const string) compare::str1 = (string) " @" +(const string) compare::str2 = (string) " @" +(const string) compare::str3 = (string) " @" +(word) compare::w1 +(word) compare::w1#0 +(word) compare::w1#1 +(word) compare::w1#10 +(word) compare::w1#11 +(word) compare::w1#12 +(word) compare::w1#13 +(word) compare::w1#14 +(word) compare::w1#15 +(word) compare::w1#16 +(word) compare::w1#17 +(word) compare::w1#18 +(word) compare::w1#19 +(word) compare::w1#2 +(word) compare::w1#20 +(word) compare::w1#21 +(word) compare::w1#22 +(word) compare::w1#23 +(word) compare::w1#24 +(word) compare::w1#25 +(word) compare::w1#26 +(word) compare::w1#3 +(word) compare::w1#4 +(word) compare::w1#5 +(word) compare::w1#6 +(word) compare::w1#7 +(word) compare::w1#8 +(word) compare::w1#9 +(word) compare::w2 +(word) compare::w2#0 +(word) compare::w2#1 +(word) compare::w2#10 +(word) compare::w2#11 +(word) compare::w2#12 +(word) compare::w2#13 +(word) compare::w2#14 +(word) compare::w2#15 +(word) compare::w2#16 +(word) compare::w2#17 +(word) compare::w2#18 +(word) compare::w2#19 +(word) compare::w2#2 +(word) compare::w2#20 +(word) compare::w2#21 +(word) compare::w2#22 +(word) compare::w2#23 +(word) compare::w2#24 +(word) compare::w2#25 +(word) compare::w2#26 +(word) compare::w2#27 +(word) compare::w2#28 +(word) compare::w2#29 +(word) compare::w2#3 +(word) compare::w2#30 +(word) compare::w2#4 +(word) compare::w2#5 +(word) compare::w2#6 +(word) compare::w2#7 +(word) compare::w2#8 +(word) compare::w2#9 +(void()) main() +(byte~) main::$1 +(bool~) main::$10 +(bool~) main::$11 +(bool~) main::$12 +(byte~) main::$2 +(bool~) main::$3 +(bool~) main::$4 +(byte~) main::$6 +(bool~) main::$7 +(bool~) main::$8 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@17 +(label) main::@18 +(label) main::@19 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@9 +(label) main::@return +(byte) main::i +(byte) main::i#0 +(byte) main::i#1 +(byte) main::i#10 +(byte) main::i#11 +(byte) main::i#12 +(byte) main::i#2 +(byte) main::i#3 +(byte) main::i#4 +(byte) main::i#5 +(byte) main::i#6 +(byte) main::i#7 +(byte) main::i#8 +(byte) main::i#9 +(byte) main::j +(byte) main::j#0 +(byte) main::j#1 +(byte) main::j#10 +(byte) main::j#2 +(byte) main::j#3 +(byte) main::j#4 +(byte) main::j#5 +(byte) main::j#6 +(byte) main::j#7 +(byte) main::j#8 +(byte) main::j#9 +(byte) main::ln +(byte) main::ln#0 +(byte) main::ln#1 +(byte) main::ln#10 +(byte) main::ln#11 +(byte) main::ln#12 +(byte) main::ln#2 +(byte) main::ln#3 +(byte) main::ln#4 +(byte) main::ln#5 +(byte) main::ln#6 +(byte) main::ln#7 +(byte) main::ln#8 +(byte) main::ln#9 +(byte) main::op +(byte) main::op#0 +(byte) main::op#1 +(byte) main::op#2 +(byte) main::op#3 +(byte) main::op#4 +(byte) main::op#5 +(byte) main::op#6 +(byte) main::op#7 +(byte) main::op#8 +(word) main::w1 +(word) main::w1#0 +(word) main::w1#1 +(word) main::w1#2 +(word) main::w1#3 +(word) main::w1#4 +(word) main::w1#5 +(word) main::w1#6 +(word) main::w1#7 +(word) main::w1#8 +(word) main::w1#9 +(word) main::w2 +(word) main::w2#0 +(word) main::w2#1 +(word) main::w2#2 +(word) main::w2#3 +(word) main::w2#4 +(word) main::w2#5 +(word) main::w2#6 +(word) main::w2#7 +(void()) print_byte((byte) print_byte::b) +(byte~) print_byte::$0 +(byte~) print_byte::$2 +(label) print_byte::@1 +(label) print_byte::@2 +(label) print_byte::@return +(byte) print_byte::b +(byte) print_byte::b#0 +(byte) print_byte::b#1 +(byte) print_byte::b#2 +(byte) print_byte::b#3 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(byte) print_char::ch#0 +(byte) print_char::ch#1 +(byte) print_char::ch#2 +(byte) print_char::ch#3 +(byte*) print_char_cursor +(byte*) print_char_cursor#0 +(byte*) print_char_cursor#1 +(byte*) print_char_cursor#10 +(byte*) print_char_cursor#100 +(byte*) print_char_cursor#101 +(byte*) print_char_cursor#11 +(byte*) print_char_cursor#12 +(byte*) print_char_cursor#13 +(byte*) print_char_cursor#14 +(byte*) print_char_cursor#15 +(byte*) print_char_cursor#16 +(byte*) print_char_cursor#17 +(byte*) print_char_cursor#18 +(byte*) print_char_cursor#19 +(byte*) print_char_cursor#2 +(byte*) print_char_cursor#20 +(byte*) print_char_cursor#21 +(byte*) print_char_cursor#22 +(byte*) print_char_cursor#23 +(byte*) print_char_cursor#24 +(byte*) print_char_cursor#25 +(byte*) print_char_cursor#26 +(byte*) print_char_cursor#27 +(byte*) print_char_cursor#28 +(byte*) print_char_cursor#29 +(byte*) print_char_cursor#3 +(byte*) print_char_cursor#30 +(byte*) print_char_cursor#31 +(byte*) print_char_cursor#32 +(byte*) print_char_cursor#33 +(byte*) print_char_cursor#34 +(byte*) print_char_cursor#35 +(byte*) print_char_cursor#36 +(byte*) print_char_cursor#37 +(byte*) print_char_cursor#38 +(byte*) print_char_cursor#39 +(byte*) print_char_cursor#4 +(byte*) print_char_cursor#40 +(byte*) print_char_cursor#41 +(byte*) print_char_cursor#42 +(byte*) print_char_cursor#43 +(byte*) print_char_cursor#44 +(byte*) print_char_cursor#45 +(byte*) print_char_cursor#46 +(byte*) print_char_cursor#47 +(byte*) print_char_cursor#48 +(byte*) print_char_cursor#49 +(byte*) print_char_cursor#5 +(byte*) print_char_cursor#50 +(byte*) print_char_cursor#51 +(byte*) print_char_cursor#52 +(byte*) print_char_cursor#53 +(byte*) print_char_cursor#54 +(byte*) print_char_cursor#55 +(byte*) print_char_cursor#56 +(byte*) print_char_cursor#57 +(byte*) print_char_cursor#58 +(byte*) print_char_cursor#59 +(byte*) print_char_cursor#6 +(byte*) print_char_cursor#60 +(byte*) print_char_cursor#61 +(byte*) print_char_cursor#62 +(byte*) print_char_cursor#63 +(byte*) print_char_cursor#64 +(byte*) print_char_cursor#65 +(byte*) print_char_cursor#66 +(byte*) print_char_cursor#67 +(byte*) print_char_cursor#68 +(byte*) print_char_cursor#69 +(byte*) print_char_cursor#7 +(byte*) print_char_cursor#70 +(byte*) print_char_cursor#71 +(byte*) print_char_cursor#72 +(byte*) print_char_cursor#73 +(byte*) print_char_cursor#74 +(byte*) print_char_cursor#75 +(byte*) print_char_cursor#76 +(byte*) print_char_cursor#77 +(byte*) print_char_cursor#78 +(byte*) print_char_cursor#79 +(byte*) print_char_cursor#8 +(byte*) print_char_cursor#80 +(byte*) print_char_cursor#81 +(byte*) print_char_cursor#82 +(byte*) print_char_cursor#83 +(byte*) print_char_cursor#84 +(byte*) print_char_cursor#85 +(byte*) print_char_cursor#86 +(byte*) print_char_cursor#87 +(byte*) print_char_cursor#88 +(byte*) print_char_cursor#89 +(byte*) print_char_cursor#9 +(byte*) print_char_cursor#90 +(byte*) print_char_cursor#91 +(byte*) print_char_cursor#92 +(byte*) print_char_cursor#93 +(byte*) print_char_cursor#94 +(byte*) print_char_cursor#95 +(byte*) print_char_cursor#96 +(byte*) print_char_cursor#97 +(byte*) print_char_cursor#98 +(byte*) print_char_cursor#99 +(void()) print_cls() +(byte*~) print_cls::$0 +(bool~) print_cls::$1 +(label) print_cls::@1 +(label) print_cls::@2 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#0 +(byte*) print_cls::sc#1 +(byte*) print_cls::sc#2 +(byte[]) print_hextab +(byte[]) print_hextab#0 +(byte*) print_line_cursor +(byte*) print_line_cursor#0 +(byte*) print_line_cursor#1 +(byte*) print_line_cursor#10 +(byte*) print_line_cursor#11 +(byte*) print_line_cursor#12 +(byte*) print_line_cursor#13 +(byte*) print_line_cursor#14 +(byte*) print_line_cursor#15 +(byte*) print_line_cursor#16 +(byte*) print_line_cursor#17 +(byte*) print_line_cursor#18 +(byte*) print_line_cursor#19 +(byte*) print_line_cursor#2 +(byte*) print_line_cursor#20 +(byte*) print_line_cursor#21 +(byte*) print_line_cursor#22 +(byte*) print_line_cursor#23 +(byte*) print_line_cursor#24 +(byte*) print_line_cursor#25 +(byte*) print_line_cursor#26 +(byte*) print_line_cursor#27 +(byte*) print_line_cursor#28 +(byte*) print_line_cursor#29 +(byte*) print_line_cursor#3 +(byte*) print_line_cursor#30 +(byte*) print_line_cursor#31 +(byte*) print_line_cursor#32 +(byte*) print_line_cursor#33 +(byte*) print_line_cursor#4 +(byte*) print_line_cursor#5 +(byte*) print_line_cursor#6 +(byte*) print_line_cursor#7 +(byte*) print_line_cursor#8 +(byte*) print_line_cursor#9 +(void()) print_ln() +(byte*~) print_ln::$0 +(bool~) print_ln::$1 +(label) print_ln::@1 +(label) print_ln::@2 +(label) print_ln::@return +(byte*) print_screen +(byte*) print_screen#0 +(byte*) print_screen#1 +(byte*) print_screen#2 +(byte*) print_screen#3 +(byte*) print_screen#4 +(byte*) print_screen#5 +(byte*) print_screen#6 +(byte*) print_screen#7 +(void()) print_str((byte*) print_str::str) +(bool~) print_str::$0 +(label) print_str::@1 +(label) print_str::@2 +(label) print_str::@return +(byte*) print_str::str +(byte*) print_str::str#0 +(byte*) print_str::str#1 +(byte*) print_str::str#2 +(byte*) print_str::str#3 +(byte*) print_str::str#4 +(byte*) print_str::str#5 +(byte*) print_str::str#6 +(byte*) print_str::str#7 +(byte*) print_str::str#8 +(void()) print_word((word) print_word::w) +(byte~) print_word::$0 +(byte~) print_word::$2 +(label) print_word::@1 +(label) print_word::@2 +(label) print_word::@return +(word) print_word::w +(word) print_word::w#0 +(word) print_word::w#1 +(word) print_word::w#2 +(word) print_word::w#3 +(word[]) words +(word[]) words#0 + +Inversing boolean not [175] (bool~) main::$4 ← (byte) main::ln#2 >= (byte/signed byte/word/signed word/dword/signed dword) $32 from [174] (bool~) main::$3 ← (byte) main::ln#2 < (byte/signed byte/word/signed word/dword/signed dword) $32 +Inversing boolean not [191] (bool~) main::$8 ← (byte~) main::$6 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [190] (bool~) main::$7 ← (byte~) main::$6 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [221] (bool~) compare::$18 ← (word) compare::w1#1 >= (word) compare::w2#1 from [220] (bool~) compare::$17 ← (word) compare::w1#1 < (word) compare::w2#1 +Inversing boolean not [228] (bool~) compare::$16 ← (word) compare::w1#2 > (word) compare::w2#2 from [227] (bool~) compare::$15 ← (word) compare::w1#2 <= (word) compare::w2#2 +Inversing boolean not [235] (bool~) compare::$14 ← (word) compare::w1#3 <= (word) compare::w2#3 from [234] (bool~) compare::$13 ← (word) compare::w1#3 > (word) compare::w2#3 +Inversing boolean not [242] (bool~) compare::$12 ← (word) compare::w1#4 < (word) compare::w2#4 from [241] (bool~) compare::$11 ← (word) compare::w1#4 >= (word) compare::w2#4 +Inversing boolean not [249] (bool~) compare::$10 ← (word) compare::w1#5 != (word) compare::w2#5 from [248] (bool~) compare::$9 ← (word) compare::w1#5 == (word) compare::w2#5 +Inversing boolean not [253] (bool~) compare::$6 ← (byte) compare::op#6 != (byte/signed byte/word/signed word/dword/signed dword) 5 from [252] (bool~) compare::$5 ← (byte) compare::op#6 == (byte/signed byte/word/signed word/dword/signed dword) 5 +Inversing boolean not [258] (bool~) compare::$8 ← (word) compare::w1#6 == (word) compare::w2#6 from [257] (bool~) compare::$7 ← (word) compare::w1#6 != (word) compare::w2#6 +Successful SSA optimization Pass2UnaryNotSimplification +Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#26 (byte*) print_char_cursor#78 (byte*) print_screen#7 (byte*) print_line_cursor#25 (byte*) print_char_cursor#77 (byte*) print_screen#6 (byte*) print_line_cursor#21 (byte*) print_char_cursor#65 (byte*) print_screen#5 +Alias (byte*) print_str::str#6 = (byte*) print_str::str#7 +Alias (byte*) print_char_cursor#2 = (byte*) print_char_cursor#29 (byte*) print_char_cursor#56 (byte*) print_char_cursor#30 +Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#10 (byte*) print_char_cursor#3 (byte*) print_line_cursor#11 (byte*) print_char_cursor#32 (byte*) print_line_cursor#2 (byte*) print_char_cursor#4 +Alias (byte) print_byte::b#0 = (byte~) print_word::$0 +Alias (word) print_word::w#2 = (word) print_word::w#3 +Alias (byte*) print_char_cursor#33 = (byte*) print_char_cursor#5 +Alias (byte) print_byte::b#1 = (byte~) print_word::$2 +Alias (byte*) print_char_cursor#34 = (byte*) print_char_cursor#6 (byte*) print_char_cursor#35 (byte*) print_char_cursor#7 +Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 +Alias (byte*) print_char_cursor#36 = (byte*) print_char_cursor#8 +Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#9 (byte*) print_char_cursor#37 (byte*) print_char_cursor#38 +Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#40 (byte*) print_char_cursor#12 +Alias (byte*) print_line_cursor#12 = (byte*) print_screen#3 (byte*) print_screen#2 (byte*) print_line_cursor#3 (byte*) print_char_cursor#13 (byte*) print_char_cursor#41 (byte*) print_line_cursor#4 (byte*) print_char_cursor#14 +Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#5 +Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#42 +Alias (word) main::w1#1 = (word) main::w1#2 (word) main::w1#8 (word) main::w1#7 (word) main::w1#9 (word) main::w1#6 +Alias (word) main::w2#1 = (word) main::w2#2 (word) main::w2#6 (word) main::w2#5 (word) main::w2#7 (word) main::w2#4 +Alias (byte) main::op#3 = (byte) main::op#5 (byte) main::op#7 (byte) main::op#6 (byte) main::op#8 (byte) main::op#4 +Alias (byte*) print_char_cursor#61 = (byte*) print_char_cursor#67 +Alias (byte) main::ln#2 = (byte) main::ln#6 (byte) main::ln#3 +Alias (byte*) print_line_cursor#19 = (byte*) print_line_cursor#27 (byte*) print_line_cursor#29 (byte*) print_line_cursor#22 (byte*) print_line_cursor#32 +Alias (byte) main::j#10 = (byte) main::j#6 (byte) main::j#8 (byte) main::j#7 (byte) main::j#9 (byte) main::j#5 +Alias (byte) main::i#10 = (byte) main::i#12 (byte) main::i#7 (byte) main::i#8 (byte) main::i#11 (byte) main::i#6 +Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#43 (byte*) print_char_cursor#96 (byte*) print_char_cursor#62 +Alias (byte) main::ln#1 = (byte) main::ln#10 (byte) main::ln#12 (byte) main::ln#9 +Alias (byte*) print_line_cursor#14 = (byte*) print_line_cursor#6 +Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#44 +Alias (byte) main::j#3 = (byte) main::j#4 +Alias (byte) main::i#3 = (byte) main::i#4 (byte) main::i#5 +Alias (byte) main::ln#11 = (byte) main::ln#8 (byte) main::ln#5 +Alias (word) main::w1#4 = (word) main::w1#5 +Alias (byte*) print_line_cursor#23 = (byte*) print_line_cursor#28 (byte*) print_line_cursor#30 +Alias (byte*) print_char_cursor#68 = (byte*) print_char_cursor#81 (byte*) print_char_cursor#80 +Alias (byte*) print_line_cursor#15 = (byte*) print_line_cursor#24 (byte*) print_line_cursor#20 (byte*) print_line_cursor#7 +Alias (byte*) print_char_cursor#18 = (byte*) print_char_cursor#69 (byte*) print_char_cursor#63 (byte*) print_char_cursor#45 +Alias (word) compare::w1#1 = (word) compare::w1#8 (word) compare::w1#9 (word) compare::w1#2 (word) compare::w1#10 (word) compare::w1#3 (word) compare::w1#11 (word) compare::w1#4 (word) compare::w1#12 (word) compare::w1#5 (word) compare::w1#13 (word) compare::w1#18 (word) compare::w1#6 (word) compare::w1#21 (word) compare::w1#22 (word) compare::w1#23 (word) compare::w1#24 (word) compare::w1#25 (word) compare::w1#26 +Alias (word) compare::w2#1 = (word) compare::w2#8 (word) compare::w2#9 (word) compare::w2#2 (word) compare::w2#10 (word) compare::w2#3 (word) compare::w2#11 (word) compare::w2#4 (word) compare::w2#12 (word) compare::w2#5 (word) compare::w2#13 (word) compare::w2#22 (word) compare::w2#6 (word) compare::w2#25 (word) compare::w2#26 (word) compare::w2#27 (word) compare::w2#28 (word) compare::w2#29 (word) compare::w2#30 +Alias (byte*) print_char_cursor#100 = (byte*) print_char_cursor#93 (byte*) print_char_cursor#97 (byte*) print_char_cursor#98 (byte*) print_char_cursor#91 (byte*) print_char_cursor#99 (byte*) print_char_cursor#89 (byte*) print_char_cursor#88 (byte*) print_char_cursor#101 (byte*) print_char_cursor#86 (byte*) print_char_cursor#82 (byte*) print_char_cursor#74 (byte*) print_char_cursor#83 (byte*) print_char_cursor#84 (byte*) print_char_cursor#85 (byte*) print_char_cursor#87 (byte*) print_char_cursor#90 (byte*) print_char_cursor#92 (byte*) print_char_cursor#94 +Alias (byte) compare::r#0 = (byte) compare::r#27 (byte) compare::r#28 (byte) compare::r#26 (byte) compare::r#29 (byte) compare::r#25 (byte) compare::r#30 (byte) compare::r#24 (byte) compare::r#31 (byte) compare::r#23 (byte) compare::r#21 (byte) compare::r#18 (byte) compare::r#22 +Alias (byte) compare::op#1 = (byte) compare::op#2 (byte) compare::op#3 (byte) compare::op#4 (byte) compare::op#5 (byte) compare::op#6 +Alias (byte*) compare::ops#0 = (byte*) compare::ops#15 (byte*) compare::ops#14 (byte*) compare::ops#13 (byte*) compare::ops#12 (byte*) compare::ops#11 (byte*) compare::ops#10 +Alias (byte*) compare::ops#7 = (byte*) compare::ops#8 (byte*) compare::ops#9 +Alias (word) compare::w2#14 = (word) compare::w2#16 (word) compare::w2#17 (word) compare::w2#15 (word) compare::w2#7 +Alias (byte) compare::r#10 = (byte) compare::r#12 (byte) compare::r#13 (byte) compare::r#11 (byte) compare::r#9 (byte) compare::r#8 (byte) compare::r#7 +Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#46 +Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#47 +Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#48 +Alias (byte*) print_char_cursor#22 = (byte*) print_char_cursor#49 +Alias (byte*) print_char_cursor#23 = (byte*) print_char_cursor#50 +Alias (byte*) print_char_cursor#24 = (byte*) print_char_cursor#51 +Alias (byte*) print_char_cursor#25 = (byte*) print_char_cursor#52 +Alias (byte*) print_char_cursor#26 = (byte*) print_char_cursor#53 (byte*) print_char_cursor#54 (byte*) print_char_cursor#27 +Alias (byte*) print_line_cursor#16 = (byte*) print_line_cursor#8 +Alias (byte*) print_char_cursor#28 = (byte*) print_char_cursor#55 +Successful SSA optimization Pass2AliasElimination +Alias (byte) main::op#2 = (byte) main::op#3 +Alias (byte) main::j#10 = (byte) main::j#3 +Alias (word) main::w1#1 = (word) main::w1#4 +Alias (word) main::w2#1 = (word) main::w2#3 +Alias (byte) main::i#10 = (byte) main::i#3 +Alias (word) compare::w1#1 = (word) compare::w1#19 (word) compare::w1#20 (word) compare::w1#14 (word) compare::w1#15 (word) compare::w1#16 (word) compare::w1#17 +Alias (byte*) print_char_cursor#100 = (byte*) print_char_cursor#75 (byte*) print_char_cursor#76 (byte*) print_char_cursor#70 (byte*) print_char_cursor#71 (byte*) print_char_cursor#72 (byte*) print_char_cursor#73 +Alias (word) compare::w2#1 = (word) compare::w2#23 (word) compare::w2#24 (word) compare::w2#18 (word) compare::w2#19 (word) compare::w2#20 (word) compare::w2#21 +Successful SSA optimization Pass2AliasElimination +Alias (word) compare::w1#1 = (word) compare::w1#7 +Alias (byte*) print_char_cursor#100 = (byte*) print_char_cursor#64 +Alias (word) compare::w2#1 = (word) compare::w2#14 +Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (byte*) print_char_cursor#31 +Self Phi Eliminated (byte*) print_line_cursor#12 +Self Phi Eliminated (word) main::w1#1 +Self Phi Eliminated (word) main::w2#1 +Self Phi Eliminated (byte) main::j#10 +Self Phi Eliminated (byte) main::i#10 +Self Phi Eliminated (byte*) print_line_cursor#15 +Self Phi Eliminated (byte*) print_char_cursor#18 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) print_line_cursor#17 (byte*) print_line_cursor#19 +Redundant Phi (byte*) print_char_cursor#57 (byte*) print_char_cursor#16 +Redundant Phi (byte*) print_char_cursor#31 (byte*) print_char_cursor#57 +Redundant Phi (byte*) print_char_cursor#33 (byte*) print_char_cursor#10 +Redundant Phi (byte*) print_char_cursor#34 (byte*) print_char_cursor#10 +Redundant Phi (byte*) print_char_cursor#36 (byte*) print_char_cursor#11 +Redundant Phi (byte*) print_char_cursor#10 (byte*) print_char_cursor#11 +Redundant Phi (byte*) print_screen#1 (byte*) print_screen#4 +Redundant Phi (byte*) print_line_cursor#12 (byte*) print_screen#1 +Redundant Phi (byte*) print_screen#4 (byte*) print_line_cursor#0 +Redundant Phi (byte*) print_line_cursor#18 (byte*) print_line_cursor#0 +Redundant Phi (byte*) print_char_cursor#60 (byte*) print_line_cursor#0 +Redundant Phi (byte*) print_line_cursor#13 (byte*) print_line_cursor#12 +Redundant Phi (byte*) print_char_cursor#15 (byte*) print_line_cursor#12 +Redundant Phi (word) main::w1#1 (word) main::w1#3 +Redundant Phi (word) main::w2#1 (word) main::w2#0 +Redundant Phi (byte) main::j#10 (byte) main::j#2 +Redundant Phi (byte) main::i#10 (byte) main::i#9 +Redundant Phi (byte*) print_char_cursor#16 (byte*) print_char_cursor#26 +Redundant Phi (byte*) print_line_cursor#14 (byte*) print_line_cursor#1 +Redundant Phi (byte*) print_char_cursor#17 (byte*) print_line_cursor#1 +Redundant Phi (byte*) print_line_cursor#15 (byte*) print_line_cursor#23 +Redundant Phi (byte*) print_char_cursor#18 (byte*) print_char_cursor#68 +Redundant Phi (byte) compare::op#1 (byte) compare::op#0 +Redundant Phi (word) compare::w1#1 (word) compare::w1#0 +Redundant Phi (word) compare::w2#1 (word) compare::w2#0 +Redundant Phi (byte*) print_char_cursor#100 (byte*) print_char_cursor#61 +Redundant Phi (byte*) print_char_cursor#19 (byte*) print_char_cursor#34 +Redundant Phi (byte*) print_char_cursor#20 (byte*) print_char_cursor#2 +Redundant Phi (byte*) print_char_cursor#21 (byte*) print_char_cursor#2 +Redundant Phi (byte*) print_char_cursor#22 (byte*) print_char_cursor#2 +Redundant Phi (byte*) print_char_cursor#23 (byte*) print_char_cursor#34 +Redundant Phi (byte*) print_char_cursor#24 (byte*) print_char_cursor#2 +Redundant Phi (byte*) print_char_cursor#25 (byte*) print_char_cursor#11 +Redundant Phi (byte*) print_char_cursor#26 (byte*) print_char_cursor#2 +Redundant Phi (byte*) print_line_cursor#16 (byte*) print_line_cursor#15 +Redundant Phi (byte*) print_char_cursor#28 (byte*) print_char_cursor#18 +Successful SSA optimization Pass2RedundantPhiElimination +Simple Condition (bool~) print_str::$0 [85] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [98] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [148] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$4 [176] if((byte) main::ln#2>=(byte/signed byte/word/signed word/dword/signed dword) $32) goto main::@4 +Simple Condition (bool~) main::$10 [180] if((byte) main::op#1!=rangelast(0,5)) goto main::@3 +Simple Condition (bool~) main::$8 [192] if((byte~) main::$6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@5 +Simple Condition (bool~) main::$11 [202] if((byte) main::j#1!=rangelast(0,2)) goto main::@2 +Simple Condition (bool~) main::$12 [206] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) compare::$0 [218] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto compare::@1 +Simple Condition (bool~) compare::$18 [222] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 +Simple Condition (bool~) compare::$1 [225] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto compare::@2 +Simple Condition (bool~) compare::$16 [229] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 +Simple Condition (bool~) compare::$2 [232] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto compare::@3 +Simple Condition (bool~) compare::$14 [236] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 +Simple Condition (bool~) compare::$3 [239] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto compare::@4 +Simple Condition (bool~) compare::$12 [243] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 +Simple Condition (bool~) compare::$4 [246] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto compare::@5 +Simple Condition (bool~) compare::$10 [250] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 +Simple Condition (bool~) compare::$6 [254] if((byte) compare::op#0!=(byte/signed byte/word/signed word/dword/signed dword) 5) goto compare::@6 +Simple Condition (bool~) compare::$8 [259] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 +Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 +Constant (const byte*) PROCPORT#0 = ((byte*))1 +Constant (const byte) PROCPORT_RAM_ALL#0 = $30 +Constant (const byte) PROCPORT_RAM_IO#0 = $35 +Constant (const byte) PROCPORT_RAM_CHARROM#0 = $31 +Constant (const byte) PROCPORT_KERNEL_IO#0 = $36 +Constant (const byte) PROCPORT_BASIC_KERNEL_IO#0 = $37 +Constant (const byte*) CHARGEN#0 = ((byte*))$d000 +Constant (const word) SPRITE_PTRS#0 = $3f8 +Constant (const byte*) SPRITES_XPOS#0 = ((byte*))$d000 +Constant (const byte*) SPRITES_YPOS#0 = ((byte*))$d001 +Constant (const byte*) SPRITES_XMSB#0 = ((byte*))$d010 +Constant (const byte*) RASTER#0 = ((byte*))$d012 +Constant (const byte*) SPRITES_ENABLE#0 = ((byte*))$d015 +Constant (const byte*) SPRITES_EXPAND_Y#0 = ((byte*))$d017 +Constant (const byte*) SPRITES_PRIORITY#0 = ((byte*))$d01b +Constant (const byte*) SPRITES_MC#0 = ((byte*))$d01c +Constant (const byte*) SPRITES_EXPAND_X#0 = ((byte*))$d01d +Constant (const byte*) BORDERCOL#0 = ((byte*))$d020 +Constant (const byte*) BGCOL#0 = ((byte*))$d021 +Constant (const byte*) BGCOL1#0 = ((byte*))$d021 +Constant (const byte*) BGCOL2#0 = ((byte*))$d022 +Constant (const byte*) BGCOL3#0 = ((byte*))$d023 +Constant (const byte*) BGCOL4#0 = ((byte*))$d024 +Constant (const byte*) SPRITES_MC1#0 = ((byte*))$d025 +Constant (const byte*) SPRITES_MC2#0 = ((byte*))$d026 +Constant (const byte*) SPRITES_COLS#0 = ((byte*))$d027 +Constant (const byte*) VIC_CONTROL#0 = ((byte*))$d011 +Constant (const byte*) D011#0 = ((byte*))$d011 +Constant (const byte) VIC_RST8#0 = $80 +Constant (const byte) VIC_ECM#0 = $40 +Constant (const byte) VIC_BMM#0 = $20 +Constant (const byte) VIC_DEN#0 = $10 +Constant (const byte) VIC_RSEL#0 = 8 +Constant (const byte*) VIC_CONTROL2#0 = ((byte*))$d016 +Constant (const byte*) D016#0 = ((byte*))$d016 +Constant (const byte) VIC_MCM#0 = $10 +Constant (const byte) VIC_CSEL#0 = 8 +Constant (const byte*) D018#0 = ((byte*))$d018 +Constant (const byte*) VIC_MEMORY#0 = ((byte*))$d018 +Constant (const byte*) LIGHTPEN_X#0 = ((byte*))$d013 +Constant (const byte*) LIGHTPEN_Y#0 = ((byte*))$d014 +Constant (const byte*) IRQ_STATUS#0 = ((byte*))$d019 +Constant (const byte*) IRQ_ENABLE#0 = ((byte*))$d01a +Constant (const byte) IRQ_RASTER#0 = 1 +Constant (const byte) IRQ_COLLISION_BG#0 = 2 +Constant (const byte) IRQ_COLLISION_SPRITE#0 = 4 +Constant (const byte) IRQ_LIGHTPEN#0 = 8 +Constant (const byte*) COLS#0 = ((byte*))$d800 +Constant (const byte*) CIA1_PORT_A#0 = ((byte*))$dc00 +Constant (const byte*) CIA1_PORT_B#0 = ((byte*))$dc01 +Constant (const byte*) CIA1_PORT_A_DDR#0 = ((byte*))$dc02 +Constant (const byte*) CIA1_PORT_B_DDR#0 = ((byte*))$dc03 +Constant (const byte*) CIA1_INTERRUPT#0 = ((byte*))$dc0d +Constant (const byte) CIA_INTERRUPT_CLEAR#0 = $7f +Constant (const byte*) CIA2_PORT_A#0 = ((byte*))$dd00 +Constant (const byte*) CIA2_PORT_B#0 = ((byte*))$dd01 +Constant (const byte*) CIA2_PORT_A_DDR#0 = ((byte*))$dd02 +Constant (const byte*) CIA2_PORT_B_DDR#0 = ((byte*))$dd03 +Constant (const byte*) CIA2_INTERRUPT#0 = ((byte*))$dd0d +Constant (const void()**) KERNEL_IRQ#0 = ((void()**))$314 +Constant (const void()**) HARDWARE_IRQ#0 = ((void()**))$fffe +Constant (const byte) BLACK#0 = 0 +Constant (const byte) WHITE#0 = 1 +Constant (const byte) RED#0 = 2 +Constant (const byte) CYAN#0 = 3 +Constant (const byte) PURPLE#0 = 4 +Constant (const byte) GREEN#0 = 5 +Constant (const byte) BLUE#0 = 6 +Constant (const byte) YELLOW#0 = 7 +Constant (const byte) ORANGE#0 = 8 +Constant (const byte) BROWN#0 = 9 +Constant (const byte) PINK#0 = $a +Constant (const byte) DARK_GREY#0 = $b +Constant (const byte) GREY#0 = $c +Constant (const byte) LIGHT_GREEN#0 = $d +Constant (const byte) LIGHT_BLUE#0 = $e +Constant (const byte) LIGHT_GREY#0 = $f +Constant (const byte*) print_line_cursor#0 = ((byte*))$400 +Constant (const byte[]) print_hextab#0 = $0 +Constant (const word[]) words#0 = { $12, $3f34, $cfed } +Constant (const byte) main::ln#0 = 0 +Constant (const byte) main::i#0 = 0 +Constant (const byte) main::j#0 = 0 +Constant (const byte) main::op#0 = 0 +Constant (const byte) compare::r#0 = '-' +Constant (const byte*) compare::ops#0 = 0 +Constant (const byte*) compare::ops#1 = compare::$27 +Constant (const byte) compare::r#1 = '+' +Constant (const byte*) compare::ops#2 = compare::$28 +Constant (const byte) compare::r#2 = '+' +Constant (const byte*) compare::ops#3 = compare::$29 +Constant (const byte) compare::r#3 = '+' +Constant (const byte*) compare::ops#4 = compare::$30 +Constant (const byte) compare::r#4 = '+' +Constant (const byte*) compare::ops#5 = compare::$31 +Constant (const byte) compare::r#5 = '+' +Constant (const byte*) print_str::str#1 = compare::str +Constant (const byte*) print_str::str#3 = compare::str1 +Constant (const byte*) print_str::str#4 = compare::str2 +Constant (const byte*) print_str::str#5 = compare::str3 +Constant (const byte*) compare::ops#6 = compare::$32 +Constant (const byte) compare::r#6 = '+' +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) print_cls::sc#0 = print_line_cursor#0 +Constant (const byte*) print_cls::$0 = print_line_cursor#0+$3e8 +Successful SSA optimization Pass2ConstantIdentification +if() condition always true - replacing block destination [58] if(true) goto main::@7 +Successful SSA optimization Pass2ConstantIfs +Successful SSA optimization Pass2ConstantStringConsolidation +Successful SSA optimization PassNEliminateUnusedVars +Removing unused block main::@return +Successful SSA optimization Pass2EliminateUnusedBlocks +Resolved ranged next value main::op#1 ← ++ main::op#2 to ++ +Resolved ranged comparison value if(main::op#1!=rangelast(0,5)) goto main::@3 to (byte/signed byte/word/signed word/dword/signed dword) 6 +Resolved ranged next value main::j#1 ← ++ main::j#2 to ++ +Resolved ranged comparison value if(main::j#1!=rangelast(0,2)) goto main::@2 to (byte/signed byte/word/signed word/dword/signed dword) 3 +Resolved ranged next value main::i#1 ← ++ main::i#9 to ++ +Resolved ranged comparison value if(main::i#1!=rangelast(0,2)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 3 +Culled Empty Block (label) @4 +Culled Empty Block (label) print_ln::@2 +Culled Empty Block (label) print_word::@2 +Culled Empty Block (label) @16 +Culled Empty Block (label) print_byte::@2 +Culled Empty Block (label) print_cls::@2 +Culled Empty Block (label) @23 +Culled Empty Block (label) main::@17 +Culled Empty Block (label) main::@5 +Culled Empty Block (label) main::@19 +Culled Empty Block (label) main::@6 +Culled Empty Block (label) compare::@6 +Culled Empty Block (label) compare::@42 +Culled Empty Block (label) @26 +Successful SSA optimization Pass2CullEmptyBlocks +Self Phi Eliminated (word) main::w1#3 +Self Phi Eliminated (byte) main::i#9 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (word) main::w1#3 (word) main::w1#0 +Redundant Phi (byte) main::i#9 (byte) main::i#2 +Successful SSA optimization Pass2RedundantPhiElimination +Inlining constant with var siblings (const byte*) print_str::str#1 +Inlining constant with var siblings (const byte*) print_str::str#3 +Inlining constant with var siblings (const byte*) print_str::str#4 +Inlining constant with var siblings (const byte*) print_str::str#5 +Inlining constant with var siblings (const byte*) print_cls::sc#0 +Inlining constant with var siblings (const byte) main::ln#0 +Inlining constant with var siblings (const byte) main::i#0 +Inlining constant with var siblings (const byte) main::j#0 +Inlining constant with var siblings (const byte) main::op#0 +Inlining constant with var siblings (const byte) compare::r#0 +Inlining constant with var siblings (const byte*) compare::ops#0 +Inlining constant with var siblings (const byte*) compare::ops#1 +Inlining constant with var siblings (const byte) compare::r#1 +Inlining constant with var siblings (const byte*) compare::ops#2 +Inlining constant with var siblings (const byte) compare::r#2 +Inlining constant with var siblings (const byte*) compare::ops#3 +Inlining constant with var siblings (const byte) compare::r#3 +Inlining constant with var siblings (const byte*) compare::ops#4 +Inlining constant with var siblings (const byte) compare::r#4 +Inlining constant with var siblings (const byte*) compare::ops#5 +Inlining constant with var siblings (const byte) compare::r#5 +Inlining constant with var siblings (const byte*) compare::ops#6 +Inlining constant with var siblings (const byte) compare::r#6 +Inlining constant with var siblings (const byte*) print_line_cursor#0 +Constant inlined print_cls::$0 = ((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8 +Constant inlined compare::ops#0 = (byte*) 0 +Constant inlined compare::r#1 = (byte) '+' +Constant inlined compare::r#0 = (byte) '-' +Constant inlined $0 = (const byte[]) print_hextab#0 +Constant inlined compare::r#3 = (byte) '+' +Constant inlined compare::r#2 = (byte) '+' +Constant inlined compare::r#5 = (byte) '+' +Constant inlined compare::r#4 = (byte) '+' +Constant inlined compare::str1 = (const string) compare::str +Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined compare::str3 = (const string) compare::str +Constant inlined compare::str2 = (const string) compare::str +Constant inlined main::j#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::op#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined print_line_cursor#0 = ((byte*))(word/signed word/dword/signed dword) $400 +Constant inlined print_cls::sc#0 = ((byte*))(word/signed word/dword/signed dword) $400 +Constant inlined compare::$30 = (const byte*) compare::ops#4 +Constant inlined compare::$31 = (const byte*) compare::ops#5 +Constant inlined compare::$32 = (const byte*) compare::ops#6 +Constant inlined main::ln#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined compare::r#6 = (byte) '+' +Constant inlined compare::$27 = (const byte*) compare::ops#1 +Constant inlined compare::$28 = (const byte*) compare::ops#2 +Constant inlined compare::$29 = (const byte*) compare::ops#3 +Constant inlined print_str::str#4 = (const string) compare::str +Constant inlined print_str::str#3 = (const string) compare::str +Constant inlined print_str::str#1 = (const string) compare::str +Constant inlined print_str::str#5 = (const string) compare::str +Successful SSA optimization Pass2ConstantInlining +Inlining constant with var siblings (const byte*) compare::ops#1 +Inlining constant with var siblings (const byte*) compare::ops#2 +Inlining constant with var siblings (const byte*) compare::ops#3 +Inlining constant with var siblings (const byte*) compare::ops#4 +Inlining constant with var siblings (const byte*) compare::ops#5 +Inlining constant with var siblings (const byte*) compare::ops#6 +Inlining constant with var siblings (const byte*) compare::ops#1 +Inlining constant with var siblings (const byte*) compare::ops#2 +Inlining constant with var siblings (const byte*) compare::ops#3 +Inlining constant with var siblings (const byte*) compare::ops#4 +Inlining constant with var siblings (const byte*) compare::ops#5 +Inlining constant with var siblings (const byte*) compare::ops#6 +Added new block during phi lifting main::@20(between main::@12 and main::@1) +Added new block during phi lifting main::@21(between main::@11 and main::@2) +Added new block during phi lifting main::@22(between main::@4 and main::@3) +Added new block during phi lifting main::@23(between main::@3 and main::@4) +Added new block during phi lifting main::@24(between main::@18 and main::@4) +Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1) +Added new block during phi lifting print_cls::@3(between print_cls::@1 and print_cls::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @25 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@10 +Adding NOP phi() at start of main::@7 +Adding NOP phi() at start of compare::@24 +Adding NOP phi() at start of compare::@26 +Adding NOP phi() at start of compare::@28 +Adding NOP phi() at start of compare::@30 +Adding NOP phi() at start of compare::@32 +Adding NOP phi() at start of compare::@34 +Adding NOP phi() at start of print_cls +CALL GRAPH +Calls in [] to main:2 +Calls in [main] to print_cls:5 compare:23 print_ln:28 +Calls in [compare] to print_word:78 print_str:80 print_str:84 print_str:86 print_word:90 print_str:92 print_char:96 print_str:98 +Calls in [print_word] to print_byte:139 print_byte:143 +Calls in [print_byte] to print_char:150 print_char:155 + +Created 35 initial phi equivalence classes +Coalesced [9] main::ln#14 ← main::ln#7 +Coalesced [10] print_char_cursor#103 ← print_char_cursor#95 +Coalesced [11] print_line_cursor#35 ← print_line_cursor#33 +Coalesced [15] main::ln#16 ← main::ln#4 +Coalesced [16] print_char_cursor#105 ← print_char_cursor#79 +Coalesced [17] print_line_cursor#37 ← print_line_cursor#31 +Coalesced [29] main::ln#18 ← main::ln#1 +Not coalescing [30] print_char_cursor#107 ← print_line_cursor#1 +Coalesced [31] print_line_cursor#39 ← print_line_cursor#1 +Coalesced [40] main::i#13 ← main::i#1 +Coalesced [41] main::ln#13 ← main::ln#11 +Coalesced [42] print_char_cursor#102 ← print_char_cursor#68 +Coalesced [43] print_line_cursor#34 ← print_line_cursor#23 +Coalesced [44] main::j#11 ← main::j#1 +Coalesced (already) [45] main::ln#15 ← main::ln#11 +Coalesced (already) [46] print_char_cursor#104 ← print_char_cursor#68 +Coalesced (already) [47] print_line_cursor#36 ← print_line_cursor#23 +Coalesced (already) [48] main::ln#17 ← main::ln#11 +Coalesced [49] main::op#9 ← main::op#1 +Coalesced (already) [50] print_char_cursor#106 ← print_char_cursor#68 +Coalesced (already) [51] print_line_cursor#38 ← print_line_cursor#23 +Coalesced (already) [52] main::ln#20 ← main::ln#1 +Coalesced [53] print_char_cursor#109 ← print_char_cursor#2 +Coalesced (already) [54] print_line_cursor#41 ← print_line_cursor#19 +Coalesced (already) [55] main::ln#19 ← main::ln#2 +Coalesced (already) [56] print_char_cursor#108 ← print_char_cursor#61 +Coalesced (already) [57] print_line_cursor#40 ← print_line_cursor#19 +Coalesced [58] print_line_cursor#42 ← print_line_cursor#19 +Coalesced (already) [63] print_line_cursor#43 ← print_line_cursor#1 +Coalesced [73] compare::r#36 ← compare::r#19 +Coalesced [76] print_word::w#4 ← print_word::w#0 +Coalesced [77] print_char_cursor#120 ← print_char_cursor#61 +Coalesced [79] print_char_cursor#110 ← print_char_cursor#11 +Coalesced [82] print_str::str#9 ← print_str::str#2 +Coalesced [83] print_char_cursor#111 ← print_char_cursor#2 +Coalesced (already) [85] print_char_cursor#112 ← print_char_cursor#2 +Coalesced [88] print_word::w#5 ← print_word::w#1 +Coalesced (already) [89] print_char_cursor#121 ← print_char_cursor#2 +Coalesced (already) [91] print_char_cursor#113 ← print_char_cursor#11 +Coalesced [94] print_char::ch#4 ← print_char::ch#2 +Coalesced [95] print_char_cursor#117 ← print_char_cursor#2 +Coalesced (already) [97] print_char_cursor#114 ← print_char_cursor#11 +Coalesced [103] compare::r#37 ← compare::r#20 +Coalesced [107] compare::r#32 ← compare::r#14 +Coalesced [111] compare::r#33 ← compare::r#15 +Coalesced [115] compare::r#34 ← compare::r#16 +Coalesced [119] compare::r#35 ← compare::r#17 +Coalesced [121] print_str::str#10 ← print_str::str#8 +Coalesced (already) [122] print_char_cursor#115 ← print_char_cursor#66 +Coalesced [129] print_str::str#11 ← print_str::str#0 +Coalesced [130] print_char_cursor#116 ← print_char_cursor#1 +Coalesced [137] print_byte::b#4 ← print_byte::b#0 +Coalesced [138] print_char_cursor#122 ← print_char_cursor#58 +Coalesced [141] print_byte::b#5 ← print_byte::b#1 +Coalesced (already) [142] print_char_cursor#123 ← print_char_cursor#11 +Coalesced [148] print_char::ch#5 ← print_char::ch#0 +Coalesced (already) [149] print_char_cursor#118 ← print_char_cursor#59 +Coalesced [153] print_char::ch#6 ← print_char::ch#1 +Coalesced (already) [154] print_char_cursor#119 ← print_char_cursor#11 +Coalesced [163] print_cls::sc#3 ← print_cls::sc#1 +Coalesced down to 13 phi equivalence classes +Culled Empty Block (label) main::@20 +Culled Empty Block (label) main::@21 +Culled Empty Block (label) main::@22 +Culled Empty Block (label) main::@24 +Culled Empty Block (label) main::@23 +Culled Empty Block (label) print_ln::@3 +Culled Empty Block (label) print_cls::@3 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @25 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@10 +Adding NOP phi() at start of main::@7 +Adding NOP phi() at start of print_ln +Adding NOP phi() at start of compare::@24 +Adding NOP phi() at start of compare::@35 +Adding NOP phi() at start of compare::@37 +Adding NOP phi() at start of compare::@39 +Adding NOP phi() at start of compare::@41 +Adding NOP phi() at start of compare::@26 +Adding NOP phi() at start of compare::@28 +Adding NOP phi() at start of compare::@30 +Adding NOP phi() at start of compare::@32 +Adding NOP phi() at start of compare::@34 +Adding NOP phi() at start of print_cls + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@25 +@25: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @25 + [3] phi() +main: scope:[main] from @25 + [4] phi() + [5] call print_cls + to:main::@1 +main::@1: scope:[main] from main main::@12 + [6] (byte*) print_line_cursor#33 ← phi( main::@12/(byte*) print_line_cursor#23 main/((byte*))(word/signed word/dword/signed dword) $400 ) + [6] (byte*) print_char_cursor#95 ← phi( main::@12/(byte*) print_char_cursor#68 main/((byte*))(word/signed word/dword/signed dword) $400 ) + [6] (byte) main::ln#7 ← phi( main::@12/(byte) main::ln#11 main/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [6] (byte) main::i#2 ← phi( main::@12/(byte) main::i#1 main/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [7] (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [8] (word) main::w1#0 ← *((const word[]) words#0 + (byte~) main::$1) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@11 + [9] (byte*) print_line_cursor#31 ← phi( main::@1/(byte*) print_line_cursor#33 main::@11/(byte*) print_line_cursor#23 ) + [9] (byte*) print_char_cursor#79 ← phi( main::@1/(byte*) print_char_cursor#95 main::@11/(byte*) print_char_cursor#68 ) + [9] (byte) main::ln#4 ← phi( main::@1/(byte) main::ln#7 main::@11/(byte) main::ln#11 ) + [9] (byte) main::j#2 ← phi( main::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@11/(byte) main::j#1 ) + [10] (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [11] (word) main::w2#0 ← *((const word[]) words#0 + (byte~) main::$2) + to:main::@3 +main::@3: scope:[main] from main::@2 main::@4 + [12] (byte*) print_line_cursor#19 ← phi( main::@2/(byte*) print_line_cursor#31 main::@4/(byte*) print_line_cursor#23 ) + [12] (byte*) print_char_cursor#61 ← phi( main::@2/(byte*) print_char_cursor#79 main::@4/(byte*) print_char_cursor#68 ) + [12] (byte) main::op#2 ← phi( main::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@4/(byte) main::op#1 ) + [12] (byte) main::ln#2 ← phi( main::@2/(byte) main::ln#4 main::@4/(byte) main::ln#11 ) + [13] if((byte) main::ln#2>=(byte/signed byte/word/signed word/dword/signed dword) $32) goto main::@4 + to:main::@9 +main::@9: scope:[main] from main::@3 + [14] (word) compare::w1#0 ← (word) main::w1#0 + [15] (word) compare::w2#0 ← (word) main::w2#0 + [16] (byte) compare::op#0 ← (byte) main::op#2 + [17] call compare + to:main::@18 +main::@18: scope:[main] from main::@9 + [18] (byte) main::ln#1 ← ++ (byte) main::ln#2 + [19] (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 + [20] if((byte~) main::$6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 + to:main::@10 +main::@10: scope:[main] from main::@18 + [21] phi() + [22] call print_ln + [23] (byte*~) print_char_cursor#107 ← (byte*) print_line_cursor#1 + to:main::@4 +main::@4: scope:[main] from main::@10 main::@18 main::@3 + [24] (byte*) print_line_cursor#23 ← phi( main::@10/(byte*) print_line_cursor#1 main::@3/(byte*) print_line_cursor#19 main::@18/(byte*) print_line_cursor#19 ) + [24] (byte*) print_char_cursor#68 ← phi( main::@10/(byte*~) print_char_cursor#107 main::@3/(byte*) print_char_cursor#61 main::@18/(byte*) print_char_cursor#2 ) + [24] (byte) main::ln#11 ← phi( main::@10/(byte) main::ln#1 main::@3/(byte) main::ln#2 main::@18/(byte) main::ln#1 ) + [25] (byte) main::op#1 ← ++ (byte) main::op#2 + [26] if((byte) main::op#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@3 + to:main::@11 +main::@11: scope:[main] from main::@4 + [27] (byte) main::j#1 ← ++ (byte) main::j#2 + [28] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@2 + to:main::@12 +main::@12: scope:[main] from main::@11 + [29] (byte) main::i#1 ← ++ (byte) main::i#2 + [30] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 + to:main::@7 +main::@7: scope:[main] from main::@12 main::@7 + [31] phi() + to:main::@7 +print_ln: scope:[print_ln] from main::@10 + [32] phi() + to:print_ln::@1 +print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 + [33] (byte*) print_line_cursor#9 ← phi( print_ln/(byte*) print_line_cursor#19 print_ln::@1/(byte*) print_line_cursor#1 ) + [34] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 + [35] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 + to:print_ln::@return +print_ln::@return: scope:[print_ln] from print_ln::@1 + [36] return + to:@return +compare: scope:[compare] from main::@9 + [37] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto compare::@1 + to:compare::@18 +compare::@18: scope:[compare] from compare + [38] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto compare::@2 + to:compare::@19 +compare::@19: scope:[compare] from compare::@18 + [39] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto compare::@3 + to:compare::@20 +compare::@20: scope:[compare] from compare::@19 + [40] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto compare::@4 + to:compare::@21 +compare::@21: scope:[compare] from compare::@20 + [41] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto compare::@5 + to:compare::@22 +compare::@22: scope:[compare] from compare::@21 + [42] if((byte) compare::op#0!=(byte/signed byte/word/signed word/dword/signed dword) 5) goto compare::@16 + to:compare::@23 +compare::@23: scope:[compare] from compare::@22 + [43] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 + to:compare::@24 +compare::@24: scope:[compare] from compare::@23 + [44] phi() + to:compare::@7 +compare::@7: scope:[compare] from compare::@23 compare::@24 + [45] (byte) compare::r#19 ← phi( compare::@23/(byte) '-' compare::@24/(byte) '+' ) + to:compare::@16 +compare::@16: scope:[compare] from compare::@11 compare::@13 compare::@15 compare::@17 compare::@22 compare::@7 compare::@9 + [46] (byte) compare::r#10 ← phi( compare::@11/(byte) compare::r#14 compare::@13/(byte) compare::r#15 compare::@15/(byte) compare::r#16 compare::@17/(byte) compare::r#17 compare::@22/(byte) '-' compare::@7/(byte) compare::r#19 compare::@9/(byte) compare::r#20 ) + [46] (byte*) compare::ops#7 ← phi( compare::@11/(const byte*) compare::ops#3 compare::@13/(const byte*) compare::ops#4 compare::@15/(const byte*) compare::ops#5 compare::@17/(const byte*) compare::ops#6 compare::@22/(byte*) 0 compare::@7/(const byte*) compare::ops#1 compare::@9/(const byte*) compare::ops#2 ) + [47] (word) print_word::w#0 ← (word) compare::w1#0 + [48] call print_word + to:compare::@35 +compare::@35: scope:[compare] from compare::@16 + [49] phi() + [50] call print_str + to:compare::@36 +compare::@36: scope:[compare] from compare::@35 + [51] (byte*) print_str::str#2 ← (byte*) compare::ops#7 + [52] call print_str + to:compare::@37 +compare::@37: scope:[compare] from compare::@36 + [53] phi() + [54] call print_str + to:compare::@38 +compare::@38: scope:[compare] from compare::@37 + [55] (word) print_word::w#1 ← (word) compare::w2#0 + [56] call print_word + to:compare::@39 +compare::@39: scope:[compare] from compare::@38 + [57] phi() + [58] call print_str + to:compare::@40 +compare::@40: scope:[compare] from compare::@39 + [59] (byte) print_char::ch#2 ← (byte) compare::r#10 + [60] call print_char + to:compare::@41 +compare::@41: scope:[compare] from compare::@40 + [61] phi() + [62] call print_str + to:compare::@return +compare::@return: scope:[compare] from compare::@41 + [63] return + to:@return +compare::@5: scope:[compare] from compare::@21 + [64] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 + to:compare::@26 +compare::@26: scope:[compare] from compare::@5 + [65] phi() + to:compare::@9 +compare::@9: scope:[compare] from compare::@26 compare::@5 + [66] (byte) compare::r#20 ← phi( compare::@26/(byte) '+' compare::@5/(byte) '-' ) + to:compare::@16 +compare::@4: scope:[compare] from compare::@20 + [67] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 + to:compare::@28 +compare::@28: scope:[compare] from compare::@4 + [68] phi() + to:compare::@11 +compare::@11: scope:[compare] from compare::@28 compare::@4 + [69] (byte) compare::r#14 ← phi( compare::@28/(byte) '+' compare::@4/(byte) '-' ) + to:compare::@16 +compare::@3: scope:[compare] from compare::@19 + [70] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 + to:compare::@30 +compare::@30: scope:[compare] from compare::@3 + [71] phi() + to:compare::@13 +compare::@13: scope:[compare] from compare::@3 compare::@30 + [72] (byte) compare::r#15 ← phi( compare::@3/(byte) '-' compare::@30/(byte) '+' ) + to:compare::@16 +compare::@2: scope:[compare] from compare::@18 + [73] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 + to:compare::@32 +compare::@32: scope:[compare] from compare::@2 + [74] phi() + to:compare::@15 +compare::@15: scope:[compare] from compare::@2 compare::@32 + [75] (byte) compare::r#16 ← phi( compare::@2/(byte) '-' compare::@32/(byte) '+' ) + to:compare::@16 +compare::@1: scope:[compare] from compare + [76] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 + to:compare::@34 +compare::@34: scope:[compare] from compare::@1 + [77] phi() + to:compare::@17 +compare::@17: scope:[compare] from compare::@1 compare::@34 + [78] (byte) compare::r#17 ← phi( compare::@1/(byte) '-' compare::@34/(byte) '+' ) + to:compare::@16 +print_str: scope:[print_str] from compare::@35 compare::@36 compare::@37 compare::@39 compare::@41 + [79] (byte*) print_char_cursor#66 ← phi( compare::@35/(byte*) print_char_cursor#11 compare::@36/(byte*) print_char_cursor#2 compare::@37/(byte*) print_char_cursor#2 compare::@39/(byte*) print_char_cursor#11 compare::@41/(byte*) print_char_cursor#11 ) + [79] (byte*) print_str::str#8 ← phi( compare::@35/(const string) compare::str compare::@36/(byte*) print_str::str#2 compare::@37/(const string) compare::str compare::@39/(const string) compare::str compare::@41/(const string) compare::str ) + to:print_str::@1 +print_str::@1: scope:[print_str] from print_str print_str::@2 + [80] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#66 print_str::@2/(byte*) print_char_cursor#1 ) + [80] (byte*) print_str::str#6 ← phi( print_str/(byte*) print_str::str#8 print_str::@2/(byte*) print_str::str#0 ) + [81] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 + to:print_str::@return +print_str::@return: scope:[print_str] from print_str::@1 + [82] return + to:@return +print_str::@2: scope:[print_str] from print_str::@1 + [83] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#6) + [84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 + [85] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#6 + to:print_str::@1 +print_char: scope:[print_char] from compare::@40 print_byte print_byte::@1 + [86] (byte*) print_char_cursor#39 ← phi( compare::@40/(byte*) print_char_cursor#2 print_byte/(byte*) print_char_cursor#59 print_byte::@1/(byte*) print_char_cursor#11 ) + [86] (byte) print_char::ch#3 ← phi( compare::@40/(byte) print_char::ch#2 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) + [87] *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 + [88] (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#39 + to:print_char::@return +print_char::@return: scope:[print_char] from print_char + [89] return + to:@return +print_word: scope:[print_word] from compare::@16 compare::@38 + [90] (byte*) print_char_cursor#58 ← phi( compare::@16/(byte*) print_char_cursor#61 compare::@38/(byte*) print_char_cursor#2 ) + [90] (word) print_word::w#2 ← phi( compare::@16/(word) print_word::w#0 compare::@38/(word) print_word::w#1 ) + [91] (byte) print_byte::b#0 ← > (word) print_word::w#2 + [92] call print_byte + to:print_word::@1 +print_word::@1: scope:[print_word] from print_word + [93] (byte) print_byte::b#1 ← < (word) print_word::w#2 + [94] call print_byte + to:print_word::@return +print_word::@return: scope:[print_word] from print_word::@1 + [95] return + to:@return +print_byte: scope:[print_byte] from print_word print_word::@1 + [96] (byte*) print_char_cursor#59 ← phi( print_word/(byte*) print_char_cursor#58 print_word::@1/(byte*) print_char_cursor#11 ) + [96] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + [97] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [98] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) + [99] call print_char + to:print_byte::@1 +print_byte::@1: scope:[print_byte] from print_byte + [100] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) $f + [101] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) + [102] call print_char + to:print_byte::@return +print_byte::@return: scope:[print_byte] from print_byte::@1 + [103] return + to:@return +print_cls: scope:[print_cls] from main + [104] phi() + to:print_cls::@1 +print_cls::@1: scope:[print_cls] from print_cls print_cls::@1 + [105] (byte*) print_cls::sc#2 ← phi( print_cls/((byte*))(word/signed word/dword/signed dword) $400 print_cls::@1/(byte*) print_cls::sc#1 ) + [106] *((byte*) print_cls::sc#2) ← (byte) ' ' + [107] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 + [108] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 + to:print_cls::@return +print_cls::@return: scope:[print_cls] from print_cls::@1 + [109] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(byte*) BGCOL +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(byte) BLUE +(byte*) BORDERCOL +(byte) BROWN +(byte*) CHARGEN +(byte*) CIA1_INTERRUPT +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B_DDR +(byte*) CIA2_INTERRUPT +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B_DDR +(byte) CIA_INTERRUPT_CLEAR +(byte*) COLS +(byte) CYAN +(byte*) D011 +(byte*) D016 +(byte*) D018 +(byte) DARK_GREY +(byte) GREEN +(byte) GREY +(void()**) HARDWARE_IRQ +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_SPRITE +(byte*) IRQ_ENABLE +(byte) IRQ_LIGHTPEN +(byte) IRQ_RASTER +(byte*) IRQ_STATUS +(void()**) KERNEL_IRQ +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_Y +(byte) LIGHT_BLUE +(byte) LIGHT_GREEN +(byte) LIGHT_GREY +(byte) ORANGE +(byte) PINK +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte) PURPLE +(byte*) RASTER +(byte) RED +(byte*) SPRITES_COLS +(byte*) SPRITES_ENABLE +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_MC +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC2 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_XMSB +(byte*) SPRITES_XPOS +(byte*) SPRITES_YPOS +(word) SPRITE_PTRS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(byte) VIC_RST8 +(byte) WHITE +(byte) YELLOW +(void()) compare((word) compare::w1 , (word) compare::w2 , (byte) compare::op) +(byte) compare::op +(byte) compare::op#0 168.8333333333334 +(byte*) compare::ops +(byte*) compare::ops#7 0.4 +(byte) compare::r +(byte) compare::r#10 1.076923076923077 +(byte) compare::r#14 2.0 +(byte) compare::r#15 2.0 +(byte) compare::r#16 2.0 +(byte) compare::r#17 2.0 +(byte) compare::r#19 2.0 +(byte) compare::r#20 2.0 +(word) compare::w1 +(word) compare::w1#0 36.249999999999986 +(word) compare::w2 +(word) compare::w2#0 29.0 +(void()) main() +(byte~) main::$1 22.0 +(byte~) main::$2 202.0 +(byte~) main::$6 2002.0 +(byte) main::i +(byte) main::i#1 16.5 +(byte) main::i#2 1.4347826086956523 +(byte) main::j +(byte) main::j#1 151.5 +(byte) main::j#2 16.833333333333332 +(byte) main::ln +(byte) main::ln#1 667.3333333333334 +(byte) main::ln#11 588.0 +(byte) main::ln#2 684.1666666666667 +(byte) main::ln#4 71.0 +(byte) main::ln#7 7.333333333333333 +(byte) main::op +(byte) main::op#1 1501.5 +(byte) main::op#2 231.0 +(word) main::w1 +(word) main::w1#0 48.19047619047619 +(word) main::w2 +(word) main::w2#0 68.875 +(void()) print_byte((byte) print_byte::b) +(byte~) print_byte::$0 4.0 +(byte~) print_byte::$2 4.0 +(byte) print_byte::b +(byte) print_byte::b#0 4.0 +(byte) print_byte::b#1 4.0 +(byte) print_byte::b#2 2.0 +(void()) print_char((byte) print_char::ch) +(byte) print_char::ch +(byte) print_char::ch#0 4.0 +(byte) print_char::ch#1 4.0 +(byte) print_char::ch#2 4.0 +(byte) print_char::ch#3 8.0 +(byte*) print_char_cursor +(byte*) print_char_cursor#1 10001.0 +(byte*~) print_char_cursor#107 2002.0 +(byte*) print_char_cursor#11 0.7058823529411765 +(byte*) print_char_cursor#2 1783.2608695652177 +(byte*) print_char_cursor#39 5.0 +(byte*) print_char_cursor#58 3.0 +(byte*) print_char_cursor#59 2.0 +(byte*) print_char_cursor#61 67.90322580645162 +(byte*) print_char_cursor#66 12.0 +(byte*) print_char_cursor#68 588.0 +(byte*) print_char_cursor#79 71.0 +(byte*) print_char_cursor#95 7.333333333333333 +(void()) print_cls() +(byte*) print_cls::sc +(byte*) print_cls::sc#1 16.5 +(byte*) print_cls::sc#2 16.5 +(byte[]) print_hextab +(byte*) print_line_cursor +(byte*) print_line_cursor#1 6401.0 +(byte*) print_line_cursor#19 282.3636363636364 +(byte*) print_line_cursor#23 588.0 +(byte*) print_line_cursor#31 71.0 +(byte*) print_line_cursor#33 7.333333333333333 +(byte*) print_line_cursor#9 20004.0 +(void()) print_ln() +(byte*) print_screen +(void()) print_str((byte*) print_str::str) +(byte*) print_str::str +(byte*) print_str::str#0 20002.0 +(byte*) print_str::str#2 4.0 +(byte*) print_str::str#6 10001.5 +(byte*) print_str::str#8 4.0 +(void()) print_word((word) print_word::w) +(word) print_word::w +(word) print_word::w#0 4.0 +(word) print_word::w#1 4.0 +(word) print_word::w#2 2.6666666666666665 +(word[]) words + +Initial phi equivalence classes +[ main::i#2 main::i#1 ] +[ main::j#2 main::j#1 ] +[ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +[ main::op#2 main::op#1 ] +[ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 ] +[ compare::ops#7 ] +[ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +[ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 ] +[ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +[ print_word::w#2 print_word::w#0 print_word::w#1 ] +[ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +[ print_cls::sc#2 print_cls::sc#1 ] +Added variable main::$1 to zero page equivalence class [ main::$1 ] +Added variable main::w1#0 to zero page equivalence class [ main::w1#0 ] +Added variable main::$2 to zero page equivalence class [ main::$2 ] +Added variable main::w2#0 to zero page equivalence class [ main::w2#0 ] +Added variable compare::w1#0 to zero page equivalence class [ compare::w1#0 ] +Added variable compare::w2#0 to zero page equivalence class [ compare::w2#0 ] +Added variable compare::op#0 to zero page equivalence class [ compare::op#0 ] +Added variable main::$6 to zero page equivalence class [ main::$6 ] +Added variable print_byte::$0 to zero page equivalence class [ print_byte::$0 ] +Added variable print_byte::$2 to zero page equivalence class [ print_byte::$2 ] +Complete equivalence classes +[ main::i#2 main::i#1 ] +[ main::j#2 main::j#1 ] +[ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +[ main::op#2 main::op#1 ] +[ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 ] +[ compare::ops#7 ] +[ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +[ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 ] +[ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +[ print_word::w#2 print_word::w#0 print_word::w#1 ] +[ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +[ print_cls::sc#2 print_cls::sc#1 ] +[ main::$1 ] +[ main::w1#0 ] +[ main::$2 ] +[ main::w2#0 ] +[ compare::w1#0 ] +[ compare::w2#0 ] +[ compare::op#0 ] +[ main::$6 ] +[ print_byte::$0 ] +[ print_byte::$2 ] +Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Allocated zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +Allocated zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +Allocated zp ZP_BYTE:5 [ main::op#2 main::op#1 ] +Allocated zp ZP_WORD:6 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 ] +Allocated zp ZP_WORD:8 [ compare::ops#7 ] +Allocated zp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +Allocated zp ZP_WORD:11 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 ] +Allocated zp ZP_BYTE:13 [ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +Allocated zp ZP_WORD:14 [ print_word::w#2 print_word::w#0 print_word::w#1 ] +Allocated zp ZP_WORD:16 [ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +Allocated zp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +Allocated zp ZP_WORD:19 [ print_cls::sc#2 print_cls::sc#1 ] +Allocated zp ZP_BYTE:21 [ main::$1 ] +Allocated zp ZP_WORD:22 [ main::w1#0 ] +Allocated zp ZP_BYTE:24 [ main::$2 ] +Allocated zp ZP_WORD:25 [ main::w2#0 ] +Allocated zp ZP_WORD:27 [ compare::w1#0 ] +Allocated zp ZP_WORD:29 [ compare::w2#0 ] +Allocated zp ZP_BYTE:31 [ compare::op#0 ] +Allocated zp ZP_BYTE:32 [ main::$6 ] +Allocated zp ZP_BYTE:33 [ print_byte::$0 ] +Allocated zp ZP_BYTE:34 [ print_byte::$2 ] + +INITIAL ASM +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label print_char_cursor = $10 + .label print_line_cursor = 6 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @25 [phi:@begin->@25] +b25_from_bbegin: + jmp b25 +//SEG5 @25 +b25: +//SEG6 [2] call main +//SEG7 [4] phi from @25 to main [phi:@25->main] +main_from_b25: + jsr main +//SEG8 [3] phi from @25 to @end [phi:@25->@end] +bend_from_b25: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .label _1 = $15 + .label _2 = $18 + .label _6 = $20 + .label w1 = $16 + .label w2 = $19 + .label op = 5 + .label ln = 4 + .label j = 3 + .label i = 2 + //SEG11 [5] call print_cls + //SEG12 [104] phi from main to print_cls [phi:main->print_cls] + print_cls_from_main: + jsr print_cls + //SEG13 [6] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG14 [6] phi (byte*) print_line_cursor#33 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #<$400 + sta print_line_cursor + lda #>$400 + sta print_line_cursor+1 + //SEG15 [6] phi (byte*) print_char_cursor#95 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->main::@1#1] -- pbuz1=pbuc1 + lda #<$400 + sta print_char_cursor + lda #>$400 + sta print_char_cursor+1 + //SEG16 [6] phi (byte) main::ln#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 + lda #0 + sta ln + //SEG17 [6] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#3] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b1 + //SEG18 [6] phi from main::@12 to main::@1 [phi:main::@12->main::@1] + b1_from_b12: + //SEG19 [6] phi (byte*) print_line_cursor#33 = (byte*) print_line_cursor#23 [phi:main::@12->main::@1#0] -- register_copy + //SEG20 [6] phi (byte*) print_char_cursor#95 = (byte*) print_char_cursor#68 [phi:main::@12->main::@1#1] -- register_copy + //SEG21 [6] phi (byte) main::ln#7 = (byte) main::ln#11 [phi:main::@12->main::@1#2] -- register_copy + //SEG22 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@12->main::@1#3] -- register_copy + jmp b1 + //SEG23 main::@1 + b1: + //SEG24 [7] (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 + lda i + asl + sta _1 + //SEG25 [8] (word) main::w1#0 ← *((const word[]) words#0 + (byte~) main::$1) -- vwuz1=pwuc1_derefidx_vbuz2 + ldy _1 + lda words,y + sta w1 + lda words+1,y + sta w1+1 + //SEG26 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + //SEG27 [9] phi (byte*) print_line_cursor#31 = (byte*) print_line_cursor#33 [phi:main::@1->main::@2#0] -- register_copy + //SEG28 [9] phi (byte*) print_char_cursor#79 = (byte*) print_char_cursor#95 [phi:main::@1->main::@2#1] -- register_copy + //SEG29 [9] phi (byte) main::ln#4 = (byte) main::ln#7 [phi:main::@1->main::@2#2] -- register_copy + //SEG30 [9] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#3] -- vbuz1=vbuc1 + lda #0 + sta j + jmp b2 + //SEG31 [9] phi from main::@11 to main::@2 [phi:main::@11->main::@2] + b2_from_b11: + //SEG32 [9] phi (byte*) print_line_cursor#31 = (byte*) print_line_cursor#23 [phi:main::@11->main::@2#0] -- register_copy + //SEG33 [9] phi (byte*) print_char_cursor#79 = (byte*) print_char_cursor#68 [phi:main::@11->main::@2#1] -- register_copy + //SEG34 [9] phi (byte) main::ln#4 = (byte) main::ln#11 [phi:main::@11->main::@2#2] -- register_copy + //SEG35 [9] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@11->main::@2#3] -- register_copy + jmp b2 + //SEG36 main::@2 + b2: + //SEG37 [10] (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 + lda j + asl + sta _2 + //SEG38 [11] (word) main::w2#0 ← *((const word[]) words#0 + (byte~) main::$2) -- vwuz1=pwuc1_derefidx_vbuz2 + ldy _2 + lda words,y + sta w2 + lda words+1,y + sta w2+1 + //SEG39 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + b3_from_b2: + //SEG40 [12] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#31 [phi:main::@2->main::@3#0] -- register_copy + //SEG41 [12] phi (byte*) print_char_cursor#61 = (byte*) print_char_cursor#79 [phi:main::@2->main::@3#1] -- register_copy + //SEG42 [12] phi (byte) main::op#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->main::@3#2] -- vbuz1=vbuc1 + lda #0 + sta op + //SEG43 [12] phi (byte) main::ln#2 = (byte) main::ln#4 [phi:main::@2->main::@3#3] -- register_copy + jmp b3 + //SEG44 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + b3_from_b4: + //SEG45 [12] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#23 [phi:main::@4->main::@3#0] -- register_copy + //SEG46 [12] phi (byte*) print_char_cursor#61 = (byte*) print_char_cursor#68 [phi:main::@4->main::@3#1] -- register_copy + //SEG47 [12] phi (byte) main::op#2 = (byte) main::op#1 [phi:main::@4->main::@3#2] -- register_copy + //SEG48 [12] phi (byte) main::ln#2 = (byte) main::ln#11 [phi:main::@4->main::@3#3] -- register_copy + jmp b3 + //SEG49 main::@3 + b3: + //SEG50 [13] if((byte) main::ln#2>=(byte/signed byte/word/signed word/dword/signed dword) $32) goto main::@4 -- vbuz1_ge_vbuc1_then_la1 + lda ln + cmp #$32 + bcs b4_from_b3 + jmp b9 + //SEG51 main::@9 + b9: + //SEG52 [14] (word) compare::w1#0 ← (word) main::w1#0 -- vwuz1=vwuz2 + lda w1 + sta compare.w1 + lda w1+1 + sta compare.w1+1 + //SEG53 [15] (word) compare::w2#0 ← (word) main::w2#0 -- vwuz1=vwuz2 + lda w2 + sta compare.w2 + lda w2+1 + sta compare.w2+1 + //SEG54 [16] (byte) compare::op#0 ← (byte) main::op#2 -- vbuz1=vbuz2 + lda op + sta compare.op + //SEG55 [17] call compare + jsr compare + jmp b18 + //SEG56 main::@18 + b18: + //SEG57 [18] (byte) main::ln#1 ← ++ (byte) main::ln#2 -- vbuz1=_inc_vbuz1 + inc ln + //SEG58 [19] (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_band_vbuc1 + lda #1 + and ln + sta _6 + //SEG59 [20] if((byte~) main::$6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 -- vbuz1_neq_0_then_la1 + lda _6 + cmp #0 + bne b4_from_b18 + //SEG60 [21] phi from main::@18 to main::@10 [phi:main::@18->main::@10] + b10_from_b18: + jmp b10 + //SEG61 main::@10 + b10: + //SEG62 [22] call print_ln + //SEG63 [32] phi from main::@10 to print_ln [phi:main::@10->print_ln] + print_ln_from_b10: + jsr print_ln + //SEG64 [23] (byte*~) print_char_cursor#107 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 + lda print_line_cursor + sta print_char_cursor + lda print_line_cursor+1 + sta print_char_cursor+1 + //SEG65 [24] phi from main::@10 main::@18 main::@3 to main::@4 [phi:main::@10/main::@18/main::@3->main::@4] + b4_from_b10: + b4_from_b18: + b4_from_b3: + //SEG66 [24] phi (byte*) print_line_cursor#23 = (byte*) print_line_cursor#1 [phi:main::@10/main::@18/main::@3->main::@4#0] -- register_copy + //SEG67 [24] phi (byte*) print_char_cursor#68 = (byte*~) print_char_cursor#107 [phi:main::@10/main::@18/main::@3->main::@4#1] -- register_copy + //SEG68 [24] phi (byte) main::ln#11 = (byte) main::ln#1 [phi:main::@10/main::@18/main::@3->main::@4#2] -- register_copy + jmp b4 + //SEG69 main::@4 + b4: + //SEG70 [25] (byte) main::op#1 ← ++ (byte) main::op#2 -- vbuz1=_inc_vbuz1 + inc op + //SEG71 [26] if((byte) main::op#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 + lda op + cmp #6 + bne b3_from_b4 + jmp b11 + //SEG72 main::@11 + b11: + //SEG73 [27] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1 + inc j + //SEG74 [28] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 + lda j + cmp #3 + bne b2_from_b11 + jmp b12 + //SEG75 main::@12 + b12: + //SEG76 [29] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG77 [30] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda i + cmp #3 + bne b1_from_b12 + //SEG78 [31] phi from main::@12 main::@7 to main::@7 [phi:main::@12/main::@7->main::@7] + b7_from_b12: + b7_from_b7: + jmp b7 + //SEG79 main::@7 + b7: + jmp b7_from_b7 +} +//SEG80 print_ln +// Print a newline +print_ln: { + //SEG81 [33] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + b1_from_print_ln: + b1_from_b1: + //SEG82 [33] phi (byte*) print_line_cursor#9 = (byte*) print_line_cursor#19 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + jmp b1 + //SEG83 print_ln::@1 + b1: + //SEG84 [34] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda print_line_cursor + clc + adc #$28 + sta print_line_cursor + bcc !+ + inc print_line_cursor+1 + !: + //SEG85 [35] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + lda print_line_cursor+1 + cmp print_char_cursor+1 + bcc b1_from_b1 + bne !+ + lda print_line_cursor + cmp print_char_cursor + bcc b1_from_b1 + !: + jmp breturn + //SEG86 print_ln::@return + breturn: + //SEG87 [36] return + rts +} +//SEG88 compare +// Compare two words using an operator +// compare(word zeropage($1b) w1, word zeropage($1d) w2, byte zeropage($1f) op) +compare: { + .label w1 = $1b + .label w2 = $1d + .label op = $1f + .label ops = 8 + .label r = $a + //SEG89 [37] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto compare::@1 -- vbuz1_eq_0_then_la1 + lda op + cmp #0 + beq b1 + jmp b18 + //SEG90 compare::@18 + b18: + //SEG91 [38] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto compare::@2 -- vbuz1_eq_vbuc1_then_la1 + lda op + cmp #1 + beq b2 + jmp b19 + //SEG92 compare::@19 + b19: + //SEG93 [39] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto compare::@3 -- vbuz1_eq_vbuc1_then_la1 + lda op + cmp #2 + beq b3 + jmp b20 + //SEG94 compare::@20 + b20: + //SEG95 [40] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto compare::@4 -- vbuz1_eq_vbuc1_then_la1 + lda op + cmp #3 + beq b4 + jmp b21 + //SEG96 compare::@21 + b21: + //SEG97 [41] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto compare::@5 -- vbuz1_eq_vbuc1_then_la1 + lda op + cmp #4 + beq b5 + jmp b22 + //SEG98 compare::@22 + b22: + //SEG99 [42] if((byte) compare::op#0!=(byte/signed byte/word/signed word/dword/signed dword) 5) goto compare::@16 -- vbuz1_neq_vbuc1_then_la1 + lda op + cmp #5 + bne b16_from_b22 + jmp b23 + //SEG100 compare::@23 + b23: + //SEG101 [43] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 -- vwuz1_eq_vwuz2_then_la1 + lda w1 + cmp w2 + bne !+ + lda w1+1 + cmp w2+1 + beq b7_from_b23 + !: + //SEG102 [44] phi from compare::@23 to compare::@24 [phi:compare::@23->compare::@24] + b24_from_b23: + jmp b24 + //SEG103 compare::@24 + b24: + //SEG104 [45] phi from compare::@24 to compare::@7 [phi:compare::@24->compare::@7] + b7_from_b24: + //SEG105 [45] phi (byte) compare::r#19 = (byte) '+' [phi:compare::@24->compare::@7#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b7 + //SEG106 [45] phi from compare::@23 to compare::@7 [phi:compare::@23->compare::@7] + b7_from_b23: + //SEG107 [45] phi (byte) compare::r#19 = (byte) '-' [phi:compare::@23->compare::@7#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b7 + //SEG108 compare::@7 + b7: + //SEG109 [46] phi from compare::@7 to compare::@16 [phi:compare::@7->compare::@16] + b16_from_b7: + //SEG110 [46] phi (byte) compare::r#10 = (byte) compare::r#19 [phi:compare::@7->compare::@16#0] -- register_copy + //SEG111 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#1 [phi:compare::@7->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_1 + sta ops+1 + jmp b16 + //SEG112 [46] phi from compare::@22 to compare::@16 [phi:compare::@22->compare::@16] + b16_from_b22: + //SEG113 [46] phi (byte) compare::r#10 = (byte) '-' [phi:compare::@22->compare::@16#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG114 [46] phi (byte*) compare::ops#7 = (byte*) 0 [phi:compare::@22->compare::@16#1] -- pbuz1=pbuc1 + lda #<0 + sta ops + lda #>0 + sta ops+1 + jmp b16 + //SEG115 compare::@16 + b16: + //SEG116 [47] (word) print_word::w#0 ← (word) compare::w1#0 -- vwuz1=vwuz2 + lda w1 + sta print_word.w + lda w1+1 + sta print_word.w+1 + //SEG117 [48] call print_word + //SEG118 [90] phi from compare::@16 to print_word [phi:compare::@16->print_word] + print_word_from_b16: + //SEG119 [90] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#61 [phi:compare::@16->print_word#0] -- register_copy + //SEG120 [90] phi (word) print_word::w#2 = (word) print_word::w#0 [phi:compare::@16->print_word#1] -- register_copy + jsr print_word + //SEG121 [49] phi from compare::@16 to compare::@35 [phi:compare::@16->compare::@35] + b35_from_b16: + jmp b35 + //SEG122 compare::@35 + b35: + //SEG123 [50] call print_str + //SEG124 [79] phi from compare::@35 to print_str [phi:compare::@35->print_str] + print_str_from_b35: + //SEG125 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@35->print_str#0] -- register_copy + //SEG126 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@35->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp b36 + //SEG127 compare::@36 + b36: + //SEG128 [51] (byte*) print_str::str#2 ← (byte*) compare::ops#7 -- pbuz1=pbuz2 + lda ops + sta print_str.str + lda ops+1 + sta print_str.str+1 + //SEG129 [52] call print_str + //SEG130 [79] phi from compare::@36 to print_str [phi:compare::@36->print_str] + print_str_from_b36: + //SEG131 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:compare::@36->print_str#0] -- register_copy + //SEG132 [79] phi (byte*) print_str::str#8 = (byte*) print_str::str#2 [phi:compare::@36->print_str#1] -- register_copy + jsr print_str + //SEG133 [53] phi from compare::@36 to compare::@37 [phi:compare::@36->compare::@37] + b37_from_b36: + jmp b37 + //SEG134 compare::@37 + b37: + //SEG135 [54] call print_str + //SEG136 [79] phi from compare::@37 to print_str [phi:compare::@37->print_str] + print_str_from_b37: + //SEG137 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:compare::@37->print_str#0] -- register_copy + //SEG138 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@37->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp b38 + //SEG139 compare::@38 + b38: + //SEG140 [55] (word) print_word::w#1 ← (word) compare::w2#0 -- vwuz1=vwuz2 + lda w2 + sta print_word.w + lda w2+1 + sta print_word.w+1 + //SEG141 [56] call print_word + //SEG142 [90] phi from compare::@38 to print_word [phi:compare::@38->print_word] + print_word_from_b38: + //SEG143 [90] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#2 [phi:compare::@38->print_word#0] -- register_copy + //SEG144 [90] phi (word) print_word::w#2 = (word) print_word::w#1 [phi:compare::@38->print_word#1] -- register_copy + jsr print_word + //SEG145 [57] phi from compare::@38 to compare::@39 [phi:compare::@38->compare::@39] + b39_from_b38: + jmp b39 + //SEG146 compare::@39 + b39: + //SEG147 [58] call print_str + //SEG148 [79] phi from compare::@39 to print_str [phi:compare::@39->print_str] + print_str_from_b39: + //SEG149 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@39->print_str#0] -- register_copy + //SEG150 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@39->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp b40 + //SEG151 compare::@40 + b40: + //SEG152 [59] (byte) print_char::ch#2 ← (byte) compare::r#10 -- vbuz1=vbuz2 + lda r + sta print_char.ch + //SEG153 [60] call print_char + //SEG154 [86] phi from compare::@40 to print_char [phi:compare::@40->print_char] + print_char_from_b40: + //SEG155 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#2 [phi:compare::@40->print_char#0] -- register_copy + //SEG156 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#2 [phi:compare::@40->print_char#1] -- register_copy + jsr print_char + //SEG157 [61] phi from compare::@40 to compare::@41 [phi:compare::@40->compare::@41] + b41_from_b40: + jmp b41 + //SEG158 compare::@41 + b41: + //SEG159 [62] call print_str + //SEG160 [79] phi from compare::@41 to print_str [phi:compare::@41->print_str] + print_str_from_b41: + //SEG161 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@41->print_str#0] -- register_copy + //SEG162 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@41->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp breturn + //SEG163 compare::@return + breturn: + //SEG164 [63] return + rts + //SEG165 compare::@5 + b5: + //SEG166 [64] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 -- vwuz1_neq_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bne b9_from_b5 + lda w1 + cmp w2 + bne b9_from_b5 + //SEG167 [65] phi from compare::@5 to compare::@26 [phi:compare::@5->compare::@26] + b26_from_b5: + jmp b26 + //SEG168 compare::@26 + b26: + //SEG169 [66] phi from compare::@26 to compare::@9 [phi:compare::@26->compare::@9] + b9_from_b26: + //SEG170 [66] phi (byte) compare::r#20 = (byte) '+' [phi:compare::@26->compare::@9#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b9 + //SEG171 [66] phi from compare::@5 to compare::@9 [phi:compare::@5->compare::@9] + b9_from_b5: + //SEG172 [66] phi (byte) compare::r#20 = (byte) '-' [phi:compare::@5->compare::@9#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b9 + //SEG173 compare::@9 + b9: + //SEG174 [46] phi from compare::@9 to compare::@16 [phi:compare::@9->compare::@16] + b16_from_b9: + //SEG175 [46] phi (byte) compare::r#10 = (byte) compare::r#20 [phi:compare::@9->compare::@16#0] -- register_copy + //SEG176 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#2 [phi:compare::@9->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_2 + sta ops+1 + jmp b16 + //SEG177 compare::@4 + b4: + //SEG178 [67] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 -- vwuz1_lt_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bcc b11_from_b4 + bne !+ + lda w1 + cmp w2 + bcc b11_from_b4 + !: + //SEG179 [68] phi from compare::@4 to compare::@28 [phi:compare::@4->compare::@28] + b28_from_b4: + jmp b28 + //SEG180 compare::@28 + b28: + //SEG181 [69] phi from compare::@28 to compare::@11 [phi:compare::@28->compare::@11] + b11_from_b28: + //SEG182 [69] phi (byte) compare::r#14 = (byte) '+' [phi:compare::@28->compare::@11#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b11 + //SEG183 [69] phi from compare::@4 to compare::@11 [phi:compare::@4->compare::@11] + b11_from_b4: + //SEG184 [69] phi (byte) compare::r#14 = (byte) '-' [phi:compare::@4->compare::@11#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b11 + //SEG185 compare::@11 + b11: + //SEG186 [46] phi from compare::@11 to compare::@16 [phi:compare::@11->compare::@16] + b16_from_b11: + //SEG187 [46] phi (byte) compare::r#10 = (byte) compare::r#14 [phi:compare::@11->compare::@16#0] -- register_copy + //SEG188 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#3 [phi:compare::@11->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_3 + sta ops+1 + jmp b16 + //SEG189 compare::@3 + b3: + //SEG190 [70] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 -- vwuz1_le_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bne !+ + lda w1 + cmp w2 + !: + bcc b13_from_b3 + beq b13_from_b3 + //SEG191 [71] phi from compare::@3 to compare::@30 [phi:compare::@3->compare::@30] + b30_from_b3: + jmp b30 + //SEG192 compare::@30 + b30: + //SEG193 [72] phi from compare::@30 to compare::@13 [phi:compare::@30->compare::@13] + b13_from_b30: + //SEG194 [72] phi (byte) compare::r#15 = (byte) '+' [phi:compare::@30->compare::@13#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b13 + //SEG195 [72] phi from compare::@3 to compare::@13 [phi:compare::@3->compare::@13] + b13_from_b3: + //SEG196 [72] phi (byte) compare::r#15 = (byte) '-' [phi:compare::@3->compare::@13#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b13 + //SEG197 compare::@13 + b13: + //SEG198 [46] phi from compare::@13 to compare::@16 [phi:compare::@13->compare::@16] + b16_from_b13: + //SEG199 [46] phi (byte) compare::r#10 = (byte) compare::r#15 [phi:compare::@13->compare::@16#0] -- register_copy + //SEG200 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#4 [phi:compare::@13->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_4 + sta ops+1 + jmp b16 + //SEG201 compare::@2 + b2: + //SEG202 [73] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 -- vwuz1_gt_vwuz2_then_la1 + lda w2+1 + cmp w1+1 + bcc b15_from_b2 + bne !+ + lda w2 + cmp w1 + bcc b15_from_b2 + !: + //SEG203 [74] phi from compare::@2 to compare::@32 [phi:compare::@2->compare::@32] + b32_from_b2: + jmp b32 + //SEG204 compare::@32 + b32: + //SEG205 [75] phi from compare::@32 to compare::@15 [phi:compare::@32->compare::@15] + b15_from_b32: + //SEG206 [75] phi (byte) compare::r#16 = (byte) '+' [phi:compare::@32->compare::@15#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b15 + //SEG207 [75] phi from compare::@2 to compare::@15 [phi:compare::@2->compare::@15] + b15_from_b2: + //SEG208 [75] phi (byte) compare::r#16 = (byte) '-' [phi:compare::@2->compare::@15#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b15 + //SEG209 compare::@15 + b15: + //SEG210 [46] phi from compare::@15 to compare::@16 [phi:compare::@15->compare::@16] + b16_from_b15: + //SEG211 [46] phi (byte) compare::r#10 = (byte) compare::r#16 [phi:compare::@15->compare::@16#0] -- register_copy + //SEG212 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#5 [phi:compare::@15->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_5 + sta ops+1 + jmp b16 + //SEG213 compare::@1 + b1: + //SEG214 [76] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 -- vwuz1_ge_vwuz2_then_la1 + lda w2+1 + cmp w1+1 + bne !+ + lda w2 + cmp w1 + !: + bcc b17_from_b1 + beq b17_from_b1 + //SEG215 [77] phi from compare::@1 to compare::@34 [phi:compare::@1->compare::@34] + b34_from_b1: + jmp b34 + //SEG216 compare::@34 + b34: + //SEG217 [78] phi from compare::@34 to compare::@17 [phi:compare::@34->compare::@17] + b17_from_b34: + //SEG218 [78] phi (byte) compare::r#17 = (byte) '+' [phi:compare::@34->compare::@17#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b17 + //SEG219 [78] phi from compare::@1 to compare::@17 [phi:compare::@1->compare::@17] + b17_from_b1: + //SEG220 [78] phi (byte) compare::r#17 = (byte) '-' [phi:compare::@1->compare::@17#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b17 + //SEG221 compare::@17 + b17: + //SEG222 [46] phi from compare::@17 to compare::@16 [phi:compare::@17->compare::@16] + b16_from_b17: + //SEG223 [46] phi (byte) compare::r#10 = (byte) compare::r#17 [phi:compare::@17->compare::@16#0] -- register_copy + //SEG224 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#6 [phi:compare::@17->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_6 + sta ops+1 + jmp b16 + str: .text " @" + ops_1: .text "!=@" + ops_2: .text "==@" + ops_3: .text ">=@" + ops_4: .text "> @" + ops_5: .text "<=@" + ops_6: .text "< @" +} +//SEG225 print_str +// Print a zero-terminated string +// print_str(byte* zeropage($b) str) +print_str: { + .label str = $b + //SEG226 [80] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] + b1_from_print_str: + b1_from_b2: + //SEG227 [80] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#66 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy + //SEG228 [80] phi (byte*) print_str::str#6 = (byte*) print_str::str#8 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy + jmp b1 + //SEG229 print_str::@1 + b1: + //SEG230 [81] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 + ldy #0 + lda (str),y + cmp #'@' + bne b2 + jmp breturn + //SEG231 print_str::@return + breturn: + //SEG232 [82] return + rts + //SEG233 print_str::@2 + b2: + //SEG234 [83] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#6) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (str),y + ldy #0 + sta (print_char_cursor),y + //SEG235 [84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + //SEG236 [85] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#6 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + jmp b1_from_b2 +} +//SEG237 print_char +// Print a single char +// print_char(byte zeropage($d) ch) +print_char: { + .label ch = $d + //SEG238 [87] *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 -- _deref_pbuz1=vbuz2 + lda ch + ldy #0 + sta (print_char_cursor),y + //SEG239 [88] (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#39 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + jmp breturn + //SEG240 print_char::@return + breturn: + //SEG241 [89] return + rts +} +//SEG242 print_word +// Print a word as HEX +// print_word(word zeropage($e) w) +print_word: { + .label w = $e + //SEG243 [91] (byte) print_byte::b#0 ← > (word) print_word::w#2 -- vbuz1=_hi_vwuz2 + lda w+1 + sta print_byte.b + //SEG244 [92] call print_byte + //SEG245 [96] phi from print_word to print_byte [phi:print_word->print_byte] + print_byte_from_print_word: + //SEG246 [96] phi (byte*) print_char_cursor#59 = (byte*) print_char_cursor#58 [phi:print_word->print_byte#0] -- register_copy + //SEG247 [96] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy + jsr print_byte + jmp b1 + //SEG248 print_word::@1 + b1: + //SEG249 [93] (byte) print_byte::b#1 ← < (word) print_word::w#2 -- vbuz1=_lo_vwuz2 + lda w + sta print_byte.b + //SEG250 [94] call print_byte + //SEG251 [96] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte] + print_byte_from_b1: + //SEG252 [96] phi (byte*) print_char_cursor#59 = (byte*) print_char_cursor#11 [phi:print_word::@1->print_byte#0] -- register_copy + //SEG253 [96] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy + jsr print_byte + jmp breturn + //SEG254 print_word::@return + breturn: + //SEG255 [95] return + rts +} +//SEG256 print_byte +// Print a byte as HEX +// print_byte(byte zeropage($12) b) +print_byte: { + .label _0 = $21 + .label _2 = $22 + .label b = $12 + //SEG257 [97] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz2_ror_4 + lda b + lsr + lsr + lsr + lsr + sta _0 + //SEG258 [98] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy _0 + lda print_hextab,y + sta print_char.ch + //SEG259 [99] call print_char + //SEG260 [86] phi from print_byte to print_char [phi:print_byte->print_char] + print_char_from_print_byte: + //SEG261 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#59 [phi:print_byte->print_char#0] -- register_copy + //SEG262 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy + jsr print_char + jmp b1 + //SEG263 print_byte::@1 + b1: + //SEG264 [100] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuz1=vbuz2_band_vbuc1 + lda #$f + and b + sta _2 + //SEG265 [101] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy _2 + lda print_hextab,y + sta print_char.ch + //SEG266 [102] call print_char + //SEG267 [86] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char] + print_char_from_b1: + //SEG268 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#11 [phi:print_byte::@1->print_char#0] -- register_copy + //SEG269 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy + jsr print_char + jmp breturn + //SEG270 print_byte::@return + breturn: + //SEG271 [103] return + rts +} +//SEG272 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = $13 + //SEG273 [105] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + b1_from_print_cls: + //SEG274 [105] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #<$400 + sta sc + lda #>$400 + sta sc+1 + jmp b1 + //SEG275 [105] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + b1_from_b1: + //SEG276 [105] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + jmp b1 + //SEG277 print_cls::@1 + b1: + //SEG278 [106] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG279 [107] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG280 [108] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>$400+$3e8 + bne b1_from_b1 + lda sc + cmp #<$400+$3e8 + bne b1_from_b1 + jmp breturn + //SEG281 print_cls::@return + breturn: + //SEG282 [109] return + rts +} + print_hextab: .text "0123456789abcdef" + words: .word $12, $3f34, $cfed + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [7] (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::$1 ] ( main:2 [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +Statement [8] (word) main::w1#0 ← *((const word[]) words#0 + (byte~) main::$1) [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::w1#0 ] ( main:2 [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::w1#0 ] ) always clobbers reg byte a +Statement [10] (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::$2 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::$2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +Statement [11] (word) main::w2#0 ← *((const word[]) words#0 + (byte~) main::$2) [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::w2#0 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::w2#0 ] ) always clobbers reg byte a +Statement [14] (word) compare::w1#0 ← (word) main::w1#0 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ main::op#2 main::op#1 ] +Statement [15] (word) compare::w2#0 ← (word) main::w2#0 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 compare::w2#0 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [19] (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 print_line_cursor#19 main::ln#1 main::$6 print_char_cursor#2 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 print_line_cursor#19 main::ln#1 main::$6 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [23] (byte*~) print_char_cursor#107 ← (byte*) print_line_cursor#1 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_char_cursor#107 print_line_cursor#1 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_char_cursor#107 print_line_cursor#1 ] ) always clobbers reg byte a +Statement [34] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:22 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [35] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:22 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [43] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [47] (word) print_word::w#0 ← (word) compare::w1#0 [ print_char_cursor#61 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +Statement [51] (byte*) print_str::str#2 ← (byte*) compare::ops#7 [ compare::w2#0 print_char_cursor#2 compare::r#10 print_str::str#2 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 print_char_cursor#2 compare::r#10 print_str::str#2 ] ) always clobbers reg byte a +Statement [55] (word) print_word::w#1 ← (word) compare::w2#0 [ print_char_cursor#2 compare::r#10 print_word::w#1 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#2 compare::r#10 print_word::w#1 ] ) always clobbers reg byte a +Statement [64] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [67] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [70] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [73] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [76] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [81] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 [ print_char_cursor#2 print_str::str#6 ] ( main:2::compare:17::print_str:50 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:52 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:54 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:58 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:62 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#2 print_str::str#6 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ main::op#2 main::op#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +Statement [83] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#6) [ print_char_cursor#2 print_str::str#6 ] ( main:2::compare:17::print_str:50 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:52 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:54 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:58 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:62 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#2 print_str::str#6 ] ) always clobbers reg byte a reg byte y +Statement [87] *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 [ print_char_cursor#39 ] ( main:2::compare:17::print_char:60 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:92::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:92::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:94::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:94::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:92::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:92::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:94::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:94::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#39 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +Statement [91] (byte) print_byte::b#0 ← > (word) print_word::w#2 [ print_word::w#2 print_char_cursor#58 print_byte::b#0 ] ( main:2::compare:17::print_word:48 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#58 print_byte::b#0 ] main:2::compare:17::print_word:56 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#58 print_byte::b#0 ] ) always clobbers reg byte a +Statement [93] (byte) print_byte::b#1 ← < (word) print_word::w#2 [ print_char_cursor#11 print_byte::b#1 ] ( main:2::compare:17::print_word:48 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#11 print_byte::b#1 ] main:2::compare:17::print_word:56 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#11 print_byte::b#1 ] ) always clobbers reg byte a +Statement [97] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ print_char_cursor#59 print_byte::b#2 print_byte::$0 ] ( main:2::compare:17::print_word:48::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] main:2::compare:17::print_word:56::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] main:2::compare:17::print_word:48::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] main:2::compare:17::print_word:56::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +Statement [100] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) $f [ print_char_cursor#11 print_byte::$2 ] ( main:2::compare:17::print_word:48::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#11 print_byte::$2 ] main:2::compare:17::print_word:56::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#11 print_byte::$2 ] main:2::compare:17::print_word:48::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#11 print_byte::$2 ] main:2::compare:17::print_word:56::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#11 print_byte::$2 ] ) always clobbers reg byte a +Statement [106] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:2::print_cls:5 [ print_cls::sc#2 ] ) always clobbers reg byte a reg byte y +Statement [108] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 [ print_cls::sc#1 ] ( main:2::print_cls:5 [ print_cls::sc#1 ] ) always clobbers reg byte a +Statement [7] (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::$1 ] ( main:2 [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::$1 ] ) always clobbers reg byte a +Statement [8] (word) main::w1#0 ← *((const word[]) words#0 + (byte~) main::$1) [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::w1#0 ] ( main:2 [ main::i#2 main::ln#7 print_char_cursor#95 print_line_cursor#33 main::w1#0 ] ) always clobbers reg byte a +Statement [10] (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::$2 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::$2 ] ) always clobbers reg byte a +Statement [11] (word) main::w2#0 ← *((const word[]) words#0 + (byte~) main::$2) [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::w2#0 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::ln#4 print_char_cursor#79 print_line_cursor#31 main::w2#0 ] ) always clobbers reg byte a +Statement [14] (word) compare::w1#0 ← (word) main::w1#0 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 ] ) always clobbers reg byte a +Statement [15] (word) compare::w2#0 ← (word) main::w2#0 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 compare::w2#0 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_char_cursor#61 print_line_cursor#19 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [19] (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 print_line_cursor#19 main::ln#1 main::$6 print_char_cursor#2 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 print_line_cursor#19 main::ln#1 main::$6 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [23] (byte*~) print_char_cursor#107 ← (byte*) print_line_cursor#1 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_char_cursor#107 print_line_cursor#1 ] ( main:2 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_char_cursor#107 print_line_cursor#1 ] ) always clobbers reg byte a +Statement [34] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:22 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [35] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::print_ln:22 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::op#2 main::ln#1 print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a +Statement [43] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [47] (word) print_word::w#0 ← (word) compare::w1#0 [ print_char_cursor#61 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#0 ] ) always clobbers reg byte a +Statement [51] (byte*) print_str::str#2 ← (byte*) compare::ops#7 [ compare::w2#0 print_char_cursor#2 compare::r#10 print_str::str#2 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 print_char_cursor#2 compare::r#10 print_str::str#2 ] ) always clobbers reg byte a +Statement [55] (word) print_word::w#1 ← (word) compare::w2#0 [ print_char_cursor#2 compare::r#10 print_word::w#1 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#2 compare::r#10 print_word::w#1 ] ) always clobbers reg byte a +Statement [64] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [67] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [70] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [73] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [76] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 [ print_char_cursor#61 compare::w1#0 compare::w2#0 ] ( main:2::compare:17 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#61 compare::w1#0 compare::w2#0 ] ) always clobbers reg byte a +Statement [81] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 [ print_char_cursor#2 print_str::str#6 ] ( main:2::compare:17::print_str:50 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:52 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:54 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:58 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:62 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#2 print_str::str#6 ] ) always clobbers reg byte a reg byte y +Statement [83] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#6) [ print_char_cursor#2 print_str::str#6 ] ( main:2::compare:17::print_str:50 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:52 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:54 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:58 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#2 print_str::str#6 ] main:2::compare:17::print_str:62 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#2 print_str::str#6 ] ) always clobbers reg byte a reg byte y +Statement [87] *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 [ print_char_cursor#39 ] ( main:2::compare:17::print_char:60 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:92::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:92::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:94::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:94::print_char:99 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_byte::b#2 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:92::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:92::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#39 ] main:2::compare:17::print_word:48::print_byte:94::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#39 ] main:2::compare:17::print_word:56::print_byte:94::print_char:102 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#39 ] ) always clobbers reg byte y +Statement [91] (byte) print_byte::b#0 ← > (word) print_word::w#2 [ print_word::w#2 print_char_cursor#58 print_byte::b#0 ] ( main:2::compare:17::print_word:48 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#58 print_byte::b#0 ] main:2::compare:17::print_word:56 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#58 print_byte::b#0 ] ) always clobbers reg byte a +Statement [93] (byte) print_byte::b#1 ← < (word) print_word::w#2 [ print_char_cursor#11 print_byte::b#1 ] ( main:2::compare:17::print_word:48 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#11 print_byte::b#1 ] main:2::compare:17::print_word:56 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#11 print_byte::b#1 ] ) always clobbers reg byte a +Statement [97] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ print_char_cursor#59 print_byte::b#2 print_byte::$0 ] ( main:2::compare:17::print_word:48::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] main:2::compare:17::print_word:56::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] main:2::compare:17::print_word:48::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] main:2::compare:17::print_word:56::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#59 print_byte::b#2 print_byte::$0 ] ) always clobbers reg byte a +Statement [100] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) $f [ print_char_cursor#11 print_byte::$2 ] ( main:2::compare:17::print_word:48::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_word::w#2 print_char_cursor#11 print_byte::$2 ] main:2::compare:17::print_word:56::print_byte:92 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_word::w#2 print_char_cursor#11 print_byte::$2 ] main:2::compare:17::print_word:48::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::w2#0 compare::ops#7 compare::r#10 print_char_cursor#11 print_byte::$2 ] main:2::compare:17::print_word:56::print_byte:94 [ main::i#2 main::w1#0 main::j#2 main::w2#0 main::ln#2 main::op#2 print_line_cursor#19 compare::r#10 print_char_cursor#11 print_byte::$2 ] ) always clobbers reg byte a +Statement [106] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:2::print_cls:5 [ print_cls::sc#2 ] ) always clobbers reg byte a reg byte y +Statement [108] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 [ print_cls::sc#1 ] ( main:2::print_cls:5 [ print_cls::sc#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , +Potential registers zp ZP_BYTE:3 [ main::j#2 main::j#1 ] : zp ZP_BYTE:3 , reg byte x , +Potential registers zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] : zp ZP_BYTE:4 , reg byte x , +Potential registers zp ZP_BYTE:5 [ main::op#2 main::op#1 ] : zp ZP_BYTE:5 , reg byte x , +Potential registers zp ZP_WORD:6 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ compare::ops#7 ] : zp ZP_WORD:8 , +Potential registers zp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] : zp ZP_BYTE:10 , reg byte x , +Potential registers zp ZP_WORD:11 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 ] : zp ZP_WORD:11 , +Potential registers zp ZP_BYTE:13 [ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:14 [ print_word::w#2 print_word::w#0 print_word::w#1 ] : zp ZP_WORD:14 , +Potential registers zp ZP_WORD:16 [ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] : zp ZP_WORD:16 , +Potential registers zp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp ZP_BYTE:18 , reg byte x , +Potential registers zp ZP_WORD:19 [ print_cls::sc#2 print_cls::sc#1 ] : zp ZP_WORD:19 , +Potential registers zp ZP_BYTE:21 [ main::$1 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:22 [ main::w1#0 ] : zp ZP_WORD:22 , +Potential registers zp ZP_BYTE:24 [ main::$2 ] : zp ZP_BYTE:24 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:25 [ main::w2#0 ] : zp ZP_WORD:25 , +Potential registers zp ZP_WORD:27 [ compare::w1#0 ] : zp ZP_WORD:27 , +Potential registers zp ZP_WORD:29 [ compare::w2#0 ] : zp ZP_WORD:29 , +Potential registers zp ZP_BYTE:31 [ compare::op#0 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:32 [ main::$6 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:33 [ print_byte::$0 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:34 [ print_byte::$2 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [] 27,353.7: zp ZP_WORD:6 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 ] 14,543.2: zp ZP_WORD:16 [ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +Uplift Scope [print_str] 30,011.5: zp ZP_WORD:11 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 ] +Uplift Scope [main] 2,017.83: zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] 2,002: zp ZP_BYTE:32 [ main::$6 ] 1,732.5: zp ZP_BYTE:5 [ main::op#2 main::op#1 ] 202: zp ZP_BYTE:24 [ main::$2 ] 168.33: zp ZP_BYTE:3 [ main::j#2 main::j#1 ] 68.88: zp ZP_WORD:25 [ main::w2#0 ] 48.19: zp ZP_WORD:22 [ main::w1#0 ] 22: zp ZP_BYTE:21 [ main::$1 ] 17.93: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplift Scope [compare] 168.83: zp ZP_BYTE:31 [ compare::op#0 ] 36.25: zp ZP_WORD:27 [ compare::w1#0 ] 29: zp ZP_WORD:29 [ compare::w2#0 ] 13.08: zp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] 0.4: zp ZP_WORD:8 [ compare::ops#7 ] +Uplift Scope [print_cls] 33: zp ZP_WORD:19 [ print_cls::sc#2 print_cls::sc#1 ] +Uplift Scope [print_char] 20: zp ZP_BYTE:13 [ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +Uplift Scope [print_byte] 10: zp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp ZP_BYTE:33 [ print_byte::$0 ] 4: zp ZP_BYTE:34 [ print_byte::$2 ] +Uplift Scope [print_word] 10.67: zp ZP_WORD:14 [ print_word::w#2 print_word::w#0 print_word::w#1 ] +Uplift Scope [print_ln] + +Uplifting [] best 1166836 combination zp ZP_WORD:6 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 ] zp ZP_WORD:16 [ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +Uplifting [print_str] best 1166836 combination zp ZP_WORD:11 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 ] +Uplifting [main] best 1148436 combination zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] reg byte a [ main::$6 ] reg byte x [ main::op#2 main::op#1 ] reg byte a [ main::$2 ] zp ZP_BYTE:3 [ main::j#2 main::j#1 ] zp ZP_WORD:25 [ main::w2#0 ] zp ZP_WORD:22 [ main::w1#0 ] zp ZP_BYTE:21 [ main::$1 ] zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Limited combination testing to 100 combinations of 1024 possible. +Uplifting [compare] best 1145418 combination reg byte x [ compare::op#0 ] zp ZP_WORD:27 [ compare::w1#0 ] zp ZP_WORD:29 [ compare::w2#0 ] zp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] zp ZP_WORD:8 [ compare::ops#7 ] +Uplifting [print_cls] best 1145418 combination zp ZP_WORD:19 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [print_char] best 1145406 combination reg byte a [ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +Uplifting [print_byte] best 1145398 combination zp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [print_word] best 1145398 combination zp ZP_WORD:14 [ print_word::w#2 print_word::w#0 print_word::w#1 ] +Uplifting [print_ln] best 1145398 combination +Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +Uplifting [main] best 1145398 combination zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::j#2 main::j#1 ] +Uplifting [main] best 1145398 combination zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:21 [ main::$1 ] +Uplifting [main] best 1145358 combination reg byte a [ main::$1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplifting [main] best 1145358 combination zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +Uplifting [compare] best 1145358 combination zp ZP_BYTE:10 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +Attempting to uplift remaining variables inzp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +Uplifting [print_byte] best 1145358 combination zp ZP_BYTE:18 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:14 [ print_word::w#2 print_word::w#0 print_word::w#1 ] ] with [ zp ZP_WORD:27 [ compare::w1#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:25 [ main::w2#0 ] ] with [ zp ZP_WORD:29 [ compare::w2#0 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:6 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 ] ] with [ zp ZP_WORD:19 [ print_cls::sc#2 print_cls::sc#1 ] ] +Coalescing zero page register [ zp ZP_WORD:11 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 ] ] with [ zp ZP_WORD:14 [ print_word::w#2 print_word::w#0 print_word::w#1 compare::w1#0 ] ] +Allocated (was zp ZP_WORD:6) zp ZP_WORD:5 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +Allocated (was zp ZP_WORD:8) zp ZP_WORD:7 [ compare::ops#7 ] +Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:9 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +Allocated (was zp ZP_WORD:11) zp ZP_WORD:10 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 print_word::w#2 print_word::w#0 print_word::w#1 compare::w1#0 ] +Allocated (was zp ZP_WORD:16) zp ZP_WORD:12 [ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:14 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +Allocated (was zp ZP_WORD:22) zp ZP_WORD:15 [ main::w1#0 ] +Allocated (was zp ZP_WORD:25) zp ZP_WORD:17 [ main::w2#0 compare::w2#0 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label print_char_cursor = $c + .label print_line_cursor = 5 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @25 [phi:@begin->@25] +b25_from_bbegin: + jmp b25 +//SEG5 @25 +b25: +//SEG6 [2] call main +//SEG7 [4] phi from @25 to main [phi:@25->main] +main_from_b25: + jsr main +//SEG8 [3] phi from @25 to @end [phi:@25->@end] +bend_from_b25: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .label w1 = $f + .label w2 = $11 + .label ln = 4 + .label j = 3 + .label i = 2 + //SEG11 [5] call print_cls + //SEG12 [104] phi from main to print_cls [phi:main->print_cls] + print_cls_from_main: + jsr print_cls + //SEG13 [6] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG14 [6] phi (byte*) print_line_cursor#33 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #<$400 + sta print_line_cursor + lda #>$400 + sta print_line_cursor+1 + //SEG15 [6] phi (byte*) print_char_cursor#95 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->main::@1#1] -- pbuz1=pbuc1 + lda #<$400 + sta print_char_cursor + lda #>$400 + sta print_char_cursor+1 + //SEG16 [6] phi (byte) main::ln#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 + lda #0 + sta ln + //SEG17 [6] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#3] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b1 + //SEG18 [6] phi from main::@12 to main::@1 [phi:main::@12->main::@1] + b1_from_b12: + //SEG19 [6] phi (byte*) print_line_cursor#33 = (byte*) print_line_cursor#23 [phi:main::@12->main::@1#0] -- register_copy + //SEG20 [6] phi (byte*) print_char_cursor#95 = (byte*) print_char_cursor#68 [phi:main::@12->main::@1#1] -- register_copy + //SEG21 [6] phi (byte) main::ln#7 = (byte) main::ln#11 [phi:main::@12->main::@1#2] -- register_copy + //SEG22 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@12->main::@1#3] -- register_copy + jmp b1 + //SEG23 main::@1 + b1: + //SEG24 [7] (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 + lda i + asl + //SEG25 [8] (word) main::w1#0 ← *((const word[]) words#0 + (byte~) main::$1) -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda words,y + sta w1 + lda words+1,y + sta w1+1 + //SEG26 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + b2_from_b1: + //SEG27 [9] phi (byte*) print_line_cursor#31 = (byte*) print_line_cursor#33 [phi:main::@1->main::@2#0] -- register_copy + //SEG28 [9] phi (byte*) print_char_cursor#79 = (byte*) print_char_cursor#95 [phi:main::@1->main::@2#1] -- register_copy + //SEG29 [9] phi (byte) main::ln#4 = (byte) main::ln#7 [phi:main::@1->main::@2#2] -- register_copy + //SEG30 [9] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#3] -- vbuz1=vbuc1 + lda #0 + sta j + jmp b2 + //SEG31 [9] phi from main::@11 to main::@2 [phi:main::@11->main::@2] + b2_from_b11: + //SEG32 [9] phi (byte*) print_line_cursor#31 = (byte*) print_line_cursor#23 [phi:main::@11->main::@2#0] -- register_copy + //SEG33 [9] phi (byte*) print_char_cursor#79 = (byte*) print_char_cursor#68 [phi:main::@11->main::@2#1] -- register_copy + //SEG34 [9] phi (byte) main::ln#4 = (byte) main::ln#11 [phi:main::@11->main::@2#2] -- register_copy + //SEG35 [9] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@11->main::@2#3] -- register_copy + jmp b2 + //SEG36 main::@2 + b2: + //SEG37 [10] (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 + lda j + asl + //SEG38 [11] (word) main::w2#0 ← *((const word[]) words#0 + (byte~) main::$2) -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda words,y + sta w2 + lda words+1,y + sta w2+1 + //SEG39 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + b3_from_b2: + //SEG40 [12] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#31 [phi:main::@2->main::@3#0] -- register_copy + //SEG41 [12] phi (byte*) print_char_cursor#61 = (byte*) print_char_cursor#79 [phi:main::@2->main::@3#1] -- register_copy + //SEG42 [12] phi (byte) main::op#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->main::@3#2] -- vbuxx=vbuc1 + ldx #0 + //SEG43 [12] phi (byte) main::ln#2 = (byte) main::ln#4 [phi:main::@2->main::@3#3] -- register_copy + jmp b3 + //SEG44 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + b3_from_b4: + //SEG45 [12] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#23 [phi:main::@4->main::@3#0] -- register_copy + //SEG46 [12] phi (byte*) print_char_cursor#61 = (byte*) print_char_cursor#68 [phi:main::@4->main::@3#1] -- register_copy + //SEG47 [12] phi (byte) main::op#2 = (byte) main::op#1 [phi:main::@4->main::@3#2] -- register_copy + //SEG48 [12] phi (byte) main::ln#2 = (byte) main::ln#11 [phi:main::@4->main::@3#3] -- register_copy + jmp b3 + //SEG49 main::@3 + b3: + //SEG50 [13] if((byte) main::ln#2>=(byte/signed byte/word/signed word/dword/signed dword) $32) goto main::@4 -- vbuz1_ge_vbuc1_then_la1 + lda ln + cmp #$32 + bcs b4_from_b3 + jmp b9 + //SEG51 main::@9 + b9: + //SEG52 [14] (word) compare::w1#0 ← (word) main::w1#0 -- vwuz1=vwuz2 + lda w1 + sta compare.w1 + lda w1+1 + sta compare.w1+1 + //SEG53 [15] (word) compare::w2#0 ← (word) main::w2#0 + //SEG54 [16] (byte) compare::op#0 ← (byte) main::op#2 + //SEG55 [17] call compare + jsr compare + jmp b18 + //SEG56 main::@18 + b18: + //SEG57 [18] (byte) main::ln#1 ← ++ (byte) main::ln#2 -- vbuz1=_inc_vbuz1 + inc ln + //SEG58 [19] (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_band_vbuc1 + lda #1 + and ln + //SEG59 [20] if((byte~) main::$6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b4_from_b18 + //SEG60 [21] phi from main::@18 to main::@10 [phi:main::@18->main::@10] + b10_from_b18: + jmp b10 + //SEG61 main::@10 + b10: + //SEG62 [22] call print_ln + //SEG63 [32] phi from main::@10 to print_ln [phi:main::@10->print_ln] + print_ln_from_b10: + jsr print_ln + //SEG64 [23] (byte*~) print_char_cursor#107 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 + lda print_line_cursor + sta print_char_cursor + lda print_line_cursor+1 + sta print_char_cursor+1 + //SEG65 [24] phi from main::@10 main::@18 main::@3 to main::@4 [phi:main::@10/main::@18/main::@3->main::@4] + b4_from_b10: + b4_from_b18: + b4_from_b3: + //SEG66 [24] phi (byte*) print_line_cursor#23 = (byte*) print_line_cursor#1 [phi:main::@10/main::@18/main::@3->main::@4#0] -- register_copy + //SEG67 [24] phi (byte*) print_char_cursor#68 = (byte*~) print_char_cursor#107 [phi:main::@10/main::@18/main::@3->main::@4#1] -- register_copy + //SEG68 [24] phi (byte) main::ln#11 = (byte) main::ln#1 [phi:main::@10/main::@18/main::@3->main::@4#2] -- register_copy + jmp b4 + //SEG69 main::@4 + b4: + //SEG70 [25] (byte) main::op#1 ← ++ (byte) main::op#2 -- vbuxx=_inc_vbuxx + inx + //SEG71 [26] if((byte) main::op#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 + cpx #6 + bne b3_from_b4 + jmp b11 + //SEG72 main::@11 + b11: + //SEG73 [27] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1 + inc j + //SEG74 [28] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 + lda j + cmp #3 + bne b2_from_b11 + jmp b12 + //SEG75 main::@12 + b12: + //SEG76 [29] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG77 [30] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda i + cmp #3 + bne b1_from_b12 + //SEG78 [31] phi from main::@12 main::@7 to main::@7 [phi:main::@12/main::@7->main::@7] + b7_from_b12: + b7_from_b7: + jmp b7 + //SEG79 main::@7 + b7: + jmp b7_from_b7 +} +//SEG80 print_ln +// Print a newline +print_ln: { + //SEG81 [33] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + b1_from_print_ln: + b1_from_b1: + //SEG82 [33] phi (byte*) print_line_cursor#9 = (byte*) print_line_cursor#19 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + jmp b1 + //SEG83 print_ln::@1 + b1: + //SEG84 [34] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda print_line_cursor + clc + adc #$28 + sta print_line_cursor + bcc !+ + inc print_line_cursor+1 + !: + //SEG85 [35] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + lda print_line_cursor+1 + cmp print_char_cursor+1 + bcc b1_from_b1 + bne !+ + lda print_line_cursor + cmp print_char_cursor + bcc b1_from_b1 + !: + jmp breturn + //SEG86 print_ln::@return + breturn: + //SEG87 [36] return + rts +} +//SEG88 compare +// Compare two words using an operator +// compare(word zeropage($a) w1, word zeropage($11) w2, byte register(X) op) +compare: { + .label w1 = $a + .label w2 = $11 + .label ops = 7 + .label r = 9 + //SEG89 [37] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto compare::@1 -- vbuxx_eq_0_then_la1 + cpx #0 + beq b1 + jmp b18 + //SEG90 compare::@18 + b18: + //SEG91 [38] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto compare::@2 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b2 + jmp b19 + //SEG92 compare::@19 + b19: + //SEG93 [39] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto compare::@3 -- vbuxx_eq_vbuc1_then_la1 + cpx #2 + beq b3 + jmp b20 + //SEG94 compare::@20 + b20: + //SEG95 [40] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto compare::@4 -- vbuxx_eq_vbuc1_then_la1 + cpx #3 + beq b4 + jmp b21 + //SEG96 compare::@21 + b21: + //SEG97 [41] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto compare::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #4 + beq b5 + jmp b22 + //SEG98 compare::@22 + b22: + //SEG99 [42] if((byte) compare::op#0!=(byte/signed byte/word/signed word/dword/signed dword) 5) goto compare::@16 -- vbuxx_neq_vbuc1_then_la1 + cpx #5 + bne b16_from_b22 + jmp b23 + //SEG100 compare::@23 + b23: + //SEG101 [43] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 -- vwuz1_eq_vwuz2_then_la1 + lda w1 + cmp w2 + bne !+ + lda w1+1 + cmp w2+1 + beq b7_from_b23 + !: + //SEG102 [44] phi from compare::@23 to compare::@24 [phi:compare::@23->compare::@24] + b24_from_b23: + jmp b24 + //SEG103 compare::@24 + b24: + //SEG104 [45] phi from compare::@24 to compare::@7 [phi:compare::@24->compare::@7] + b7_from_b24: + //SEG105 [45] phi (byte) compare::r#19 = (byte) '+' [phi:compare::@24->compare::@7#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b7 + //SEG106 [45] phi from compare::@23 to compare::@7 [phi:compare::@23->compare::@7] + b7_from_b23: + //SEG107 [45] phi (byte) compare::r#19 = (byte) '-' [phi:compare::@23->compare::@7#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b7 + //SEG108 compare::@7 + b7: + //SEG109 [46] phi from compare::@7 to compare::@16 [phi:compare::@7->compare::@16] + b16_from_b7: + //SEG110 [46] phi (byte) compare::r#10 = (byte) compare::r#19 [phi:compare::@7->compare::@16#0] -- register_copy + //SEG111 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#1 [phi:compare::@7->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_1 + sta ops+1 + jmp b16 + //SEG112 [46] phi from compare::@22 to compare::@16 [phi:compare::@22->compare::@16] + b16_from_b22: + //SEG113 [46] phi (byte) compare::r#10 = (byte) '-' [phi:compare::@22->compare::@16#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG114 [46] phi (byte*) compare::ops#7 = (byte*) 0 [phi:compare::@22->compare::@16#1] -- pbuz1=pbuc1 + lda #<0 + sta ops + lda #>0 + sta ops+1 + jmp b16 + //SEG115 compare::@16 + b16: + //SEG116 [47] (word) print_word::w#0 ← (word) compare::w1#0 + //SEG117 [48] call print_word + //SEG118 [90] phi from compare::@16 to print_word [phi:compare::@16->print_word] + print_word_from_b16: + //SEG119 [90] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#61 [phi:compare::@16->print_word#0] -- register_copy + //SEG120 [90] phi (word) print_word::w#2 = (word) print_word::w#0 [phi:compare::@16->print_word#1] -- register_copy + jsr print_word + //SEG121 [49] phi from compare::@16 to compare::@35 [phi:compare::@16->compare::@35] + b35_from_b16: + jmp b35 + //SEG122 compare::@35 + b35: + //SEG123 [50] call print_str + //SEG124 [79] phi from compare::@35 to print_str [phi:compare::@35->print_str] + print_str_from_b35: + //SEG125 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@35->print_str#0] -- register_copy + //SEG126 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@35->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp b36 + //SEG127 compare::@36 + b36: + //SEG128 [51] (byte*) print_str::str#2 ← (byte*) compare::ops#7 -- pbuz1=pbuz2 + lda ops + sta print_str.str + lda ops+1 + sta print_str.str+1 + //SEG129 [52] call print_str + //SEG130 [79] phi from compare::@36 to print_str [phi:compare::@36->print_str] + print_str_from_b36: + //SEG131 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:compare::@36->print_str#0] -- register_copy + //SEG132 [79] phi (byte*) print_str::str#8 = (byte*) print_str::str#2 [phi:compare::@36->print_str#1] -- register_copy + jsr print_str + //SEG133 [53] phi from compare::@36 to compare::@37 [phi:compare::@36->compare::@37] + b37_from_b36: + jmp b37 + //SEG134 compare::@37 + b37: + //SEG135 [54] call print_str + //SEG136 [79] phi from compare::@37 to print_str [phi:compare::@37->print_str] + print_str_from_b37: + //SEG137 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:compare::@37->print_str#0] -- register_copy + //SEG138 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@37->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp b38 + //SEG139 compare::@38 + b38: + //SEG140 [55] (word) print_word::w#1 ← (word) compare::w2#0 -- vwuz1=vwuz2 + lda w2 + sta print_word.w + lda w2+1 + sta print_word.w+1 + //SEG141 [56] call print_word + //SEG142 [90] phi from compare::@38 to print_word [phi:compare::@38->print_word] + print_word_from_b38: + //SEG143 [90] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#2 [phi:compare::@38->print_word#0] -- register_copy + //SEG144 [90] phi (word) print_word::w#2 = (word) print_word::w#1 [phi:compare::@38->print_word#1] -- register_copy + jsr print_word + //SEG145 [57] phi from compare::@38 to compare::@39 [phi:compare::@38->compare::@39] + b39_from_b38: + jmp b39 + //SEG146 compare::@39 + b39: + //SEG147 [58] call print_str + //SEG148 [79] phi from compare::@39 to print_str [phi:compare::@39->print_str] + print_str_from_b39: + //SEG149 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@39->print_str#0] -- register_copy + //SEG150 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@39->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp b40 + //SEG151 compare::@40 + b40: + //SEG152 [59] (byte) print_char::ch#2 ← (byte) compare::r#10 -- vbuaa=vbuz1 + lda r + //SEG153 [60] call print_char + //SEG154 [86] phi from compare::@40 to print_char [phi:compare::@40->print_char] + print_char_from_b40: + //SEG155 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#2 [phi:compare::@40->print_char#0] -- register_copy + //SEG156 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#2 [phi:compare::@40->print_char#1] -- register_copy + jsr print_char + //SEG157 [61] phi from compare::@40 to compare::@41 [phi:compare::@40->compare::@41] + b41_from_b40: + jmp b41 + //SEG158 compare::@41 + b41: + //SEG159 [62] call print_str + //SEG160 [79] phi from compare::@41 to print_str [phi:compare::@41->print_str] + print_str_from_b41: + //SEG161 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@41->print_str#0] -- register_copy + //SEG162 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@41->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + jmp breturn + //SEG163 compare::@return + breturn: + //SEG164 [63] return + rts + //SEG165 compare::@5 + b5: + //SEG166 [64] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 -- vwuz1_neq_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bne b9_from_b5 + lda w1 + cmp w2 + bne b9_from_b5 + //SEG167 [65] phi from compare::@5 to compare::@26 [phi:compare::@5->compare::@26] + b26_from_b5: + jmp b26 + //SEG168 compare::@26 + b26: + //SEG169 [66] phi from compare::@26 to compare::@9 [phi:compare::@26->compare::@9] + b9_from_b26: + //SEG170 [66] phi (byte) compare::r#20 = (byte) '+' [phi:compare::@26->compare::@9#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b9 + //SEG171 [66] phi from compare::@5 to compare::@9 [phi:compare::@5->compare::@9] + b9_from_b5: + //SEG172 [66] phi (byte) compare::r#20 = (byte) '-' [phi:compare::@5->compare::@9#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b9 + //SEG173 compare::@9 + b9: + //SEG174 [46] phi from compare::@9 to compare::@16 [phi:compare::@9->compare::@16] + b16_from_b9: + //SEG175 [46] phi (byte) compare::r#10 = (byte) compare::r#20 [phi:compare::@9->compare::@16#0] -- register_copy + //SEG176 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#2 [phi:compare::@9->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_2 + sta ops+1 + jmp b16 + //SEG177 compare::@4 + b4: + //SEG178 [67] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 -- vwuz1_lt_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bcc b11_from_b4 + bne !+ + lda w1 + cmp w2 + bcc b11_from_b4 + !: + //SEG179 [68] phi from compare::@4 to compare::@28 [phi:compare::@4->compare::@28] + b28_from_b4: + jmp b28 + //SEG180 compare::@28 + b28: + //SEG181 [69] phi from compare::@28 to compare::@11 [phi:compare::@28->compare::@11] + b11_from_b28: + //SEG182 [69] phi (byte) compare::r#14 = (byte) '+' [phi:compare::@28->compare::@11#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b11 + //SEG183 [69] phi from compare::@4 to compare::@11 [phi:compare::@4->compare::@11] + b11_from_b4: + //SEG184 [69] phi (byte) compare::r#14 = (byte) '-' [phi:compare::@4->compare::@11#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b11 + //SEG185 compare::@11 + b11: + //SEG186 [46] phi from compare::@11 to compare::@16 [phi:compare::@11->compare::@16] + b16_from_b11: + //SEG187 [46] phi (byte) compare::r#10 = (byte) compare::r#14 [phi:compare::@11->compare::@16#0] -- register_copy + //SEG188 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#3 [phi:compare::@11->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_3 + sta ops+1 + jmp b16 + //SEG189 compare::@3 + b3: + //SEG190 [70] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 -- vwuz1_le_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bne !+ + lda w1 + cmp w2 + !: + bcc b13_from_b3 + beq b13_from_b3 + //SEG191 [71] phi from compare::@3 to compare::@30 [phi:compare::@3->compare::@30] + b30_from_b3: + jmp b30 + //SEG192 compare::@30 + b30: + //SEG193 [72] phi from compare::@30 to compare::@13 [phi:compare::@30->compare::@13] + b13_from_b30: + //SEG194 [72] phi (byte) compare::r#15 = (byte) '+' [phi:compare::@30->compare::@13#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b13 + //SEG195 [72] phi from compare::@3 to compare::@13 [phi:compare::@3->compare::@13] + b13_from_b3: + //SEG196 [72] phi (byte) compare::r#15 = (byte) '-' [phi:compare::@3->compare::@13#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b13 + //SEG197 compare::@13 + b13: + //SEG198 [46] phi from compare::@13 to compare::@16 [phi:compare::@13->compare::@16] + b16_from_b13: + //SEG199 [46] phi (byte) compare::r#10 = (byte) compare::r#15 [phi:compare::@13->compare::@16#0] -- register_copy + //SEG200 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#4 [phi:compare::@13->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_4 + sta ops+1 + jmp b16 + //SEG201 compare::@2 + b2: + //SEG202 [73] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 -- vwuz1_gt_vwuz2_then_la1 + lda w2+1 + cmp w1+1 + bcc b15_from_b2 + bne !+ + lda w2 + cmp w1 + bcc b15_from_b2 + !: + //SEG203 [74] phi from compare::@2 to compare::@32 [phi:compare::@2->compare::@32] + b32_from_b2: + jmp b32 + //SEG204 compare::@32 + b32: + //SEG205 [75] phi from compare::@32 to compare::@15 [phi:compare::@32->compare::@15] + b15_from_b32: + //SEG206 [75] phi (byte) compare::r#16 = (byte) '+' [phi:compare::@32->compare::@15#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b15 + //SEG207 [75] phi from compare::@2 to compare::@15 [phi:compare::@2->compare::@15] + b15_from_b2: + //SEG208 [75] phi (byte) compare::r#16 = (byte) '-' [phi:compare::@2->compare::@15#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b15 + //SEG209 compare::@15 + b15: + //SEG210 [46] phi from compare::@15 to compare::@16 [phi:compare::@15->compare::@16] + b16_from_b15: + //SEG211 [46] phi (byte) compare::r#10 = (byte) compare::r#16 [phi:compare::@15->compare::@16#0] -- register_copy + //SEG212 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#5 [phi:compare::@15->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_5 + sta ops+1 + jmp b16 + //SEG213 compare::@1 + b1: + //SEG214 [76] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 -- vwuz1_ge_vwuz2_then_la1 + lda w2+1 + cmp w1+1 + bne !+ + lda w2 + cmp w1 + !: + bcc b17_from_b1 + beq b17_from_b1 + //SEG215 [77] phi from compare::@1 to compare::@34 [phi:compare::@1->compare::@34] + b34_from_b1: + jmp b34 + //SEG216 compare::@34 + b34: + //SEG217 [78] phi from compare::@34 to compare::@17 [phi:compare::@34->compare::@17] + b17_from_b34: + //SEG218 [78] phi (byte) compare::r#17 = (byte) '+' [phi:compare::@34->compare::@17#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b17 + //SEG219 [78] phi from compare::@1 to compare::@17 [phi:compare::@1->compare::@17] + b17_from_b1: + //SEG220 [78] phi (byte) compare::r#17 = (byte) '-' [phi:compare::@1->compare::@17#0] -- vbuz1=vbuc1 + lda #'-' + sta r + jmp b17 + //SEG221 compare::@17 + b17: + //SEG222 [46] phi from compare::@17 to compare::@16 [phi:compare::@17->compare::@16] + b16_from_b17: + //SEG223 [46] phi (byte) compare::r#10 = (byte) compare::r#17 [phi:compare::@17->compare::@16#0] -- register_copy + //SEG224 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#6 [phi:compare::@17->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_6 + sta ops+1 + jmp b16 + str: .text " @" + ops_1: .text "!=@" + ops_2: .text "==@" + ops_3: .text ">=@" + ops_4: .text "> @" + ops_5: .text "<=@" + ops_6: .text "< @" +} +//SEG225 print_str +// Print a zero-terminated string +// print_str(byte* zeropage($a) str) +print_str: { + .label str = $a + //SEG226 [80] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] + b1_from_print_str: + b1_from_b2: + //SEG227 [80] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#66 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy + //SEG228 [80] phi (byte*) print_str::str#6 = (byte*) print_str::str#8 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy + jmp b1 + //SEG229 print_str::@1 + b1: + //SEG230 [81] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 + ldy #0 + lda (str),y + cmp #'@' + bne b2 + jmp breturn + //SEG231 print_str::@return + breturn: + //SEG232 [82] return + rts + //SEG233 print_str::@2 + b2: + //SEG234 [83] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#6) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (str),y + ldy #0 + sta (print_char_cursor),y + //SEG235 [84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + //SEG236 [85] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#6 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + jmp b1_from_b2 +} +//SEG237 print_char +// Print a single char +// print_char(byte register(A) ch) +print_char: { + //SEG238 [87] *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 -- _deref_pbuz1=vbuaa + ldy #0 + sta (print_char_cursor),y + //SEG239 [88] (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#39 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + jmp breturn + //SEG240 print_char::@return + breturn: + //SEG241 [89] return + rts +} +//SEG242 print_word +// Print a word as HEX +// print_word(word zeropage($a) w) +print_word: { + .label w = $a + //SEG243 [91] (byte) print_byte::b#0 ← > (word) print_word::w#2 -- vbuz1=_hi_vwuz2 + lda w+1 + sta print_byte.b + //SEG244 [92] call print_byte + //SEG245 [96] phi from print_word to print_byte [phi:print_word->print_byte] + print_byte_from_print_word: + //SEG246 [96] phi (byte*) print_char_cursor#59 = (byte*) print_char_cursor#58 [phi:print_word->print_byte#0] -- register_copy + //SEG247 [96] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy + jsr print_byte + jmp b1 + //SEG248 print_word::@1 + b1: + //SEG249 [93] (byte) print_byte::b#1 ← < (word) print_word::w#2 -- vbuz1=_lo_vwuz2 + lda w + sta print_byte.b + //SEG250 [94] call print_byte + //SEG251 [96] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte] + print_byte_from_b1: + //SEG252 [96] phi (byte*) print_char_cursor#59 = (byte*) print_char_cursor#11 [phi:print_word::@1->print_byte#0] -- register_copy + //SEG253 [96] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy + jsr print_byte + jmp breturn + //SEG254 print_word::@return + breturn: + //SEG255 [95] return + rts +} +//SEG256 print_byte +// Print a byte as HEX +// print_byte(byte zeropage($e) b) +print_byte: { + .label b = $e + //SEG257 [97] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuz1_ror_4 + lda b + lsr + lsr + lsr + lsr + //SEG258 [98] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa + tay + lda print_hextab,y + //SEG259 [99] call print_char + //SEG260 [86] phi from print_byte to print_char [phi:print_byte->print_char] + print_char_from_print_byte: + //SEG261 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#59 [phi:print_byte->print_char#0] -- register_copy + //SEG262 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy + jsr print_char + jmp b1 + //SEG263 print_byte::@1 + b1: + //SEG264 [100] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuaa=vbuz1_band_vbuc1 + lda #$f + and b + //SEG265 [101] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa + tay + lda print_hextab,y + //SEG266 [102] call print_char + //SEG267 [86] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char] + print_char_from_b1: + //SEG268 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#11 [phi:print_byte::@1->print_char#0] -- register_copy + //SEG269 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy + jsr print_char + jmp breturn + //SEG270 print_byte::@return + breturn: + //SEG271 [103] return + rts +} +//SEG272 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = 5 + //SEG273 [105] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + b1_from_print_cls: + //SEG274 [105] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #<$400 + sta sc + lda #>$400 + sta sc+1 + jmp b1 + //SEG275 [105] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + b1_from_b1: + //SEG276 [105] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + jmp b1 + //SEG277 print_cls::@1 + b1: + //SEG278 [106] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG279 [107] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG280 [108] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>$400+$3e8 + bne b1_from_b1 + lda sc + cmp #<$400+$3e8 + bne b1_from_b1 + jmp breturn + //SEG281 print_cls::@return + breturn: + //SEG282 [109] return + rts +} + print_hextab: .text "0123456789abcdef" + words: .word $12, $3f34, $cfed + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b25 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b9 +Removing instruction jmp b18 +Removing instruction jmp b10 +Removing instruction jmp b4 +Removing instruction jmp b11 +Removing instruction jmp b12 +Removing instruction jmp b7 +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b18 +Removing instruction jmp b19 +Removing instruction jmp b20 +Removing instruction jmp b21 +Removing instruction jmp b22 +Removing instruction jmp b23 +Removing instruction jmp b24 +Removing instruction jmp b7 +Removing instruction jmp b16 +Removing instruction jmp b35 +Removing instruction jmp b36 +Removing instruction jmp b37 +Removing instruction jmp b38 +Removing instruction jmp b39 +Removing instruction jmp b40 +Removing instruction jmp b41 +Removing instruction jmp breturn +Removing instruction jmp b26 +Removing instruction jmp b9 +Removing instruction jmp b28 +Removing instruction jmp b11 +Removing instruction jmp b30 +Removing instruction jmp b13 +Removing instruction jmp b32 +Removing instruction jmp b15 +Removing instruction jmp b34 +Removing instruction jmp b17 +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp breturn +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 +Removing instruction lda #0 +Removing instruction lda #>0 +Removing instruction ldy #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b4_from_b3 with b4 +Replacing label b4_from_b18 with b4 +Replacing label b3_from_b4 with b3 +Replacing label b2_from_b11 with b2 +Replacing label b1_from_b12 with b1 +Replacing label b7_from_b7 with b7 +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b2 with b1 +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b1 with b1 +Removing instruction b25_from_bbegin: +Removing instruction b25: +Removing instruction main_from_b25: +Removing instruction bend_from_b25: +Removing instruction b1_from_b12: +Removing instruction b2_from_b11: +Removing instruction b3_from_b4: +Removing instruction b10_from_b18: +Removing instruction print_ln_from_b10: +Removing instruction b4_from_b10: +Removing instruction b4_from_b18: +Removing instruction b4_from_b3: +Removing instruction b7_from_b12: +Removing instruction b7_from_b7: +Removing instruction b1_from_print_ln: +Removing instruction b1_from_b1: +Removing instruction b24_from_b23: +Removing instruction b7_from_b24: +Removing instruction b16_from_b7: +Removing instruction print_word_from_b16: +Removing instruction b35_from_b16: +Removing instruction print_str_from_b35: +Removing instruction b37_from_b36: +Removing instruction print_str_from_b37: +Removing instruction b39_from_b38: +Removing instruction print_str_from_b39: +Removing instruction b41_from_b40: +Removing instruction print_str_from_b41: +Removing instruction b26_from_b5: +Removing instruction b9_from_b26: +Removing instruction b16_from_b9: +Removing instruction b28_from_b4: +Removing instruction b11_from_b28: +Removing instruction b16_from_b11: +Removing instruction b30_from_b3: +Removing instruction b13_from_b30: +Removing instruction b16_from_b13: +Removing instruction b32_from_b2: +Removing instruction b15_from_b32: +Removing instruction b16_from_b15: +Removing instruction b34_from_b1: +Removing instruction b17_from_b34: +Removing instruction b16_from_b17: +Removing instruction b1_from_print_str: +Removing instruction b1_from_b2: +Removing instruction b1_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction print_cls_from_main: +Removing instruction b1_from_main: +Removing instruction b2_from_b1: +Removing instruction b3_from_b2: +Removing instruction b9: +Removing instruction b18: +Removing instruction b10: +Removing instruction b11: +Removing instruction b12: +Removing instruction breturn: +Removing instruction b18: +Removing instruction b19: +Removing instruction b20: +Removing instruction b21: +Removing instruction b22: +Removing instruction b23: +Removing instruction b24: +Removing instruction b35: +Removing instruction b36: +Removing instruction print_str_from_b36: +Removing instruction b37: +Removing instruction b38: +Removing instruction print_word_from_b38: +Removing instruction b39: +Removing instruction b40: +Removing instruction print_char_from_b40: +Removing instruction b41: +Removing instruction breturn: +Removing instruction b26: +Removing instruction b28: +Removing instruction b30: +Removing instruction b32: +Removing instruction b34: +Removing instruction breturn: +Removing instruction breturn: +Removing instruction print_byte_from_print_word: +Removing instruction b1: +Removing instruction print_byte_from_b1: +Removing instruction breturn: +Removing instruction print_char_from_print_byte: +Removing instruction b1: +Removing instruction print_char_from_b1: +Removing instruction breturn: +Removing instruction b1_from_print_cls: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Relabelling long label b7_from_b23 to b6 +Relabelling long label b16_from_b22 to b8 +Relabelling long label b9_from_b5 to b10 +Relabelling long label b11_from_b4 to b12 +Relabelling long label b13_from_b3 to b14 +Relabelling long label b15_from_b2 to b18 +Relabelling long label b17_from_b1 to b19 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination +Fixing long branch [104] beq b1 to bne +Fixing long branch [108] beq b2 to bne +Fixing long branch [112] beq b3 to bne +Fixing long branch [116] beq b4 to bne +Fixing long branch [120] beq b5 to bne + +FINAL SYMBOL TABLE +(label) @25 +(label) @begin +(label) @end +(byte*) BGCOL +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(byte) BLUE +(byte*) BORDERCOL +(byte) BROWN +(byte*) CHARGEN +(byte*) CIA1_INTERRUPT +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B_DDR +(byte*) CIA2_INTERRUPT +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B_DDR +(byte) CIA_INTERRUPT_CLEAR +(byte*) COLS +(byte) CYAN +(byte*) D011 +(byte*) D016 +(byte*) D018 +(byte) DARK_GREY +(byte) GREEN +(byte) GREY +(void()**) HARDWARE_IRQ +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_SPRITE +(byte*) IRQ_ENABLE +(byte) IRQ_LIGHTPEN +(byte) IRQ_RASTER +(byte*) IRQ_STATUS +(void()**) KERNEL_IRQ +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_Y +(byte) LIGHT_BLUE +(byte) LIGHT_GREEN +(byte) LIGHT_GREY +(byte) ORANGE +(byte) PINK +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte) PURPLE +(byte*) RASTER +(byte) RED +(byte*) SPRITES_COLS +(byte*) SPRITES_ENABLE +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_MC +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC2 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_XMSB +(byte*) SPRITES_XPOS +(byte*) SPRITES_YPOS +(word) SPRITE_PTRS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(byte) VIC_RST8 +(byte) WHITE +(byte) YELLOW +(void()) compare((word) compare::w1 , (word) compare::w2 , (byte) compare::op) +(label) compare::@1 +(label) compare::@11 +(label) compare::@13 +(label) compare::@15 +(label) compare::@16 +(label) compare::@17 +(label) compare::@18 +(label) compare::@19 +(label) compare::@2 +(label) compare::@20 +(label) compare::@21 +(label) compare::@22 +(label) compare::@23 +(label) compare::@24 +(label) compare::@26 +(label) compare::@28 +(label) compare::@3 +(label) compare::@30 +(label) compare::@32 +(label) compare::@34 +(label) compare::@35 +(label) compare::@36 +(label) compare::@37 +(label) compare::@38 +(label) compare::@39 +(label) compare::@4 +(label) compare::@40 +(label) compare::@41 +(label) compare::@5 +(label) compare::@7 +(label) compare::@9 +(label) compare::@return +(byte) compare::op +(byte) compare::op#0 reg byte x 168.8333333333334 +(byte*) compare::ops +(const byte*) compare::ops#1 ops#1 = (string) "!=@" +(const byte*) compare::ops#2 ops#2 = (string) "==@" +(const byte*) compare::ops#3 ops#3 = (string) ">=@" +(const byte*) compare::ops#4 ops#4 = (string) "> @" +(const byte*) compare::ops#5 ops#5 = (string) "<=@" +(const byte*) compare::ops#6 ops#6 = (string) "< @" +(byte*) compare::ops#7 ops zp ZP_WORD:7 0.4 +(byte) compare::r +(byte) compare::r#10 r zp ZP_BYTE:9 1.076923076923077 +(byte) compare::r#14 r zp ZP_BYTE:9 2.0 +(byte) compare::r#15 r zp ZP_BYTE:9 2.0 +(byte) compare::r#16 r zp ZP_BYTE:9 2.0 +(byte) compare::r#17 r zp ZP_BYTE:9 2.0 +(byte) compare::r#19 r zp ZP_BYTE:9 2.0 +(byte) compare::r#20 r zp ZP_BYTE:9 2.0 +(const string) compare::str str = (string) " @" +(word) compare::w1 +(word) compare::w1#0 w1 zp ZP_WORD:10 36.249999999999986 +(word) compare::w2 +(word) compare::w2#0 w2 zp ZP_WORD:17 29.0 +(void()) main() +(byte~) main::$1 reg byte a 22.0 +(byte~) main::$2 reg byte a 202.0 +(byte~) main::$6 reg byte a 2002.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@18 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@7 +(label) main::@9 +(byte) main::i +(byte) main::i#1 i zp ZP_BYTE:2 16.5 +(byte) main::i#2 i zp ZP_BYTE:2 1.4347826086956523 +(byte) main::j +(byte) main::j#1 j zp ZP_BYTE:3 151.5 +(byte) main::j#2 j zp ZP_BYTE:3 16.833333333333332 +(byte) main::ln +(byte) main::ln#1 ln zp ZP_BYTE:4 667.3333333333334 +(byte) main::ln#11 ln zp ZP_BYTE:4 588.0 +(byte) main::ln#2 ln zp ZP_BYTE:4 684.1666666666667 +(byte) main::ln#4 ln zp ZP_BYTE:4 71.0 +(byte) main::ln#7 ln zp ZP_BYTE:4 7.333333333333333 +(byte) main::op +(byte) main::op#1 reg byte x 1501.5 +(byte) main::op#2 reg byte x 231.0 +(word) main::w1 +(word) main::w1#0 w1 zp ZP_WORD:15 48.19047619047619 +(word) main::w2 +(word) main::w2#0 w2 zp ZP_WORD:17 68.875 +(void()) print_byte((byte) print_byte::b) +(byte~) print_byte::$0 reg byte a 4.0 +(byte~) print_byte::$2 reg byte a 4.0 +(label) print_byte::@1 +(label) print_byte::@return +(byte) print_byte::b +(byte) print_byte::b#0 b zp ZP_BYTE:14 4.0 +(byte) print_byte::b#1 b zp ZP_BYTE:14 4.0 +(byte) print_byte::b#2 b zp ZP_BYTE:14 2.0 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(byte) print_char::ch#0 reg byte a 4.0 +(byte) print_char::ch#1 reg byte a 4.0 +(byte) print_char::ch#2 reg byte a 4.0 +(byte) print_char::ch#3 reg byte a 8.0 +(byte*) print_char_cursor +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:12 10001.0 +(byte*~) print_char_cursor#107 print_char_cursor zp ZP_WORD:12 2002.0 +(byte*) print_char_cursor#11 print_char_cursor zp ZP_WORD:12 0.7058823529411765 +(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:12 1783.2608695652177 +(byte*) print_char_cursor#39 print_char_cursor zp ZP_WORD:12 5.0 +(byte*) print_char_cursor#58 print_char_cursor zp ZP_WORD:12 3.0 +(byte*) print_char_cursor#59 print_char_cursor zp ZP_WORD:12 2.0 +(byte*) print_char_cursor#61 print_char_cursor zp ZP_WORD:12 67.90322580645162 +(byte*) print_char_cursor#66 print_char_cursor zp ZP_WORD:12 12.0 +(byte*) print_char_cursor#68 print_char_cursor zp ZP_WORD:12 588.0 +(byte*) print_char_cursor#79 print_char_cursor zp ZP_WORD:12 71.0 +(byte*) print_char_cursor#95 print_char_cursor zp ZP_WORD:12 7.333333333333333 +(void()) print_cls() +(label) print_cls::@1 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#1 sc zp ZP_WORD:5 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:5 16.5 +(byte[]) print_hextab +(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" +(byte*) print_line_cursor +(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:5 6401.0 +(byte*) print_line_cursor#19 print_line_cursor zp ZP_WORD:5 282.3636363636364 +(byte*) print_line_cursor#23 print_line_cursor zp ZP_WORD:5 588.0 +(byte*) print_line_cursor#31 print_line_cursor zp ZP_WORD:5 71.0 +(byte*) print_line_cursor#33 print_line_cursor zp ZP_WORD:5 7.333333333333333 +(byte*) print_line_cursor#9 print_line_cursor zp ZP_WORD:5 20004.0 +(void()) print_ln() +(label) print_ln::@1 +(label) print_ln::@return +(byte*) print_screen +(void()) print_str((byte*) print_str::str) +(label) print_str::@1 +(label) print_str::@2 +(label) print_str::@return +(byte*) print_str::str +(byte*) print_str::str#0 str zp ZP_WORD:10 20002.0 +(byte*) print_str::str#2 str zp ZP_WORD:10 4.0 +(byte*) print_str::str#6 str zp ZP_WORD:10 10001.5 +(byte*) print_str::str#8 str zp ZP_WORD:10 4.0 +(void()) print_word((word) print_word::w) +(label) print_word::@1 +(label) print_word::@return +(word) print_word::w +(word) print_word::w#0 w zp ZP_WORD:10 4.0 +(word) print_word::w#1 w zp ZP_WORD:10 4.0 +(word) print_word::w#2 w zp ZP_WORD:10 2.6666666666666665 +(word[]) words +(const word[]) words#0 words = { (byte/signed byte/word/signed word/dword/signed dword) $12, (word/signed word/dword/signed dword) $3f34, (word/dword/signed dword) $cfed } + +zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +reg byte x [ main::op#2 main::op#1 ] +zp ZP_WORD:5 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:7 [ compare::ops#7 ] +zp ZP_BYTE:9 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +zp ZP_WORD:10 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 print_word::w#2 print_word::w#0 print_word::w#1 compare::w1#0 ] +reg byte a [ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +zp ZP_WORD:12 [ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +zp ZP_BYTE:14 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +reg byte a [ main::$1 ] +zp ZP_WORD:15 [ main::w1#0 ] +reg byte a [ main::$2 ] +zp ZP_WORD:17 [ main::w2#0 compare::w2#0 ] +reg byte x [ compare::op#0 ] +reg byte a [ main::$6 ] +reg byte a [ print_byte::$0 ] +reg byte a [ print_byte::$2 ] + + +FINAL ASSEMBLER +Score: 971151 + +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label print_char_cursor = $c + .label print_line_cursor = 5 +//SEG3 @begin +//SEG4 [1] phi from @begin to @25 [phi:@begin->@25] +//SEG5 @25 +//SEG6 [2] call main +//SEG7 [4] phi from @25 to main [phi:@25->main] +//SEG8 [3] phi from @25 to @end [phi:@25->@end] +//SEG9 @end +//SEG10 main +main: { + .label w1 = $f + .label w2 = $11 + .label ln = 4 + .label j = 3 + .label i = 2 + //SEG11 [5] call print_cls + //SEG12 [104] phi from main to print_cls [phi:main->print_cls] + jsr print_cls + //SEG13 [6] phi from main to main::@1 [phi:main->main::@1] + //SEG14 [6] phi (byte*) print_line_cursor#33 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->main::@1#0] -- pbuz1=pbuc1 + lda #<$400 + sta print_line_cursor + lda #>$400 + sta print_line_cursor+1 + //SEG15 [6] phi (byte*) print_char_cursor#95 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:main->main::@1#1] -- pbuz1=pbuc1 + lda #<$400 + sta print_char_cursor + lda #>$400 + sta print_char_cursor+1 + //SEG16 [6] phi (byte) main::ln#7 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 + lda #0 + sta ln + //SEG17 [6] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#3] -- vbuz1=vbuc1 + sta i + //SEG18 [6] phi from main::@12 to main::@1 [phi:main::@12->main::@1] + //SEG19 [6] phi (byte*) print_line_cursor#33 = (byte*) print_line_cursor#23 [phi:main::@12->main::@1#0] -- register_copy + //SEG20 [6] phi (byte*) print_char_cursor#95 = (byte*) print_char_cursor#68 [phi:main::@12->main::@1#1] -- register_copy + //SEG21 [6] phi (byte) main::ln#7 = (byte) main::ln#11 [phi:main::@12->main::@1#2] -- register_copy + //SEG22 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@12->main::@1#3] -- register_copy + //SEG23 main::@1 + b1: + //SEG24 [7] (byte~) main::$1 ← (byte) main::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 + lda i + asl + //SEG25 [8] (word) main::w1#0 ← *((const word[]) words#0 + (byte~) main::$1) -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda words,y + sta w1 + lda words+1,y + sta w1+1 + //SEG26 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + //SEG27 [9] phi (byte*) print_line_cursor#31 = (byte*) print_line_cursor#33 [phi:main::@1->main::@2#0] -- register_copy + //SEG28 [9] phi (byte*) print_char_cursor#79 = (byte*) print_char_cursor#95 [phi:main::@1->main::@2#1] -- register_copy + //SEG29 [9] phi (byte) main::ln#4 = (byte) main::ln#7 [phi:main::@1->main::@2#2] -- register_copy + //SEG30 [9] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@1->main::@2#3] -- vbuz1=vbuc1 + lda #0 + sta j + //SEG31 [9] phi from main::@11 to main::@2 [phi:main::@11->main::@2] + //SEG32 [9] phi (byte*) print_line_cursor#31 = (byte*) print_line_cursor#23 [phi:main::@11->main::@2#0] -- register_copy + //SEG33 [9] phi (byte*) print_char_cursor#79 = (byte*) print_char_cursor#68 [phi:main::@11->main::@2#1] -- register_copy + //SEG34 [9] phi (byte) main::ln#4 = (byte) main::ln#11 [phi:main::@11->main::@2#2] -- register_copy + //SEG35 [9] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@11->main::@2#3] -- register_copy + //SEG36 main::@2 + b2: + //SEG37 [10] (byte~) main::$2 ← (byte) main::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 + lda j + asl + //SEG38 [11] (word) main::w2#0 ← *((const word[]) words#0 + (byte~) main::$2) -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda words,y + sta w2 + lda words+1,y + sta w2+1 + //SEG39 [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + //SEG40 [12] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#31 [phi:main::@2->main::@3#0] -- register_copy + //SEG41 [12] phi (byte*) print_char_cursor#61 = (byte*) print_char_cursor#79 [phi:main::@2->main::@3#1] -- register_copy + //SEG42 [12] phi (byte) main::op#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->main::@3#2] -- vbuxx=vbuc1 + ldx #0 + //SEG43 [12] phi (byte) main::ln#2 = (byte) main::ln#4 [phi:main::@2->main::@3#3] -- register_copy + //SEG44 [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3] + //SEG45 [12] phi (byte*) print_line_cursor#19 = (byte*) print_line_cursor#23 [phi:main::@4->main::@3#0] -- register_copy + //SEG46 [12] phi (byte*) print_char_cursor#61 = (byte*) print_char_cursor#68 [phi:main::@4->main::@3#1] -- register_copy + //SEG47 [12] phi (byte) main::op#2 = (byte) main::op#1 [phi:main::@4->main::@3#2] -- register_copy + //SEG48 [12] phi (byte) main::ln#2 = (byte) main::ln#11 [phi:main::@4->main::@3#3] -- register_copy + //SEG49 main::@3 + b3: + //SEG50 [13] if((byte) main::ln#2>=(byte/signed byte/word/signed word/dword/signed dword) $32) goto main::@4 -- vbuz1_ge_vbuc1_then_la1 + lda ln + cmp #$32 + bcs b4 + //SEG51 main::@9 + //SEG52 [14] (word) compare::w1#0 ← (word) main::w1#0 -- vwuz1=vwuz2 + lda w1 + sta compare.w1 + lda w1+1 + sta compare.w1+1 + //SEG53 [15] (word) compare::w2#0 ← (word) main::w2#0 + //SEG54 [16] (byte) compare::op#0 ← (byte) main::op#2 + //SEG55 [17] call compare + jsr compare + //SEG56 main::@18 + //SEG57 [18] (byte) main::ln#1 ← ++ (byte) main::ln#2 -- vbuz1=_inc_vbuz1 + inc ln + //SEG58 [19] (byte~) main::$6 ← (byte) main::ln#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_band_vbuc1 + lda #1 + and ln + //SEG59 [20] if((byte~) main::$6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b4 + //SEG60 [21] phi from main::@18 to main::@10 [phi:main::@18->main::@10] + //SEG61 main::@10 + //SEG62 [22] call print_ln + //SEG63 [32] phi from main::@10 to print_ln [phi:main::@10->print_ln] + jsr print_ln + //SEG64 [23] (byte*~) print_char_cursor#107 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 + lda print_line_cursor + sta print_char_cursor + lda print_line_cursor+1 + sta print_char_cursor+1 + //SEG65 [24] phi from main::@10 main::@18 main::@3 to main::@4 [phi:main::@10/main::@18/main::@3->main::@4] + //SEG66 [24] phi (byte*) print_line_cursor#23 = (byte*) print_line_cursor#1 [phi:main::@10/main::@18/main::@3->main::@4#0] -- register_copy + //SEG67 [24] phi (byte*) print_char_cursor#68 = (byte*~) print_char_cursor#107 [phi:main::@10/main::@18/main::@3->main::@4#1] -- register_copy + //SEG68 [24] phi (byte) main::ln#11 = (byte) main::ln#1 [phi:main::@10/main::@18/main::@3->main::@4#2] -- register_copy + //SEG69 main::@4 + b4: + //SEG70 [25] (byte) main::op#1 ← ++ (byte) main::op#2 -- vbuxx=_inc_vbuxx + inx + //SEG71 [26] if((byte) main::op#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 + cpx #6 + bne b3 + //SEG72 main::@11 + //SEG73 [27] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1 + inc j + //SEG74 [28] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 + lda j + cmp #3 + bne b2 + //SEG75 main::@12 + //SEG76 [29] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG77 [30] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda i + cmp #3 + bne b1 + //SEG78 [31] phi from main::@12 main::@7 to main::@7 [phi:main::@12/main::@7->main::@7] + //SEG79 main::@7 + b7: + jmp b7 +} +//SEG80 print_ln +// Print a newline +print_ln: { + //SEG81 [33] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + //SEG82 [33] phi (byte*) print_line_cursor#9 = (byte*) print_line_cursor#19 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + //SEG83 print_ln::@1 + b1: + //SEG84 [34] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte/signed byte/word/signed word/dword/signed dword) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda print_line_cursor + clc + adc #$28 + sta print_line_cursor + bcc !+ + inc print_line_cursor+1 + !: + //SEG85 [35] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + lda print_line_cursor+1 + cmp print_char_cursor+1 + bcc b1 + bne !+ + lda print_line_cursor + cmp print_char_cursor + bcc b1 + !: + //SEG86 print_ln::@return + //SEG87 [36] return + rts +} +//SEG88 compare +// Compare two words using an operator +// compare(word zeropage($a) w1, word zeropage($11) w2, byte register(X) op) +compare: { + .label w1 = $a + .label w2 = $11 + .label ops = 7 + .label r = 9 + //SEG89 [37] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto compare::@1 -- vbuxx_eq_0_then_la1 + cpx #0 + bne !b1+ + jmp b1 + !b1: + //SEG90 compare::@18 + //SEG91 [38] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto compare::@2 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + bne !b2+ + jmp b2 + !b2: + //SEG92 compare::@19 + //SEG93 [39] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto compare::@3 -- vbuxx_eq_vbuc1_then_la1 + cpx #2 + bne !b3+ + jmp b3 + !b3: + //SEG94 compare::@20 + //SEG95 [40] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto compare::@4 -- vbuxx_eq_vbuc1_then_la1 + cpx #3 + bne !b4+ + jmp b4 + !b4: + //SEG96 compare::@21 + //SEG97 [41] if((byte) compare::op#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto compare::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #4 + bne !b5+ + jmp b5 + !b5: + //SEG98 compare::@22 + //SEG99 [42] if((byte) compare::op#0!=(byte/signed byte/word/signed word/dword/signed dword) 5) goto compare::@16 -- vbuxx_neq_vbuc1_then_la1 + cpx #5 + bne b8 + //SEG100 compare::@23 + //SEG101 [43] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@7 -- vwuz1_eq_vwuz2_then_la1 + lda w1 + cmp w2 + bne !+ + lda w1+1 + cmp w2+1 + beq b6 + !: + //SEG102 [44] phi from compare::@23 to compare::@24 [phi:compare::@23->compare::@24] + //SEG103 compare::@24 + //SEG104 [45] phi from compare::@24 to compare::@7 [phi:compare::@24->compare::@7] + //SEG105 [45] phi (byte) compare::r#19 = (byte) '+' [phi:compare::@24->compare::@7#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b7 + //SEG106 [45] phi from compare::@23 to compare::@7 [phi:compare::@23->compare::@7] + b6: + //SEG107 [45] phi (byte) compare::r#19 = (byte) '-' [phi:compare::@23->compare::@7#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG108 compare::@7 + b7: + //SEG109 [46] phi from compare::@7 to compare::@16 [phi:compare::@7->compare::@16] + //SEG110 [46] phi (byte) compare::r#10 = (byte) compare::r#19 [phi:compare::@7->compare::@16#0] -- register_copy + //SEG111 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#1 [phi:compare::@7->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_1 + sta ops+1 + jmp b16 + //SEG112 [46] phi from compare::@22 to compare::@16 [phi:compare::@22->compare::@16] + b8: + //SEG113 [46] phi (byte) compare::r#10 = (byte) '-' [phi:compare::@22->compare::@16#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG114 [46] phi (byte*) compare::ops#7 = (byte*) 0 [phi:compare::@22->compare::@16#1] -- pbuz1=pbuc1 + lda #<0 + sta ops + sta ops+1 + //SEG115 compare::@16 + b16: + //SEG116 [47] (word) print_word::w#0 ← (word) compare::w1#0 + //SEG117 [48] call print_word + //SEG118 [90] phi from compare::@16 to print_word [phi:compare::@16->print_word] + //SEG119 [90] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#61 [phi:compare::@16->print_word#0] -- register_copy + //SEG120 [90] phi (word) print_word::w#2 = (word) print_word::w#0 [phi:compare::@16->print_word#1] -- register_copy + jsr print_word + //SEG121 [49] phi from compare::@16 to compare::@35 [phi:compare::@16->compare::@35] + //SEG122 compare::@35 + //SEG123 [50] call print_str + //SEG124 [79] phi from compare::@35 to print_str [phi:compare::@35->print_str] + //SEG125 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@35->print_str#0] -- register_copy + //SEG126 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@35->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + //SEG127 compare::@36 + //SEG128 [51] (byte*) print_str::str#2 ← (byte*) compare::ops#7 -- pbuz1=pbuz2 + lda ops + sta print_str.str + lda ops+1 + sta print_str.str+1 + //SEG129 [52] call print_str + //SEG130 [79] phi from compare::@36 to print_str [phi:compare::@36->print_str] + //SEG131 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:compare::@36->print_str#0] -- register_copy + //SEG132 [79] phi (byte*) print_str::str#8 = (byte*) print_str::str#2 [phi:compare::@36->print_str#1] -- register_copy + jsr print_str + //SEG133 [53] phi from compare::@36 to compare::@37 [phi:compare::@36->compare::@37] + //SEG134 compare::@37 + //SEG135 [54] call print_str + //SEG136 [79] phi from compare::@37 to print_str [phi:compare::@37->print_str] + //SEG137 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#2 [phi:compare::@37->print_str#0] -- register_copy + //SEG138 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@37->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + //SEG139 compare::@38 + //SEG140 [55] (word) print_word::w#1 ← (word) compare::w2#0 -- vwuz1=vwuz2 + lda w2 + sta print_word.w + lda w2+1 + sta print_word.w+1 + //SEG141 [56] call print_word + //SEG142 [90] phi from compare::@38 to print_word [phi:compare::@38->print_word] + //SEG143 [90] phi (byte*) print_char_cursor#58 = (byte*) print_char_cursor#2 [phi:compare::@38->print_word#0] -- register_copy + //SEG144 [90] phi (word) print_word::w#2 = (word) print_word::w#1 [phi:compare::@38->print_word#1] -- register_copy + jsr print_word + //SEG145 [57] phi from compare::@38 to compare::@39 [phi:compare::@38->compare::@39] + //SEG146 compare::@39 + //SEG147 [58] call print_str + //SEG148 [79] phi from compare::@39 to print_str [phi:compare::@39->print_str] + //SEG149 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@39->print_str#0] -- register_copy + //SEG150 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@39->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + //SEG151 compare::@40 + //SEG152 [59] (byte) print_char::ch#2 ← (byte) compare::r#10 -- vbuaa=vbuz1 + lda r + //SEG153 [60] call print_char + //SEG154 [86] phi from compare::@40 to print_char [phi:compare::@40->print_char] + //SEG155 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#2 [phi:compare::@40->print_char#0] -- register_copy + //SEG156 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#2 [phi:compare::@40->print_char#1] -- register_copy + jsr print_char + //SEG157 [61] phi from compare::@40 to compare::@41 [phi:compare::@40->compare::@41] + //SEG158 compare::@41 + //SEG159 [62] call print_str + //SEG160 [79] phi from compare::@41 to print_str [phi:compare::@41->print_str] + //SEG161 [79] phi (byte*) print_char_cursor#66 = (byte*) print_char_cursor#11 [phi:compare::@41->print_str#0] -- register_copy + //SEG162 [79] phi (byte*) print_str::str#8 = (const string) compare::str [phi:compare::@41->print_str#1] -- pbuz1=pbuc1 + lda #str + sta print_str.str+1 + jsr print_str + //SEG163 compare::@return + //SEG164 [63] return + rts + //SEG165 compare::@5 + b5: + //SEG166 [64] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@9 -- vwuz1_neq_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bne b10 + lda w1 + cmp w2 + bne b10 + //SEG167 [65] phi from compare::@5 to compare::@26 [phi:compare::@5->compare::@26] + //SEG168 compare::@26 + //SEG169 [66] phi from compare::@26 to compare::@9 [phi:compare::@26->compare::@9] + //SEG170 [66] phi (byte) compare::r#20 = (byte) '+' [phi:compare::@26->compare::@9#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b9 + //SEG171 [66] phi from compare::@5 to compare::@9 [phi:compare::@5->compare::@9] + b10: + //SEG172 [66] phi (byte) compare::r#20 = (byte) '-' [phi:compare::@5->compare::@9#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG173 compare::@9 + b9: + //SEG174 [46] phi from compare::@9 to compare::@16 [phi:compare::@9->compare::@16] + //SEG175 [46] phi (byte) compare::r#10 = (byte) compare::r#20 [phi:compare::@9->compare::@16#0] -- register_copy + //SEG176 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#2 [phi:compare::@9->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_2 + sta ops+1 + jmp b16 + //SEG177 compare::@4 + b4: + //SEG178 [67] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@11 -- vwuz1_lt_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bcc b12 + bne !+ + lda w1 + cmp w2 + bcc b12 + !: + //SEG179 [68] phi from compare::@4 to compare::@28 [phi:compare::@4->compare::@28] + //SEG180 compare::@28 + //SEG181 [69] phi from compare::@28 to compare::@11 [phi:compare::@28->compare::@11] + //SEG182 [69] phi (byte) compare::r#14 = (byte) '+' [phi:compare::@28->compare::@11#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b11 + //SEG183 [69] phi from compare::@4 to compare::@11 [phi:compare::@4->compare::@11] + b12: + //SEG184 [69] phi (byte) compare::r#14 = (byte) '-' [phi:compare::@4->compare::@11#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG185 compare::@11 + b11: + //SEG186 [46] phi from compare::@11 to compare::@16 [phi:compare::@11->compare::@16] + //SEG187 [46] phi (byte) compare::r#10 = (byte) compare::r#14 [phi:compare::@11->compare::@16#0] -- register_copy + //SEG188 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#3 [phi:compare::@11->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_3 + sta ops+1 + jmp b16 + //SEG189 compare::@3 + b3: + //SEG190 [70] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@13 -- vwuz1_le_vwuz2_then_la1 + lda w1+1 + cmp w2+1 + bne !+ + lda w1 + cmp w2 + !: + bcc b14 + beq b14 + //SEG191 [71] phi from compare::@3 to compare::@30 [phi:compare::@3->compare::@30] + //SEG192 compare::@30 + //SEG193 [72] phi from compare::@30 to compare::@13 [phi:compare::@30->compare::@13] + //SEG194 [72] phi (byte) compare::r#15 = (byte) '+' [phi:compare::@30->compare::@13#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b13 + //SEG195 [72] phi from compare::@3 to compare::@13 [phi:compare::@3->compare::@13] + b14: + //SEG196 [72] phi (byte) compare::r#15 = (byte) '-' [phi:compare::@3->compare::@13#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG197 compare::@13 + b13: + //SEG198 [46] phi from compare::@13 to compare::@16 [phi:compare::@13->compare::@16] + //SEG199 [46] phi (byte) compare::r#10 = (byte) compare::r#15 [phi:compare::@13->compare::@16#0] -- register_copy + //SEG200 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#4 [phi:compare::@13->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_4 + sta ops+1 + jmp b16 + //SEG201 compare::@2 + b2: + //SEG202 [73] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@15 -- vwuz1_gt_vwuz2_then_la1 + lda w2+1 + cmp w1+1 + bcc b18 + bne !+ + lda w2 + cmp w1 + bcc b18 + !: + //SEG203 [74] phi from compare::@2 to compare::@32 [phi:compare::@2->compare::@32] + //SEG204 compare::@32 + //SEG205 [75] phi from compare::@32 to compare::@15 [phi:compare::@32->compare::@15] + //SEG206 [75] phi (byte) compare::r#16 = (byte) '+' [phi:compare::@32->compare::@15#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b15 + //SEG207 [75] phi from compare::@2 to compare::@15 [phi:compare::@2->compare::@15] + b18: + //SEG208 [75] phi (byte) compare::r#16 = (byte) '-' [phi:compare::@2->compare::@15#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG209 compare::@15 + b15: + //SEG210 [46] phi from compare::@15 to compare::@16 [phi:compare::@15->compare::@16] + //SEG211 [46] phi (byte) compare::r#10 = (byte) compare::r#16 [phi:compare::@15->compare::@16#0] -- register_copy + //SEG212 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#5 [phi:compare::@15->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_5 + sta ops+1 + jmp b16 + //SEG213 compare::@1 + b1: + //SEG214 [76] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@17 -- vwuz1_ge_vwuz2_then_la1 + lda w2+1 + cmp w1+1 + bne !+ + lda w2 + cmp w1 + !: + bcc b19 + beq b19 + //SEG215 [77] phi from compare::@1 to compare::@34 [phi:compare::@1->compare::@34] + //SEG216 compare::@34 + //SEG217 [78] phi from compare::@34 to compare::@17 [phi:compare::@34->compare::@17] + //SEG218 [78] phi (byte) compare::r#17 = (byte) '+' [phi:compare::@34->compare::@17#0] -- vbuz1=vbuc1 + lda #'+' + sta r + jmp b17 + //SEG219 [78] phi from compare::@1 to compare::@17 [phi:compare::@1->compare::@17] + b19: + //SEG220 [78] phi (byte) compare::r#17 = (byte) '-' [phi:compare::@1->compare::@17#0] -- vbuz1=vbuc1 + lda #'-' + sta r + //SEG221 compare::@17 + b17: + //SEG222 [46] phi from compare::@17 to compare::@16 [phi:compare::@17->compare::@16] + //SEG223 [46] phi (byte) compare::r#10 = (byte) compare::r#17 [phi:compare::@17->compare::@16#0] -- register_copy + //SEG224 [46] phi (byte*) compare::ops#7 = (const byte*) compare::ops#6 [phi:compare::@17->compare::@16#1] -- pbuz1=pbuc1 + lda #ops_6 + sta ops+1 + jmp b16 + str: .text " @" + ops_1: .text "!=@" + ops_2: .text "==@" + ops_3: .text ">=@" + ops_4: .text "> @" + ops_5: .text "<=@" + ops_6: .text "< @" +} +//SEG225 print_str +// Print a zero-terminated string +// print_str(byte* zeropage($a) str) +print_str: { + .label str = $a + //SEG226 [80] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1] + //SEG227 [80] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#66 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy + //SEG228 [80] phi (byte*) print_str::str#6 = (byte*) print_str::str#8 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy + //SEG229 print_str::@1 + b1: + //SEG230 [81] if(*((byte*) print_str::str#6)!=(byte) '@') goto print_str::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 + ldy #0 + lda (str),y + cmp #'@' + bne b2 + //SEG231 print_str::@return + //SEG232 [82] return + rts + //SEG233 print_str::@2 + b2: + //SEG234 [83] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#6) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (str),y + sta (print_char_cursor),y + //SEG235 [84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + //SEG236 [85] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#6 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + jmp b1 +} +//SEG237 print_char +// Print a single char +// print_char(byte register(A) ch) +print_char: { + //SEG238 [87] *((byte*) print_char_cursor#39) ← (byte) print_char::ch#3 -- _deref_pbuz1=vbuaa + ldy #0 + sta (print_char_cursor),y + //SEG239 [88] (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#39 -- pbuz1=_inc_pbuz1 + inc print_char_cursor + bne !+ + inc print_char_cursor+1 + !: + //SEG240 print_char::@return + //SEG241 [89] return + rts +} +//SEG242 print_word +// Print a word as HEX +// print_word(word zeropage($a) w) +print_word: { + .label w = $a + //SEG243 [91] (byte) print_byte::b#0 ← > (word) print_word::w#2 -- vbuz1=_hi_vwuz2 + lda w+1 + sta print_byte.b + //SEG244 [92] call print_byte + //SEG245 [96] phi from print_word to print_byte [phi:print_word->print_byte] + //SEG246 [96] phi (byte*) print_char_cursor#59 = (byte*) print_char_cursor#58 [phi:print_word->print_byte#0] -- register_copy + //SEG247 [96] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy + jsr print_byte + //SEG248 print_word::@1 + //SEG249 [93] (byte) print_byte::b#1 ← < (word) print_word::w#2 -- vbuz1=_lo_vwuz2 + lda w + sta print_byte.b + //SEG250 [94] call print_byte + //SEG251 [96] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte] + //SEG252 [96] phi (byte*) print_char_cursor#59 = (byte*) print_char_cursor#11 [phi:print_word::@1->print_byte#0] -- register_copy + //SEG253 [96] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy + jsr print_byte + //SEG254 print_word::@return + //SEG255 [95] return + rts +} +//SEG256 print_byte +// Print a byte as HEX +// print_byte(byte zeropage($e) b) +print_byte: { + .label b = $e + //SEG257 [97] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuz1_ror_4 + lda b + lsr + lsr + lsr + lsr + //SEG258 [98] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa + tay + lda print_hextab,y + //SEG259 [99] call print_char + //SEG260 [86] phi from print_byte to print_char [phi:print_byte->print_char] + //SEG261 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#59 [phi:print_byte->print_char#0] -- register_copy + //SEG262 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy + jsr print_char + //SEG263 print_byte::@1 + //SEG264 [100] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuaa=vbuz1_band_vbuc1 + lda #$f + and b + //SEG265 [101] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa + tay + lda print_hextab,y + //SEG266 [102] call print_char + //SEG267 [86] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char] + //SEG268 [86] phi (byte*) print_char_cursor#39 = (byte*) print_char_cursor#11 [phi:print_byte::@1->print_char#0] -- register_copy + //SEG269 [86] phi (byte) print_char::ch#3 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy + jsr print_char + //SEG270 print_byte::@return + //SEG271 [103] return + rts +} +//SEG272 print_cls +// Clear the screen. Also resets current line/char cursor. +print_cls: { + .label sc = 5 + //SEG273 [105] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1] + //SEG274 [105] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) $400 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 + lda #<$400 + sta sc + lda #>$400 + sta sc+1 + //SEG275 [105] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1] + //SEG276 [105] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy + //SEG277 print_cls::@1 + b1: + //SEG278 [106] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 + lda #' ' + ldy #0 + sta (sc),y + //SEG279 [107] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 + inc sc + bne !+ + inc sc+1 + !: + //SEG280 [108] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) $400+(word/signed word/dword/signed dword) $3e8) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 + lda sc+1 + cmp #>$400+$3e8 + bne b1 + lda sc + cmp #<$400+$3e8 + bne b1 + //SEG281 print_cls::@return + //SEG282 [109] return + rts +} + print_hextab: .text "0123456789abcdef" + words: .word $12, $3f34, $cfed + diff --git a/src/test/ref/test-comparisons-word.sym b/src/test/ref/test-comparisons-word.sym new file mode 100644 index 000000000..75a43d3c1 --- /dev/null +++ b/src/test/ref/test-comparisons-word.sym @@ -0,0 +1,257 @@ +(label) @25 +(label) @begin +(label) @end +(byte*) BGCOL +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(byte) BLUE +(byte*) BORDERCOL +(byte) BROWN +(byte*) CHARGEN +(byte*) CIA1_INTERRUPT +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B_DDR +(byte*) CIA2_INTERRUPT +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B_DDR +(byte) CIA_INTERRUPT_CLEAR +(byte*) COLS +(byte) CYAN +(byte*) D011 +(byte*) D016 +(byte*) D018 +(byte) DARK_GREY +(byte) GREEN +(byte) GREY +(void()**) HARDWARE_IRQ +(byte) IRQ_COLLISION_BG +(byte) IRQ_COLLISION_SPRITE +(byte*) IRQ_ENABLE +(byte) IRQ_LIGHTPEN +(byte) IRQ_RASTER +(byte*) IRQ_STATUS +(void()**) KERNEL_IRQ +(byte*) LIGHTPEN_X +(byte*) LIGHTPEN_Y +(byte) LIGHT_BLUE +(byte) LIGHT_GREEN +(byte) LIGHT_GREY +(byte) ORANGE +(byte) PINK +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte) PURPLE +(byte*) RASTER +(byte) RED +(byte*) SPRITES_COLS +(byte*) SPRITES_ENABLE +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_MC +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC2 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_XMSB +(byte*) SPRITES_XPOS +(byte*) SPRITES_YPOS +(word) SPRITE_PTRS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(byte) VIC_RST8 +(byte) WHITE +(byte) YELLOW +(void()) compare((word) compare::w1 , (word) compare::w2 , (byte) compare::op) +(label) compare::@1 +(label) compare::@11 +(label) compare::@13 +(label) compare::@15 +(label) compare::@16 +(label) compare::@17 +(label) compare::@18 +(label) compare::@19 +(label) compare::@2 +(label) compare::@20 +(label) compare::@21 +(label) compare::@22 +(label) compare::@23 +(label) compare::@24 +(label) compare::@26 +(label) compare::@28 +(label) compare::@3 +(label) compare::@30 +(label) compare::@32 +(label) compare::@34 +(label) compare::@35 +(label) compare::@36 +(label) compare::@37 +(label) compare::@38 +(label) compare::@39 +(label) compare::@4 +(label) compare::@40 +(label) compare::@41 +(label) compare::@5 +(label) compare::@7 +(label) compare::@9 +(label) compare::@return +(byte) compare::op +(byte) compare::op#0 reg byte x 168.8333333333334 +(byte*) compare::ops +(const byte*) compare::ops#1 ops#1 = (string) "!=@" +(const byte*) compare::ops#2 ops#2 = (string) "==@" +(const byte*) compare::ops#3 ops#3 = (string) ">=@" +(const byte*) compare::ops#4 ops#4 = (string) "> @" +(const byte*) compare::ops#5 ops#5 = (string) "<=@" +(const byte*) compare::ops#6 ops#6 = (string) "< @" +(byte*) compare::ops#7 ops zp ZP_WORD:7 0.4 +(byte) compare::r +(byte) compare::r#10 r zp ZP_BYTE:9 1.076923076923077 +(byte) compare::r#14 r zp ZP_BYTE:9 2.0 +(byte) compare::r#15 r zp ZP_BYTE:9 2.0 +(byte) compare::r#16 r zp ZP_BYTE:9 2.0 +(byte) compare::r#17 r zp ZP_BYTE:9 2.0 +(byte) compare::r#19 r zp ZP_BYTE:9 2.0 +(byte) compare::r#20 r zp ZP_BYTE:9 2.0 +(const string) compare::str str = (string) " @" +(word) compare::w1 +(word) compare::w1#0 w1 zp ZP_WORD:10 36.249999999999986 +(word) compare::w2 +(word) compare::w2#0 w2 zp ZP_WORD:17 29.0 +(void()) main() +(byte~) main::$1 reg byte a 22.0 +(byte~) main::$2 reg byte a 202.0 +(byte~) main::$6 reg byte a 2002.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@18 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@7 +(label) main::@9 +(byte) main::i +(byte) main::i#1 i zp ZP_BYTE:2 16.5 +(byte) main::i#2 i zp ZP_BYTE:2 1.4347826086956523 +(byte) main::j +(byte) main::j#1 j zp ZP_BYTE:3 151.5 +(byte) main::j#2 j zp ZP_BYTE:3 16.833333333333332 +(byte) main::ln +(byte) main::ln#1 ln zp ZP_BYTE:4 667.3333333333334 +(byte) main::ln#11 ln zp ZP_BYTE:4 588.0 +(byte) main::ln#2 ln zp ZP_BYTE:4 684.1666666666667 +(byte) main::ln#4 ln zp ZP_BYTE:4 71.0 +(byte) main::ln#7 ln zp ZP_BYTE:4 7.333333333333333 +(byte) main::op +(byte) main::op#1 reg byte x 1501.5 +(byte) main::op#2 reg byte x 231.0 +(word) main::w1 +(word) main::w1#0 w1 zp ZP_WORD:15 48.19047619047619 +(word) main::w2 +(word) main::w2#0 w2 zp ZP_WORD:17 68.875 +(void()) print_byte((byte) print_byte::b) +(byte~) print_byte::$0 reg byte a 4.0 +(byte~) print_byte::$2 reg byte a 4.0 +(label) print_byte::@1 +(label) print_byte::@return +(byte) print_byte::b +(byte) print_byte::b#0 b zp ZP_BYTE:14 4.0 +(byte) print_byte::b#1 b zp ZP_BYTE:14 4.0 +(byte) print_byte::b#2 b zp ZP_BYTE:14 2.0 +(void()) print_char((byte) print_char::ch) +(label) print_char::@return +(byte) print_char::ch +(byte) print_char::ch#0 reg byte a 4.0 +(byte) print_char::ch#1 reg byte a 4.0 +(byte) print_char::ch#2 reg byte a 4.0 +(byte) print_char::ch#3 reg byte a 8.0 +(byte*) print_char_cursor +(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:12 10001.0 +(byte*~) print_char_cursor#107 print_char_cursor zp ZP_WORD:12 2002.0 +(byte*) print_char_cursor#11 print_char_cursor zp ZP_WORD:12 0.7058823529411765 +(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:12 1783.2608695652177 +(byte*) print_char_cursor#39 print_char_cursor zp ZP_WORD:12 5.0 +(byte*) print_char_cursor#58 print_char_cursor zp ZP_WORD:12 3.0 +(byte*) print_char_cursor#59 print_char_cursor zp ZP_WORD:12 2.0 +(byte*) print_char_cursor#61 print_char_cursor zp ZP_WORD:12 67.90322580645162 +(byte*) print_char_cursor#66 print_char_cursor zp ZP_WORD:12 12.0 +(byte*) print_char_cursor#68 print_char_cursor zp ZP_WORD:12 588.0 +(byte*) print_char_cursor#79 print_char_cursor zp ZP_WORD:12 71.0 +(byte*) print_char_cursor#95 print_char_cursor zp ZP_WORD:12 7.333333333333333 +(void()) print_cls() +(label) print_cls::@1 +(label) print_cls::@return +(byte*) print_cls::sc +(byte*) print_cls::sc#1 sc zp ZP_WORD:5 16.5 +(byte*) print_cls::sc#2 sc zp ZP_WORD:5 16.5 +(byte[]) print_hextab +(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" +(byte*) print_line_cursor +(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:5 6401.0 +(byte*) print_line_cursor#19 print_line_cursor zp ZP_WORD:5 282.3636363636364 +(byte*) print_line_cursor#23 print_line_cursor zp ZP_WORD:5 588.0 +(byte*) print_line_cursor#31 print_line_cursor zp ZP_WORD:5 71.0 +(byte*) print_line_cursor#33 print_line_cursor zp ZP_WORD:5 7.333333333333333 +(byte*) print_line_cursor#9 print_line_cursor zp ZP_WORD:5 20004.0 +(void()) print_ln() +(label) print_ln::@1 +(label) print_ln::@return +(byte*) print_screen +(void()) print_str((byte*) print_str::str) +(label) print_str::@1 +(label) print_str::@2 +(label) print_str::@return +(byte*) print_str::str +(byte*) print_str::str#0 str zp ZP_WORD:10 20002.0 +(byte*) print_str::str#2 str zp ZP_WORD:10 4.0 +(byte*) print_str::str#6 str zp ZP_WORD:10 10001.5 +(byte*) print_str::str#8 str zp ZP_WORD:10 4.0 +(void()) print_word((word) print_word::w) +(label) print_word::@1 +(label) print_word::@return +(word) print_word::w +(word) print_word::w#0 w zp ZP_WORD:10 4.0 +(word) print_word::w#1 w zp ZP_WORD:10 4.0 +(word) print_word::w#2 w zp ZP_WORD:10 2.6666666666666665 +(word[]) words +(const word[]) words#0 words = { (byte/signed byte/word/signed word/dword/signed dword) $12, (word/signed word/dword/signed dword) $3f34, (word/dword/signed dword) $cfed } + +zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +zp ZP_BYTE:3 [ main::j#2 main::j#1 ] +zp ZP_BYTE:4 [ main::ln#2 main::ln#4 main::ln#7 main::ln#11 main::ln#1 ] +reg byte x [ main::op#2 main::op#1 ] +zp ZP_WORD:5 [ print_line_cursor#9 print_line_cursor#19 print_line_cursor#31 print_line_cursor#33 print_line_cursor#23 print_line_cursor#1 print_cls::sc#2 print_cls::sc#1 ] +zp ZP_WORD:7 [ compare::ops#7 ] +zp ZP_BYTE:9 [ compare::r#10 compare::r#14 compare::r#15 compare::r#16 compare::r#17 compare::r#19 compare::r#20 ] +zp ZP_WORD:10 [ print_str::str#6 print_str::str#8 print_str::str#2 print_str::str#0 print_word::w#2 print_word::w#0 print_word::w#1 compare::w1#0 ] +reg byte a [ print_char::ch#3 print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +zp ZP_WORD:12 [ print_char_cursor#58 print_char_cursor#39 print_char_cursor#66 print_char_cursor#11 print_char_cursor#61 print_char_cursor#79 print_char_cursor#95 print_char_cursor#68 print_char_cursor#107 print_char_cursor#2 print_char_cursor#1 print_char_cursor#59 ] +zp ZP_BYTE:14 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] +reg byte a [ main::$1 ] +zp ZP_WORD:15 [ main::w1#0 ] +reg byte a [ main::$2 ] +zp ZP_WORD:17 [ main::w2#0 compare::w2#0 ] +reg byte x [ compare::op#0 ] +reg byte a [ main::$6 ] +reg byte a [ print_byte::$0 ] +reg byte a [ print_byte::$2 ]