From e64659025e0571ec430bb4ce727ec2253722d68e Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Fri, 5 Jul 2019 06:56:24 +0200 Subject: [PATCH] Merged optimizations. --- src/main/kc/stdlib/atan2.kc | 4 +- src/test/ref/cordic-atan2-16-ref.asm | 2 +- src/test/ref/cordic-atan2-16-ref.cfg | 2 +- src/test/ref/cordic-atan2-16-ref.log | 30 +- src/test/ref/cordic-atan2-16.asm | 2 +- src/test/ref/cordic-atan2-16.cfg | 2 +- src/test/ref/cordic-atan2-16.log | 30 +- src/test/ref/cordic-atan2-clear.asm | 2 +- src/test/ref/cordic-atan2-clear.cfg | 2 +- src/test/ref/cordic-atan2-clear.log | 30 +- src/test/ref/screen-center-angle.asm | 28 +- src/test/ref/screen-center-angle.cfg | 18 +- src/test/ref/screen-center-angle.log | 521 ++- src/test/ref/screen-center-angle.sym | 14 +- src/test/ref/screen-center-distance.asm | 228 +- src/test/ref/screen-center-distance.cfg | 374 +- src/test/ref/screen-center-distance.log | 4840 ++++++++++++++++------- src/test/ref/screen-center-distance.sym | 232 +- 18 files changed, 4273 insertions(+), 2088 deletions(-) diff --git a/src/main/kc/stdlib/atan2.kc b/src/main/kc/stdlib/atan2.kc index 9ce9f85dc..f36084f94 100644 --- a/src/main/kc/stdlib/atan2.kc +++ b/src/main/kc/stdlib/atan2.kc @@ -22,11 +22,11 @@ word atan2_16(signed word x, signed word y) { // We found the correct angle! break; } - // xd=xi>>i; yd=yi>>i + // Optimized shift of 2 values: xd=xi>>i; yd=yi>>i signed word xd = xi; signed word yd = yi; byte shift = i; - while(shift>1) { + while(shift>=2) { xd >>= 2; yd >>= 2; shift -=2; diff --git a/src/test/ref/cordic-atan2-16-ref.asm b/src/test/ref/cordic-atan2-16-ref.asm index 6284ecf81..9f9017152 100644 --- a/src/test/ref/cordic-atan2-16-ref.asm +++ b/src/test/ref/cordic-atan2-16-ref.asm @@ -243,7 +243,7 @@ atan2_16: { lda yi+1 sta yd+1 b13: - cpy #1+1 + cpy #2 bcs b14 cpy #0 beq b17 diff --git a/src/test/ref/cordic-atan2-16-ref.cfg b/src/test/ref/cordic-atan2-16-ref.cfg index 27428e22f..c76681726 100644 --- a/src/test/ref/cordic-atan2-16-ref.cfg +++ b/src/test/ref/cordic-atan2-16-ref.cfg @@ -168,7 +168,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [78] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [78] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [78] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [79] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 diff --git a/src/test/ref/cordic-atan2-16-ref.log b/src/test/ref/cordic-atan2-16-ref.log index 4ef3d5b7e..c685f7732 100644 --- a/src/test/ref/cordic-atan2-16-ref.log +++ b/src/test/ref/cordic-atan2-16-ref.log @@ -219,7 +219,7 @@ atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 (signed word) atan2_16::yd#7 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 atan2_16::@19/(signed word) atan2_16::yd#1 ) (signed word) atan2_16::xd#7 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 atan2_16::@19/(signed word) atan2_16::xd#1 ) (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::shift#0 atan2_16::@19/(byte) atan2_16::shift#1 ) - (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 + (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 if((bool~) atan2_16::$19) goto atan2_16::@19 to:atan2_16::@20 atan2_16::@19: scope:[atan2_16] from atan2_16::@18 @@ -1118,7 +1118,7 @@ Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 Adding number conversion cast (unumber) 2 in (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 -Adding number conversion cast (unumber) 1 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 +Adding number conversion cast (unumber) 2 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 Adding number conversion cast (unumber) 2 in (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 @@ -1267,7 +1267,7 @@ Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 2 Simplifying constant integer cast 0 -Simplifying constant integer cast 1 +Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 @@ -1313,7 +1313,7 @@ Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 0 -Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 2 Finalized signed number type (signed byte) 2 Finalized unsigned number type (byte) 2 @@ -1502,7 +1502,7 @@ Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(sign Simple Condition (bool~) atan2_16::$5 [50] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 Simple Condition (bool~) atan2_16::$18 [64] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 Simple Condition (bool~) atan2_16::$20 [84] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 Simple Condition (bool~) atan2_16::$21 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 Simple Condition (bool~) atan2_16::$22 [104] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 @@ -1563,7 +1563,6 @@ Resolved ranged next value [225] main::x#1 ← ++ main::x#2 to ++ Resolved ranged comparison value [227] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 Resolved ranged next value [229] main::y#1 ← ++ main::y#4 to ++ Resolved ranged comparison value [231] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d -Rewriting conditional comparison [76] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 Converting *(pointer+n) to pointer[n] [243] *((byte*) main::col00#0) ← ++ *((byte*) main::col00#0) -- *(main::$3 + $13) Converting *(pointer+n) to pointer[n] [243] *((byte*) main::col00#0) ← ++ *((byte*~) main::$3 + (byte) $13) -- *(main::$3 + $13) Successful SSA optimization Pass2InlineDerefIdx @@ -1577,23 +1576,18 @@ Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) 5 in if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 -Adding number conversion cast (unumber) 1+1 in if((byte) atan2_16::shift#2>=(byte) 1+(number) 1) goto atan2_16::@19 -Adding number conversion cast (unumber) 1 in if((byte) atan2_16::shift#2>=(unumber)(byte) 1+(number) 1) goto atan2_16::@19 Adding number conversion cast (snumber) $15 in if((signed byte) main::x#1!=(number) $15) goto main::@2 Adding number conversion cast (snumber) $d in if((signed byte) main::y#1!=(number) $d) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 -Simplifying constant integer cast (byte) 1+(unumber)(number) 1 -Simplifying constant integer cast 1 Simplifying constant integer cast $15 Simplifying constant integer cast $d Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $10 -Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) $15 Finalized signed number type (signed byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions @@ -2031,7 +2025,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [78] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [78] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [78] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [79] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 @@ -2985,9 +2979,9 @@ atan2_16: { jmp b13 //SEG162 atan2_16::@13 b13: - //SEG163 [79] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 + //SEG163 [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 lda shift - cmp #1+1 + cmp #2 bcs b14 jmp b15 //SEG164 atan2_16::@15 @@ -4063,8 +4057,8 @@ atan2_16: { jmp b13 //SEG162 atan2_16::@13 b13: - //SEG163 [79] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG163 [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 jmp b15 //SEG164 atan2_16::@15 @@ -5228,8 +5222,8 @@ atan2_16: { //SEG161 [78] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy //SEG162 atan2_16::@13 b13: - //SEG163 [79] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG163 [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 //SEG164 atan2_16::@15 //SEG165 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 diff --git a/src/test/ref/cordic-atan2-16.asm b/src/test/ref/cordic-atan2-16.asm index 1fd3b496d..00f4aca98 100644 --- a/src/test/ref/cordic-atan2-16.asm +++ b/src/test/ref/cordic-atan2-16.asm @@ -153,7 +153,7 @@ atan2_16: { lda yi+1 sta yd+1 b13: - cpy #1+1 + cpy #2 bcs b14 cpy #0 beq b17 diff --git a/src/test/ref/cordic-atan2-16.cfg b/src/test/ref/cordic-atan2-16.cfg index c7a9fdbbc..048517ee0 100644 --- a/src/test/ref/cordic-atan2-16.cfg +++ b/src/test/ref/cordic-atan2-16.cfg @@ -100,7 +100,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [46] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [46] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [46] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [47] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [47] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 diff --git a/src/test/ref/cordic-atan2-16.log b/src/test/ref/cordic-atan2-16.log index b6aea3411..86e6634af 100644 --- a/src/test/ref/cordic-atan2-16.log +++ b/src/test/ref/cordic-atan2-16.log @@ -196,7 +196,7 @@ atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 (signed word) atan2_16::yd#7 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 atan2_16::@19/(signed word) atan2_16::yd#1 ) (signed word) atan2_16::xd#7 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 atan2_16::@19/(signed word) atan2_16::xd#1 ) (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::shift#0 atan2_16::@19/(byte) atan2_16::shift#1 ) - (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 + (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 if((bool~) atan2_16::$19) goto atan2_16::@19 to:atan2_16::@20 atan2_16::@19: scope:[atan2_16] from atan2_16::@18 @@ -811,7 +811,7 @@ Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 Adding number conversion cast (unumber) 2 in (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 -Adding number conversion cast (unumber) 1 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 +Adding number conversion cast (unumber) 2 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 Adding number conversion cast (unumber) 2 in (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 @@ -954,7 +954,7 @@ Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 2 Simplifying constant integer cast 0 -Simplifying constant integer cast 1 +Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 @@ -996,7 +996,7 @@ Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 0 -Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 2 Finalized signed number type (signed byte) 2 Finalized unsigned number type (byte) 2 @@ -1141,7 +1141,7 @@ Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(sign Simple Condition (bool~) atan2_16::$5 [50] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 Simple Condition (bool~) atan2_16::$18 [64] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 Simple Condition (bool~) atan2_16::$20 [84] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 Simple Condition (bool~) atan2_16::$21 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 Simple Condition (bool~) atan2_16::$22 [104] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 @@ -1193,7 +1193,6 @@ Resolved ranged next value [171] main::x#1 ← ++ main::x#2 to ++ Resolved ranged comparison value [173] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 Resolved ranged next value [175] main::y#1 ← ++ main::y#4 to ++ Resolved ranged comparison value [177] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d -Rewriting conditional comparison [76] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 Converting *(pointer+n) to pointer[n] [184] *((byte*) main::col00#0) ← ++ *((byte*) main::col00#0) -- *(main::$2 + $13) Converting *(pointer+n) to pointer[n] [184] *((byte*) main::col00#0) ← ++ *((byte*~) main::$2 + (byte) $13) -- *(main::$2 + $13) Successful SSA optimization Pass2InlineDerefIdx @@ -1207,23 +1206,18 @@ Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) 5 in if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 -Adding number conversion cast (unumber) 1+1 in if((byte) atan2_16::shift#2>=(byte) 1+(number) 1) goto atan2_16::@19 -Adding number conversion cast (unumber) 1 in if((byte) atan2_16::shift#2>=(unumber)(byte) 1+(number) 1) goto atan2_16::@19 Adding number conversion cast (snumber) $15 in if((signed byte) main::x#1!=(number) $15) goto main::@2 Adding number conversion cast (snumber) $d in if((signed byte) main::y#1!=(number) $d) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 -Simplifying constant integer cast (byte) 1+(unumber)(number) 1 -Simplifying constant integer cast 1 Simplifying constant integer cast $15 Simplifying constant integer cast $d Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $10 -Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) $15 Finalized signed number type (signed byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions @@ -1558,7 +1552,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [46] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [46] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [46] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [47] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [47] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 @@ -2212,9 +2206,9 @@ atan2_16: { jmp b13 //SEG96 atan2_16::@13 b13: - //SEG97 [47] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 + //SEG97 [47] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 lda shift - cmp #1+1 + cmp #2 bcs b14 jmp b15 //SEG98 atan2_16::@15 @@ -3044,8 +3038,8 @@ atan2_16: { jmp b13 //SEG96 atan2_16::@13 b13: - //SEG97 [47] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG97 [47] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 jmp b15 //SEG98 atan2_16::@15 @@ -3944,8 +3938,8 @@ atan2_16: { //SEG95 [46] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy //SEG96 atan2_16::@13 b13: - //SEG97 [47] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG97 [47] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 //SEG98 atan2_16::@15 //SEG99 [48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 diff --git a/src/test/ref/cordic-atan2-clear.asm b/src/test/ref/cordic-atan2-clear.asm index 216802759..9de60324b 100644 --- a/src/test/ref/cordic-atan2-clear.asm +++ b/src/test/ref/cordic-atan2-clear.asm @@ -218,7 +218,7 @@ atan2_16: { lda yi+1 sta yd+1 b13: - cpy #1+1 + cpy #2 bcs b14 cpy #0 beq b17 diff --git a/src/test/ref/cordic-atan2-clear.cfg b/src/test/ref/cordic-atan2-clear.cfg index 6b498409f..c7aff768f 100644 --- a/src/test/ref/cordic-atan2-clear.cfg +++ b/src/test/ref/cordic-atan2-clear.cfg @@ -129,7 +129,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [64] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [64] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [64] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [65] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [65] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 diff --git a/src/test/ref/cordic-atan2-clear.log b/src/test/ref/cordic-atan2-clear.log index 0c287bade..021cc018d 100644 --- a/src/test/ref/cordic-atan2-clear.log +++ b/src/test/ref/cordic-atan2-clear.log @@ -200,7 +200,7 @@ atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 (signed word) atan2_16::yd#7 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 atan2_16::@19/(signed word) atan2_16::yd#1 ) (signed word) atan2_16::xd#7 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 atan2_16::@19/(signed word) atan2_16::xd#1 ) (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::shift#0 atan2_16::@19/(byte) atan2_16::shift#1 ) - (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 + (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 if((bool~) atan2_16::$19) goto atan2_16::@19 to:atan2_16::@20 atan2_16::@19: scope:[atan2_16] from atan2_16::@18 @@ -883,7 +883,7 @@ Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 Adding number conversion cast (unumber) 2 in (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 -Adding number conversion cast (unumber) 1 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 +Adding number conversion cast (unumber) 2 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 Adding number conversion cast (unumber) 2 in (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 @@ -1045,7 +1045,7 @@ Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 2 Simplifying constant integer cast 0 -Simplifying constant integer cast 1 +Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 @@ -1097,7 +1097,7 @@ Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 0 -Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 2 Finalized signed number type (signed byte) 2 Finalized unsigned number type (byte) 2 @@ -1267,7 +1267,7 @@ Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(sign Simple Condition (bool~) atan2_16::$5 [50] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 Simple Condition (bool~) atan2_16::$18 [64] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 Simple Condition (bool~) atan2_16::$20 [84] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 Simple Condition (bool~) atan2_16::$21 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 Simple Condition (bool~) atan2_16::$22 [104] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 @@ -1321,7 +1321,6 @@ Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#5 to Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 Resolved ranged next value [206] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ Resolved ranged comparison value [208] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Rewriting conditional comparison [76] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 Rewriting conditional comparison [202] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero @@ -1332,8 +1331,6 @@ Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) 5 in if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 -Adding number conversion cast (unumber) 1+1 in if((byte) atan2_16::shift#2>=(byte) 1+(number) 1) goto atan2_16::@19 -Adding number conversion cast (unumber) 1 in if((byte) atan2_16::shift#2>=(unumber)(byte) 1+(number) 1) goto atan2_16::@19 Adding number conversion cast (unumber) $13+1 in if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 Adding number conversion cast (unumber) 1 in if((byte) init_angle_screen::x#1<(unumber)(byte) $13+(number) 1) goto init_angle_screen::@2 Adding number conversion cast (unumber) $d in if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 @@ -1341,8 +1338,6 @@ Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 -Simplifying constant integer cast (byte) 1+(unumber)(number) 1 -Simplifying constant integer cast 1 Simplifying constant integer cast (byte~) init_angle_screen::$3 Simplifying constant integer cast (byte~) init_angle_screen::$6 Simplifying constant integer cast (byte) $13+(unumber)(number) 1 @@ -1353,7 +1348,6 @@ Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Self Phi Eliminated (byte*) init_font_hex::proto_hi#4 @@ -1728,7 +1722,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [64] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [64] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [64] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [65] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [65] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 @@ -2546,9 +2540,9 @@ atan2_16: { jmp b13 //SEG125 atan2_16::@13 b13: - //SEG126 [65] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 + //SEG126 [65] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 lda shift - cmp #1+1 + cmp #2 bcs b14 jmp b15 //SEG127 atan2_16::@15 @@ -3537,8 +3531,8 @@ atan2_16: { jmp b13 //SEG125 atan2_16::@13 b13: - //SEG126 [65] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG126 [65] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 jmp b15 //SEG127 atan2_16::@15 @@ -4579,8 +4573,8 @@ atan2_16: { //SEG124 [64] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy //SEG125 atan2_16::@13 b13: - //SEG126 [65] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG126 [65] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 //SEG127 atan2_16::@15 //SEG128 [66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 diff --git a/src/test/ref/screen-center-angle.asm b/src/test/ref/screen-center-angle.asm index 0b9f0fd18..8c2df0ce6 100644 --- a/src/test/ref/screen-center-angle.asm +++ b/src/test/ref/screen-center-angle.asm @@ -167,17 +167,17 @@ init_angle_screen: { .label ang_w = $2b .label x = $e .label xb = $f - .label screen_topline = $a - .label screen_bottomline = $c + .label screen_topline = $c + .label screen_bottomline = $a .label y = 9 lda #SCREEN+$28*$c - sta screen_bottomline+1 - lda #SCREEN+$28*$c sta screen_topline+1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 lda #0 sta y b1: @@ -208,6 +208,12 @@ init_angle_screen: { !: lda _10+1 sta ang_w + ldy xb + sta (screen_bottomline),y + eor #$ff + clc + adc #1 + sta (screen_topline),y lda #$80 clc adc ang_w @@ -217,14 +223,6 @@ init_angle_screen: { sec sbc ang_w sta (screen_bottomline),y - lda ang_w - eor #$ff - clc - adc #1 - ldy xb - sta (screen_topline),y - lda ang_w - sta (screen_bottomline),y inc x dec xb lda x @@ -334,7 +332,7 @@ atan2_16: { lda yi+1 sta yd+1 b13: - cpy #1+1 + cpy #2 bcs b14 cpy #0 beq b17 diff --git a/src/test/ref/screen-center-angle.cfg b/src/test/ref/screen-center-angle.cfg index 276e3a5db..4b8ac5488 100644 --- a/src/test/ref/screen-center-angle.cfg +++ b/src/test/ref/screen-center-angle.cfg @@ -103,8 +103,8 @@ init_angle_screen: scope:[init_angle_screen] from main::@3 [49] phi() to:init_angle_screen::@1 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 - [50] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) [50] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [50] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) [50] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) to:init_angle_screen::@2 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 @@ -124,13 +124,13 @@ init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 - [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 - [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 - [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 - [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 - [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 - [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 - [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [64] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [65] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [66] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [67] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [68] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [69] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [72] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 @@ -197,7 +197,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [99] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [99] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [99] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [100] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [100] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 diff --git a/src/test/ref/screen-center-angle.log b/src/test/ref/screen-center-angle.log index f9e033909..6caffc494 100644 --- a/src/test/ref/screen-center-angle.log +++ b/src/test/ref/screen-center-angle.log @@ -238,7 +238,7 @@ atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 (signed word) atan2_16::yd#7 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 atan2_16::@19/(signed word) atan2_16::yd#1 ) (signed word) atan2_16::xd#7 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 atan2_16::@19/(signed word) atan2_16::xd#1 ) (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::shift#0 atan2_16::@19/(byte) atan2_16::shift#1 ) - (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 + (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 if((bool~) atan2_16::$19) goto atan2_16::@19 to:atan2_16::@20 atan2_16::@19: scope:[atan2_16] from atan2_16::@18 @@ -560,16 +560,16 @@ init_angle_screen: scope:[init_angle_screen] from main::@4 (byte) init_angle_screen::y#0 ← (byte) 0 to:init_angle_screen::@1 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 - (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) (byte) init_angle_screen::x#0 ← (number) 0 (byte) init_angle_screen::xb#0 ← (number) $27 to:init_angle_screen::@2 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + (byte*) init_angle_screen::screen_topline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_topline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) (byte) init_angle_screen::xb#3 ← phi( init_angle_screen::@1/(byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) (byte*) init_angle_screen::screen_bottomline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_bottomline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) - (byte*) init_angle_screen::screen_topline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_topline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) (byte) init_angle_screen::y#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::y#4 init_angle_screen::@5/(byte) init_angle_screen::y#5 ) (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 @@ -588,23 +588,23 @@ init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 ini to:init_angle_screen::@5 init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 (byte) init_angle_screen::y#5 ← phi( init_angle_screen::@2/(byte) init_angle_screen::y#2 ) - (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@2/(byte) init_angle_screen::xb#3 ) - (byte*) init_angle_screen::screen_bottomline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_bottomline#4 ) (byte) init_angle_screen::x#3 ← phi( init_angle_screen::@2/(byte) init_angle_screen::x#2 ) (byte*) init_angle_screen::screen_topline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_topline#4 ) + (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@2/(byte) init_angle_screen::xb#3 ) + (byte*) init_angle_screen::screen_bottomline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_bottomline#4 ) (word) atan2_16::return#4 ← phi( init_angle_screen::@2/(word) atan2_16::return#2 ) (word~) init_angle_screen::$9 ← (word) atan2_16::return#4 (word) init_angle_screen::angle_w#0 ← (word~) init_angle_screen::$9 (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 (number~) init_angle_screen::$11 ← > (number~) init_angle_screen::$10 (byte) init_angle_screen::ang_w#0 ← (number~) init_angle_screen::$11 - (number~) init_angle_screen::$12 ← (number) $80 + (byte) init_angle_screen::ang_w#0 - *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$12 - (number~) init_angle_screen::$13 ← (number) $80 - (byte) init_angle_screen::ang_w#0 - *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$13 - (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 - *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + (number~) init_angle_screen::$13 ← (number) $80 + (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$13 + (number~) init_angle_screen::$14 ← (number) $80 - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$14 (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#3 (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 @@ -887,9 +887,9 @@ SYMBOL TABLE SSA (byte*~) init_angle_screen::$1 (number~) init_angle_screen::$10 (number~) init_angle_screen::$11 -(number~) init_angle_screen::$12 +(byte~) init_angle_screen::$12 (number~) init_angle_screen::$13 -(byte~) init_angle_screen::$14 +(number~) init_angle_screen::$14 (bool~) init_angle_screen::$15 (bool~) init_angle_screen::$16 (number~) init_angle_screen::$2 @@ -1178,7 +1178,7 @@ Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 Adding number conversion cast (unumber) 2 in (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 -Adding number conversion cast (unumber) 1 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 > (number) 1 +Adding number conversion cast (unumber) 2 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 Adding number conversion cast (snumber) 2 in (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 Adding number conversion cast (unumber) 2 in (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 @@ -1232,10 +1232,10 @@ Adding number conversion cast (unumber) init_angle_screen::$6 in (number~) init_ Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 Adding number conversion cast (unumber) init_angle_screen::$10 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (unumber)(number) $80 Adding number conversion cast (unumber) init_angle_screen::$11 in (number~) init_angle_screen::$11 ← > (unumber~) init_angle_screen::$10 -Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$12 ← (number) $80 + (byte) init_angle_screen::ang_w#0 -Adding number conversion cast (unumber) init_angle_screen::$12 in (number~) init_angle_screen::$12 ← (unumber)(number) $80 + (byte) init_angle_screen::ang_w#0 -Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$13 ← (number) $80 - (byte) init_angle_screen::ang_w#0 -Adding number conversion cast (unumber) init_angle_screen::$13 in (number~) init_angle_screen::$13 ← (unumber)(number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$13 ← (number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$13 in (number~) init_angle_screen::$13 ← (unumber)(number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$14 ← (number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$14 in (number~) init_angle_screen::$14 ← (unumber)(number) $80 - (byte) init_angle_screen::ang_w#0 Adding number conversion cast (unumber) $13 in (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 @@ -1378,7 +1378,7 @@ Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 2 Simplifying constant integer cast 0 -Simplifying constant integer cast 1 +Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 @@ -1444,7 +1444,7 @@ Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 0 -Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 2 Finalized signed number type (signed byte) 2 Finalized unsigned number type (byte) 2 @@ -1503,8 +1503,8 @@ Inferred type updated to byte in (unumber~) init_angle_screen::$3 ← (byte) $27 Inferred type updated to byte in (unumber~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (byte) 2 Inferred type updated to word in (unumber~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 Inferred type updated to byte in (unumber~) init_angle_screen::$11 ← > (word~) init_angle_screen::$10 -Inferred type updated to byte in (unumber~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -Inferred type updated to byte in (unumber~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 +Inferred type updated to byte in (unumber~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 +Inferred type updated to byte in (unumber~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 Inversing boolean not [72] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [71] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 Inversing boolean not [81] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [80] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 Inversing boolean not [92] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [91] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 @@ -1583,10 +1583,10 @@ Alias (signed word) init_angle_screen::xw#0 = (signed word~) init_angle_screen:: Alias (word~) init_angle_screen::$7 = (word~) init_angle_screen::$18 Alias (signed word) init_angle_screen::yw#0 = (signed word~) init_angle_screen::$8 Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 -Alias (byte*) init_angle_screen::screen_topline#2 = (byte*) init_angle_screen::screen_topline#4 (byte*) init_angle_screen::screen_topline#3 -Alias (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#3 Alias (byte*) init_angle_screen::screen_bottomline#2 = (byte*) init_angle_screen::screen_bottomline#4 (byte*) init_angle_screen::screen_bottomline#3 Alias (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#3 +Alias (byte*) init_angle_screen::screen_topline#2 = (byte*) init_angle_screen::screen_topline#4 (byte*) init_angle_screen::screen_topline#3 +Alias (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#3 Alias (byte) init_angle_screen::y#2 = (byte) init_angle_screen::y#5 (byte) init_angle_screen::y#3 Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$9 Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$11 @@ -1614,8 +1614,8 @@ Self Phi Eliminated (word) atan2_16::angle#14 Self Phi Eliminated (signed word) atan2_16::x#11 Self Phi Eliminated (signed word) atan2_16::y#10 Self Phi Eliminated (byte) init_angle_screen::y#2 -Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2 Self Phi Eliminated (byte*) init_angle_screen::screen_bottomline#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1 Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4 @@ -1635,8 +1635,8 @@ Identical Phi Values (dword) print_dword_at::dw#1 (dword) print_dword_at::dw#0 Identical Phi Values (byte*) print_dword_at::at#1 (byte*) print_dword_at::at#0 Identical Phi Values (byte*) init_angle_screen::screen#1 (byte*) init_angle_screen::screen#0 Identical Phi Values (byte) init_angle_screen::y#2 (byte) init_angle_screen::y#4 -Identical Phi Values (byte*) init_angle_screen::screen_topline#2 (byte*) init_angle_screen::screen_topline#5 Identical Phi Values (byte*) init_angle_screen::screen_bottomline#2 (byte*) init_angle_screen::screen_bottomline#5 +Identical Phi Values (byte*) init_angle_screen::screen_topline#2 (byte*) init_angle_screen::screen_topline#5 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 @@ -1651,7 +1651,7 @@ Simple Condition (bool~) atan2_16::$0 [50] if((signed word) atan2_16::y#0>=(sign Simple Condition (bool~) atan2_16::$5 [59] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 Simple Condition (bool~) atan2_16::$18 [73] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 Simple Condition (bool~) atan2_16::$11 [82] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$19 [85] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [85] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 Simple Condition (bool~) atan2_16::$20 [93] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 Simple Condition (bool~) atan2_16::$21 [96] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 Simple Condition (bool~) atan2_16::$22 [113] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 @@ -1716,7 +1716,6 @@ Resolved ranged next value [41] init_font_hex::c#1 ← ++ init_font_hex::c#5 to Resolved ranged comparison value [43] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 Resolved ranged next value [289] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ Resolved ranged comparison value [291] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Rewriting conditional comparison [85] if((byte) atan2_16::shift#2>(byte) 1) goto atan2_16::@19 Rewriting conditional comparison [285] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 Simplifying expression containing zero init_font_hex::charset#2 in [17] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Simplifying expression containing zero CIA_TIMER_CONTROL_CONTINUOUS#0 in [135] (byte~) clock_start::$0 ← (const byte) CIA_TIMER_CONTROL_STOP#0 | (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 @@ -1731,8 +1730,6 @@ Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) 5 in if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 -Adding number conversion cast (unumber) 1+1 in if((byte) atan2_16::shift#2>=(byte) 1+(number) 1) goto atan2_16::@19 -Adding number conversion cast (unumber) 1 in if((byte) atan2_16::shift#2>=(unumber)(byte) 1+(number) 1) goto atan2_16::@19 Adding number conversion cast (unumber) $13+1 in if((byte) init_angle_screen::x#1<(byte) $13+(number) 1) goto init_angle_screen::@2 Adding number conversion cast (unumber) 1 in if((byte) init_angle_screen::x#1<(unumber)(byte) $13+(number) 1) goto init_angle_screen::@2 Adding number conversion cast (unumber) $d in if((byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 @@ -1740,8 +1737,6 @@ Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 -Simplifying constant integer cast (byte) 1+(unumber)(number) 1 -Simplifying constant integer cast 1 Simplifying constant integer cast (byte~) init_angle_screen::$3 Simplifying constant integer cast (byte~) init_angle_screen::$6 Simplifying constant integer cast (byte) $13+(unumber)(number) 1 @@ -1752,7 +1747,6 @@ Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) clock_start::$1 = (byte~) clock_start::$0 (byte~) clock_start::$2 @@ -1965,8 +1959,8 @@ Coalesced [57] print_char_at::at#3 ← print_char_at::at#0 Coalesced [62] print_char_at::ch#4 ← print_char_at::ch#1 Coalesced [63] print_char_at::at#4 ← print_char_at::at#1 Coalesced [102] init_angle_screen::y#6 ← init_angle_screen::y#1 -Coalesced [103] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#1 -Coalesced [104] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#1 +Coalesced [103] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#1 +Coalesced [104] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#1 Coalesced [105] init_angle_screen::x#4 ← init_angle_screen::x#1 Coalesced [106] init_angle_screen::xb#4 ← init_angle_screen::xb#1 Coalesced [109] atan2_16::yi#17 ← atan2_16::$2 @@ -2170,8 +2164,8 @@ init_angle_screen: scope:[init_angle_screen] from main::@3 [49] phi() to:init_angle_screen::@1 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 - [50] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) [50] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [50] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) [50] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) to:init_angle_screen::@2 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 @@ -2191,13 +2185,13 @@ init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 - [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 - [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 - [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 - [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 - [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 - [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 - [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [64] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [65] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 + [66] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 + [67] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [68] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [69] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [72] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 @@ -2264,7 +2258,7 @@ atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [99] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [99] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [99] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) - [100] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 + [100] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 @@ -2447,7 +2441,7 @@ VARIABLE REGISTER WEIGHTS (byte~) init_angle_screen::$3 202.0 (byte~) init_angle_screen::$6 202.0 (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 72.14285714285714 +(byte) init_angle_screen::ang_w#0 84.16666666666666 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 202.0 (byte*) init_angle_screen::screen @@ -2568,8 +2562,8 @@ Initial phi equivalence classes [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] [ init_angle_screen::y#4 init_angle_screen::y#1 ] -[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] [ init_angle_screen::x#2 init_angle_screen::x#1 ] [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] @@ -2622,8 +2616,8 @@ Complete equivalence classes [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] [ init_angle_screen::y#4 init_angle_screen::y#1 ] -[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] [ init_angle_screen::x#2 init_angle_screen::x#1 ] [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] @@ -2675,8 +2669,8 @@ Allocated zp ZP_WORD:7 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at:: Allocated zp ZP_BYTE:9 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] Allocated zp ZP_WORD:10 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Allocated zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Allocated zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] -Allocated zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +Allocated zp ZP_WORD:13 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +Allocated zp ZP_WORD:15 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] Allocated zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Allocated zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] Allocated zp ZP_WORD:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] @@ -3081,29 +3075,29 @@ init_angle_screen: { .label ang_w = $52 .label x = $11 .label xb = $12 - .label screen_topline = $d - .label screen_bottomline = $f + .label screen_topline = $f + .label screen_bottomline = $d .label y = $c //SEG94 [50] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] b1_from_init_angle_screen: - //SEG95 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN+$28*$c - sta screen_bottomline+1 - //SEG96 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + //SEG95 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$c sta screen_topline+1 + //SEG96 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 //SEG97 [50] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 //SEG98 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] b1_from_b3: - //SEG99 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy - //SEG100 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG99 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG100 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy //SEG101 [50] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 //SEG102 init_angle_screen::@1 @@ -3183,36 +3177,36 @@ init_angle_screen: { //SEG122 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 lda _10+1 sta ang_w - //SEG123 [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_plus_vbuz2 - lax ang_w - axs #-[$80] - stx _12 - //SEG124 [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuz3 - lda _12 - ldy x - sta (screen_topline),y - //SEG125 [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_minus_vbuz2 - lda #$80 - sec - sbc ang_w - sta _13 - //SEG126 [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuz3 - lda _13 - ldy x + //SEG123 [64] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + ldy xb sta (screen_bottomline),y - //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuz1=_neg_vbuz2 + //SEG124 [65] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuz1=_neg_vbuz2 lda ang_w eor #$ff clc adc #1 - sta _14 - //SEG128 [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuz3 - lda _14 + sta _12 + //SEG125 [66] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _12 ldy xb sta (screen_topline),y - //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 - lda ang_w - ldy xb + //SEG126 [67] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_plus_vbuz2 + lax ang_w + axs #-[$80] + stx _13 + //SEG127 [68] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _13 + ldy x + sta (screen_topline),y + //SEG128 [69] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_minus_vbuz2 + lda #$80 + sec + sbc ang_w + sta _14 + //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _14 + ldy x sta (screen_bottomline),y //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc x @@ -3426,9 +3420,9 @@ atan2_16: { jmp b13 //SEG186 atan2_16::@13 b13: - //SEG187 [100] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 + //SEG187 [100] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 lda shift - cmp #1+1 + cmp #2 bcs b14 jmp b15 //SEG188 atan2_16::@15 @@ -3821,62 +3815,63 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:60 [ p Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a -Statement [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a +Statement [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Statement [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a -Statement [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Statement [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Statement [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a -Statement [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y -Statement [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a -Statement [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a -Statement [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a -Statement [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a -Statement [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a -Statement [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [64] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] -Statement [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [65] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] -Statement [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Statement [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ) always clobbers reg byte a -Statement [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Statement [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte a reg byte y +Statement [66] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [67] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [68] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [69] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte y Statement [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a -Statement [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ) always clobbers reg byte a -Statement [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a -Statement [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a -Statement [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a -Statement [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Statement [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] -Statement [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a -Statement [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a -Statement [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a +Statement [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] -Statement [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a -Statement [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a -Statement [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a -Statement [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a -Statement [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a -Statement [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a -Statement [109] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a -Statement [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a -Statement [116] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a -Statement [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a -Statement [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a -Statement [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a +Statement [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a +Statement [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a +Statement [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a +Statement [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a +Statement [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a +Statement [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a +Statement [109] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a +Statement [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a +Statement [116] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a +Statement [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a +Statement [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a Statement [122] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [123] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a @@ -3915,53 +3910,53 @@ Statement [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) Statement [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 [ print_byte_at::$2 print_char_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::$2 print_char_at::at#1 ] ) always clobbers reg byte a Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a -Statement [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a -Statement [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a -Statement [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y -Statement [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a -Statement [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y -Statement [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a -Statement [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a -Statement [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a -Statement [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a -Statement [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a -Statement [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a -Statement [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Statement [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a -Statement [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Statement [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ) always clobbers reg byte a -Statement [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y -Statement [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte a reg byte y +Statement [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a +Statement [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Statement [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [64] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a reg byte y +Statement [65] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a +Statement [66] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [67] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [68] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [69] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte y Statement [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a -Statement [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ) always clobbers reg byte a -Statement [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a -Statement [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a -Statement [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a -Statement [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a -Statement [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a -Statement [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a -Statement [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a -Statement [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a -Statement [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a -Statement [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a -Statement [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a -Statement [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a -Statement [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a -Statement [109] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a -Statement [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a -Statement [116] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a -Statement [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a -Statement [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a -Statement [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#1 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Statement [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a +Statement [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a +Statement [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a +Statement [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a +Statement [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a +Statement [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a +Statement [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a +Statement [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a +Statement [109] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a +Statement [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a +Statement [116] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a +Statement [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a +Statement [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a +Statement [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a Statement [122] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [123] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a @@ -3982,8 +3977,8 @@ Potential registers zp ZP_WORD:7 [ print_byte_at::at#2 print_byte_at::at#0 print Potential registers zp ZP_BYTE:9 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , Potential registers zp ZP_WORD:10 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] : zp ZP_WORD:10 , Potential registers zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] : zp ZP_BYTE:12 , reg byte x , -Potential registers zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] : zp ZP_WORD:13 , -Potential registers zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] : zp ZP_WORD:15 , +Potential registers zp ZP_WORD:13 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] : zp ZP_WORD:13 , +Potential registers zp ZP_WORD:15 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] : zp ZP_WORD:15 , Potential registers zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] : zp ZP_BYTE:17 , reg byte x , Potential registers zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] : zp ZP_BYTE:18 , reg byte x , Potential registers zp ZP_WORD:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:19 , @@ -4032,7 +4027,7 @@ Potential registers zp ZP_BYTE:91 [ init_font_hex::idx#3 ] : zp ZP_BYTE:91 , reg REGISTER UPLIFT SCOPES Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:21 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:86 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:87 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:76 [ atan2_16::return#2 ] 50: zp ZP_WORD:26 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:72 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:74 [ atan2_16::y#0 ] Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:41 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:89 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:90 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:88 [ init_font_hex::$0 ] 202: zp ZP_BYTE:91 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:36 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:38 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:33 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:35 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:65 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:66 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:69 [ init_angle_screen::$6 ] 202: zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:80 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:83 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:84 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:85 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 72.14: zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:70 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:67 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 16.29: zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] 14.83: zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:65 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:66 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:69 [ init_angle_screen::$6 ] 202: zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:80 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:83 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:84 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:85 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 84.17: zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:70 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:67 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 16.29: zp ZP_WORD:13 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] 14.83: zp ZP_WORD:15 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] Uplift Scope [print_char_at] 12: zp ZP_BYTE:9 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] 12: zp ZP_WORD:10 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Uplift Scope [print_byte_at] 9.33: zp ZP_WORD:7 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] 5.6: zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] 4: zp ZP_BYTE:59 [ print_byte_at::$0 ] 2: zp ZP_BYTE:60 [ print_byte_at::$2 ] Uplift Scope [print_word_at] 10: zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] 0.8: zp ZP_WORD:4 [ print_word_at::at#2 ] @@ -4046,20 +4041,20 @@ Uplifting [atan2_16] best 1159771 combination reg byte y [ atan2_16::shift#2 ata Limited combination testing to 100 combinations of 144 possible. Uplifting [init_font_hex] best 1140771 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:88 [ init_font_hex::$0 ] zp ZP_BYTE:91 [ init_font_hex::idx#3 ] zp ZP_WORD:36 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:38 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:33 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:35 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [init_angle_screen] best 1138771 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:80 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:84 [ init_angle_screen::$13 ] zp ZP_BYTE:85 [ init_angle_screen::$14 ] zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:70 [ init_angle_screen::yw#0 ] zp ZP_WORD:67 [ init_angle_screen::xw#0 ] zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +Uplifting [init_angle_screen] best 1138571 combination reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$6 ] zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:80 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:84 [ init_angle_screen::$13 ] zp ZP_BYTE:85 [ init_angle_screen::$14 ] zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:70 [ init_angle_screen::yw#0 ] zp ZP_WORD:67 [ init_angle_screen::xw#0 ] zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:13 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:15 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] Limited combination testing to 100 combinations of 65536 possible. -Uplifting [print_char_at] best 1138764 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:10 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] -Uplifting [print_byte_at] best 1138756 combination zp ZP_WORD:7 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] -Uplifting [print_word_at] best 1138756 combination zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] zp ZP_WORD:4 [ print_word_at::at#2 ] -Uplifting [main] best 1138756 combination zp ZP_DWORD:47 [ main::$4 ] zp ZP_DWORD:51 [ main::cyclecount#0 ] -Uplifting [clock] best 1138756 combination zp ZP_DWORD:43 [ clock::return#2 ] zp ZP_DWORD:61 [ clock::return#0 ] -Uplifting [print_dword_at] best 1138756 combination zp ZP_DWORD:55 [ print_dword_at::dw#0 ] -Uplifting [clock_start] best 1138756 combination -Uplifting [] best 1138756 combination +Uplifting [print_char_at] best 1138564 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:10 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +Uplifting [print_byte_at] best 1138556 combination zp ZP_WORD:7 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] +Uplifting [print_word_at] best 1138556 combination zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] zp ZP_WORD:4 [ print_word_at::at#2 ] +Uplifting [main] best 1138556 combination zp ZP_DWORD:47 [ main::$4 ] zp ZP_DWORD:51 [ main::cyclecount#0 ] +Uplifting [clock] best 1138556 combination zp ZP_DWORD:43 [ clock::return#2 ] zp ZP_DWORD:61 [ clock::return#0 ] +Uplifting [print_dword_at] best 1138556 combination zp ZP_DWORD:55 [ print_dword_at::dw#0 ] +Uplifting [clock_start] best 1138556 combination +Uplifting [] best 1138556 combination Attempting to uplift remaining variables inzp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 1138756 combination zp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [init_font_hex] best 1138556 combination zp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:88 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 1138756 combination zp ZP_BYTE:88 [ init_font_hex::$0 ] +Uplifting [init_font_hex] best 1138556 combination zp ZP_BYTE:88 [ init_font_hex::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:84 [ init_angle_screen::$13 ] Uplifting [init_angle_screen] best 1138156 combination reg byte a [ init_angle_screen::$13 ] Attempting to uplift remaining variables inzp ZP_BYTE:85 [ init_angle_screen::$14 ] @@ -4093,8 +4088,8 @@ Coalescing zero page register with common assignment [ zp ZP_DWORD:43 [ clock::r Coalescing zero page register with common assignment [ zp ZP_WORD:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp ZP_WORD:80 [ init_angle_screen::$10 ] ] - score: 1 Allocated (was zp ZP_WORD:10) zp ZP_WORD:7 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Allocated (was zp ZP_BYTE:12) zp ZP_BYTE:9 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Allocated (was zp ZP_WORD:13) zp ZP_WORD:10 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] -Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +Allocated (was zp ZP_WORD:13) zp ZP_WORD:10 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:14 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:15 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] Allocated (was zp ZP_WORD:19) zp ZP_WORD:16 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] @@ -4431,29 +4426,29 @@ init_angle_screen: { .label ang_w = $2b .label x = $e .label xb = $f - .label screen_topline = $a - .label screen_bottomline = $c + .label screen_topline = $c + .label screen_bottomline = $a .label y = 9 //SEG94 [50] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] b1_from_init_angle_screen: - //SEG95 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN+$28*$c - sta screen_bottomline+1 - //SEG96 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + //SEG95 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$c sta screen_topline+1 + //SEG96 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 //SEG97 [50] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 //SEG98 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] b1_from_b3: - //SEG99 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy - //SEG100 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG99 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG100 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy //SEG101 [50] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 //SEG102 init_angle_screen::@1 @@ -4512,31 +4507,31 @@ init_angle_screen: { //SEG122 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 lda _10+1 sta ang_w - //SEG123 [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 - lda #$80 - clc - adc ang_w - //SEG124 [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa - ldy x - sta (screen_topline),y - //SEG125 [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 - lda #$80 - sec - sbc ang_w - //SEG126 [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa - ldy x + //SEG123 [64] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + ldy xb sta (screen_bottomline),y - //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + //SEG124 [65] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 lda ang_w eor #$ff clc adc #1 - //SEG128 [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG125 [66] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa ldy xb sta (screen_topline),y - //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 - lda ang_w - ldy xb + //SEG126 [67] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 + clc + adc ang_w + //SEG127 [68] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG128 [69] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 + lda #$80 + sec + sbc ang_w + //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x sta (screen_bottomline),y //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc x @@ -4735,8 +4730,8 @@ atan2_16: { jmp b13 //SEG186 atan2_16::@13 b13: - //SEG187 [100] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG187 [100] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 jmp b15 //SEG188 atan2_16::@15 @@ -5142,8 +5137,10 @@ Removing instruction jmp b5 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 -Removing instruction ldy x +Removing instruction lda ang_w +Removing instruction lda ang_w Removing instruction ldy xb +Removing instruction ldy x Removing instruction lda #0 Replacing instruction ldx #0 with TAX Replacing instruction ldy #0 with TAY @@ -5252,9 +5249,9 @@ Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [374] beq b12 to bne -Fixing long branch [268] bpl b1 to bmi -Fixing long branch [280] bpl b4 to bmi +Fixing long branch [372] beq b12 to bne +Fixing long branch [266] bpl b1 to bmi +Fixing long branch [278] bpl b4 to bmi FINAL SYMBOL TABLE (label) @1 @@ -5388,16 +5385,16 @@ FINAL SYMBOL TABLE (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:43 72.14285714285714 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:43 84.16666666666666 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:20 202.0 (byte*) init_angle_screen::screen (byte*) init_angle_screen::screen_bottomline -(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:12 7.333333333333333 -(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:12 8.959999999999999 +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:10 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:10 8.959999999999999 (byte*) init_angle_screen::screen_topline -(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:10 5.5 -(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:10 9.333333333333334 +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:12 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:12 9.333333333333334 (byte) init_angle_screen::x (byte) init_angle_screen::x#1 x zp ZP_BYTE:14 101.0 (byte) init_angle_screen::x#2 x zp ZP_BYTE:14 25.25 @@ -5533,8 +5530,8 @@ zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:7 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] zp ZP_BYTE:9 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -zp ZP_WORD:10 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] -zp ZP_WORD:12 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +zp ZP_WORD:10 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +zp ZP_WORD:12 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] zp ZP_BYTE:14 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:15 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_WORD:16 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] @@ -5572,7 +5569,7 @@ reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 1045267 +Score: 1044667 //SEG0 File Comments // Calculate the angle to the center of the screen - and show it using font-hex @@ -5837,26 +5834,26 @@ init_angle_screen: { .label ang_w = $2b .label x = $e .label xb = $f - .label screen_topline = $a - .label screen_bottomline = $c + .label screen_topline = $c + .label screen_bottomline = $a .label y = 9 //SEG94 [50] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] - //SEG95 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN+$28*$c - sta screen_bottomline+1 - //SEG96 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + //SEG95 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$c sta screen_topline+1 + //SEG96 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 //SEG97 [50] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y //SEG98 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] - //SEG99 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy - //SEG100 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG99 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG100 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy //SEG101 [50] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy //SEG102 init_angle_screen::@1 b1: @@ -5907,29 +5904,27 @@ init_angle_screen: { //SEG122 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 lda _10+1 sta ang_w - //SEG123 [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 - lda #$80 - clc - adc ang_w - //SEG124 [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa - ldy x - sta (screen_topline),y - //SEG125 [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 - lda #$80 - sec - sbc ang_w - //SEG126 [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG123 [64] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + ldy xb sta (screen_bottomline),y - //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 - lda ang_w + //SEG124 [65] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 eor #$ff clc adc #1 - //SEG128 [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa - ldy xb + //SEG125 [66] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_topline),y - //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 - lda ang_w + //SEG126 [67] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 + clc + adc ang_w + //SEG127 [68] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG128 [69] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 + lda #$80 + sec + sbc ang_w + //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_bottomline),y //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc x @@ -6097,8 +6092,8 @@ atan2_16: { //SEG185 [99] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy //SEG186 atan2_16::@13 b13: - //SEG187 [100] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 - cpy #1+1 + //SEG187 [100] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 + cpy #2 bcs b14 //SEG188 atan2_16::@15 //SEG189 [101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 diff --git a/src/test/ref/screen-center-angle.sym b/src/test/ref/screen-center-angle.sym index ce4a66085..787ae24c5 100644 --- a/src/test/ref/screen-center-angle.sym +++ b/src/test/ref/screen-center-angle.sym @@ -129,16 +129,16 @@ (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:43 72.14285714285714 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:43 84.16666666666666 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:20 202.0 (byte*) init_angle_screen::screen (byte*) init_angle_screen::screen_bottomline -(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:12 7.333333333333333 -(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:12 8.959999999999999 +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:10 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:10 8.959999999999999 (byte*) init_angle_screen::screen_topline -(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:10 5.5 -(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:10 9.333333333333334 +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:12 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:12 9.333333333333334 (byte) init_angle_screen::x (byte) init_angle_screen::x#1 x zp ZP_BYTE:14 101.0 (byte) init_angle_screen::x#2 x zp ZP_BYTE:14 25.25 @@ -274,8 +274,8 @@ zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:7 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] zp ZP_BYTE:9 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -zp ZP_WORD:10 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] -zp ZP_WORD:12 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +zp ZP_WORD:10 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +zp ZP_WORD:12 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] zp ZP_BYTE:14 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:15 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_WORD:16 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] diff --git a/src/test/ref/screen-center-distance.asm b/src/test/ref/screen-center-distance.asm index 52e4cd167..8eb481dec 100644 --- a/src/test/ref/screen-center-distance.asm +++ b/src/test/ref/screen-center-distance.asm @@ -6,29 +6,170 @@ // Start of the heap used by malloc() .label HEAP_START = $c000 .label D018 = $d018 + // CIA #2 Timer A+B Value (32-bit) + .label CIA2_TIMER_AB = $dd04 + // CIA #2 Timer A Control Register + .label CIA2_TIMER_A_CONTROL = $dd0e + // CIA #2 Timer B Control Register + .label CIA2_TIMER_B_CONTROL = $dd0f + // Timer Control - Start/stop timer (0:stop, 1: start) + .const CIA_TIMER_CONTROL_START = 1 + // Timer Control - Time CONTINUOUS/ONE-SHOT (0:CONTINUOUS, 1: ONE-SHOT) + .const CIA_TIMER_CONTROL_CONTINUOUS = 0 + // Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high) + .const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 + // Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine. + // To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code. + .const CLOCKS_PER_INIT = $12 .label CHARSET = $2000 .label SCREEN = $2800 .const NUM_SQUARES = $30 .label SQUARES = malloc.return main: { + .label BASE_SCREEN = $400 + .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f + .label _4 = $21 + .label cyclecount = $21 jsr init_font_hex lda #toD0181_return sta D018 + jsr clock_start jsr init_dist_screen + jsr clock + lda cyclecount + sec + sbc #CLOCKS_PER_INIT + sta cyclecount+1 + lda cyclecount+2 + sbc #>$10 + sta cyclecount+2 + lda cyclecount+3 + sbc #>CLOCKS_PER_INIT>>$10 + sta cyclecount+3 + jsr print_dword_at + lda #toD0182_return + sta D018 + rts +} +// Print a dword as HEX at a specific position +// print_dword_at(dword zeropage($21) dw) +print_dword_at: { + .label dw = $21 + lda dw+2 + sta print_word_at.w + lda dw+3 + sta print_word_at.w+1 + lda #main.BASE_SCREEN + sta print_word_at.at+1 + jsr print_word_at + lda dw + sta print_word_at.w + lda dw+1 + sta print_word_at.w+1 + lda #main.BASE_SCREEN+4 + sta print_word_at.at+1 + jsr print_word_at + rts +} +// Print a word as HEX at a specific position +// print_word_at(word zeropage(2) w, byte* zeropage(4) at) +print_word_at: { + .label w = 2 + .label at = 4 + lda w+1 + sta print_byte_at.b + jsr print_byte_at + lda w + sta print_byte_at.b + lda print_byte_at.at + clc + adc #2 + sta print_byte_at.at + bcc !+ + inc print_byte_at.at+1 + !: + jsr print_byte_at + rts +} +// Print a byte as HEX at a specific position +// print_byte_at(byte zeropage(6) b, byte* zeropage(4) at) +print_byte_at: { + .label b = 6 + .label at = 4 + lda b + lsr + lsr + lsr + lsr + tay + ldx print_hextab,y + lda at + sta print_char_at.at + lda at+1 + sta print_char_at.at+1 + jsr print_char_at + lda #$f + and b + tay + lda at + clc + adc #1 + sta print_char_at.at + lda at+1 + adc #0 + sta print_char_at.at+1 + ldx print_hextab,y + jsr print_char_at + rts +} +// Print a single char +// print_char_at(byte register(X) ch, byte* zeropage(9) at) +print_char_at: { + .label at = 9 + txa + ldy #0 + sta (at),y + rts +} +// Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). +// This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() +clock: { + .label return = $21 + lda #<$ffffffff + sec + sbc CIA2_TIMER_AB + sta return + lda #>$ffffffff + sbc CIA2_TIMER_AB+1 + sta return+1 + lda #<$ffffffff>>$10 + sbc CIA2_TIMER_AB+2 + sta return+2 + lda #>$ffffffff>>$10 + sbc CIA2_TIMER_AB+3 + sta return+3 rts } // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision init_dist_screen: { - .label yds = $19 - .label xds = $1b - .label ds = $1b - .label x = 7 - .label xb = 9 - .label screen_topline = 3 - .label screen_bottomline = 5 - .label y = 2 + .label yds = $25 + .label xds = $27 + .label ds = $27 + .label x = $10 + .label xb = $11 + .label screen_topline = $c + .label screen_bottomline = $e + .label y = $b jsr init_squares lda #SQUARES @@ -229,8 +370,8 @@ bsearch16u: { // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $1b - .label return_2 = $19 + .label return = $27 + .label return_2 = $25 asl tay lda SQUARES,y @@ -242,8 +383,8 @@ sqr: { // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $e - .label sqr = $c + .label squares = $16 + .label sqr = $14 jsr malloc ldx #0 lda #$ffffffff + sta CIA2_TIMER_AB+1 + lda #<$ffffffff>>$10 + sta CIA2_TIMER_AB+2 + lda #>$ffffffff>>$10 + sta CIA2_TIMER_AB+3 + lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A + sta CIA2_TIMER_B_CONTROL + lda #CIA_TIMER_CONTROL_START + sta CIA2_TIMER_A_CONTROL + rts +} // Make charset from proto chars -// init_font_hex(byte* zeropage($13) charset) +// init_font_hex(byte* zeropage($1b) charset) init_font_hex: { - .label _0 = $21 - .label idx = $18 - .label proto_lo = $15 - .label charset = $13 - .label c1 = $17 - .label proto_hi = $10 - .label c = $12 + .label _0 = $2d + .label idx = $20 + .label proto_lo = $1d + .label charset = $1b + .label c1 = $1f + .label proto_hi = $18 + .label c = $1a lda #0 sta c lda #=(byte) $18) goto init_dist_screen::@2 - to:init_dist_screen::@3 -init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 - to:init_dist_screen::@4 -init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - [16] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) - [17] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - [18] call sqr - [19] (word) sqr::return#2 ← (word) sqr::return#0 - to:init_dist_screen::@10 -init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@4 - [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - to:init_dist_screen::@5 -init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@12 - [21] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 ) - [21] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 ) - [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 - [23] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 - to:init_dist_screen::@7 -init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 - to:init_dist_screen::@8 -init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 - [25] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) - [26] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - [27] call sqr - [28] (word) sqr::return#3 ← (word) sqr::return#0 - to:init_dist_screen::@11 -init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@8 - [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 - [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - [32] call sqrt - [33] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - to:init_dist_screen::@12 -init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11 - [34] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - [35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [39] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 - [40] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 - [41] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 - to:init_dist_screen::@9 -init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@12 - [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 - [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 - [44] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 - [45] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 - to:init_dist_screen::@return -init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 +print_dword_at: scope:[print_dword_at] from main::@5 + [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 + [22] call print_word_at + to:print_dword_at::@1 +print_dword_at::@1: scope:[print_dword_at] from print_dword_at + [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 + [24] call print_word_at + to:print_dword_at::@return +print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 + [25] return + to:@return +print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 + [26] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) main::BASE_SCREEN#0 print_dword_at::@1/(const byte*) main::BASE_SCREEN#0+(byte) 4 ) + [26] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) + [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 + [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 + [29] call print_byte_at + to:print_word_at::@1 +print_word_at::@1: scope:[print_word_at] from print_word_at + [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 + [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 + [32] call print_byte_at + to:print_word_at::@return +print_word_at::@return: scope:[print_word_at] from print_word_at::@1 + [33] return + to:@return +print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 + [34] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) + [34] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) + [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 + [36] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) + [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 + [38] call print_char_at + to:print_byte_at::@1 +print_byte_at::@1: scope:[print_byte_at] from print_byte_at + [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f + [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 + [41] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2) + [42] call print_char_at + to:print_byte_at::@return +print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 + [43] return + to:@return +print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 + [44] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) + [44] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) + [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 + to:print_char_at::@return +print_char_at::@return: scope:[print_char_at] from print_char_at [46] return to:@return +clock: scope:[clock] from main::@4 + [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [48] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main::@3 + [49] phi() + [50] call init_squares + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen init_dist_screen::@9 + [51] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 ) + [51] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen/(const byte*) SCREEN#0 ) + [51] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 ) + [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 + [53] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [55] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [56] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [57] call sqr + [58] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@10 +init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@4 + [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@12 + [60] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 ) + [60] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 ) + [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 + [62] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [64] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [65] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [66] call sqr + [67] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@8 + [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [71] call sqrt + [72] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@12 +init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11 + [73] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [78] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [79] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [80] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 + to:init_dist_screen::@9 +init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@12 + [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [83] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [84] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 + [85] return + to:@return init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - [47] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + [86] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 to:init_dist_screen::@8 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - [48] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + [87] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 sqrt: scope:[sqrt] from init_dist_screen::@11 - [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - [50] call bsearch16u - [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [89] call bsearch16u + [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 to:sqrt::@1 sqrt::@1: scope:[sqrt] from sqrt - [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 - [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 - [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 + [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 + [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 to:sqrt::@return sqrt::@return: scope:[sqrt] from sqrt::@1 - [56] return + [95] return to:@return bsearch16u: scope:[bsearch16u] from sqrt - [57] phi() + [96] phi() to:bsearch16u::@3 bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [58] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [58] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [59] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 + [97] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) + [97] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) + [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [62] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [101] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [63] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [64] return + [102] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [103] return to:@return bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 + [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 to:bsearch16u::@8 bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 + [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 to:bsearch16u::@return bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 + [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 to:bsearch16u::@9 bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [73] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 + [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 to:bsearch16u::@7 bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [74] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [74] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [75] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + [113] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) + [113] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) + [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [76] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) + [115] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [79] return + [118] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [80] phi() - [81] call malloc + [119] phi() + [120] call malloc to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [82] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [82] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [82] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) - [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [86] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [88] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [89] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [121] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) + [121] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) + [121] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) + [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [90] return + [129] return to:@return malloc: scope:[malloc] from init_squares - [91] phi() + [130] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc - [92] return + [131] return + to:@return +clock_start: scope:[clock_start] from main::@1 + [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [137] return to:@return init_font_hex: scope:[init_font_hex] from main - [93] phi() + [138] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [94] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [94] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) - [94] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [139] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [139] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) + [139] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [95] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [95] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) - [95] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) - [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [140] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [140] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) + [140] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) + [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [97] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [97] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [100] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [102] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [103] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [104] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [142] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [142] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [106] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [110] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [111] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [113] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [114] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [115] return + [160] return to:@return diff --git a/src/test/ref/screen-center-distance.log b/src/test/ref/screen-center-distance.log index 99ef8a105..067eb7df3 100644 --- a/src/test/ref/screen-center-distance.log +++ b/src/test/ref/screen-center-distance.log @@ -7,8 +7,11 @@ Fixing pointer increment (word*) init_squares::squares ← ++ (word*) init_squar Fixing pointer addition (word~) sqrt::$1 ← (word*) sqrt::found - (word*) SQUARES Fixing pointer array-indexing *((word*) SQUARES + (byte) sqr::val) Identified constant variable (byte*) HEAP_START +Identified constant variable (byte*) main::BASE_SCREEN +Identified constant variable (byte*) main::BASE_CHARSET Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET +Inlined call (byte~) main::$7 ← call toD018 (byte*) main::BASE_SCREEN (byte*) main::BASE_CHARSET Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 @@ -29,8 +32,31 @@ Culled Empty Block (label) @8 Culled Empty Block (label) @9 Culled Empty Block (label) @10 Culled Empty Block (label) init_font_hex::@6 -Culled Empty Block (label) main::toD0181_@1 +Culled Empty Block (label) clock::@1 Culled Empty Block (label) @12 +Culled Empty Block (label) @13 +Culled Empty Block (label) @14 +Culled Empty Block (label) @15 +Culled Empty Block (label) @16 +Culled Empty Block (label) @17 +Culled Empty Block (label) @18 +Culled Empty Block (label) @19 +Culled Empty Block (label) @20 +Culled Empty Block (label) @21 +Culled Empty Block (label) @22 +Culled Empty Block (label) @23 +Culled Empty Block (label) @24 +Culled Empty Block (label) @25 +Culled Empty Block (label) @26 +Culled Empty Block (label) @28 +Culled Empty Block (label) @29 +Culled Empty Block (label) @30 +Culled Empty Block (label) @31 +Culled Empty Block (label) @32 +Culled Empty Block (label) @33 +Culled Empty Block (label) main::toD0181_@1 +Culled Empty Block (label) main::toD0182_@1 +Culled Empty Block (label) @35 Culled Empty Block (label) init_dist_screen::@13 Culled Empty Block (label) init_dist_screen::@14 Culled Empty Block (label) init_dist_screen::@9 @@ -139,12 +165,12 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return @3: scope:[] from @begin - (byte*) heap_head#31 ← phi( @begin/(byte*) heap_head#0 ) + (byte*) heap_head#43 ← phi( @begin/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 to:@6 init_squares: scope:[init_squares] from init_dist_screen - (byte*) heap_head#19 ← phi( init_dist_screen/(byte*) heap_head#22 ) + (byte*) heap_head#19 ← phi( init_dist_screen/(byte*) heap_head#23 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) (byte~) init_squares::$0 ← (byte) NUM_SQUARES#6 * (const byte) SIZEOF_WORD (word) malloc::size#0 ← (byte~) init_squares::$0 @@ -223,10 +249,18 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 return to:@return @6: scope:[] from @3 - (word*) SQUARES#32 ← phi( @3/(word*) SQUARES#0 ) - (byte*) heap_head#28 ← phi( @3/(byte*) heap_head#31 ) - (byte) NUM_SQUARES#21 ← phi( @3/(byte) NUM_SQUARES#0 ) + (word*) SQUARES#43 ← phi( @3/(word*) SQUARES#0 ) + (byte*) heap_head#38 ← phi( @3/(byte*) heap_head#43 ) + (byte) NUM_SQUARES#32 ← phi( @3/(byte) NUM_SQUARES#0 ) (byte*) D018#0 ← ((byte*)) (number) $d018 + (dword*) CIA2_TIMER_AB#0 ← ((dword*)) (number) $dd04 + (byte*) CIA2_TIMER_A_CONTROL#0 ← ((byte*)) (number) $dd0e + (byte*) CIA2_TIMER_B_CONTROL#0 ← ((byte*)) (number) $dd0f + (byte) CIA_TIMER_CONTROL_STOP#0 ← (number) 0 + (byte) CIA_TIMER_CONTROL_START#0 ← (number) 1 + (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 ← (number) 0 + (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (number) 0 + (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (number) $40 to:@11 init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) @@ -298,33 +332,146 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 return to:@return @11: scope:[] from @6 - (word*) SQUARES#31 ← phi( @6/(word*) SQUARES#32 ) - (byte*) heap_head#27 ← phi( @6/(byte*) heap_head#28 ) - (byte) NUM_SQUARES#20 ← phi( @6/(byte) NUM_SQUARES#21 ) + (word*) SQUARES#39 ← phi( @6/(word*) SQUARES#43 ) + (byte*) heap_head#34 ← phi( @6/(byte*) heap_head#38 ) + (byte) NUM_SQUARES#28 ← phi( @6/(byte) NUM_SQUARES#32 ) (byte[]) FONT_HEX_PROTO#0 ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 } + (dword) CLOCKS_PER_INIT#0 ← (number) $12 + to:@27 +clock: scope:[clock] from main::@5 + (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) + (dword) clock::return#0 ← (number~) clock::$0 + to:clock::@return +clock::@return: scope:[clock] from clock + (dword) clock::return#3 ← phi( clock/(dword) clock::return#0 ) + (dword) clock::return#1 ← (dword) clock::return#3 + return + to:@return +clock_start: scope:[clock_start] from main::@1 + (byte~) clock_start::$0 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 + *((byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$1 + (byte~) clock_start::$2 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + (byte~) clock_start::$3 ← (byte~) clock_start::$2 | (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + *((byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$3 + *((dword*) CIA2_TIMER_AB#0) ← (number) $ffffffff + (byte~) clock_start::$4 ← (byte) CIA_TIMER_CONTROL_START#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + (byte~) clock_start::$5 ← (byte~) clock_start::$4 | (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + *((byte*) CIA2_TIMER_B_CONTROL#0) ← (byte~) clock_start::$5 + (byte~) clock_start::$6 ← (byte) CIA_TIMER_CONTROL_START#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + (byte~) clock_start::$7 ← (byte~) clock_start::$6 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 + *((byte*) CIA2_TIMER_A_CONTROL#0) ← (byte~) clock_start::$7 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + return + to:@return +print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 + (byte*) print_word_at::at#2 ← phi( print_dword_at/(byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) + (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) + (byte~) print_word_at::$0 ← > (word) print_word_at::w#2 + (byte) print_byte_at::b#0 ← (byte~) print_word_at::$0 + (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 + call print_byte_at + to:print_word_at::@1 +print_word_at::@1: scope:[print_word_at] from print_word_at + (byte*) print_word_at::at#3 ← phi( print_word_at/(byte*) print_word_at::at#2 ) + (word) print_word_at::w#3 ← phi( print_word_at/(word) print_word_at::w#2 ) + (byte~) print_word_at::$2 ← < (word) print_word_at::w#3 + (byte*~) print_word_at::$3 ← (byte*) print_word_at::at#3 + (number) 2 + (byte) print_byte_at::b#1 ← (byte~) print_word_at::$2 + (byte*) print_byte_at::at#1 ← (byte*~) print_word_at::$3 + call print_byte_at + to:print_word_at::@2 +print_word_at::@2: scope:[print_word_at] from print_word_at::@1 + to:print_word_at::@return +print_word_at::@return: scope:[print_word_at] from print_word_at::@2 + return + to:@return +print_dword_at: scope:[print_dword_at] from main::@6 + (byte*) print_dword_at::at#1 ← phi( main::@6/(byte*) print_dword_at::at#0 ) + (dword) print_dword_at::dw#1 ← phi( main::@6/(dword) print_dword_at::dw#0 ) + (word~) print_dword_at::$0 ← > (dword) print_dword_at::dw#1 + (word) print_word_at::w#0 ← (word~) print_dword_at::$0 + (byte*) print_word_at::at#0 ← (byte*) print_dword_at::at#1 + call print_word_at + to:print_dword_at::@1 +print_dword_at::@1: scope:[print_dword_at] from print_dword_at + (byte*) print_dword_at::at#2 ← phi( print_dword_at/(byte*) print_dword_at::at#1 ) + (dword) print_dword_at::dw#2 ← phi( print_dword_at/(dword) print_dword_at::dw#1 ) + (word~) print_dword_at::$2 ← < (dword) print_dword_at::dw#2 + (byte*~) print_dword_at::$3 ← (byte*) print_dword_at::at#2 + (number) 4 + (word) print_word_at::w#1 ← (word~) print_dword_at::$2 + (byte*) print_word_at::at#1 ← (byte*~) print_dword_at::$3 + call print_word_at + to:print_dword_at::@2 +print_dword_at::@2: scope:[print_dword_at] from print_dword_at::@1 + to:print_dword_at::@return +print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 + return + to:@return +@27: scope:[] from @11 + (word*) SQUARES#34 ← phi( @11/(word*) SQUARES#39 ) + (byte*) heap_head#30 ← phi( @11/(byte*) heap_head#34 ) + (byte) NUM_SQUARES#23 ← phi( @11/(byte) NUM_SQUARES#28 ) + (byte[]) print_hextab#0 ← (const string) $0 + to:@34 +print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 + (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) + (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) + (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (number) 4 + (byte) print_char_at::ch#0 ← *((byte[]) print_hextab#0 + (byte~) print_byte_at::$0) + (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 + call print_char_at + to:print_byte_at::@1 +print_byte_at::@1: scope:[print_byte_at] from print_byte_at + (byte*) print_byte_at::at#3 ← phi( print_byte_at/(byte*) print_byte_at::at#2 ) + (byte) print_byte_at::b#3 ← phi( print_byte_at/(byte) print_byte_at::b#2 ) + (number~) print_byte_at::$2 ← (byte) print_byte_at::b#3 & (number) $f + (byte*~) print_byte_at::$3 ← (byte*) print_byte_at::at#3 + (number) 1 + (byte) print_char_at::ch#1 ← *((byte[]) print_hextab#0 + (number~) print_byte_at::$2) + (byte*) print_char_at::at#1 ← (byte*~) print_byte_at::$3 + call print_char_at + to:print_byte_at::@2 +print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 + to:print_byte_at::@return +print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 + return + to:@return +print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 + (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) + (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) + *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 + to:print_char_at::@return +print_char_at::@return: scope:[print_char_at] from print_char_at + return + to:@return +@34: scope:[] from @27 + (word*) SQUARES#33 ← phi( @27/(word*) SQUARES#34 ) + (byte*) heap_head#29 ← phi( @27/(byte*) heap_head#30 ) + (byte) NUM_SQUARES#22 ← phi( @27/(byte) NUM_SQUARES#23 ) (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 - to:@13 -main: scope:[main] from @13 - (word*) SQUARES#38 ← phi( @13/(word*) SQUARES#24 ) - (byte*) heap_head#34 ← phi( @13/(byte*) heap_head#24 ) - (byte) NUM_SQUARES#27 ← phi( @13/(byte) NUM_SQUARES#16 ) + to:@36 +main: scope:[main] from @36 + (word*) SQUARES#46 ← phi( @36/(word*) SQUARES#25 ) + (byte*) heap_head#44 ← phi( @36/(byte*) heap_head#25 ) + (byte) NUM_SQUARES#36 ← phi( @36/(byte) NUM_SQUARES#17 ) (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex - to:main::@2 -main::@2: scope:[main] from main - (word*) SQUARES#36 ← phi( main/(word*) SQUARES#38 ) - (byte*) heap_head#32 ← phi( main/(byte*) heap_head#34 ) - (byte) NUM_SQUARES#25 ← phi( main/(byte) NUM_SQUARES#27 ) + to:main::@3 +main::@3: scope:[main] from main + (word*) SQUARES#44 ← phi( main/(word*) SQUARES#46 ) + (byte*) heap_head#39 ← phi( main/(byte*) heap_head#44 ) + (byte) NUM_SQUARES#33 ← phi( main/(byte) NUM_SQUARES#36 ) (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0 (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0 to:main::toD0181 -main::toD0181: scope:[main] from main::@2 - (word*) SQUARES#33 ← phi( main::@2/(word*) SQUARES#36 ) - (byte*) heap_head#29 ← phi( main::@2/(byte*) heap_head#32 ) - (byte) NUM_SQUARES#22 ← phi( main::@2/(byte) NUM_SQUARES#25 ) - (byte*) main::toD0181_gfx#1 ← phi( main::@2/(byte*) main::toD0181_gfx#0 ) - (byte*) main::toD0181_screen#1 ← phi( main::@2/(byte*) main::toD0181_screen#0 ) +main::toD0181: scope:[main] from main::@3 + (word*) SQUARES#40 ← phi( main::@3/(word*) SQUARES#44 ) + (byte*) heap_head#35 ← phi( main::@3/(byte*) heap_head#39 ) + (byte) NUM_SQUARES#29 ← phi( main::@3/(byte) NUM_SQUARES#33 ) + (byte*) main::toD0181_gfx#1 ← phi( main::@3/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main::@3/(byte*) main::toD0181_screen#0 ) (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4 @@ -337,48 +484,109 @@ main::toD0181: scope:[main] from main::@2 (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0 to:main::toD0181_@return main::toD0181_@return: scope:[main] from main::toD0181 - (word*) SQUARES#25 ← phi( main::toD0181/(word*) SQUARES#33 ) - (byte*) heap_head#25 ← phi( main::toD0181/(byte*) heap_head#29 ) - (byte) NUM_SQUARES#17 ← phi( main::toD0181/(byte) NUM_SQUARES#22 ) + (word*) SQUARES#35 ← phi( main::toD0181/(word*) SQUARES#40 ) + (byte*) heap_head#31 ← phi( main::toD0181/(byte*) heap_head#35 ) + (byte) NUM_SQUARES#24 ← phi( main::toD0181/(byte) NUM_SQUARES#29 ) (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 to:main::@1 main::@1: scope:[main] from main::toD0181_@return - (word*) SQUARES#21 ← phi( main::toD0181_@return/(word*) SQUARES#25 ) - (byte*) heap_head#21 ← phi( main::toD0181_@return/(byte*) heap_head#25 ) - (byte) NUM_SQUARES#14 ← phi( main::toD0181_@return/(byte) NUM_SQUARES#17 ) + (word*) SQUARES#26 ← phi( main::toD0181_@return/(word*) SQUARES#35 ) + (byte*) heap_head#26 ← phi( main::toD0181_@return/(byte*) heap_head#31 ) + (byte) NUM_SQUARES#18 ← phi( main::toD0181_@return/(byte) NUM_SQUARES#24 ) (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) (byte~) main::$1 ← (byte) main::toD0181_return#3 *((byte*) D018#0) ← (byte~) main::$1 + call clock_start + to:main::@4 +main::@4: scope:[main] from main::@1 + (word*) SQUARES#21 ← phi( main::@1/(word*) SQUARES#26 ) + (byte*) heap_head#21 ← phi( main::@1/(byte*) heap_head#26 ) + (byte) NUM_SQUARES#14 ← phi( main::@1/(byte) NUM_SQUARES#18 ) (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN#0 call init_dist_screen - to:main::@3 -main::@3: scope:[main] from main::@1 - (word*) SQUARES#12 ← phi( main::@1/(word*) SQUARES#6 ) - (byte*) heap_head#14 ← phi( main::@1/(byte*) heap_head#8 ) - (byte) NUM_SQUARES#9 ← phi( main::@1/(byte) NUM_SQUARES#4 ) + to:main::@5 +main::@5: scope:[main] from main::@4 + (word*) SQUARES#12 ← phi( main::@4/(word*) SQUARES#6 ) + (byte*) heap_head#14 ← phi( main::@4/(byte*) heap_head#8 ) + (byte) NUM_SQUARES#9 ← phi( main::@4/(byte) NUM_SQUARES#4 ) (byte) NUM_SQUARES#1 ← (byte) NUM_SQUARES#9 (byte*) heap_head#5 ← (byte*) heap_head#14 (word*) SQUARES#3 ← (word*) SQUARES#12 + call clock + (dword) clock::return#2 ← (dword) clock::return#1 + to:main::@6 +main::@6: scope:[main] from main::@5 + (word*) SQUARES#45 ← phi( main::@5/(word*) SQUARES#3 ) + (byte*) heap_head#40 ← phi( main::@5/(byte*) heap_head#5 ) + (byte) NUM_SQUARES#34 ← phi( main::@5/(byte) NUM_SQUARES#1 ) + (dword) clock::return#4 ← phi( main::@5/(dword) clock::return#2 ) + (dword~) main::$4 ← (dword) clock::return#4 + (dword~) main::$5 ← (dword~) main::$4 - (dword) CLOCKS_PER_INIT#0 + (dword) main::cyclecount#0 ← (dword~) main::$5 + (byte*) main::BASE_SCREEN#0 ← ((byte*)) (number) $400 + (byte*) main::BASE_CHARSET#0 ← ((byte*)) (number) $1000 + (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 + (byte*) print_dword_at::at#0 ← (byte*) main::BASE_SCREEN#0 + call print_dword_at + to:main::@7 +main::@7: scope:[main] from main::@6 + (word*) SQUARES#41 ← phi( main::@6/(word*) SQUARES#45 ) + (byte*) heap_head#36 ← phi( main::@6/(byte*) heap_head#40 ) + (byte) NUM_SQUARES#30 ← phi( main::@6/(byte) NUM_SQUARES#34 ) + (byte*) main::toD0182_screen#0 ← (byte*) main::BASE_SCREEN#0 + (byte*) main::toD0182_gfx#0 ← (byte*) main::BASE_CHARSET#0 + to:main::toD0182 +main::toD0182: scope:[main] from main::@7 + (word*) SQUARES#36 ← phi( main::@7/(word*) SQUARES#41 ) + (byte*) heap_head#32 ← phi( main::@7/(byte*) heap_head#36 ) + (byte) NUM_SQUARES#25 ← phi( main::@7/(byte) NUM_SQUARES#30 ) + (byte*) main::toD0182_gfx#1 ← phi( main::@7/(byte*) main::toD0182_gfx#0 ) + (byte*) main::toD0182_screen#1 ← phi( main::@7/(byte*) main::toD0182_screen#0 ) + (word~) main::toD0182_$0#0 ← ((word)) (byte*) main::toD0182_screen#1 + (number~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (number) $3fff + (number~) main::toD0182_$2#0 ← (number~) main::toD0182_$1#0 * (number) 4 + (number~) main::toD0182_$3#0 ← > (number~) main::toD0182_$2#0 + (word~) main::toD0182_$4#0 ← ((word)) (byte*) main::toD0182_gfx#1 + (byte~) main::toD0182_$5#0 ← > (word~) main::toD0182_$4#0 + (number~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (number) 4 + (number~) main::toD0182_$7#0 ← (number~) main::toD0182_$6#0 & (number) $f + (number~) main::toD0182_$8#0 ← (number~) main::toD0182_$3#0 | (number~) main::toD0182_$7#0 + (byte) main::toD0182_return#0 ← (number~) main::toD0182_$8#0 + to:main::toD0182_@return +main::toD0182_@return: scope:[main] from main::toD0182 + (word*) SQUARES#27 ← phi( main::toD0182/(word*) SQUARES#36 ) + (byte*) heap_head#27 ← phi( main::toD0182/(byte*) heap_head#32 ) + (byte) NUM_SQUARES#19 ← phi( main::toD0182/(byte) NUM_SQUARES#25 ) + (byte) main::toD0182_return#2 ← phi( main::toD0182/(byte) main::toD0182_return#0 ) + (byte) main::toD0182_return#1 ← (byte) main::toD0182_return#2 + to:main::@2 +main::@2: scope:[main] from main::toD0182_@return + (word*) SQUARES#22 ← phi( main::toD0182_@return/(word*) SQUARES#27 ) + (byte*) heap_head#22 ← phi( main::toD0182_@return/(byte*) heap_head#27 ) + (byte) NUM_SQUARES#15 ← phi( main::toD0182_@return/(byte) NUM_SQUARES#19 ) + (byte) main::toD0182_return#3 ← phi( main::toD0182_@return/(byte) main::toD0182_return#1 ) + (byte~) main::$7 ← (byte) main::toD0182_return#3 + *((byte*) D018#0) ← (byte~) main::$7 to:main::@return -main::@return: scope:[main] from main::@3 - (word*) SQUARES#13 ← phi( main::@3/(word*) SQUARES#3 ) - (byte*) heap_head#15 ← phi( main::@3/(byte*) heap_head#5 ) - (byte) NUM_SQUARES#10 ← phi( main::@3/(byte) NUM_SQUARES#1 ) +main::@return: scope:[main] from main::@2 + (word*) SQUARES#13 ← phi( main::@2/(word*) SQUARES#22 ) + (byte*) heap_head#15 ← phi( main::@2/(byte*) heap_head#22 ) + (byte) NUM_SQUARES#10 ← phi( main::@2/(byte) NUM_SQUARES#15 ) (byte) NUM_SQUARES#2 ← (byte) NUM_SQUARES#10 (byte*) heap_head#6 ← (byte*) heap_head#15 (word*) SQUARES#4 ← (word*) SQUARES#13 return to:@return -init_dist_screen: scope:[init_dist_screen] from main::@1 - (byte*) init_dist_screen::screen#2 ← phi( main::@1/(byte*) init_dist_screen::screen#0 ) - (word*) SQUARES#22 ← phi( main::@1/(word*) SQUARES#21 ) - (byte*) heap_head#22 ← phi( main::@1/(byte*) heap_head#21 ) +init_dist_screen: scope:[init_dist_screen] from main::@4 + (byte*) init_dist_screen::screen#2 ← phi( main::@4/(byte*) init_dist_screen::screen#0 ) + (word*) SQUARES#23 ← phi( main::@4/(word*) SQUARES#21 ) + (byte*) heap_head#23 ← phi( main::@4/(byte*) heap_head#21 ) (byte) NUM_SQUARES#3 ← (number) $30 call init_squares to:init_dist_screen::@15 init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen - (byte) NUM_SQUARES#33 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) + (byte) NUM_SQUARES#41 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) (byte*) init_dist_screen::screen#1 ← phi( init_dist_screen/(byte*) init_dist_screen::screen#2 ) (word*) SQUARES#14 ← phi( init_dist_screen/(word*) SQUARES#2 ) (byte*) heap_head#16 ← phi( init_dist_screen/(byte*) heap_head#4 ) @@ -390,11 +598,11 @@ init_dist_screen::@15: scope:[init_dist_screen] from init_dist_screen (byte) init_dist_screen::y#0 ← (byte) 0 to:init_dist_screen::@1 init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@15 - (byte*) heap_head#42 ← phi( init_dist_screen::@11/(byte*) heap_head#23 init_dist_screen::@15/(byte*) heap_head#7 ) + (byte*) heap_head#50 ← phi( init_dist_screen::@11/(byte*) heap_head#24 init_dist_screen::@15/(byte*) heap_head#7 ) (byte*) init_dist_screen::screen_bottomline#13 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_bottomline#0 ) (byte*) init_dist_screen::screen_topline#13 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@15/(byte*) init_dist_screen::screen_topline#0 ) - (byte) NUM_SQUARES#32 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#15 init_dist_screen::@15/(byte) NUM_SQUARES#33 ) - (word*) SQUARES#34 ← phi( init_dist_screen::@11/(word*) SQUARES#23 init_dist_screen::@15/(word*) SQUARES#5 ) + (byte) NUM_SQUARES#40 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#16 init_dist_screen::@15/(byte) NUM_SQUARES#41 ) + (word*) SQUARES#37 ← phi( init_dist_screen::@11/(word*) SQUARES#24 init_dist_screen::@15/(word*) SQUARES#5 ) (byte) init_dist_screen::y#2 ← phi( init_dist_screen::@11/(byte) init_dist_screen::y#1 init_dist_screen::@15/(byte) init_dist_screen::y#0 ) (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 (byte) init_dist_screen::y2#0 ← (number~) init_dist_screen::$2 @@ -402,34 +610,34 @@ init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_ if((bool~) init_dist_screen::$3) goto init_dist_screen::@2 to:init_dist_screen::@3 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#40 ← phi( init_dist_screen::@1/(byte*) heap_head#42 ) + (byte*) heap_head#48 ← phi( init_dist_screen::@1/(byte*) heap_head#50 ) (byte) init_dist_screen::y#12 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#13 ) (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#30 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#32 ) - (word*) SQUARES#26 ← phi( init_dist_screen::@1/(word*) SQUARES#34 ) + (byte) NUM_SQUARES#38 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#40 ) + (word*) SQUARES#28 ← phi( init_dist_screen::@1/(word*) SQUARES#37 ) (byte) init_dist_screen::y2#1 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 (number~) init_dist_screen::$7 ← (number~) init_dist_screen::$6 to:init_dist_screen::@4 init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#41 ← phi( init_dist_screen::@1/(byte*) heap_head#42 ) + (byte*) heap_head#49 ← phi( init_dist_screen::@1/(byte*) heap_head#50 ) (byte) init_dist_screen::y#13 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#13 ) (byte*) init_dist_screen::screen_topline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#32 ) - (word*) SQUARES#27 ← phi( init_dist_screen::@1/(word*) SQUARES#34 ) + (byte) NUM_SQUARES#39 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#40 ) + (word*) SQUARES#29 ← phi( init_dist_screen::@1/(word*) SQUARES#37 ) (byte) init_dist_screen::y2#2 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 (number~) init_dist_screen::$5 ← (number~) init_dist_screen::$4 to:init_dist_screen::@4 init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - (byte*) heap_head#39 ← phi( init_dist_screen::@2/(byte*) heap_head#40 init_dist_screen::@3/(byte*) heap_head#41 ) + (byte*) heap_head#47 ← phi( init_dist_screen::@2/(byte*) heap_head#48 init_dist_screen::@3/(byte*) heap_head#49 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#12 init_dist_screen::@3/(byte) init_dist_screen::y#13 ) (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (byte) NUM_SQUARES#29 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#30 init_dist_screen::@3/(byte) NUM_SQUARES#31 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#26 init_dist_screen::@3/(word*) SQUARES#27 ) + (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#38 init_dist_screen::@3/(byte) NUM_SQUARES#39 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#28 init_dist_screen::@3/(word*) SQUARES#29 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(number~) init_dist_screen::$7 init_dist_screen::@3/(number~) init_dist_screen::$5 ) (byte) init_dist_screen::yd#0 ← (number~) init_dist_screen::$8 (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 @@ -437,12 +645,12 @@ init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_d (word) sqr::return#2 ← (word) sqr::return#1 to:init_dist_screen::@16 init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 - (byte*) heap_head#38 ← phi( init_dist_screen::@4/(byte*) heap_head#39 ) + (byte*) heap_head#46 ← phi( init_dist_screen::@4/(byte*) heap_head#47 ) (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@4/(byte) init_dist_screen::y#11 ) (byte*) init_dist_screen::screen_bottomline#9 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_bottomline#10 ) (byte*) init_dist_screen::screen_topline#9 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#28 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#29 ) - (word*) SQUARES#37 ← phi( init_dist_screen::@4/(word*) SQUARES#18 ) + (byte) NUM_SQUARES#35 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#37 ) + (word*) SQUARES#42 ← phi( init_dist_screen::@4/(word*) SQUARES#18 ) (word) sqr::return#5 ← phi( init_dist_screen::@4/(word) sqr::return#2 ) (word~) init_dist_screen::$9 ← (word) sqr::return#5 (word) init_dist_screen::yds#0 ← (word~) init_dist_screen::$9 @@ -450,14 +658,14 @@ init_dist_screen::@16: scope:[init_dist_screen] from init_dist_screen::@4 (byte) init_dist_screen::xb#0 ← (number) $27 to:init_dist_screen::@5 init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_dist_screen::@18 - (byte*) heap_head#37 ← phi( init_dist_screen::@16/(byte*) heap_head#38 init_dist_screen::@18/(byte*) heap_head#26 ) + (byte*) heap_head#45 ← phi( init_dist_screen::@16/(byte*) heap_head#46 init_dist_screen::@18/(byte*) heap_head#28 ) (byte) init_dist_screen::y#9 ← phi( init_dist_screen::@16/(byte) init_dist_screen::y#10 init_dist_screen::@18/(byte) init_dist_screen::y#4 ) (byte) init_dist_screen::xb#7 ← phi( init_dist_screen::@16/(byte) init_dist_screen::xb#0 init_dist_screen::@18/(byte) init_dist_screen::xb#1 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@16/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@18/(byte*) init_dist_screen::screen_bottomline#2 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@16/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@18/(byte*) init_dist_screen::screen_topline#2 ) - (byte) NUM_SQUARES#26 ← phi( init_dist_screen::@16/(byte) NUM_SQUARES#28 init_dist_screen::@18/(byte) NUM_SQUARES#19 ) + (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@16/(byte) NUM_SQUARES#35 init_dist_screen::@18/(byte) NUM_SQUARES#21 ) (word) init_dist_screen::yds#5 ← phi( init_dist_screen::@16/(word) init_dist_screen::yds#0 init_dist_screen::@18/(word) init_dist_screen::yds#6 ) - (word*) SQUARES#35 ← phi( init_dist_screen::@16/(word*) SQUARES#37 init_dist_screen::@18/(word*) SQUARES#30 ) + (word*) SQUARES#38 ← phi( init_dist_screen::@16/(word*) SQUARES#42 init_dist_screen::@18/(word*) SQUARES#32 ) (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@16/(byte) init_dist_screen::x#0 init_dist_screen::@18/(byte) init_dist_screen::x#1 ) (number~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 * (number) 2 (byte) init_dist_screen::x2#0 ← (number~) init_dist_screen::$10 @@ -465,43 +673,43 @@ init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@16 init_ if((bool~) init_dist_screen::$11) goto init_dist_screen::@6 to:init_dist_screen::@7 init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - (byte*) heap_head#35 ← phi( init_dist_screen::@5/(byte*) heap_head#37 ) + (byte*) heap_head#41 ← phi( init_dist_screen::@5/(byte*) heap_head#45 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#9 ) (byte) init_dist_screen::xb#5 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#6 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#8 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) (byte*) init_dist_screen::screen_topline#6 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#8 ) - (byte) NUM_SQUARES#23 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#26 ) + (byte) NUM_SQUARES#26 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#31 ) (word) init_dist_screen::yds#3 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#28 ← phi( init_dist_screen::@5/(word*) SQUARES#35 ) + (word*) SQUARES#30 ← phi( init_dist_screen::@5/(word*) SQUARES#38 ) (byte) init_dist_screen::x2#1 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$14 ← (byte) init_dist_screen::x2#1 - (number) $27 (number~) init_dist_screen::$15 ← (number~) init_dist_screen::$14 to:init_dist_screen::@8 init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - (byte*) heap_head#36 ← phi( init_dist_screen::@5/(byte*) heap_head#37 ) + (byte*) heap_head#42 ← phi( init_dist_screen::@5/(byte*) heap_head#45 ) (byte) init_dist_screen::y#8 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#9 ) (byte) init_dist_screen::xb#6 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#8 ) (byte) init_dist_screen::x#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#8 ) - (byte) NUM_SQUARES#24 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#26 ) + (byte) NUM_SQUARES#27 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#31 ) (word) init_dist_screen::yds#4 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#29 ← phi( init_dist_screen::@5/(word*) SQUARES#35 ) + (word*) SQUARES#31 ← phi( init_dist_screen::@5/(word*) SQUARES#38 ) (byte) init_dist_screen::x2#2 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$12 ← (number) $27 - (byte) init_dist_screen::x2#2 (number~) init_dist_screen::$13 ← (number~) init_dist_screen::$12 to:init_dist_screen::@8 init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 - (byte*) heap_head#33 ← phi( init_dist_screen::@6/(byte*) heap_head#35 init_dist_screen::@7/(byte*) heap_head#36 ) + (byte*) heap_head#37 ← phi( init_dist_screen::@6/(byte*) heap_head#41 init_dist_screen::@7/(byte*) heap_head#42 ) (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#7 init_dist_screen::@7/(byte) init_dist_screen::y#8 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#5 init_dist_screen::@7/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#7 ) (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#6 init_dist_screen::@7/(byte) init_dist_screen::x#7 ) (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#7 ) - (byte) NUM_SQUARES#18 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#23 init_dist_screen::@7/(byte) NUM_SQUARES#24 ) + (byte) NUM_SQUARES#20 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#26 init_dist_screen::@7/(byte) NUM_SQUARES#27 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#3 init_dist_screen::@7/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#28 init_dist_screen::@7/(word*) SQUARES#29 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#30 init_dist_screen::@7/(word*) SQUARES#31 ) (number~) init_dist_screen::$16 ← phi( init_dist_screen::@6/(number~) init_dist_screen::$15 init_dist_screen::@7/(number~) init_dist_screen::$13 ) (byte) init_dist_screen::xd#0 ← (number~) init_dist_screen::$16 (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 @@ -509,13 +717,13 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_d (word) sqr::return#3 ← (word) sqr::return#1 to:init_dist_screen::@17 init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 - (byte*) heap_head#30 ← phi( init_dist_screen::@8/(byte*) heap_head#33 ) + (byte*) heap_head#33 ← phi( init_dist_screen::@8/(byte*) heap_head#37 ) (byte) init_dist_screen::y#5 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#6 ) (byte) init_dist_screen::xb#3 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#4 ) (byte*) init_dist_screen::screen_bottomline#4 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#5 ) (byte) init_dist_screen::x#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#5 ) (byte*) init_dist_screen::screen_topline#4 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#5 ) - (byte) NUM_SQUARES#13 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#18 ) + (byte) NUM_SQUARES#13 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#20 ) (word*) SQUARES#20 ← phi( init_dist_screen::@8/(word*) SQUARES#19 ) (word) init_dist_screen::yds#1 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#2 ) (word) sqr::return#6 ← phi( init_dist_screen::@8/(word) sqr::return#3 ) @@ -529,9 +737,9 @@ init_dist_screen::@17: scope:[init_dist_screen] from init_dist_screen::@8 to:init_dist_screen::@18 init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 (word) init_dist_screen::yds#6 ← phi( init_dist_screen::@17/(word) init_dist_screen::yds#1 ) - (word*) SQUARES#30 ← phi( init_dist_screen::@17/(word*) SQUARES#20 ) - (byte*) heap_head#26 ← phi( init_dist_screen::@17/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#19 ← phi( init_dist_screen::@17/(byte) NUM_SQUARES#13 ) + (word*) SQUARES#32 ← phi( init_dist_screen::@17/(word*) SQUARES#20 ) + (byte*) heap_head#28 ← phi( init_dist_screen::@17/(byte*) heap_head#33 ) + (byte) NUM_SQUARES#21 ← phi( init_dist_screen::@17/(byte) NUM_SQUARES#13 ) (byte) init_dist_screen::y#4 ← phi( init_dist_screen::@17/(byte) init_dist_screen::y#5 ) (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@17/(byte) init_dist_screen::xb#3 ) (byte*) init_dist_screen::screen_bottomline#2 ← phi( init_dist_screen::@17/(byte*) init_dist_screen::screen_bottomline#4 ) @@ -550,9 +758,9 @@ init_dist_screen::@18: scope:[init_dist_screen] from init_dist_screen::@17 if((bool~) init_dist_screen::$20) goto init_dist_screen::@5 to:init_dist_screen::@11 init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 - (word*) SQUARES#23 ← phi( init_dist_screen::@18/(word*) SQUARES#30 ) - (byte*) heap_head#23 ← phi( init_dist_screen::@18/(byte*) heap_head#26 ) - (byte) NUM_SQUARES#15 ← phi( init_dist_screen::@18/(byte) NUM_SQUARES#19 ) + (word*) SQUARES#24 ← phi( init_dist_screen::@18/(word*) SQUARES#32 ) + (byte*) heap_head#24 ← phi( init_dist_screen::@18/(byte*) heap_head#28 ) + (byte) NUM_SQUARES#16 ← phi( init_dist_screen::@18/(byte) NUM_SQUARES#21 ) (byte) init_dist_screen::y#3 ← phi( init_dist_screen::@18/(byte) init_dist_screen::y#4 ) (byte*) init_dist_screen::screen_bottomline#3 ← phi( init_dist_screen::@18/(byte*) init_dist_screen::screen_bottomline#2 ) (byte*) init_dist_screen::screen_topline#3 ← phi( init_dist_screen::@18/(byte*) init_dist_screen::screen_topline#2 ) @@ -563,40 +771,61 @@ init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@18 if((bool~) init_dist_screen::$21) goto init_dist_screen::@1 to:init_dist_screen::@return init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 - (word*) SQUARES#15 ← phi( init_dist_screen::@11/(word*) SQUARES#23 ) - (byte*) heap_head#17 ← phi( init_dist_screen::@11/(byte*) heap_head#23 ) - (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#15 ) + (word*) SQUARES#15 ← phi( init_dist_screen::@11/(word*) SQUARES#24 ) + (byte*) heap_head#17 ← phi( init_dist_screen::@11/(byte*) heap_head#24 ) + (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@11/(byte) NUM_SQUARES#16 ) (byte) NUM_SQUARES#4 ← (byte) NUM_SQUARES#11 (byte*) heap_head#8 ← (byte*) heap_head#17 (word*) SQUARES#6 ← (word*) SQUARES#15 return to:@return -@13: scope:[] from @11 - (word*) SQUARES#24 ← phi( @11/(word*) SQUARES#31 ) - (byte*) heap_head#24 ← phi( @11/(byte*) heap_head#27 ) - (byte) NUM_SQUARES#16 ← phi( @11/(byte) NUM_SQUARES#20 ) +@36: scope:[] from @34 + (word*) SQUARES#25 ← phi( @34/(word*) SQUARES#33 ) + (byte*) heap_head#25 ← phi( @34/(byte*) heap_head#29 ) + (byte) NUM_SQUARES#17 ← phi( @34/(byte) NUM_SQUARES#22 ) call main - to:@14 -@14: scope:[] from @13 - (word*) SQUARES#16 ← phi( @13/(word*) SQUARES#4 ) - (byte*) heap_head#18 ← phi( @13/(byte*) heap_head#6 ) - (byte) NUM_SQUARES#12 ← phi( @13/(byte) NUM_SQUARES#2 ) + to:@37 +@37: scope:[] from @36 + (word*) SQUARES#16 ← phi( @36/(word*) SQUARES#4 ) + (byte*) heap_head#18 ← phi( @36/(byte*) heap_head#6 ) + (byte) NUM_SQUARES#12 ← phi( @36/(byte) NUM_SQUARES#2 ) (byte) NUM_SQUARES#5 ← (byte) NUM_SQUARES#12 (byte*) heap_head#9 ← (byte*) heap_head#18 (word*) SQUARES#7 ← (word*) SQUARES#16 to:@end -@end: scope:[] from @14 +@end: scope:[] from @37 SYMBOL TABLE SSA +(const string) $0 = (string) "0123456789abcdef" (label) @11 -(label) @13 -(label) @14 +(label) @27 (label) @3 +(label) @34 +(label) @36 +(label) @37 (label) @6 (label) @begin (label) @end (byte*) CHARSET (byte*) CHARSET#0 +(dword*) CIA2_TIMER_AB +(dword*) CIA2_TIMER_AB#0 +(byte*) CIA2_TIMER_A_CONTROL +(byte*) CIA2_TIMER_A_CONTROL#0 +(byte*) CIA2_TIMER_B_CONTROL +(byte*) CIA2_TIMER_B_CONTROL#0 +(byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +(byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 +(byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +(byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +(byte) CIA_TIMER_CONTROL_CONTINUOUS +(byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +(byte) CIA_TIMER_CONTROL_START +(byte) CIA_TIMER_CONTROL_START#0 +(byte) CIA_TIMER_CONTROL_STOP +(byte) CIA_TIMER_CONTROL_STOP#0 +(dword) CLOCKS_PER_INIT +(dword) CLOCKS_PER_INIT#0 (byte*) D018 (byte*) D018#0 (byte[]) FONT_HEX_PROTO @@ -632,7 +861,15 @@ SYMBOL TABLE SSA (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#33 +(byte) NUM_SQUARES#34 +(byte) NUM_SQUARES#35 +(byte) NUM_SQUARES#36 +(byte) NUM_SQUARES#37 +(byte) NUM_SQUARES#38 +(byte) NUM_SQUARES#39 (byte) NUM_SQUARES#4 +(byte) NUM_SQUARES#40 +(byte) NUM_SQUARES#41 (byte) NUM_SQUARES#5 (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#7 @@ -675,7 +912,15 @@ SYMBOL TABLE SSA (word*) SQUARES#36 (word*) SQUARES#37 (word*) SQUARES#38 +(word*) SQUARES#39 (word*) SQUARES#4 +(word*) SQUARES#40 +(word*) SQUARES#41 +(word*) SQUARES#42 +(word*) SQUARES#43 +(word*) SQUARES#44 +(word*) SQUARES#45 +(word*) SQUARES#46 (word*) SQUARES#5 (word*) SQUARES#6 (word*) SQUARES#7 @@ -757,6 +1002,25 @@ SYMBOL TABLE SSA (word*) bsearch16u::return#3 (word*) bsearch16u::return#4 (word*) bsearch16u::return#5 +(dword()) clock() +(number~) clock::$0 +(label) clock::@return +(dword) clock::return +(dword) clock::return#0 +(dword) clock::return#1 +(dword) clock::return#2 +(dword) clock::return#3 +(dword) clock::return#4 +(void()) clock_start() +(byte~) clock_start::$0 +(byte~) clock_start::$1 +(byte~) clock_start::$2 +(byte~) clock_start::$3 +(byte~) clock_start::$4 +(byte~) clock_start::$5 +(byte~) clock_start::$6 +(byte~) clock_start::$7 +(label) clock_start::@return (byte*) heap_head (byte*) heap_head#0 (byte*) heap_head#1 @@ -796,7 +1060,15 @@ SYMBOL TABLE SSA (byte*) heap_head#40 (byte*) heap_head#41 (byte*) heap_head#42 +(byte*) heap_head#43 +(byte*) heap_head#44 +(byte*) heap_head#45 +(byte*) heap_head#46 +(byte*) heap_head#47 +(byte*) heap_head#48 +(byte*) heap_head#49 (byte*) heap_head#5 +(byte*) heap_head#50 (byte*) heap_head#6 (byte*) heap_head#7 (byte*) heap_head#8 @@ -1016,10 +1288,23 @@ SYMBOL TABLE SSA (word*) init_squares::squares#2 (void()) main() (byte~) main::$1 +(dword~) main::$4 +(dword~) main::$5 +(byte~) main::$7 (label) main::@1 (label) main::@2 (label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 (label) main::@return +(byte*) main::BASE_CHARSET +(byte*) main::BASE_CHARSET#0 +(byte*) main::BASE_SCREEN +(byte*) main::BASE_SCREEN#0 +(dword) main::cyclecount +(dword) main::cyclecount#0 (label) main::toD0181 (word~) main::toD0181_$0 (word~) main::toD0181_$0#0 @@ -1051,6 +1336,37 @@ SYMBOL TABLE SSA (byte*) main::toD0181_screen (byte*) main::toD0181_screen#0 (byte*) main::toD0181_screen#1 +(label) main::toD0182 +(word~) main::toD0182_$0 +(word~) main::toD0182_$0#0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$1#0 +(number~) main::toD0182_$2 +(number~) main::toD0182_$2#0 +(number~) main::toD0182_$3 +(number~) main::toD0182_$3#0 +(word~) main::toD0182_$4 +(word~) main::toD0182_$4#0 +(byte~) main::toD0182_$5 +(byte~) main::toD0182_$5#0 +(number~) main::toD0182_$6 +(number~) main::toD0182_$6#0 +(number~) main::toD0182_$7 +(number~) main::toD0182_$7#0 +(number~) main::toD0182_$8 +(number~) main::toD0182_$8#0 +(label) main::toD0182_@return +(byte*) main::toD0182_gfx +(byte*) main::toD0182_gfx#0 +(byte*) main::toD0182_gfx#1 +(byte) main::toD0182_return +(byte) main::toD0182_return#0 +(byte) main::toD0182_return#1 +(byte) main::toD0182_return#2 +(byte) main::toD0182_return#3 +(byte*) main::toD0182_screen +(byte*) main::toD0182_screen#0 +(byte*) main::toD0182_screen#1 (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem @@ -1064,6 +1380,67 @@ SYMBOL TABLE SSA (word) malloc::size (word) malloc::size#0 (word) malloc::size#1 +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) +(byte~) print_byte_at::$0 +(number~) print_byte_at::$2 +(byte*~) print_byte_at::$3 +(label) print_byte_at::@1 +(label) print_byte_at::@2 +(label) print_byte_at::@return +(byte*) print_byte_at::at +(byte*) print_byte_at::at#0 +(byte*) print_byte_at::at#1 +(byte*) print_byte_at::at#2 +(byte*) print_byte_at::at#3 +(byte) print_byte_at::b +(byte) print_byte_at::b#0 +(byte) print_byte_at::b#1 +(byte) print_byte_at::b#2 +(byte) print_byte_at::b#3 +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) +(label) print_char_at::@return +(byte*) print_char_at::at +(byte*) print_char_at::at#0 +(byte*) print_char_at::at#1 +(byte*) print_char_at::at#2 +(byte) print_char_at::ch +(byte) print_char_at::ch#0 +(byte) print_char_at::ch#1 +(byte) print_char_at::ch#2 +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) +(word~) print_dword_at::$0 +(word~) print_dword_at::$2 +(byte*~) print_dword_at::$3 +(label) print_dword_at::@1 +(label) print_dword_at::@2 +(label) print_dword_at::@return +(byte*) print_dword_at::at +(byte*) print_dword_at::at#0 +(byte*) print_dword_at::at#1 +(byte*) print_dword_at::at#2 +(dword) print_dword_at::dw +(dword) print_dword_at::dw#0 +(dword) print_dword_at::dw#1 +(dword) print_dword_at::dw#2 +(byte[]) print_hextab +(byte[]) print_hextab#0 +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) +(byte~) print_word_at::$0 +(byte~) print_word_at::$2 +(byte*~) print_word_at::$3 +(label) print_word_at::@1 +(label) print_word_at::@2 +(label) print_word_at::@return +(byte*) print_word_at::at +(byte*) print_word_at::at#0 +(byte*) print_word_at::at#1 +(byte*) print_word_at::at#2 +(byte*) print_word_at::at#3 +(word) print_word_at::w +(word) print_word_at::w#0 +(word) print_word_at::w#1 +(word) print_word_at::w#2 +(word) print_word_at::w#3 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 (label) sqr::@return @@ -1117,6 +1494,11 @@ Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byt Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (unumber)(number) 2 Adding number conversion cast (unumber) 1 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (number) 1 Adding number conversion cast (unumber) init_squares::$4 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (unumber)(number) 1 +Adding number conversion cast (unumber) 0 in (byte) CIA_TIMER_CONTROL_STOP#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) CIA_TIMER_CONTROL_START#0 ← (number) 1 +Adding number conversion cast (unumber) 0 in (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (number) 0 +Adding number conversion cast (unumber) $40 in (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (number) $40 Adding number conversion cast (unumber) 0 in (byte) init_font_hex::idx#0 ← (number) 0 Adding number conversion cast (unumber) 0 in *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (number) 0 Adding number conversion cast (unumber) 4 in (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#2 + (byte) init_font_hex::i#2) << (number) 4 @@ -1126,6 +1508,16 @@ Adding number conversion cast (unumber) 0 in *((byte*) init_font_hex::charset#4 Adding number conversion cast (unumber) 5 in (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#3 + (number) 5 Adding number conversion cast (unumber) 8 in (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#4 + (number) 8 Adding number conversion cast (unumber) 5 in (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#3 + (number) 5 +Adding number conversion cast (unumber) $12 in (dword) CLOCKS_PER_INIT#0 ← (number) $12 +Adding number conversion cast (unumber) $ffffffff in (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) +Adding number conversion cast (unumber) clock::$0 in (number~) clock::$0 ← (unumber)(number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) +Adding number conversion cast (unumber) $ffffffff in *((dword*) CIA2_TIMER_AB#0) ← (number) $ffffffff +Adding number conversion cast (unumber) 2 in (byte*~) print_word_at::$3 ← (byte*) print_word_at::at#3 + (number) 2 +Adding number conversion cast (unumber) 4 in (byte*~) print_dword_at::$3 ← (byte*) print_dword_at::at#2 + (number) 4 +Adding number conversion cast (unumber) 4 in (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (number) 4 +Adding number conversion cast (unumber) $f in (number~) print_byte_at::$2 ← (byte) print_byte_at::b#3 & (number) $f +Adding number conversion cast (unumber) print_byte_at::$2 in (number~) print_byte_at::$2 ← (byte) print_byte_at::b#3 & (unumber)(number) $f +Adding number conversion cast (unumber) 1 in (byte*~) print_byte_at::$3 ← (byte*) print_byte_at::at#3 + (number) 1 Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4 @@ -1136,6 +1528,16 @@ Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::to Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0 +Adding number conversion cast (unumber) $3fff in (number~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (number) $3fff +Adding number conversion cast (unumber) main::toD0182_$1#0 in (number~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (unumber)(number) $3fff +Adding number conversion cast (unumber) 4 in (number~) main::toD0182_$2#0 ← (unumber~) main::toD0182_$1#0 * (number) 4 +Adding number conversion cast (unumber) main::toD0182_$2#0 in (number~) main::toD0182_$2#0 ← (unumber~) main::toD0182_$1#0 * (unumber)(number) 4 +Adding number conversion cast (unumber) main::toD0182_$3#0 in (number~) main::toD0182_$3#0 ← > (unumber~) main::toD0182_$2#0 +Adding number conversion cast (unumber) 4 in (number~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (number) 4 +Adding number conversion cast (unumber) main::toD0182_$6#0 in (number~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (unumber)(number) 4 +Adding number conversion cast (unumber) $f in (number~) main::toD0182_$7#0 ← (unumber~) main::toD0182_$6#0 & (number) $f +Adding number conversion cast (unumber) main::toD0182_$7#0 in (number~) main::toD0182_$7#0 ← (unumber~) main::toD0182_$6#0 & (unumber)(number) $f +Adding number conversion cast (unumber) main::toD0182_$8#0 in (number~) main::toD0182_$8#0 ← (unumber~) main::toD0182_$3#0 | (unumber~) main::toD0182_$7#0 Adding number conversion cast (unumber) $30 in (byte) NUM_SQUARES#3 ← (number) $30 Adding number conversion cast (unumber) $28*$18 in (byte*~) init_dist_screen::$1 ← (byte*) init_dist_screen::screen#1 + (number) $28*(number) $18 Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 @@ -1147,12 +1549,12 @@ Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_d Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4 -Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#39 ← phi( init_dist_screen::@2/(byte*) heap_head#40 init_dist_screen::@3/(byte*) heap_head#41 ) +Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#47 ← phi( init_dist_screen::@2/(byte*) heap_head#48 init_dist_screen::@3/(byte*) heap_head#49 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#12 init_dist_screen::@3/(byte) init_dist_screen::y#13 ) (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (byte) NUM_SQUARES#29 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#30 init_dist_screen::@3/(byte) NUM_SQUARES#31 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#26 init_dist_screen::@3/(word*) SQUARES#27 ) + (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#38 init_dist_screen::@3/(byte) NUM_SQUARES#39 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@2/(word*) SQUARES#28 init_dist_screen::@3/(word*) SQUARES#29 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(unumber~) init_dist_screen::$7 init_dist_screen::@3/(unumber~) init_dist_screen::$5 ) Adding number conversion cast (unumber) 0 in (byte) init_dist_screen::x#0 ← (number) 0 Adding number conversion cast (unumber) $27 in (byte) init_dist_screen::xb#0 ← (number) $27 @@ -1165,15 +1567,15 @@ Adding number conversion cast (unumber) init_dist_screen::$15 in (number~) init_ Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$12 ← (number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$12 in (number~) init_dist_screen::$12 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber~) init_dist_screen::$12 -Adding number conversion cast (unumber) init_dist_screen::$16 in (byte*) heap_head#33 ← phi( init_dist_screen::@6/(byte*) heap_head#35 init_dist_screen::@7/(byte*) heap_head#36 ) +Adding number conversion cast (unumber) init_dist_screen::$16 in (byte*) heap_head#37 ← phi( init_dist_screen::@6/(byte*) heap_head#41 init_dist_screen::@7/(byte*) heap_head#42 ) (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#7 init_dist_screen::@7/(byte) init_dist_screen::y#8 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#5 init_dist_screen::@7/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#7 ) (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#6 init_dist_screen::@7/(byte) init_dist_screen::x#7 ) (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#7 ) - (byte) NUM_SQUARES#18 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#23 init_dist_screen::@7/(byte) NUM_SQUARES#24 ) + (byte) NUM_SQUARES#20 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#26 init_dist_screen::@7/(byte) NUM_SQUARES#27 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#3 init_dist_screen::@7/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#28 init_dist_screen::@7/(word*) SQUARES#29 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@6/(word*) SQUARES#30 init_dist_screen::@7/(word*) SQUARES#31 ) (number~) init_dist_screen::$16 ← phi( init_dist_screen::@6/(unumber~) init_dist_screen::$15 init_dist_screen::@7/(unumber~) init_dist_screen::$13 ) Adding number conversion cast (unumber) $13 in (bool~) init_dist_screen::$20 ← (byte) init_dist_screen::x#1 <= (number) $13 Adding number conversion cast (unumber) $28 in (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#3 + (number) $28 @@ -1190,14 +1592,28 @@ Inlining cast (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 Inlining cast (word) init_squares::sqr#0 ← (unumber)(number) 0 Inlining cast (byte~) sqrt::$2 ← (byte)(word~) sqrt::$1 Inlining cast (byte*) D018#0 ← (byte*)(number) $d018 +Inlining cast (dword*) CIA2_TIMER_AB#0 ← (dword*)(number) $dd04 +Inlining cast (byte*) CIA2_TIMER_A_CONTROL#0 ← (byte*)(number) $dd0e +Inlining cast (byte*) CIA2_TIMER_B_CONTROL#0 ← (byte*)(number) $dd0f +Inlining cast (byte) CIA_TIMER_CONTROL_STOP#0 ← (unumber)(number) 0 +Inlining cast (byte) CIA_TIMER_CONTROL_START#0 ← (unumber)(number) 1 +Inlining cast (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 ← (unumber)(number) 0 +Inlining cast (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (unumber)(number) 0 +Inlining cast (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (unumber)(number) $40 Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0 Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0 Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0 Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#3) ← (unumber)(number) 0 +Inlining cast (dword) CLOCKS_PER_INIT#0 ← (unumber)(number) $12 +Inlining cast *((dword*) CIA2_TIMER_AB#0) ← (unumber)(number) $ffffffff Inlining cast (byte*) CHARSET#0 ← (byte*)(number) $2000 Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $2800 Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 +Inlining cast (byte*) main::BASE_SCREEN#0 ← (byte*)(number) $400 +Inlining cast (byte*) main::BASE_CHARSET#0 ← (byte*)(number) $1000 +Inlining cast (word~) main::toD0182_$0#0 ← (word)(byte*) main::toD0182_screen#1 +Inlining cast (word~) main::toD0182_$4#0 ← (word)(byte*) main::toD0182_gfx#1 Inlining cast (byte) NUM_SQUARES#3 ← (unumber)(number) $30 Inlining cast (byte) init_dist_screen::x#0 ← (unumber)(number) 0 Inlining cast (byte) init_dist_screen::xb#0 ← (unumber)(number) $27 @@ -1216,6 +1632,14 @@ Simplifying constant integer cast 1 Simplifying constant integer cast 2 Simplifying constant integer cast 1 Simplifying constant pointer cast (byte*) 53272 +Simplifying constant pointer cast (dword*) 56580 +Simplifying constant pointer cast (byte*) 56590 +Simplifying constant pointer cast (byte*) 56591 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $40 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 4 @@ -1305,12 +1729,26 @@ Simplifying constant integer cast 4 Simplifying constant integer cast 6 Simplifying constant integer cast 4 Simplifying constant integer cast 4 +Simplifying constant integer cast $12 +Simplifying constant integer cast $ffffffff +Simplifying constant integer cast $ffffffff +Simplifying constant integer cast 2 +Simplifying constant integer cast 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast $f +Simplifying constant integer cast 1 Simplifying constant pointer cast (byte*) 8192 Simplifying constant pointer cast (byte*) 10240 Simplifying constant integer cast $3fff Simplifying constant integer cast 4 Simplifying constant integer cast 4 Simplifying constant integer cast $f +Simplifying constant pointer cast (byte*) 1024 +Simplifying constant pointer cast (byte*) 4096 +Simplifying constant integer cast $3fff +Simplifying constant integer cast 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast $f Simplifying constant integer cast $30 Simplifying constant integer cast 2 Simplifying constant integer cast $18 @@ -1339,6 +1777,11 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 1 @@ -1347,6 +1790,18 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) $12 +Finalized unsigned number type (dword) $ffffffff +Finalized unsigned number type (dword) $ffffffff +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $f +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3fff +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $f Finalized unsigned number type (word) $3fff Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 4 @@ -1371,12 +1826,20 @@ Inferred type updated to byte in (unumber~) bsearch16u::$18 ← (byte) 1 * (cons Inferred type updated to byte in (unumber~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (byte) 1 Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Inferred type updated to byte in (unumber~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 +Inferred type updated to dword in (unumber~) clock::$0 ← (dword) $ffffffff - *((dword*) CIA2_TIMER_AB#0) +Inferred type updated to byte in (unumber~) print_byte_at::$2 ← (byte) print_byte_at::b#3 & (byte) $f Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 +Inferred type updated to word in (unumber~) main::toD0182_$1#0 ← (word~) main::toD0182_$0#0 & (word) $3fff +Inferred type updated to word in (unumber~) main::toD0182_$2#0 ← (word~) main::toD0182_$1#0 * (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0182_$3#0 ← > (word~) main::toD0182_$2#0 +Inferred type updated to byte in (unumber~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f +Inferred type updated to byte in (unumber~) main::toD0182_$8#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 Inferred type updated to byte in (unumber~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (byte) 2 Inferred type updated to byte in (unumber~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (byte) $18 Inferred type updated to byte in (unumber~) init_dist_screen::$7 ← (byte~) init_dist_screen::$6 @@ -1392,7 +1855,7 @@ Inferred type updated to byte for (unumber~) init_dist_screen::$16 Inversing boolean not [24] (bool~) bsearch16u::$12 ← (signed word) bsearch16u::result#0 != (signed byte) 0 from [23] (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (signed byte) 0 Inversing boolean not [31] (bool~) bsearch16u::$14 ← (signed word) bsearch16u::result#1 <= (signed byte) 0 from [30] (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (signed byte) 0 Successful SSA optimization Pass2UnaryNotSimplification -Alias (byte*) HEAP_START#0 = (byte*) heap_head#0 (byte*) heap_head#31 (byte*) heap_head#28 (byte*) heap_head#27 (byte*) heap_head#24 +Alias (byte*) HEAP_START#0 = (byte*) heap_head#0 (byte*) heap_head#43 (byte*) heap_head#38 (byte*) heap_head#34 (byte*) heap_head#30 (byte*) heap_head#29 (byte*) heap_head#25 Alias (void*) malloc::return#0 = (void*) malloc::return#3 (void*) malloc::return#1 Alias (byte*) heap_head#1 = (byte*) heap_head#11 (byte*) heap_head#2 Alias (byte) bsearch16u::num#3 = (byte) bsearch16u::num#4 (byte) bsearch16u::num#8 (byte) bsearch16u::num#6 @@ -1415,8 +1878,8 @@ Alias (word*) bsearch16u::return#3 = (word*) bsearch16u::return#5 Alias (word*) SQUARES#10 = (word*) SQUARES#11 Alias (word*) sqrt::found#0 = (word*~) sqrt::$0 Alias (byte) sqrt::return#0 = (byte) sqrt::sq#0 (byte~) sqrt::$2 (byte) sqrt::return#3 (byte) sqrt::return#1 -Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#16 -Alias (word*) SQUARES#0 = (word*) SQUARES#32 (word*) SQUARES#31 (word*) SQUARES#24 +Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#17 +Alias (word*) SQUARES#0 = (word*) SQUARES#43 (word*) SQUARES#39 (word*) SQUARES#34 (word*) SQUARES#33 (word*) SQUARES#25 Alias (byte*) init_font_hex::charset#3 = (byte*) init_font_hex::charset#4 Alias (byte) init_font_hex::idx#2 = (byte) init_font_hex::idx#6 Alias (byte*) init_font_hex::proto_lo#2 = (byte*) init_font_hex::proto_lo#3 @@ -1424,61 +1887,80 @@ Alias (byte) init_font_hex::c1#2 = (byte) init_font_hex::c1#3 Alias (byte*) init_font_hex::proto_hi#2 = (byte*) init_font_hex::proto_hi#5 (byte*) init_font_hex::proto_hi#3 Alias (byte) init_font_hex::c#2 = (byte) init_font_hex::c#3 (byte) init_font_hex::c#4 Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7 -Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#17 -Alias (byte*) heap_head#21 = (byte*) heap_head#32 (byte*) heap_head#34 (byte*) heap_head#29 (byte*) heap_head#25 -Alias (word*) SQUARES#21 = (word*) SQUARES#36 (word*) SQUARES#38 (word*) SQUARES#33 (word*) SQUARES#25 +Alias (dword) clock::return#0 = (dword~) clock::$0 (dword) clock::return#3 (dword) clock::return#1 +Alias (byte) print_byte_at::b#0 = (byte~) print_word_at::$0 +Alias (word) print_word_at::w#2 = (word) print_word_at::w#3 +Alias (byte*) print_word_at::at#2 = (byte*) print_word_at::at#3 +Alias (byte) print_byte_at::b#1 = (byte~) print_word_at::$2 +Alias (byte*) print_byte_at::at#1 = (byte*~) print_word_at::$3 +Alias (word) print_word_at::w#0 = (word~) print_dword_at::$0 +Alias (dword) print_dword_at::dw#1 = (dword) print_dword_at::dw#2 +Alias (byte*) print_dword_at::at#1 = (byte*) print_dword_at::at#2 +Alias (word) print_word_at::w#1 = (word~) print_dword_at::$2 +Alias (byte*) print_word_at::at#1 = (byte*~) print_dword_at::$3 +Alias (byte) print_byte_at::b#2 = (byte) print_byte_at::b#3 +Alias (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#3 +Alias (byte*) print_char_at::at#1 = (byte*~) print_byte_at::$3 +Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#18 +Alias (byte*) heap_head#21 = (byte*) heap_head#39 (byte*) heap_head#44 (byte*) heap_head#35 (byte*) heap_head#31 (byte*) heap_head#26 +Alias (word*) SQUARES#21 = (word*) SQUARES#44 (word*) SQUARES#46 (word*) SQUARES#40 (word*) SQUARES#35 (word*) SQUARES#26 Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 -Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#2 -Alias (byte*) heap_head#14 = (byte*) heap_head#5 (byte*) heap_head#15 (byte*) heap_head#6 -Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#13 (word*) SQUARES#4 +Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#30 (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#2 +Alias (byte*) heap_head#14 = (byte*) heap_head#5 (byte*) heap_head#40 (byte*) heap_head#36 (byte*) heap_head#32 (byte*) heap_head#27 (byte*) heap_head#22 (byte*) heap_head#15 (byte*) heap_head#6 +Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#45 (word*) SQUARES#41 (word*) SQUARES#36 (word*) SQUARES#27 (word*) SQUARES#22 (word*) SQUARES#13 (word*) SQUARES#4 +Alias (dword) clock::return#2 = (dword) clock::return#4 +Alias (dword) main::cyclecount#0 = (dword~) main::$5 +Alias (byte*) main::BASE_SCREEN#0 = (byte*) main::toD0182_screen#0 (byte*) main::toD0182_screen#1 +Alias (byte*) main::BASE_CHARSET#0 = (byte*) main::toD0182_gfx#0 (byte*) main::toD0182_gfx#1 +Alias (byte) main::toD0182_return#0 = (byte~) main::toD0182_$8#0 (byte) main::toD0182_return#2 (byte) main::toD0182_return#1 (byte) main::toD0182_return#3 (byte~) main::$7 Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0 -Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#33 +Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#41 Alias (byte*) heap_head#16 = (byte*) heap_head#7 Alias (word*) SQUARES#14 = (word*) SQUARES#5 Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1 Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2 -Alias (word*) SQUARES#26 = (word*) SQUARES#34 (word*) SQUARES#27 -Alias (byte) NUM_SQUARES#30 = (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#31 +Alias (word*) SQUARES#28 = (word*) SQUARES#37 (word*) SQUARES#29 +Alias (byte) NUM_SQUARES#38 = (byte) NUM_SQUARES#40 (byte) NUM_SQUARES#39 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#12 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#12 Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#2 (byte) init_dist_screen::y#13 -Alias (byte*) heap_head#40 = (byte*) heap_head#42 (byte*) heap_head#41 +Alias (byte*) heap_head#48 = (byte*) heap_head#50 (byte*) heap_head#49 Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6 Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4 Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8 Alias (word) sqr::return#2 = (word) sqr::return#5 -Alias (word*) SQUARES#18 = (word*) SQUARES#37 -Alias (byte) NUM_SQUARES#28 = (byte) NUM_SQUARES#29 +Alias (word*) SQUARES#18 = (word*) SQUARES#42 +Alias (byte) NUM_SQUARES#35 = (byte) NUM_SQUARES#37 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#9 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#9 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#11 -Alias (byte*) heap_head#38 = (byte*) heap_head#39 +Alias (byte*) heap_head#46 = (byte*) heap_head#47 Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9 Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$10 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2 -Alias (word*) SQUARES#28 = (word*) SQUARES#35 (word*) SQUARES#29 +Alias (word*) SQUARES#30 = (word*) SQUARES#38 (word*) SQUARES#31 Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#4 -Alias (byte) NUM_SQUARES#23 = (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#24 +Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#27 Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8 (byte*) init_dist_screen::screen_topline#7 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#6 (byte) init_dist_screen::x#7 Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8 (byte*) init_dist_screen::screen_bottomline#7 Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#6 Alias (byte) init_dist_screen::y#7 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#8 -Alias (byte*) heap_head#35 = (byte*) heap_head#37 (byte*) heap_head#36 +Alias (byte*) heap_head#41 = (byte*) heap_head#45 (byte*) heap_head#42 Alias (byte~) init_dist_screen::$15 = (byte~) init_dist_screen::$14 Alias (byte~) init_dist_screen::$13 = (byte~) init_dist_screen::$12 Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$16 Alias (word) sqr::return#3 = (word) sqr::return#6 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#6 -Alias (word*) SQUARES#15 = (word*) SQUARES#20 (word*) SQUARES#19 (word*) SQUARES#30 (word*) SQUARES#23 (word*) SQUARES#6 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#4 +Alias (word*) SQUARES#15 = (word*) SQUARES#20 (word*) SQUARES#19 (word*) SQUARES#32 (word*) SQUARES#24 (word*) SQUARES#6 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#4 Alias (byte*) init_dist_screen::screen_topline#2 = (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#3 Alias (byte) init_dist_screen::x#3 = (byte) init_dist_screen::x#4 (byte) init_dist_screen::x#5 Alias (byte*) init_dist_screen::screen_bottomline#2 = (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#3 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4 Alias (byte) init_dist_screen::y#3 = (byte) init_dist_screen::y#5 (byte) init_dist_screen::y#6 (byte) init_dist_screen::y#4 -Alias (byte*) heap_head#17 = (byte*) heap_head#30 (byte*) heap_head#33 (byte*) heap_head#26 (byte*) heap_head#23 (byte*) heap_head#8 +Alias (byte*) heap_head#17 = (byte*) heap_head#33 (byte*) heap_head#37 (byte*) heap_head#28 (byte*) heap_head#24 (byte*) heap_head#8 Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$17 Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$18 Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 @@ -1488,21 +1970,21 @@ Alias (byte*) heap_head#18 = (byte*) heap_head#9 Alias (word*) SQUARES#16 = (word*) SQUARES#7 Successful SSA optimization Pass2AliasElimination Alias (word) bsearch16u::key#1 = (word) bsearch16u::key#5 -Alias (word*) SQUARES#18 = (word*) SQUARES#26 -Alias (byte) NUM_SQUARES#28 = (byte) NUM_SQUARES#30 +Alias (word*) SQUARES#18 = (word*) SQUARES#28 +Alias (byte) NUM_SQUARES#35 = (byte) NUM_SQUARES#38 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#11 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#11 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#12 -Alias (byte*) heap_head#38 = (byte*) heap_head#40 -Alias (word*) SQUARES#15 = (word*) SQUARES#28 +Alias (byte*) heap_head#46 = (byte*) heap_head#48 +Alias (word*) SQUARES#15 = (word*) SQUARES#30 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#23 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#26 Alias (byte*) init_dist_screen::screen_topline#2 = (byte*) init_dist_screen::screen_topline#6 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 Alias (byte*) init_dist_screen::screen_bottomline#2 = (byte*) init_dist_screen::screen_bottomline#6 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5 Alias (byte) init_dist_screen::y#3 = (byte) init_dist_screen::y#7 -Alias (byte*) heap_head#17 = (byte*) heap_head#35 +Alias (byte*) heap_head#17 = (byte*) heap_head#41 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (word) bsearch16u::key#1 Self Phi Eliminated (byte*) heap_head#13 @@ -1527,7 +2009,7 @@ Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 -Identical Phi Values (byte*) heap_head#19 (byte*) heap_head#22 +Identical Phi Values (byte*) heap_head#19 (byte*) heap_head#23 Identical Phi Values (byte*) heap_head#12 (byte*) heap_head#1 Identical Phi Values (byte*) heap_head#13 (byte*) heap_head#12 Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#1 @@ -1540,46 +2022,51 @@ Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::pr Identical Phi Values (byte*) init_font_hex::charset#3 (byte*) init_font_hex::charset#2 Identical Phi Values (byte) init_font_hex::c1#2 (byte) init_font_hex::c1#4 Identical Phi Values (byte) init_font_hex::c#2 (byte) init_font_hex::c#5 +Identical Phi Values (dword) print_dword_at::dw#1 (dword) print_dword_at::dw#0 +Identical Phi Values (byte*) print_dword_at::at#1 (byte*) print_dword_at::at#0 Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#0 Identical Phi Values (byte*) heap_head#21 (byte*) HEAP_START#0 Identical Phi Values (word*) SQUARES#21 (word*) SQUARES#0 Identical Phi Values (byte) NUM_SQUARES#1 (byte) NUM_SQUARES#11 Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#17 Identical Phi Values (word*) SQUARES#12 (word*) SQUARES#15 -Identical Phi Values (byte*) heap_head#22 (byte*) heap_head#21 -Identical Phi Values (word*) SQUARES#22 (word*) SQUARES#21 +Identical Phi Values (byte*) heap_head#23 (byte*) heap_head#21 +Identical Phi Values (word*) SQUARES#23 (word*) SQUARES#21 Identical Phi Values (byte*) init_dist_screen::screen#1 (byte*) init_dist_screen::screen#0 Identical Phi Values (byte*) heap_head#16 (byte*) heap_head#13 Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17 Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#18 Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0 -Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#28 +Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#35 Identical Phi Values (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#10 Identical Phi Values (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#10 Identical Phi Values (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#10 -Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#38 +Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#46 Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#1 Identical Phi Values (byte*) heap_head#18 (byte*) heap_head#14 Identical Phi Values (word*) SQUARES#16 (word*) SQUARES#12 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (word*) SQUARES#9 (word*) SQUARES#18 Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [162] (byte~) clock_start::$2 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +Identified duplicate assignment right side [169] (byte~) clock_start::$6 ← (byte) CIA_TIMER_CONTROL_START#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) bsearch16u::$5 [13] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 Simple Condition (bool~) init_squares::$5 [77] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 -Simple Condition (bool~) init_font_hex::$3 [126] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [136] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [141] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) init_dist_screen::$3 [194] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -Simple Condition (bool~) init_dist_screen::$11 [215] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -Simple Condition (bool~) init_dist_screen::$20 [245] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 -Simple Condition (bool~) init_dist_screen::$21 [251] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 +Simple Condition (bool~) init_font_hex::$3 [134] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 +Simple Condition (bool~) init_font_hex::$4 [144] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [149] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) init_dist_screen::$3 [296] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 +Simple Condition (bool~) init_dist_screen::$11 [317] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 +Simple Condition (bool~) init_dist_screen::$20 [347] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 +Simple Condition (bool~) init_dist_screen::$21 [353] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [41] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD Constant right-side identified [48] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [144] (byte[]) FONT_HEX_PROTO#0 ← { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 } +Constant right-side identified [152] (byte[]) FONT_HEX_PROTO#0 ← { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 } Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) HEAP_START#0 = (byte*) 49152 Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD @@ -1589,13 +2076,25 @@ Constant (const word*) SQUARES#0 = (word*) 0 Constant (const word) init_squares::sqr#0 = 0 Constant (const byte) init_squares::i#0 = 0 Constant (const byte*) D018#0 = (byte*) 53272 +Constant (const dword*) CIA2_TIMER_AB#0 = (dword*) 56580 +Constant (const byte*) CIA2_TIMER_A_CONTROL#0 = (byte*) 56590 +Constant (const byte*) CIA2_TIMER_B_CONTROL#0 = (byte*) 56591 +Constant (const byte) CIA_TIMER_CONTROL_STOP#0 = 0 +Constant (const byte) CIA_TIMER_CONTROL_START#0 = 1 +Constant (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 = 0 +Constant (const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 = 0 +Constant (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 = $40 Constant (const byte) init_font_hex::c#0 = 0 Constant (const byte) init_font_hex::c1#0 = 0 Constant (const byte) init_font_hex::idx#0 = 0 Constant (const byte) init_font_hex::i#0 = 0 Constant (const byte[]) FONT_HEX_PROTO#0 = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 } +Constant (const dword) CLOCKS_PER_INIT#0 = $12 +Constant (const byte[]) print_hextab#0 = $0 Constant (const byte*) CHARSET#0 = (byte*) 8192 Constant (const byte*) SCREEN#0 = (byte*) 10240 +Constant (const byte*) main::BASE_SCREEN#0 = (byte*) 1024 +Constant (const byte*) main::BASE_CHARSET#0 = (byte*) 4096 Constant (const byte) NUM_SQUARES#3 = $30 Constant (const byte) init_dist_screen::y#0 = 0 Constant (const byte) init_dist_screen::x#0 = 0 @@ -1608,26 +2107,37 @@ Constant (const byte*) init_font_hex::charset#1 = CHARSET#0 Constant (const byte*) main::toD0181_screen#0 = SCREEN#0 Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 Constant (const byte*) init_dist_screen::screen#0 = SCREEN#0 +Constant (const byte*) print_dword_at::at#0 = main::BASE_SCREEN#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) print_word_at::at#0 = print_dword_at::at#0 Successful SSA optimization Pass2ConstantIdentification Constant value identified (void*)malloc::mem#0 in [5] (void*) malloc::return#0 ← (void*)(const byte*) malloc::mem#0 -Constant value identified (word)main::toD0181_screen#0 in [154] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [158] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (word)main::toD0181_screen#0 in [224] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [228] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (word)main::BASE_SCREEN#0 in [262] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::BASE_SCREEN#0 +Constant value identified (word)main::BASE_CHARSET#0 in [266] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::BASE_CHARSET#0 Successful SSA optimization Pass2ConstantValues -Resolved ranged next value [124] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ -Resolved ranged comparison value [126] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [134] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [136] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [139] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++ -Resolved ranged comparison value [141] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [249] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ -Resolved ranged comparison value [251] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d -Rewriting conditional comparison [245] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 -Simplifying expression containing zero init_font_hex::charset#2 in [115] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 +Resolved ranged next value [132] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ +Resolved ranged comparison value [134] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 +Resolved ranged next value [142] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [144] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [147] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++ +Resolved ranged comparison value [149] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [351] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ +Resolved ranged comparison value [353] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d +Rewriting conditional comparison [347] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 +Simplifying expression containing zero init_font_hex::charset#2 in [123] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 +Simplifying expression containing zero CIA_TIMER_CONTROL_CONTINUOUS#0 in [159] (byte~) clock_start::$0 ← (const byte) CIA_TIMER_CONTROL_STOP#0 | (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +Simplifying expression containing zero clock_start::$0 in [160] (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 +Simplifying expression containing zero CIA_TIMER_CONTROL_START#0 in [166] (byte~) clock_start::$4 ← (const byte) CIA_TIMER_CONTROL_START#0 | (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +Simplifying expression containing zero clock_start::$6 in [170] (byte~) clock_start::$7 ← (byte~) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [67] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 -Eliminating unused variable - keeping the phi block (byte*) heap_head#38 +Eliminating unused variable - keeping the phi block (byte*) heap_head#46 Eliminating unused constant (const byte) NUM_SQUARES#0 Eliminating unused constant (const word*) SQUARES#0 +Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP#0 +Eliminating unused constant (const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating unused variable (byte*) heap_head#1 and assignment [0] (byte*) heap_head#1 ← (const byte*) HEAP_START#0 + (word) malloc::size#0 Successful SSA optimization PassNEliminateUnusedVars @@ -1653,26 +2163,35 @@ Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte~) clock_start::$1 = (byte~) clock_start::$0 (byte~) clock_start::$2 +Alias (byte~) clock_start::$6 = (byte~) clock_start::$4 (byte~) clock_start::$7 +Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte*) init_font_hex::proto_hi#4 Self Phi Eliminated (byte) init_font_hex::c#5 Self Phi Eliminated (word*) SQUARES#18 -Self Phi Eliminated (byte) NUM_SQUARES#28 +Self Phi Eliminated (byte) NUM_SQUARES#35 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6 Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6 Identical Phi Values (word*) SQUARES#18 (word*) SQUARES#1 -Identical Phi Values (byte) NUM_SQUARES#28 (const byte) NUM_SQUARES#3 +Identical Phi Values (byte) NUM_SQUARES#35 (const byte) NUM_SQUARES#3 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [26] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 Constant right-side identified [53] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 -Constant right-side identified [87] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 +Constant right-side identified [100] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 +Constant right-side identified [147] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const void*) malloc::return#0 = (void*)malloc::mem#0 Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 Constant (const byte) bsearch16u::num#2 = NUM_SQUARES#3 Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0 +Constant (const byte) clock_start::$1 = CIA_TIMER_CONTROL_CONTINUOUS#0 +Constant (const byte) clock_start::$6 = CIA_TIMER_CONTROL_START#0 +Constant (const byte*) print_word_at::at#1 = print_dword_at::at#0+4 Constant (const word) main::toD0181_$0#0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0 +Constant (const word) main::toD0182_$0#0 = (word)main::BASE_SCREEN#0 +Constant (const word) main::toD0182_$4#0 = (word)main::BASE_CHARSET#0 Constant (const byte*) init_dist_screen::screen_bottomline#0 = init_dist_screen::screen#0+(word)$28*$18 Successful SSA optimization Pass2ConstantIdentification Constant (const void*) malloc::return#2 = malloc::return#0 @@ -1683,6 +2202,8 @@ Constant value identified (word*)init_squares::$1 in [24] (word*) SQUARES#1 ← Successful SSA optimization Pass2ConstantValues Resolved ranged next value [33] init_squares::i#1 ← ++ init_squares::i#2 to ++ Resolved ranged comparison value [34] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 in [79] (byte~) clock_start::$3 ← (const byte) clock_start::$1 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Successful SSA optimization PassNSimplifyExpressionWithZero Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 Successful SSA optimization PassNAddNumberTypeConversions @@ -1691,31 +2212,48 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [68] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [71] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [73] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Constant right-side identified [104] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [107] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [120] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff +Constant right-side identified [123] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word*) SQUARES#1 = (word*)init_squares::$1 +Constant (const byte) clock_start::$3 = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Constant (const byte) clock_start::$5 = clock_start::$6|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 +Constant (const word) main::toD0182_$1#0 = main::toD0182_$0#0&$3fff +Constant (const byte) main::toD0182_$5#0 = >main::toD0182_$4#0 Successful SSA optimization Pass2ConstantIdentification Constant (const word*) init_squares::squares#0 = SQUARES#1 Constant (const word*) bsearch16u::items#1 = SQUARES#1 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [65] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [67] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [99] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [101] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [113] (word~) main::toD0182_$2#0 ← (const word) main::toD0182_$1#0 * (byte) 4 +Constant right-side identified [115] (byte~) main::toD0182_$6#0 ← (const byte) main::toD0182_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 +Constant (const word) main::toD0182_$2#0 = main::toD0182_$1#0*4 +Constant (const byte) main::toD0182_$6#0 = main::toD0182_$5#0/4 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [65] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [66] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [99] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [100] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [111] (byte~) main::toD0182_$3#0 ← > (const word) main::toD0182_$2#0 +Constant right-side identified [112] (byte~) main::toD0182_$7#0 ← (const byte) main::toD0182_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f +Constant (const byte) main::toD0182_$3#0 = >main::toD0182_$2#0 +Constant (const byte) main::toD0182_$7#0 = main::toD0182_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [65] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [99] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [109] (byte) main::toD0182_return#0 ← (const byte) main::toD0182_$3#0 | (const byte) main::toD0182_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 +Constant (const byte) main::toD0182_return#0 = main::toD0182_$3#0|main::toD0182_$7#0 Successful SSA optimization Pass2ConstantIdentification Inlining Noop Cast [6] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 Inlining Noop Cast [7] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) @@ -1724,8 +2262,8 @@ Rewriting multiplication to use shift [4] (byte~) bsearch16u::$16 ← (byte~) bs Rewriting multiplication to use shift [24] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Rewriting multiplication to use shift [31] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD Rewriting division to use shift [39] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [70] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 -Rewriting multiplication to use shift [80] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 +Rewriting multiplication to use shift [112] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 +Rewriting multiplication to use shift [122] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with different constant siblings (const void*) malloc::return#2 Inlining constant with var siblings (const byte) bsearch16u::num#2 @@ -1741,44 +2279,62 @@ Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0 Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0 Inlining constant with var siblings (const byte*) init_font_hex::charset#1 Inlining constant with var siblings (const byte) init_font_hex::idx#1 +Inlining constant with var siblings (const byte*) print_word_at::at#0 +Inlining constant with var siblings (const byte*) print_word_at::at#1 Inlining constant with var siblings (const byte) init_dist_screen::y#0 Inlining constant with var siblings (const byte) init_dist_screen::x#0 Inlining constant with var siblings (const byte) init_dist_screen::xb#0 Inlining constant with var siblings (const byte*) init_dist_screen::screen_bottomline#0 -Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0 -Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 -Constant inlined init_squares::sqr#0 = (byte) 0 Constant inlined init_squares::squares#0 = (const word*) SQUARES#1 Constant inlined init_font_hex::proto_hi#0 = (const byte[]) FONT_HEX_PROTO#0 -Constant inlined init_dist_screen::y#0 = (byte) 0 -Constant inlined init_dist_screen::xb#0 = (byte) $27 -Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET#0 +Constant inlined $0 = (const byte[]) print_hextab#0 +Constant inlined clock_start::$5 = (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Constant inlined clock_start::$6 = (const byte) CIA_TIMER_CONTROL_START#0 +Constant inlined clock_start::$3 = (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Constant inlined init_dist_screen::x#0 = (byte) 0 -Constant inlined init_font_hex::c1#0 = (byte) 0 +Constant inlined print_dword_at::at#0 = (const byte*) main::BASE_SCREEN#0 Constant inlined malloc::return#2 = (const void*) malloc::return#0 Constant inlined bsearch16u::num#2 = (const byte) NUM_SQUARES#3 -Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0 +Constant inlined main::toD0182_$4#0 = (word)(const byte*) main::BASE_CHARSET#0 +Constant inlined main::toD0182_$6#0 = >(word)(const byte*) main::BASE_CHARSET#0/(byte) 4 Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN#0&(word) $3fff -Constant inlined init_font_hex::i#0 = (byte) 0 -Constant inlined bsearch16u::$17 = (byte) 1*(const byte) SIZEOF_WORD -Constant inlined bsearch16u::$18 = (byte) 1*(const byte) SIZEOF_WORD -Constant inlined main::toD0181_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4 Constant inlined main::toD0181_$7#0 = >(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f Constant inlined init_dist_screen::screen#0 = (const byte*) SCREEN#0 Constant inlined init_font_hex::idx#1 = ++(byte) 0 Constant inlined init_font_hex::idx#0 = (byte) 0 Constant inlined init_dist_screen::screen_bottomline#0 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 -Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0182_$0#0 = (word)(const byte*) main::BASE_SCREEN#0 Constant inlined init_squares::i#0 = (byte) 0 Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 -Constant inlined main::toD0181_$4#0 = (word)(const byte*) CHARSET#0 +Constant inlined main::toD0182_$2#0 = (word)(const byte*) main::BASE_SCREEN#0&(word) $3fff*(byte) 4 Constant inlined main::toD0181_$5#0 = >(word)(const byte*) CHARSET#0 Constant inlined init_font_hex::proto_lo#0 = (const byte[]) FONT_HEX_PROTO#0 +Constant inlined bsearch16u::items#1 = (const word*) SQUARES#1 +Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0 +Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 +Constant inlined init_squares::sqr#0 = (byte) 0 +Constant inlined init_dist_screen::y#0 = (byte) 0 +Constant inlined init_dist_screen::xb#0 = (byte) $27 +Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET#0 +Constant inlined init_font_hex::c1#0 = (byte) 0 +Constant inlined main::toD0182_$3#0 = >(word)(const byte*) main::BASE_SCREEN#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0 +Constant inlined main::toD0182_$5#0 = >(word)(const byte*) main::BASE_CHARSET#0 +Constant inlined init_font_hex::i#0 = (byte) 0 +Constant inlined main::toD0182_$7#0 = >(word)(const byte*) main::BASE_CHARSET#0/(byte) 4&(byte) $f +Constant inlined bsearch16u::$17 = (byte) 1*(const byte) SIZEOF_WORD +Constant inlined bsearch16u::$18 = (byte) 1*(const byte) SIZEOF_WORD +Constant inlined clock_start::$1 = (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +Constant inlined main::toD0181_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4 +Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$4#0 = (word)(const byte*) CHARSET#0 +Constant inlined main::toD0182_$1#0 = (word)(const byte*) main::BASE_SCREEN#0&(word) $3fff Constant inlined malloc::mem#0 = (const byte*) HEAP_START#0 Constant inlined init_font_hex::c#0 = (byte) 0 Constant inlined init_squares::$1 = (const void*) malloc::return#0 +Constant inlined print_word_at::at#1 = (const byte*) main::BASE_SCREEN#0+(byte) 4 +Constant inlined print_word_at::at#0 = (const byte*) main::BASE_SCREEN#0 Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 -Constant inlined bsearch16u::items#1 = (const word*) SQUARES#1 Successful SSA optimization Pass2ConstantInlining Simplifying constant integer increment ++0 Successful SSA optimization Pass2ConstantSimplification @@ -1793,14 +2349,23 @@ Adding NOP phi() at start of @begin Adding NOP phi() at start of @3 Adding NOP phi() at start of @6 Adding NOP phi() at start of @11 -Adding NOP phi() at start of @13 -Adding NOP phi() at start of @14 +Adding NOP phi() at start of @27 +Adding NOP phi() at start of @34 +Adding NOP phi() at start of @36 +Adding NOP phi() at start of @37 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@2 +Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::toD0181_@return -Adding NOP phi() at start of main::@3 +Adding NOP phi() at start of main::@4 +Adding NOP phi() at start of main::@5 +Adding NOP phi() at start of main::@7 +Adding NOP phi() at start of main::toD0182 +Adding NOP phi() at start of main::toD0182_@return +Adding NOP phi() at start of print_dword_at::@2 +Adding NOP phi() at start of print_word_at::@2 +Adding NOP phi() at start of print_byte_at::@2 Adding NOP phi() at start of init_dist_screen Adding NOP phi() at start of init_dist_screen::@15 Adding NOP phi() at start of bsearch16u @@ -1809,54 +2374,73 @@ Adding NOP phi() at start of init_squares::@3 Adding NOP phi() at start of malloc Adding NOP phi() at start of init_font_hex CALL GRAPH -Calls in [] to main:5 -Calls in [main] to init_font_hex:9 init_dist_screen:14 -Calls in [init_dist_screen] to init_squares:18 sqr:28 sqr:39 sqrt:44 -Calls in [sqrt] to bsearch16u:69 -Calls in [init_squares] to malloc:109 +Calls in [] to main:7 +Calls in [main] to init_font_hex:11 clock_start:16 init_dist_screen:18 clock:20 print_dword_at:25 +Calls in [print_dword_at] to print_word_at:33 print_word_at:36 +Calls in [print_word_at] to print_byte_at:44 print_byte_at:49 +Calls in [print_byte_at] to print_char_at:58 print_char_at:64 +Calls in [init_dist_screen] to init_squares:73 sqr:83 sqr:94 sqrt:99 +Calls in [sqrt] to bsearch16u:124 +Calls in [init_squares] to malloc:164 -Created 25 initial phi equivalence classes -Coalesced [24] init_dist_screen::yd#2 ← init_dist_screen::$5 -Coalesced [27] sqr::val#3 ← sqr::val#0 -Coalesced [35] init_dist_screen::xd#2 ← init_dist_screen::$13 -Coalesced [38] sqr::val#4 ← sqr::val#1 -Coalesced [59] init_dist_screen::y#14 ← init_dist_screen::y#1 -Coalesced [60] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 -Coalesced [61] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 -Coalesced [62] init_dist_screen::x#8 ← init_dist_screen::x#1 -Coalesced [63] init_dist_screen::xb#8 ← init_dist_screen::xb#1 -Coalesced [65] init_dist_screen::xd#1 ← init_dist_screen::$15 -Coalesced [67] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [81] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [83] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [86] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [92] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [96] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [97] bsearch16u::items#11 ← bsearch16u::items#0 -Coalesced [100] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [101] bsearch16u::items#10 ← bsearch16u::items#8 -Coalesced [102] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [103] bsearch16u::items#12 ← bsearch16u::items#2 -Coalesced [120] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [121] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [122] init_squares::i#3 ← init_squares::i#1 -Coalesced [127] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [149] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [150] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [151] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [152] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [153] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [154] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [155] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [156] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 21 phi equivalence classes +Created 31 initial phi equivalence classes +Coalesced [32] print_word_at::w#4 ← print_word_at::w#0 +Coalesced [35] print_word_at::w#5 ← print_word_at::w#1 +Coalesced [42] print_byte_at::b#4 ← print_byte_at::b#0 +Coalesced [43] print_byte_at::at#4 ← print_byte_at::at#0 +Coalesced [47] print_byte_at::b#5 ← print_byte_at::b#1 +Coalesced [48] print_byte_at::at#5 ← print_byte_at::at#1 +Coalesced [56] print_char_at::ch#3 ← print_char_at::ch#0 +Coalesced [57] print_char_at::at#3 ← print_char_at::at#0 +Coalesced [62] print_char_at::ch#4 ← print_char_at::ch#1 +Coalesced [63] print_char_at::at#4 ← print_char_at::at#1 +Coalesced [79] init_dist_screen::yd#2 ← init_dist_screen::$5 +Coalesced [82] sqr::val#3 ← sqr::val#0 +Coalesced [90] init_dist_screen::xd#2 ← init_dist_screen::$13 +Coalesced [93] sqr::val#4 ← sqr::val#1 +Coalesced [114] init_dist_screen::y#14 ← init_dist_screen::y#1 +Coalesced [115] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 +Coalesced [116] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 +Coalesced [117] init_dist_screen::x#8 ← init_dist_screen::x#1 +Coalesced [118] init_dist_screen::xb#8 ← init_dist_screen::xb#1 +Coalesced [120] init_dist_screen::xd#1 ← init_dist_screen::$15 +Coalesced [122] init_dist_screen::yd#1 ← init_dist_screen::$7 +Coalesced [136] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [138] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [141] bsearch16u::return#8 ← bsearch16u::items#2 +Not coalescing [147] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [151] bsearch16u::num#10 ← bsearch16u::num#1 +Coalesced [152] bsearch16u::items#11 ← bsearch16u::items#0 +Coalesced [155] bsearch16u::num#9 ← bsearch16u::num#0 +Coalesced [156] bsearch16u::items#10 ← bsearch16u::items#8 +Coalesced [157] bsearch16u::num#11 ← bsearch16u::num#3 +Coalesced (already) [158] bsearch16u::items#12 ← bsearch16u::items#2 +Coalesced [175] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [176] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [177] init_squares::i#3 ← init_squares::i#1 +Coalesced [188] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [210] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [211] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [212] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [213] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [214] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [215] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [216] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [217] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced down to 27 phi equivalence classes Culled Empty Block (label) @3 Culled Empty Block (label) @6 Culled Empty Block (label) @11 -Culled Empty Block (label) @14 -Culled Empty Block (label) main::@2 -Culled Empty Block (label) main::toD0181_@return +Culled Empty Block (label) @27 +Culled Empty Block (label) @34 +Culled Empty Block (label) @37 Culled Empty Block (label) main::@3 +Culled Empty Block (label) main::toD0181_@return +Culled Empty Block (label) main::@7 +Culled Empty Block (label) main::toD0182_@return +Culled Empty Block (label) print_dword_at::@2 +Culled Empty Block (label) print_word_at::@2 +Culled Empty Block (label) print_byte_at::@2 Culled Empty Block (label) init_dist_screen::@15 Culled Empty Block (label) init_dist_screen::@19 Culled Empty Block (label) init_dist_screen::@20 @@ -1867,7 +2451,7 @@ Culled Empty Block (label) init_squares::@4 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 -Renumbering block @13 to @1 +Renumbering block @36 to @1 Renumbering block bsearch16u::@2 to bsearch16u::@1 Renumbering block bsearch16u::@3 to bsearch16u::@2 Renumbering block bsearch16u::@6 to bsearch16u::@3 @@ -1878,6 +2462,9 @@ Renumbering block bsearch16u::@10 to bsearch16u::@7 Renumbering block bsearch16u::@13 to bsearch16u::@8 Renumbering block bsearch16u::@15 to bsearch16u::@9 Renumbering block sqrt::@2 to sqrt::@1 +Renumbering block main::@4 to main::@3 +Renumbering block main::@5 to main::@4 +Renumbering block main::@6 to main::@5 Renumbering block init_dist_screen::@11 to init_dist_screen::@9 Renumbering block init_dist_screen::@16 to init_dist_screen::@10 Renumbering block init_dist_screen::@17 to init_dist_screen::@11 @@ -1887,6 +2474,9 @@ Adding NOP phi() at start of @1 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::@3 +Adding NOP phi() at start of main::@4 +Adding NOP phi() at start of main::toD0182 Adding NOP phi() at start of init_dist_screen Adding NOP phi() at start of bsearch16u Adding NOP phi() at start of init_squares @@ -1912,217 +2502,314 @@ main::toD0181: scope:[main] from main to:main::@1 main::@1: scope:[main] from main::toD0181 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 - [8] call init_dist_screen + [8] call clock_start + to:main::@3 +main::@3: scope:[main] from main::@1 + [9] phi() + [10] call init_dist_screen + to:main::@4 +main::@4: scope:[main] from main::@3 + [11] phi() + [12] call clock + [13] (dword) clock::return#2 ← (dword) clock::return#0 + to:main::@5 +main::@5: scope:[main] from main::@4 + [14] (dword~) main::$4 ← (dword) clock::return#2 + [15] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 + [16] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 + [17] call print_dword_at + to:main::toD0182 +main::toD0182: scope:[main] from main::@5 + [18] phi() + to:main::@2 +main::@2: scope:[main] from main::toD0182 + [19] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 to:main::@return -main::@return: scope:[main] from main::@1 - [9] return +main::@return: scope:[main] from main::@2 + [20] return to:@return -init_dist_screen: scope:[init_dist_screen] from main::@1 - [10] phi() - [11] call init_squares - to:init_dist_screen::@1 -init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen init_dist_screen::@9 - [12] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 ) - [12] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen/(const byte*) SCREEN#0 ) - [12] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 ) - [13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 - [14] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 - to:init_dist_screen::@3 -init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 - to:init_dist_screen::@4 -init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - [16] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) - [17] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - [18] call sqr - [19] (word) sqr::return#2 ← (word) sqr::return#0 - to:init_dist_screen::@10 -init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@4 - [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - to:init_dist_screen::@5 -init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@12 - [21] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 ) - [21] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 ) - [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 - [23] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 - to:init_dist_screen::@7 -init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 - to:init_dist_screen::@8 -init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 - [25] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) - [26] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - [27] call sqr - [28] (word) sqr::return#3 ← (word) sqr::return#0 - to:init_dist_screen::@11 -init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@8 - [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 - [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - [32] call sqrt - [33] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - to:init_dist_screen::@12 -init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11 - [34] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - [35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 - [37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 - [39] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 - [40] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 - [41] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 - to:init_dist_screen::@9 -init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@12 - [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 - [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 - [44] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 - [45] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 - to:init_dist_screen::@return -init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 +print_dword_at: scope:[print_dword_at] from main::@5 + [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 + [22] call print_word_at + to:print_dword_at::@1 +print_dword_at::@1: scope:[print_dword_at] from print_dword_at + [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 + [24] call print_word_at + to:print_dword_at::@return +print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 + [25] return + to:@return +print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 + [26] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) main::BASE_SCREEN#0 print_dword_at::@1/(const byte*) main::BASE_SCREEN#0+(byte) 4 ) + [26] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) + [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 + [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 + [29] call print_byte_at + to:print_word_at::@1 +print_word_at::@1: scope:[print_word_at] from print_word_at + [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 + [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 + [32] call print_byte_at + to:print_word_at::@return +print_word_at::@return: scope:[print_word_at] from print_word_at::@1 + [33] return + to:@return +print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 + [34] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) + [34] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) + [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 + [36] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) + [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 + [38] call print_char_at + to:print_byte_at::@1 +print_byte_at::@1: scope:[print_byte_at] from print_byte_at + [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f + [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 + [41] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2) + [42] call print_char_at + to:print_byte_at::@return +print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 + [43] return + to:@return +print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 + [44] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) + [44] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) + [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 + to:print_char_at::@return +print_char_at::@return: scope:[print_char_at] from print_char_at [46] return to:@return +clock: scope:[clock] from main::@4 + [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) + to:clock::@return +clock::@return: scope:[clock] from clock + [48] return + to:@return +init_dist_screen: scope:[init_dist_screen] from main::@3 + [49] phi() + [50] call init_squares + to:init_dist_screen::@1 +init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen init_dist_screen::@9 + [51] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 ) + [51] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen/(const byte*) SCREEN#0 ) + [51] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 ) + [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 + [53] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 + to:init_dist_screen::@3 +init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 + [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 + to:init_dist_screen::@4 +init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 + [55] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 ) + [56] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + [57] call sqr + [58] (word) sqr::return#2 ← (word) sqr::return#0 + to:init_dist_screen::@10 +init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@4 + [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + to:init_dist_screen::@5 +init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@12 + [60] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 ) + [60] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 ) + [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 + [62] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 + to:init_dist_screen::@7 +init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 + [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 + to:init_dist_screen::@8 +init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7 + [64] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 ) + [65] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + [66] call sqr + [67] (word) sqr::return#3 ← (word) sqr::return#0 + to:init_dist_screen::@11 +init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@8 + [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 + [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + [71] call sqrt + [72] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + to:init_dist_screen::@12 +init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11 + [73] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 + [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 + [78] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 + [79] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 + [80] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 + to:init_dist_screen::@9 +init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@12 + [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 + [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 + [83] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 + [84] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 + to:init_dist_screen::@return +init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9 + [85] return + to:@return init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - [47] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 + [86] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 to:init_dist_screen::@8 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - [48] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 + [87] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 sqrt: scope:[sqrt] from init_dist_screen::@11 - [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - [50] call bsearch16u - [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + [89] call bsearch16u + [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 to:sqrt::@1 sqrt::@1: scope:[sqrt] from sqrt - [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 - [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 - [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 + [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 + [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 to:sqrt::@return sqrt::@return: scope:[sqrt] from sqrt::@1 - [56] return + [95] return to:@return bsearch16u: scope:[bsearch16u] from sqrt - [57] phi() + [96] phi() to:bsearch16u::@3 bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [58] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [58] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [59] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 + [97] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) + [97] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 ) + [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD to:bsearch16u::@2 bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5 - [62] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [101] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) to:bsearch16u::@return bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8 - [63] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [64] return + [102] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [103] return to:@return bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 + [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 + [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 + [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) + [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 to:bsearch16u::@8 bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 + [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 to:bsearch16u::@return bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 + [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 to:bsearch16u::@9 bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [73] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 + [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 to:bsearch16u::@7 bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [74] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [74] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [75] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + [113] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) + [113] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) + [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8 - [76] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) - [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) + [115] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 ) + [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 + [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [79] return + [118] return to:@return init_squares: scope:[init_squares] from init_dist_screen - [80] phi() - [81] call malloc + [119] phi() + [120] call malloc to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [82] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [82] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [82] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) - [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [86] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [88] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [89] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 + [121] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) + [121] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) + [121] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) + [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [90] return + [129] return to:@return malloc: scope:[malloc] from init_squares - [91] phi() + [130] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc - [92] return + [131] return + to:@return +clock_start: scope:[clock_start] from main::@1 + [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + to:clock_start::@return +clock_start::@return: scope:[clock_start] from clock_start + [137] return to:@return init_font_hex: scope:[init_font_hex] from main - [93] phi() + [138] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [94] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [94] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) - [94] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [139] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [139] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 ) + [139] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [95] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [95] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) - [95] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) - [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [140] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [140] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 ) + [140] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 ) + [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [97] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [97] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [100] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [102] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [103] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [104] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [142] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [142] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [106] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [110] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [111] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [113] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [114] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [115] return + [160] return to:@return VARIABLE REGISTER WEIGHTS (byte*) CHARSET +(dword*) CIA2_TIMER_AB +(byte*) CIA2_TIMER_A_CONTROL +(byte*) CIA2_TIMER_B_CONTROL +(byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +(byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +(byte) CIA_TIMER_CONTROL_CONTINUOUS +(byte) CIA_TIMER_CONTROL_START +(byte) CIA_TIMER_CONTROL_STOP +(dword) CLOCKS_PER_INIT (byte*) D018 (byte[]) FONT_HEX_PROTO (byte*) HEAP_START @@ -2153,6 +2840,11 @@ VARIABLE REGISTER WEIGHTS (word*) bsearch16u::return#2 6.0 (word*) bsearch16u::return#3 4.0 (word*~) bsearch16u::return#6 4.0 +(dword()) clock() +(dword) clock::return +(dword) clock::return#0 1.3333333333333333 +(dword) clock::return#2 4.0 +(void()) clock_start() (byte*) heap_head (void()) init_dist_screen((byte*) init_dist_screen::screen) (byte~) init_dist_screen::$13 202.0 @@ -2231,6 +2923,11 @@ VARIABLE REGISTER WEIGHTS (word*) init_squares::squares#1 3.6666666666666665 (word*) init_squares::squares#2 16.5 (void()) main() +(dword~) main::$4 4.0 +(byte*) main::BASE_CHARSET +(byte*) main::BASE_SCREEN +(dword) main::cyclecount +(dword) main::cyclecount#0 4.0 (word~) main::toD0181_$0 (number~) main::toD0181_$1 (number~) main::toD0181_$2 @@ -2243,10 +2940,54 @@ VARIABLE REGISTER WEIGHTS (byte*) main::toD0181_gfx (byte) main::toD0181_return (byte*) main::toD0181_screen +(word~) main::toD0182_$0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$2 +(number~) main::toD0182_$3 +(word~) main::toD0182_$4 +(byte~) main::toD0182_$5 +(number~) main::toD0182_$6 +(number~) main::toD0182_$7 +(number~) main::toD0182_$8 +(byte*) main::toD0182_gfx +(byte) main::toD0182_return +(byte*) main::toD0182_screen (void*()) malloc((word) malloc::size) (byte*) malloc::mem (void*) malloc::return (word) malloc::size +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) +(byte~) print_byte_at::$0 4.0 +(byte~) print_byte_at::$2 2.0 +(byte*) print_byte_at::at +(byte*) print_byte_at::at#0 4.0 +(byte*) print_byte_at::at#1 4.0 +(byte*) print_byte_at::at#2 1.3333333333333333 +(byte) print_byte_at::b +(byte) print_byte_at::b#0 2.0 +(byte) print_byte_at::b#1 2.0 +(byte) print_byte_at::b#2 1.6 +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) +(byte*) print_char_at::at +(byte*) print_char_at::at#0 4.0 +(byte*) print_char_at::at#1 2.0 +(byte*) print_char_at::at#2 6.0 +(byte) print_char_at::ch +(byte) print_char_at::ch#0 2.0 +(byte) print_char_at::ch#1 4.0 +(byte) print_char_at::ch#2 6.0 +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) +(byte*) print_dword_at::at +(dword) print_dword_at::dw +(dword) print_dword_at::dw#0 2.0 +(byte[]) print_hextab +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) +(byte*) print_word_at::at +(byte*) print_word_at::at#2 0.8 +(word) print_word_at::w +(word) print_word_at::w#0 4.0 +(word) print_word_at::w#1 4.0 +(word) print_word_at::w#2 2.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 4.0 (word) sqr::return @@ -2270,6 +3011,12 @@ VARIABLE REGISTER WEIGHTS (word) sqrt::val#0 103.0 Initial phi equivalence classes +[ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +[ print_word_at::at#2 ] +[ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +[ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] +[ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +[ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] [ init_dist_screen::y#10 init_dist_screen::y#1 ] [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] @@ -2290,6 +3037,13 @@ Initial phi equivalence classes [ init_font_hex::c1#4 init_font_hex::c1#1 ] [ init_font_hex::i#2 init_font_hex::i#1 ] [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Added variable clock::return#2 to zero page equivalence class [ clock::return#2 ] +Added variable main::$4 to zero page equivalence class [ main::$4 ] +Added variable main::cyclecount#0 to zero page equivalence class [ main::cyclecount#0 ] +Added variable print_dword_at::dw#0 to zero page equivalence class [ print_dword_at::dw#0 ] +Added variable print_byte_at::$0 to zero page equivalence class [ print_byte_at::$0 ] +Added variable print_byte_at::$2 to zero page equivalence class [ print_byte_at::$2 ] +Added variable clock::return#0 to zero page equivalence class [ clock::return#0 ] Added variable init_dist_screen::y2#0 to zero page equivalence class [ init_dist_screen::y2#0 ] Added variable sqr::return#2 to zero page equivalence class [ sqr::return#2 ] Added variable init_dist_screen::yds#0 to zero page equivalence class [ init_dist_screen::yds#0 ] @@ -2319,6 +3073,12 @@ Added variable init_font_hex::$1 to zero page equivalence class [ init_font_hex: Added variable init_font_hex::$2 to zero page equivalence class [ init_font_hex::$2 ] Added variable init_font_hex::idx#3 to zero page equivalence class [ init_font_hex::idx#3 ] Complete equivalence classes +[ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +[ print_word_at::at#2 ] +[ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +[ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] +[ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +[ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] [ init_dist_screen::y#10 init_dist_screen::y#1 ] [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] @@ -2339,6 +3099,13 @@ Complete equivalence classes [ init_font_hex::c1#4 init_font_hex::c1#1 ] [ init_font_hex::i#2 init_font_hex::i#1 ] [ init_font_hex::idx#5 init_font_hex::idx#2 ] +[ clock::return#2 ] +[ main::$4 ] +[ main::cyclecount#0 ] +[ print_dword_at::dw#0 ] +[ print_byte_at::$0 ] +[ print_byte_at::$2 ] +[ clock::return#0 ] [ init_dist_screen::y2#0 ] [ sqr::return#2 ] [ init_dist_screen::yds#0 ] @@ -2367,54 +3134,67 @@ Complete equivalence classes [ init_font_hex::$1 ] [ init_font_hex::$2 ] [ init_font_hex::idx#3 ] -Allocated zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Allocated zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] -Allocated zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] -Allocated zp ZP_BYTE:7 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Allocated zp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Allocated zp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Allocated zp ZP_BYTE:11 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -Allocated zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -Allocated zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Allocated zp ZP_BYTE:15 [ sqr::val#2 sqr::val#0 sqr::val#1 ] -Allocated zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] -Allocated zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] -Allocated zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_BYTE:31 [ init_dist_screen::y2#0 ] -Allocated zp ZP_WORD:32 [ sqr::return#2 ] -Allocated zp ZP_WORD:34 [ init_dist_screen::yds#0 ] -Allocated zp ZP_BYTE:36 [ init_dist_screen::x2#0 ] -Allocated zp ZP_WORD:37 [ sqr::return#3 ] -Allocated zp ZP_WORD:39 [ init_dist_screen::xds#0 ] -Allocated zp ZP_WORD:41 [ init_dist_screen::ds#0 ] -Allocated zp ZP_WORD:43 [ sqrt::val#0 ] -Allocated zp ZP_BYTE:45 [ sqrt::return#2 ] -Allocated zp ZP_BYTE:46 [ init_dist_screen::d#0 ] -Allocated zp ZP_WORD:47 [ bsearch16u::key#0 ] -Allocated zp ZP_WORD:49 [ bsearch16u::return#3 ] -Allocated zp ZP_WORD:51 [ sqrt::found#0 ] -Allocated zp ZP_WORD:53 [ sqrt::$3 ] -Allocated zp ZP_WORD:55 [ sqrt::$1 ] -Allocated zp ZP_BYTE:57 [ sqrt::return#0 ] -Allocated zp ZP_BYTE:58 [ bsearch16u::$6 ] -Allocated zp ZP_BYTE:59 [ bsearch16u::$16 ] -Allocated zp ZP_WORD:60 [ bsearch16u::pivot#0 ] -Allocated zp ZP_WORD:62 [ bsearch16u::result#0 ] -Allocated zp ZP_BYTE:64 [ sqr::$0 ] -Allocated zp ZP_WORD:65 [ sqr::return#0 ] -Allocated zp ZP_BYTE:67 [ init_squares::$3 ] -Allocated zp ZP_BYTE:68 [ init_squares::$4 ] -Allocated zp ZP_BYTE:69 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:70 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:71 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:72 [ init_font_hex::idx#3 ] +Allocated zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +Allocated zp ZP_WORD:4 [ print_word_at::at#2 ] +Allocated zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Allocated zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] +Allocated zp ZP_BYTE:11 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +Allocated zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +Allocated zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Allocated zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] +Allocated zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] +Allocated zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Allocated zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Allocated zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Allocated zp ZP_BYTE:22 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] +Allocated zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] +Allocated zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Allocated zp ZP_BYTE:26 [ sqr::val#2 sqr::val#0 sqr::val#1 ] +Allocated zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] +Allocated zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] +Allocated zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated zp ZP_DWORD:42 [ clock::return#2 ] +Allocated zp ZP_DWORD:46 [ main::$4 ] +Allocated zp ZP_DWORD:50 [ main::cyclecount#0 ] +Allocated zp ZP_DWORD:54 [ print_dword_at::dw#0 ] +Allocated zp ZP_BYTE:58 [ print_byte_at::$0 ] +Allocated zp ZP_BYTE:59 [ print_byte_at::$2 ] +Allocated zp ZP_DWORD:60 [ clock::return#0 ] +Allocated zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] +Allocated zp ZP_WORD:65 [ sqr::return#2 ] +Allocated zp ZP_WORD:67 [ init_dist_screen::yds#0 ] +Allocated zp ZP_BYTE:69 [ init_dist_screen::x2#0 ] +Allocated zp ZP_WORD:70 [ sqr::return#3 ] +Allocated zp ZP_WORD:72 [ init_dist_screen::xds#0 ] +Allocated zp ZP_WORD:74 [ init_dist_screen::ds#0 ] +Allocated zp ZP_WORD:76 [ sqrt::val#0 ] +Allocated zp ZP_BYTE:78 [ sqrt::return#2 ] +Allocated zp ZP_BYTE:79 [ init_dist_screen::d#0 ] +Allocated zp ZP_WORD:80 [ bsearch16u::key#0 ] +Allocated zp ZP_WORD:82 [ bsearch16u::return#3 ] +Allocated zp ZP_WORD:84 [ sqrt::found#0 ] +Allocated zp ZP_WORD:86 [ sqrt::$3 ] +Allocated zp ZP_WORD:88 [ sqrt::$1 ] +Allocated zp ZP_BYTE:90 [ sqrt::return#0 ] +Allocated zp ZP_BYTE:91 [ bsearch16u::$6 ] +Allocated zp ZP_BYTE:92 [ bsearch16u::$16 ] +Allocated zp ZP_WORD:93 [ bsearch16u::pivot#0 ] +Allocated zp ZP_WORD:95 [ bsearch16u::result#0 ] +Allocated zp ZP_BYTE:97 [ sqr::$0 ] +Allocated zp ZP_WORD:98 [ sqr::return#0 ] +Allocated zp ZP_BYTE:100 [ init_squares::$3 ] +Allocated zp ZP_BYTE:101 [ init_squares::$4 ] +Allocated zp ZP_BYTE:102 [ init_font_hex::$0 ] +Allocated zp ZP_BYTE:103 [ init_font_hex::$1 ] +Allocated zp ZP_BYTE:104 [ init_font_hex::$2 ] +Allocated zp ZP_BYTE:105 [ init_font_hex::idx#3 ] INITIAL ASM //SEG0 File Comments @@ -2428,6 +3208,21 @@ INITIAL ASM // Start of the heap used by malloc() .label HEAP_START = $c000 .label D018 = $d018 + // CIA #2 Timer A+B Value (32-bit) + .label CIA2_TIMER_AB = $dd04 + // CIA #2 Timer A Control Register + .label CIA2_TIMER_A_CONTROL = $dd0e + // CIA #2 Timer B Control Register + .label CIA2_TIMER_B_CONTROL = $dd0f + // Timer Control - Start/stop timer (0:stop, 1: start) + .const CIA_TIMER_CONTROL_START = 1 + // Timer Control - Time CONTINUOUS/ONE-SHOT (0:CONTINUOUS, 1: ONE-SHOT) + .const CIA_TIMER_CONTROL_CONTINUOUS = 0 + // Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high) + .const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 + // Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine. + // To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code. + .const CLOCKS_PER_INIT = $12 .label CHARSET = $2000 .label SCREEN = $2800 .const NUM_SQUARES = $30 @@ -2450,9 +3245,14 @@ bend_from_b1: bend: //SEG10 main main: { + .label BASE_SCREEN = $400 + .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f + .label _4 = $2e + .label cyclecount = $32 //SEG11 [5] call init_font_hex - //SEG12 [93] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [138] phi from main to init_font_hex [phi:main->init_font_hex] init_font_hex_from_main: jsr init_font_hex //SEG13 [6] phi from main to main::toD0181 [phi:main->main::toD0181] @@ -2466,170 +3266,434 @@ main: { //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG17 [8] call init_dist_screen - //SEG18 [10] phi from main::@1 to init_dist_screen [phi:main::@1->init_dist_screen] - init_dist_screen_from_b1: + //SEG17 [8] call clock_start + jsr clock_start + //SEG18 [9] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + jmp b3 + //SEG19 main::@3 + b3: + //SEG20 [10] call init_dist_screen + //SEG21 [49] phi from main::@3 to init_dist_screen [phi:main::@3->init_dist_screen] + init_dist_screen_from_b3: jsr init_dist_screen + //SEG22 [11] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + b4_from_b3: + jmp b4 + //SEG23 main::@4 + b4: + //SEG24 [12] call clock + jsr clock + //SEG25 [13] (dword) clock::return#2 ← (dword) clock::return#0 -- vduz1=vduz2 + lda clock.return + sta clock.return_2 + lda clock.return+1 + sta clock.return_2+1 + lda clock.return+2 + sta clock.return_2+2 + lda clock.return+3 + sta clock.return_2+3 + jmp b5 + //SEG26 main::@5 + b5: + //SEG27 [14] (dword~) main::$4 ← (dword) clock::return#2 -- vduz1=vduz2 + lda clock.return_2 + sta _4 + lda clock.return_2+1 + sta _4+1 + lda clock.return_2+2 + sta _4+2 + lda clock.return_2+3 + sta _4+3 + //SEG28 [15] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz2_minus_vduc1 + lda _4 + sec + sbc #CLOCKS_PER_INIT + sta cyclecount+1 + lda _4+2 + sbc #>$10 + sta cyclecount+2 + lda _4+3 + sbc #>CLOCKS_PER_INIT>>$10 + sta cyclecount+3 + //SEG29 [16] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 -- vduz1=vduz2 + lda cyclecount + sta print_dword_at.dw + lda cyclecount+1 + sta print_dword_at.dw+1 + lda cyclecount+2 + sta print_dword_at.dw+2 + lda cyclecount+3 + sta print_dword_at.dw+3 + //SEG30 [17] call print_dword_at + jsr print_dword_at + //SEG31 [18] phi from main::@5 to main::toD0182 [phi:main::@5->main::toD0182] + toD0182_from_b5: + jmp toD0182 + //SEG32 main::toD0182 + toD0182: + jmp b2 + //SEG33 main::@2 + b2: + //SEG34 [19] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0182_return + sta D018 jmp breturn - //SEG19 main::@return + //SEG35 main::@return breturn: - //SEG20 [9] return + //SEG36 [20] return rts } -//SEG21 init_dist_screen +//SEG37 print_dword_at +// Print a dword as HEX at a specific position +// print_dword_at(dword zeropage($36) dw) +print_dword_at: { + .label dw = $36 + //SEG38 [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 -- vwuz1=_hi_vduz2 + lda dw+2 + sta print_word_at.w + lda dw+3 + sta print_word_at.w+1 + //SEG39 [22] call print_word_at + //SEG40 [26] phi from print_dword_at to print_word_at [phi:print_dword_at->print_word_at] + print_word_at_from_print_dword_at: + //SEG41 [26] phi (byte*) print_word_at::at#2 = (const byte*) main::BASE_SCREEN#0 [phi:print_dword_at->print_word_at#0] -- pbuz1=pbuc1 + lda #main.BASE_SCREEN + sta print_word_at.at+1 + //SEG42 [26] phi (word) print_word_at::w#2 = (word) print_word_at::w#0 [phi:print_dword_at->print_word_at#1] -- register_copy + jsr print_word_at + jmp b1 + //SEG43 print_dword_at::@1 + b1: + //SEG44 [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 -- vwuz1=_lo_vduz2 + lda dw + sta print_word_at.w + lda dw+1 + sta print_word_at.w+1 + //SEG45 [24] call print_word_at + //SEG46 [26] phi from print_dword_at::@1 to print_word_at [phi:print_dword_at::@1->print_word_at] + print_word_at_from_b1: + //SEG47 [26] phi (byte*) print_word_at::at#2 = (const byte*) main::BASE_SCREEN#0+(byte) 4 [phi:print_dword_at::@1->print_word_at#0] -- pbuz1=pbuc1 + lda #main.BASE_SCREEN+4 + sta print_word_at.at+1 + //SEG48 [26] phi (word) print_word_at::w#2 = (word) print_word_at::w#1 [phi:print_dword_at::@1->print_word_at#1] -- register_copy + jsr print_word_at + jmp breturn + //SEG49 print_dword_at::@return + breturn: + //SEG50 [25] return + rts +} +//SEG51 print_word_at +// Print a word as HEX at a specific position +// print_word_at(word zeropage(2) w, byte* zeropage(4) at) +print_word_at: { + .label w = 2 + .label at = 4 + //SEG52 [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 -- vbuz1=_hi_vwuz2 + lda w+1 + sta print_byte_at.b + //SEG53 [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 -- pbuz1=pbuz2 + lda at + sta print_byte_at.at + lda at+1 + sta print_byte_at.at+1 + //SEG54 [29] call print_byte_at + //SEG55 [34] phi from print_word_at to print_byte_at [phi:print_word_at->print_byte_at] + print_byte_at_from_print_word_at: + //SEG56 [34] phi (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#0 [phi:print_word_at->print_byte_at#0] -- register_copy + //SEG57 [34] phi (byte) print_byte_at::b#2 = (byte) print_byte_at::b#0 [phi:print_word_at->print_byte_at#1] -- register_copy + jsr print_byte_at + jmp b1 + //SEG58 print_word_at::@1 + b1: + //SEG59 [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 -- vbuz1=_lo_vwuz2 + lda w + sta print_byte_at.b + //SEG60 [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 -- pbuz1=pbuz2_plus_2 + lda at + clc + adc #2 + sta print_byte_at.at + lda at+1 + adc #0 + sta print_byte_at.at+1 + //SEG61 [32] call print_byte_at + //SEG62 [34] phi from print_word_at::@1 to print_byte_at [phi:print_word_at::@1->print_byte_at] + print_byte_at_from_b1: + //SEG63 [34] phi (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#1 [phi:print_word_at::@1->print_byte_at#0] -- register_copy + //SEG64 [34] phi (byte) print_byte_at::b#2 = (byte) print_byte_at::b#1 [phi:print_word_at::@1->print_byte_at#1] -- register_copy + jsr print_byte_at + jmp breturn + //SEG65 print_word_at::@return + breturn: + //SEG66 [33] return + rts +} +//SEG67 print_byte_at +// Print a byte as HEX at a specific position +// print_byte_at(byte zeropage(6) b, byte* zeropage(9) at) +print_byte_at: { + .label _0 = $3a + .label _2 = $3b + .label b = 6 + .label at = 9 + //SEG68 [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 + lda b + lsr + lsr + lsr + lsr + sta _0 + //SEG69 [36] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy _0 + lda print_hextab,y + sta print_char_at.ch + //SEG70 [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 -- pbuz1=pbuz2 + lda at + sta print_char_at.at + lda at+1 + sta print_char_at.at+1 + //SEG71 [38] call print_char_at + //SEG72 [44] phi from print_byte_at to print_char_at [phi:print_byte_at->print_char_at] + print_char_at_from_print_byte_at: + //SEG73 [44] phi (byte*) print_char_at::at#2 = (byte*) print_char_at::at#0 [phi:print_byte_at->print_char_at#0] -- register_copy + //SEG74 [44] phi (byte) print_char_at::ch#2 = (byte) print_char_at::ch#0 [phi:print_byte_at->print_char_at#1] -- register_copy + jsr print_char_at + jmp b1 + //SEG75 print_byte_at::@1 + b1: + //SEG76 [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + lda #$f + and b + sta _2 + //SEG77 [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 -- pbuz1=pbuz2_plus_1 + lda at + clc + adc #1 + sta print_char_at.at + lda at+1 + adc #0 + sta print_char_at.at+1 + //SEG78 [41] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy _2 + lda print_hextab,y + sta print_char_at.ch + //SEG79 [42] call print_char_at + //SEG80 [44] phi from print_byte_at::@1 to print_char_at [phi:print_byte_at::@1->print_char_at] + print_char_at_from_b1: + //SEG81 [44] phi (byte*) print_char_at::at#2 = (byte*) print_char_at::at#1 [phi:print_byte_at::@1->print_char_at#0] -- register_copy + //SEG82 [44] phi (byte) print_char_at::ch#2 = (byte) print_char_at::ch#1 [phi:print_byte_at::@1->print_char_at#1] -- register_copy + jsr print_char_at + jmp breturn + //SEG83 print_byte_at::@return + breturn: + //SEG84 [43] return + rts +} +//SEG85 print_char_at +// Print a single char +// print_char_at(byte zeropage($b) ch, byte* zeropage($c) at) +print_char_at: { + .label ch = $b + .label at = $c + //SEG86 [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 -- _deref_pbuz1=vbuz2 + lda ch + ldy #0 + sta (at),y + jmp breturn + //SEG87 print_char_at::@return + breturn: + //SEG88 [46] return + rts +} +//SEG89 clock +// Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). +// This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() +clock: { + .label return = $3c + .label return_2 = $2a + //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 + lda #<$ffffffff + sec + sbc CIA2_TIMER_AB + sta return + lda #>$ffffffff + sbc CIA2_TIMER_AB+1 + sta return+1 + lda #<$ffffffff>>$10 + sbc CIA2_TIMER_AB+2 + sta return+2 + lda #>$ffffffff>>$10 + sbc CIA2_TIMER_AB+3 + sta return+3 + jmp breturn + //SEG91 clock::@return + breturn: + //SEG92 [48] return + rts +} +//SEG93 init_dist_screen // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision init_dist_screen: { - .label _5 = 7 - .label _7 = 7 - .label _13 = $b - .label _15 = $b - .label y2 = $1f - .label yd = 7 - .label yds = $22 - .label x2 = $24 - .label xd = $b - .label xds = $27 - .label ds = $29 - .label d = $2e - .label x = 9 - .label xb = $a - .label screen_topline = 3 - .label screen_bottomline = 5 - .label y = 2 - //SEG22 [11] call init_squares - //SEG23 [80] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + .label _5 = $13 + .label _7 = $13 + .label _13 = $16 + .label _15 = $16 + .label y2 = $40 + .label yd = $13 + .label yds = $43 + .label x2 = $45 + .label xd = $16 + .label xds = $48 + .label ds = $4a + .label d = $4f + .label x = $14 + .label xb = $15 + .label screen_topline = $f + .label screen_bottomline = $11 + .label y = $e + //SEG94 [50] call init_squares + //SEG95 [119] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares - //SEG24 [12] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] + //SEG96 [51] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] b1_from_init_dist_screen: - //SEG25 [12] phi (byte*) init_dist_screen::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:init_dist_screen->init_dist_screen::@1#0] -- pbuz1=pbuc1 + //SEG97 [51] phi (byte*) init_dist_screen::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:init_dist_screen->init_dist_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$18 sta screen_bottomline+1 - //SEG26 [12] phi (byte*) init_dist_screen::screen_topline#10 = (const byte*) SCREEN#0 [phi:init_dist_screen->init_dist_screen::@1#1] -- pbuz1=pbuc1 + //SEG98 [51] phi (byte*) init_dist_screen::screen_topline#10 = (const byte*) SCREEN#0 [phi:init_dist_screen->init_dist_screen::@1#1] -- pbuz1=pbuc1 lda #SCREEN sta screen_topline+1 - //SEG27 [12] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen->init_dist_screen::@1#2] -- vbuz1=vbuc1 + //SEG99 [51] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen->init_dist_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 - //SEG28 [12] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] + //SEG100 [51] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] b1_from_b9: - //SEG29 [12] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy - //SEG30 [12] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy - //SEG31 [12] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + //SEG101 [51] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy + //SEG102 [51] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy + //SEG103 [51] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy jmp b1 - //SEG32 init_dist_screen::@1 + //SEG104 init_dist_screen::@1 b1: - //SEG33 [13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG105 [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda y asl sta y2 - //SEG34 [14] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuz1_ge_vbuc1_then_la1 + //SEG106 [53] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuz1_ge_vbuc1_then_la1 lda y2 cmp #$18 bcs b2 jmp b3 - //SEG35 init_dist_screen::@3 + //SEG107 init_dist_screen::@3 b3: - //SEG36 [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuz1=vbuc1_minus_vbuz2 + //SEG108 [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuz1=vbuc1_minus_vbuz2 lda #$18 sec sbc y2 sta _5 - //SEG37 [16] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] + //SEG109 [55] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] b4_from_b2: b4_from_b3: - //SEG38 [16] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy + //SEG110 [55] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy jmp b4 - //SEG39 init_dist_screen::@4 + //SEG111 init_dist_screen::@4 b4: - //SEG40 [17] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 -- vbuz1=vbuz2 + //SEG112 [56] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 -- vbuz1=vbuz2 lda yd sta sqr.val - //SEG41 [18] call sqr - //SEG42 [76] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + //SEG113 [57] call sqr + //SEG114 [115] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - //SEG43 [76] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + //SEG115 [115] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr - //SEG44 [19] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG116 [58] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_2 lda sqr.return+1 sta sqr.return_2+1 jmp b10 - //SEG45 init_dist_screen::@10 + //SEG117 init_dist_screen::@10 b10: - //SEG46 [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 -- vwuz1=vwuz2 + //SEG118 [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 -- vwuz1=vwuz2 lda sqr.return_2 sta yds lda sqr.return_2+1 sta yds+1 - //SEG47 [21] phi from init_dist_screen::@10 to init_dist_screen::@5 [phi:init_dist_screen::@10->init_dist_screen::@5] + //SEG119 [60] phi from init_dist_screen::@10 to init_dist_screen::@5 [phi:init_dist_screen::@10->init_dist_screen::@5] b5_from_b10: - //SEG48 [21] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@10->init_dist_screen::@5#0] -- vbuz1=vbuc1 + //SEG120 [60] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@10->init_dist_screen::@5#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG49 [21] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@5#1] -- vbuz1=vbuc1 + //SEG121 [60] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@5#1] -- vbuz1=vbuc1 lda #0 sta x jmp b5 - //SEG50 [21] phi from init_dist_screen::@12 to init_dist_screen::@5 [phi:init_dist_screen::@12->init_dist_screen::@5] + //SEG122 [60] phi from init_dist_screen::@12 to init_dist_screen::@5 [phi:init_dist_screen::@12->init_dist_screen::@5] b5_from_b12: - //SEG51 [21] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@12->init_dist_screen::@5#0] -- register_copy - //SEG52 [21] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@12->init_dist_screen::@5#1] -- register_copy + //SEG123 [60] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@12->init_dist_screen::@5#0] -- register_copy + //SEG124 [60] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@12->init_dist_screen::@5#1] -- register_copy jmp b5 - //SEG53 init_dist_screen::@5 + //SEG125 init_dist_screen::@5 b5: - //SEG54 [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG126 [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda x asl sta x2 - //SEG55 [23] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuz1_ge_vbuc1_then_la1 + //SEG127 [62] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuz1_ge_vbuc1_then_la1 lda x2 cmp #$27 bcs b6 jmp b7 - //SEG56 init_dist_screen::@7 + //SEG128 init_dist_screen::@7 b7: - //SEG57 [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuz1=vbuc1_minus_vbuz2 + //SEG129 [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuz1=vbuc1_minus_vbuz2 lda #$27 sec sbc x2 sta _13 - //SEG58 [25] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] + //SEG130 [64] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] b8_from_b6: b8_from_b7: - //SEG59 [25] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy + //SEG131 [64] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy jmp b8 - //SEG60 init_dist_screen::@8 + //SEG132 init_dist_screen::@8 b8: - //SEG61 [26] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 -- vbuz1=vbuz2 + //SEG133 [65] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 -- vbuz1=vbuz2 lda xd sta sqr.val - //SEG62 [27] call sqr - //SEG63 [76] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + //SEG134 [66] call sqr + //SEG135 [115] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - //SEG64 [76] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + //SEG136 [115] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr - //SEG65 [28] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG137 [67] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_3 lda sqr.return+1 sta sqr.return_3+1 jmp b11 - //SEG66 init_dist_screen::@11 + //SEG138 init_dist_screen::@11 b11: - //SEG67 [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 -- vwuz1=vwuz2 + //SEG139 [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 -- vwuz1=vwuz2 lda sqr.return_3 sta xds lda sqr.return_3+1 sta xds+1 - //SEG68 [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz2_plus_vwuz3 + //SEG140 [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz2_plus_vwuz3 lda xds clc adc yds @@ -2637,50 +3701,50 @@ init_dist_screen: { lda xds+1 adc yds+1 sta ds+1 - //SEG69 [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 -- vwuz1=vwuz2 + //SEG141 [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 -- vwuz1=vwuz2 lda ds sta sqrt.val lda ds+1 sta sqrt.val+1 - //SEG70 [32] call sqrt + //SEG142 [71] call sqrt jsr sqrt - //SEG71 [33] (byte) sqrt::return#2 ← (byte) sqrt::return#0 -- vbuz1=vbuz2 + //SEG143 [72] (byte) sqrt::return#2 ← (byte) sqrt::return#0 -- vbuz1=vbuz2 lda sqrt.return sta sqrt.return_2 jmp b12 - //SEG72 init_dist_screen::@12 + //SEG144 init_dist_screen::@12 b12: - //SEG73 [34] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 -- vbuz1=vbuz2 + //SEG145 [73] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 -- vbuz1=vbuz2 lda sqrt.return_2 sta d - //SEG74 [35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG146 [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 lda d ldy x sta (screen_topline),y - //SEG75 [36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG147 [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 lda d ldy x sta (screen_bottomline),y - //SEG76 [37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG148 [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 lda d ldy xb sta (screen_topline),y - //SEG77 [38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG149 [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 lda d ldy xb sta (screen_bottomline),y - //SEG78 [39] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + //SEG150 [78] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG79 [40] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + //SEG151 [79] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG80 [41] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG152 [80] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$13+1 bcc b5_from_b12 jmp b9 - //SEG81 init_dist_screen::@9 + //SEG153 init_dist_screen::@9 b9: - //SEG82 [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG154 [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_topline @@ -2688,7 +3752,7 @@ init_dist_screen: { bcc !+ inc screen_topline+1 !: - //SEG83 [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + //SEG155 [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 lda screen_bottomline sec sbc #<$28 @@ -2696,67 +3760,67 @@ init_dist_screen: { lda screen_bottomline+1 sbc #>$28 sta screen_bottomline+1 - //SEG84 [44] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + //SEG156 [83] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 inc y - //SEG85 [45] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG157 [84] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1_from_b9 jmp breturn - //SEG86 init_dist_screen::@return + //SEG158 init_dist_screen::@return breturn: - //SEG87 [46] return + //SEG159 [85] return rts - //SEG88 init_dist_screen::@6 + //SEG160 init_dist_screen::@6 b6: - //SEG89 [47] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuz1=vbuz2_minus_vbuc1 + //SEG161 [86] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuz1=vbuz2_minus_vbuc1 lax x2 axs #$27 stx _15 jmp b8_from_b6 - //SEG90 init_dist_screen::@2 + //SEG162 init_dist_screen::@2 b2: - //SEG91 [48] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuz1=vbuz2_minus_vbuc1 + //SEG163 [87] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuz1=vbuz2_minus_vbuc1 lax y2 axs #$18 stx _7 jmp b4_from_b2 } -//SEG92 sqrt +//SEG164 sqrt // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($2b) val) +// sqrt(word zeropage($4c) val) sqrt: { - .label _1 = $37 - .label _3 = $35 - .label found = $33 - .label return = $39 - .label val = $2b - .label return_2 = $2d - //SEG93 [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 + .label _1 = $58 + .label _3 = $56 + .label found = $54 + .label return = $5a + .label val = $4c + .label return_2 = $4e + //SEG165 [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 lda val sta bsearch16u.key lda val+1 sta bsearch16u.key+1 - //SEG94 [50] call bsearch16u - //SEG95 [57] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + //SEG166 [89] call bsearch16u + //SEG167 [96] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: jsr bsearch16u - //SEG96 [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 -- pwuz1=pwuz2 + //SEG168 [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 -- pwuz1=pwuz2 lda bsearch16u.return sta bsearch16u.return_3 lda bsearch16u.return+1 sta bsearch16u.return_3+1 jmp b1 - //SEG97 sqrt::@1 + //SEG169 sqrt::@1 b1: - //SEG98 [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 -- pwuz1=pwuz2 + //SEG170 [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 -- pwuz1=pwuz2 lda bsearch16u.return_3 sta found lda bsearch16u.return_3+1 sta found+1 - //SEG99 [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz2_minus_pwuc1 + //SEG171 [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz2_minus_pwuc1 lda found sec sbc #SQUARES sta _3+1 - //SEG100 [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + //SEG172 [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz2_ror_1 lda _3+1 lsr sta _1+1 lda _3 ror sta _1 - //SEG101 [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuz1=_byte_vwuz2 + //SEG173 [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuz1=_byte_vwuz2 lda _1 sta return jmp breturn - //SEG102 sqrt::@return + //SEG174 sqrt::@return breturn: - //SEG103 [56] return + //SEG175 [95] return rts } -//SEG104 bsearch16u +//SEG176 bsearch16u // Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. // - key - The value to look for // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($2f) key, word* zeropage($c) items, byte zeropage($e) num) +// bsearch16u(word zeropage($50) key, word* zeropage($17) items, byte zeropage($19) num) bsearch16u: { - .label _2 = $c - .label _6 = $3a - .label _16 = $3b - .label pivot = $3c - .label result = $3e - .label return = $c - .label num = $e - .label items = $c - .label key = $2f - .label return_3 = $31 - //SEG105 [58] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + .label _2 = $17 + .label _6 = $5b + .label _16 = $5c + .label pivot = $5d + .label result = $5f + .label return = $17 + .label num = $19 + .label items = $17 + .label key = $50 + .label return_3 = $52 + //SEG177 [97] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] b3_from_bsearch16u: - //SEG106 [58] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + //SEG178 [97] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 lda #SQUARES sta items+1 - //SEG107 [58] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 + //SEG179 [97] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 lda #NUM_SQUARES sta num jmp b3 - //SEG108 bsearch16u::@3 + //SEG180 bsearch16u::@3 b3: - //SEG109 [59] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 + //SEG181 [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 lda num bne b4 jmp b5 - //SEG110 bsearch16u::@5 + //SEG182 bsearch16u::@5 b5: - //SEG111 [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + //SEG183 [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -2829,9 +3893,9 @@ bsearch16u: { !: bcc b2_from_b5 jmp b1 - //SEG112 bsearch16u::@1 + //SEG184 bsearch16u::@1 b1: - //SEG113 [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + //SEG185 [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -2839,33 +3903,33 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - //SEG114 [62] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + //SEG186 [101] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - //SEG115 [62] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + //SEG187 [101] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 - //SEG116 bsearch16u::@2 + //SEG188 bsearch16u::@2 b2: - //SEG117 [63] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + //SEG189 [102] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] breturn_from_b2: breturn_from_b8: - //SEG118 [63] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + //SEG190 [102] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy jmp breturn - //SEG119 bsearch16u::@return + //SEG191 bsearch16u::@return breturn: - //SEG120 [64] return + //SEG192 [103] return rts - //SEG121 bsearch16u::@4 + //SEG193 bsearch16u::@4 b4: - //SEG122 [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + //SEG194 [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda num lsr sta _6 - //SEG123 [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG195 [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _6 asl sta _16 - //SEG124 [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 + //SEG196 [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 lda _16 clc adc items @@ -2873,7 +3937,7 @@ bsearch16u: { lda #0 adc items+1 sta pivot+1 - //SEG125 [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + //SEG197 [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -2883,23 +3947,23 @@ bsearch16u: { iny sbc (pivot),y sta result+1 - //SEG126 [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + //SEG198 [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 lda result+1 bne b6 lda result bne b6 jmp b8 - //SEG127 bsearch16u::@8 + //SEG199 bsearch16u::@8 b8: - //SEG128 [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + //SEG200 [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 lda pivot sta return lda pivot+1 sta return+1 jmp breturn_from_b8 - //SEG129 bsearch16u::@6 + //SEG201 bsearch16u::@6 b6: - //SEG130 [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + //SEG202 [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 lda result+1 bmi b7_from_b6 bne !+ @@ -2907,9 +3971,9 @@ bsearch16u: { beq b7_from_b6 !: jmp b9 - //SEG131 bsearch16u::@9 + //SEG203 bsearch16u::@9 b9: - //SEG132 [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + //SEG204 [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 lda #1*SIZEOF_WORD clc adc pivot @@ -2917,95 +3981,95 @@ bsearch16u: { lda #0 adc pivot+1 sta items+1 - //SEG133 [73] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 + //SEG205 [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 dec num - //SEG134 [74] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + //SEG206 [113] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] b7_from_b6: b7_from_b9: - //SEG135 [74] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG136 [74] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + //SEG207 [113] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG208 [113] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy jmp b7 - //SEG137 bsearch16u::@7 + //SEG209 bsearch16u::@7 b7: - //SEG138 [75] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + //SEG210 [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr num - //SEG139 [58] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + //SEG211 [97] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] b3_from_b7: - //SEG140 [58] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG141 [58] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG212 [97] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG213 [97] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy jmp b3 } -//SEG142 sqr +//SEG214 sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte zeropage($f) val) +// sqr(byte zeropage($1a) val) sqr: { - .label _0 = $40 - .label return = $41 - .label val = $f - .label return_2 = $20 - .label return_3 = $25 - //SEG143 [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label _0 = $61 + .label return = $62 + .label val = $1a + .label return_2 = $41 + .label return_3 = $46 + //SEG215 [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda val asl sta _0 - //SEG144 [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuz2 + //SEG216 [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuz2 ldy _0 lda SQUARES,y sta return lda SQUARES+1,y sta return+1 jmp breturn - //SEG145 sqr::@return + //SEG217 sqr::@return breturn: - //SEG146 [79] return + //SEG218 [118] return rts } -//SEG147 init_squares +//SEG219 init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label _3 = $43 - .label _4 = $44 - .label squares = $12 - .label sqr = $10 - .label i = $14 - //SEG148 [81] call malloc - //SEG149 [91] phi from init_squares to malloc [phi:init_squares->malloc] + .label _3 = $64 + .label _4 = $65 + .label squares = $1d + .label sqr = $1b + .label i = $1f + //SEG220 [120] call malloc + //SEG221 [130] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: jsr malloc - //SEG150 [82] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + //SEG222 [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] b1_from_init_squares: - //SEG151 [82] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuz1=vbuc1 + //SEG223 [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG152 [82] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + //SEG224 [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #SQUARES sta squares+1 - //SEG153 [82] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + //SEG225 [121] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 lda #0 sta sqr lda #0 sta sqr+1 jmp b1 - //SEG154 [82] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + //SEG226 [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - //SEG155 [82] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG156 [82] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG157 [82] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + //SEG227 [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG228 [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG229 [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 - //SEG158 init_squares::@1 + //SEG230 init_squares::@1 b1: - //SEG159 [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + //SEG231 [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - //SEG160 [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + //SEG232 [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -3013,15 +4077,15 @@ init_squares: { bcc !+ inc squares+1 !: - //SEG161 [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG233 [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _3 - //SEG162 [86] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + //SEG234 [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy _3 iny sty _4 - //SEG163 [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + //SEG235 [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda _4 clc adc sqr @@ -3029,109 +4093,141 @@ init_squares: { bcc !+ inc sqr+1 !: - //SEG164 [88] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + //SEG236 [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG165 [89] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG237 [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_SQUARES-1+1 cmp i bne b1_from_b1 jmp breturn - //SEG166 init_squares::@return + //SEG238 init_squares::@return breturn: - //SEG167 [90] return + //SEG239 [129] return rts } -//SEG168 malloc +//SEG240 malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. malloc: { .label return = HEAP_START jmp breturn - //SEG169 malloc::@return + //SEG241 malloc::@return breturn: - //SEG170 [92] return + //SEG242 [131] return rts } -//SEG171 init_font_hex +//SEG243 clock_start +// Reset & start the processor clock time. The value can be read using clock(). +// This uses CIA #2 Timer A+B on the C64 +clock_start: { + //SEG244 [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // Setup CIA#2 timer A to count (down) CPU cycles + lda #CIA_TIMER_CONTROL_CONTINUOUS + sta CIA2_TIMER_A_CONTROL + //SEG245 [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A + sta CIA2_TIMER_B_CONTROL + //SEG246 [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + lda #<$ffffffff + sta CIA2_TIMER_AB + lda #>$ffffffff + sta CIA2_TIMER_AB+1 + lda #<$ffffffff>>$10 + sta CIA2_TIMER_AB+2 + lda #>$ffffffff>>$10 + sta CIA2_TIMER_AB+3 + //SEG247 [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A + sta CIA2_TIMER_B_CONTROL + //SEG248 [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_START + sta CIA2_TIMER_A_CONTROL + jmp breturn + //SEG249 clock_start::@return + breturn: + //SEG250 [137] return + rts +} +//SEG251 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($18) charset) +// init_font_hex(byte* zeropage($23) charset) init_font_hex: { - .label _0 = $45 - .label _1 = $46 - .label _2 = $47 - .label idx = $1e - .label i = $1d - .label idx_3 = $48 - .label proto_lo = $1a - .label charset = $18 - .label c1 = $1c - .label proto_hi = $15 - .label c = $17 - //SEG172 [94] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $66 + .label _1 = $67 + .label _2 = $68 + .label idx = $29 + .label i = $28 + .label idx_3 = $69 + .label proto_lo = $25 + .label charset = $23 + .label c1 = $27 + .label proto_hi = $20 + .label c = $22 + //SEG252 [139] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG173 [94] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG253 [139] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG174 [94] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + //SEG254 [139] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG175 [94] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG255 [139] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta charset+1 jmp b1 - //SEG176 [94] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG256 [139] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG177 [94] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - //SEG178 [94] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - //SEG179 [94] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + //SEG257 [139] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + //SEG258 [139] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + //SEG259 [139] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy jmp b1 - //SEG180 init_font_hex::@1 + //SEG260 init_font_hex::@1 b1: - //SEG181 [95] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG261 [140] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG182 [95] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG262 [140] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - //SEG183 [95] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + //SEG263 [140] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG184 [95] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + //SEG264 [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG185 [95] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG265 [140] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG186 [95] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - //SEG187 [95] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - //SEG188 [95] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + //SEG266 [140] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + //SEG267 [140] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + //SEG268 [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG189 init_font_hex::@2 + //SEG269 init_font_hex::@2 b2: - //SEG190 [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG270 [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG191 [97] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG271 [142] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG192 [97] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG272 [142] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - //SEG193 [97] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG273 [142] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 lda #0 sta i jmp b3 - //SEG194 [97] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG274 [142] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG195 [97] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - //SEG196 [97] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + //SEG275 [142] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + //SEG276 [142] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy jmp b3 - //SEG197 init_font_hex::@3 + //SEG277 init_font_hex::@3 b3: - //SEG198 [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuz3_rol_4 + //SEG278 [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuz3_rol_4 ldy i lda (proto_hi),y asl @@ -3139,43 +4235,43 @@ init_font_hex: { asl asl sta _0 - //SEG199 [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuz1=pbuz2_derefidx_vbuz3_rol_1 + //SEG279 [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuz1=pbuz2_derefidx_vbuz3_rol_1 ldy i lda (proto_lo),y asl sta _1 - //SEG200 [100] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG280 [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 lda _0 ora _1 sta _2 - //SEG201 [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG281 [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 lda _2 ldy idx sta (charset),y - //SEG202 [102] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG282 [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG203 [103] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG283 [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG204 [104] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG284 [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp i bne b3_from_b3 jmp b4 - //SEG205 init_font_hex::@4 + //SEG285 init_font_hex::@4 b4: - //SEG206 [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG286 [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - //SEG207 [106] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG287 [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG208 [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG288 [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx_3 sta (charset),y - //SEG209 [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG289 [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -3183,7 +4279,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG210 [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG290 [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3191,16 +4287,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG211 [110] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG291 [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG212 [111] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG292 [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2_from_b4 jmp b5 - //SEG213 init_font_hex::@5 + //SEG293 init_font_hex::@5 b5: - //SEG214 [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG294 [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -3208,295 +4304,403 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG215 [113] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG295 [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG216 [114] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG296 [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1_from_b5 jmp breturn - //SEG217 init_font_hex::@return + //SEG297 init_font_hex::@return breturn: - //SEG218 [115] return + //SEG298 [160] return rts } -//SEG219 File Data +//SEG299 File Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 + print_hextab: .text "0123456789abcdef" REGISTER UPLIFT POTENTIAL REGISTERS Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Statement [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ) always clobbers reg byte a -Statement [19] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a -Statement [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ) always clobbers reg byte a -Statement [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Statement [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ) always clobbers reg byte a -Statement [28] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ) always clobbers reg byte a -Statement [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ) always clobbers reg byte a -Statement [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ) always clobbers reg byte a -Statement [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ) always clobbers reg byte a -Statement [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ) always clobbers reg byte a -Statement [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ) always clobbers reg byte a -Statement [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a -Statement [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a -Statement [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::found#0 ] ) always clobbers reg byte a -Statement [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a -Statement [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a -Statement [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a -Statement [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Statement [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:8::sqr:18 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:8::sqr:27 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a -Statement [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:8::sqr:18 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:8::sqr:27 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] -Statement [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:69 [ init_font_hex::$0 ] -Statement [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Statement [13] (dword) clock::return#2 ← (dword) clock::return#0 [ clock::return#2 ] ( main:2 [ clock::return#2 ] ) always clobbers reg byte a +Statement [14] (dword~) main::$4 ← (dword) clock::return#2 [ main::$4 ] ( main:2 [ main::$4 ] ) always clobbers reg byte a +Statement [15] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 [ main::cyclecount#0 ] ( main:2 [ main::cyclecount#0 ] ) always clobbers reg byte a +Statement [16] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 [ print_dword_at::dw#0 ] ( main:2 [ print_dword_at::dw#0 ] ) always clobbers reg byte a +Statement [19] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [ print_dword_at::dw#0 print_word_at::w#0 ] ( main:2::print_dword_at:17 [ print_dword_at::dw#0 print_word_at::w#0 ] ) always clobbers reg byte a +Statement [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 [ print_word_at::w#1 ] ( main:2::print_dword_at:17 [ print_word_at::w#1 ] ) always clobbers reg byte a +Statement [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] ) always clobbers reg byte a +Statement [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Statement [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 [ print_word_at::at#2 print_byte_at::b#1 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::at#2 print_byte_at::b#1 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::at#2 print_byte_at::b#1 ] ) always clobbers reg byte a +Statement [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 [ print_byte_at::b#1 print_byte_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_byte_at::b#1 print_byte_at::at#1 ] main:2::print_dword_at:17::print_word_at:24 [ print_byte_at::b#1 print_byte_at::at#1 ] ) always clobbers reg byte a +Statement [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 [ print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] ) always clobbers reg byte a +Statement [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 [ print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +Statement [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f [ print_byte_at::at#2 print_byte_at::$2 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::at#2 print_byte_at::$2 ] ) always clobbers reg byte a +Statement [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 [ print_byte_at::$2 print_char_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::$2 print_char_at::at#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ print_byte_at::$2 ] +Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a +Statement [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Statement [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ) always clobbers reg byte a +Statement [58] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a +Statement [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ) always clobbers reg byte a +Statement [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Statement [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ) always clobbers reg byte a +Statement [67] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ) always clobbers reg byte a +Statement [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ) always clobbers reg byte a +Statement [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ) always clobbers reg byte a +Statement [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ) always clobbers reg byte a +Statement [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a +Statement [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::found#0 ] ) always clobbers reg byte a +Statement [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a +Statement [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a +Statement [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a +Statement [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Statement [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Statement [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Statement [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] +Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Statement [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Statement [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:102 [ init_font_hex::$0 ] +Statement [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ) always clobbers reg byte a -Statement [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ) always clobbers reg byte a -Statement [19] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a -Statement [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ) always clobbers reg byte a -Statement [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ) always clobbers reg byte a -Statement [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ) always clobbers reg byte a -Statement [28] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ) always clobbers reg byte a -Statement [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ) always clobbers reg byte a -Statement [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ) always clobbers reg byte a -Statement [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ) always clobbers reg byte a -Statement [35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:46 [ init_dist_screen::d#0 ] -Statement [36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y -Statement [37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y -Statement [38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ) always clobbers reg byte y -Statement [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ) always clobbers reg byte a -Statement [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ) always clobbers reg byte a -Statement [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a -Statement [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a -Statement [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::found#0 ] ) always clobbers reg byte a -Statement [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a -Statement [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a -Statement [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a -Statement [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:8::sqr:18 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:8::sqr:27 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a -Statement [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:8::sqr:18 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:8::sqr:27 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Statement [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Statement [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a -Statement [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Statement [13] (dword) clock::return#2 ← (dword) clock::return#0 [ clock::return#2 ] ( main:2 [ clock::return#2 ] ) always clobbers reg byte a +Statement [14] (dword~) main::$4 ← (dword) clock::return#2 [ main::$4 ] ( main:2 [ main::$4 ] ) always clobbers reg byte a +Statement [15] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 [ main::cyclecount#0 ] ( main:2 [ main::cyclecount#0 ] ) always clobbers reg byte a +Statement [16] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 [ print_dword_at::dw#0 ] ( main:2 [ print_dword_at::dw#0 ] ) always clobbers reg byte a +Statement [19] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [ print_dword_at::dw#0 print_word_at::w#0 ] ( main:2::print_dword_at:17 [ print_dword_at::dw#0 print_word_at::w#0 ] ) always clobbers reg byte a +Statement [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 [ print_word_at::w#1 ] ( main:2::print_dword_at:17 [ print_word_at::w#1 ] ) always clobbers reg byte a +Statement [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] ) always clobbers reg byte a +Statement [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] ) always clobbers reg byte a +Statement [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 [ print_word_at::at#2 print_byte_at::b#1 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::at#2 print_byte_at::b#1 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::at#2 print_byte_at::b#1 ] ) always clobbers reg byte a +Statement [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 [ print_byte_at::b#1 print_byte_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_byte_at::b#1 print_byte_at::at#1 ] main:2::print_dword_at:17::print_word_at:24 [ print_byte_at::b#1 print_byte_at::at#1 ] ) always clobbers reg byte a +Statement [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 [ print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] ) always clobbers reg byte a +Statement [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 [ print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ) always clobbers reg byte a +Statement [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f [ print_byte_at::at#2 print_byte_at::$2 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::at#2 print_byte_at::$2 ] ) always clobbers reg byte a +Statement [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 [ print_byte_at::$2 print_char_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::$2 print_char_at::at#1 ] ) always clobbers reg byte a +Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y +Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a +Statement [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ) always clobbers reg byte a +Statement [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ) always clobbers reg byte a +Statement [58] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a +Statement [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ) always clobbers reg byte a +Statement [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ) always clobbers reg byte a +Statement [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ) always clobbers reg byte a +Statement [67] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ) always clobbers reg byte a +Statement [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ) always clobbers reg byte a +Statement [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ) always clobbers reg byte a +Statement [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ) always clobbers reg byte a +Statement [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:79 [ init_dist_screen::d#0 ] +Statement [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y +Statement [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y +Statement [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ) always clobbers reg byte y +Statement [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a +Statement [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::found#0 ] ) always clobbers reg byte a +Statement [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a +Statement [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a +Statement [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a +Statement [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Statement [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Statement [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Statement [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ) always clobbers reg byte a -Statement [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ) always clobbers reg byte a -Statement [19] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a -Statement [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ) always clobbers reg byte a -Statement [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ) always clobbers reg byte a -Statement [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ) always clobbers reg byte a -Statement [28] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ) always clobbers reg byte a -Statement [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ) always clobbers reg byte a -Statement [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ) always clobbers reg byte a -Statement [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ) always clobbers reg byte a -Statement [35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y -Statement [36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y -Statement [37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y -Statement [38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ) always clobbers reg byte y -Statement [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ) always clobbers reg byte a -Statement [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ( main:2::init_dist_screen:8 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ) always clobbers reg byte a -Statement [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a -Statement [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a -Statement [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::found#0 ] ) always clobbers reg byte a -Statement [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a -Statement [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a -Statement [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:8::sqrt:32 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a -Statement [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:8::sqrt:32::bsearch16u:50 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:8::sqr:18 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:8::sqr:27 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a -Statement [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:8::sqr:18 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:8::sqr:27 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:8::init_squares:11 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Statement [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Statement [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a -Statement [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] : zp ZP_BYTE:2 , reg byte x , -Potential registers zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] : zp ZP_WORD:3 , -Potential registers zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] : zp ZP_WORD:5 , -Potential registers zp ZP_BYTE:7 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:9 , reg byte x , -Potential registers zp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:10 , reg byte x , -Potential registers zp ZP_BYTE:11 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:12 , -Potential registers zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:14 , reg byte x , -Potential registers zp ZP_BYTE:15 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:16 , -Potential registers zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] : zp ZP_WORD:18 , -Potential registers zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:20 , reg byte x , -Potential registers zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:21 , -Potential registers zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:23 , reg byte x , -Potential registers zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:24 , -Potential registers zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:26 , -Potential registers zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:28 , reg byte x , -Potential registers zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:29 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:30 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:31 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:32 [ sqr::return#2 ] : zp ZP_WORD:32 , -Potential registers zp ZP_WORD:34 [ init_dist_screen::yds#0 ] : zp ZP_WORD:34 , -Potential registers zp ZP_BYTE:36 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:37 [ sqr::return#3 ] : zp ZP_WORD:37 , -Potential registers zp ZP_WORD:39 [ init_dist_screen::xds#0 ] : zp ZP_WORD:39 , -Potential registers zp ZP_WORD:41 [ init_dist_screen::ds#0 ] : zp ZP_WORD:41 , -Potential registers zp ZP_WORD:43 [ sqrt::val#0 ] : zp ZP_WORD:43 , -Potential registers zp ZP_BYTE:45 [ sqrt::return#2 ] : zp ZP_BYTE:45 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:46 [ init_dist_screen::d#0 ] : zp ZP_BYTE:46 , reg byte a , reg byte x , -Potential registers zp ZP_WORD:47 [ bsearch16u::key#0 ] : zp ZP_WORD:47 , -Potential registers zp ZP_WORD:49 [ bsearch16u::return#3 ] : zp ZP_WORD:49 , -Potential registers zp ZP_WORD:51 [ sqrt::found#0 ] : zp ZP_WORD:51 , -Potential registers zp ZP_WORD:53 [ sqrt::$3 ] : zp ZP_WORD:53 , -Potential registers zp ZP_WORD:55 [ sqrt::$1 ] : zp ZP_WORD:55 , -Potential registers zp ZP_BYTE:57 [ sqrt::return#0 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:58 [ bsearch16u::$6 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:59 [ bsearch16u::$16 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:60 [ bsearch16u::pivot#0 ] : zp ZP_WORD:60 , -Potential registers zp ZP_WORD:62 [ bsearch16u::result#0 ] : zp ZP_WORD:62 , -Potential registers zp ZP_BYTE:64 [ sqr::$0 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:65 [ sqr::return#0 ] : zp ZP_WORD:65 , -Potential registers zp ZP_BYTE:67 [ init_squares::$3 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:68 [ init_squares::$4 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:69 [ init_font_hex::$0 ] : zp ZP_BYTE:69 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:70 [ init_font_hex::$1 ] : zp ZP_BYTE:70 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:71 [ init_font_hex::$2 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:72 [ init_font_hex::idx#3 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , +Statement [13] (dword) clock::return#2 ← (dword) clock::return#0 [ clock::return#2 ] ( main:2 [ clock::return#2 ] ) always clobbers reg byte a +Statement [14] (dword~) main::$4 ← (dword) clock::return#2 [ main::$4 ] ( main:2 [ main::$4 ] ) always clobbers reg byte a +Statement [15] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 [ main::cyclecount#0 ] ( main:2 [ main::cyclecount#0 ] ) always clobbers reg byte a +Statement [16] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 [ print_dword_at::dw#0 ] ( main:2 [ print_dword_at::dw#0 ] ) always clobbers reg byte a +Statement [19] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [ print_dword_at::dw#0 print_word_at::w#0 ] ( main:2::print_dword_at:17 [ print_dword_at::dw#0 print_word_at::w#0 ] ) always clobbers reg byte a +Statement [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 [ print_word_at::w#1 ] ( main:2::print_dword_at:17 [ print_word_at::w#1 ] ) always clobbers reg byte a +Statement [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 ] ) always clobbers reg byte a +Statement [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#0 print_byte_at::at#0 ] ) always clobbers reg byte a +Statement [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 [ print_word_at::at#2 print_byte_at::b#1 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_word_at::at#2 print_byte_at::b#1 ] main:2::print_dword_at:17::print_word_at:24 [ print_word_at::at#2 print_byte_at::b#1 ] ) always clobbers reg byte a +Statement [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 [ print_byte_at::b#1 print_byte_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22 [ print_dword_at::dw#0 print_byte_at::b#1 print_byte_at::at#1 ] main:2::print_dword_at:17::print_word_at:24 [ print_byte_at::b#1 print_byte_at::at#1 ] ) always clobbers reg byte a +Statement [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 [ print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::b#2 print_byte_at::at#2 print_byte_at::$0 ] ) always clobbers reg byte a +Statement [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 [ print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::b#2 print_byte_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ) always clobbers reg byte a +Statement [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f [ print_byte_at::at#2 print_byte_at::$2 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::at#2 print_byte_at::$2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::at#2 print_byte_at::$2 ] ) always clobbers reg byte a +Statement [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 [ print_byte_at::$2 print_char_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::$2 print_char_at::at#1 ] ) always clobbers reg byte a +Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y +Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a +Statement [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::y2#0 ] ) always clobbers reg byte a +Statement [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::$5 ] ) always clobbers reg byte a +Statement [58] (word) sqr::return#2 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a +Statement [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 ] ) always clobbers reg byte a +Statement [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::x2#0 ] ) always clobbers reg byte a +Statement [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::$13 ] ) always clobbers reg byte a +Statement [67] (word) sqr::return#3 ← (word) sqr::return#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#3 ] ) always clobbers reg byte a +Statement [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::xds#0 ] ) always clobbers reg byte a +Statement [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::ds#0 ] ) always clobbers reg byte a +Statement [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::val#0 ] ) always clobbers reg byte a +Statement [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y +Statement [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y +Statement [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 init_dist_screen::d#0 ] ) always clobbers reg byte y +Statement [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 ] ) always clobbers reg byte y +Statement [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_bottomline#10 init_dist_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ( main:2::init_dist_screen:10 [ init_dist_screen::y#10 init_dist_screen::screen_topline#1 init_dist_screen::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a +Statement [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::found#0 ] ) always clobbers reg byte a +Statement [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$3 ] ) always clobbers reg byte a +Statement [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::$1 ] ) always clobbers reg byte a +Statement [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::init_dist_screen:10::sqrt:71 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqrt::return#0 ] ) always clobbers reg byte a +Statement [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:71::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::$0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 sqr::return#0 ] main:2::init_dist_screen:10::sqr:66 [ init_dist_screen::y#10 init_dist_screen::screen_topline#10 init_dist_screen::screen_bottomline#10 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a +Statement [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Statement [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Statement [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Statement [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] : zp ZP_WORD:2 , +Potential registers zp ZP_WORD:4 [ print_word_at::at#2 ] : zp ZP_WORD:4 , +Potential registers zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] : zp ZP_BYTE:6 , reg byte x , +Potential registers zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] : zp ZP_WORD:9 , +Potential registers zp ZP_BYTE:11 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] : zp ZP_BYTE:11 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] : zp ZP_WORD:12 , +Potential registers zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] : zp ZP_BYTE:14 , reg byte x , +Potential registers zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] : zp ZP_WORD:15 , +Potential registers zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] : zp ZP_WORD:17 , +Potential registers zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] : zp ZP_BYTE:20 , reg byte x , +Potential registers zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] : zp ZP_BYTE:21 , reg byte x , +Potential registers zp ZP_BYTE:22 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:23 , +Potential registers zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:25 , reg byte x , +Potential registers zp ZP_BYTE:26 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:27 , +Potential registers zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] : zp ZP_WORD:29 , +Potential registers zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:31 , reg byte x , +Potential registers zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:32 , +Potential registers zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:34 , reg byte x , +Potential registers zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:35 , +Potential registers zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:37 , +Potential registers zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:39 , reg byte x , +Potential registers zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:40 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:41 , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:42 [ clock::return#2 ] : zp ZP_DWORD:42 , +Potential registers zp ZP_DWORD:46 [ main::$4 ] : zp ZP_DWORD:46 , +Potential registers zp ZP_DWORD:50 [ main::cyclecount#0 ] : zp ZP_DWORD:50 , +Potential registers zp ZP_DWORD:54 [ print_dword_at::dw#0 ] : zp ZP_DWORD:54 , +Potential registers zp ZP_BYTE:58 [ print_byte_at::$0 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:59 [ print_byte_at::$2 ] : zp ZP_BYTE:59 , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:60 [ clock::return#0 ] : zp ZP_DWORD:60 , +Potential registers zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:65 [ sqr::return#2 ] : zp ZP_WORD:65 , +Potential registers zp ZP_WORD:67 [ init_dist_screen::yds#0 ] : zp ZP_WORD:67 , +Potential registers zp ZP_BYTE:69 [ init_dist_screen::x2#0 ] : zp ZP_BYTE:69 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:70 [ sqr::return#3 ] : zp ZP_WORD:70 , +Potential registers zp ZP_WORD:72 [ init_dist_screen::xds#0 ] : zp ZP_WORD:72 , +Potential registers zp ZP_WORD:74 [ init_dist_screen::ds#0 ] : zp ZP_WORD:74 , +Potential registers zp ZP_WORD:76 [ sqrt::val#0 ] : zp ZP_WORD:76 , +Potential registers zp ZP_BYTE:78 [ sqrt::return#2 ] : zp ZP_BYTE:78 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:79 [ init_dist_screen::d#0 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , +Potential registers zp ZP_WORD:80 [ bsearch16u::key#0 ] : zp ZP_WORD:80 , +Potential registers zp ZP_WORD:82 [ bsearch16u::return#3 ] : zp ZP_WORD:82 , +Potential registers zp ZP_WORD:84 [ sqrt::found#0 ] : zp ZP_WORD:84 , +Potential registers zp ZP_WORD:86 [ sqrt::$3 ] : zp ZP_WORD:86 , +Potential registers zp ZP_WORD:88 [ sqrt::$1 ] : zp ZP_WORD:88 , +Potential registers zp ZP_BYTE:90 [ sqrt::return#0 ] : zp ZP_BYTE:90 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:91 [ bsearch16u::$6 ] : zp ZP_BYTE:91 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:92 [ bsearch16u::$16 ] : zp ZP_BYTE:92 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:93 [ bsearch16u::pivot#0 ] : zp ZP_WORD:93 , +Potential registers zp ZP_WORD:95 [ bsearch16u::result#0 ] : zp ZP_WORD:95 , +Potential registers zp ZP_BYTE:97 [ sqr::$0 ] : zp ZP_BYTE:97 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:98 [ sqr::return#0 ] : zp ZP_WORD:98 , +Potential registers zp ZP_BYTE:100 [ init_squares::$3 ] : zp ZP_BYTE:100 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:101 [ init_squares::$4 ] : zp ZP_BYTE:101 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:102 [ init_font_hex::$0 ] : zp ZP_BYTE:102 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:103 [ init_font_hex::$1 ] : zp ZP_BYTE:103 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:104 [ init_font_hex::$2 ] : zp ZP_BYTE:104 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:105 [ init_font_hex::idx#3 ] : zp ZP_BYTE:105 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,852.83: zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:58 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:59 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:62 [ bsearch16u::result#0 ] 501: zp ZP_WORD:60 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:49 [ bsearch16u::return#3 ] 0.29: zp ZP_WORD:47 [ bsearch16u::key#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:70 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:71 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:69 [ init_font_hex::$0 ] 202: zp ZP_BYTE:72 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:11 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:36 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:39 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:41 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:46 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:7 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:31 [ init_dist_screen::y2#0 ] 17.47: zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.12: zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] 12.5: zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] 4.87: zp ZP_WORD:34 [ init_dist_screen::yds#0 ] -Uplift Scope [sqr] 338: zp ZP_BYTE:15 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:37 [ sqr::return#3 ] 28.5: zp ZP_WORD:65 [ sqr::return#0 ] 22: zp ZP_WORD:32 [ sqr::return#2 ] 4: zp ZP_BYTE:64 [ sqr::$0 ] -Uplift Scope [sqrt] 202: zp ZP_BYTE:45 [ sqrt::return#2 ] 103: zp ZP_WORD:43 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:57 [ sqrt::return#0 ] 4: zp ZP_WORD:51 [ sqrt::found#0 ] 4: zp ZP_WORD:53 [ sqrt::$3 ] 2: zp ZP_WORD:55 [ sqrt::$1 ] -Uplift Scope [init_squares] 22: zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:67 [ init_squares::$3 ] 22: zp ZP_BYTE:68 [ init_squares::$4 ] 20.17: zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] 13.93: zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,852.83: zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:91 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:92 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:95 [ bsearch16u::result#0 ] 501: zp ZP_WORD:93 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:82 [ bsearch16u::return#3 ] 0.29: zp ZP_WORD:80 [ bsearch16u::key#0 ] +Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:40 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:103 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:104 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:102 [ init_font_hex::$0 ] 202: zp ZP_BYTE:105 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplift Scope [init_dist_screen] 707: zp ZP_BYTE:22 [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] 202: zp ZP_BYTE:69 [ init_dist_screen::x2#0 ] 202: zp ZP_WORD:72 [ init_dist_screen::xds#0 ] 202: zp ZP_WORD:74 [ init_dist_screen::ds#0 ] 127.58: zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp ZP_BYTE:79 [ init_dist_screen::d#0 ] 121.2: zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 77: zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] 17.47: zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.12: zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] 12.5: zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] 4.87: zp ZP_WORD:67 [ init_dist_screen::yds#0 ] +Uplift Scope [sqr] 338: zp ZP_BYTE:26 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:70 [ sqr::return#3 ] 28.5: zp ZP_WORD:98 [ sqr::return#0 ] 22: zp ZP_WORD:65 [ sqr::return#2 ] 4: zp ZP_BYTE:97 [ sqr::$0 ] +Uplift Scope [sqrt] 202: zp ZP_BYTE:78 [ sqrt::return#2 ] 103: zp ZP_WORD:76 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:90 [ sqrt::return#0 ] 4: zp ZP_WORD:84 [ sqrt::found#0 ] 4: zp ZP_WORD:86 [ sqrt::$3 ] 2: zp ZP_WORD:88 [ sqrt::$1 ] +Uplift Scope [init_squares] 22: zp ZP_BYTE:31 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:100 [ init_squares::$3 ] 22: zp ZP_BYTE:101 [ init_squares::$4 ] 20.17: zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] 13.93: zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [print_char_at] 12: zp ZP_BYTE:11 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] 12: zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +Uplift Scope [print_byte_at] 9.33: zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] 5.6: zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] 4: zp ZP_BYTE:58 [ print_byte_at::$0 ] 2: zp ZP_BYTE:59 [ print_byte_at::$2 ] +Uplift Scope [print_word_at] 10: zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] 0.8: zp ZP_WORD:4 [ print_word_at::at#2 ] +Uplift Scope [main] 4: zp ZP_DWORD:46 [ main::$4 ] 4: zp ZP_DWORD:50 [ main::cyclecount#0 ] +Uplift Scope [clock] 4: zp ZP_DWORD:42 [ clock::return#2 ] 1.33: zp ZP_DWORD:60 [ clock::return#0 ] +Uplift Scope [print_dword_at] 2: zp ZP_DWORD:54 [ print_dword_at::dw#0 ] Uplift Scope [malloc] -Uplift Scope [main] +Uplift Scope [clock_start] Uplift Scope [] -Uplifting [bsearch16u] best 262725 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:62 [ bsearch16u::result#0 ] zp ZP_WORD:60 [ bsearch16u::pivot#0 ] zp ZP_WORD:49 [ bsearch16u::return#3 ] zp ZP_WORD:47 [ bsearch16u::key#0 ] -Uplifting [init_font_hex] best 243725 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:69 [ init_font_hex::$0 ] zp ZP_BYTE:72 [ init_font_hex::idx#3 ] zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [bsearch16u] best 263251 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:95 [ bsearch16u::result#0 ] zp ZP_WORD:93 [ bsearch16u::pivot#0 ] zp ZP_WORD:82 [ bsearch16u::return#3 ] zp ZP_WORD:80 [ bsearch16u::key#0 ] +Uplifting [init_font_hex] best 244251 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:102 [ init_font_hex::$0 ] zp ZP_BYTE:105 [ init_font_hex::idx#3 ] zp ZP_WORD:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [init_dist_screen] best 240525 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:39 [ init_dist_screen::xds#0 ] zp ZP_WORD:41 [ init_dist_screen::ds#0 ] zp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:7 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:31 [ init_dist_screen::y2#0 ] zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] zp ZP_WORD:34 [ init_dist_screen::yds#0 ] +Uplifting [init_dist_screen] best 241051 combination reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] reg byte a [ init_dist_screen::x2#0 ] zp ZP_WORD:72 [ init_dist_screen::xds#0 ] zp ZP_WORD:74 [ init_dist_screen::ds#0 ] zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] reg byte a [ init_dist_screen::d#0 ] zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] zp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] zp ZP_BYTE:64 [ init_dist_screen::y2#0 ] zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] zp ZP_WORD:17 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] zp ZP_WORD:15 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] zp ZP_WORD:67 [ init_dist_screen::yds#0 ] Limited combination testing to 100 combinations of 6144 possible. -Uplifting [sqr] best 240188 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:37 [ sqr::return#3 ] zp ZP_WORD:65 [ sqr::return#0 ] zp ZP_WORD:32 [ sqr::return#2 ] reg byte a [ sqr::$0 ] -Uplifting [sqrt] best 239285 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:43 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:51 [ sqrt::found#0 ] zp ZP_WORD:53 [ sqrt::$3 ] zp ZP_WORD:55 [ sqrt::$1 ] -Uplifting [init_squares] best 239085 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplifting [malloc] best 239085 combination -Uplifting [main] best 239085 combination -Uplifting [] best 239085 combination -Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 239085 combination zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:69 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 239085 combination zp ZP_BYTE:69 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:72 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 238485 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 238485 combination zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Uplifting [init_dist_screen] best 238485 combination zp ZP_BYTE:9 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Uplifting [init_dist_screen] best 238485 combination zp ZP_BYTE:10 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:7 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Uplifting [init_dist_screen] best 238415 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_dist_screen::y2#0 ] -Uplifting [init_dist_screen] best 238315 combination reg byte a [ init_dist_screen::y2#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 238315 combination zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Uplifting [init_dist_screen] best 238315 combination zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:49 [ bsearch16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ sqr::return#2 ] ] with [ zp ZP_WORD:34 [ init_dist_screen::yds#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 ] ] with [ zp ZP_WORD:39 [ init_dist_screen::xds#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:65 [ sqr::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:43 [ sqrt::val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ sqrt::found#0 ] ] with [ zp ZP_WORD:53 [ sqrt::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:51 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:41 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:55 [ sqrt::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:47 [ bsearch16u::key#0 ] ] - score: 1 -Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:7 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:9 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] -Allocated (was zp ZP_WORD:12) zp ZP_WORD:10 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] -Allocated (was zp ZP_WORD:16) zp ZP_WORD:12 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated (was zp ZP_WORD:18) zp ZP_WORD:14 [ init_squares::squares#2 init_squares::squares#1 ] -Allocated (was zp ZP_WORD:21) zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:23) zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:24) zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:26) zp ZP_WORD:21 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:28) zp ZP_BYTE:23 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:30) zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_WORD:32) zp ZP_WORD:25 [ sqr::return#2 init_dist_screen::yds#0 ] -Allocated (was zp ZP_WORD:37) zp ZP_WORD:27 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] -Allocated (was zp ZP_WORD:60) zp ZP_WORD:29 [ bsearch16u::pivot#0 ] -Allocated (was zp ZP_WORD:62) zp ZP_WORD:31 [ bsearch16u::result#0 ] -Allocated (was zp ZP_BYTE:69) zp ZP_BYTE:33 [ init_font_hex::$0 ] +Uplifting [sqr] best 240714 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:70 [ sqr::return#3 ] zp ZP_WORD:98 [ sqr::return#0 ] zp ZP_WORD:65 [ sqr::return#2 ] reg byte a [ sqr::$0 ] +Uplifting [sqrt] best 239811 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:76 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:84 [ sqrt::found#0 ] zp ZP_WORD:86 [ sqrt::$3 ] zp ZP_WORD:88 [ sqrt::$1 ] +Uplifting [init_squares] best 239611 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:29 [ init_squares::squares#2 init_squares::squares#1 ] zp ZP_WORD:27 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [print_char_at] best 239604 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +Uplifting [print_byte_at] best 239596 combination zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] +Uplifting [print_word_at] best 239596 combination zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] zp ZP_WORD:4 [ print_word_at::at#2 ] +Uplifting [main] best 239596 combination zp ZP_DWORD:46 [ main::$4 ] zp ZP_DWORD:50 [ main::cyclecount#0 ] +Uplifting [clock] best 239596 combination zp ZP_DWORD:42 [ clock::return#2 ] zp ZP_DWORD:60 [ clock::return#0 ] +Uplifting [print_dword_at] best 239596 combination zp ZP_DWORD:54 [ print_dword_at::dw#0 ] +Uplifting [malloc] best 239596 combination +Uplifting [clock_start] best 239596 combination +Uplifting [] best 239596 combination +Attempting to uplift remaining variables inzp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [init_font_hex] best 239596 combination zp ZP_BYTE:41 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:102 [ init_font_hex::$0 ] +Uplifting [init_font_hex] best 239596 combination zp ZP_BYTE:102 [ init_font_hex::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:105 [ init_font_hex::idx#3 ] +Uplifting [init_font_hex] best 238996 combination reg byte y [ init_font_hex::idx#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 238996 combination zp ZP_BYTE:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Uplifting [init_dist_screen] best 238996 combination zp ZP_BYTE:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Uplifting [init_dist_screen] best 238996 combination zp ZP_BYTE:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Uplifting [init_dist_screen] best 238926 combination reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:64 [ init_dist_screen::y2#0 ] +Uplifting [init_dist_screen] best 238826 combination reg byte a [ init_dist_screen::y2#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_font_hex] best 238826 combination zp ZP_BYTE:34 [ init_font_hex::c#6 init_font_hex::c#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Uplifting [init_dist_screen] best 238826 combination zp ZP_BYTE:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Uplifting [print_byte_at] best 238826 combination zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ print_word_at::at#2 ] ] with [ zp ZP_WORD:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:82 [ bsearch16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:42 [ clock::return#2 ] ] with [ zp ZP_DWORD:46 [ main::$4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:42 [ clock::return#2 main::$4 ] ] with [ zp ZP_DWORD:60 [ clock::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:50 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:54 [ print_dword_at::dw#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ sqr::return#2 ] ] with [ zp ZP_WORD:67 [ init_dist_screen::yds#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:70 [ sqr::return#3 ] ] with [ zp ZP_WORD:72 [ init_dist_screen::xds#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:70 [ sqr::return#3 init_dist_screen::xds#0 ] ] with [ zp ZP_WORD:98 [ sqr::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:74 [ init_dist_screen::ds#0 ] ] with [ zp ZP_WORD:76 [ sqrt::val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:84 [ sqrt::found#0 ] ] with [ zp ZP_WORD:86 [ sqrt::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:84 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:42 [ clock::return#2 main::$4 clock::return#0 ] ] with [ zp ZP_DWORD:50 [ main::cyclecount#0 print_dword_at::dw#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:70 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:74 [ init_dist_screen::ds#0 sqrt::val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 ] ] with [ zp ZP_WORD:88 [ sqrt::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:70 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:80 [ bsearch16u::key#0 ] ] - score: 1 +Allocated (was zp ZP_WORD:12) zp ZP_WORD:9 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:11 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:14 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] +Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:16 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +Allocated (was zp ZP_BYTE:21) zp ZP_BYTE:17 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +Allocated (was zp ZP_WORD:23) zp ZP_WORD:18 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] +Allocated (was zp ZP_WORD:27) zp ZP_WORD:20 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:22 [ init_squares::squares#2 init_squares::squares#1 ] +Allocated (was zp ZP_WORD:32) zp ZP_WORD:24 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated (was zp ZP_BYTE:34) zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated (was zp ZP_WORD:35) zp ZP_WORD:27 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated (was zp ZP_WORD:37) zp ZP_WORD:29 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated (was zp ZP_BYTE:41) zp ZP_BYTE:32 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated (was zp ZP_DWORD:42) zp ZP_DWORD:33 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +Allocated (was zp ZP_WORD:65) zp ZP_WORD:37 [ sqr::return#2 init_dist_screen::yds#0 ] +Allocated (was zp ZP_WORD:70) zp ZP_WORD:39 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +Allocated (was zp ZP_WORD:93) zp ZP_WORD:41 [ bsearch16u::pivot#0 ] +Allocated (was zp ZP_WORD:95) zp ZP_WORD:43 [ bsearch16u::result#0 ] +Allocated (was zp ZP_BYTE:102) zp ZP_BYTE:45 [ init_font_hex::$0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -3510,6 +4714,21 @@ ASSEMBLER BEFORE OPTIMIZATION // Start of the heap used by malloc() .label HEAP_START = $c000 .label D018 = $d018 + // CIA #2 Timer A+B Value (32-bit) + .label CIA2_TIMER_AB = $dd04 + // CIA #2 Timer A Control Register + .label CIA2_TIMER_A_CONTROL = $dd0e + // CIA #2 Timer B Control Register + .label CIA2_TIMER_B_CONTROL = $dd0f + // Timer Control - Start/stop timer (0:stop, 1: start) + .const CIA_TIMER_CONTROL_START = 1 + // Timer Control - Time CONTINUOUS/ONE-SHOT (0:CONTINUOUS, 1: ONE-SHOT) + .const CIA_TIMER_CONTROL_CONTINUOUS = 0 + // Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high) + .const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 + // Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine. + // To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code. + .const CLOCKS_PER_INIT = $12 .label CHARSET = $2000 .label SCREEN = $2800 .const NUM_SQUARES = $30 @@ -3532,9 +4751,14 @@ bend_from_b1: bend: //SEG10 main main: { + .label BASE_SCREEN = $400 + .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f + .label _4 = $21 + .label cyclecount = $21 //SEG11 [5] call init_font_hex - //SEG12 [93] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [138] phi from main to init_font_hex [phi:main->init_font_hex] init_font_hex_from_main: jsr init_font_hex //SEG13 [6] phi from main to main::toD0181 [phi:main->main::toD0181] @@ -3548,139 +4772,367 @@ main: { //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG17 [8] call init_dist_screen - //SEG18 [10] phi from main::@1 to init_dist_screen [phi:main::@1->init_dist_screen] - init_dist_screen_from_b1: + //SEG17 [8] call clock_start + jsr clock_start + //SEG18 [9] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + jmp b3 + //SEG19 main::@3 + b3: + //SEG20 [10] call init_dist_screen + //SEG21 [49] phi from main::@3 to init_dist_screen [phi:main::@3->init_dist_screen] + init_dist_screen_from_b3: jsr init_dist_screen + //SEG22 [11] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + b4_from_b3: + jmp b4 + //SEG23 main::@4 + b4: + //SEG24 [12] call clock + jsr clock + //SEG25 [13] (dword) clock::return#2 ← (dword) clock::return#0 + jmp b5 + //SEG26 main::@5 + b5: + //SEG27 [14] (dword~) main::$4 ← (dword) clock::return#2 + //SEG28 [15] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz1_minus_vduc1 + lda cyclecount + sec + sbc #CLOCKS_PER_INIT + sta cyclecount+1 + lda cyclecount+2 + sbc #>$10 + sta cyclecount+2 + lda cyclecount+3 + sbc #>CLOCKS_PER_INIT>>$10 + sta cyclecount+3 + //SEG29 [16] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 + //SEG30 [17] call print_dword_at + jsr print_dword_at + //SEG31 [18] phi from main::@5 to main::toD0182 [phi:main::@5->main::toD0182] + toD0182_from_b5: + jmp toD0182 + //SEG32 main::toD0182 + toD0182: + jmp b2 + //SEG33 main::@2 + b2: + //SEG34 [19] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0182_return + sta D018 jmp breturn - //SEG19 main::@return + //SEG35 main::@return breturn: - //SEG20 [9] return + //SEG36 [20] return rts } -//SEG21 init_dist_screen +//SEG37 print_dword_at +// Print a dword as HEX at a specific position +// print_dword_at(dword zeropage($21) dw) +print_dword_at: { + .label dw = $21 + //SEG38 [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 -- vwuz1=_hi_vduz2 + lda dw+2 + sta print_word_at.w + lda dw+3 + sta print_word_at.w+1 + //SEG39 [22] call print_word_at + //SEG40 [26] phi from print_dword_at to print_word_at [phi:print_dword_at->print_word_at] + print_word_at_from_print_dword_at: + //SEG41 [26] phi (byte*) print_word_at::at#2 = (const byte*) main::BASE_SCREEN#0 [phi:print_dword_at->print_word_at#0] -- pbuz1=pbuc1 + lda #main.BASE_SCREEN + sta print_word_at.at+1 + //SEG42 [26] phi (word) print_word_at::w#2 = (word) print_word_at::w#0 [phi:print_dword_at->print_word_at#1] -- register_copy + jsr print_word_at + jmp b1 + //SEG43 print_dword_at::@1 + b1: + //SEG44 [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 -- vwuz1=_lo_vduz2 + lda dw + sta print_word_at.w + lda dw+1 + sta print_word_at.w+1 + //SEG45 [24] call print_word_at + //SEG46 [26] phi from print_dword_at::@1 to print_word_at [phi:print_dword_at::@1->print_word_at] + print_word_at_from_b1: + //SEG47 [26] phi (byte*) print_word_at::at#2 = (const byte*) main::BASE_SCREEN#0+(byte) 4 [phi:print_dword_at::@1->print_word_at#0] -- pbuz1=pbuc1 + lda #main.BASE_SCREEN+4 + sta print_word_at.at+1 + //SEG48 [26] phi (word) print_word_at::w#2 = (word) print_word_at::w#1 [phi:print_dword_at::@1->print_word_at#1] -- register_copy + jsr print_word_at + jmp breturn + //SEG49 print_dword_at::@return + breturn: + //SEG50 [25] return + rts +} +//SEG51 print_word_at +// Print a word as HEX at a specific position +// print_word_at(word zeropage(2) w, byte* zeropage(4) at) +print_word_at: { + .label w = 2 + .label at = 4 + //SEG52 [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 -- vbuz1=_hi_vwuz2 + lda w+1 + sta print_byte_at.b + //SEG53 [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 + //SEG54 [29] call print_byte_at + //SEG55 [34] phi from print_word_at to print_byte_at [phi:print_word_at->print_byte_at] + print_byte_at_from_print_word_at: + //SEG56 [34] phi (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#0 [phi:print_word_at->print_byte_at#0] -- register_copy + //SEG57 [34] phi (byte) print_byte_at::b#2 = (byte) print_byte_at::b#0 [phi:print_word_at->print_byte_at#1] -- register_copy + jsr print_byte_at + jmp b1 + //SEG58 print_word_at::@1 + b1: + //SEG59 [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 -- vbuz1=_lo_vwuz2 + lda w + sta print_byte_at.b + //SEG60 [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 -- pbuz1=pbuz1_plus_2 + lda print_byte_at.at + clc + adc #2 + sta print_byte_at.at + bcc !+ + inc print_byte_at.at+1 + !: + //SEG61 [32] call print_byte_at + //SEG62 [34] phi from print_word_at::@1 to print_byte_at [phi:print_word_at::@1->print_byte_at] + print_byte_at_from_b1: + //SEG63 [34] phi (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#1 [phi:print_word_at::@1->print_byte_at#0] -- register_copy + //SEG64 [34] phi (byte) print_byte_at::b#2 = (byte) print_byte_at::b#1 [phi:print_word_at::@1->print_byte_at#1] -- register_copy + jsr print_byte_at + jmp breturn + //SEG65 print_word_at::@return + breturn: + //SEG66 [33] return + rts +} +//SEG67 print_byte_at +// Print a byte as HEX at a specific position +// print_byte_at(byte zeropage(6) b, byte* zeropage(4) at) +print_byte_at: { + .label b = 6 + .label at = 4 + //SEG68 [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 -- vbuaa=vbuz1_ror_4 + lda b + lsr + lsr + lsr + lsr + //SEG69 [36] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) -- vbuxx=pbuc1_derefidx_vbuaa + tay + ldx print_hextab,y + //SEG70 [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 -- pbuz1=pbuz2 + lda at + sta print_char_at.at + lda at+1 + sta print_char_at.at+1 + //SEG71 [38] call print_char_at + //SEG72 [44] phi from print_byte_at to print_char_at [phi:print_byte_at->print_char_at] + print_char_at_from_print_byte_at: + //SEG73 [44] phi (byte*) print_char_at::at#2 = (byte*) print_char_at::at#0 [phi:print_byte_at->print_char_at#0] -- register_copy + //SEG74 [44] phi (byte) print_char_at::ch#2 = (byte) print_char_at::ch#0 [phi:print_byte_at->print_char_at#1] -- register_copy + jsr print_char_at + jmp b1 + //SEG75 print_byte_at::@1 + b1: + //SEG76 [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f -- vbuyy=vbuz1_band_vbuc1 + lda #$f + and b + tay + //SEG77 [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 -- pbuz1=pbuz2_plus_1 + lda at + clc + adc #1 + sta print_char_at.at + lda at+1 + adc #0 + sta print_char_at.at+1 + //SEG78 [41] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2) -- vbuxx=pbuc1_derefidx_vbuyy + ldx print_hextab,y + //SEG79 [42] call print_char_at + //SEG80 [44] phi from print_byte_at::@1 to print_char_at [phi:print_byte_at::@1->print_char_at] + print_char_at_from_b1: + //SEG81 [44] phi (byte*) print_char_at::at#2 = (byte*) print_char_at::at#1 [phi:print_byte_at::@1->print_char_at#0] -- register_copy + //SEG82 [44] phi (byte) print_char_at::ch#2 = (byte) print_char_at::ch#1 [phi:print_byte_at::@1->print_char_at#1] -- register_copy + jsr print_char_at + jmp breturn + //SEG83 print_byte_at::@return + breturn: + //SEG84 [43] return + rts +} +//SEG85 print_char_at +// Print a single char +// print_char_at(byte register(X) ch, byte* zeropage(9) at) +print_char_at: { + .label at = 9 + //SEG86 [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (at),y + jmp breturn + //SEG87 print_char_at::@return + breturn: + //SEG88 [46] return + rts +} +//SEG89 clock +// Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). +// This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() +clock: { + .label return = $21 + //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 + lda #<$ffffffff + sec + sbc CIA2_TIMER_AB + sta return + lda #>$ffffffff + sbc CIA2_TIMER_AB+1 + sta return+1 + lda #<$ffffffff>>$10 + sbc CIA2_TIMER_AB+2 + sta return+2 + lda #>$ffffffff>>$10 + sbc CIA2_TIMER_AB+3 + sta return+3 + jmp breturn + //SEG91 clock::@return + breturn: + //SEG92 [48] return + rts +} +//SEG93 init_dist_screen // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision init_dist_screen: { - .label yds = $19 - .label xds = $1b - .label ds = $1b - .label x = 7 - .label xb = 9 - .label screen_topline = 3 - .label screen_bottomline = 5 - .label y = 2 - //SEG22 [11] call init_squares - //SEG23 [80] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + .label yds = $25 + .label xds = $27 + .label ds = $27 + .label x = $10 + .label xb = $11 + .label screen_topline = $c + .label screen_bottomline = $e + .label y = $b + //SEG94 [50] call init_squares + //SEG95 [119] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] init_squares_from_init_dist_screen: jsr init_squares - //SEG24 [12] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] + //SEG96 [51] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] b1_from_init_dist_screen: - //SEG25 [12] phi (byte*) init_dist_screen::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:init_dist_screen->init_dist_screen::@1#0] -- pbuz1=pbuc1 + //SEG97 [51] phi (byte*) init_dist_screen::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:init_dist_screen->init_dist_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$18 sta screen_bottomline+1 - //SEG26 [12] phi (byte*) init_dist_screen::screen_topline#10 = (const byte*) SCREEN#0 [phi:init_dist_screen->init_dist_screen::@1#1] -- pbuz1=pbuc1 + //SEG98 [51] phi (byte*) init_dist_screen::screen_topline#10 = (const byte*) SCREEN#0 [phi:init_dist_screen->init_dist_screen::@1#1] -- pbuz1=pbuc1 lda #SCREEN sta screen_topline+1 - //SEG27 [12] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen->init_dist_screen::@1#2] -- vbuz1=vbuc1 + //SEG99 [51] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen->init_dist_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 - //SEG28 [12] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] + //SEG100 [51] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] b1_from_b9: - //SEG29 [12] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy - //SEG30 [12] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy - //SEG31 [12] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + //SEG101 [51] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy + //SEG102 [51] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy + //SEG103 [51] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy jmp b1 - //SEG32 init_dist_screen::@1 + //SEG104 init_dist_screen::@1 b1: - //SEG33 [13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG105 [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG34 [14] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 + //SEG106 [53] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 cmp #$18 bcs b2 jmp b3 - //SEG35 init_dist_screen::@3 + //SEG107 init_dist_screen::@3 b3: - //SEG36 [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG108 [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$18+1 - //SEG37 [16] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] + //SEG109 [55] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] b4_from_b2: b4_from_b3: - //SEG38 [16] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy + //SEG110 [55] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy jmp b4 - //SEG39 init_dist_screen::@4 + //SEG111 init_dist_screen::@4 b4: - //SEG40 [17] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - //SEG41 [18] call sqr - //SEG42 [76] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + //SEG112 [56] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + //SEG113 [57] call sqr + //SEG114 [115] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] sqr_from_b4: - //SEG43 [76] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + //SEG115 [115] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr - //SEG44 [19] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG116 [58] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_2 lda sqr.return+1 sta sqr.return_2+1 jmp b10 - //SEG45 init_dist_screen::@10 + //SEG117 init_dist_screen::@10 b10: - //SEG46 [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - //SEG47 [21] phi from init_dist_screen::@10 to init_dist_screen::@5 [phi:init_dist_screen::@10->init_dist_screen::@5] + //SEG118 [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + //SEG119 [60] phi from init_dist_screen::@10 to init_dist_screen::@5 [phi:init_dist_screen::@10->init_dist_screen::@5] b5_from_b10: - //SEG48 [21] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@10->init_dist_screen::@5#0] -- vbuz1=vbuc1 + //SEG120 [60] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@10->init_dist_screen::@5#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG49 [21] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@5#1] -- vbuz1=vbuc1 + //SEG121 [60] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@5#1] -- vbuz1=vbuc1 lda #0 sta x jmp b5 - //SEG50 [21] phi from init_dist_screen::@12 to init_dist_screen::@5 [phi:init_dist_screen::@12->init_dist_screen::@5] + //SEG122 [60] phi from init_dist_screen::@12 to init_dist_screen::@5 [phi:init_dist_screen::@12->init_dist_screen::@5] b5_from_b12: - //SEG51 [21] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@12->init_dist_screen::@5#0] -- register_copy - //SEG52 [21] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@12->init_dist_screen::@5#1] -- register_copy + //SEG123 [60] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@12->init_dist_screen::@5#0] -- register_copy + //SEG124 [60] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@12->init_dist_screen::@5#1] -- register_copy jmp b5 - //SEG53 init_dist_screen::@5 + //SEG125 init_dist_screen::@5 b5: - //SEG54 [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG126 [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG55 [23] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 + //SEG127 [62] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 cmp #$27 bcs b6 jmp b7 - //SEG56 init_dist_screen::@7 + //SEG128 init_dist_screen::@7 b7: - //SEG57 [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG129 [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$27+1 - //SEG58 [25] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] + //SEG130 [64] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] b8_from_b6: b8_from_b7: - //SEG59 [25] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy + //SEG131 [64] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy jmp b8 - //SEG60 init_dist_screen::@8 + //SEG132 init_dist_screen::@8 b8: - //SEG61 [26] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - //SEG62 [27] call sqr - //SEG63 [76] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + //SEG133 [65] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + //SEG134 [66] call sqr + //SEG135 [115] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] sqr_from_b8: - //SEG64 [76] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + //SEG136 [115] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr - //SEG65 [28] (word) sqr::return#3 ← (word) sqr::return#0 + //SEG137 [67] (word) sqr::return#3 ← (word) sqr::return#0 jmp b11 - //SEG66 init_dist_screen::@11 + //SEG138 init_dist_screen::@11 b11: - //SEG67 [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - //SEG68 [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG139 [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + //SEG140 [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 lda ds clc adc yds @@ -3688,38 +5140,38 @@ init_dist_screen: { lda ds+1 adc yds+1 sta ds+1 - //SEG69 [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - //SEG70 [32] call sqrt + //SEG141 [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + //SEG142 [71] call sqrt jsr sqrt - //SEG71 [33] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + //SEG143 [72] (byte) sqrt::return#2 ← (byte) sqrt::return#0 jmp b12 - //SEG72 init_dist_screen::@12 + //SEG144 init_dist_screen::@12 b12: - //SEG73 [34] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - //SEG74 [35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG145 [73] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + //SEG146 [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa ldy x sta (screen_topline),y - //SEG75 [36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG147 [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa ldy x sta (screen_bottomline),y - //SEG76 [37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG148 [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa ldy xb sta (screen_topline),y - //SEG77 [38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG149 [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa ldy xb sta (screen_bottomline),y - //SEG78 [39] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + //SEG150 [78] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG79 [40] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + //SEG151 [79] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG80 [41] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG152 [80] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$13+1 bcc b5_from_b12 jmp b9 - //SEG81 init_dist_screen::@9 + //SEG153 init_dist_screen::@9 b9: - //SEG82 [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG154 [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_topline @@ -3727,7 +5179,7 @@ init_dist_screen: { bcc !+ inc screen_topline+1 !: - //SEG83 [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + //SEG155 [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 lda screen_bottomline sec sbc #<$28 @@ -3735,51 +5187,51 @@ init_dist_screen: { lda screen_bottomline+1 sbc #>$28 sta screen_bottomline+1 - //SEG84 [44] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + //SEG156 [83] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 inc y - //SEG85 [45] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG157 [84] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1_from_b9 jmp breturn - //SEG86 init_dist_screen::@return + //SEG158 init_dist_screen::@return breturn: - //SEG87 [46] return + //SEG159 [85] return rts - //SEG88 init_dist_screen::@6 + //SEG160 init_dist_screen::@6 b6: - //SEG89 [47] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 + //SEG161 [86] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$27 jmp b8_from_b6 - //SEG90 init_dist_screen::@2 + //SEG162 init_dist_screen::@2 b2: - //SEG91 [48] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 + //SEG163 [87] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$18 jmp b4_from_b2 } -//SEG92 sqrt +//SEG164 sqrt // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($1b) val) +// sqrt(word zeropage($27) val) sqrt: { - .label _1 = $a - .label _3 = $a - .label found = $a - .label val = $1b - //SEG93 [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - //SEG94 [50] call bsearch16u - //SEG95 [57] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + .label _1 = $12 + .label _3 = $12 + .label found = $12 + .label val = $27 + //SEG165 [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + //SEG166 [89] call bsearch16u + //SEG167 [96] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: jsr bsearch16u - //SEG96 [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + //SEG168 [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 jmp b1 - //SEG97 sqrt::@1 + //SEG169 sqrt::@1 b1: - //SEG98 [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - //SEG99 [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 + //SEG170 [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + //SEG171 [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 lda _3 sec sbc #SQUARES sta _3+1 - //SEG100 [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG172 [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr _1+1 ror _1 - //SEG101 [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 + //SEG173 [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 lda _1 jmp breturn - //SEG102 sqrt::@return + //SEG174 sqrt::@return breturn: - //SEG103 [56] return + //SEG175 [95] return rts } -//SEG104 bsearch16u +//SEG176 bsearch16u // Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. // - key - The value to look for // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($1b) key, word* zeropage($a) items, byte register(X) num) +// bsearch16u(word zeropage($27) key, word* zeropage($12) items, byte register(X) num) bsearch16u: { - .label _2 = $a - .label pivot = $1d - .label result = $1f - .label return = $a - .label items = $a - .label key = $1b - //SEG105 [58] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + .label _2 = $12 + .label pivot = $29 + .label result = $2b + .label return = $12 + .label items = $12 + .label key = $27 + //SEG177 [97] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] b3_from_bsearch16u: - //SEG106 [58] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + //SEG178 [97] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 lda #SQUARES sta items+1 - //SEG107 [58] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + //SEG179 [97] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES jmp b3 - //SEG108 bsearch16u::@3 + //SEG180 bsearch16u::@3 b3: - //SEG109 [59] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + //SEG181 [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 cpx #0 bne b4 jmp b5 - //SEG110 bsearch16u::@5 + //SEG182 bsearch16u::@5 b5: - //SEG111 [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + //SEG183 [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -3842,9 +5294,9 @@ bsearch16u: { !: bcc b2_from_b5 jmp b1 - //SEG112 bsearch16u::@1 + //SEG184 bsearch16u::@1 b1: - //SEG113 [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + //SEG185 [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -3852,37 +5304,37 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - //SEG114 [62] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + //SEG186 [101] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - //SEG115 [62] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + //SEG187 [101] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 - //SEG116 bsearch16u::@2 + //SEG188 bsearch16u::@2 b2: - //SEG117 [63] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + //SEG189 [102] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] breturn_from_b2: breturn_from_b8: - //SEG118 [63] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + //SEG190 [102] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy jmp breturn - //SEG119 bsearch16u::@return + //SEG191 bsearch16u::@return breturn: - //SEG120 [64] return + //SEG192 [103] return rts - //SEG121 bsearch16u::@4 + //SEG193 bsearch16u::@4 b4: - //SEG122 [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + //SEG194 [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr - //SEG123 [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG195 [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG124 [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + //SEG196 [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc adc items sta pivot lda #0 adc items+1 sta pivot+1 - //SEG125 [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + //SEG197 [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -3892,23 +5344,23 @@ bsearch16u: { iny sbc (pivot),y sta result+1 - //SEG126 [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + //SEG198 [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 lda result+1 bne b6 lda result bne b6 jmp b8 - //SEG127 bsearch16u::@8 + //SEG199 bsearch16u::@8 b8: - //SEG128 [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + //SEG200 [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 lda pivot sta return lda pivot+1 sta return+1 jmp breturn_from_b8 - //SEG129 bsearch16u::@6 + //SEG201 bsearch16u::@6 b6: - //SEG130 [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + //SEG202 [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 lda result+1 bmi b7_from_b6 bne !+ @@ -3916,9 +5368,9 @@ bsearch16u: { beq b7_from_b6 !: jmp b9 - //SEG131 bsearch16u::@9 + //SEG203 bsearch16u::@9 b9: - //SEG132 [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + //SEG204 [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 lda #1*SIZEOF_WORD clc adc pivot @@ -3926,88 +5378,88 @@ bsearch16u: { lda #0 adc pivot+1 sta items+1 - //SEG133 [73] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + //SEG205 [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx dex - //SEG134 [74] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + //SEG206 [113] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] b7_from_b6: b7_from_b9: - //SEG135 [74] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG136 [74] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + //SEG207 [113] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG208 [113] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy jmp b7 - //SEG137 bsearch16u::@7 + //SEG209 bsearch16u::@7 b7: - //SEG138 [75] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + //SEG210 [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - //SEG139 [58] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + //SEG211 [97] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] b3_from_b7: - //SEG140 [58] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG141 [58] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG212 [97] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG213 [97] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy jmp b3 } -//SEG142 sqr +//SEG214 sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $1b - .label return_2 = $19 - //SEG143 [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $27 + .label return_2 = $25 + //SEG215 [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG144 [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa + //SEG216 [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa tay lda SQUARES,y sta return lda SQUARES+1,y sta return+1 jmp breturn - //SEG145 sqr::@return + //SEG217 sqr::@return breturn: - //SEG146 [79] return + //SEG218 [118] return rts } -//SEG147 init_squares +//SEG219 init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $e - .label sqr = $c - //SEG148 [81] call malloc - //SEG149 [91] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $16 + .label sqr = $14 + //SEG220 [120] call malloc + //SEG221 [130] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: jsr malloc - //SEG150 [82] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + //SEG222 [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] b1_from_init_squares: - //SEG151 [82] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 + //SEG223 [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG152 [82] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + //SEG224 [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #SQUARES sta squares+1 - //SEG153 [82] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + //SEG225 [121] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 lda #0 sta sqr lda #0 sta sqr+1 jmp b1 - //SEG154 [82] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + //SEG226 [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - //SEG155 [82] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG156 [82] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG157 [82] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + //SEG227 [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG228 [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG229 [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 - //SEG158 init_squares::@1 + //SEG230 init_squares::@1 b1: - //SEG159 [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + //SEG231 [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - //SEG160 [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + //SEG232 [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -4015,116 +5467,148 @@ init_squares: { bcc !+ inc squares+1 !: - //SEG161 [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + //SEG233 [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - //SEG162 [86] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + //SEG234 [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - //SEG163 [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + //SEG235 [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - //SEG164 [88] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + //SEG236 [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - //SEG165 [89] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG237 [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1_from_b1 jmp breturn - //SEG166 init_squares::@return + //SEG238 init_squares::@return breturn: - //SEG167 [90] return + //SEG239 [129] return rts } -//SEG168 malloc +//SEG240 malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. malloc: { .label return = HEAP_START jmp breturn - //SEG169 malloc::@return + //SEG241 malloc::@return breturn: - //SEG170 [92] return + //SEG242 [131] return rts } -//SEG171 init_font_hex +//SEG243 clock_start +// Reset & start the processor clock time. The value can be read using clock(). +// This uses CIA #2 Timer A+B on the C64 +clock_start: { + //SEG244 [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // Setup CIA#2 timer A to count (down) CPU cycles + lda #CIA_TIMER_CONTROL_CONTINUOUS + sta CIA2_TIMER_A_CONTROL + //SEG245 [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A + sta CIA2_TIMER_B_CONTROL + //SEG246 [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + lda #<$ffffffff + sta CIA2_TIMER_AB + lda #>$ffffffff + sta CIA2_TIMER_AB+1 + lda #<$ffffffff>>$10 + sta CIA2_TIMER_AB+2 + lda #>$ffffffff>>$10 + sta CIA2_TIMER_AB+3 + //SEG247 [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A + sta CIA2_TIMER_B_CONTROL + //SEG248 [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_START + sta CIA2_TIMER_A_CONTROL + jmp breturn + //SEG249 clock_start::@return + breturn: + //SEG250 [137] return + rts +} +//SEG251 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($13) charset) +// init_font_hex(byte* zeropage($1b) charset) init_font_hex: { - .label _0 = $21 - .label idx = $18 - .label proto_lo = $15 - .label charset = $13 - .label c1 = $17 - .label proto_hi = $10 - .label c = $12 - //SEG172 [94] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $2d + .label idx = $20 + .label proto_lo = $1d + .label charset = $1b + .label c1 = $1f + .label proto_hi = $18 + .label c = $1a + //SEG252 [139] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG173 [94] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG253 [139] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG174 [94] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + //SEG254 [139] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG175 [94] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG255 [139] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta charset+1 jmp b1 - //SEG176 [94] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG256 [139] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG177 [94] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - //SEG178 [94] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - //SEG179 [94] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + //SEG257 [139] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + //SEG258 [139] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + //SEG259 [139] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy jmp b1 - //SEG180 init_font_hex::@1 + //SEG260 init_font_hex::@1 b1: - //SEG181 [95] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG261 [140] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG182 [95] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG262 [140] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - //SEG183 [95] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + //SEG263 [140] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG184 [95] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + //SEG264 [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG185 [95] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG265 [140] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG186 [95] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - //SEG187 [95] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - //SEG188 [95] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + //SEG266 [140] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + //SEG267 [140] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + //SEG268 [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG189 init_font_hex::@2 + //SEG269 init_font_hex::@2 b2: - //SEG190 [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG270 [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG191 [97] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG271 [142] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG192 [97] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG272 [142] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - //SEG193 [97] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG273 [142] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - //SEG194 [97] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG274 [142] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG195 [97] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - //SEG196 [97] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + //SEG275 [142] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + //SEG276 [142] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy jmp b3 - //SEG197 init_font_hex::@3 + //SEG277 init_font_hex::@3 b3: - //SEG198 [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 + //SEG278 [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y @@ -4133,37 +5617,37 @@ init_font_hex: { asl asl sta _0 - //SEG199 [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 + //SEG279 [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl - //SEG200 [100] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG280 [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG201 [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG281 [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy idx sta (charset),y - //SEG202 [102] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG282 [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG203 [103] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG283 [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG204 [104] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG284 [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3_from_b3 jmp b4 - //SEG205 init_font_hex::@4 + //SEG285 init_font_hex::@4 b4: - //SEG206 [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG286 [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - //SEG207 [106] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG287 [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG208 [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG288 [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG209 [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG289 [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -4171,7 +5655,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG210 [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG290 [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4179,16 +5663,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG211 [110] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG291 [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG212 [111] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG292 [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2_from_b4 jmp b5 - //SEG213 init_font_hex::@5 + //SEG293 init_font_hex::@5 b5: - //SEG214 [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG294 [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -4196,27 +5680,41 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG215 [113] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG295 [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG216 [114] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG296 [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1_from_b5 jmp breturn - //SEG217 init_font_hex::@return + //SEG297 init_font_hex::@return breturn: - //SEG218 [115] return + //SEG298 [160] return rts } -//SEG219 File Data +//SEG299 File Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 + print_hextab: .text "0123456789abcdef" ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp toD0181 Removing instruction jmp b1 +Removing instruction jmp b3 +Removing instruction jmp b4 +Removing instruction jmp b5 +Removing instruction jmp toD0182 +Removing instruction jmp b2 +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 +Removing instruction jmp breturn Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b3 @@ -4243,6 +5741,7 @@ Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp breturn +Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 @@ -4278,6 +5777,11 @@ Removing instruction main_from_b1: Removing instruction bend_from_b1: Removing instruction toD0181_from_main: Removing instruction toD0181: +Removing instruction b3_from_b1: +Removing instruction init_dist_screen_from_b3: +Removing instruction b4_from_b3: +Removing instruction toD0182_from_b5: +Removing instruction toD0182: Removing instruction b1_from_b9: Removing instruction b4_from_b2: Removing instruction b4_from_b3: @@ -4303,7 +5807,24 @@ Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction init_font_hex_from_main: Removing instruction b1: -Removing instruction init_dist_screen_from_b1: +Removing instruction b3: +Removing instruction b4: +Removing instruction b5: +Removing instruction b2: +Removing instruction breturn: +Removing instruction print_word_at_from_print_dword_at: +Removing instruction b1: +Removing instruction print_word_at_from_b1: +Removing instruction breturn: +Removing instruction print_byte_at_from_print_word_at: +Removing instruction b1: +Removing instruction print_byte_at_from_b1: +Removing instruction breturn: +Removing instruction print_char_at_from_print_byte_at: +Removing instruction b1: +Removing instruction print_char_at_from_b1: +Removing instruction breturn: +Removing instruction breturn: Removing instruction breturn: Removing instruction init_squares_from_init_dist_screen: Removing instruction b1_from_init_dist_screen: @@ -4328,6 +5849,7 @@ Removing instruction malloc_from_init_squares: Removing instruction b1_from_init_squares: Removing instruction breturn: Removing instruction breturn: +Removing instruction breturn: Removing instruction b1_from_init_font_hex: Removing instruction b3_from_b2: Removing instruction b4: @@ -4355,6 +5877,22 @@ FINAL SYMBOL TABLE (label) @end (byte*) CHARSET (const byte*) CHARSET#0 CHARSET = (byte*) 8192 +(dword*) CIA2_TIMER_AB +(const dword*) CIA2_TIMER_AB#0 CIA2_TIMER_AB = (dword*) 56580 +(byte*) CIA2_TIMER_A_CONTROL +(const byte*) CIA2_TIMER_A_CONTROL#0 CIA2_TIMER_A_CONTROL = (byte*) 56590 +(byte*) CIA2_TIMER_B_CONTROL +(const byte*) CIA2_TIMER_B_CONTROL#0 CIA2_TIMER_B_CONTROL = (byte*) 56591 +(byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +(byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = (byte) $40 +(byte) CIA_TIMER_CONTROL_CONTINUOUS +(const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 CIA_TIMER_CONTROL_CONTINUOUS = (byte) 0 +(byte) CIA_TIMER_CONTROL_START +(const byte) CIA_TIMER_CONTROL_START#0 CIA_TIMER_CONTROL_START = (byte) 1 +(byte) CIA_TIMER_CONTROL_STOP +(dword) CLOCKS_PER_INIT +(const dword) CLOCKS_PER_INIT#0 CLOCKS_PER_INIT = (byte) $12 (byte*) D018 (const byte*) D018#0 D018 = (byte*) 53272 (byte[]) FONT_HEX_PROTO @@ -4370,7 +5908,7 @@ FINAL SYMBOL TABLE (const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:10 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:18 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 (label) bsearch16u::@2 @@ -4383,25 +5921,32 @@ FINAL SYMBOL TABLE (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:10 1001.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:10 334.33333333333337 -(word*) bsearch16u::items#8 items zp ZP_WORD:10 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:18 1001.0 +(word*) bsearch16u::items#2 items zp ZP_WORD:18 334.33333333333337 +(word*) bsearch16u::items#8 items zp ZP_WORD:18 1501.5 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:27 0.2857142857142857 +(word) bsearch16u::key#0 key zp ZP_WORD:39 0.2857142857142857 (byte) bsearch16u::num (byte) bsearch16u::num#0 reg byte x 2002.0 (byte) bsearch16u::num#1 reg byte x 2002.0 (byte) bsearch16u::num#3 reg byte x 556.1111111111111 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:29 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:41 501.0 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:31 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:43 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:10 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:10 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:10 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:10 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:18 2.0 +(word*) bsearch16u::return#2 return zp ZP_WORD:18 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:18 4.0 +(word*~) bsearch16u::return#6 return zp ZP_WORD:18 4.0 +(dword()) clock() +(label) clock::@return +(dword) clock::return +(dword) clock::return#0 return zp ZP_DWORD:33 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:33 4.0 +(void()) clock_start() +(label) clock_start::@return (byte*) heap_head (void()) init_dist_screen((byte*) init_dist_screen::screen) (byte~) init_dist_screen::$13 reg byte a 202.0 @@ -4424,37 +5969,37 @@ FINAL SYMBOL TABLE (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:27 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:39 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:5 7.333333333333333 -(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:5 6.787878787878788 +(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:14 7.333333333333333 +(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:14 6.787878787878788 (byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:3 5.5 -(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:3 7.0 +(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:12 5.5 +(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:12 7.0 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:7 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:7 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:16 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:16 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:9 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:9 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:17 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:17 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:27 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:39 202.0 (byte) init_dist_screen::y -(byte) init_dist_screen::y#1 y zp ZP_BYTE:2 16.5 -(byte) init_dist_screen::y#10 y zp ZP_BYTE:2 0.9705882352941178 +(byte) init_dist_screen::y#1 y zp ZP_BYTE:11 16.5 +(byte) init_dist_screen::y#10 y zp ZP_BYTE:11 0.9705882352941178 (byte) init_dist_screen::y2 (byte) init_dist_screen::y2#0 reg byte a 22.0 (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:25 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:37 4.869565217391305 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:33 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:45 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 (byte~) init_font_hex::$2 reg byte a 2002.0 (label) init_font_hex::@1 @@ -4464,28 +6009,28 @@ FINAL SYMBOL TABLE (label) init_font_hex::@5 (label) init_font_hex::@return (byte) init_font_hex::c -(byte) init_font_hex::c#1 c zp ZP_BYTE:18 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:18 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:26 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:26 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:23 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:23 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:31 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:31 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:19 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:19 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:19 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:27 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:27 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:27 22.0 (byte) init_font_hex::i (byte) init_font_hex::i#1 reg byte x 1501.5 (byte) init_font_hex::i#2 reg byte x 667.3333333333334 (byte) init_font_hex::idx -(byte) init_font_hex::idx#2 idx zp ZP_BYTE:24 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:32 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:24 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:32 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:16 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:16 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:24 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:24 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:21 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:21 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:29 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:29 92.53846153846155 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -4495,14 +6040,25 @@ FINAL SYMBOL TABLE (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:12 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:12 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:20 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:20 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#1 squares zp ZP_WORD:14 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:14 16.5 +(word*) init_squares::squares#1 squares zp ZP_WORD:22 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:22 16.5 (void()) main() +(dword~) main::$4 $4 zp ZP_DWORD:33 4.0 (label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 (label) main::@return +(byte*) main::BASE_CHARSET +(const byte*) main::BASE_CHARSET#0 BASE_CHARSET = (byte*) 4096 +(byte*) main::BASE_SCREEN +(const byte*) main::BASE_SCREEN#0 BASE_SCREEN = (byte*) 1024 +(dword) main::cyclecount +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:33 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -4517,79 +6073,141 @@ FINAL SYMBOL TABLE (byte) main::toD0181_return (const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f (byte*) main::toD0181_screen +(label) main::toD0182 +(word~) main::toD0182_$0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$2 +(number~) main::toD0182_$3 +(word~) main::toD0182_$4 +(byte~) main::toD0182_$5 +(number~) main::toD0182_$6 +(number~) main::toD0182_$7 +(number~) main::toD0182_$8 +(byte*) main::toD0182_gfx +(byte) main::toD0182_return +(const byte) main::toD0182_return#0 toD0182_return = >(word)(const byte*) main::BASE_SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) main::BASE_CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0182_screen (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem (void*) malloc::return (const void*) malloc::return#0 return = (void*)(const byte*) HEAP_START#0 (word) malloc::size +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) +(byte~) print_byte_at::$0 reg byte a 4.0 +(byte~) print_byte_at::$2 reg byte y 2.0 +(label) print_byte_at::@1 +(label) print_byte_at::@return +(byte*) print_byte_at::at +(byte*) print_byte_at::at#0 at zp ZP_WORD:4 4.0 +(byte*) print_byte_at::at#1 at zp ZP_WORD:4 4.0 +(byte*) print_byte_at::at#2 at zp ZP_WORD:4 1.3333333333333333 +(byte) print_byte_at::b +(byte) print_byte_at::b#0 b zp ZP_BYTE:6 2.0 +(byte) print_byte_at::b#1 b zp ZP_BYTE:6 2.0 +(byte) print_byte_at::b#2 b zp ZP_BYTE:6 1.6 +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) +(label) print_char_at::@return +(byte*) print_char_at::at +(byte*) print_char_at::at#0 at zp ZP_WORD:9 4.0 +(byte*) print_char_at::at#1 at zp ZP_WORD:9 2.0 +(byte*) print_char_at::at#2 at zp ZP_WORD:9 6.0 +(byte) print_char_at::ch +(byte) print_char_at::ch#0 reg byte x 2.0 +(byte) print_char_at::ch#1 reg byte x 4.0 +(byte) print_char_at::ch#2 reg byte x 6.0 +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) +(label) print_dword_at::@1 +(label) print_dword_at::@return +(byte*) print_dword_at::at +(dword) print_dword_at::dw +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:33 2.0 +(byte[]) print_hextab +(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) +(label) print_word_at::@1 +(label) print_word_at::@return +(byte*) print_word_at::at +(byte*) print_word_at::at#2 at zp ZP_WORD:4 0.8 +(word) print_word_at::w +(word) print_word_at::w#0 w zp ZP_WORD:2 4.0 +(word) print_word_at::w#1 w zp ZP_WORD:2 4.0 +(word) print_word_at::w#2 w zp ZP_WORD:2 2.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:27 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:25 22.0 -(word) sqr::return#3 return zp ZP_WORD:27 202.0 +(word) sqr::return#0 return zp ZP_WORD:39 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:37 22.0 +(word) sqr::return#3 return zp ZP_WORD:39 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:10 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:10 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:18 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:18 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:10 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:18 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:27 103.0 +(word) sqrt::val#0 val zp ZP_WORD:39 103.0 -zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] -zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] +zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +zp ZP_WORD:4 [ print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] +zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +zp ZP_WORD:9 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +zp ZP_BYTE:11 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +zp ZP_WORD:12 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] +zp ZP_WORD:14 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -zp ZP_BYTE:7 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -zp ZP_BYTE:9 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +zp ZP_BYTE:16 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:17 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:10 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] +zp ZP_WORD:18 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] -zp ZP_WORD:12 [ init_squares::sqr#2 init_squares::sqr#1 ] -zp ZP_WORD:14 [ init_squares::squares#2 init_squares::squares#1 ] +zp ZP_WORD:20 [ init_squares::sqr#2 init_squares::sqr#1 ] +zp ZP_WORD:22 [ init_squares::squares#2 init_squares::squares#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:21 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:23 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +zp ZP_WORD:24 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:27 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:29 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_BYTE:32 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_DWORD:33 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +reg byte a [ print_byte_at::$0 ] +reg byte y [ print_byte_at::$2 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:25 [ sqr::return#2 init_dist_screen::yds#0 ] +zp ZP_WORD:37 [ sqr::return#2 init_dist_screen::yds#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:27 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +zp ZP_WORD:39 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:29 [ bsearch16u::pivot#0 ] -zp ZP_WORD:31 [ bsearch16u::result#0 ] +zp ZP_WORD:41 [ bsearch16u::pivot#0 ] +zp ZP_WORD:43 [ bsearch16u::result#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] -zp ZP_BYTE:33 [ init_font_hex::$0 ] +zp ZP_BYTE:45 [ init_font_hex::$0 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 202980 +Score: 203337 //SEG0 File Comments // Calculate the distance to the center of the screen - and show it using font-hex @@ -4602,6 +6220,21 @@ Score: 202980 // Start of the heap used by malloc() .label HEAP_START = $c000 .label D018 = $d018 + // CIA #2 Timer A+B Value (32-bit) + .label CIA2_TIMER_AB = $dd04 + // CIA #2 Timer A Control Register + .label CIA2_TIMER_A_CONTROL = $dd0e + // CIA #2 Timer B Control Register + .label CIA2_TIMER_B_CONTROL = $dd0f + // Timer Control - Start/stop timer (0:stop, 1: start) + .const CIA_TIMER_CONTROL_START = 1 + // Timer Control - Time CONTINUOUS/ONE-SHOT (0:CONTINUOUS, 1: ONE-SHOT) + .const CIA_TIMER_CONTROL_CONTINUOUS = 0 + // Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high) + .const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 + // Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine. + // To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code. + .const CLOCKS_PER_INIT = $12 .label CHARSET = $2000 .label SCREEN = $2800 .const NUM_SQUARES = $30 @@ -4615,9 +6248,14 @@ Score: 202980 //SEG9 @end //SEG10 main main: { + .label BASE_SCREEN = $400 + .label BASE_CHARSET = $1000 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f + .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f + .label _4 = $21 + .label cyclecount = $21 //SEG11 [5] call init_font_hex - //SEG12 [93] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [138] phi from main to init_font_hex [phi:main->init_font_hex] jsr init_font_hex //SEG13 [6] phi from main to main::toD0181 [phi:main->main::toD0181] //SEG14 main::toD0181 @@ -4625,111 +6263,304 @@ main: { //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG17 [8] call init_dist_screen - //SEG18 [10] phi from main::@1 to init_dist_screen [phi:main::@1->init_dist_screen] + //SEG17 [8] call clock_start + jsr clock_start + //SEG18 [9] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + //SEG19 main::@3 + //SEG20 [10] call init_dist_screen + //SEG21 [49] phi from main::@3 to init_dist_screen [phi:main::@3->init_dist_screen] jsr init_dist_screen - //SEG19 main::@return - //SEG20 [9] return + //SEG22 [11] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + //SEG23 main::@4 + //SEG24 [12] call clock + jsr clock + //SEG25 [13] (dword) clock::return#2 ← (dword) clock::return#0 + //SEG26 main::@5 + //SEG27 [14] (dword~) main::$4 ← (dword) clock::return#2 + //SEG28 [15] (dword) main::cyclecount#0 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT#0 -- vduz1=vduz1_minus_vduc1 + lda cyclecount + sec + sbc #CLOCKS_PER_INIT + sta cyclecount+1 + lda cyclecount+2 + sbc #>$10 + sta cyclecount+2 + lda cyclecount+3 + sbc #>CLOCKS_PER_INIT>>$10 + sta cyclecount+3 + //SEG29 [16] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 + //SEG30 [17] call print_dword_at + jsr print_dword_at + //SEG31 [18] phi from main::@5 to main::toD0182 [phi:main::@5->main::toD0182] + //SEG32 main::toD0182 + //SEG33 main::@2 + //SEG34 [19] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0182_return + sta D018 + //SEG35 main::@return + //SEG36 [20] return rts } -//SEG21 init_dist_screen +//SEG37 print_dword_at +// Print a dword as HEX at a specific position +// print_dword_at(dword zeropage($21) dw) +print_dword_at: { + .label dw = $21 + //SEG38 [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 -- vwuz1=_hi_vduz2 + lda dw+2 + sta print_word_at.w + lda dw+3 + sta print_word_at.w+1 + //SEG39 [22] call print_word_at + //SEG40 [26] phi from print_dword_at to print_word_at [phi:print_dword_at->print_word_at] + //SEG41 [26] phi (byte*) print_word_at::at#2 = (const byte*) main::BASE_SCREEN#0 [phi:print_dword_at->print_word_at#0] -- pbuz1=pbuc1 + lda #main.BASE_SCREEN + sta print_word_at.at+1 + //SEG42 [26] phi (word) print_word_at::w#2 = (word) print_word_at::w#0 [phi:print_dword_at->print_word_at#1] -- register_copy + jsr print_word_at + //SEG43 print_dword_at::@1 + //SEG44 [23] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0 -- vwuz1=_lo_vduz2 + lda dw + sta print_word_at.w + lda dw+1 + sta print_word_at.w+1 + //SEG45 [24] call print_word_at + //SEG46 [26] phi from print_dword_at::@1 to print_word_at [phi:print_dword_at::@1->print_word_at] + //SEG47 [26] phi (byte*) print_word_at::at#2 = (const byte*) main::BASE_SCREEN#0+(byte) 4 [phi:print_dword_at::@1->print_word_at#0] -- pbuz1=pbuc1 + lda #main.BASE_SCREEN+4 + sta print_word_at.at+1 + //SEG48 [26] phi (word) print_word_at::w#2 = (word) print_word_at::w#1 [phi:print_dword_at::@1->print_word_at#1] -- register_copy + jsr print_word_at + //SEG49 print_dword_at::@return + //SEG50 [25] return + rts +} +//SEG51 print_word_at +// Print a word as HEX at a specific position +// print_word_at(word zeropage(2) w, byte* zeropage(4) at) +print_word_at: { + .label w = 2 + .label at = 4 + //SEG52 [27] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2 -- vbuz1=_hi_vwuz2 + lda w+1 + sta print_byte_at.b + //SEG53 [28] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2 + //SEG54 [29] call print_byte_at + //SEG55 [34] phi from print_word_at to print_byte_at [phi:print_word_at->print_byte_at] + //SEG56 [34] phi (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#0 [phi:print_word_at->print_byte_at#0] -- register_copy + //SEG57 [34] phi (byte) print_byte_at::b#2 = (byte) print_byte_at::b#0 [phi:print_word_at->print_byte_at#1] -- register_copy + jsr print_byte_at + //SEG58 print_word_at::@1 + //SEG59 [30] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2 -- vbuz1=_lo_vwuz2 + lda w + sta print_byte_at.b + //SEG60 [31] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2 -- pbuz1=pbuz1_plus_2 + lda print_byte_at.at + clc + adc #2 + sta print_byte_at.at + bcc !+ + inc print_byte_at.at+1 + !: + //SEG61 [32] call print_byte_at + //SEG62 [34] phi from print_word_at::@1 to print_byte_at [phi:print_word_at::@1->print_byte_at] + //SEG63 [34] phi (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#1 [phi:print_word_at::@1->print_byte_at#0] -- register_copy + //SEG64 [34] phi (byte) print_byte_at::b#2 = (byte) print_byte_at::b#1 [phi:print_word_at::@1->print_byte_at#1] -- register_copy + jsr print_byte_at + //SEG65 print_word_at::@return + //SEG66 [33] return + rts +} +//SEG67 print_byte_at +// Print a byte as HEX at a specific position +// print_byte_at(byte zeropage(6) b, byte* zeropage(4) at) +print_byte_at: { + .label b = 6 + .label at = 4 + //SEG68 [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 -- vbuaa=vbuz1_ror_4 + lda b + lsr + lsr + lsr + lsr + //SEG69 [36] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) -- vbuxx=pbuc1_derefidx_vbuaa + tay + ldx print_hextab,y + //SEG70 [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 -- pbuz1=pbuz2 + lda at + sta print_char_at.at + lda at+1 + sta print_char_at.at+1 + //SEG71 [38] call print_char_at + //SEG72 [44] phi from print_byte_at to print_char_at [phi:print_byte_at->print_char_at] + //SEG73 [44] phi (byte*) print_char_at::at#2 = (byte*) print_char_at::at#0 [phi:print_byte_at->print_char_at#0] -- register_copy + //SEG74 [44] phi (byte) print_char_at::ch#2 = (byte) print_char_at::ch#0 [phi:print_byte_at->print_char_at#1] -- register_copy + jsr print_char_at + //SEG75 print_byte_at::@1 + //SEG76 [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f -- vbuyy=vbuz1_band_vbuc1 + lda #$f + and b + tay + //SEG77 [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 -- pbuz1=pbuz2_plus_1 + lda at + clc + adc #1 + sta print_char_at.at + lda at+1 + adc #0 + sta print_char_at.at+1 + //SEG78 [41] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2) -- vbuxx=pbuc1_derefidx_vbuyy + ldx print_hextab,y + //SEG79 [42] call print_char_at + //SEG80 [44] phi from print_byte_at::@1 to print_char_at [phi:print_byte_at::@1->print_char_at] + //SEG81 [44] phi (byte*) print_char_at::at#2 = (byte*) print_char_at::at#1 [phi:print_byte_at::@1->print_char_at#0] -- register_copy + //SEG82 [44] phi (byte) print_char_at::ch#2 = (byte) print_char_at::ch#1 [phi:print_byte_at::@1->print_char_at#1] -- register_copy + jsr print_char_at + //SEG83 print_byte_at::@return + //SEG84 [43] return + rts +} +//SEG85 print_char_at +// Print a single char +// print_char_at(byte register(X) ch, byte* zeropage(9) at) +print_char_at: { + .label at = 9 + //SEG86 [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (at),y + //SEG87 print_char_at::@return + //SEG88 [46] return + rts +} +//SEG89 clock +// Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). +// This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() +clock: { + .label return = $21 + //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 + lda #<$ffffffff + sec + sbc CIA2_TIMER_AB + sta return + lda #>$ffffffff + sbc CIA2_TIMER_AB+1 + sta return+1 + lda #<$ffffffff>>$10 + sbc CIA2_TIMER_AB+2 + sta return+2 + lda #>$ffffffff>>$10 + sbc CIA2_TIMER_AB+3 + sta return+3 + //SEG91 clock::@return + //SEG92 [48] return + rts +} +//SEG93 init_dist_screen // Populates 1000 bytes (a screen) with values representing the distance to the center. // The actual value stored is distance*2 to increase precision init_dist_screen: { - .label yds = $19 - .label xds = $1b - .label ds = $1b - .label x = 7 - .label xb = 9 - .label screen_topline = 3 - .label screen_bottomline = 5 - .label y = 2 - //SEG22 [11] call init_squares - //SEG23 [80] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] + .label yds = $25 + .label xds = $27 + .label ds = $27 + .label x = $10 + .label xb = $11 + .label screen_topline = $c + .label screen_bottomline = $e + .label y = $b + //SEG94 [50] call init_squares + //SEG95 [119] phi from init_dist_screen to init_squares [phi:init_dist_screen->init_squares] jsr init_squares - //SEG24 [12] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] - //SEG25 [12] phi (byte*) init_dist_screen::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:init_dist_screen->init_dist_screen::@1#0] -- pbuz1=pbuc1 + //SEG96 [51] phi from init_dist_screen to init_dist_screen::@1 [phi:init_dist_screen->init_dist_screen::@1] + //SEG97 [51] phi (byte*) init_dist_screen::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:init_dist_screen->init_dist_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$18 sta screen_bottomline+1 - //SEG26 [12] phi (byte*) init_dist_screen::screen_topline#10 = (const byte*) SCREEN#0 [phi:init_dist_screen->init_dist_screen::@1#1] -- pbuz1=pbuc1 + //SEG98 [51] phi (byte*) init_dist_screen::screen_topline#10 = (const byte*) SCREEN#0 [phi:init_dist_screen->init_dist_screen::@1#1] -- pbuz1=pbuc1 lda #SCREEN sta screen_topline+1 - //SEG27 [12] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen->init_dist_screen::@1#2] -- vbuz1=vbuc1 + //SEG99 [51] phi (byte) init_dist_screen::y#10 = (byte) 0 [phi:init_dist_screen->init_dist_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta y - //SEG28 [12] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] - //SEG29 [12] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy - //SEG30 [12] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy - //SEG31 [12] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy - //SEG32 init_dist_screen::@1 + //SEG100 [51] phi from init_dist_screen::@9 to init_dist_screen::@1 [phi:init_dist_screen::@9->init_dist_screen::@1] + //SEG101 [51] phi (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#0] -- register_copy + //SEG102 [51] phi (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#1 [phi:init_dist_screen::@9->init_dist_screen::@1#1] -- register_copy + //SEG103 [51] phi (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#1 [phi:init_dist_screen::@9->init_dist_screen::@1#2] -- register_copy + //SEG104 init_dist_screen::@1 b1: - //SEG33 [13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG105 [52] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG34 [14] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 + //SEG106 [53] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -- vbuaa_ge_vbuc1_then_la1 cmp #$18 bcs b2 - //SEG35 init_dist_screen::@3 - //SEG36 [15] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG107 init_dist_screen::@3 + //SEG108 [54] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$18+1 - //SEG37 [16] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] - //SEG38 [16] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy - //SEG39 init_dist_screen::@4 + //SEG109 [55] phi from init_dist_screen::@2 init_dist_screen::@3 to init_dist_screen::@4 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4] + //SEG110 [55] phi (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$7 [phi:init_dist_screen::@2/init_dist_screen::@3->init_dist_screen::@4#0] -- register_copy + //SEG111 init_dist_screen::@4 b4: - //SEG40 [17] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 - //SEG41 [18] call sqr - //SEG42 [76] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] - //SEG43 [76] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy + //SEG112 [56] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 + //SEG113 [57] call sqr + //SEG114 [115] phi from init_dist_screen::@4 to sqr [phi:init_dist_screen::@4->sqr] + //SEG115 [115] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:init_dist_screen::@4->sqr#0] -- register_copy jsr sqr - //SEG44 [19] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG116 [58] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_2 lda sqr.return+1 sta sqr.return_2+1 - //SEG45 init_dist_screen::@10 - //SEG46 [20] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 - //SEG47 [21] phi from init_dist_screen::@10 to init_dist_screen::@5 [phi:init_dist_screen::@10->init_dist_screen::@5] - //SEG48 [21] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@10->init_dist_screen::@5#0] -- vbuz1=vbuc1 + //SEG117 init_dist_screen::@10 + //SEG118 [59] (word) init_dist_screen::yds#0 ← (word) sqr::return#2 + //SEG119 [60] phi from init_dist_screen::@10 to init_dist_screen::@5 [phi:init_dist_screen::@10->init_dist_screen::@5] + //SEG120 [60] phi (byte) init_dist_screen::xb#2 = (byte) $27 [phi:init_dist_screen::@10->init_dist_screen::@5#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG49 [21] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@5#1] -- vbuz1=vbuc1 + //SEG121 [60] phi (byte) init_dist_screen::x#2 = (byte) 0 [phi:init_dist_screen::@10->init_dist_screen::@5#1] -- vbuz1=vbuc1 lda #0 sta x - //SEG50 [21] phi from init_dist_screen::@12 to init_dist_screen::@5 [phi:init_dist_screen::@12->init_dist_screen::@5] - //SEG51 [21] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@12->init_dist_screen::@5#0] -- register_copy - //SEG52 [21] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@12->init_dist_screen::@5#1] -- register_copy - //SEG53 init_dist_screen::@5 + //SEG122 [60] phi from init_dist_screen::@12 to init_dist_screen::@5 [phi:init_dist_screen::@12->init_dist_screen::@5] + //SEG123 [60] phi (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#1 [phi:init_dist_screen::@12->init_dist_screen::@5#0] -- register_copy + //SEG124 [60] phi (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#1 [phi:init_dist_screen::@12->init_dist_screen::@5#1] -- register_copy + //SEG125 init_dist_screen::@5 b5: - //SEG54 [22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG126 [61] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG55 [23] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 + //SEG127 [62] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -- vbuaa_ge_vbuc1_then_la1 cmp #$27 bcs b6 - //SEG56 init_dist_screen::@7 - //SEG57 [24] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG128 init_dist_screen::@7 + //SEG129 [63] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$27+1 - //SEG58 [25] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] - //SEG59 [25] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy - //SEG60 init_dist_screen::@8 + //SEG130 [64] phi from init_dist_screen::@6 init_dist_screen::@7 to init_dist_screen::@8 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8] + //SEG131 [64] phi (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$15 [phi:init_dist_screen::@6/init_dist_screen::@7->init_dist_screen::@8#0] -- register_copy + //SEG132 init_dist_screen::@8 b8: - //SEG61 [26] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 - //SEG62 [27] call sqr - //SEG63 [76] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] - //SEG64 [76] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy + //SEG133 [65] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 + //SEG134 [66] call sqr + //SEG135 [115] phi from init_dist_screen::@8 to sqr [phi:init_dist_screen::@8->sqr] + //SEG136 [115] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:init_dist_screen::@8->sqr#0] -- register_copy jsr sqr - //SEG65 [28] (word) sqr::return#3 ← (word) sqr::return#0 - //SEG66 init_dist_screen::@11 - //SEG67 [29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 - //SEG68 [30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG137 [67] (word) sqr::return#3 ← (word) sqr::return#0 + //SEG138 init_dist_screen::@11 + //SEG139 [68] (word) init_dist_screen::xds#0 ← (word) sqr::return#3 + //SEG140 [69] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0 -- vwuz1=vwuz1_plus_vwuz2 lda ds clc adc yds @@ -4737,32 +6568,32 @@ init_dist_screen: { lda ds+1 adc yds+1 sta ds+1 - //SEG69 [31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 - //SEG70 [32] call sqrt + //SEG141 [70] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0 + //SEG142 [71] call sqrt jsr sqrt - //SEG71 [33] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - //SEG72 init_dist_screen::@12 - //SEG73 [34] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 - //SEG74 [35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG143 [72] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + //SEG144 init_dist_screen::@12 + //SEG145 [73] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2 + //SEG146 [74] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa ldy x sta (screen_topline),y - //SEG75 [36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG147 [75] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_bottomline),y - //SEG76 [37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG148 [76] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa ldy xb sta (screen_topline),y - //SEG77 [38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG149 [77] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_bottomline),y - //SEG78 [39] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 + //SEG150 [78] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG79 [40] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 + //SEG151 [79] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG80 [41] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 + //SEG152 [80] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$13+1 bcc b5 - //SEG81 init_dist_screen::@9 - //SEG82 [42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG153 init_dist_screen::@9 + //SEG154 [81] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_topline @@ -4770,7 +6601,7 @@ init_dist_screen: { bcc !+ inc screen_topline+1 !: - //SEG83 [43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + //SEG155 [82] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 lda screen_bottomline sec sbc #<$28 @@ -4778,46 +6609,46 @@ init_dist_screen: { lda screen_bottomline+1 sbc #>$28 sta screen_bottomline+1 - //SEG84 [44] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 + //SEG156 [83] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10 -- vbuz1=_inc_vbuz1 inc y - //SEG85 [45] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG157 [84] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1 - //SEG86 init_dist_screen::@return - //SEG87 [46] return + //SEG158 init_dist_screen::@return + //SEG159 [85] return rts - //SEG88 init_dist_screen::@6 + //SEG160 init_dist_screen::@6 b6: - //SEG89 [47] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 + //SEG161 [86] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$27 jmp b8 - //SEG90 init_dist_screen::@2 + //SEG162 init_dist_screen::@2 b2: - //SEG91 [48] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 + //SEG163 [87] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$18 jmp b4 } -//SEG92 sqrt +//SEG164 sqrt // Find the (integer) square root of a word value // If the square is not an integer then it returns the largest integer N where N*N <= val // Uses a table of squares that must be initialized by calling init_squares() -// sqrt(word zeropage($1b) val) +// sqrt(word zeropage($27) val) sqrt: { - .label _1 = $a - .label _3 = $a - .label found = $a - .label val = $1b - //SEG93 [49] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - //SEG94 [50] call bsearch16u - //SEG95 [57] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + .label _1 = $12 + .label _3 = $12 + .label found = $12 + .label val = $27 + //SEG165 [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + //SEG166 [89] call bsearch16u + //SEG167 [96] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] jsr bsearch16u - //SEG96 [51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 - //SEG97 sqrt::@1 - //SEG98 [52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - //SEG99 [53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 + //SEG168 [90] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + //SEG169 sqrt::@1 + //SEG170 [91] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + //SEG171 [92] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 lda _3 sec sbc #SQUARES sta _3+1 - //SEG100 [54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG172 [93] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr _1+1 ror _1 - //SEG101 [55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 + //SEG173 [94] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 lda _1 - //SEG102 sqrt::@return - //SEG103 [56] return + //SEG174 sqrt::@return + //SEG175 [95] return rts } -//SEG104 bsearch16u +//SEG176 bsearch16u // Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. // - key - The value to look for // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($1b) key, word* zeropage($a) items, byte register(X) num) +// bsearch16u(word zeropage($27) key, word* zeropage($12) items, byte register(X) num) bsearch16u: { - .label _2 = $a - .label pivot = $1d - .label result = $1f - .label return = $a - .label items = $a - .label key = $1b - //SEG105 [58] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - //SEG106 [58] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + .label _2 = $12 + .label pivot = $29 + .label result = $2b + .label return = $12 + .label items = $12 + .label key = $27 + //SEG177 [97] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + //SEG178 [97] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 lda #SQUARES sta items+1 - //SEG107 [58] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + //SEG179 [97] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#3 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES - //SEG108 bsearch16u::@3 + //SEG180 bsearch16u::@3 b3: - //SEG109 [59] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + //SEG181 [98] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 cpx #0 bne b4 - //SEG110 bsearch16u::@5 - //SEG111 [60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + //SEG182 bsearch16u::@5 + //SEG183 [99] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -4873,8 +6704,8 @@ bsearch16u: { beq b2 !: bcc b2 - //SEG112 bsearch16u::@1 - //SEG113 [61] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + //SEG184 bsearch16u::@1 + //SEG185 [100] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -4882,30 +6713,30 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - //SEG114 [62] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - //SEG115 [62] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - //SEG116 bsearch16u::@2 + //SEG186 [101] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + //SEG187 [101] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + //SEG188 bsearch16u::@2 b2: - //SEG117 [63] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - //SEG118 [63] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - //SEG119 bsearch16u::@return - //SEG120 [64] return + //SEG189 [102] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + //SEG190 [102] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + //SEG191 bsearch16u::@return + //SEG192 [103] return rts - //SEG121 bsearch16u::@4 + //SEG193 bsearch16u::@4 b4: - //SEG122 [65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + //SEG194 [104] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr - //SEG123 [66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG195 [105] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG124 [67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + //SEG196 [106] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc adc items sta pivot lda #0 adc items+1 sta pivot+1 - //SEG125 [68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + //SEG197 [107] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -4915,28 +6746,28 @@ bsearch16u: { iny sbc (pivot),y sta result+1 - //SEG126 [69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + //SEG198 [108] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 bne b6 lda result bne b6 - //SEG127 bsearch16u::@8 - //SEG128 [70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + //SEG199 bsearch16u::@8 + //SEG200 [109] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 lda pivot sta return lda pivot+1 sta return+1 rts - //SEG129 bsearch16u::@6 + //SEG201 bsearch16u::@6 b6: - //SEG130 [71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + //SEG202 [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 lda result+1 bmi b7 bne !+ lda result beq b7 !: - //SEG131 bsearch16u::@9 - //SEG132 [72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + //SEG203 bsearch16u::@9 + //SEG204 [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 lda #1*SIZEOF_WORD clc adc pivot @@ -4944,76 +6775,76 @@ bsearch16u: { lda #0 adc pivot+1 sta items+1 - //SEG133 [73] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + //SEG205 [112] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx dex - //SEG134 [74] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - //SEG135 [74] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG136 [74] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - //SEG137 bsearch16u::@7 + //SEG206 [113] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + //SEG207 [113] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG208 [113] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + //SEG209 bsearch16u::@7 b7: - //SEG138 [75] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + //SEG210 [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - //SEG139 [58] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - //SEG140 [58] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG141 [58] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG211 [97] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + //SEG212 [97] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG213 [97] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy jmp b3 } -//SEG142 sqr +//SEG214 sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $1b - .label return_2 = $19 - //SEG143 [77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $27 + .label return_2 = $25 + //SEG215 [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG144 [78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa + //SEG216 [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa tay lda SQUARES,y sta return lda SQUARES+1,y sta return+1 - //SEG145 sqr::@return - //SEG146 [79] return + //SEG217 sqr::@return + //SEG218 [118] return rts } -//SEG147 init_squares +//SEG219 init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $e - .label sqr = $c - //SEG148 [81] call malloc - //SEG149 [91] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $16 + .label sqr = $14 + //SEG220 [120] call malloc + //SEG221 [130] phi from init_squares to malloc [phi:init_squares->malloc] jsr malloc - //SEG150 [82] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] - //SEG151 [82] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 + //SEG222 [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + //SEG223 [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG152 [82] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + //SEG224 [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #SQUARES sta squares+1 - //SEG153 [82] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + //SEG225 [121] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 txa sta sqr sta sqr+1 - //SEG154 [82] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - //SEG155 [82] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG156 [82] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG157 [82] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy - //SEG158 init_squares::@1 + //SEG226 [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + //SEG227 [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG228 [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG229 [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + //SEG230 init_squares::@1 b1: - //SEG159 [83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + //SEG231 [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - //SEG160 [84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + //SEG232 [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -5021,100 +6852,130 @@ init_squares: { bcc !+ inc squares+1 !: - //SEG161 [85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + //SEG233 [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - //SEG162 [86] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + //SEG234 [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - //SEG163 [87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + //SEG235 [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - //SEG164 [88] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + //SEG236 [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - //SEG165 [89] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG237 [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1 - //SEG166 init_squares::@return - //SEG167 [90] return + //SEG238 init_squares::@return + //SEG239 [129] return rts } -//SEG168 malloc +//SEG240 malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. malloc: { .label return = HEAP_START - //SEG169 malloc::@return - //SEG170 [92] return + //SEG241 malloc::@return + //SEG242 [131] return rts } -//SEG171 init_font_hex +//SEG243 clock_start +// Reset & start the processor clock time. The value can be read using clock(). +// This uses CIA #2 Timer A+B on the C64 +clock_start: { + //SEG244 [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + // Setup CIA#2 timer A to count (down) CPU cycles + lda #CIA_TIMER_CONTROL_CONTINUOUS + sta CIA2_TIMER_A_CONTROL + //SEG245 [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A + sta CIA2_TIMER_B_CONTROL + //SEG246 [134] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + lda #<$ffffffff + sta CIA2_TIMER_AB + lda #>$ffffffff + sta CIA2_TIMER_AB+1 + lda #<$ffffffff>>$10 + sta CIA2_TIMER_AB+2 + lda #>$ffffffff>>$10 + sta CIA2_TIMER_AB+3 + //SEG247 [135] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A + sta CIA2_TIMER_B_CONTROL + //SEG248 [136] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + lda #CIA_TIMER_CONTROL_START + sta CIA2_TIMER_A_CONTROL + //SEG249 clock_start::@return + //SEG250 [137] return + rts +} +//SEG251 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($13) charset) +// init_font_hex(byte* zeropage($1b) charset) init_font_hex: { - .label _0 = $21 - .label idx = $18 - .label proto_lo = $15 - .label charset = $13 - .label c1 = $17 - .label proto_hi = $10 - .label c = $12 - //SEG172 [94] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG173 [94] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .label _0 = $2d + .label idx = $20 + .label proto_lo = $1d + .label charset = $1b + .label c1 = $1f + .label proto_hi = $18 + .label c = $1a + //SEG252 [139] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + //SEG253 [139] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG174 [94] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + //SEG254 [139] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG175 [94] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG255 [139] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta charset+1 - //SEG176 [94] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG177 [94] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - //SEG178 [94] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - //SEG179 [94] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy - //SEG180 init_font_hex::@1 + //SEG256 [139] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG257 [139] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + //SEG258 [139] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + //SEG259 [139] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + //SEG260 init_font_hex::@1 b1: - //SEG181 [95] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG182 [95] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG261 [140] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG262 [140] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - //SEG183 [95] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + //SEG263 [140] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG184 [95] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy - //SEG185 [95] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG186 [95] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - //SEG187 [95] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - //SEG188 [95] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy - //SEG189 init_font_hex::@2 + //SEG264 [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + //SEG265 [140] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG266 [140] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + //SEG267 [140] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + //SEG268 [140] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + //SEG269 init_font_hex::@2 b2: - //SEG190 [96] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG270 [141] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG191 [97] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG192 [97] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG271 [142] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG272 [142] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - //SEG193 [97] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG273 [142] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG194 [97] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG195 [97] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - //SEG196 [97] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy - //SEG197 init_font_hex::@3 + //SEG274 [142] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG275 [142] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + //SEG276 [142] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + //SEG277 init_font_hex::@3 b3: - //SEG198 [98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 + //SEG278 [143] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y @@ -5123,33 +6984,33 @@ init_font_hex: { asl asl sta _0 - //SEG199 [99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 + //SEG279 [144] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl - //SEG200 [100] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG280 [145] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG201 [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG281 [146] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy idx sta (charset),y - //SEG202 [102] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG282 [147] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG203 [103] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG283 [148] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG204 [104] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG284 [149] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG205 init_font_hex::@4 - //SEG206 [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG285 init_font_hex::@4 + //SEG286 [150] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - //SEG207 [106] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG287 [151] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG208 [107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG288 [152] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG209 [108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG289 [153] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -5157,7 +7018,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG210 [109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG290 [154] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -5165,14 +7026,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG211 [110] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG291 [155] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG212 [111] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG292 [156] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2 - //SEG213 init_font_hex::@5 - //SEG214 [112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG293 init_font_hex::@5 + //SEG294 [157] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -5180,17 +7041,18 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG215 [113] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG295 [158] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG216 [114] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG296 [159] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1 - //SEG217 init_font_hex::@return - //SEG218 [115] return + //SEG297 init_font_hex::@return + //SEG298 [160] return rts } -//SEG219 File Data +//SEG299 File Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 + print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/screen-center-distance.sym b/src/test/ref/screen-center-distance.sym index 65eb9cbd8..2d9c15de8 100644 --- a/src/test/ref/screen-center-distance.sym +++ b/src/test/ref/screen-center-distance.sym @@ -3,6 +3,22 @@ (label) @end (byte*) CHARSET (const byte*) CHARSET#0 CHARSET = (byte*) 8192 +(dword*) CIA2_TIMER_AB +(const dword*) CIA2_TIMER_AB#0 CIA2_TIMER_AB = (dword*) 56580 +(byte*) CIA2_TIMER_A_CONTROL +(const byte*) CIA2_TIMER_A_CONTROL#0 CIA2_TIMER_A_CONTROL = (byte*) 56590 +(byte*) CIA2_TIMER_B_CONTROL +(const byte*) CIA2_TIMER_B_CONTROL#0 CIA2_TIMER_B_CONTROL = (byte*) 56591 +(byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +(byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = (byte) $40 +(byte) CIA_TIMER_CONTROL_CONTINUOUS +(const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 CIA_TIMER_CONTROL_CONTINUOUS = (byte) 0 +(byte) CIA_TIMER_CONTROL_START +(const byte) CIA_TIMER_CONTROL_START#0 CIA_TIMER_CONTROL_START = (byte) 1 +(byte) CIA_TIMER_CONTROL_STOP +(dword) CLOCKS_PER_INIT +(const dword) CLOCKS_PER_INIT#0 CLOCKS_PER_INIT = (byte) $12 (byte*) D018 (const byte*) D018#0 D018 = (byte*) 53272 (byte[]) FONT_HEX_PROTO @@ -18,7 +34,7 @@ (const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:10 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:18 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 (label) bsearch16u::@2 @@ -31,25 +47,32 @@ (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:10 1001.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:10 334.33333333333337 -(word*) bsearch16u::items#8 items zp ZP_WORD:10 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:18 1001.0 +(word*) bsearch16u::items#2 items zp ZP_WORD:18 334.33333333333337 +(word*) bsearch16u::items#8 items zp ZP_WORD:18 1501.5 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:27 0.2857142857142857 +(word) bsearch16u::key#0 key zp ZP_WORD:39 0.2857142857142857 (byte) bsearch16u::num (byte) bsearch16u::num#0 reg byte x 2002.0 (byte) bsearch16u::num#1 reg byte x 2002.0 (byte) bsearch16u::num#3 reg byte x 556.1111111111111 (byte) bsearch16u::num#5 reg byte x 3003.0 (word*) bsearch16u::pivot -(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:29 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:41 501.0 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:31 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:43 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:10 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:10 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:10 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:10 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:18 2.0 +(word*) bsearch16u::return#2 return zp ZP_WORD:18 6.0 +(word*) bsearch16u::return#3 return zp ZP_WORD:18 4.0 +(word*~) bsearch16u::return#6 return zp ZP_WORD:18 4.0 +(dword()) clock() +(label) clock::@return +(dword) clock::return +(dword) clock::return#0 return zp ZP_DWORD:33 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:33 4.0 +(void()) clock_start() +(label) clock_start::@return (byte*) heap_head (void()) init_dist_screen((byte*) init_dist_screen::screen) (byte~) init_dist_screen::$13 reg byte a 202.0 @@ -72,37 +95,37 @@ (byte) init_dist_screen::d (byte) init_dist_screen::d#0 reg byte a 126.25 (word) init_dist_screen::ds -(word) init_dist_screen::ds#0 ds zp ZP_WORD:27 202.0 +(word) init_dist_screen::ds#0 ds zp ZP_WORD:39 202.0 (byte*) init_dist_screen::screen (byte*) init_dist_screen::screen_bottomline -(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:5 7.333333333333333 -(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:5 6.787878787878788 +(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:14 7.333333333333333 +(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:14 6.787878787878788 (byte*) init_dist_screen::screen_topline -(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:3 5.5 -(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:3 7.0 +(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:12 5.5 +(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:12 7.0 (byte) init_dist_screen::x -(byte) init_dist_screen::x#1 x zp ZP_BYTE:7 101.0 -(byte) init_dist_screen::x#2 x zp ZP_BYTE:7 26.578947368421055 +(byte) init_dist_screen::x#1 x zp ZP_BYTE:16 101.0 +(byte) init_dist_screen::x#2 x zp ZP_BYTE:16 26.578947368421055 (byte) init_dist_screen::x2 (byte) init_dist_screen::x2#0 reg byte a 202.0 (byte) init_dist_screen::xb -(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:9 101.0 -(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:9 20.2 +(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:17 101.0 +(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:17 20.2 (byte) init_dist_screen::xd (byte) init_dist_screen::xd#0 reg byte a 303.0 (word) init_dist_screen::xds -(word) init_dist_screen::xds#0 xds zp ZP_WORD:27 202.0 +(word) init_dist_screen::xds#0 xds zp ZP_WORD:39 202.0 (byte) init_dist_screen::y -(byte) init_dist_screen::y#1 y zp ZP_BYTE:2 16.5 -(byte) init_dist_screen::y#10 y zp ZP_BYTE:2 0.9705882352941178 +(byte) init_dist_screen::y#1 y zp ZP_BYTE:11 16.5 +(byte) init_dist_screen::y#10 y zp ZP_BYTE:11 0.9705882352941178 (byte) init_dist_screen::y2 (byte) init_dist_screen::y2#0 reg byte a 22.0 (byte) init_dist_screen::yd (byte) init_dist_screen::yd#0 reg byte a 33.0 (word) init_dist_screen::yds -(word) init_dist_screen::yds#0 yds zp ZP_WORD:25 4.869565217391305 +(word) init_dist_screen::yds#0 yds zp ZP_WORD:37 4.869565217391305 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:33 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:45 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 (byte~) init_font_hex::$2 reg byte a 2002.0 (label) init_font_hex::@1 @@ -112,28 +135,28 @@ (label) init_font_hex::@5 (label) init_font_hex::@return (byte) init_font_hex::c -(byte) init_font_hex::c#1 c zp ZP_BYTE:18 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:18 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:26 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:26 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:23 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:23 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:31 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:31 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:19 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:19 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:19 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:27 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:27 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:27 22.0 (byte) init_font_hex::i (byte) init_font_hex::i#1 reg byte x 1501.5 (byte) init_font_hex::i#2 reg byte x 667.3333333333334 (byte) init_font_hex::idx -(byte) init_font_hex::idx#2 idx zp ZP_BYTE:24 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:32 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:24 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:32 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:16 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:16 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:24 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:24 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:21 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:21 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:29 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:29 92.53846153846155 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -143,14 +166,25 @@ (byte) init_squares::i#1 reg byte x 16.5 (byte) init_squares::i#2 reg byte x 5.5 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp ZP_WORD:12 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:12 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:20 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:20 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#1 squares zp ZP_WORD:14 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:14 16.5 +(word*) init_squares::squares#1 squares zp ZP_WORD:22 3.6666666666666665 +(word*) init_squares::squares#2 squares zp ZP_WORD:22 16.5 (void()) main() +(dword~) main::$4 $4 zp ZP_DWORD:33 4.0 (label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 (label) main::@return +(byte*) main::BASE_CHARSET +(const byte*) main::BASE_CHARSET#0 BASE_CHARSET = (byte*) 4096 +(byte*) main::BASE_SCREEN +(const byte*) main::BASE_SCREEN#0 BASE_SCREEN = (byte*) 1024 +(dword) main::cyclecount +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:33 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -165,72 +199,134 @@ (byte) main::toD0181_return (const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f (byte*) main::toD0181_screen +(label) main::toD0182 +(word~) main::toD0182_$0 +(number~) main::toD0182_$1 +(number~) main::toD0182_$2 +(number~) main::toD0182_$3 +(word~) main::toD0182_$4 +(byte~) main::toD0182_$5 +(number~) main::toD0182_$6 +(number~) main::toD0182_$7 +(number~) main::toD0182_$8 +(byte*) main::toD0182_gfx +(byte) main::toD0182_return +(const byte) main::toD0182_return#0 toD0182_return = >(word)(const byte*) main::BASE_SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) main::BASE_CHARSET#0/(byte) 4&(byte) $f +(byte*) main::toD0182_screen (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem (void*) malloc::return (const void*) malloc::return#0 return = (void*)(const byte*) HEAP_START#0 (word) malloc::size +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) +(byte~) print_byte_at::$0 reg byte a 4.0 +(byte~) print_byte_at::$2 reg byte y 2.0 +(label) print_byte_at::@1 +(label) print_byte_at::@return +(byte*) print_byte_at::at +(byte*) print_byte_at::at#0 at zp ZP_WORD:4 4.0 +(byte*) print_byte_at::at#1 at zp ZP_WORD:4 4.0 +(byte*) print_byte_at::at#2 at zp ZP_WORD:4 1.3333333333333333 +(byte) print_byte_at::b +(byte) print_byte_at::b#0 b zp ZP_BYTE:6 2.0 +(byte) print_byte_at::b#1 b zp ZP_BYTE:6 2.0 +(byte) print_byte_at::b#2 b zp ZP_BYTE:6 1.6 +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) +(label) print_char_at::@return +(byte*) print_char_at::at +(byte*) print_char_at::at#0 at zp ZP_WORD:9 4.0 +(byte*) print_char_at::at#1 at zp ZP_WORD:9 2.0 +(byte*) print_char_at::at#2 at zp ZP_WORD:9 6.0 +(byte) print_char_at::ch +(byte) print_char_at::ch#0 reg byte x 2.0 +(byte) print_char_at::ch#1 reg byte x 4.0 +(byte) print_char_at::ch#2 reg byte x 6.0 +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) +(label) print_dword_at::@1 +(label) print_dword_at::@return +(byte*) print_dword_at::at +(dword) print_dword_at::dw +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:33 2.0 +(byte[]) print_hextab +(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) +(label) print_word_at::@1 +(label) print_word_at::@return +(byte*) print_word_at::at +(byte*) print_word_at::at#2 at zp ZP_WORD:4 0.8 +(word) print_word_at::w +(word) print_word_at::w#0 w zp ZP_WORD:2 4.0 +(word) print_word_at::w#1 w zp ZP_WORD:2 4.0 +(word) print_word_at::w#2 w zp ZP_WORD:2 2.0 (word()) sqr((byte) sqr::val) (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:27 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:25 22.0 -(word) sqr::return#3 return zp ZP_WORD:27 202.0 +(word) sqr::return#0 return zp ZP_WORD:39 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:37 22.0 +(word) sqr::return#3 return zp ZP_WORD:39 202.0 (byte) sqr::val (byte) sqr::val#0 reg byte a 22.0 (byte) sqr::val#1 reg byte a 202.0 (byte) sqr::val#2 reg byte a 114.0 (byte()) sqrt((word) sqrt::val) -(word~) sqrt::$1 $1 zp ZP_WORD:10 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:10 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:18 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:18 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:10 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:18 4.0 (byte) sqrt::return (byte) sqrt::return#0 reg byte a 34.33333333333333 (byte) sqrt::return#2 reg byte a 202.0 (byte) sqrt::sq (word) sqrt::val -(word) sqrt::val#0 val zp ZP_WORD:27 103.0 +(word) sqrt::val#0 val zp ZP_WORD:39 103.0 -zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ] -zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] -zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] +zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] +zp ZP_WORD:4 [ print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] +zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] +zp ZP_WORD:9 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] +zp ZP_BYTE:11 [ init_dist_screen::y#10 init_dist_screen::y#1 ] +zp ZP_WORD:12 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ] +zp ZP_WORD:14 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ] reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] -zp ZP_BYTE:7 [ init_dist_screen::x#2 init_dist_screen::x#1 ] -zp ZP_BYTE:9 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] +zp ZP_BYTE:16 [ init_dist_screen::x#2 init_dist_screen::x#1 ] +zp ZP_BYTE:17 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ] -zp ZP_WORD:10 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] +zp ZP_WORD:18 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] -zp ZP_WORD:12 [ init_squares::sqr#2 init_squares::sqr#1 ] -zp ZP_WORD:14 [ init_squares::squares#2 init_squares::squares#1 ] +zp ZP_WORD:20 [ init_squares::sqr#2 init_squares::sqr#1 ] +zp ZP_WORD:22 [ init_squares::squares#2 init_squares::squares#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:21 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:23 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +zp ZP_WORD:24 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:27 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:29 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_BYTE:32 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_DWORD:33 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +reg byte a [ print_byte_at::$0 ] +reg byte y [ print_byte_at::$2 ] reg byte a [ init_dist_screen::y2#0 ] -zp ZP_WORD:25 [ sqr::return#2 init_dist_screen::yds#0 ] +zp ZP_WORD:37 [ sqr::return#2 init_dist_screen::yds#0 ] reg byte a [ init_dist_screen::x2#0 ] -zp ZP_WORD:27 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] +zp ZP_WORD:39 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] reg byte a [ sqrt::return#2 ] reg byte a [ init_dist_screen::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:29 [ bsearch16u::pivot#0 ] -zp ZP_WORD:31 [ bsearch16u::result#0 ] +zp ZP_WORD:41 [ bsearch16u::pivot#0 ] +zp ZP_WORD:43 [ bsearch16u::result#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] -zp ZP_BYTE:33 [ init_font_hex::$0 ] +zp ZP_BYTE:45 [ init_font_hex::$0 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] reg byte y [ init_font_hex::idx#3 ]