From a0b45ee1aa27931189470001d7b114e961404a2e Mon Sep 17 00:00:00 2001 From: Jesper Gravgaard Date: Thu, 4 Jul 2019 19:56:11 +0200 Subject: [PATCH] Optimized xd/yd shifting. --- src/main/fragment/vwsz1=vwsz1_ror_1.asm | 4 + src/main/kc/stdlib/atan2.kc | 15 +- src/test/ref/cordic-atan2-16-ref.asm | 152 +- src/test/ref/cordic-atan2-16-ref.cfg | 151 +- src/test/ref/cordic-atan2-16-ref.log | 2415 +++++++++++++--------- src/test/ref/cordic-atan2-16-ref.sym | 167 +- src/test/ref/cordic-atan2-16.asm | 117 +- src/test/ref/cordic-atan2-16.cfg | 151 +- src/test/ref/cordic-atan2-16.log | 2198 ++++++++++++-------- src/test/ref/cordic-atan2-16.sym | 130 +- src/test/ref/cordic-atan2-clear.asm | 124 +- src/test/ref/cordic-atan2-clear.cfg | 151 +- src/test/ref/cordic-atan2-clear.log | 2284 ++++++++++++--------- src/test/ref/cordic-atan2-clear.sym | 132 +- src/test/ref/cordic-atan2.log | 1 + src/test/ref/screen-center-angle.asm | 134 +- src/test/ref/screen-center-angle.cfg | 163 +- src/test/ref/screen-center-angle.log | 2504 +++++++++++++---------- src/test/ref/screen-center-angle.sym | 144 +- 19 files changed, 6478 insertions(+), 4659 deletions(-) create mode 100644 src/main/fragment/vwsz1=vwsz1_ror_1.asm diff --git a/src/main/fragment/vwsz1=vwsz1_ror_1.asm b/src/main/fragment/vwsz1=vwsz1_ror_1.asm new file mode 100644 index 000000000..89d50aa77 --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz1_ror_1.asm @@ -0,0 +1,4 @@ +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} diff --git a/src/main/kc/stdlib/atan2.kc b/src/main/kc/stdlib/atan2.kc index a22c8ea0b..9ce9f85dc 100644 --- a/src/main/kc/stdlib/atan2.kc +++ b/src/main/kc/stdlib/atan2.kc @@ -22,8 +22,19 @@ word atan2_16(signed word x, signed word y) { // We found the correct angle! break; } - signed word xd = xi>>i; - signed word yd = yi>>i; + // xd=xi>>i; yd=yi>>i + signed word xd = xi; + signed word yd = yi; + byte shift = i; + while(shift>1) { + xd >>= 2; + yd >>= 2; + shift -=2; + } + if(shift) { + xd >>= 1; + yd >>= 1; + } if(yi>=0) { xi += yd; yi -= xd; diff --git a/src/test/ref/cordic-atan2-16-ref.asm b/src/test/ref/cordic-atan2-16-ref.asm index c4e944b73..6284ecf81 100644 --- a/src/test/ref/cordic-atan2-16-ref.asm +++ b/src/test/ref/cordic-atan2-16-ref.asm @@ -10,17 +10,17 @@ .label COLS = $d800 .label CHARSET = $2000 .label SCREEN = $2800 - .label print_char_cursor = 9 + .label print_char_cursor = $a main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label _12 = $10 - .label xw = $1b - .label yw = $1d + .label xw = $1f + .label yw = $21 .label angle_w = $10 - .label ang_w = $1f - .label diff_sum = 5 - .label screen = 7 - .label screen_ref = 3 + .label diff_sum = 6 + .label screen = 8 + .label screen_ref = 4 + .label x = 3 .label y = 2 jsr init_font_hex lda #toD0181_return @@ -39,10 +39,11 @@ main: { lda #-$c sta y b1: - ldx #-$13 + lda #-$13 + sta x b2: + lda x ldy #0 - txa sta xw+1 sty xw lda y @@ -57,7 +58,7 @@ main: { inc _12+1 !: lda _12+1 - sta ang_w + tax ldy #0 lda (screen_ref),y jsr diff @@ -69,7 +70,7 @@ main: { bcc !+ inc diff_sum+1 !: - lda ang_w + txa sec ldy #0 sbc (screen_ref),y @@ -82,8 +83,9 @@ main: { bne !+ inc screen_ref+1 !: - inx - cpx #$15 + inc x + lda #$15 + cmp x bne b2 inc y lda #$d @@ -98,9 +100,9 @@ main: { jmp b5 } // Print a word as HEX -// print_word(word zeropage(5) w) +// print_word(word zeropage(6) w) print_word: { - .label w = 5 + .label w = 6 lda w+1 tax lda #<$400 @@ -141,38 +143,37 @@ print_char: { !: rts } -// diff(byte zeropage($1f) bb1, byte register(A) bb2) +// diff(byte register(X) bb1, byte register(A) bb2) diff: { - .label bb1 = $1f - cmp bb1 - beq !+ - bcs b1 - !: - eor #$ff + sta $ff + cpx $ff + bcc b1 + sta $ff + txa sec - adc bb1 + sbc $ff rts b1: + stx $ff sec - sbc bb1 + sbc $ff rts } // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($1b) x, signed word zeropage($1d) y) +// atan2_16(signed word zeropage($1f) x, signed word zeropage($21) y) atan2_16: { - .label _2 = $b - .label _7 = $d - .label yi = $b - .label xi = $d - .label xd = $20 - .label yd = $22 + .label _2 = $c + .label _7 = $e + .label yi = $c + .label xi = $e .label angle = $10 - .label i = $f + .label xd = $14 + .label yd = $12 .label return = $10 - .label x = $1b - .label y = $1d + .label x = $1f + .label y = $21 lda y+1 bmi !b1+ jmp b1 @@ -200,7 +201,7 @@ atan2_16: { lda #0 sta angle sta angle+1 - sta i + tax b10: lda yi+1 bne b11 @@ -231,38 +232,32 @@ atan2_16: { b8: rts b11: - ldy i + txa + tay lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - ldy i lda yi sta yd lda yi+1 sta yd+1 + b13: + cpy #1+1 + bcs b14 cpy #0 - beq !e+ - !: + beq b17 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: + b17: lda yi+1 - bpl b13 + bpl b18 lda xi sec sbc yd @@ -277,7 +272,7 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - lda i + txa asl tay sec @@ -287,15 +282,14 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - b14: - inc i - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + b19: + inx + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: jmp b10 - b13: + b18: lda xi clc adc yd @@ -310,7 +304,7 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - lda i + txa asl tay clc @@ -320,7 +314,27 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 + jmp b19 + b14: + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + dey + dey + jmp b13 b4: lda x sta xi @@ -335,15 +349,15 @@ atan2_16: { jmp b3 } // Make charset from proto chars -// init_font_hex(byte* zeropage($15) charset) +// init_font_hex(byte* zeropage($19) charset) init_font_hex: { - .label _0 = $24 - .label idx = $1a - .label proto_lo = $17 - .label charset = $15 - .label c1 = $19 - .label proto_hi = $12 - .label c = $14 + .label _0 = $23 + .label idx = $1e + .label proto_lo = $1b + .label charset = $19 + .label c1 = $1d + .label proto_hi = $16 + .label c = $18 lda #0 sta c lda #=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [63] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [63] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [64] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [64] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [64] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [64] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [64] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [64] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [64] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [64] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [66] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [66] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [70] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [70] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -160,74 +160,97 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [74] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [80] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [81] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [82] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [82] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [82] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [83] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [84] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [83] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [83] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [88] (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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [89] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [89] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [89] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [88] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [95] (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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [91] phi() + [101] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [92] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [92] (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 ) - [92] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [102] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [102] (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 ) + [102] (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 - [93] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [93] (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 ) - [93] (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 ) - [94] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [103] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [103] (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 ) + [103] (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 ) + [104] *((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 - [95] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [95] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [96] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [97] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [98] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [100] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [101] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [102] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [105] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [105] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [106] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [107] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [109] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [112] 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 - [103] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [104] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [106] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [107] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [108] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [109] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [113] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [116] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [119] 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 - [110] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [111] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [112] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [120] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [122] 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 - [113] return + [123] return to:@return diff --git a/src/test/ref/cordic-atan2-16-ref.log b/src/test/ref/cordic-atan2-16-ref.log index ed1d1f3cf..4ef3d5b7e 100644 --- a/src/test/ref/cordic-atan2-16-ref.log +++ b/src/test/ref/cordic-atan2-16-ref.log @@ -2,6 +2,7 @@ Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET Culled Empty Block (label) init_font_hex::@6 @@ -9,10 +10,13 @@ Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 Culled Empty Block (label) atan2_16::@11 Culled Empty Block (label) atan2_16::@12 -Culled Empty Block (label) atan2_16::@20 +Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@29 Culled Empty Block (label) atan2_16::@21 +Culled Empty Block (label) atan2_16::@22 Culled Empty Block (label) atan2_16::@23 -Culled Empty Block (label) atan2_16::@24 +Culled Empty Block (label) atan2_16::@31 +Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 Culled Empty Block (label) @2 Culled Empty Block (label) @4 @@ -153,13 +157,13 @@ atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 to:atan2_16::@5 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#12 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#9 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#12 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#2 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$8 ← (signed word) atan2_16::x#2 to:atan2_16::@6 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#13 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#10 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#13 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#3 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$6 ← - (signed word) atan2_16::x#3 (signed word~) atan2_16::$7 ← (signed word~) atan2_16::$6 @@ -167,94 +171,156 @@ atan2_16::@5: scope:[atan2_16] from atan2_16::@3 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 (signed word) atan2_16::y#9 ← phi( atan2_16::@4/(signed word) atan2_16::y#12 atan2_16::@5/(signed word) atan2_16::y#13 ) (signed word) atan2_16::x#10 ← phi( atan2_16::@4/(signed word) atan2_16::x#2 atan2_16::@5/(signed word) atan2_16::x#3 ) - (signed word) atan2_16::yi#8 ← phi( atan2_16::@4/(signed word) atan2_16::yi#9 atan2_16::@5/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yi#9 ← phi( atan2_16::@4/(signed word) atan2_16::yi#12 atan2_16::@5/(signed word) atan2_16::yi#13 ) (signed word~) atan2_16::$9 ← phi( atan2_16::@4/(signed word~) atan2_16::$8 atan2_16::@5/(signed word~) atan2_16::$7 ) (signed word) atan2_16::xi#0 ← (signed word~) atan2_16::$9 (word) atan2_16::angle#0 ← (number) 0 (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 (byte) atan2_16::i#0 ← (byte) 0 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 - (signed word) atan2_16::y#7 ← phi( atan2_16::@19/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) - (signed word) atan2_16::x#7 ← phi( atan2_16::@19/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) - (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) - (byte) atan2_16::i#6 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) - (signed word) atan2_16::xi#6 ← phi( atan2_16::@19/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#8 ) +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + (signed word) atan2_16::y#7 ← phi( atan2_16::@27/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) + (signed word) atan2_16::x#7 ← phi( atan2_16::@27/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) + (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) + (byte) atan2_16::i#6 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) + (signed word) atan2_16::xi#6 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#9 ) (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 (bool~) atan2_16::$18 ← ! (bool~) atan2_16::$17 if((bool~) atan2_16::$18) goto atan2_16::@16 to:atan2_16::@17 atan2_16::@16: scope:[atan2_16] from atan2_16::@15 - (signed word) atan2_16::y#14 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) - (signed word) atan2_16::x#13 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) - (word) atan2_16::angle#14 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) - (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) + (signed word) atan2_16::y#19 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) + (signed word) atan2_16::x#17 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) + (word) atan2_16::angle#19 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) (byte) atan2_16::i#2 ← phi( atan2_16::@15/(byte) atan2_16::i#6 ) + (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) (signed word) atan2_16::xi#3 ← phi( atan2_16::@15/(signed word) atan2_16::xi#6 ) - (signed word~) atan2_16::$19 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - (signed word) atan2_16::xd#0 ← (signed word~) atan2_16::$19 - (signed word~) atan2_16::$20 ← (signed word) atan2_16::yi#4 >> (byte) atan2_16::i#2 - (signed word) atan2_16::yd#0 ← (signed word~) atan2_16::$20 - (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (number) 0 - if((bool~) atan2_16::$21) goto atan2_16::@18 - to:atan2_16::@22 -atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@19 - (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@19/(signed word) atan2_16::y#8 ) - (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@19/(signed word) atan2_16::x#8 ) - (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#4 + (byte) atan2_16::shift#0 ← (byte) atan2_16::i#2 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@27/(signed word) atan2_16::y#8 ) + (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@27/(signed word) atan2_16::x#8 ) + (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 (bool~) atan2_16::$11 ← ! (bool~) atan2_16::$10 if((bool~) atan2_16::$11) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + (signed word) atan2_16::y#18 ← phi( atan2_16::@16/(signed word) atan2_16::y#19 atan2_16::@19/(signed word) atan2_16::y#20 ) + (signed word) atan2_16::x#16 ← phi( atan2_16::@16/(signed word) atan2_16::x#17 atan2_16::@19/(signed word) atan2_16::x#18 ) + (word) atan2_16::angle#18 ← phi( atan2_16::@16/(word) atan2_16::angle#19 atan2_16::@19/(word) atan2_16::angle#20 ) + (byte) atan2_16::i#10 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::i#11 ) + (signed word) atan2_16::xi#11 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xi#12 ) + (signed word) atan2_16::yi#14 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 atan2_16::@19/(signed word) atan2_16::yi#15 ) + (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 + if((bool~) atan2_16::$19) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#20 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#18 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#20 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#11 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#12 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yi#15 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#3 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (signed word) atan2_16::yd#3 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#3 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 + (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 + (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#16 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#14 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#16 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#8 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#9 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yd#8 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#8 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::yi#10 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#4 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 + (bool~) atan2_16::$20 ← ! (bool~) atan2_16::$25 + if((bool~) atan2_16::$20) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + (signed word) atan2_16::y#14 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 atan2_16::@24/(signed word) atan2_16::y#17 ) + (signed word) atan2_16::x#13 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 atan2_16::@24/(signed word) atan2_16::x#15 ) + (word) atan2_16::angle#14 ← phi( atan2_16::@20/(word) atan2_16::angle#16 atan2_16::@24/(word) atan2_16::angle#17 ) + (byte) atan2_16::i#7 ← phi( atan2_16::@20/(byte) atan2_16::i#8 atan2_16::@24/(byte) atan2_16::i#9 ) + (signed word) atan2_16::xd#9 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 atan2_16::@24/(signed word) atan2_16::xd#2 ) + (signed word) atan2_16::yd#9 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 atan2_16::@24/(signed word) atan2_16::yd#2 ) + (signed word) atan2_16::xi#7 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 atan2_16::@24/(signed word) atan2_16::xi#10 ) + (signed word) atan2_16::yi#5 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 atan2_16::@24/(signed word) atan2_16::yi#11 ) + (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 + if((bool~) atan2_16::$21) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + (signed word) atan2_16::y#17 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 ) + (signed word) atan2_16::x#15 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 ) + (word) atan2_16::angle#17 ← phi( atan2_16::@20/(word) atan2_16::angle#16 ) + (byte) atan2_16::i#9 ← phi( atan2_16::@20/(byte) atan2_16::i#8 ) + (signed word) atan2_16::xi#10 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 ) + (signed word) atan2_16::yi#11 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yd#4 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 ) + (signed word) atan2_16::xd#4 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 ) + (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 + (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 to:atan2_16::@25 -atan2_16::@18: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#10 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#11 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#7 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#3 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#1 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#5 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#1 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#4 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#1 - (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#5 - (signed word) atan2_16::xd#1 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#10 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#11 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#7 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#3 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#5 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#6 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#5 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#4 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#5 + (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#6 - (signed word) atan2_16::xd#5 (byte~) atan2_16::$23 ← (byte) atan2_16::i#3 * (const byte) SIZEOF_WORD (word) atan2_16::angle#2 ← (word) atan2_16::angle#7 + *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) - to:atan2_16::@19 -atan2_16::@22: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#11 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#12 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#8 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#4 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#2 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#6 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#2 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#5 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#2 - (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#6 + (signed word) atan2_16::xd#2 + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#11 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#12 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#8 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#4 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#6 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#7 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#6 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#5 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#6 + (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#7 + (signed word) atan2_16::xd#6 (byte~) atan2_16::$24 ← (byte) atan2_16::i#4 * (const byte) SIZEOF_WORD (word) atan2_16::angle#3 ← (word) atan2_16::angle#8 - *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) - to:atan2_16::@19 -atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@22 - (signed word) atan2_16::y#8 ← phi( atan2_16::@18/(signed word) atan2_16::y#10 atan2_16::@22/(signed word) atan2_16::y#11 ) - (signed word) atan2_16::xi#7 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@22/(signed word) atan2_16::xi#2 ) - (signed word) atan2_16::x#8 ← phi( atan2_16::@18/(signed word) atan2_16::x#11 atan2_16::@22/(signed word) atan2_16::x#12 ) - (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@22/(word) atan2_16::angle#3 ) - (signed word) atan2_16::yi#7 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@22/(signed word) atan2_16::yi#2 ) - (byte) atan2_16::i#5 ← phi( atan2_16::@18/(byte) atan2_16::i#3 atan2_16::@22/(byte) atan2_16::i#4 ) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + (signed word) atan2_16::y#8 ← phi( atan2_16::@26/(signed word) atan2_16::y#10 atan2_16::@30/(signed word) atan2_16::y#11 ) + (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + (signed word) atan2_16::x#8 ← phi( atan2_16::@26/(signed word) atan2_16::x#11 atan2_16::@30/(signed word) atan2_16::x#12 ) + (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + (byte) atan2_16::i#5 ← phi( atan2_16::@26/(byte) atan2_16::i#3 atan2_16::@30/(byte) atan2_16::i#4 ) (byte) atan2_16::i#1 ← (byte) atan2_16::i#5 + rangenext(0,atan2_16::$16) (bool~) atan2_16::$22 ← (byte) atan2_16::i#1 != rangelast(0,atan2_16::$16) if((bool~) atan2_16::$22) goto atan2_16::@15 to:atan2_16::@17 -atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@25 - (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@25/(word) atan2_16::angle#4 ) - (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@25/(signed word) atan2_16::y#6 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@33/(signed word) atan2_16::y#6 ) (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 (bool~) atan2_16::$14 ← ! (bool~) atan2_16::$13 if((bool~) atan2_16::$14) goto atan2_16::@8 to:atan2_16::@13 -atan2_16::@25: scope:[atan2_16] from atan2_16::@17 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 (signed word) atan2_16::y#6 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 ) (word) atan2_16::angle#9 ← phi( atan2_16::@17/(word) atan2_16::angle#1 ) (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 @@ -575,13 +641,14 @@ SYMBOL TABLE SSA (number~) atan2_16::$16 (bool~) atan2_16::$17 (bool~) atan2_16::$18 -(signed word~) atan2_16::$19 +(bool~) atan2_16::$19 (signed word~) atan2_16::$2 -(signed word~) atan2_16::$20 +(bool~) atan2_16::$20 (bool~) atan2_16::$21 (bool~) atan2_16::$22 (byte~) atan2_16::$23 (byte~) atan2_16::$24 +(bool~) atan2_16::$25 (signed word~) atan2_16::$3 (signed word~) atan2_16::$4 (bool~) atan2_16::$5 @@ -597,9 +664,14 @@ SYMBOL TABLE SSA (label) atan2_16::@18 (label) atan2_16::@19 (label) atan2_16::@2 -(label) atan2_16::@22 +(label) atan2_16::@20 +(label) atan2_16::@24 (label) atan2_16::@25 +(label) atan2_16::@26 +(label) atan2_16::@27 (label) atan2_16::@3 +(label) atan2_16::@30 +(label) atan2_16::@33 (label) atan2_16::@4 (label) atan2_16::@5 (label) atan2_16::@6 @@ -615,7 +687,12 @@ SYMBOL TABLE SSA (word) atan2_16::angle#13 (word) atan2_16::angle#14 (word) atan2_16::angle#15 +(word) atan2_16::angle#16 +(word) atan2_16::angle#17 +(word) atan2_16::angle#18 +(word) atan2_16::angle#19 (word) atan2_16::angle#2 +(word) atan2_16::angle#20 (word) atan2_16::angle#3 (word) atan2_16::angle#4 (word) atan2_16::angle#5 @@ -626,17 +703,28 @@ SYMBOL TABLE SSA (byte) atan2_16::i (byte) atan2_16::i#0 (byte) atan2_16::i#1 +(byte) atan2_16::i#10 +(byte) atan2_16::i#11 (byte) atan2_16::i#2 (byte) atan2_16::i#3 (byte) atan2_16::i#4 (byte) atan2_16::i#5 (byte) atan2_16::i#6 +(byte) atan2_16::i#7 +(byte) atan2_16::i#8 +(byte) atan2_16::i#9 (word) atan2_16::return (word) atan2_16::return#0 (word) atan2_16::return#1 (word) atan2_16::return#2 (word) atan2_16::return#3 (word) atan2_16::return#4 +(byte) atan2_16::shift +(byte) atan2_16::shift#0 +(byte) atan2_16::shift#1 +(byte) atan2_16::shift#2 +(byte) atan2_16::shift#3 +(byte) atan2_16::shift#4 (signed word) atan2_16::x (signed word) atan2_16::x#0 (signed word) atan2_16::x#1 @@ -644,6 +732,11 @@ SYMBOL TABLE SSA (signed word) atan2_16::x#11 (signed word) atan2_16::x#12 (signed word) atan2_16::x#13 +(signed word) atan2_16::x#14 +(signed word) atan2_16::x#15 +(signed word) atan2_16::x#16 +(signed word) atan2_16::x#17 +(signed word) atan2_16::x#18 (signed word) atan2_16::x#2 (signed word) atan2_16::x#3 (signed word) atan2_16::x#4 @@ -656,15 +749,27 @@ SYMBOL TABLE SSA (signed word) atan2_16::xd#0 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 +(signed word) atan2_16::xd#3 +(signed word) atan2_16::xd#4 +(signed word) atan2_16::xd#5 +(signed word) atan2_16::xd#6 +(signed word) atan2_16::xd#7 +(signed word) atan2_16::xd#8 +(signed word) atan2_16::xd#9 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 (signed word) atan2_16::xi#1 +(signed word) atan2_16::xi#10 +(signed word) atan2_16::xi#11 +(signed word) atan2_16::xi#12 (signed word) atan2_16::xi#2 (signed word) atan2_16::xi#3 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#7 +(signed word) atan2_16::xi#8 +(signed word) atan2_16::xi#9 (signed word) atan2_16::y (signed word) atan2_16::y#0 (signed word) atan2_16::y#1 @@ -674,7 +779,12 @@ SYMBOL TABLE SSA (signed word) atan2_16::y#13 (signed word) atan2_16::y#14 (signed word) atan2_16::y#15 +(signed word) atan2_16::y#16 +(signed word) atan2_16::y#17 +(signed word) atan2_16::y#18 +(signed word) atan2_16::y#19 (signed word) atan2_16::y#2 +(signed word) atan2_16::y#20 (signed word) atan2_16::y#3 (signed word) atan2_16::y#4 (signed word) atan2_16::y#5 @@ -686,10 +796,22 @@ SYMBOL TABLE SSA (signed word) atan2_16::yd#0 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +(signed word) atan2_16::yd#3 +(signed word) atan2_16::yd#4 +(signed word) atan2_16::yd#5 +(signed word) atan2_16::yd#6 +(signed word) atan2_16::yd#7 +(signed word) atan2_16::yd#8 +(signed word) atan2_16::yd#9 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 (signed word) atan2_16::yi#1 (signed word) atan2_16::yi#10 +(signed word) atan2_16::yi#11 +(signed word) atan2_16::yi#12 +(signed word) atan2_16::yi#13 +(signed word) atan2_16::yi#14 +(signed word) atan2_16::yi#15 (signed word) atan2_16::yi#2 (signed word) atan2_16::yi#3 (signed word) atan2_16::yi#4 @@ -994,9 +1116,16 @@ Adding number conversion cast (unumber) 0 in (word) atan2_16::angle#0 ← (numbe Adding number conversion cast (unumber) 1 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (unumber)(number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 -Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (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 (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 +Adding number conversion cast (unumber) 0 in (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 Adding number conversion cast (unumber) $8000 in (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 Adding number conversion cast (unumber) atan2_16::$12 in (number~) atan2_16::$12 ← (unumber)(number) $8000 - (word) atan2_16::angle#9 @@ -1136,9 +1265,16 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 -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 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast $8000 Simplifying constant pointer cast (byte*) 53272 @@ -1175,9 +1311,16 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 -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 signed number type (signed byte) 2 +Finalized signed number type (signed byte) 2 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (word) $8000 Finalized unsigned number type (byte) 4 @@ -1202,8 +1345,9 @@ Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main: Inferred type updated to word in (unumber~) main::$12 ← (word) main::angle_w#0 + (byte) $80 Inferred type updated to byte in (unumber~) main::$13 ← > (word~) main::$12 Inversing boolean not [63] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [62] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 -Inversing boolean not [75] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [74] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 -Inversing boolean not [93] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [92] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 +Inversing boolean not [72] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [71] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 +Inversing boolean not [83] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [82] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 +Inversing boolean not [107] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [106] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 Successful SSA optimization Pass2UnaryNotSimplification 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 @@ -1215,19 +1359,34 @@ Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#2 (signed word~) atan2_16::$3 (signed word) atan2_16::y#3 Alias (signed word) atan2_16::x#5 = (signed word) atan2_16::x#9 (signed word) atan2_16::x#6 Alias (signed word~) atan2_16::$2 = (signed word~) atan2_16::$1 -Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#9 (signed word) atan2_16::yi#10 +Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#12 (signed word) atan2_16::yi#13 Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#2 (signed word~) atan2_16::$8 (signed word) atan2_16::x#3 Alias (signed word) atan2_16::y#12 = (signed word) atan2_16::y#15 (signed word) atan2_16::y#13 Alias (signed word~) atan2_16::$7 = (signed word~) atan2_16::$6 Alias (signed word) atan2_16::xi#0 = (signed word~) atan2_16::$9 -Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::i#3 (byte) atan2_16::i#4 -Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yi#5 (signed word) atan2_16::yi#6 -Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#14 (word) atan2_16::angle#7 (word) atan2_16::angle#8 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#7 (signed word) atan2_16::x#12 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#7 (signed word) atan2_16::y#11 -Alias (signed word) atan2_16::xd#0 = (signed word~) atan2_16::$19 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 -Alias (signed word) atan2_16::yd#0 = (signed word~) atan2_16::$20 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xd#0 +Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yd#0 +Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::shift#0 +Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#19 +Alias (signed word) atan2_16::x#17 = (signed word) atan2_16::x#7 +Alias (signed word) atan2_16::y#19 = (signed word) atan2_16::y#7 +Alias (signed word) atan2_16::xd#3 = (signed word) atan2_16::xd#7 (signed word) atan2_16::xd#8 (signed word) atan2_16::xd#4 +Alias (signed word) atan2_16::yd#3 = (signed word) atan2_16::yd#7 (signed word) atan2_16::yd#8 (signed word) atan2_16::yd#4 +Alias (byte) atan2_16::shift#2 = (byte) atan2_16::shift#3 (byte) atan2_16::shift#4 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#15 (signed word) atan2_16::yi#14 (signed word) atan2_16::yi#11 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#12 (signed word) atan2_16::xi#11 (signed word) atan2_16::xi#9 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#11 (byte) atan2_16::i#8 (byte) atan2_16::i#9 +Alias (word) atan2_16::angle#16 = (word) atan2_16::angle#20 (word) atan2_16::angle#18 (word) atan2_16::angle#17 +Alias (signed word) atan2_16::x#14 = (signed word) atan2_16::x#18 (signed word) atan2_16::x#16 (signed word) atan2_16::x#15 +Alias (signed word) atan2_16::y#16 = (signed word) atan2_16::y#20 (signed word) atan2_16::y#18 (signed word) atan2_16::y#17 +Alias (signed word) atan2_16::xi#4 = (signed word) atan2_16::xi#7 (signed word) atan2_16::xi#5 +Alias (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#9 (signed word) atan2_16::yd#6 +Alias (signed word) atan2_16::yi#5 = (signed word) atan2_16::yi#6 (signed word) atan2_16::yi#7 +Alias (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#9 (signed word) atan2_16::xd#6 +Alias (byte) atan2_16::i#3 = (byte) atan2_16::i#7 (byte) atan2_16::i#4 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#7 (word) atan2_16::angle#8 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#12 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#11 Alias (word) atan2_16::angle#1 = (word) atan2_16::angle#9 Alias (signed word) atan2_16::y#5 = (signed word) atan2_16::y#6 Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 @@ -1278,20 +1437,24 @@ Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#22 Successful SSA optimization Pass2AliasElimination Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#5 (signed word) atan2_16::x#10 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#12 (signed word) atan2_16::y#9 -Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#8 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#5 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#8 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#8 +Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#9 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#5 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#4 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#3 (byte) atan2_16::i#5 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 Successful SSA optimization Pass2AliasElimination -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#4 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#4 -Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte*) init_font_hex::proto_hi#2 Self Phi Eliminated (byte*) init_font_hex::proto_lo#2 Self Phi Eliminated (byte*) init_font_hex::charset#3 Self Phi Eliminated (byte) init_font_hex::c1#2 Self Phi Eliminated (byte) init_font_hex::c#2 +Self Phi Eliminated (signed word) atan2_16::yi#10 +Self Phi Eliminated (signed word) atan2_16::xi#10 +Self Phi Eliminated (byte) atan2_16::i#10 +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 (signed byte) main::y#2 @@ -1307,8 +1470,12 @@ 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 (signed word) atan2_16::y#1 (signed word) atan2_16::y#0 Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0 -Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#1 -Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#1 +Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3 +Identical Phi Values (signed word) atan2_16::xi#10 (signed word) atan2_16::xi#3 +Identical Phi Values (byte) atan2_16::i#10 (byte) atan2_16::i#2 +Identical Phi Values (word) atan2_16::angle#14 (word) atan2_16::angle#12 +Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19 Identical Phi Values (word) print_word::w#1 (word) print_word::w#0 Identical Phi Values (byte*) print_char_cursor#23 (byte*) print_char_cursor#25 Identical Phi Values (byte*) print_char_cursor#1 (byte*) print_char_cursor#16 @@ -1325,21 +1492,26 @@ Identical Phi Values (byte) diff::bb1#1 (byte) diff::bb1#0 Identical Phi Values (byte) diff::bb2#1 (byte) diff::bb2#0 Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#10 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 +Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 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::$21 [71] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -Simple Condition (bool~) atan2_16::$11 [76] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$22 [90] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [94] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$16 [213] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 -Simple Condition (bool~) main::$17 [217] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 -Simple Condition (bool~) diff::$0 [235] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 +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::$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 +Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$16 [227] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 +Simple Condition (bool~) main::$17 [231] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 +Simple Condition (bool~) diff::$0 [249] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [90] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 +Negating conditional jump and destination [104] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [36] (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 @@ -1376,10 +1548,10 @@ Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 Constant (const byte*) main::screen#0 = SCREEN#0 Constant (const byte*) main::screen_ref#0 = SCREEN_REF#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (word)main::toD0181_screen#0 in [158] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [162] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (word)main::toD0181_screen#0 in [172] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [176] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [227] if(true) goto main::@6 +if() condition always true - replacing block destination [241] if(true) goto main::@6 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 @@ -1387,49 +1559,59 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 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 [211] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [213] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 -Resolved ranged next value [215] main::y#1 ← ++ main::y#4 to ++ -Resolved ranged comparison value [217] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d -Converting *(pointer+n) to pointer[n] [229] *((byte*) main::col00#0) ← ++ *((byte*) main::col00#0) -- *(main::$3 + $13) -Converting *(pointer+n) to pointer[n] [229] *((byte*) main::col00#0) ← ++ *((byte*~) main::$3 + (byte) $13) -- *(main::$3 + $13) +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 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 Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 -Eliminating unused variable (byte*) main::col00#0 and assignment [116] (byte*) main::col00#0 ← (byte*~) main::$3 + (byte) $13 +Eliminating unused variable (byte*) main::col00#0 and assignment [123] (byte*) main::col00#0 ← (byte*~) main::$3 + (byte) $13 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return 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 Self Phi Eliminated (byte*) init_font_hex::proto_hi#4 Self Phi Eliminated (byte) init_font_hex::c#5 +Self Phi Eliminated (signed word) atan2_16::x#17 +Self Phi Eliminated (signed word) atan2_16::y#19 Self Phi Eliminated (byte*) print_char_cursor#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 (signed word) atan2_16::x#17 (signed word) atan2_16::x#0 +Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0 Identical Phi Values (byte*) print_char_cursor#35 (const byte*) print_char_cursor#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 Constant right-side identified [29] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 -Constant right-side identified [114] (byte*~) main::$3 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28 +Constant right-side identified [121] (byte*~) main::$3 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0 Constant (const byte) atan2_16::$16 = CORDIC_ITERATIONS_16#0-1 @@ -1437,8 +1619,8 @@ 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 byte*) main::$3 = COLS#0+(word)$c*$28 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [47] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [48] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 +Resolved ranged next value [54] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [55] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 Adding number conversion cast (unumber) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 Adding number conversion cast (unumber) 1 in if((byte) atan2_16::i#1==(unumber)(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 Successful SSA optimization PassNAddNumberTypeConversions @@ -1447,37 +1629,37 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [71] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [74] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [78] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [81] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [71] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [73] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [78] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [80] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$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 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [71] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [72] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [78] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [79] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$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 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [71] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [78] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [74] (byte~) main::$5 ← (byte)(signed byte) main::x#2 keeping main::x#2 -Inlining Noop Cast [77] (byte~) main::$8 ← (byte)(signed byte) main::y#4 keeping main::y#4 +Inlining Noop Cast [81] (byte~) main::$5 ← (byte)(signed byte) main::x#2 keeping main::x#2 +Inlining Noop Cast [84] (byte~) main::$8 ← (byte)(signed byte) main::y#4 keeping main::y#4 Successful SSA optimization Pass2NopCastInlining -Inlining Noop Cast [76] (signed word) main::xw#0 ← (signed word)(word~) main::$6 keeping main::xw#0 -Inlining Noop Cast [79] (signed word) main::yw#0 ← (signed word)(word~) main::$9 keeping main::yw#0 +Inlining Noop Cast [83] (signed word) main::xw#0 ← (signed word)(word~) main::$6 keeping main::xw#0 +Inlining Noop Cast [86] (signed word) main::yw#0 ← (signed word)(word~) main::$9 keeping main::yw#0 Successful SSA optimization Pass2NopCastInlining -Rewriting division to use shift [34] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 -Rewriting multiplication to use shift [38] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [42] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting division to use shift [31] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 +Rewriting multiplication to use shift [45] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [49] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) init_font_hex::c#0 Inlining constant with var siblings (const byte) init_font_hex::c1#0 @@ -1535,11 +1717,12 @@ Successful SSA optimization PassNEliminateUnusedVars Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2) Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3) -Added new block during phi lifting atan2_16::@26(between atan2_16::@19 and atan2_16::@15) -Added new block during phi lifting atan2_16::@27(between atan2_16::@15 and atan2_16::@17) -Added new block during phi lifting atan2_16::@28(between atan2_16::@19 and atan2_16::@17) -Added new block during phi lifting atan2_16::@29(between atan2_16::@17 and atan2_16::@7) -Added new block during phi lifting atan2_16::@30(between atan2_16::@7 and atan2_16::@8) +Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) +Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) +Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) +Added new block during phi lifting atan2_16::@37(between atan2_16::@20 and atan2_16::@25) +Added new block during phi lifting atan2_16::@38(between atan2_16::@17 and atan2_16::@7) +Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_16::@8) Added new block during phi lifting main::@16(between main::@3 and main::@1) Added new block during phi lifting main::@17(between main::@14 and main::@2) Adding NOP phi() at start of @begin @@ -1566,7 +1749,7 @@ Calls in [main] to init_font_hex:11 atan2_16:25 diff:32 print_word:45 Calls in [print_word] to print_byte:59 print_byte:63 Calls in [print_byte] to print_char:71 print_char:76 -Created 33 initial phi equivalence classes +Created 38 initial phi equivalence classes Coalesced [17] main::screen_ref#8 ← main::screen_ref#5 Coalesced [18] main::diff_sum#9 ← main::diff_sum#7 Coalesced [19] main::screen#8 ← main::screen#5 @@ -1587,38 +1770,48 @@ Coalesced [74] print_char::ch#4 ← print_char::ch#1 Coalesced (already) [75] print_char_cursor#43 ← print_char_cursor#19 Coalesced [85] diff::return#6 ← diff::$2 Coalesced [89] diff::return#5 ← diff::$4 -Coalesced [92] atan2_16::yi#12 ← atan2_16::$2 -Coalesced [96] atan2_16::xi#9 ← atan2_16::$7 -Coalesced [98] atan2_16::yi#14 ← atan2_16::yi#0 -Coalesced [99] atan2_16::xi#11 ← atan2_16::xi#0 -Coalesced [102] atan2_16::angle#17 ← atan2_16::angle#12 -Coalesced [107] atan2_16::angle#22 ← atan2_16::angle#4 +Coalesced [92] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [96] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [98] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [99] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [102] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [107] atan2_16::angle#27 ← atan2_16::angle#4 Coalesced [111] atan2_16::return#5 ← atan2_16::angle#5 Coalesced [114] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [115] atan2_16::angle#21 ← atan2_16::angle#1 -Coalesced [123] atan2_16::yi#16 ← atan2_16::yi#2 -Coalesced [124] atan2_16::angle#20 ← atan2_16::angle#3 -Coalesced [125] atan2_16::xi#13 ← atan2_16::xi#2 -Coalesced [129] atan2_16::yi#13 ← atan2_16::yi#7 -Coalesced [130] atan2_16::xi#10 ← atan2_16::xi#7 -Coalesced [131] atan2_16::i#7 ← atan2_16::i#1 -Coalesced [132] atan2_16::angle#16 ← atan2_16::angle#13 -Coalesced (already) [133] atan2_16::angle#18 ← atan2_16::angle#13 -Coalesced [138] atan2_16::yi#15 ← atan2_16::yi#1 -Coalesced [139] atan2_16::angle#19 ← atan2_16::angle#2 -Coalesced [140] atan2_16::xi#12 ← atan2_16::xi#1 -Not coalescing [141] atan2_16::xi#8 ← atan2_16::x#0 -Not coalescing [142] atan2_16::yi#11 ← atan2_16::y#0 -Coalesced [145] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [167] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [168] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [169] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [170] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [171] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [172] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [173] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [174] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 23 phi equivalence classes +Coalesced [115] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [116] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [117] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [118] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [124] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [125] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [132] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [133] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [134] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [138] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [139] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [140] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [141] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [142] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [147] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [148] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [149] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [150] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [151] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [155] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [156] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [157] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [158] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [159] atan2_16::yi#16 ← atan2_16::y#0 +Coalesced [162] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [184] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [185] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [186] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [187] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [188] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [189] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [190] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [191] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced down to 26 phi equivalence classes Culled Empty Block (label) @1 Culled Empty Block (label) @3 Culled Empty Block (label) @7 @@ -1633,11 +1826,12 @@ Culled Empty Block (label) main::@16 Culled Empty Block (label) main::@17 Culled Empty Block (label) print_word::@2 Culled Empty Block (label) print_byte::@2 -Culled Empty Block (label) atan2_16::@27 -Culled Empty Block (label) atan2_16::@30 -Culled Empty Block (label) atan2_16::@29 -Culled Empty Block (label) atan2_16::@26 -Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@35 +Culled Empty Block (label) atan2_16::@39 +Culled Empty Block (label) atan2_16::@38 +Culled Empty Block (label) atan2_16::@34 +Culled Empty Block (label) atan2_16::@36 +Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 @@ -1648,8 +1842,13 @@ Renumbering block atan2_16::@16 to atan2_16::@11 Renumbering block atan2_16::@17 to atan2_16::@12 Renumbering block atan2_16::@18 to atan2_16::@13 Renumbering block atan2_16::@19 to atan2_16::@14 -Renumbering block atan2_16::@22 to atan2_16::@15 -Renumbering block atan2_16::@25 to atan2_16::@16 +Renumbering block atan2_16::@20 to atan2_16::@15 +Renumbering block atan2_16::@24 to atan2_16::@16 +Renumbering block atan2_16::@25 to atan2_16::@17 +Renumbering block atan2_16::@26 to atan2_16::@18 +Renumbering block atan2_16::@27 to atan2_16::@19 +Renumbering block atan2_16::@30 to atan2_16::@20 +Renumbering block atan2_16::@33 to atan2_16::@21 Renumbering block main::@6 to main::@5 Renumbering block main::@11 to main::@6 Renumbering block main::@13 to main::@7 @@ -1786,32 +1985,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16 [59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 to:atan2_16::@3 atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 - [60] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) + [60] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [63] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [63] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [64] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [64] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [64] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [64] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [64] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [64] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [64] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [64] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [66] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [66] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [70] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [70] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -1824,76 +2023,99 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [74] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [80] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [81] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [82] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [82] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [82] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [83] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [84] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [83] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [83] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [88] (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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [89] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [89] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [89] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [88] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [95] (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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [91] phi() + [101] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [92] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [92] (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 ) - [92] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [102] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [102] (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 ) + [102] (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 - [93] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [93] (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 ) - [93] (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 ) - [94] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [103] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [103] (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 ) + [103] (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 ) + [104] *((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 - [95] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [95] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [96] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [97] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [98] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [100] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [101] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [102] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [105] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [105] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [106] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [107] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [109] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [112] 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 - [103] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [104] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [106] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [107] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [108] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [109] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [113] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [116] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [119] 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 - [110] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [111] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [112] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [120] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [122] 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 - [113] return + [123] return to:@return @@ -1914,7 +2136,7 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle (word) atan2_16::angle#1 3.0 (word) atan2_16::angle#11 4.0 -(word) atan2_16::angle#12 364.0 +(word) atan2_16::angle#12 190.66666666666666 (word) atan2_16::angle#13 1334.6666666666667 (word) atan2_16::angle#2 2002.0 (word) atan2_16::angle#3 2002.0 @@ -1923,32 +2145,44 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle#6 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 1501.5 -(byte) atan2_16::i#2 429.0 +(byte) atan2_16::i#2 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 34.99999999999999 (word) atan2_16::return#2 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 20002.0 +(byte) atan2_16::shift#2 8001.25 +(byte~) atan2_16::shift#5 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 3.8928571428571437 +(signed word) atan2_16::x#0 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 600.5999999999999 +(signed word) atan2_16::xd#1 6667.333333333333 +(signed word~) atan2_16::xd#10 1001.0 +(signed word) atan2_16::xd#2 1001.0 +(signed word) atan2_16::xd#3 7668.333333333332 +(signed word) atan2_16::xd#5 1001.0 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 6.0 (signed word) atan2_16::xi#1 500.5 +(signed word~) atan2_16::xi#13 4.0 (signed word) atan2_16::xi#2 500.5 -(signed word) atan2_16::xi#3 801.2 -(signed word) atan2_16::xi#7 1001.0 -(signed word~) atan2_16::xi#8 4.0 +(signed word) atan2_16::xi#3 267.0666666666667 +(signed word) atan2_16::xi#8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 3.633333333333334 +(signed word) atan2_16::y#0 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 1501.5 +(signed word) atan2_16::yd#1 10001.0 +(signed word~) atan2_16::yd#10 2002.0 +(signed word) atan2_16::yd#2 2002.0 +(signed word) atan2_16::yd#3 4601.0 +(signed word) atan2_16::yd#5 2002.0 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 1.2000000000000002 (signed word) atan2_16::yi#1 667.3333333333334 -(signed word~) atan2_16::yi#11 4.0 +(signed word~) atan2_16::yi#16 4.0 (signed word) atan2_16::yi#2 667.3333333333334 -(signed word) atan2_16::yi#3 858.2857142857142 -(signed word) atan2_16::yi#7 1001.0 +(signed word) atan2_16::yi#3 353.4117647058823 +(signed word) atan2_16::yi#8 1001.0 (byte()) diff((byte) diff::bb1 , (byte) diff::bb2) (byte~) diff::$2 4.0 (byte~) diff::$4 4.0 @@ -2062,11 +2296,14 @@ Initial phi equivalence classes [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] [ diff::return#1 diff::$4 diff::$2 ] -[ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -2090,8 +2327,6 @@ Added variable main::$15 to zero page equivalence class [ main::$15 ] Added variable print_word::w#0 to zero page equivalence class [ print_word::w#0 ] Added variable print_byte::$0 to zero page equivalence class [ print_byte::$0 ] Added variable print_byte::$2 to zero page equivalence class [ print_byte::$2 ] -Added variable atan2_16::xd#0 to zero page equivalence class [ atan2_16::xd#0 ] -Added variable atan2_16::yd#0 to zero page equivalence class [ atan2_16::yd#0 ] Added variable atan2_16::$24 to zero page equivalence class [ atan2_16::$24 ] Added variable atan2_16::$23 to zero page equivalence class [ atan2_16::$23 ] Added variable init_font_hex::$0 to zero page equivalence class [ init_font_hex::$0 ] @@ -2108,11 +2343,14 @@ Complete equivalence classes [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] [ diff::return#1 diff::$4 diff::$2 ] -[ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -2136,8 +2374,6 @@ Complete equivalence classes [ print_word::w#0 ] [ print_byte::$0 ] [ print_byte::$2 ] -[ atan2_16::xd#0 ] -[ atan2_16::yd#0 ] [ atan2_16::$24 ] [ atan2_16::$23 ] [ init_font_hex::$0 ] @@ -2153,42 +2389,43 @@ Allocated zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] Allocated zp ZP_BYTE:11 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] Allocated zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] Allocated zp ZP_BYTE:14 [ diff::return#1 diff::$4 diff::$2 ] -Allocated zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated zp ZP_WORD:15 [ 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 ] +Allocated zp ZP_WORD:17 [ 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 ] Allocated zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] Allocated zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] Allocated zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] -Allocated zp ZP_WORD:24 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:27 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:29 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:32 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:33 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_WORD:34 [ main::xw#0 ] -Allocated zp ZP_WORD:36 [ main::yw#0 ] -Allocated zp ZP_WORD:38 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:40 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:42 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:44 [ main::angle_w#0 ] -Allocated zp ZP_WORD:46 [ main::$12 ] -Allocated zp ZP_BYTE:48 [ main::ang_w#0 ] -Allocated zp ZP_BYTE:49 [ diff::bb1#0 ] -Allocated zp ZP_BYTE:50 [ diff::bb2#0 ] -Allocated zp ZP_BYTE:51 [ diff::return#0 ] -Allocated zp ZP_BYTE:52 [ main::$14 ] -Allocated zp ZP_BYTE:53 [ main::$15 ] -Allocated zp ZP_WORD:54 [ print_word::w#0 ] -Allocated zp ZP_BYTE:56 [ print_byte::$0 ] -Allocated zp ZP_BYTE:57 [ print_byte::$2 ] -Allocated zp ZP_WORD:58 [ atan2_16::xd#0 ] -Allocated zp ZP_WORD:60 [ atan2_16::yd#0 ] -Allocated zp ZP_BYTE:62 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:63 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:64 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:65 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:66 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:67 [ init_font_hex::idx#3 ] +Allocated zp ZP_BYTE:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Allocated zp ZP_WORD:25 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated zp ZP_WORD:27 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated zp ZP_BYTE:37 [ init_font_hex::i#2 init_font_hex::i#1 ] +Allocated zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated zp ZP_WORD:39 [ main::xw#0 ] +Allocated zp ZP_WORD:41 [ main::yw#0 ] +Allocated zp ZP_WORD:43 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:45 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:47 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:49 [ main::angle_w#0 ] +Allocated zp ZP_WORD:51 [ main::$12 ] +Allocated zp ZP_BYTE:53 [ main::ang_w#0 ] +Allocated zp ZP_BYTE:54 [ diff::bb1#0 ] +Allocated zp ZP_BYTE:55 [ diff::bb2#0 ] +Allocated zp ZP_BYTE:56 [ diff::return#0 ] +Allocated zp ZP_BYTE:57 [ main::$14 ] +Allocated zp ZP_BYTE:58 [ main::$15 ] +Allocated zp ZP_WORD:59 [ print_word::w#0 ] +Allocated zp ZP_BYTE:61 [ print_byte::$0 ] +Allocated zp ZP_BYTE:62 [ print_byte::$2 ] +Allocated zp ZP_BYTE:63 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:64 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:65 [ init_font_hex::$0 ] +Allocated zp ZP_BYTE:66 [ init_font_hex::$1 ] +Allocated zp ZP_BYTE:67 [ init_font_hex::$2 ] +Allocated zp ZP_BYTE:68 [ init_font_hex::idx#3 ] INITIAL ASM //SEG0 File Comments @@ -2226,20 +2463,20 @@ bend: //SEG10 main main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f - .label _12 = $2e - .label _14 = $34 - .label _15 = $35 - .label xw = $22 - .label yw = $24 - .label angle_w = $2c - .label ang_w = $30 + .label _12 = $33 + .label _14 = $39 + .label _15 = $3a + .label xw = $27 + .label yw = $29 + .label angle_w = $31 + .label ang_w = $35 .label diff_sum = 6 .label screen = 8 .label screen_ref = 4 .label x = 3 .label y = 2 //SEG11 [5] call init_font_hex - //SEG12 [91] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [101] 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] @@ -2432,9 +2669,9 @@ main: { } //SEG70 print_word // Print a word as HEX -// print_word(word zeropage($36) w) +// print_word(word zeropage($3b) w) print_word: { - .label w = $36 + .label w = $3b //SEG71 [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 lda w+1 sta print_byte.b @@ -2470,8 +2707,8 @@ print_word: { // Print a byte as HEX // print_byte(byte zeropage($a) b) print_byte: { - .label _0 = $38 - .label _2 = $39 + .label _0 = $3d + .label _2 = $3e .label b = $a //SEG85 [42] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 lda b @@ -2534,13 +2771,13 @@ print_char: { rts } //SEG105 diff -// diff(byte zeropage($31) bb1, byte zeropage($32) bb2) +// diff(byte zeropage($36) bb1, byte zeropage($37) bb2) diff: { .label _2 = $e .label _4 = $e - .label bb1 = $31 - .label bb2 = $32 - .label return = $33 + .label bb1 = $36 + .label bb2 = $37 + .label return = $38 .label return_1 = $e //SEG106 [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuz1_lt_vbuz2_then_la1 lda bb1 @@ -2579,24 +2816,25 @@ diff: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($26) x, signed word zeropage($28) y) +// atan2_16(signed word zeropage($2b) x, signed word zeropage($2d) y) atan2_16: { .label _2 = $f .label _7 = $11 - .label _23 = $3f - .label _24 = $3e + .label _23 = $40 + .label _24 = $3f .label yi = $f .label xi = $11 - .label xd = $3a - .label yd = $3c .label angle = $16 + .label xd = $1b + .label yd = $19 + .label shift = $18 .label angle_2 = $14 .label angle_3 = $14 .label i = $13 .label return = $16 - .label x = $26 - .label y = $28 - .label return_2 = $2a + .label x = $2b + .label y = $2d + .label return_2 = $2f .label angle_6 = $14 .label angle_12 = $14 .label angle_13 = $14 @@ -2617,7 +2855,7 @@ atan2_16: { //SEG120 [60] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG121 [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG121 [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG122 atan2_16::@3 b3: @@ -2638,7 +2876,7 @@ atan2_16: { //SEG126 [63] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG127 [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG127 [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG128 atan2_16::@6 b6: @@ -2662,10 +2900,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG136 [66] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG136 [66] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG137 [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG137 [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG138 atan2_16::@12 b12: @@ -2679,9 +2917,9 @@ atan2_16: { //SEG140 [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG141 atan2_16::@16 - b16: + jmp b21 + //SEG141 atan2_16::@21 + b21: //SEG142 [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -2690,10 +2928,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG143 [70] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG143 [70] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG144 [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG144 [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG145 atan2_16::@7 b7: @@ -2725,45 +2963,67 @@ atan2_16: { rts //SEG154 atan2_16::@11 b11: - //SEG155 [75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG155 [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuz1=vbuz2 + lda i + sta shift + //SEG156 [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG156 [76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG157 [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 - cpy #0 - beq !e+ - !: + //SEG158 [78] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG159 [78] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG160 [78] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + lda shift + cmp #1+1 + bcs b14 + jmp b15 + //SEG164 atan2_16::@15 + b15: + //SEG165 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp shift + beq b17_from_b15 + jmp b16 + //SEG166 atan2_16::@16 + b16: + //SEG167 [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG168 [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG157 [77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG169 [83] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG170 [83] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG171 [83] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG172 atan2_16::@17 + b17: + //SEG173 [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG158 atan2_16::@15 - b15: - //SEG159 [78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG174 atan2_16::@20 + b20: + //SEG175 [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -2771,7 +3031,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG160 [79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG176 [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -2779,11 +3039,11 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG161 [80] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG177 [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _24 - //SEG162 [81] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 + //SEG178 [88] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 ldy _24 sec lda angle_3 @@ -2792,31 +3052,31 @@ atan2_16: { lda angle_3+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle_3+1 - //SEG163 [82] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG164 [82] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG165 [82] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG166 [82] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG167 atan2_16::@14 - b14: - //SEG168 [83] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG179 [89] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG180 [89] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG181 [89] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG182 [89] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG183 atan2_16::@19 + b19: + //SEG184 [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG169 [84] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 + //SEG185 [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 lda #CORDIC_ITERATIONS_16-1+1 cmp i - beq b12_from_b14 - //SEG170 [64] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG171 [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG172 [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG173 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG174 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + beq b12_from_b19 + //SEG186 [64] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG187 [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG188 [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG189 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG190 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG175 atan2_16::@13 - b13: - //SEG176 [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG191 atan2_16::@18 + b18: + //SEG192 [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -2824,7 +3084,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG177 [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG193 [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -2832,11 +3092,11 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG178 [87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG194 [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _23 - //SEG179 [88] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 + //SEG195 [95] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 ldy _23 clc lda angle_2 @@ -2845,104 +3105,128 @@ atan2_16: { lda angle_2+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle_2+1 - jmp b14_from_b13 - //SEG180 atan2_16::@4 + jmp b19_from_b18 + //SEG196 atan2_16::@14 + b14: + //SEG197 [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG198 [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG199 [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuz1=vbuz1_minus_2 + dec shift + dec shift + jmp b13_from_b14 + //SEG200 atan2_16::@4 b4: - //SEG181 [89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG201 [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG182 atan2_16::@1 + //SEG202 atan2_16::@1 b1: - //SEG183 [90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG203 [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG184 init_font_hex +//SEG204 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($1b) charset) +// init_font_hex(byte* zeropage($20) charset) init_font_hex: { - .label _0 = $40 - .label _1 = $41 - .label _2 = $42 - .label idx = $21 - .label i = $20 - .label idx_3 = $43 - .label proto_lo = $1d - .label charset = $1b - .label c1 = $1f - .label proto_hi = $18 - .label c = $1a - //SEG185 [92] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $41 + .label _1 = $42 + .label _2 = $43 + .label idx = $26 + .label i = $25 + .label idx_3 = $44 + .label proto_lo = $22 + .label charset = $20 + .label c1 = $24 + .label proto_hi = $1d + .label c = $1f + //SEG205 [102] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG186 [92] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG206 [102] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG187 [92] 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 + //SEG207 [102] 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 - //SEG188 [92] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG208 [102] 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 - //SEG189 [92] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG209 [102] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG190 [92] 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 - //SEG191 [92] 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 - //SEG192 [92] 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 + //SEG210 [102] 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 + //SEG211 [102] 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 + //SEG212 [102] 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 - //SEG193 init_font_hex::@1 + //SEG213 init_font_hex::@1 b1: - //SEG194 [93] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG214 [103] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG195 [93] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG215 [103] 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 - //SEG196 [93] 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 + //SEG216 [103] 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 - //SEG197 [93] 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 + //SEG217 [103] 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 - //SEG198 [93] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG218 [103] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG199 [93] 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 - //SEG200 [93] 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 - //SEG201 [93] 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 + //SEG219 [103] 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 + //SEG220 [103] 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 + //SEG221 [103] 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 - //SEG202 init_font_hex::@2 + //SEG222 init_font_hex::@2 b2: - //SEG203 [94] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG223 [104] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG204 [95] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG224 [105] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG205 [95] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG225 [105] 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 - //SEG206 [95] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG226 [105] 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 - //SEG207 [95] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG227 [105] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG208 [95] 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 - //SEG209 [95] 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 + //SEG228 [105] 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 + //SEG229 [105] 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 - //SEG210 init_font_hex::@3 + //SEG230 init_font_hex::@3 b3: - //SEG211 [96] (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 + //SEG231 [106] (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 @@ -2950,43 +3234,43 @@ init_font_hex: { asl asl sta _0 - //SEG212 [97] (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 + //SEG232 [107] (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 - //SEG213 [98] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG233 [108] (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 - //SEG214 [99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG234 [109] *((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 - //SEG215 [100] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG235 [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG216 [101] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG236 [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG217 [102] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG237 [112] 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 - //SEG218 init_font_hex::@4 + //SEG238 init_font_hex::@4 b4: - //SEG219 [103] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG239 [113] *((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 - //SEG220 [104] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG240 [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG221 [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG241 [115] *((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 - //SEG222 [106] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG242 [116] (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 @@ -2994,7 +3278,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG223 [107] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG243 [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3002,16 +3286,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG224 [108] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG244 [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG225 [109] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG245 [119] 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 - //SEG226 init_font_hex::@5 + //SEG246 init_font_hex::@5 b5: - //SEG227 [110] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG247 [120] (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 @@ -3019,19 +3303,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG228 [111] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG248 [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG229 [112] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG249 [122] 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 - //SEG230 init_font_hex::@return + //SEG250 init_font_hex::@return breturn: - //SEG231 [113] return + //SEG251 [123] return rts } -//SEG232 File Data +//SEG252 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -3061,10 +3345,10 @@ Statement [16] (word) main::angle_w#0 ← (word) atan2_16::return#2 [ main::y#4 Statement [17] (word~) main::$12 ← (word) main::angle_w#0 + (byte) $80 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$12 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$12 ] ) always clobbers reg byte a Statement [18] (byte) main::ang_w#0 ← > (word~) main::$12 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 ] ) always clobbers reg byte a Statement [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ main::ang_w#0 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:48 [ main::ang_w#0 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:49 [ diff::bb1#0 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:49 [ diff::bb1#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:53 [ main::ang_w#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:53 [ main::ang_w#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:54 [ diff::bb1#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:54 [ diff::bb1#0 ] Statement [24] (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] ) always clobbers reg byte a Statement [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$15 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$15 ] ) always clobbers reg byte a reg byte y Statement [26] *((byte*) main::screen#2) ← (byte~) main::$15 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] ) always clobbers reg byte y @@ -3090,34 +3374,39 @@ Statement [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ Statement [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a Statement [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a Statement [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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#0 ] ) always clobbers reg byte a -Statement [76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [80] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [81] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [87] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [88] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [94] *((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:26 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [96] (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:32 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [97] (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:64 [ init_font_hex::$0 ] -Statement [103] *((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 [105] *((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 [106] (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 [107] (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 [110] (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 [76] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Statement [77] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [81] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [82] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [84] 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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [85] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [86] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [87] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [88] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [92] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [93] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [94] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [95] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [96] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [97] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [99] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [100] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [104] *((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:31 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Statement [106] (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:37 [ init_font_hex::i#2 init_font_hex::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Statement [107] (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:65 [ init_font_hex::$0 ] +Statement [113] *((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 [115] *((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 [116] (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 [117] (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 [120] (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 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] ) always clobbers reg byte a reg byte y Statement [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] ) always clobbers reg byte a reg byte y @@ -3150,27 +3439,31 @@ Statement [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ Statement [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a Statement [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a Statement [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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#0 ] ) always clobbers reg byte a -Statement [76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [80] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [81] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [87] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [88] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [94] *((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 [96] (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 [97] (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 [103] *((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 [105] *((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 [106] (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 [107] (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 [110] (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 [76] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [77] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [81] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [82] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [84] 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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [85] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [86] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [87] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [88] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [92] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [93] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [94] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [95] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [96] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [97] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#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 [99] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [100] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [104] *((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 [106] (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 [107] (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 [113] *((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 [115] *((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 [116] (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 [117] (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 [120] (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 [ main::y#4 main::y#1 ] : zp ZP_BYTE:2 , reg byte x , Potential registers zp ZP_BYTE:3 [ main::x#2 main::x#1 ] : zp ZP_BYTE:3 , reg byte x , Potential registers zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] : zp ZP_WORD:4 , @@ -3180,110 +3473,102 @@ Potential registers zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte:: Potential registers zp ZP_BYTE:11 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] : zp ZP_WORD:12 , Potential registers zp ZP_BYTE:14 [ diff::return#1 diff::$4 diff::$2 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:15 , -Potential registers zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp ZP_WORD:17 , +Potential registers zp ZP_WORD:15 [ 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:15 , +Potential registers zp ZP_WORD:17 [ 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 ] : zp ZP_WORD:17 , Potential registers zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:19 , reg byte x , reg byte y , Potential registers zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:20 , Potential registers zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:22 , -Potential registers zp ZP_WORD:24 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:24 , -Potential registers zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:26 , reg byte x , -Potential registers zp ZP_WORD:27 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:27 , -Potential registers zp ZP_WORD:29 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:29 , -Potential registers zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:31 , reg byte x , -Potential registers zp ZP_BYTE:32 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:32 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:33 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:33 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:34 [ main::xw#0 ] : zp ZP_WORD:34 , -Potential registers zp ZP_WORD:36 [ main::yw#0 ] : zp ZP_WORD:36 , -Potential registers zp ZP_WORD:38 [ atan2_16::x#0 ] : zp ZP_WORD:38 , -Potential registers zp ZP_WORD:40 [ atan2_16::y#0 ] : zp ZP_WORD:40 , -Potential registers zp ZP_WORD:42 [ atan2_16::return#2 ] : zp ZP_WORD:42 , -Potential registers zp ZP_WORD:44 [ main::angle_w#0 ] : zp ZP_WORD:44 , -Potential registers zp ZP_WORD:46 [ main::$12 ] : zp ZP_WORD:46 , -Potential registers zp ZP_BYTE:48 [ main::ang_w#0 ] : zp ZP_BYTE:48 , reg byte x , -Potential registers zp ZP_BYTE:49 [ diff::bb1#0 ] : zp ZP_BYTE:49 , reg byte x , -Potential registers zp ZP_BYTE:50 [ diff::bb2#0 ] : zp ZP_BYTE:50 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:51 [ diff::return#0 ] : zp ZP_BYTE:51 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:52 [ main::$14 ] : zp ZP_BYTE:52 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:53 [ main::$15 ] : zp ZP_BYTE:53 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:54 [ print_word::w#0 ] : zp ZP_WORD:54 , -Potential registers zp ZP_BYTE:56 [ print_byte::$0 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:57 [ print_byte::$2 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:58 [ atan2_16::xd#0 ] : zp ZP_WORD:58 , -Potential registers zp ZP_WORD:60 [ atan2_16::yd#0 ] : zp ZP_WORD:60 , -Potential registers zp ZP_BYTE:62 [ atan2_16::$24 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:63 [ atan2_16::$23 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:64 [ init_font_hex::$0 ] : zp ZP_BYTE:64 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:65 [ init_font_hex::$1 ] : zp ZP_BYTE:65 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:66 [ init_font_hex::$2 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:67 [ init_font_hex::idx#3 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp ZP_BYTE:24 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:25 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp ZP_WORD:25 , +Potential registers zp ZP_WORD:27 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp ZP_WORD:27 , +Potential registers zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:29 , +Potential registers zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:31 , reg byte x , +Potential registers zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:32 , +Potential registers zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:34 , +Potential registers zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:36 , reg byte x , +Potential registers zp ZP_BYTE:37 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:37 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:38 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:39 [ main::xw#0 ] : zp ZP_WORD:39 , +Potential registers zp ZP_WORD:41 [ main::yw#0 ] : zp ZP_WORD:41 , +Potential registers zp ZP_WORD:43 [ atan2_16::x#0 ] : zp ZP_WORD:43 , +Potential registers zp ZP_WORD:45 [ atan2_16::y#0 ] : zp ZP_WORD:45 , +Potential registers zp ZP_WORD:47 [ atan2_16::return#2 ] : zp ZP_WORD:47 , +Potential registers zp ZP_WORD:49 [ main::angle_w#0 ] : zp ZP_WORD:49 , +Potential registers zp ZP_WORD:51 [ main::$12 ] : zp ZP_WORD:51 , +Potential registers zp ZP_BYTE:53 [ main::ang_w#0 ] : zp ZP_BYTE:53 , reg byte x , +Potential registers zp ZP_BYTE:54 [ diff::bb1#0 ] : zp ZP_BYTE:54 , reg byte x , +Potential registers zp ZP_BYTE:55 [ diff::bb2#0 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:56 [ diff::return#0 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:57 [ main::$14 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:58 [ main::$15 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:59 [ print_word::w#0 ] : zp ZP_WORD:59 , +Potential registers zp ZP_BYTE:61 [ print_byte::$0 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:62 [ print_byte::$2 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:63 [ atan2_16::$24 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:64 [ atan2_16::$23 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:65 [ init_font_hex::$0 ] : zp ZP_BYTE:65 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:66 [ init_font_hex::$1 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:67 [ init_font_hex::$2 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:68 [ init_font_hex::idx#3 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 7,706.67: zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 3,203.15: zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,817.2: zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:62 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:63 [ atan2_16::$23 ] 1,930.5: zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] 1,501.5: zp ZP_WORD:60 [ atan2_16::yd#0 ] 600.6: zp ZP_WORD:58 [ atan2_16::xd#0 ] 202: zp ZP_WORD:42 [ atan2_16::return#2 ] 50: zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 3.89: zp ZP_WORD:38 [ atan2_16::x#0 ] 3.63: zp ZP_WORD:40 [ atan2_16::y#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:32 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:65 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:66 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:33 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:64 [ init_font_hex::$0 ] 202: zp ZP_BYTE:67 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:27 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:29 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:24 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [main] 202: zp ZP_WORD:44 [ main::angle_w#0 ] 202: zp ZP_WORD:46 [ main::$12 ] 202: zp ZP_BYTE:52 [ main::$14 ] 202: zp ZP_BYTE:53 [ main::$15 ] 161.6: zp ZP_BYTE:3 [ main::x#2 main::x#1 ] 86.44: zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] 74.94: zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] 60.09: zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] 50.5: zp ZP_WORD:34 [ main::xw#0 ] 50.5: zp ZP_WORD:36 [ main::yw#0 ] 43.29: zp ZP_BYTE:48 [ main::ang_w#0 ] 17.46: zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -Uplift Scope [diff] 202: zp ZP_BYTE:51 [ diff::return#0 ] 53.5: zp ZP_BYTE:50 [ diff::bb2#0 ] 43: zp ZP_BYTE:14 [ diff::return#1 diff::$4 diff::$2 ] 35.67: zp ZP_BYTE:49 [ diff::bb1#0 ] -Uplift Scope [print_byte] 10: zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp ZP_BYTE:56 [ print_byte::$0 ] 4: zp ZP_BYTE:57 [ print_byte::$2 ] +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:25 [ 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:27 [ 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:20 [ 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:15 [ 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:17 [ 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:63 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:64 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:47 [ atan2_16::return#2 ] 50: zp ZP_WORD:22 [ 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:43 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:45 [ atan2_16::y#0 ] +Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:37 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:66 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:67 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:65 [ init_font_hex::$0 ] 202: zp ZP_BYTE:68 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplift Scope [main] 202: zp ZP_WORD:49 [ main::angle_w#0 ] 202: zp ZP_WORD:51 [ main::$12 ] 202: zp ZP_BYTE:57 [ main::$14 ] 202: zp ZP_BYTE:58 [ main::$15 ] 161.6: zp ZP_BYTE:3 [ main::x#2 main::x#1 ] 86.44: zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] 74.94: zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] 60.09: zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] 50.5: zp ZP_WORD:39 [ main::xw#0 ] 50.5: zp ZP_WORD:41 [ main::yw#0 ] 43.29: zp ZP_BYTE:53 [ main::ang_w#0 ] 17.46: zp ZP_BYTE:2 [ main::y#4 main::y#1 ] +Uplift Scope [diff] 202: zp ZP_BYTE:56 [ diff::return#0 ] 53.5: zp ZP_BYTE:55 [ diff::bb2#0 ] 43: zp ZP_BYTE:14 [ diff::return#1 diff::$4 diff::$2 ] 35.67: zp ZP_BYTE:54 [ diff::bb1#0 ] +Uplift Scope [print_byte] 10: zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp ZP_BYTE:61 [ print_byte::$0 ] 4: zp ZP_BYTE:62 [ print_byte::$2 ] Uplift Scope [print_char] 14: zp ZP_BYTE:11 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] Uplift Scope [] 6: zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] -Uplift Scope [print_word] 2: zp ZP_WORD:54 [ print_word::w#0 ] +Uplift Scope [print_word] 2: zp ZP_WORD:59 [ print_word::w#0 ] -Uplifting [atan2_16] best 404209 combination zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:60 [ atan2_16::yd#0 ] zp ZP_WORD:58 [ atan2_16::xd#0 ] zp ZP_WORD:42 [ atan2_16::return#2 ] zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:38 [ atan2_16::x#0 ] zp ZP_WORD:40 [ atan2_16::y#0 ] -Uplifting [init_font_hex] best 385209 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:33 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:64 [ init_font_hex::$0 ] zp ZP_BYTE:67 [ init_font_hex::idx#3 ] zp ZP_WORD:27 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:29 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#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 ] +Uplifting [atan2_16] best 1158709 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:25 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:27 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:15 [ 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:17 [ 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 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:47 [ atan2_16::return#2 ] zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:43 [ atan2_16::x#0 ] zp ZP_WORD:45 [ atan2_16::y#0 ] +Limited combination testing to 100 combinations of 144 possible. +Uplifting [init_font_hex] best 1139709 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:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:65 [ init_font_hex::$0 ] zp ZP_BYTE:68 [ init_font_hex::idx#3 ] zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [main] best 383009 combination zp ZP_WORD:44 [ main::angle_w#0 ] zp ZP_WORD:46 [ main::$12 ] reg byte a [ main::$14 ] reg byte a [ main::$15 ] reg byte x [ main::x#2 main::x#1 ] zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] zp ZP_WORD:34 [ main::xw#0 ] zp ZP_WORD:36 [ main::yw#0 ] zp ZP_BYTE:48 [ main::ang_w#0 ] zp ZP_BYTE:2 [ main::y#4 main::y#1 ] +Uplifting [main] best 1138009 combination zp ZP_WORD:49 [ main::angle_w#0 ] zp ZP_WORD:51 [ main::$12 ] reg byte a [ main::$14 ] reg byte a [ main::$15 ] zp ZP_BYTE:3 [ main::x#2 main::x#1 ] zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] zp ZP_WORD:39 [ main::xw#0 ] zp ZP_WORD:41 [ main::yw#0 ] reg byte x [ main::ang_w#0 ] zp ZP_BYTE:2 [ main::y#4 main::y#1 ] Limited combination testing to 100 combinations of 128 possible. -Uplifting [diff] best 381799 combination reg byte a [ diff::return#0 ] reg byte a [ diff::bb2#0 ] reg byte a [ diff::return#1 diff::$4 diff::$2 ] zp ZP_BYTE:49 [ diff::bb1#0 ] +Uplifting [diff] best 1136505 combination reg byte a [ diff::return#0 ] reg byte a [ diff::bb2#0 ] reg byte a [ diff::return#1 diff::$4 diff::$2 ] reg byte x [ diff::bb1#0 ] Limited combination testing to 100 combinations of 128 possible. -Uplifting [print_byte] best 381785 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] -Uplifting [print_char] best 381776 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -Uplifting [] best 381776 combination zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] -Uplifting [print_word] best 381776 combination zp ZP_WORD:54 [ print_word::w#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] -Uplifting [atan2_16] best 381776 combination zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:33 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 381776 combination zp ZP_BYTE:33 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:64 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 381776 combination zp ZP_BYTE:64 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:67 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 381176 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 381176 combination zp ZP_BYTE:31 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:48 [ main::ang_w#0 ] -Uplifting [main] best 381176 combination zp ZP_BYTE:48 [ main::ang_w#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:49 [ diff::bb1#0 ] -Uplifting [diff] best 381176 combination zp ZP_BYTE:49 [ diff::bb1#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 381176 combination zp ZP_BYTE:26 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [print_byte] best 1136491 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] +Uplifting [print_char] best 1136482 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] +Uplifting [] best 1136482 combination zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] +Uplifting [print_word] best 1136482 combination zp ZP_WORD:59 [ print_word::w#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [init_font_hex] best 1136482 combination zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:65 [ init_font_hex::$0 ] +Uplifting [init_font_hex] best 1136482 combination zp ZP_BYTE:65 [ init_font_hex::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:68 [ init_font_hex::idx#3 ] +Uplifting [init_font_hex] best 1135882 combination reg byte y [ init_font_hex::idx#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 1135882 combination zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::x#2 main::x#1 ] +Uplifting [main] best 1135882 combination zp ZP_BYTE:3 [ main::x#2 main::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_font_hex] best 1135882 combination zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::y#4 main::y#1 ] -Uplifting [main] best 381176 combination zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] ] with [ zp ZP_WORD:54 [ print_word::w#0 ] ] - score: 1 +Uplifting [main] best 1135882 combination zp ZP_BYTE:2 [ main::y#4 main::y#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] ] with [ zp ZP_WORD:59 [ print_word::w#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:34 [ main::xw#0 ] ] with [ zp ZP_WORD:38 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:36 [ main::yw#0 ] ] with [ zp ZP_WORD:40 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:44 [ main::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_BYTE:48 [ main::ang_w#0 ] ] with [ zp ZP_BYTE:49 [ diff::bb1#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ 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 ] ] with [ zp ZP_WORD:42 [ atan2_16::return#2 main::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ 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 main::angle_w#0 ] ] with [ zp ZP_WORD:46 [ main::$12 ] ] - score: 1 -Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] -Allocated (was zp ZP_WORD:6) zp ZP_WORD:5 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ] -Allocated (was zp ZP_WORD:8) zp ZP_WORD:7 [ main::screen#2 main::screen#5 main::screen#1 ] -Allocated (was zp ZP_WORD:12) zp ZP_WORD:9 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] -Allocated (was zp ZP_WORD:15) zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated (was zp ZP_WORD:17) zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -Allocated (was zp ZP_BYTE:19) zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:39 [ main::xw#0 ] ] with [ zp ZP_WORD:43 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ main::yw#0 ] ] with [ zp ZP_WORD:45 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:47 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:49 [ main::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ 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 ] ] with [ zp ZP_WORD:47 [ atan2_16::return#2 main::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ 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 main::angle_w#0 ] ] with [ zp ZP_WORD:51 [ main::$12 ] ] - score: 1 +Allocated (was zp ZP_WORD:12) zp ZP_WORD:10 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] +Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ 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 ] +Allocated (was zp ZP_WORD:17) zp ZP_WORD:14 [ 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 ] Allocated (was zp ZP_WORD:20) zp ZP_WORD:16 [ 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 main::angle_w#0 main::$12 ] -Allocated (was zp ZP_WORD:24) zp ZP_WORD:18 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:26) zp ZP_BYTE:20 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:27) zp ZP_WORD:21 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:29) zp ZP_WORD:23 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:31) zp ZP_BYTE:25 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_WORD:34) zp ZP_WORD:27 [ main::xw#0 atan2_16::x#0 ] -Allocated (was zp ZP_WORD:36) zp ZP_WORD:29 [ main::yw#0 atan2_16::y#0 ] -Allocated (was zp ZP_BYTE:48) zp ZP_BYTE:31 [ main::ang_w#0 diff::bb1#0 ] -Allocated (was zp ZP_WORD:58) zp ZP_WORD:32 [ atan2_16::xd#0 ] -Allocated (was zp ZP_WORD:60) zp ZP_WORD:34 [ atan2_16::yd#0 ] -Allocated (was zp ZP_BYTE:64) zp ZP_BYTE:36 [ init_font_hex::$0 ] +Allocated (was zp ZP_WORD:25) zp ZP_WORD:18 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated (was zp ZP_WORD:27) zp ZP_WORD:20 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated (was zp ZP_BYTE:31) zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated (was zp ZP_WORD:32) zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated (was zp ZP_WORD:34) zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated (was zp ZP_BYTE:36) zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated (was zp ZP_BYTE:38) zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated (was zp ZP_WORD:39) zp ZP_WORD:31 [ main::xw#0 atan2_16::x#0 ] +Allocated (was zp ZP_WORD:41) zp ZP_WORD:33 [ main::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_BYTE:65) zp ZP_BYTE:35 [ init_font_hex::$0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -3301,7 +3586,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label COLS = $d800 .label CHARSET = $2000 .label SCREEN = $2800 - .label print_char_cursor = 9 + .label print_char_cursor = $a //SEG3 @begin bbegin: //SEG4 [1] phi from @begin to @1 [phi:@begin->@1] @@ -3322,16 +3607,16 @@ bend: main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label _12 = $10 - .label xw = $1b - .label yw = $1d + .label xw = $1f + .label yw = $21 .label angle_w = $10 - .label ang_w = $1f - .label diff_sum = 5 - .label screen = 7 - .label screen_ref = 3 + .label diff_sum = 6 + .label screen = 8 + .label screen_ref = 4 + .label x = 3 .label y = 2 //SEG11 [5] call init_font_hex - //SEG12 [91] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [101] 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] @@ -3380,8 +3665,9 @@ main: { //SEG29 [9] phi (byte*) main::screen#2 = (byte*) main::screen#5 [phi:main::@1->main::@2#0] -- register_copy //SEG30 [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#7 [phi:main::@1->main::@2#1] -- register_copy //SEG31 [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#5 [phi:main::@1->main::@2#2] -- register_copy - //SEG32 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#3] -- vbsxx=vbsc1 - ldx #-$13 + //SEG32 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#3] -- vbsz1=vbsc1 + lda #-$13 + sta x jmp b2 //SEG33 [9] phi from main::@8 to main::@2 [phi:main::@8->main::@2] b2_from_b8: @@ -3392,9 +3678,9 @@ main: { jmp b2 //SEG38 main::@2 b2: - //SEG39 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 + //SEG39 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda x ldy #0 - txa sta xw+1 sty xw //SEG40 [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 @@ -3419,9 +3705,9 @@ main: { bcc !+ inc _12+1 !: - //SEG48 [18] (byte) main::ang_w#0 ← > (word~) main::$12 -- vbuz1=_hi_vwuz2 + //SEG48 [18] (byte) main::ang_w#0 ← > (word~) main::$12 -- vbuxx=_hi_vwuz1 lda _12+1 - sta ang_w + tax //SEG49 [19] (byte) diff::bb1#0 ← (byte) main::ang_w#0 //SEG50 [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) -- vbuaa=_deref_pbuz1 ldy #0 @@ -3442,8 +3728,8 @@ main: { bcc !+ inc diff_sum+1 !: - //SEG56 [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) -- vbuaa=vbuz1_minus__deref_pbuz2 - lda ang_w + //SEG56 [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) -- vbuaa=vbuxx_minus__deref_pbuz1 + txa sec ldy #0 sbc (screen_ref),y @@ -3460,10 +3746,11 @@ main: { bne !+ inc screen_ref+1 !: - //SEG60 [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsxx=_inc_vbsxx - inx - //SEG61 [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 + //SEG60 [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 + inc x + //SEG61 [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 + lda #$15 + cmp x bne b2_from_b8 jmp b3 //SEG62 main::@3 @@ -3492,9 +3779,9 @@ main: { } //SEG70 print_word // Print a word as HEX -// print_word(word zeropage(5) w) +// print_word(word zeropage(6) w) print_word: { - .label w = 5 + .label w = 6 //SEG71 [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 lda w+1 tax @@ -3584,21 +3871,20 @@ print_char: { rts } //SEG105 diff -// diff(byte zeropage($1f) bb1, byte register(A) bb2) +// diff(byte register(X) bb1, byte register(A) bb2) diff: { - .label bb1 = $1f - //SEG106 [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuz1_lt_vbuaa_then_la1 - cmp bb1 - beq !+ - bcs b1 - !: + //SEG106 [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuxx_lt_vbuaa_then_la1 + sta $ff + cpx $ff + bcc b1 jmp b2 //SEG107 diff::@2 b2: - //SEG108 [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 -- vbuaa=vbuz1_minus_vbuaa - eor #$ff + //SEG108 [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 -- vbuaa=vbuxx_minus_vbuaa + sta $ff + txa sec - adc bb1 + sbc $ff //SEG109 [55] phi from diff::@1 diff::@2 to diff::@3 [phi:diff::@1/diff::@2->diff::@3] b3_from_b1: b3_from_b2: @@ -3613,28 +3899,28 @@ diff: { rts //SEG114 diff::@1 b1: - //SEG115 [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 -- vbuaa=vbuaa_minus_vbuz1 + //SEG115 [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 -- vbuaa=vbuaa_minus_vbuxx + stx $ff sec - sbc bb1 + sbc $ff jmp b3_from_b1 } //SEG116 atan2_16 // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($1b) x, signed word zeropage($1d) y) +// atan2_16(signed word zeropage($1f) x, signed word zeropage($21) y) atan2_16: { - .label _2 = $b - .label _7 = $d - .label yi = $b - .label xi = $d - .label xd = $20 - .label yd = $22 + .label _2 = $c + .label _7 = $e + .label yi = $c + .label xi = $e .label angle = $10 - .label i = $f + .label xd = $14 + .label yd = $12 .label return = $10 - .label x = $1b - .label y = $1d + .label x = $1f + .label y = $21 //SEG117 [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bpl b1 @@ -3652,7 +3938,7 @@ atan2_16: { //SEG120 [60] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG121 [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG121 [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG122 atan2_16::@3 b3: @@ -3673,7 +3959,7 @@ atan2_16: { //SEG126 [63] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG127 [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG127 [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG128 atan2_16::@6 b6: @@ -3684,9 +3970,8 @@ atan2_16: { sta angle lda #0 sta angle+1 - //SEG131 [64] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - lda #0 - sta i + //SEG131 [64] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + ldx #0 //SEG132 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG133 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy jmp b10 @@ -3697,10 +3982,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG136 [66] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG136 [66] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG137 [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG137 [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG138 atan2_16::@12 b12: @@ -3710,9 +3995,9 @@ atan2_16: { //SEG140 [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG141 atan2_16::@16 - b16: + jmp b21 + //SEG141 atan2_16::@21 + b21: //SEG142 [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -3721,10 +4006,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG143 [70] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG143 [70] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG144 [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG144 [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG145 atan2_16::@7 b7: @@ -3756,45 +4041,65 @@ atan2_16: { rts //SEG154 atan2_16::@11 b11: - //SEG155 [75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG155 [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG156 [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG156 [76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG157 [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG158 [78] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG159 [78] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG160 [78] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + bcs b14 + jmp b15 + //SEG164 atan2_16::@15 + b15: + //SEG165 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 cpy #0 - beq !e+ - !: + beq b17_from_b15 + jmp b16 + //SEG166 atan2_16::@16 + b16: + //SEG167 [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG168 [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG157 [77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG169 [83] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG170 [83] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG171 [83] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG172 atan2_16::@17 + b17: + //SEG173 [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG158 atan2_16::@15 - b15: - //SEG159 [78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG174 atan2_16::@20 + b20: + //SEG175 [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -3802,7 +4107,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG160 [79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG176 [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -3810,10 +4115,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG161 [80] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG177 [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG162 [81] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG178 [88] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -3822,31 +4127,30 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG163 [82] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG164 [82] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG165 [82] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG166 [82] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG167 atan2_16::@14 - b14: - //SEG168 [83] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG169 [84] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i - beq b12_from_b14 - //SEG170 [64] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG171 [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG172 [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG173 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG174 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG179 [89] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG180 [89] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG181 [89] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG182 [89] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG183 atan2_16::@19 + b19: + //SEG184 [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG185 [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + beq b12_from_b19 + //SEG186 [64] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG187 [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG188 [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG189 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG190 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG175 atan2_16::@13 - b13: - //SEG176 [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG191 atan2_16::@18 + b18: + //SEG192 [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -3854,7 +4158,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG177 [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG193 [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -3862,10 +4166,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG178 [87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG194 [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG179 [88] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG195 [95] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -3874,99 +4178,123 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14_from_b13 - //SEG180 atan2_16::@4 + jmp b19_from_b18 + //SEG196 atan2_16::@14 + b14: + //SEG197 [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG198 [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG199 [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13_from_b14 + //SEG200 atan2_16::@4 b4: - //SEG181 [89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG201 [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG182 atan2_16::@1 + //SEG202 atan2_16::@1 b1: - //SEG183 [90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG203 [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG184 init_font_hex +//SEG204 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($15) charset) +// init_font_hex(byte* zeropage($19) charset) init_font_hex: { - .label _0 = $24 - .label idx = $1a - .label proto_lo = $17 - .label charset = $15 - .label c1 = $19 - .label proto_hi = $12 - .label c = $14 - //SEG185 [92] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $23 + .label idx = $1e + .label proto_lo = $1b + .label charset = $19 + .label c1 = $1d + .label proto_hi = $16 + .label c = $18 + //SEG205 [102] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG186 [92] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG206 [102] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG187 [92] 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 + //SEG207 [102] 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 - //SEG188 [92] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG208 [102] 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 - //SEG189 [92] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG209 [102] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG190 [92] 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 - //SEG191 [92] 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 - //SEG192 [92] 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 + //SEG210 [102] 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 + //SEG211 [102] 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 + //SEG212 [102] 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 - //SEG193 init_font_hex::@1 + //SEG213 init_font_hex::@1 b1: - //SEG194 [93] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG214 [103] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG195 [93] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG215 [103] 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 - //SEG196 [93] 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 + //SEG216 [103] 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 - //SEG197 [93] 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 + //SEG217 [103] 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 - //SEG198 [93] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG218 [103] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG199 [93] 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 - //SEG200 [93] 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 - //SEG201 [93] 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 + //SEG219 [103] 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 + //SEG220 [103] 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 + //SEG221 [103] 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 - //SEG202 init_font_hex::@2 + //SEG222 init_font_hex::@2 b2: - //SEG203 [94] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG223 [104] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG204 [95] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG224 [105] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG205 [95] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG225 [105] 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 - //SEG206 [95] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG226 [105] 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 - //SEG207 [95] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG227 [105] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG208 [95] 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 - //SEG209 [95] 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 + //SEG228 [105] 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 + //SEG229 [105] 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 - //SEG210 init_font_hex::@3 + //SEG230 init_font_hex::@3 b3: - //SEG211 [96] (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 + //SEG231 [106] (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 @@ -3975,37 +4303,37 @@ init_font_hex: { asl asl sta _0 - //SEG212 [97] (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 + //SEG232 [107] (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 - //SEG213 [98] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG233 [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG214 [99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG234 [109] *((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 - //SEG215 [100] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG235 [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG216 [101] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG236 [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG217 [102] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG237 [112] 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 - //SEG218 init_font_hex::@4 + //SEG238 init_font_hex::@4 b4: - //SEG219 [103] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG239 [113] *((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 - //SEG220 [104] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG240 [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG221 [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG241 [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG222 [106] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG242 [116] (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 @@ -4013,7 +4341,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG223 [107] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG243 [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4021,16 +4349,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG224 [108] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG244 [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG225 [109] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG245 [119] 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 - //SEG226 init_font_hex::@5 + //SEG246 init_font_hex::@5 b5: - //SEG227 [110] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG247 [120] (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 @@ -4038,19 +4366,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG228 [111] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG248 [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG229 [112] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG249 [122] 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 - //SEG230 init_font_hex::@return + //SEG250 init_font_hex::@return breturn: - //SEG231 [113] return + //SEG251 [123] return rts } -//SEG232 File Data +//SEG252 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -4091,13 +4419,17 @@ Removing instruction jmp b5 Removing instruction jmp b6 Removing instruction jmp b10 Removing instruction jmp b12 -Removing instruction jmp b16 +Removing instruction jmp b21 Removing instruction jmp b7 Removing instruction jmp b9 Removing instruction jmp b8 Removing instruction jmp breturn +Removing instruction jmp b13 Removing instruction jmp b15 -Removing instruction jmp b14 +Removing instruction jmp b16 +Removing instruction jmp b17 +Removing instruction jmp b20 +Removing instruction jmp b19 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 @@ -4109,7 +4441,7 @@ Removing instruction lda #0 Removing instruction ldy #0 Removing instruction ldy #0 Removing instruction lda #0 -Removing instruction lda #0 +Replacing instruction ldx #0 with TAX Replacing instruction ldy #0 with TAY Removing instruction ldy idx Removing instruction lda #0 @@ -4119,8 +4451,10 @@ Replacing label b1_from_b3 with b1 Replacing label b3_from_b1 with b3 Replacing label b7_from_b12 with b7 Replacing label b8_from_b7 with b8 -Replacing label b12_from_b14 with b12 -Replacing label b14_from_b13 with b14 +Replacing label b17_from_b15 with b17 +Replacing label b12_from_b19 with b12 +Replacing label b19_from_b18 with b19 +Replacing label b13_from_b14 with b13 Replacing label b6_from_b4 with b6 Replacing label b3_from_b1 with b3 Replacing label b3_from_b3 with b3 @@ -4144,14 +4478,18 @@ Removing instruction b6_from_b4: Removing instruction b6_from_b5: Removing instruction b10_from_b6: Removing instruction b12_from_b10: -Removing instruction b12_from_b14: +Removing instruction b12_from_b19: Removing instruction b7_from_b12: -Removing instruction b7_from_b16: +Removing instruction b7_from_b21: Removing instruction b8_from_b7: Removing instruction b8_from_b9: Removing instruction breturn: -Removing instruction b14_from_b13: -Removing instruction b14_from_b15: +Removing instruction b13_from_b11: +Removing instruction b13_from_b14: +Removing instruction b17_from_b15: +Removing instruction b17_from_b16: +Removing instruction b19_from_b18: +Removing instruction b19_from_b20: Removing instruction b1_from_b5: Removing instruction b2_from_b1: Removing instruction b2_from_b4: @@ -4177,10 +4515,12 @@ Removing instruction breturn: Removing instruction b2: Removing instruction b2: Removing instruction b5: -Removing instruction b16: +Removing instruction b21: Removing instruction b9: Removing instruction b15: -Removing instruction b10_from_b14: +Removing instruction b16: +Removing instruction b20: +Removing instruction b10_from_b19: Removing instruction b1_from_init_font_hex: Removing instruction b3_from_b2: Removing instruction b4: @@ -4201,9 +4541,9 @@ Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Removing instruction b3: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [289] beq b12 to bne -Fixing long branch [176] bpl b1 to bmi -Fixing long branch [188] bpl b4 to bmi +Fixing long branch [283] beq b12 to bne +Fixing long branch [177] bpl b1 to bmi +Fixing long branch [189] bpl b4 to bmi FINAL SYMBOL TABLE (label) @1 @@ -4231,10 +4571,10 @@ FINAL SYMBOL TABLE .byte round(256*atan2(y, x)/PI/2) }} (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:11 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:12 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:13 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:14 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -4243,7 +4583,12 @@ FINAL SYMBOL TABLE (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -4255,7 +4600,7 @@ FINAL SYMBOL TABLE (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:16 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:16 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:16 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:16 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:16 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:16 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:16 2002.0 @@ -4263,33 +4608,45 @@ FINAL SYMBOL TABLE (word) atan2_16::angle#5 angle zp ZP_WORD:16 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:16 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:15 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:15 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:16 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:16 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:27 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:31 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:32 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:20 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:20 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:20 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:20 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:20 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:13 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:13 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:13 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:13 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:13 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:13 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:14 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:14 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:14 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:14 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:14 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:14 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:29 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:33 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:34 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:18 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:18 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:18 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:18 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:18 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:11 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:11 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:11 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:11 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:11 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:11 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:12 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:12 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:12 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:12 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:12 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:12 1001.0 (byte()) diff((byte) diff::bb1 , (byte) diff::bb2) (byte~) diff::$2 reg byte a 4.0 (byte~) diff::$4 reg byte a 4.0 @@ -4298,14 +4655,14 @@ FINAL SYMBOL TABLE (label) diff::@3 (label) diff::@return (byte) diff::bb1 -(byte) diff::bb1#0 bb1 zp ZP_BYTE:31 35.66666666666666 +(byte) diff::bb1#0 reg byte x 35.66666666666666 (byte) diff::bb2 (byte) diff::bb2#0 reg byte a 53.5 (byte) diff::return (byte) diff::return#0 reg byte a 202.0 (byte) diff::return#1 reg byte a 34.99999999999999 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:36 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:35 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 @@ -4315,28 +4672,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:20 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:20 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:24 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:25 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:25 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:21 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:21 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:21 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 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:26 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:30 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:26 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:30 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:18 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:18 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:22 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:22 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:23 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:23 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:27 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155 (void()) main() (word~) main::$12 $12 zp ZP_WORD:16 202.0 (byte~) main::$14 reg byte a 202.0 @@ -4350,22 +4707,22 @@ FINAL SYMBOL TABLE (label) main::@7 (label) main::@8 (byte) main::ang_w -(byte) main::ang_w#0 ang_w zp ZP_BYTE:31 43.285714285714285 +(byte) main::ang_w#0 reg byte x 43.285714285714285 (word) main::angle_w (word) main::angle_w#0 angle_w zp ZP_WORD:16 202.0 (byte*) main::col00 (word) main::diff_sum -(word) main::diff_sum#1 diff_sum zp ZP_WORD:5 23.888888888888886 -(word) main::diff_sum#2 diff_sum zp ZP_WORD:5 14.2 -(word) main::diff_sum#7 diff_sum zp ZP_WORD:5 22.0 +(word) main::diff_sum#1 diff_sum zp ZP_WORD:6 23.888888888888886 +(word) main::diff_sum#2 diff_sum zp ZP_WORD:6 14.2 +(word) main::diff_sum#7 diff_sum zp ZP_WORD:6 22.0 (byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:7 35.5 -(byte*) main::screen#2 screen zp ZP_WORD:7 17.444444444444443 -(byte*) main::screen#5 screen zp ZP_WORD:7 22.0 +(byte*) main::screen#1 screen zp ZP_WORD:8 35.5 +(byte*) main::screen#2 screen zp ZP_WORD:8 17.444444444444443 +(byte*) main::screen#5 screen zp ZP_WORD:8 22.0 (byte*) main::screen_ref -(byte*) main::screen_ref#1 screen_ref zp ZP_WORD:3 42.599999999999994 -(byte*) main::screen_ref#2 screen_ref zp ZP_WORD:3 21.842105263157897 -(byte*) main::screen_ref#5 screen_ref zp ZP_WORD:3 22.0 +(byte*) main::screen_ref#1 screen_ref zp ZP_WORD:4 42.599999999999994 +(byte*) main::screen_ref#2 screen_ref zp ZP_WORD:4 21.842105263157897 +(byte*) main::screen_ref#5 screen_ref zp ZP_WORD:4 22.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -4381,15 +4738,15 @@ FINAL SYMBOL TABLE (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 (signed byte) main::x -(signed byte) main::x#1 reg byte x 151.5 -(signed byte) main::x#2 reg byte x 10.1 +(signed byte) main::x#1 x zp ZP_BYTE:3 151.5 +(signed byte) main::x#2 x zp ZP_BYTE:3 10.1 (signed word) main::xw -(word) main::xw#0 xw zp ZP_WORD:27 50.5 +(word) main::xw#0 xw zp ZP_WORD:31 50.5 (signed byte) main::y (signed byte) main::y#1 y zp ZP_BYTE:2 16.5 (signed byte) main::y#4 y zp ZP_BYTE:2 0.9565217391304348 (signed word) main::yw -(word) main::yw#0 yw zp ZP_WORD:29 50.5 +(word) main::yw#0 yw zp ZP_WORD:33 50.5 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 reg byte a 4.0 (byte~) print_byte::$2 reg byte x 4.0 @@ -4406,9 +4763,9 @@ FINAL SYMBOL TABLE (byte) print_char::ch#1 reg byte a 4.0 (byte) print_char::ch#2 reg byte a 6.0 (byte*) print_char_cursor -(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:9 4.0 -(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:9 0.6666666666666666 -(byte*) print_char_cursor#24 print_char_cursor zp ZP_WORD:9 1.3333333333333333 +(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:10 4.0 +(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:10 0.6666666666666666 +(byte*) print_char_cursor#24 print_char_cursor zp ZP_WORD:10 1.3333333333333333 (byte[]) print_hextab (const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" (byte*) print_line_cursor @@ -4417,49 +4774,51 @@ FINAL SYMBOL TABLE (label) print_word::@1 (label) print_word::@return (word) print_word::w -(word) print_word::w#0 w zp ZP_WORD:5 2.0 +(word) print_word::w#0 w zp ZP_WORD:6 2.0 zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -reg byte x [ main::x#2 main::x#1 ] -zp ZP_WORD:3 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] -zp ZP_WORD:5 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ] -zp ZP_WORD:7 [ main::screen#2 main::screen#5 main::screen#1 ] +zp ZP_BYTE:3 [ main::x#2 main::x#1 ] +zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] +zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ] +zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -zp ZP_WORD:9 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] +zp ZP_WORD:10 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] reg byte a [ diff::return#1 diff::$4 diff::$2 ] -zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_WORD:12 [ 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:14 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:16 [ 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 main::angle_w#0 main::$12 ] -zp ZP_WORD:18 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:20 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:21 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:23 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:25 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:18 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:20 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:29 [ 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:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_WORD:27 [ main::xw#0 atan2_16::x#0 ] -zp ZP_WORD:29 [ main::yw#0 atan2_16::y#0 ] -zp ZP_BYTE:31 [ main::ang_w#0 diff::bb1#0 ] +zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_WORD:31 [ main::xw#0 atan2_16::x#0 ] +zp ZP_WORD:33 [ main::yw#0 atan2_16::y#0 ] +reg byte x [ main::ang_w#0 ] +reg byte x [ diff::bb1#0 ] reg byte a [ diff::bb2#0 ] reg byte a [ diff::return#0 ] reg byte a [ main::$14 ] reg byte a [ main::$15 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] -zp ZP_WORD:32 [ atan2_16::xd#0 ] -zp ZP_WORD:34 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] -zp ZP_BYTE:36 [ init_font_hex::$0 ] +zp ZP_BYTE:35 [ 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: 353061 +Score: 1044367 //SEG0 File Comments // Find atan2(x, y) using the CORDIC method @@ -4476,7 +4835,7 @@ Score: 353061 .label COLS = $d800 .label CHARSET = $2000 .label SCREEN = $2800 - .label print_char_cursor = 9 + .label print_char_cursor = $a //SEG3 @begin //SEG4 [1] phi from @begin to @1 [phi:@begin->@1] //SEG5 @1 @@ -4488,16 +4847,16 @@ Score: 353061 main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label _12 = $10 - .label xw = $1b - .label yw = $1d + .label xw = $1f + .label yw = $21 .label angle_w = $10 - .label ang_w = $1f - .label diff_sum = 5 - .label screen = 7 - .label screen_ref = 3 + .label diff_sum = 6 + .label screen = 8 + .label screen_ref = 4 + .label x = 3 .label y = 2 //SEG11 [5] call init_font_hex - //SEG12 [91] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [101] 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 @@ -4534,8 +4893,9 @@ main: { //SEG29 [9] phi (byte*) main::screen#2 = (byte*) main::screen#5 [phi:main::@1->main::@2#0] -- register_copy //SEG30 [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#7 [phi:main::@1->main::@2#1] -- register_copy //SEG31 [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#5 [phi:main::@1->main::@2#2] -- register_copy - //SEG32 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#3] -- vbsxx=vbsc1 - ldx #-$13 + //SEG32 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#3] -- vbsz1=vbsc1 + lda #-$13 + sta x //SEG33 [9] phi from main::@8 to main::@2 [phi:main::@8->main::@2] //SEG34 [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@8->main::@2#0] -- register_copy //SEG35 [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#1 [phi:main::@8->main::@2#1] -- register_copy @@ -4543,9 +4903,9 @@ main: { //SEG37 [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@8->main::@2#3] -- register_copy //SEG38 main::@2 b2: - //SEG39 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 + //SEG39 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda x ldy #0 - txa sta xw+1 sty xw //SEG40 [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 @@ -4567,9 +4927,9 @@ main: { bcc !+ inc _12+1 !: - //SEG48 [18] (byte) main::ang_w#0 ← > (word~) main::$12 -- vbuz1=_hi_vwuz2 + //SEG48 [18] (byte) main::ang_w#0 ← > (word~) main::$12 -- vbuxx=_hi_vwuz1 lda _12+1 - sta ang_w + tax //SEG49 [19] (byte) diff::bb1#0 ← (byte) main::ang_w#0 //SEG50 [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) -- vbuaa=_deref_pbuz1 ldy #0 @@ -4588,8 +4948,8 @@ main: { bcc !+ inc diff_sum+1 !: - //SEG56 [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) -- vbuaa=vbuz1_minus__deref_pbuz2 - lda ang_w + //SEG56 [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) -- vbuaa=vbuxx_minus__deref_pbuz1 + txa sec ldy #0 sbc (screen_ref),y @@ -4605,10 +4965,11 @@ main: { bne !+ inc screen_ref+1 !: - //SEG60 [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsxx=_inc_vbsxx - inx - //SEG61 [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 + //SEG60 [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 + inc x + //SEG61 [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 + lda #$15 + cmp x bne b2 //SEG62 main::@3 //SEG63 [31] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 @@ -4632,9 +4993,9 @@ main: { } //SEG70 print_word // Print a word as HEX -// print_word(word zeropage(5) w) +// print_word(word zeropage(6) w) print_word: { - .label w = 5 + .label w = 6 //SEG71 [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 lda w+1 tax @@ -4710,19 +5071,18 @@ print_char: { rts } //SEG105 diff -// diff(byte zeropage($1f) bb1, byte register(A) bb2) +// diff(byte register(X) bb1, byte register(A) bb2) diff: { - .label bb1 = $1f - //SEG106 [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuz1_lt_vbuaa_then_la1 - cmp bb1 - beq !+ - bcs b1 - !: + //SEG106 [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuxx_lt_vbuaa_then_la1 + sta $ff + cpx $ff + bcc b1 //SEG107 diff::@2 - //SEG108 [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 -- vbuaa=vbuz1_minus_vbuaa - eor #$ff + //SEG108 [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 -- vbuaa=vbuxx_minus_vbuaa + sta $ff + txa sec - adc bb1 + sbc $ff //SEG109 [55] phi from diff::@1 diff::@2 to diff::@3 [phi:diff::@1/diff::@2->diff::@3] //SEG110 [55] phi (byte) diff::return#1 = (byte~) diff::$4 [phi:diff::@1/diff::@2->diff::@3#0] -- register_copy //SEG111 diff::@3 @@ -4731,28 +5091,28 @@ diff: { rts //SEG114 diff::@1 b1: - //SEG115 [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 -- vbuaa=vbuaa_minus_vbuz1 + //SEG115 [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 -- vbuaa=vbuaa_minus_vbuxx + stx $ff sec - sbc bb1 + sbc $ff rts } //SEG116 atan2_16 // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($1b) x, signed word zeropage($1d) y) +// atan2_16(signed word zeropage($1f) x, signed word zeropage($21) y) atan2_16: { - .label _2 = $b - .label _7 = $d - .label yi = $b - .label xi = $d - .label xd = $20 - .label yd = $22 + .label _2 = $c + .label _7 = $e + .label yi = $c + .label xi = $e .label angle = $10 - .label i = $f + .label xd = $14 + .label yd = $12 .label return = $10 - .label x = $1b - .label y = $1d + .label x = $1f + .label y = $21 //SEG117 [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bmi !b1+ @@ -4768,7 +5128,7 @@ atan2_16: { sbc y+1 sta _2+1 //SEG120 [60] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] - //SEG121 [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG121 [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy //SEG122 atan2_16::@3 b3: //SEG123 [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 @@ -4786,7 +5146,7 @@ atan2_16: { sbc x+1 sta _7+1 //SEG126 [63] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] - //SEG127 [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG127 [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy //SEG128 atan2_16::@6 b6: //SEG129 [64] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] @@ -4794,8 +5154,8 @@ atan2_16: { lda #0 sta angle sta angle+1 - //SEG131 [64] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - sta i + //SEG131 [64] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + tax //SEG132 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG133 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy //SEG134 atan2_16::@10 @@ -4805,8 +5165,8 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG136 [66] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] - //SEG137 [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //SEG136 [66] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + //SEG137 [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy //SEG138 atan2_16::@12 b12: //SEG139 [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 @@ -4815,7 +5175,7 @@ atan2_16: { //SEG140 [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7 - //SEG141 atan2_16::@16 + //SEG141 atan2_16::@21 //SEG142 [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -4824,8 +5184,8 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG143 [70] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] - //SEG144 [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //SEG143 [70] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + //SEG144 [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy //SEG145 atan2_16::@7 b7: //SEG146 [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 @@ -4849,43 +5209,53 @@ atan2_16: { rts //SEG154 atan2_16::@11 b11: - //SEG155 [75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG155 [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG156 [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG156 [76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG157 [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG158 [78] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + //SEG159 [78] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG160 [78] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 cpy #0 - beq !e+ - !: + beq b17 + //SEG166 atan2_16::@16 + //SEG167 [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG168 [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG157 [77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG169 [83] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + //SEG170 [83] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG171 [83] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + //SEG172 atan2_16::@17 + b17: + //SEG173 [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - //SEG158 atan2_16::@15 - //SEG159 [78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + //SEG174 atan2_16::@20 + //SEG175 [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -4893,7 +5263,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG160 [79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG176 [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -4901,10 +5271,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG161 [80] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG177 [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG162 [81] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG178 [88] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -4913,29 +5283,28 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG163 [82] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - //SEG164 [82] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG165 [82] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG166 [82] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - //SEG167 atan2_16::@14 - b14: - //SEG168 [83] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG169 [84] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + //SEG179 [89] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + //SEG180 [89] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG181 [89] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG182 [89] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + //SEG183 atan2_16::@19 + b19: + //SEG184 [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG185 [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: - //SEG170 [64] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - //SEG171 [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG172 [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG173 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG174 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG186 [64] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + //SEG187 [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG188 [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG189 [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG190 [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG175 atan2_16::@13 - b13: - //SEG176 [85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG191 atan2_16::@18 + b18: + //SEG192 [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -4943,7 +5312,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG177 [86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG193 [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -4951,10 +5320,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG178 [87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG194 [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG179 [88] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG195 [95] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -4963,87 +5332,111 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 - //SEG180 atan2_16::@4 + jmp b19 + //SEG196 atan2_16::@14 + b14: + //SEG197 [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG198 [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG199 [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13 + //SEG200 atan2_16::@4 b4: - //SEG181 [89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG201 [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6 - //SEG182 atan2_16::@1 + //SEG202 atan2_16::@1 b1: - //SEG183 [90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG203 [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3 } -//SEG184 init_font_hex +//SEG204 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($15) charset) +// init_font_hex(byte* zeropage($19) charset) init_font_hex: { - .label _0 = $24 - .label idx = $1a - .label proto_lo = $17 - .label charset = $15 - .label c1 = $19 - .label proto_hi = $12 - .label c = $14 - //SEG185 [92] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG186 [92] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .label _0 = $23 + .label idx = $1e + .label proto_lo = $1b + .label charset = $19 + .label c1 = $1d + .label proto_hi = $16 + .label c = $18 + //SEG205 [102] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + //SEG206 [102] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG187 [92] 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 + //SEG207 [102] 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 - //SEG188 [92] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG208 [102] 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 - //SEG189 [92] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG190 [92] 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 - //SEG191 [92] 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 - //SEG192 [92] 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 - //SEG193 init_font_hex::@1 + //SEG209 [102] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG210 [102] 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 + //SEG211 [102] 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 + //SEG212 [102] 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 + //SEG213 init_font_hex::@1 b1: - //SEG194 [93] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG195 [93] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG214 [103] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG215 [103] 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 - //SEG196 [93] 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 + //SEG216 [103] 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 - //SEG197 [93] 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 - //SEG198 [93] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG199 [93] 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 - //SEG200 [93] 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 - //SEG201 [93] 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 - //SEG202 init_font_hex::@2 + //SEG217 [103] 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 + //SEG218 [103] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG219 [103] 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 + //SEG220 [103] 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 + //SEG221 [103] 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 + //SEG222 init_font_hex::@2 b2: - //SEG203 [94] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG223 [104] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG204 [95] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG205 [95] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG224 [105] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG225 [105] 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 - //SEG206 [95] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG226 [105] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG207 [95] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG208 [95] 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 - //SEG209 [95] 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 - //SEG210 init_font_hex::@3 + //SEG227 [105] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG228 [105] 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 + //SEG229 [105] 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 + //SEG230 init_font_hex::@3 b3: - //SEG211 [96] (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 + //SEG231 [106] (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 @@ -5052,33 +5445,33 @@ init_font_hex: { asl asl sta _0 - //SEG212 [97] (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 + //SEG232 [107] (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 - //SEG213 [98] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG233 [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG214 [99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG234 [109] *((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 - //SEG215 [100] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG235 [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG216 [101] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG236 [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG217 [102] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG237 [112] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG218 init_font_hex::@4 - //SEG219 [103] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG238 init_font_hex::@4 + //SEG239 [113] *((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 - //SEG220 [104] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG240 [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG221 [105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG241 [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG222 [106] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG242 [116] (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 @@ -5086,7 +5479,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG223 [107] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG243 [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -5094,14 +5487,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG224 [108] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG244 [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG225 [109] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG245 [119] 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 - //SEG226 init_font_hex::@5 - //SEG227 [110] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG246 init_font_hex::@5 + //SEG247 [120] (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 @@ -5109,17 +5502,17 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG228 [111] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG248 [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG229 [112] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG249 [122] 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 - //SEG230 init_font_hex::@return - //SEG231 [113] return + //SEG250 init_font_hex::@return + //SEG251 [123] return rts } -//SEG232 File Data +//SEG252 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... diff --git a/src/test/ref/cordic-atan2-16-ref.sym b/src/test/ref/cordic-atan2-16-ref.sym index a5fbf618c..a517aae10 100644 --- a/src/test/ref/cordic-atan2-16-ref.sym +++ b/src/test/ref/cordic-atan2-16-ref.sym @@ -23,10 +23,10 @@ .byte round(256*atan2(y, x)/PI/2) }} (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:11 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:12 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:13 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:14 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -35,7 +35,12 @@ (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -47,7 +52,7 @@ (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:16 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:16 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:16 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:16 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:16 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:16 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:16 2002.0 @@ -55,33 +60,45 @@ (word) atan2_16::angle#5 angle zp ZP_WORD:16 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:16 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:15 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:15 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:16 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:16 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:27 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:31 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:32 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:20 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:20 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:20 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:20 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:20 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:13 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:13 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:13 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:13 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:13 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:13 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:14 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:14 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:14 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:14 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:14 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:14 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:29 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:33 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:34 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:18 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:18 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:18 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:18 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:18 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:11 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:11 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:11 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:11 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:11 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:11 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:12 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:12 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:12 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:12 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:12 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:12 1001.0 (byte()) diff((byte) diff::bb1 , (byte) diff::bb2) (byte~) diff::$2 reg byte a 4.0 (byte~) diff::$4 reg byte a 4.0 @@ -90,14 +107,14 @@ (label) diff::@3 (label) diff::@return (byte) diff::bb1 -(byte) diff::bb1#0 bb1 zp ZP_BYTE:31 35.66666666666666 +(byte) diff::bb1#0 reg byte x 35.66666666666666 (byte) diff::bb2 (byte) diff::bb2#0 reg byte a 53.5 (byte) diff::return (byte) diff::return#0 reg byte a 202.0 (byte) diff::return#1 reg byte a 34.99999999999999 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:36 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:35 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 @@ -107,28 +124,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:20 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:20 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:24 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:25 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:25 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:21 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:21 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:21 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 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:26 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:30 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:26 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:30 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:18 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:18 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:22 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:22 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:23 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:23 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:27 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155 (void()) main() (word~) main::$12 $12 zp ZP_WORD:16 202.0 (byte~) main::$14 reg byte a 202.0 @@ -142,22 +159,22 @@ (label) main::@7 (label) main::@8 (byte) main::ang_w -(byte) main::ang_w#0 ang_w zp ZP_BYTE:31 43.285714285714285 +(byte) main::ang_w#0 reg byte x 43.285714285714285 (word) main::angle_w (word) main::angle_w#0 angle_w zp ZP_WORD:16 202.0 (byte*) main::col00 (word) main::diff_sum -(word) main::diff_sum#1 diff_sum zp ZP_WORD:5 23.888888888888886 -(word) main::diff_sum#2 diff_sum zp ZP_WORD:5 14.2 -(word) main::diff_sum#7 diff_sum zp ZP_WORD:5 22.0 +(word) main::diff_sum#1 diff_sum zp ZP_WORD:6 23.888888888888886 +(word) main::diff_sum#2 diff_sum zp ZP_WORD:6 14.2 +(word) main::diff_sum#7 diff_sum zp ZP_WORD:6 22.0 (byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:7 35.5 -(byte*) main::screen#2 screen zp ZP_WORD:7 17.444444444444443 -(byte*) main::screen#5 screen zp ZP_WORD:7 22.0 +(byte*) main::screen#1 screen zp ZP_WORD:8 35.5 +(byte*) main::screen#2 screen zp ZP_WORD:8 17.444444444444443 +(byte*) main::screen#5 screen zp ZP_WORD:8 22.0 (byte*) main::screen_ref -(byte*) main::screen_ref#1 screen_ref zp ZP_WORD:3 42.599999999999994 -(byte*) main::screen_ref#2 screen_ref zp ZP_WORD:3 21.842105263157897 -(byte*) main::screen_ref#5 screen_ref zp ZP_WORD:3 22.0 +(byte*) main::screen_ref#1 screen_ref zp ZP_WORD:4 42.599999999999994 +(byte*) main::screen_ref#2 screen_ref zp ZP_WORD:4 21.842105263157897 +(byte*) main::screen_ref#5 screen_ref zp ZP_WORD:4 22.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -173,15 +190,15 @@ (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 (signed byte) main::x -(signed byte) main::x#1 reg byte x 151.5 -(signed byte) main::x#2 reg byte x 10.1 +(signed byte) main::x#1 x zp ZP_BYTE:3 151.5 +(signed byte) main::x#2 x zp ZP_BYTE:3 10.1 (signed word) main::xw -(word) main::xw#0 xw zp ZP_WORD:27 50.5 +(word) main::xw#0 xw zp ZP_WORD:31 50.5 (signed byte) main::y (signed byte) main::y#1 y zp ZP_BYTE:2 16.5 (signed byte) main::y#4 y zp ZP_BYTE:2 0.9565217391304348 (signed word) main::yw -(word) main::yw#0 yw zp ZP_WORD:29 50.5 +(word) main::yw#0 yw zp ZP_WORD:33 50.5 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 reg byte a 4.0 (byte~) print_byte::$2 reg byte x 4.0 @@ -198,9 +215,9 @@ (byte) print_char::ch#1 reg byte a 4.0 (byte) print_char::ch#2 reg byte a 6.0 (byte*) print_char_cursor -(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:9 4.0 -(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:9 0.6666666666666666 -(byte*) print_char_cursor#24 print_char_cursor zp ZP_WORD:9 1.3333333333333333 +(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:10 4.0 +(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:10 0.6666666666666666 +(byte*) print_char_cursor#24 print_char_cursor zp ZP_WORD:10 1.3333333333333333 (byte[]) print_hextab (const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef" (byte*) print_line_cursor @@ -209,42 +226,44 @@ (label) print_word::@1 (label) print_word::@return (word) print_word::w -(word) print_word::w#0 w zp ZP_WORD:5 2.0 +(word) print_word::w#0 w zp ZP_WORD:6 2.0 zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -reg byte x [ main::x#2 main::x#1 ] -zp ZP_WORD:3 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] -zp ZP_WORD:5 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ] -zp ZP_WORD:7 [ main::screen#2 main::screen#5 main::screen#1 ] +zp ZP_BYTE:3 [ main::x#2 main::x#1 ] +zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] +zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ] +zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -zp ZP_WORD:9 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] +zp ZP_WORD:10 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] reg byte a [ diff::return#1 diff::$4 diff::$2 ] -zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_WORD:12 [ 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:14 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:16 [ 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 main::angle_w#0 main::$12 ] -zp ZP_WORD:18 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:20 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:21 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:23 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:25 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:18 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:20 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:29 [ 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:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_WORD:27 [ main::xw#0 atan2_16::x#0 ] -zp ZP_WORD:29 [ main::yw#0 atan2_16::y#0 ] -zp ZP_BYTE:31 [ main::ang_w#0 diff::bb1#0 ] +zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_WORD:31 [ main::xw#0 atan2_16::x#0 ] +zp ZP_WORD:33 [ main::yw#0 atan2_16::y#0 ] +reg byte x [ main::ang_w#0 ] +reg byte x [ diff::bb1#0 ] reg byte a [ diff::bb2#0 ] reg byte a [ diff::return#0 ] reg byte a [ main::$14 ] reg byte a [ main::$15 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] -zp ZP_WORD:32 [ atan2_16::xd#0 ] -zp ZP_WORD:34 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] -zp ZP_BYTE:36 [ init_font_hex::$0 ] +zp ZP_BYTE:35 [ 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 ] diff --git a/src/test/ref/cordic-atan2-16.asm b/src/test/ref/cordic-atan2-16.asm index 7aa86730d..1fd3b496d 100644 --- a/src/test/ref/cordic-atan2-16.asm +++ b/src/test/ref/cordic-atan2-16.asm @@ -13,10 +13,11 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label _11 = $a - .label xw = $15 - .label yw = $17 + .label xw = $19 + .label yw = $1b .label angle_w = $a - .label screen = 3 + .label screen = 4 + .label x = 3 .label y = 2 jsr init_font_hex lda #toD0181_return @@ -28,10 +29,11 @@ main: { lda #-$c sta y b1: - ldx #-$13 + lda #-$13 + sta x b2: + lda x ldy #0 - txa sta xw+1 sty xw lda y @@ -52,8 +54,9 @@ main: { bne !+ inc screen+1 !: - inx - cpx #$15 + inc x + lda #$15 + cmp x bne b2 inc y lda #$d @@ -69,19 +72,18 @@ main: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($15) x, signed word zeropage($17) y) +// atan2_16(signed word zeropage($19) x, signed word zeropage($1b) y) atan2_16: { - .label _2 = 5 - .label _7 = 7 - .label yi = 5 - .label xi = 7 - .label xd = $19 - .label yd = $1b + .label _2 = 6 + .label _7 = 8 + .label yi = 6 + .label xi = 8 .label angle = $a - .label i = 9 + .label xd = $e + .label yd = $c .label return = $a - .label x = $15 - .label y = $17 + .label x = $19 + .label y = $1b lda y+1 bmi !b1+ jmp b1 @@ -109,7 +111,7 @@ atan2_16: { lda #0 sta angle sta angle+1 - sta i + tax b10: lda yi+1 bne b11 @@ -140,38 +142,32 @@ atan2_16: { b8: rts b11: - ldy i + txa + tay lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - ldy i lda yi sta yd lda yi+1 sta yd+1 + b13: + cpy #1+1 + bcs b14 cpy #0 - beq !e+ - !: + beq b17 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: + b17: lda yi+1 - bpl b13 + bpl b18 lda xi sec sbc yd @@ -186,7 +182,7 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - lda i + txa asl tay sec @@ -196,15 +192,14 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - b14: - inc i - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + b19: + inx + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: jmp b10 - b13: + b18: lda xi clc adc yd @@ -219,7 +214,7 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - lda i + txa asl tay clc @@ -229,7 +224,27 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 + jmp b19 + b14: + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + dey + dey + jmp b13 b4: lda x sta xi @@ -244,15 +259,15 @@ atan2_16: { jmp b3 } // Make charset from proto chars -// init_font_hex(byte* zeropage($f) charset) +// init_font_hex(byte* zeropage($13) charset) init_font_hex: { .label _0 = $1d - .label idx = $14 - .label proto_lo = $11 - .label charset = $f - .label c1 = $13 - .label proto_hi = $c - .label c = $e + .label idx = $18 + .label proto_lo = $15 + .label charset = $13 + .label c1 = $17 + .label proto_hi = $10 + .label c = $12 lda #0 sta c lda #=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [30] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [31] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [31] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [32] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [32] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [32] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [32] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [32] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [32] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [32] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [32] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [33] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [34] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [34] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [35] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [38] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [38] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -92,74 +92,97 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [42] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [43] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [44] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [45] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [48] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [49] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [50] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [50] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [50] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [51] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [52] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [49] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [50] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [51] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [51] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [56] (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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [57] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [57] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [57] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [59] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [55] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [56] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [63] (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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [64] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [65] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [66] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [67] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [59] phi() + [69] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [60] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [60] (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 ) - [60] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [70] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [70] (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 ) + [70] (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 - [61] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [61] (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 ) - [61] (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 ) - [62] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [71] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [71] (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 ) + [71] (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 ) + [72] *((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 - [63] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [63] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [64] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [65] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [66] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [68] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [69] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [70] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [73] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [73] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [74] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [75] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [76] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [77] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [78] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [79] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [80] 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 - [71] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [72] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [73] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [74] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [75] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [76] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [77] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [81] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [82] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [83] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [84] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [85] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [86] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [87] 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 - [78] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [79] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [80] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [88] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [89] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [90] 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 - [81] return + [91] return to:@return diff --git a/src/test/ref/cordic-atan2-16.log b/src/test/ref/cordic-atan2-16.log index 250cbe4b1..b6aea3411 100644 --- a/src/test/ref/cordic-atan2-16.log +++ b/src/test/ref/cordic-atan2-16.log @@ -2,6 +2,7 @@ Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET Culled Empty Block (label) init_font_hex::@6 @@ -9,10 +10,13 @@ Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 Culled Empty Block (label) atan2_16::@11 Culled Empty Block (label) atan2_16::@12 -Culled Empty Block (label) atan2_16::@20 +Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@29 Culled Empty Block (label) atan2_16::@21 +Culled Empty Block (label) atan2_16::@22 Culled Empty Block (label) atan2_16::@23 -Culled Empty Block (label) atan2_16::@24 +Culled Empty Block (label) atan2_16::@31 +Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 Culled Empty Block (label) @2 Culled Empty Block (label) @4 @@ -130,13 +134,13 @@ atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 to:atan2_16::@5 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#12 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#9 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#12 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#2 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$8 ← (signed word) atan2_16::x#2 to:atan2_16::@6 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#13 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#10 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#13 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#3 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$6 ← - (signed word) atan2_16::x#3 (signed word~) atan2_16::$7 ← (signed word~) atan2_16::$6 @@ -144,94 +148,156 @@ atan2_16::@5: scope:[atan2_16] from atan2_16::@3 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 (signed word) atan2_16::y#9 ← phi( atan2_16::@4/(signed word) atan2_16::y#12 atan2_16::@5/(signed word) atan2_16::y#13 ) (signed word) atan2_16::x#10 ← phi( atan2_16::@4/(signed word) atan2_16::x#2 atan2_16::@5/(signed word) atan2_16::x#3 ) - (signed word) atan2_16::yi#8 ← phi( atan2_16::@4/(signed word) atan2_16::yi#9 atan2_16::@5/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yi#9 ← phi( atan2_16::@4/(signed word) atan2_16::yi#12 atan2_16::@5/(signed word) atan2_16::yi#13 ) (signed word~) atan2_16::$9 ← phi( atan2_16::@4/(signed word~) atan2_16::$8 atan2_16::@5/(signed word~) atan2_16::$7 ) (signed word) atan2_16::xi#0 ← (signed word~) atan2_16::$9 (word) atan2_16::angle#0 ← (number) 0 (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 (byte) atan2_16::i#0 ← (byte) 0 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 - (signed word) atan2_16::y#7 ← phi( atan2_16::@19/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) - (signed word) atan2_16::x#7 ← phi( atan2_16::@19/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) - (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) - (byte) atan2_16::i#6 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) - (signed word) atan2_16::xi#6 ← phi( atan2_16::@19/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#8 ) +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + (signed word) atan2_16::y#7 ← phi( atan2_16::@27/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) + (signed word) atan2_16::x#7 ← phi( atan2_16::@27/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) + (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) + (byte) atan2_16::i#6 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) + (signed word) atan2_16::xi#6 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#9 ) (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 (bool~) atan2_16::$18 ← ! (bool~) atan2_16::$17 if((bool~) atan2_16::$18) goto atan2_16::@16 to:atan2_16::@17 atan2_16::@16: scope:[atan2_16] from atan2_16::@15 - (signed word) atan2_16::y#14 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) - (signed word) atan2_16::x#13 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) - (word) atan2_16::angle#14 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) - (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) + (signed word) atan2_16::y#19 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) + (signed word) atan2_16::x#17 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) + (word) atan2_16::angle#19 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) (byte) atan2_16::i#2 ← phi( atan2_16::@15/(byte) atan2_16::i#6 ) + (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) (signed word) atan2_16::xi#3 ← phi( atan2_16::@15/(signed word) atan2_16::xi#6 ) - (signed word~) atan2_16::$19 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - (signed word) atan2_16::xd#0 ← (signed word~) atan2_16::$19 - (signed word~) atan2_16::$20 ← (signed word) atan2_16::yi#4 >> (byte) atan2_16::i#2 - (signed word) atan2_16::yd#0 ← (signed word~) atan2_16::$20 - (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (number) 0 - if((bool~) atan2_16::$21) goto atan2_16::@18 - to:atan2_16::@22 -atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@19 - (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@19/(signed word) atan2_16::y#8 ) - (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@19/(signed word) atan2_16::x#8 ) - (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#4 + (byte) atan2_16::shift#0 ← (byte) atan2_16::i#2 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@27/(signed word) atan2_16::y#8 ) + (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@27/(signed word) atan2_16::x#8 ) + (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 (bool~) atan2_16::$11 ← ! (bool~) atan2_16::$10 if((bool~) atan2_16::$11) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + (signed word) atan2_16::y#18 ← phi( atan2_16::@16/(signed word) atan2_16::y#19 atan2_16::@19/(signed word) atan2_16::y#20 ) + (signed word) atan2_16::x#16 ← phi( atan2_16::@16/(signed word) atan2_16::x#17 atan2_16::@19/(signed word) atan2_16::x#18 ) + (word) atan2_16::angle#18 ← phi( atan2_16::@16/(word) atan2_16::angle#19 atan2_16::@19/(word) atan2_16::angle#20 ) + (byte) atan2_16::i#10 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::i#11 ) + (signed word) atan2_16::xi#11 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xi#12 ) + (signed word) atan2_16::yi#14 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 atan2_16::@19/(signed word) atan2_16::yi#15 ) + (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 + if((bool~) atan2_16::$19) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#20 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#18 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#20 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#11 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#12 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yi#15 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#3 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (signed word) atan2_16::yd#3 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#3 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 + (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 + (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#16 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#14 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#16 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#8 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#9 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yd#8 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#8 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::yi#10 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#4 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 + (bool~) atan2_16::$20 ← ! (bool~) atan2_16::$25 + if((bool~) atan2_16::$20) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + (signed word) atan2_16::y#14 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 atan2_16::@24/(signed word) atan2_16::y#17 ) + (signed word) atan2_16::x#13 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 atan2_16::@24/(signed word) atan2_16::x#15 ) + (word) atan2_16::angle#14 ← phi( atan2_16::@20/(word) atan2_16::angle#16 atan2_16::@24/(word) atan2_16::angle#17 ) + (byte) atan2_16::i#7 ← phi( atan2_16::@20/(byte) atan2_16::i#8 atan2_16::@24/(byte) atan2_16::i#9 ) + (signed word) atan2_16::xd#9 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 atan2_16::@24/(signed word) atan2_16::xd#2 ) + (signed word) atan2_16::yd#9 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 atan2_16::@24/(signed word) atan2_16::yd#2 ) + (signed word) atan2_16::xi#7 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 atan2_16::@24/(signed word) atan2_16::xi#10 ) + (signed word) atan2_16::yi#5 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 atan2_16::@24/(signed word) atan2_16::yi#11 ) + (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 + if((bool~) atan2_16::$21) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + (signed word) atan2_16::y#17 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 ) + (signed word) atan2_16::x#15 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 ) + (word) atan2_16::angle#17 ← phi( atan2_16::@20/(word) atan2_16::angle#16 ) + (byte) atan2_16::i#9 ← phi( atan2_16::@20/(byte) atan2_16::i#8 ) + (signed word) atan2_16::xi#10 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 ) + (signed word) atan2_16::yi#11 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yd#4 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 ) + (signed word) atan2_16::xd#4 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 ) + (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 + (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 to:atan2_16::@25 -atan2_16::@18: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#10 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#11 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#7 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#3 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#1 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#5 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#1 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#4 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#1 - (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#5 - (signed word) atan2_16::xd#1 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#10 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#11 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#7 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#3 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#5 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#6 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#5 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#4 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#5 + (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#6 - (signed word) atan2_16::xd#5 (byte~) atan2_16::$23 ← (byte) atan2_16::i#3 * (const byte) SIZEOF_WORD (word) atan2_16::angle#2 ← (word) atan2_16::angle#7 + *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) - to:atan2_16::@19 -atan2_16::@22: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#11 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#12 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#8 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#4 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#2 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#6 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#2 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#5 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#2 - (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#6 + (signed word) atan2_16::xd#2 + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#11 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#12 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#8 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#4 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#6 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#7 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#6 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#5 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#6 + (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#7 + (signed word) atan2_16::xd#6 (byte~) atan2_16::$24 ← (byte) atan2_16::i#4 * (const byte) SIZEOF_WORD (word) atan2_16::angle#3 ← (word) atan2_16::angle#8 - *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) - to:atan2_16::@19 -atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@22 - (signed word) atan2_16::y#8 ← phi( atan2_16::@18/(signed word) atan2_16::y#10 atan2_16::@22/(signed word) atan2_16::y#11 ) - (signed word) atan2_16::xi#7 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@22/(signed word) atan2_16::xi#2 ) - (signed word) atan2_16::x#8 ← phi( atan2_16::@18/(signed word) atan2_16::x#11 atan2_16::@22/(signed word) atan2_16::x#12 ) - (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@22/(word) atan2_16::angle#3 ) - (signed word) atan2_16::yi#7 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@22/(signed word) atan2_16::yi#2 ) - (byte) atan2_16::i#5 ← phi( atan2_16::@18/(byte) atan2_16::i#3 atan2_16::@22/(byte) atan2_16::i#4 ) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + (signed word) atan2_16::y#8 ← phi( atan2_16::@26/(signed word) atan2_16::y#10 atan2_16::@30/(signed word) atan2_16::y#11 ) + (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + (signed word) atan2_16::x#8 ← phi( atan2_16::@26/(signed word) atan2_16::x#11 atan2_16::@30/(signed word) atan2_16::x#12 ) + (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + (byte) atan2_16::i#5 ← phi( atan2_16::@26/(byte) atan2_16::i#3 atan2_16::@30/(byte) atan2_16::i#4 ) (byte) atan2_16::i#1 ← (byte) atan2_16::i#5 + rangenext(0,atan2_16::$16) (bool~) atan2_16::$22 ← (byte) atan2_16::i#1 != rangelast(0,atan2_16::$16) if((bool~) atan2_16::$22) goto atan2_16::@15 to:atan2_16::@17 -atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@25 - (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@25/(word) atan2_16::angle#4 ) - (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@25/(signed word) atan2_16::y#6 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@33/(signed word) atan2_16::y#6 ) (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 (bool~) atan2_16::$14 ← ! (bool~) atan2_16::$13 if((bool~) atan2_16::$14) goto atan2_16::@8 to:atan2_16::@13 -atan2_16::@25: scope:[atan2_16] from atan2_16::@17 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 (signed word) atan2_16::y#6 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 ) (word) atan2_16::angle#9 ← phi( atan2_16::@17/(word) atan2_16::angle#1 ) (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 @@ -395,13 +461,14 @@ SYMBOL TABLE SSA (number~) atan2_16::$16 (bool~) atan2_16::$17 (bool~) atan2_16::$18 -(signed word~) atan2_16::$19 +(bool~) atan2_16::$19 (signed word~) atan2_16::$2 -(signed word~) atan2_16::$20 +(bool~) atan2_16::$20 (bool~) atan2_16::$21 (bool~) atan2_16::$22 (byte~) atan2_16::$23 (byte~) atan2_16::$24 +(bool~) atan2_16::$25 (signed word~) atan2_16::$3 (signed word~) atan2_16::$4 (bool~) atan2_16::$5 @@ -417,9 +484,14 @@ SYMBOL TABLE SSA (label) atan2_16::@18 (label) atan2_16::@19 (label) atan2_16::@2 -(label) atan2_16::@22 +(label) atan2_16::@20 +(label) atan2_16::@24 (label) atan2_16::@25 +(label) atan2_16::@26 +(label) atan2_16::@27 (label) atan2_16::@3 +(label) atan2_16::@30 +(label) atan2_16::@33 (label) atan2_16::@4 (label) atan2_16::@5 (label) atan2_16::@6 @@ -435,7 +507,12 @@ SYMBOL TABLE SSA (word) atan2_16::angle#13 (word) atan2_16::angle#14 (word) atan2_16::angle#15 +(word) atan2_16::angle#16 +(word) atan2_16::angle#17 +(word) atan2_16::angle#18 +(word) atan2_16::angle#19 (word) atan2_16::angle#2 +(word) atan2_16::angle#20 (word) atan2_16::angle#3 (word) atan2_16::angle#4 (word) atan2_16::angle#5 @@ -446,17 +523,28 @@ SYMBOL TABLE SSA (byte) atan2_16::i (byte) atan2_16::i#0 (byte) atan2_16::i#1 +(byte) atan2_16::i#10 +(byte) atan2_16::i#11 (byte) atan2_16::i#2 (byte) atan2_16::i#3 (byte) atan2_16::i#4 (byte) atan2_16::i#5 (byte) atan2_16::i#6 +(byte) atan2_16::i#7 +(byte) atan2_16::i#8 +(byte) atan2_16::i#9 (word) atan2_16::return (word) atan2_16::return#0 (word) atan2_16::return#1 (word) atan2_16::return#2 (word) atan2_16::return#3 (word) atan2_16::return#4 +(byte) atan2_16::shift +(byte) atan2_16::shift#0 +(byte) atan2_16::shift#1 +(byte) atan2_16::shift#2 +(byte) atan2_16::shift#3 +(byte) atan2_16::shift#4 (signed word) atan2_16::x (signed word) atan2_16::x#0 (signed word) atan2_16::x#1 @@ -464,6 +552,11 @@ SYMBOL TABLE SSA (signed word) atan2_16::x#11 (signed word) atan2_16::x#12 (signed word) atan2_16::x#13 +(signed word) atan2_16::x#14 +(signed word) atan2_16::x#15 +(signed word) atan2_16::x#16 +(signed word) atan2_16::x#17 +(signed word) atan2_16::x#18 (signed word) atan2_16::x#2 (signed word) atan2_16::x#3 (signed word) atan2_16::x#4 @@ -476,15 +569,27 @@ SYMBOL TABLE SSA (signed word) atan2_16::xd#0 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 +(signed word) atan2_16::xd#3 +(signed word) atan2_16::xd#4 +(signed word) atan2_16::xd#5 +(signed word) atan2_16::xd#6 +(signed word) atan2_16::xd#7 +(signed word) atan2_16::xd#8 +(signed word) atan2_16::xd#9 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 (signed word) atan2_16::xi#1 +(signed word) atan2_16::xi#10 +(signed word) atan2_16::xi#11 +(signed word) atan2_16::xi#12 (signed word) atan2_16::xi#2 (signed word) atan2_16::xi#3 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#7 +(signed word) atan2_16::xi#8 +(signed word) atan2_16::xi#9 (signed word) atan2_16::y (signed word) atan2_16::y#0 (signed word) atan2_16::y#1 @@ -494,7 +599,12 @@ SYMBOL TABLE SSA (signed word) atan2_16::y#13 (signed word) atan2_16::y#14 (signed word) atan2_16::y#15 +(signed word) atan2_16::y#16 +(signed word) atan2_16::y#17 +(signed word) atan2_16::y#18 +(signed word) atan2_16::y#19 (signed word) atan2_16::y#2 +(signed word) atan2_16::y#20 (signed word) atan2_16::y#3 (signed word) atan2_16::y#4 (signed word) atan2_16::y#5 @@ -506,10 +616,22 @@ SYMBOL TABLE SSA (signed word) atan2_16::yd#0 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +(signed word) atan2_16::yd#3 +(signed word) atan2_16::yd#4 +(signed word) atan2_16::yd#5 +(signed word) atan2_16::yd#6 +(signed word) atan2_16::yd#7 +(signed word) atan2_16::yd#8 +(signed word) atan2_16::yd#9 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 (signed word) atan2_16::yi#1 (signed word) atan2_16::yi#10 +(signed word) atan2_16::yi#11 +(signed word) atan2_16::yi#12 +(signed word) atan2_16::yi#13 +(signed word) atan2_16::yi#14 +(signed word) atan2_16::yi#15 (signed word) atan2_16::yi#2 (signed word) atan2_16::yi#3 (signed word) atan2_16::yi#4 @@ -687,9 +809,16 @@ Adding number conversion cast (unumber) 0 in (word) atan2_16::angle#0 ← (numbe Adding number conversion cast (unumber) 1 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (unumber)(number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 -Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (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 (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 +Adding number conversion cast (unumber) 0 in (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 Adding number conversion cast (unumber) $8000 in (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 Adding number conversion cast (unumber) atan2_16::$12 in (number~) atan2_16::$12 ← (unumber)(number) $8000 - (word) atan2_16::angle#9 @@ -823,9 +952,16 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 -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 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast $8000 Simplifying constant pointer cast (byte*) 53272 @@ -858,9 +994,16 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 -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 signed number type (signed byte) 2 +Finalized signed number type (signed byte) 2 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (word) $8000 Finalized unsigned number type (word) $3fff @@ -881,8 +1024,9 @@ Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main: Inferred type updated to word in (unumber~) main::$11 ← (word) main::angle_w#0 + (byte) $80 Inferred type updated to byte in (unumber~) main::$12 ← > (word~) main::$11 Inversing boolean not [63] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [62] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 -Inversing boolean not [75] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [74] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 -Inversing boolean not [93] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [92] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 +Inversing boolean not [72] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [71] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 +Inversing boolean not [83] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [82] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 +Inversing boolean not [107] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [106] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 Successful SSA optimization Pass2UnaryNotSimplification 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 @@ -894,19 +1038,34 @@ Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#2 (signed word~) atan2_16::$3 (signed word) atan2_16::y#3 Alias (signed word) atan2_16::x#5 = (signed word) atan2_16::x#9 (signed word) atan2_16::x#6 Alias (signed word~) atan2_16::$2 = (signed word~) atan2_16::$1 -Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#9 (signed word) atan2_16::yi#10 +Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#12 (signed word) atan2_16::yi#13 Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#2 (signed word~) atan2_16::$8 (signed word) atan2_16::x#3 Alias (signed word) atan2_16::y#12 = (signed word) atan2_16::y#15 (signed word) atan2_16::y#13 Alias (signed word~) atan2_16::$7 = (signed word~) atan2_16::$6 Alias (signed word) atan2_16::xi#0 = (signed word~) atan2_16::$9 -Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::i#3 (byte) atan2_16::i#4 -Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yi#5 (signed word) atan2_16::yi#6 -Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#14 (word) atan2_16::angle#7 (word) atan2_16::angle#8 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#7 (signed word) atan2_16::x#12 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#7 (signed word) atan2_16::y#11 -Alias (signed word) atan2_16::xd#0 = (signed word~) atan2_16::$19 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 -Alias (signed word) atan2_16::yd#0 = (signed word~) atan2_16::$20 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xd#0 +Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yd#0 +Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::shift#0 +Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#19 +Alias (signed word) atan2_16::x#17 = (signed word) atan2_16::x#7 +Alias (signed word) atan2_16::y#19 = (signed word) atan2_16::y#7 +Alias (signed word) atan2_16::xd#3 = (signed word) atan2_16::xd#7 (signed word) atan2_16::xd#8 (signed word) atan2_16::xd#4 +Alias (signed word) atan2_16::yd#3 = (signed word) atan2_16::yd#7 (signed word) atan2_16::yd#8 (signed word) atan2_16::yd#4 +Alias (byte) atan2_16::shift#2 = (byte) atan2_16::shift#3 (byte) atan2_16::shift#4 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#15 (signed word) atan2_16::yi#14 (signed word) atan2_16::yi#11 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#12 (signed word) atan2_16::xi#11 (signed word) atan2_16::xi#9 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#11 (byte) atan2_16::i#8 (byte) atan2_16::i#9 +Alias (word) atan2_16::angle#16 = (word) atan2_16::angle#20 (word) atan2_16::angle#18 (word) atan2_16::angle#17 +Alias (signed word) atan2_16::x#14 = (signed word) atan2_16::x#18 (signed word) atan2_16::x#16 (signed word) atan2_16::x#15 +Alias (signed word) atan2_16::y#16 = (signed word) atan2_16::y#20 (signed word) atan2_16::y#18 (signed word) atan2_16::y#17 +Alias (signed word) atan2_16::xi#4 = (signed word) atan2_16::xi#7 (signed word) atan2_16::xi#5 +Alias (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#9 (signed word) atan2_16::yd#6 +Alias (signed word) atan2_16::yi#5 = (signed word) atan2_16::yi#6 (signed word) atan2_16::yi#7 +Alias (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#9 (signed word) atan2_16::xd#6 +Alias (byte) atan2_16::i#3 = (byte) atan2_16::i#7 (byte) atan2_16::i#4 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#7 (word) atan2_16::angle#8 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#12 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#11 Alias (word) atan2_16::angle#1 = (word) atan2_16::angle#9 Alias (signed word) atan2_16::y#5 = (signed word) atan2_16::y#6 Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 @@ -932,20 +1091,24 @@ Alias (byte*) main::col00#1 = (byte*) main::col00#2 Successful SSA optimization Pass2AliasElimination Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#5 (signed word) atan2_16::x#10 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#12 (signed word) atan2_16::y#9 -Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#8 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#5 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#8 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#8 +Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#9 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#5 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#4 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#3 (byte) atan2_16::i#5 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 Successful SSA optimization Pass2AliasElimination -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#4 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#4 -Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte*) init_font_hex::proto_hi#2 Self Phi Eliminated (byte*) init_font_hex::proto_lo#2 Self Phi Eliminated (byte*) init_font_hex::charset#3 Self Phi Eliminated (byte) init_font_hex::c1#2 Self Phi Eliminated (byte) init_font_hex::c#2 +Self Phi Eliminated (signed word) atan2_16::yi#10 +Self Phi Eliminated (signed word) atan2_16::xi#10 +Self Phi Eliminated (byte) atan2_16::i#10 +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 (signed byte) main::y#2 @@ -959,25 +1122,34 @@ 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 (signed word) atan2_16::y#1 (signed word) atan2_16::y#0 Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0 -Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#1 -Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#1 +Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3 +Identical Phi Values (signed word) atan2_16::xi#10 (signed word) atan2_16::xi#3 +Identical Phi Values (byte) atan2_16::i#10 (byte) atan2_16::i#2 +Identical Phi Values (word) atan2_16::angle#14 (word) atan2_16::angle#12 +Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19 Identical Phi Values (signed byte) main::y#2 (signed byte) main::y#4 Identical Phi Values (byte*) main::col00#1 (byte*) main::col00#0 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 +Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 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::$21 [71] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -Simple Condition (bool~) atan2_16::$11 [76] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$22 [90] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [94] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$13 [159] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 -Simple Condition (bool~) main::$14 [163] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 +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::$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 +Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$13 [173] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 +Simple Condition (bool~) main::$14 [177] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [90] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 +Negating conditional jump and destination [104] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [36] (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 @@ -1006,10 +1178,10 @@ Constant (const byte*) main::toD0181_screen#0 = SCREEN#0 Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 Constant (const byte*) main::screen#0 = SCREEN#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (word)main::toD0181_screen#0 in [115] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [119] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (word)main::toD0181_screen#0 in [129] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [133] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [168] if(true) goto main::@6 +if() condition always true - replacing block destination [182] if(true) goto main::@6 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 @@ -1017,47 +1189,57 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 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 [157] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [159] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 -Resolved ranged next value [161] main::y#1 ← ++ main::y#4 to ++ -Resolved ranged comparison value [163] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d -Converting *(pointer+n) to pointer[n] [170] *((byte*) main::col00#0) ← ++ *((byte*) main::col00#0) -- *(main::$2 + $13) -Converting *(pointer+n) to pointer[n] [170] *((byte*) main::col00#0) ← ++ *((byte*~) main::$2 + (byte) $13) -- *(main::$2 + $13) +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 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 Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 -Eliminating unused variable (byte*) main::col00#0 and assignment [89] (byte*) main::col00#0 ← (byte*~) main::$2 + (byte) $13 +Eliminating unused variable (byte*) main::col00#0 and assignment [96] (byte*) main::col00#0 ← (byte*~) main::$2 + (byte) $13 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return 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 Self Phi Eliminated (byte*) init_font_hex::proto_hi#4 Self Phi Eliminated (byte) init_font_hex::c#5 +Self Phi Eliminated (signed word) atan2_16::x#17 +Self Phi Eliminated (signed word) atan2_16::y#19 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 (signed word) atan2_16::x#17 (signed word) atan2_16::x#0 +Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 Constant right-side identified [29] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 -Constant right-side identified [87] (byte*~) main::$2 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28 +Constant right-side identified [94] (byte*~) main::$2 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0 Constant (const byte) atan2_16::$16 = CORDIC_ITERATIONS_16#0-1 @@ -1065,8 +1247,8 @@ 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 byte*) main::$2 = COLS#0+(word)$c*$28 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [47] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [48] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 +Resolved ranged next value [54] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [55] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 Adding number conversion cast (unumber) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 Adding number conversion cast (unumber) 1 in if((byte) atan2_16::i#1==(unumber)(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 Successful SSA optimization PassNAddNumberTypeConversions @@ -1075,37 +1257,37 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [54] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [57] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [61] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [64] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [54] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [56] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [61] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [63] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$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 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [54] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [55] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [61] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [62] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$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 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [54] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [61] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [57] (byte~) main::$4 ← (byte)(signed byte) main::x#2 keeping main::x#2 -Inlining Noop Cast [60] (byte~) main::$7 ← (byte)(signed byte) main::y#4 keeping main::y#4 +Inlining Noop Cast [64] (byte~) main::$4 ← (byte)(signed byte) main::x#2 keeping main::x#2 +Inlining Noop Cast [67] (byte~) main::$7 ← (byte)(signed byte) main::y#4 keeping main::y#4 Successful SSA optimization Pass2NopCastInlining -Inlining Noop Cast [59] (signed word) main::xw#0 ← (signed word)(word~) main::$5 keeping main::xw#0 -Inlining Noop Cast [62] (signed word) main::yw#0 ← (signed word)(word~) main::$8 keeping main::yw#0 +Inlining Noop Cast [66] (signed word) main::xw#0 ← (signed word)(word~) main::$5 keeping main::xw#0 +Inlining Noop Cast [69] (signed word) main::yw#0 ← (signed word)(word~) main::$8 keeping main::yw#0 Successful SSA optimization Pass2NopCastInlining -Rewriting division to use shift [34] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 -Rewriting multiplication to use shift [38] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [42] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting division to use shift [31] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 +Rewriting multiplication to use shift [45] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [49] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) init_font_hex::c#0 Inlining constant with var siblings (const byte) init_font_hex::c1#0 @@ -1156,11 +1338,12 @@ Successful SSA optimization PassNEliminateUnusedVars Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2) Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3) -Added new block during phi lifting atan2_16::@26(between atan2_16::@19 and atan2_16::@15) -Added new block during phi lifting atan2_16::@27(between atan2_16::@15 and atan2_16::@17) -Added new block during phi lifting atan2_16::@28(between atan2_16::@19 and atan2_16::@17) -Added new block during phi lifting atan2_16::@29(between atan2_16::@17 and atan2_16::@7) -Added new block during phi lifting atan2_16::@30(between atan2_16::@7 and atan2_16::@8) +Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) +Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) +Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) +Added new block during phi lifting atan2_16::@37(between atan2_16::@20 and atan2_16::@25) +Added new block during phi lifting atan2_16::@38(between atan2_16::@17 and atan2_16::@7) +Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_16::@8) Added new block during phi lifting main::@14(between main::@3 and main::@1) Added new block during phi lifting main::@15(between main::@13 and main::@2) Adding NOP phi() at start of @begin @@ -1181,44 +1364,54 @@ CALL GRAPH Calls in [] to main:5 Calls in [main] to init_font_hex:9 atan2_16:21 -Created 24 initial phi equivalence classes +Created 29 initial phi equivalence classes Coalesced [15] main::screen#7 ← main::screen#4 Coalesced [35] main::y#6 ← main::y#1 Coalesced [36] main::screen#6 ← main::screen#1 Coalesced [37] main::x#4 ← main::x#1 Coalesced (already) [38] main::screen#8 ← main::screen#1 -Coalesced [41] atan2_16::yi#12 ← atan2_16::$2 -Coalesced [45] atan2_16::xi#9 ← atan2_16::$7 -Coalesced [47] atan2_16::yi#14 ← atan2_16::yi#0 -Coalesced [48] atan2_16::xi#11 ← atan2_16::xi#0 -Coalesced [51] atan2_16::angle#17 ← atan2_16::angle#12 -Coalesced [56] atan2_16::angle#22 ← atan2_16::angle#4 +Coalesced [41] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [45] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [47] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [48] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [51] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [56] atan2_16::angle#27 ← atan2_16::angle#4 Coalesced [60] atan2_16::return#5 ← atan2_16::angle#5 Coalesced [63] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [64] atan2_16::angle#21 ← atan2_16::angle#1 -Coalesced [72] atan2_16::yi#16 ← atan2_16::yi#2 -Coalesced [73] atan2_16::angle#20 ← atan2_16::angle#3 -Coalesced [74] atan2_16::xi#13 ← atan2_16::xi#2 -Coalesced [78] atan2_16::yi#13 ← atan2_16::yi#7 -Coalesced [79] atan2_16::xi#10 ← atan2_16::xi#7 -Coalesced [80] atan2_16::i#7 ← atan2_16::i#1 -Coalesced [81] atan2_16::angle#16 ← atan2_16::angle#13 -Coalesced (already) [82] atan2_16::angle#18 ← atan2_16::angle#13 -Coalesced [87] atan2_16::yi#15 ← atan2_16::yi#1 -Coalesced [88] atan2_16::angle#19 ← atan2_16::angle#2 -Coalesced [89] atan2_16::xi#12 ← atan2_16::xi#1 -Not coalescing [90] atan2_16::xi#8 ← atan2_16::x#0 -Not coalescing [91] atan2_16::yi#11 ← atan2_16::y#0 -Coalesced [94] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [116] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [117] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [118] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [119] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [120] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [121] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [122] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [123] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 17 phi equivalence classes +Coalesced [64] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [65] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [66] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [67] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [73] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [74] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [81] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [82] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [83] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [87] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [88] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [89] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [90] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [91] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [96] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [97] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [98] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [99] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [100] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [104] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [105] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [106] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [107] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [108] atan2_16::yi#16 ← atan2_16::y#0 +Coalesced [111] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [133] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [134] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [135] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [136] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [137] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [138] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [139] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [140] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced down to 20 phi equivalence classes Culled Empty Block (label) @1 Culled Empty Block (label) @3 Culled Empty Block (label) @7 @@ -1229,11 +1422,12 @@ Culled Empty Block (label) main::@4 Culled Empty Block (label) main::@5 Culled Empty Block (label) main::@14 Culled Empty Block (label) main::@15 -Culled Empty Block (label) atan2_16::@27 -Culled Empty Block (label) atan2_16::@30 -Culled Empty Block (label) atan2_16::@29 -Culled Empty Block (label) atan2_16::@26 -Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@35 +Culled Empty Block (label) atan2_16::@39 +Culled Empty Block (label) atan2_16::@38 +Culled Empty Block (label) atan2_16::@34 +Culled Empty Block (label) atan2_16::@36 +Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 @@ -1244,8 +1438,13 @@ Renumbering block atan2_16::@16 to atan2_16::@11 Renumbering block atan2_16::@17 to atan2_16::@12 Renumbering block atan2_16::@18 to atan2_16::@13 Renumbering block atan2_16::@19 to atan2_16::@14 -Renumbering block atan2_16::@22 to atan2_16::@15 -Renumbering block atan2_16::@25 to atan2_16::@16 +Renumbering block atan2_16::@20 to atan2_16::@15 +Renumbering block atan2_16::@24 to atan2_16::@16 +Renumbering block atan2_16::@25 to atan2_16::@17 +Renumbering block atan2_16::@26 to atan2_16::@18 +Renumbering block atan2_16::@27 to atan2_16::@19 +Renumbering block atan2_16::@30 to atan2_16::@20 +Renumbering block atan2_16::@33 to atan2_16::@21 Renumbering block main::@6 to main::@4 Renumbering block main::@11 to main::@5 Renumbering block main::@13 to main::@6 @@ -1313,32 +1512,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16 [27] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 to:atan2_16::@3 atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 - [28] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) + [28] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) [29] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [30] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [31] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [31] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [32] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [32] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [32] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [32] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [32] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [32] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [32] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [32] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [33] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [34] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [34] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [35] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [38] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [38] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -1351,76 +1550,99 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [42] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [43] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [44] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [45] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [48] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [49] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [50] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [50] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [50] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [51] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [52] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [49] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [50] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [51] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [51] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [56] (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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [57] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [57] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [57] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [59] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [55] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [56] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [63] (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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [64] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [65] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [66] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [67] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [59] phi() + [69] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [60] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [60] (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 ) - [60] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [70] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [70] (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 ) + [70] (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 - [61] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [61] (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 ) - [61] (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 ) - [62] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [71] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [71] (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 ) + [71] (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 ) + [72] *((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 - [63] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [63] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [64] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [65] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [66] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [68] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [69] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [70] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [73] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [73] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [74] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [75] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [76] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [77] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [78] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [79] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [80] 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 - [71] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [72] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [73] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [74] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [75] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [76] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [77] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [81] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [82] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [83] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [84] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [85] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [86] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [87] 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 - [78] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [79] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [80] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [88] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [89] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [90] 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 - [81] return + [91] return to:@return @@ -1440,7 +1662,7 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle (word) atan2_16::angle#1 3.0 (word) atan2_16::angle#11 4.0 -(word) atan2_16::angle#12 364.0 +(word) atan2_16::angle#12 190.66666666666666 (word) atan2_16::angle#13 1334.6666666666667 (word) atan2_16::angle#2 2002.0 (word) atan2_16::angle#3 2002.0 @@ -1449,32 +1671,44 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle#6 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 1501.5 -(byte) atan2_16::i#2 429.0 +(byte) atan2_16::i#2 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 34.99999999999999 (word) atan2_16::return#2 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 20002.0 +(byte) atan2_16::shift#2 8001.25 +(byte~) atan2_16::shift#5 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 3.8928571428571437 +(signed word) atan2_16::x#0 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 600.5999999999999 +(signed word) atan2_16::xd#1 6667.333333333333 +(signed word~) atan2_16::xd#10 1001.0 +(signed word) atan2_16::xd#2 1001.0 +(signed word) atan2_16::xd#3 7668.333333333332 +(signed word) atan2_16::xd#5 1001.0 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 6.0 (signed word) atan2_16::xi#1 500.5 +(signed word~) atan2_16::xi#13 4.0 (signed word) atan2_16::xi#2 500.5 -(signed word) atan2_16::xi#3 801.2 -(signed word) atan2_16::xi#7 1001.0 -(signed word~) atan2_16::xi#8 4.0 +(signed word) atan2_16::xi#3 267.0666666666667 +(signed word) atan2_16::xi#8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 3.633333333333334 +(signed word) atan2_16::y#0 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 1501.5 +(signed word) atan2_16::yd#1 10001.0 +(signed word~) atan2_16::yd#10 2002.0 +(signed word) atan2_16::yd#2 2002.0 +(signed word) atan2_16::yd#3 4601.0 +(signed word) atan2_16::yd#5 2002.0 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 1.2000000000000002 (signed word) atan2_16::yi#1 667.3333333333334 -(signed word~) atan2_16::yi#11 4.0 +(signed word~) atan2_16::yi#16 4.0 (signed word) atan2_16::yi#2 667.3333333333334 -(signed word) atan2_16::yi#3 858.2857142857142 -(signed word) atan2_16::yi#7 1001.0 +(signed word) atan2_16::yi#3 353.4117647058823 +(signed word) atan2_16::yi#8 1001.0 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 1001.0 (byte~) init_font_hex::$1 2002.0 @@ -1540,11 +1774,14 @@ Initial phi equivalence classes [ main::y#4 main::y#1 ] [ main::x#2 main::x#1 ] [ main::screen#2 main::screen#4 main::screen#1 ] -[ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -1560,8 +1797,6 @@ Added variable atan2_16::return#2 to zero page equivalence class [ atan2_16::ret Added variable main::angle_w#0 to zero page equivalence class [ main::angle_w#0 ] Added variable main::$11 to zero page equivalence class [ main::$11 ] Added variable main::ang_w#0 to zero page equivalence class [ main::ang_w#0 ] -Added variable atan2_16::xd#0 to zero page equivalence class [ atan2_16::xd#0 ] -Added variable atan2_16::yd#0 to zero page equivalence class [ atan2_16::yd#0 ] Added variable atan2_16::$24 to zero page equivalence class [ atan2_16::$24 ] Added variable atan2_16::$23 to zero page equivalence class [ atan2_16::$23 ] Added variable init_font_hex::$0 to zero page equivalence class [ init_font_hex::$0 ] @@ -1572,11 +1807,14 @@ Complete equivalence classes [ main::y#4 main::y#1 ] [ main::x#2 main::x#1 ] [ main::screen#2 main::screen#4 main::screen#1 ] -[ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -1592,8 +1830,6 @@ Complete equivalence classes [ main::angle_w#0 ] [ main::$11 ] [ main::ang_w#0 ] -[ atan2_16::xd#0 ] -[ atan2_16::yd#0 ] [ atan2_16::$24 ] [ atan2_16::$23 ] [ init_font_hex::$0 ] @@ -1603,34 +1839,35 @@ Complete equivalence classes Allocated zp ZP_BYTE:2 [ main::y#4 main::y#1 ] Allocated zp ZP_BYTE:3 [ main::x#2 main::x#1 ] Allocated zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] -Allocated zp ZP_WORD:6 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated zp ZP_WORD:8 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated zp ZP_WORD:6 [ 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 ] +Allocated zp ZP_WORD:8 [ 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 ] Allocated zp ZP_BYTE:10 [ atan2_16::i#2 atan2_16::i#1 ] Allocated zp ZP_WORD:11 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] Allocated zp ZP_WORD:13 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] -Allocated zp ZP_WORD:15 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:17 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:18 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:20 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:23 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_WORD:25 [ main::xw#0 ] -Allocated zp ZP_WORD:27 [ main::yw#0 ] -Allocated zp ZP_WORD:29 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:31 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:33 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:35 [ main::angle_w#0 ] -Allocated zp ZP_WORD:37 [ main::$11 ] -Allocated zp ZP_BYTE:39 [ main::ang_w#0 ] -Allocated zp ZP_WORD:40 [ atan2_16::xd#0 ] -Allocated zp ZP_WORD:42 [ atan2_16::yd#0 ] -Allocated zp ZP_BYTE:44 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:45 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:46 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:47 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:48 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:49 [ init_font_hex::idx#3 ] +Allocated zp ZP_BYTE:15 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Allocated zp ZP_WORD:16 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated zp ZP_WORD:18 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated zp ZP_BYTE:28 [ init_font_hex::i#2 init_font_hex::i#1 ] +Allocated zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated zp ZP_WORD:30 [ main::xw#0 ] +Allocated zp ZP_WORD:32 [ main::yw#0 ] +Allocated zp ZP_WORD:34 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:36 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:38 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:40 [ main::angle_w#0 ] +Allocated zp ZP_WORD:42 [ main::$11 ] +Allocated zp ZP_BYTE:44 [ main::ang_w#0 ] +Allocated zp ZP_BYTE:45 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:46 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:47 [ init_font_hex::$0 ] +Allocated zp ZP_BYTE:48 [ init_font_hex::$1 ] +Allocated zp ZP_BYTE:49 [ init_font_hex::$2 ] +Allocated zp ZP_BYTE:50 [ init_font_hex::idx#3 ] INITIAL ASM //SEG0 File Comments @@ -1667,16 +1904,16 @@ bend: //SEG10 main main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f - .label _11 = $25 - .label xw = $19 - .label yw = $1b - .label angle_w = $23 - .label ang_w = $27 + .label _11 = $2a + .label xw = $1e + .label yw = $20 + .label angle_w = $28 + .label ang_w = $2c .label screen = 4 .label x = 3 .label y = 2 //SEG11 [5] call init_font_hex - //SEG12 [59] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [69] 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] @@ -1806,24 +2043,25 @@ main: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($1d) x, signed word zeropage($1f) y) +// atan2_16(signed word zeropage($22) x, signed word zeropage($24) y) atan2_16: { .label _2 = 6 .label _7 = 8 - .label _23 = $2d - .label _24 = $2c + .label _23 = $2e + .label _24 = $2d .label yi = 6 .label xi = 8 - .label xd = $28 - .label yd = $2a .label angle = $d + .label xd = $12 + .label yd = $10 + .label shift = $f .label angle_2 = $b .label angle_3 = $b .label i = $a .label return = $d - .label x = $1d - .label y = $1f - .label return_2 = $21 + .label x = $22 + .label y = $24 + .label return_2 = $26 .label angle_6 = $b .label angle_12 = $b .label angle_13 = $b @@ -1844,7 +2082,7 @@ atan2_16: { //SEG54 [28] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG55 [28] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG55 [28] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG56 atan2_16::@3 b3: @@ -1865,7 +2103,7 @@ atan2_16: { //SEG60 [31] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG61 [31] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG61 [31] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG62 atan2_16::@6 b6: @@ -1889,10 +2127,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG70 [34] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG70 [34] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG71 [34] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG71 [34] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG72 atan2_16::@12 b12: @@ -1906,9 +2144,9 @@ atan2_16: { //SEG74 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG75 atan2_16::@16 - b16: + jmp b21 + //SEG75 atan2_16::@21 + b21: //SEG76 [37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -1917,10 +2155,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG77 [38] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG77 [38] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG78 [38] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG78 [38] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG79 atan2_16::@7 b7: @@ -1952,45 +2190,67 @@ atan2_16: { rts //SEG88 atan2_16::@11 b11: - //SEG89 [43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG89 [43] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuz1=vbuz2 + lda i + sta shift + //SEG90 [44] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG90 [44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG91 [45] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 - cpy #0 - beq !e+ - !: + //SEG92 [46] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG93 [46] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG94 [46] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + lda shift + cmp #1+1 + bcs b14 + jmp b15 + //SEG98 atan2_16::@15 + b15: + //SEG99 [48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp shift + beq b17_from_b15 + jmp b16 + //SEG100 atan2_16::@16 + b16: + //SEG101 [49] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG102 [50] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG91 [45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG103 [51] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG104 [51] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG105 [51] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG106 atan2_16::@17 + b17: + //SEG107 [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG92 atan2_16::@15 - b15: - //SEG93 [46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG108 atan2_16::@20 + b20: + //SEG109 [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -1998,7 +2258,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG94 [47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG110 [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -2006,11 +2266,11 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG95 [48] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG111 [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _24 - //SEG96 [49] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 + //SEG112 [56] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 ldy _24 sec lda angle_3 @@ -2019,31 +2279,31 @@ atan2_16: { lda angle_3+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle_3+1 - //SEG97 [50] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG98 [50] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG99 [50] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG100 [50] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG101 atan2_16::@14 - b14: - //SEG102 [51] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG113 [57] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG114 [57] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG115 [57] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG116 [57] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG117 atan2_16::@19 + b19: + //SEG118 [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG103 [52] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 + //SEG119 [59] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 lda #CORDIC_ITERATIONS_16-1+1 cmp i - beq b12_from_b14 - //SEG104 [32] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG105 [32] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG106 [32] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG107 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG108 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + beq b12_from_b19 + //SEG120 [32] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG121 [32] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG122 [32] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG123 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG124 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG109 atan2_16::@13 - b13: - //SEG110 [53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG125 atan2_16::@18 + b18: + //SEG126 [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -2051,7 +2311,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG111 [54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG127 [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -2059,11 +2319,11 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG112 [55] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG128 [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _23 - //SEG113 [56] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 + //SEG129 [63] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 ldy _23 clc lda angle_2 @@ -2072,104 +2332,128 @@ atan2_16: { lda angle_2+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle_2+1 - jmp b14_from_b13 - //SEG114 atan2_16::@4 + jmp b19_from_b18 + //SEG130 atan2_16::@14 + b14: + //SEG131 [64] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG132 [65] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG133 [66] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuz1=vbuz1_minus_2 + dec shift + dec shift + jmp b13_from_b14 + //SEG134 atan2_16::@4 b4: - //SEG115 [57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG135 [67] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG116 atan2_16::@1 + //SEG136 atan2_16::@1 b1: - //SEG117 [58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG137 [68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG118 init_font_hex +//SEG138 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($12) charset) +// init_font_hex(byte* zeropage($17) charset) init_font_hex: { - .label _0 = $2e - .label _1 = $2f - .label _2 = $30 - .label idx = $18 - .label i = $17 - .label idx_3 = $31 - .label proto_lo = $14 - .label charset = $12 - .label c1 = $16 - .label proto_hi = $f - .label c = $11 - //SEG119 [60] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $2f + .label _1 = $30 + .label _2 = $31 + .label idx = $1d + .label i = $1c + .label idx_3 = $32 + .label proto_lo = $19 + .label charset = $17 + .label c1 = $1b + .label proto_hi = $14 + .label c = $16 + //SEG139 [70] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG120 [60] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG140 [70] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG121 [60] 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 + //SEG141 [70] 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 - //SEG122 [60] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG142 [70] 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 - //SEG123 [60] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG143 [70] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG124 [60] 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 - //SEG125 [60] 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 - //SEG126 [60] 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 + //SEG144 [70] 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 + //SEG145 [70] 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 + //SEG146 [70] 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 - //SEG127 init_font_hex::@1 + //SEG147 init_font_hex::@1 b1: - //SEG128 [61] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG148 [71] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG129 [61] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG149 [71] 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 - //SEG130 [61] 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 + //SEG150 [71] 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 - //SEG131 [61] 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 + //SEG151 [71] 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 - //SEG132 [61] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG152 [71] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG133 [61] 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 - //SEG134 [61] 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 - //SEG135 [61] 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 + //SEG153 [71] 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 + //SEG154 [71] 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 + //SEG155 [71] 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 - //SEG136 init_font_hex::@2 + //SEG156 init_font_hex::@2 b2: - //SEG137 [62] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG157 [72] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG138 [63] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG158 [73] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG139 [63] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG159 [73] 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 - //SEG140 [63] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG160 [73] 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 - //SEG141 [63] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG161 [73] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG142 [63] 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 - //SEG143 [63] 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 + //SEG162 [73] 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 + //SEG163 [73] 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 - //SEG144 init_font_hex::@3 + //SEG164 init_font_hex::@3 b3: - //SEG145 [64] (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 + //SEG165 [74] (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 @@ -2177,43 +2461,43 @@ init_font_hex: { asl asl sta _0 - //SEG146 [65] (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 + //SEG166 [75] (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 - //SEG147 [66] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG167 [76] (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 - //SEG148 [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG168 [77] *((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 - //SEG149 [68] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG169 [78] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG150 [69] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG170 [79] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG151 [70] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG171 [80] 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 - //SEG152 init_font_hex::@4 + //SEG172 init_font_hex::@4 b4: - //SEG153 [71] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG173 [81] *((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 - //SEG154 [72] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG174 [82] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG155 [73] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG175 [83] *((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 - //SEG156 [74] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG176 [84] (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 @@ -2221,7 +2505,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG157 [75] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG177 [85] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -2229,16 +2513,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG158 [76] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG178 [86] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG159 [77] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG179 [87] 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 - //SEG160 init_font_hex::@5 + //SEG180 init_font_hex::@5 b5: - //SEG161 [78] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG181 [88] (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 @@ -2246,19 +2530,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG162 [79] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG182 [89] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG163 [80] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG183 [90] 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 - //SEG164 init_font_hex::@return + //SEG184 init_font_hex::@return breturn: - //SEG165 [81] return + //SEG185 [91] return rts } -//SEG166 File Data +//SEG186 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -2294,34 +2578,39 @@ Statement [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ Statement [37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a Statement [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a Statement [40] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#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#0 ] ) always clobbers reg byte a -Statement [44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [48] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [49] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [55] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [56] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [62] *((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:17 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:17 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [64] (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:23 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [65] (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:46 [ init_font_hex::$0 ] -Statement [71] *((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 [73] *((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 [74] (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 [75] (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 [78] (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 [44] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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:15 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Statement [45] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [49] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [50] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [52] 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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [53] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [54] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [55] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [56] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [60] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [61] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [62] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [63] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [64] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [65] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [67] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [68] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [72] *((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:22 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Statement [74] (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:28 [ init_font_hex::i#2 init_font_hex::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Statement [75] (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:47 [ init_font_hex::$0 ] +Statement [81] *((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 [83] *((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 [84] (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 [85] (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 [88] (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 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 [ main::y#4 main::x#2 main::screen#2 main::xw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen#2 main::xw#0 ] ) always clobbers reg byte a reg byte y Statement [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 [ main::y#4 main::x#2 main::screen#2 main::xw#0 main::yw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen#2 main::xw#0 main::yw#0 ] ) always clobbers reg byte a reg byte y @@ -2343,106 +2632,108 @@ Statement [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ Statement [37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a Statement [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a Statement [40] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#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#0 ] ) always clobbers reg byte a -Statement [44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [48] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [49] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [55] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [56] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [62] *((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 [64] (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 [65] (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 [71] *((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 [73] *((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 [74] (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 [75] (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 [78] (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 [44] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [45] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [49] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [50] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [52] 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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [53] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [54] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [55] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [56] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [60] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [61] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [62] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [63] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [64] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [65] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#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 [67] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a +Statement [68] (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::atan2_16:14 [ main::y#4 main::x#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a +Statement [72] *((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 [74] (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 [75] (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 [81] *((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 [83] *((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 [84] (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 [85] (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 [88] (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 [ main::y#4 main::y#1 ] : zp ZP_BYTE:2 , reg byte x , Potential registers zp ZP_BYTE:3 [ main::x#2 main::x#1 ] : zp ZP_BYTE:3 , reg byte x , Potential registers zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] : zp ZP_WORD:4 , -Potential registers zp ZP_WORD:6 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:6 [ 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:6 , +Potential registers zp ZP_WORD:8 [ 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 ] : zp ZP_WORD:8 , Potential registers zp ZP_BYTE:10 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , Potential registers zp ZP_WORD:11 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:11 , Potential registers zp ZP_WORD:13 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:13 , -Potential registers zp ZP_WORD:15 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:15 , -Potential registers zp ZP_BYTE:17 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:17 , reg byte x , -Potential registers zp ZP_WORD:18 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:18 , -Potential registers zp ZP_WORD:20 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:20 , -Potential registers zp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:22 , reg byte x , -Potential registers zp ZP_BYTE:23 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:23 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:24 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:25 [ main::xw#0 ] : zp ZP_WORD:25 , -Potential registers zp ZP_WORD:27 [ main::yw#0 ] : zp ZP_WORD:27 , -Potential registers zp ZP_WORD:29 [ atan2_16::x#0 ] : zp ZP_WORD:29 , -Potential registers zp ZP_WORD:31 [ atan2_16::y#0 ] : zp ZP_WORD:31 , -Potential registers zp ZP_WORD:33 [ atan2_16::return#2 ] : zp ZP_WORD:33 , -Potential registers zp ZP_WORD:35 [ main::angle_w#0 ] : zp ZP_WORD:35 , -Potential registers zp ZP_WORD:37 [ main::$11 ] : zp ZP_WORD:37 , -Potential registers zp ZP_BYTE:39 [ main::ang_w#0 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:40 [ atan2_16::xd#0 ] : zp ZP_WORD:40 , -Potential registers zp ZP_WORD:42 [ atan2_16::yd#0 ] : zp ZP_WORD:42 , -Potential registers zp ZP_BYTE:44 [ atan2_16::$24 ] : zp ZP_BYTE:44 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:45 [ atan2_16::$23 ] : zp ZP_BYTE:45 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:46 [ init_font_hex::$0 ] : zp ZP_BYTE:46 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:47 [ init_font_hex::$1 ] : zp ZP_BYTE:47 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:48 [ init_font_hex::$2 ] : zp ZP_BYTE:48 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:49 [ init_font_hex::idx#3 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:15 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp ZP_BYTE:15 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:16 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp ZP_WORD:16 , +Potential registers zp ZP_WORD:18 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp ZP_WORD:18 , +Potential registers zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:20 , +Potential registers zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:22 , reg byte x , +Potential registers zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:23 , +Potential registers zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:25 , +Potential registers zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:27 , reg byte x , +Potential registers zp ZP_BYTE:28 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:28 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:29 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:30 [ main::xw#0 ] : zp ZP_WORD:30 , +Potential registers zp ZP_WORD:32 [ main::yw#0 ] : zp ZP_WORD:32 , +Potential registers zp ZP_WORD:34 [ atan2_16::x#0 ] : zp ZP_WORD:34 , +Potential registers zp ZP_WORD:36 [ atan2_16::y#0 ] : zp ZP_WORD:36 , +Potential registers zp ZP_WORD:38 [ atan2_16::return#2 ] : zp ZP_WORD:38 , +Potential registers zp ZP_WORD:40 [ main::angle_w#0 ] : zp ZP_WORD:40 , +Potential registers zp ZP_WORD:42 [ main::$11 ] : zp ZP_WORD:42 , +Potential registers zp ZP_BYTE:44 [ main::ang_w#0 ] : zp ZP_BYTE:44 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:45 [ atan2_16::$24 ] : zp ZP_BYTE:45 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:46 [ atan2_16::$23 ] : zp ZP_BYTE:46 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:47 [ init_font_hex::$0 ] : zp ZP_BYTE:47 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:48 [ init_font_hex::$1 ] : zp ZP_BYTE:48 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:49 [ init_font_hex::$2 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:50 [ init_font_hex::idx#3 ] : zp ZP_BYTE:50 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 7,706.67: zp ZP_WORD:11 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 3,203.15: zp ZP_WORD:6 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,817.2: zp ZP_WORD:8 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:44 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:45 [ atan2_16::$23 ] 1,930.5: zp ZP_BYTE:10 [ atan2_16::i#2 atan2_16::i#1 ] 1,501.5: zp ZP_WORD:42 [ atan2_16::yd#0 ] 600.6: zp ZP_WORD:40 [ atan2_16::xd#0 ] 202: zp ZP_WORD:33 [ atan2_16::return#2 ] 50: zp ZP_WORD:13 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 3.89: zp ZP_WORD:29 [ atan2_16::x#0 ] 3.63: zp ZP_WORD:31 [ atan2_16::y#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:23 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:47 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:48 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:46 [ init_font_hex::$0 ] 202: zp ZP_BYTE:49 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:18 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:20 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:15 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:17 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [main] 202: zp ZP_WORD:35 [ main::angle_w#0 ] 202: zp ZP_WORD:37 [ main::$11 ] 202: zp ZP_BYTE:39 [ main::ang_w#0 ] 168.33: zp ZP_BYTE:3 [ main::x#2 main::x#1 ] 93.15: zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] 50.5: zp ZP_WORD:25 [ main::xw#0 ] 50.5: zp ZP_WORD:27 [ main::yw#0 ] 17.97: zp ZP_BYTE:2 [ main::y#4 main::y#1 ] +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:15 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:16 [ 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:18 [ 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:11 [ 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:6 [ 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:8 [ 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:45 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:46 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:10 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:38 [ atan2_16::return#2 ] 50: zp ZP_WORD:13 [ 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:34 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:36 [ atan2_16::y#0 ] +Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:28 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:48 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:49 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:47 [ init_font_hex::$0 ] 202: zp ZP_BYTE:50 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplift Scope [main] 202: zp ZP_WORD:40 [ main::angle_w#0 ] 202: zp ZP_WORD:42 [ main::$11 ] 202: zp ZP_BYTE:44 [ main::ang_w#0 ] 168.33: zp ZP_BYTE:3 [ main::x#2 main::x#1 ] 93.15: zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] 50.5: zp ZP_WORD:30 [ main::xw#0 ] 50.5: zp ZP_WORD:32 [ main::yw#0 ] 17.97: zp ZP_BYTE:2 [ main::y#4 main::y#1 ] Uplift Scope [] -Uplifting [atan2_16] best 395369 combination zp ZP_WORD:11 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:6 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:8 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:10 [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:42 [ atan2_16::yd#0 ] zp ZP_WORD:40 [ atan2_16::xd#0 ] zp ZP_WORD:33 [ atan2_16::return#2 ] zp ZP_WORD:13 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:29 [ atan2_16::x#0 ] zp ZP_WORD:31 [ atan2_16::y#0 ] -Uplifting [init_font_hex] best 376369 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:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:46 [ init_font_hex::$0 ] zp ZP_BYTE:49 [ init_font_hex::idx#3 ] zp ZP_WORD:18 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:20 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:15 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:17 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [atan2_16] best 1149869 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:16 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:18 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:11 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:6 [ 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:8 [ 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 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:38 [ atan2_16::return#2 ] zp ZP_WORD:13 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:34 [ atan2_16::x#0 ] zp ZP_WORD:36 [ atan2_16::y#0 ] +Limited combination testing to 100 combinations of 144 possible. +Uplifting [init_font_hex] best 1130869 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:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:47 [ init_font_hex::$0 ] zp ZP_BYTE:50 [ init_font_hex::idx#3 ] zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [main] best 374769 combination zp ZP_WORD:35 [ main::angle_w#0 ] zp ZP_WORD:37 [ main::$11 ] reg byte a [ main::ang_w#0 ] reg byte x [ main::x#2 main::x#1 ] zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] zp ZP_WORD:25 [ main::xw#0 ] zp ZP_WORD:27 [ main::yw#0 ] zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -Uplifting [] best 374769 combination -Attempting to uplift remaining variables inzp ZP_BYTE:10 [ atan2_16::i#2 atan2_16::i#1 ] -Uplifting [atan2_16] best 374769 combination zp ZP_BYTE:10 [ atan2_16::i#2 atan2_16::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 374769 combination zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:46 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 374769 combination zp ZP_BYTE:46 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:49 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 374169 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 374169 combination zp ZP_BYTE:22 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [main] best 1130269 combination zp ZP_WORD:40 [ main::angle_w#0 ] zp ZP_WORD:42 [ main::$11 ] reg byte a [ main::ang_w#0 ] zp ZP_BYTE:3 [ main::x#2 main::x#1 ] zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] zp ZP_WORD:30 [ main::xw#0 ] zp ZP_WORD:32 [ main::yw#0 ] zp ZP_BYTE:2 [ main::y#4 main::y#1 ] +Uplifting [] best 1130269 combination +Attempting to uplift remaining variables inzp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [init_font_hex] best 1130269 combination zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:47 [ init_font_hex::$0 ] +Uplifting [init_font_hex] best 1130269 combination zp ZP_BYTE:47 [ init_font_hex::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:50 [ init_font_hex::idx#3 ] +Uplifting [init_font_hex] best 1129669 combination reg byte y [ init_font_hex::idx#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::x#2 main::x#1 ] +Uplifting [main] best 1129669 combination zp ZP_BYTE:3 [ main::x#2 main::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 1129669 combination zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::y#4 main::y#1 ] -Uplifting [main] best 374169 combination zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:17 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 374169 combination zp ZP_BYTE:17 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [main] best 1129669 combination zp ZP_BYTE:2 [ main::y#4 main::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_font_hex] best 1129669 combination zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:13 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:25 [ main::xw#0 ] ] with [ zp ZP_WORD:29 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:27 [ main::yw#0 ] ] with [ zp ZP_WORD:31 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:33 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:35 [ main::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ 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 ] ] with [ zp ZP_WORD:33 [ atan2_16::return#2 main::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ 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 main::angle_w#0 ] ] with [ zp ZP_WORD:37 [ main::$11 ] ] - score: 1 -Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ main::screen#2 main::screen#4 main::screen#1 ] -Allocated (was zp ZP_WORD:6) zp ZP_WORD:5 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated (was zp ZP_WORD:8) zp ZP_WORD:7 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:9 [ atan2_16::i#2 atan2_16::i#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:30 [ main::xw#0 ] ] with [ zp ZP_WORD:34 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ main::yw#0 ] ] with [ zp ZP_WORD:36 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:38 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:40 [ main::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ 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 ] ] with [ zp ZP_WORD:38 [ atan2_16::return#2 main::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ 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 main::angle_w#0 ] ] with [ zp ZP_WORD:42 [ main::$11 ] ] - score: 1 Allocated (was zp ZP_WORD:11) zp ZP_WORD:10 [ 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 main::angle_w#0 main::$11 ] -Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:14 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:18) zp ZP_WORD:15 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:20) zp ZP_WORD:17 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:19 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_WORD:25) zp ZP_WORD:21 [ main::xw#0 atan2_16::x#0 ] -Allocated (was zp ZP_WORD:27) zp ZP_WORD:23 [ main::yw#0 atan2_16::y#0 ] -Allocated (was zp ZP_WORD:40) zp ZP_WORD:25 [ atan2_16::xd#0 ] -Allocated (was zp ZP_WORD:42) zp ZP_WORD:27 [ atan2_16::yd#0 ] -Allocated (was zp ZP_BYTE:46) zp ZP_BYTE:29 [ init_font_hex::$0 ] +Allocated (was zp ZP_WORD:16) zp ZP_WORD:12 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated (was zp ZP_WORD:18) zp ZP_WORD:14 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_WORD:20) zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated (was zp ZP_WORD:23) zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated (was zp ZP_WORD:25) zp ZP_WORD:21 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:23 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated (was zp ZP_BYTE:29) zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:25 [ main::xw#0 atan2_16::x#0 ] +Allocated (was zp ZP_WORD:32) zp ZP_WORD:27 [ main::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_BYTE:47) zp ZP_BYTE:29 [ init_font_hex::$0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -2480,13 +2771,14 @@ bend: main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label _11 = $a - .label xw = $15 - .label yw = $17 + .label xw = $19 + .label yw = $1b .label angle_w = $a - .label screen = 3 + .label screen = 4 + .label x = 3 .label y = 2 //SEG11 [5] call init_font_hex - //SEG12 [59] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [69] 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] @@ -2521,8 +2813,9 @@ main: { //SEG24 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: //SEG25 [9] phi (byte*) main::screen#2 = (byte*) main::screen#4 [phi:main::@1->main::@2#0] -- register_copy - //SEG26 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#1] -- vbsxx=vbsc1 - ldx #-$13 + //SEG26 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#1] -- vbsz1=vbsc1 + lda #-$13 + sta x jmp b2 //SEG27 [9] phi from main::@6 to main::@2 [phi:main::@6->main::@2] b2_from_b6: @@ -2531,9 +2824,9 @@ main: { jmp b2 //SEG30 main::@2 b2: - //SEG31 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 + //SEG31 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda x ldy #0 - txa sta xw+1 sty xw //SEG32 [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 @@ -2568,10 +2861,11 @@ main: { bne !+ inc screen+1 !: - //SEG43 [21] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsxx=_inc_vbsxx - inx - //SEG44 [22] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 + //SEG43 [21] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 + inc x + //SEG44 [22] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 + lda #$15 + cmp x bne b2_from_b6 jmp b3 //SEG45 main::@3 @@ -2596,19 +2890,18 @@ main: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($15) x, signed word zeropage($17) y) +// atan2_16(signed word zeropage($19) x, signed word zeropage($1b) y) atan2_16: { - .label _2 = 5 - .label _7 = 7 - .label yi = 5 - .label xi = 7 - .label xd = $19 - .label yd = $1b + .label _2 = 6 + .label _7 = 8 + .label yi = 6 + .label xi = 8 .label angle = $a - .label i = 9 + .label xd = $e + .label yd = $c .label return = $a - .label x = $15 - .label y = $17 + .label x = $19 + .label y = $1b //SEG51 [26] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bpl b1 @@ -2626,7 +2919,7 @@ atan2_16: { //SEG54 [28] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG55 [28] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG55 [28] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG56 atan2_16::@3 b3: @@ -2647,7 +2940,7 @@ atan2_16: { //SEG60 [31] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG61 [31] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG61 [31] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG62 atan2_16::@6 b6: @@ -2658,9 +2951,8 @@ atan2_16: { sta angle lda #0 sta angle+1 - //SEG65 [32] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - lda #0 - sta i + //SEG65 [32] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + ldx #0 //SEG66 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG67 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy jmp b10 @@ -2671,10 +2963,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG70 [34] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG70 [34] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG71 [34] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG71 [34] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG72 atan2_16::@12 b12: @@ -2684,9 +2976,9 @@ atan2_16: { //SEG74 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG75 atan2_16::@16 - b16: + jmp b21 + //SEG75 atan2_16::@21 + b21: //SEG76 [37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -2695,10 +2987,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG77 [38] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG77 [38] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG78 [38] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG78 [38] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG79 atan2_16::@7 b7: @@ -2730,45 +3022,65 @@ atan2_16: { rts //SEG88 atan2_16::@11 b11: - //SEG89 [43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG89 [43] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG90 [44] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG90 [44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG91 [45] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG92 [46] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG93 [46] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG94 [46] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + bcs b14 + jmp b15 + //SEG98 atan2_16::@15 + b15: + //SEG99 [48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 cpy #0 - beq !e+ - !: + beq b17_from_b15 + jmp b16 + //SEG100 atan2_16::@16 + b16: + //SEG101 [49] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG102 [50] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG91 [45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG103 [51] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG104 [51] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG105 [51] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG106 atan2_16::@17 + b17: + //SEG107 [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG92 atan2_16::@15 - b15: - //SEG93 [46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG108 atan2_16::@20 + b20: + //SEG109 [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -2776,7 +3088,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG94 [47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG110 [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -2784,10 +3096,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG95 [48] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG111 [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG96 [49] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG112 [56] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -2796,31 +3108,30 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG97 [50] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG98 [50] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG99 [50] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG100 [50] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG101 atan2_16::@14 - b14: - //SEG102 [51] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG103 [52] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i - beq b12_from_b14 - //SEG104 [32] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG105 [32] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG106 [32] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG107 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG108 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG113 [57] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG114 [57] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG115 [57] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG116 [57] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG117 atan2_16::@19 + b19: + //SEG118 [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG119 [59] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + beq b12_from_b19 + //SEG120 [32] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG121 [32] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG122 [32] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG123 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG124 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG109 atan2_16::@13 - b13: - //SEG110 [53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG125 atan2_16::@18 + b18: + //SEG126 [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -2828,7 +3139,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG111 [54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG127 [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -2836,10 +3147,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG112 [55] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG128 [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG113 [56] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG129 [63] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -2848,99 +3159,123 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14_from_b13 - //SEG114 atan2_16::@4 + jmp b19_from_b18 + //SEG130 atan2_16::@14 + b14: + //SEG131 [64] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG132 [65] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG133 [66] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13_from_b14 + //SEG134 atan2_16::@4 b4: - //SEG115 [57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG135 [67] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG116 atan2_16::@1 + //SEG136 atan2_16::@1 b1: - //SEG117 [58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG137 [68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG118 init_font_hex +//SEG138 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($f) charset) +// init_font_hex(byte* zeropage($13) charset) init_font_hex: { .label _0 = $1d - .label idx = $14 - .label proto_lo = $11 - .label charset = $f - .label c1 = $13 - .label proto_hi = $c - .label c = $e - //SEG119 [60] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label idx = $18 + .label proto_lo = $15 + .label charset = $13 + .label c1 = $17 + .label proto_hi = $10 + .label c = $12 + //SEG139 [70] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG120 [60] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG140 [70] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG121 [60] 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 + //SEG141 [70] 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 - //SEG122 [60] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG142 [70] 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 - //SEG123 [60] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG143 [70] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG124 [60] 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 - //SEG125 [60] 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 - //SEG126 [60] 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 + //SEG144 [70] 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 + //SEG145 [70] 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 + //SEG146 [70] 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 - //SEG127 init_font_hex::@1 + //SEG147 init_font_hex::@1 b1: - //SEG128 [61] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG148 [71] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG129 [61] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG149 [71] 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 - //SEG130 [61] 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 + //SEG150 [71] 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 - //SEG131 [61] 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 + //SEG151 [71] 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 - //SEG132 [61] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG152 [71] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG133 [61] 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 - //SEG134 [61] 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 - //SEG135 [61] 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 + //SEG153 [71] 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 + //SEG154 [71] 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 + //SEG155 [71] 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 - //SEG136 init_font_hex::@2 + //SEG156 init_font_hex::@2 b2: - //SEG137 [62] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG157 [72] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG138 [63] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG158 [73] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG139 [63] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG159 [73] 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 - //SEG140 [63] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG160 [73] 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 - //SEG141 [63] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG161 [73] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG142 [63] 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 - //SEG143 [63] 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 + //SEG162 [73] 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 + //SEG163 [73] 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 - //SEG144 init_font_hex::@3 + //SEG164 init_font_hex::@3 b3: - //SEG145 [64] (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 + //SEG165 [74] (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 @@ -2949,37 +3284,37 @@ init_font_hex: { asl asl sta _0 - //SEG146 [65] (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 + //SEG166 [75] (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 - //SEG147 [66] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG167 [76] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG148 [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG168 [77] *((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 - //SEG149 [68] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG169 [78] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG150 [69] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG170 [79] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG151 [70] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG171 [80] 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 - //SEG152 init_font_hex::@4 + //SEG172 init_font_hex::@4 b4: - //SEG153 [71] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG173 [81] *((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 - //SEG154 [72] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG174 [82] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG155 [73] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG175 [83] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG156 [74] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG176 [84] (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 @@ -2987,7 +3322,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG157 [75] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG177 [85] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -2995,16 +3330,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG158 [76] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG178 [86] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG159 [77] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG179 [87] 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 - //SEG160 init_font_hex::@5 + //SEG180 init_font_hex::@5 b5: - //SEG161 [78] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG181 [88] (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 @@ -3012,19 +3347,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG162 [79] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG182 [89] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG163 [80] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG183 [90] 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 - //SEG164 init_font_hex::@return + //SEG184 init_font_hex::@return breturn: - //SEG165 [81] return + //SEG185 [91] return rts } -//SEG166 File Data +//SEG186 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -3049,13 +3384,17 @@ Removing instruction jmp b5 Removing instruction jmp b6 Removing instruction jmp b10 Removing instruction jmp b12 -Removing instruction jmp b16 +Removing instruction jmp b21 Removing instruction jmp b7 Removing instruction jmp b9 Removing instruction jmp b8 Removing instruction jmp breturn +Removing instruction jmp b13 Removing instruction jmp b15 -Removing instruction jmp b14 +Removing instruction jmp b16 +Removing instruction jmp b17 +Removing instruction jmp b20 +Removing instruction jmp b19 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 @@ -3065,7 +3404,7 @@ Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 Removing instruction lda #0 -Removing instruction lda #0 +Replacing instruction ldx #0 with TAX Replacing instruction ldy #0 with TAY Removing instruction ldy idx Removing instruction lda #0 @@ -3074,8 +3413,10 @@ Replacing label b2_from_b6 with b2 Replacing label b1_from_b3 with b1 Replacing label b7_from_b12 with b7 Replacing label b8_from_b7 with b8 -Replacing label b12_from_b14 with b12 -Replacing label b14_from_b13 with b14 +Replacing label b17_from_b15 with b17 +Replacing label b12_from_b19 with b12 +Replacing label b19_from_b18 with b19 +Replacing label b13_from_b14 with b13 Replacing label b6_from_b4 with b6 Replacing label b3_from_b1 with b3 Replacing label b3_from_b3 with b3 @@ -3096,14 +3437,18 @@ Removing instruction b6_from_b4: Removing instruction b6_from_b5: Removing instruction b10_from_b6: Removing instruction b12_from_b10: -Removing instruction b12_from_b14: +Removing instruction b12_from_b19: Removing instruction b7_from_b12: -Removing instruction b7_from_b16: +Removing instruction b7_from_b21: Removing instruction b8_from_b7: Removing instruction b8_from_b9: Removing instruction breturn: -Removing instruction b14_from_b13: -Removing instruction b14_from_b15: +Removing instruction b13_from_b11: +Removing instruction b13_from_b14: +Removing instruction b17_from_b15: +Removing instruction b17_from_b16: +Removing instruction b19_from_b18: +Removing instruction b19_from_b20: Removing instruction b1_from_b5: Removing instruction b2_from_b1: Removing instruction b2_from_b4: @@ -3117,10 +3462,12 @@ Removing instruction b6: Removing instruction b3: Removing instruction b2: Removing instruction b5: -Removing instruction b16: +Removing instruction b21: Removing instruction b9: Removing instruction b15: -Removing instruction b10_from_b14: +Removing instruction b16: +Removing instruction b20: +Removing instruction b10_from_b19: Removing instruction b1_from_init_font_hex: Removing instruction b3_from_b2: Removing instruction b4: @@ -3138,9 +3485,9 @@ Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [198] beq b12 to bne -Fixing long branch [85] bpl b1 to bmi -Fixing long branch [97] bpl b4 to bmi +Fixing long branch [193] beq b12 to bne +Fixing long branch [87] bpl b1 to bmi +Fixing long branch [99] bpl b4 to bmi FINAL SYMBOL TABLE (label) @1 @@ -3163,10 +3510,10 @@ FINAL SYMBOL TABLE (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = (byte*) 10240 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:5 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:6 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:7 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:8 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -3175,7 +3522,12 @@ FINAL SYMBOL TABLE (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -3187,7 +3539,7 @@ FINAL SYMBOL TABLE (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:10 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:10 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:10 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:10 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:10 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:10 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:10 2002.0 @@ -3195,33 +3547,45 @@ FINAL SYMBOL TABLE (word) atan2_16::angle#5 angle zp ZP_WORD:10 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:10 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:9 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:9 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:10 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:10 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:21 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:25 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:25 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:14 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:14 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:14 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:7 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:7 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:7 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:7 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:7 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:7 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:8 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:8 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:8 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:8 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:8 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:23 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:27 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:27 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:12 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:12 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:12 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:12 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:12 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:5 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:5 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:5 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:5 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:5 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:5 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:6 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:6 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:6 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:6 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:6 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:6 1001.0 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 $0 zp ZP_BYTE:29 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 @@ -3233,28 +3597,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:14 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:14 1.1578947368421053 +(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::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:19 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:19 13.466666666666667 +(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::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:15 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:15 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:15 22.0 +(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::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:20 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:24 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:20 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:24 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:12 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:12 56.83333333333334 +(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_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:17 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:17 92.53846153846155 +(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 (void()) main() (word~) main::$11 $11 zp ZP_WORD:10 202.0 (label) main::@1 @@ -3269,9 +3633,9 @@ FINAL SYMBOL TABLE (word) main::angle_w#0 angle_w zp ZP_WORD:10 202.0 (byte*) main::col00 (byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:3 42.599999999999994 -(byte*) main::screen#2 screen zp ZP_WORD:3 28.545454545454547 -(byte*) main::screen#4 screen zp ZP_WORD:3 22.0 +(byte*) main::screen#1 screen zp ZP_WORD:4 42.599999999999994 +(byte*) main::screen#2 screen zp ZP_WORD:4 28.545454545454547 +(byte*) main::screen#4 screen zp ZP_WORD:4 22.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -3287,35 +3651,36 @@ FINAL SYMBOL TABLE (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 (signed byte) main::x -(signed byte) main::x#1 reg byte x 151.5 -(signed byte) main::x#2 reg byte x 16.833333333333332 +(signed byte) main::x#1 x zp ZP_BYTE:3 151.5 +(signed byte) main::x#2 x zp ZP_BYTE:3 16.833333333333332 (signed word) main::xw -(word) main::xw#0 xw zp ZP_WORD:21 50.5 +(word) main::xw#0 xw zp ZP_WORD:25 50.5 (signed byte) main::y (signed byte) main::y#1 y zp ZP_BYTE:2 16.5 (signed byte) main::y#4 y zp ZP_BYTE:2 1.4666666666666666 (signed word) main::yw -(word) main::yw#0 yw zp ZP_WORD:23 50.5 +(word) main::yw#0 yw zp ZP_WORD:27 50.5 zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -reg byte x [ main::x#2 main::x#1 ] -zp ZP_WORD:3 [ main::screen#2 main::screen#4 main::screen#1 ] -zp ZP_WORD:5 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:7 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:9 [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_BYTE:3 [ main::x#2 main::x#1 ] +zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] +zp ZP_WORD:6 [ 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:8 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:10 [ 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 main::angle_w#0 main::$11 ] -zp ZP_WORD:12 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:14 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:15 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:17 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:19 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:12 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:14 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +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 ] reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_WORD:21 [ main::xw#0 atan2_16::x#0 ] -zp ZP_WORD:23 [ main::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_WORD:25 [ main::xw#0 atan2_16::x#0 ] +zp ZP_WORD:27 [ main::yw#0 atan2_16::y#0 ] reg byte a [ main::ang_w#0 ] -zp ZP_WORD:25 [ atan2_16::xd#0 ] -zp ZP_WORD:27 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:29 [ init_font_hex::$0 ] @@ -3325,7 +3690,7 @@ reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 347237 +Score: 1038737 //SEG0 File Comments // Find atan2(x, y) using the CORDIC method @@ -3353,13 +3718,14 @@ Score: 347237 main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label _11 = $a - .label xw = $15 - .label yw = $17 + .label xw = $19 + .label yw = $1b .label angle_w = $a - .label screen = 3 + .label screen = 4 + .label x = 3 .label y = 2 //SEG11 [5] call init_font_hex - //SEG12 [59] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [69] 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 @@ -3383,16 +3749,17 @@ main: { b1: //SEG24 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2] //SEG25 [9] phi (byte*) main::screen#2 = (byte*) main::screen#4 [phi:main::@1->main::@2#0] -- register_copy - //SEG26 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#1] -- vbsxx=vbsc1 - ldx #-$13 + //SEG26 [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#1] -- vbsz1=vbsc1 + lda #-$13 + sta x //SEG27 [9] phi from main::@6 to main::@2 [phi:main::@6->main::@2] //SEG28 [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@6->main::@2#0] -- register_copy //SEG29 [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@6->main::@2#1] -- register_copy //SEG30 main::@2 b2: - //SEG31 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 + //SEG31 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda x ldy #0 - txa sta xw+1 sty xw //SEG32 [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 @@ -3424,10 +3791,11 @@ main: { bne !+ inc screen+1 !: - //SEG43 [21] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsxx=_inc_vbsxx - inx - //SEG44 [22] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 + //SEG43 [21] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 + inc x + //SEG44 [22] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 + lda #$15 + cmp x bne b2 //SEG45 main::@3 //SEG46 [23] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 @@ -3449,19 +3817,18 @@ main: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($15) x, signed word zeropage($17) y) +// atan2_16(signed word zeropage($19) x, signed word zeropage($1b) y) atan2_16: { - .label _2 = 5 - .label _7 = 7 - .label yi = 5 - .label xi = 7 - .label xd = $19 - .label yd = $1b + .label _2 = 6 + .label _7 = 8 + .label yi = 6 + .label xi = 8 .label angle = $a - .label i = 9 + .label xd = $e + .label yd = $c .label return = $a - .label x = $15 - .label y = $17 + .label x = $19 + .label y = $1b //SEG51 [26] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bmi !b1+ @@ -3477,7 +3844,7 @@ atan2_16: { sbc y+1 sta _2+1 //SEG54 [28] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] - //SEG55 [28] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG55 [28] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy //SEG56 atan2_16::@3 b3: //SEG57 [29] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 @@ -3495,7 +3862,7 @@ atan2_16: { sbc x+1 sta _7+1 //SEG60 [31] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] - //SEG61 [31] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG61 [31] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy //SEG62 atan2_16::@6 b6: //SEG63 [32] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] @@ -3503,8 +3870,8 @@ atan2_16: { lda #0 sta angle sta angle+1 - //SEG65 [32] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - sta i + //SEG65 [32] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + tax //SEG66 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG67 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy //SEG68 atan2_16::@10 @@ -3514,8 +3881,8 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG70 [34] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] - //SEG71 [34] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //SEG70 [34] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + //SEG71 [34] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy //SEG72 atan2_16::@12 b12: //SEG73 [35] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 @@ -3524,7 +3891,7 @@ atan2_16: { //SEG74 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7 - //SEG75 atan2_16::@16 + //SEG75 atan2_16::@21 //SEG76 [37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -3533,8 +3900,8 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG77 [38] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] - //SEG78 [38] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //SEG77 [38] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + //SEG78 [38] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy //SEG79 atan2_16::@7 b7: //SEG80 [39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 @@ -3558,43 +3925,53 @@ atan2_16: { rts //SEG88 atan2_16::@11 b11: - //SEG89 [43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG89 [43] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG90 [44] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG90 [44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG91 [45] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG92 [46] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + //SEG93 [46] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG94 [46] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 cpy #0 - beq !e+ - !: + beq b17 + //SEG100 atan2_16::@16 + //SEG101 [49] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG102 [50] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG91 [45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG103 [51] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + //SEG104 [51] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG105 [51] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + //SEG106 atan2_16::@17 + b17: + //SEG107 [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - //SEG92 atan2_16::@15 - //SEG93 [46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + //SEG108 atan2_16::@20 + //SEG109 [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -3602,7 +3979,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG94 [47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG110 [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -3610,10 +3987,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG95 [48] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG111 [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG96 [49] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG112 [56] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -3622,29 +3999,28 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG97 [50] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - //SEG98 [50] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG99 [50] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG100 [50] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - //SEG101 atan2_16::@14 - b14: - //SEG102 [51] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG103 [52] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + //SEG113 [57] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + //SEG114 [57] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG115 [57] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG116 [57] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + //SEG117 atan2_16::@19 + b19: + //SEG118 [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG119 [59] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: - //SEG104 [32] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - //SEG105 [32] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG106 [32] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG107 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG108 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG120 [32] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + //SEG121 [32] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG122 [32] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG123 [32] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG124 [32] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG109 atan2_16::@13 - b13: - //SEG110 [53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG125 atan2_16::@18 + b18: + //SEG126 [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -3652,7 +4028,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG111 [54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG127 [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -3660,10 +4036,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG112 [55] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG128 [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG113 [56] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG129 [63] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -3672,87 +4048,111 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 - //SEG114 atan2_16::@4 + jmp b19 + //SEG130 atan2_16::@14 + b14: + //SEG131 [64] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG132 [65] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG133 [66] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13 + //SEG134 atan2_16::@4 b4: - //SEG115 [57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG135 [67] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6 - //SEG116 atan2_16::@1 + //SEG136 atan2_16::@1 b1: - //SEG117 [58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG137 [68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3 } -//SEG118 init_font_hex +//SEG138 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($f) charset) +// init_font_hex(byte* zeropage($13) charset) init_font_hex: { .label _0 = $1d - .label idx = $14 - .label proto_lo = $11 - .label charset = $f - .label c1 = $13 - .label proto_hi = $c - .label c = $e - //SEG119 [60] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG120 [60] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .label idx = $18 + .label proto_lo = $15 + .label charset = $13 + .label c1 = $17 + .label proto_hi = $10 + .label c = $12 + //SEG139 [70] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + //SEG140 [70] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG121 [60] 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 + //SEG141 [70] 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 - //SEG122 [60] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG142 [70] 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 - //SEG123 [60] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG124 [60] 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 - //SEG125 [60] 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 - //SEG126 [60] 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 - //SEG127 init_font_hex::@1 + //SEG143 [70] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG144 [70] 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 + //SEG145 [70] 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 + //SEG146 [70] 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 + //SEG147 init_font_hex::@1 b1: - //SEG128 [61] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG129 [61] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG148 [71] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG149 [71] 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 - //SEG130 [61] 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 + //SEG150 [71] 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 - //SEG131 [61] 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 - //SEG132 [61] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG133 [61] 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 - //SEG134 [61] 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 - //SEG135 [61] 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 - //SEG136 init_font_hex::@2 + //SEG151 [71] 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 + //SEG152 [71] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG153 [71] 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 + //SEG154 [71] 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 + //SEG155 [71] 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 + //SEG156 init_font_hex::@2 b2: - //SEG137 [62] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG157 [72] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG138 [63] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG139 [63] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG158 [73] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG159 [73] 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 - //SEG140 [63] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG160 [73] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG141 [63] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG142 [63] 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 - //SEG143 [63] 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 - //SEG144 init_font_hex::@3 + //SEG161 [73] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG162 [73] 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 + //SEG163 [73] 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 + //SEG164 init_font_hex::@3 b3: - //SEG145 [64] (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 + //SEG165 [74] (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 @@ -3761,33 +4161,33 @@ init_font_hex: { asl asl sta _0 - //SEG146 [65] (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 + //SEG166 [75] (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 - //SEG147 [66] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG167 [76] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG148 [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG168 [77] *((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 - //SEG149 [68] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG169 [78] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG150 [69] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG170 [79] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG151 [70] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG171 [80] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG152 init_font_hex::@4 - //SEG153 [71] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG172 init_font_hex::@4 + //SEG173 [81] *((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 - //SEG154 [72] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG174 [82] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG155 [73] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG175 [83] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG156 [74] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG176 [84] (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 @@ -3795,7 +4195,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG157 [75] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG177 [85] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3803,14 +4203,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG158 [76] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG178 [86] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG159 [77] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG179 [87] 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 - //SEG160 init_font_hex::@5 - //SEG161 [78] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG180 init_font_hex::@5 + //SEG181 [88] (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 @@ -3818,17 +4218,17 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG162 [79] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG182 [89] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG163 [80] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG183 [90] 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 - //SEG164 init_font_hex::@return - //SEG165 [81] return + //SEG184 init_font_hex::@return + //SEG185 [91] return rts } -//SEG166 File Data +//SEG186 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... diff --git a/src/test/ref/cordic-atan2-16.sym b/src/test/ref/cordic-atan2-16.sym index 62dcef3b3..855e7c222 100644 --- a/src/test/ref/cordic-atan2-16.sym +++ b/src/test/ref/cordic-atan2-16.sym @@ -18,10 +18,10 @@ (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = (byte*) 10240 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:5 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:6 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:7 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:8 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -30,7 +30,12 @@ (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -42,7 +47,7 @@ (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:10 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:10 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:10 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:10 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:10 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:10 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:10 2002.0 @@ -50,33 +55,45 @@ (word) atan2_16::angle#5 angle zp ZP_WORD:10 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:10 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:9 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:9 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:10 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:10 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:21 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:25 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:25 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:14 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:14 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:14 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:14 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:7 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:7 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:7 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:7 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:7 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:7 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:8 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:8 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:8 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:8 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:8 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:23 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:27 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:27 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:12 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:12 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:12 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:12 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:12 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:5 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:5 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:5 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:5 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:5 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:5 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:6 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:6 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:6 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:6 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:6 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:6 1001.0 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 $0 zp ZP_BYTE:29 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 @@ -88,28 +105,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:14 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:14 1.1578947368421053 +(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::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:19 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:19 13.466666666666667 +(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::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:15 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:15 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:15 22.0 +(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::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:20 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:24 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:20 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:24 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:12 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:12 56.83333333333334 +(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_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:17 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:17 92.53846153846155 +(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 (void()) main() (word~) main::$11 $11 zp ZP_WORD:10 202.0 (label) main::@1 @@ -124,9 +141,9 @@ (word) main::angle_w#0 angle_w zp ZP_WORD:10 202.0 (byte*) main::col00 (byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:3 42.599999999999994 -(byte*) main::screen#2 screen zp ZP_WORD:3 28.545454545454547 -(byte*) main::screen#4 screen zp ZP_WORD:3 22.0 +(byte*) main::screen#1 screen zp ZP_WORD:4 42.599999999999994 +(byte*) main::screen#2 screen zp ZP_WORD:4 28.545454545454547 +(byte*) main::screen#4 screen zp ZP_WORD:4 22.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -142,35 +159,36 @@ (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 (signed byte) main::x -(signed byte) main::x#1 reg byte x 151.5 -(signed byte) main::x#2 reg byte x 16.833333333333332 +(signed byte) main::x#1 x zp ZP_BYTE:3 151.5 +(signed byte) main::x#2 x zp ZP_BYTE:3 16.833333333333332 (signed word) main::xw -(word) main::xw#0 xw zp ZP_WORD:21 50.5 +(word) main::xw#0 xw zp ZP_WORD:25 50.5 (signed byte) main::y (signed byte) main::y#1 y zp ZP_BYTE:2 16.5 (signed byte) main::y#4 y zp ZP_BYTE:2 1.4666666666666666 (signed word) main::yw -(word) main::yw#0 yw zp ZP_WORD:23 50.5 +(word) main::yw#0 yw zp ZP_WORD:27 50.5 zp ZP_BYTE:2 [ main::y#4 main::y#1 ] -reg byte x [ main::x#2 main::x#1 ] -zp ZP_WORD:3 [ main::screen#2 main::screen#4 main::screen#1 ] -zp ZP_WORD:5 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:7 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:9 [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_BYTE:3 [ main::x#2 main::x#1 ] +zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] +zp ZP_WORD:6 [ 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:8 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:10 [ 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 main::angle_w#0 main::$11 ] -zp ZP_WORD:12 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:14 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:15 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:17 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:19 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:12 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:14 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +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 ] reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_WORD:21 [ main::xw#0 atan2_16::x#0 ] -zp ZP_WORD:23 [ main::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_WORD:25 [ main::xw#0 atan2_16::x#0 ] +zp ZP_WORD:27 [ main::yw#0 atan2_16::y#0 ] reg byte a [ main::ang_w#0 ] -zp ZP_WORD:25 [ atan2_16::xd#0 ] -zp ZP_WORD:27 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:29 [ init_font_hex::$0 ] diff --git a/src/test/ref/cordic-atan2-clear.asm b/src/test/ref/cordic-atan2-clear.asm index 64d84b697..216802759 100644 --- a/src/test/ref/cordic-atan2-clear.asm +++ b/src/test/ref/cordic-atan2-clear.asm @@ -45,11 +45,12 @@ main: { // Utilizes symmetry around the center init_angle_screen: { .label _10 = $f - .label xw = $1a - .label yw = $1c + .label xw = $1e + .label yw = $20 .label angle_w = $f - .label ang_w = $1e - .label xb = 9 + .label ang_w = $22 + .label x = 9 + .label xb = $a .label screen_topline = 5 .label screen_bottomline = 7 .label y = 4 @@ -66,9 +67,10 @@ init_angle_screen: { b1: lda #$27 sta xb - ldx #0 + lda #0 + sta x b2: - txa + lda x asl eor #$ff clc @@ -93,14 +95,11 @@ init_angle_screen: { lda #$80 clc adc ang_w - stx $ff - ldy $ff + ldy x sta (screen_topline),y lda #$80 sec sbc ang_w - stx $ff - ldy $ff sta (screen_bottomline),y lda ang_w eor #$ff @@ -110,9 +109,10 @@ init_angle_screen: { sta (screen_topline),y lda ang_w sta (screen_bottomline),y - inx + inc x dec xb - cpx #$13+1 + lda x + cmp #$13+1 bcc b2 lda screen_topline sec @@ -137,19 +137,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($1a) x, signed word zeropage($1c) y) +// atan2_16(signed word zeropage($1e) x, signed word zeropage($20) y) atan2_16: { - .label _2 = $a - .label _7 = $c - .label yi = $a - .label xi = $c - .label xd = $1f - .label yd = $21 + .label _2 = $b + .label _7 = $d + .label yi = $b + .label xi = $d .label angle = $f - .label i = $e + .label xd = $13 + .label yd = $11 .label return = $f - .label x = $1a - .label y = $1c + .label x = $1e + .label y = $20 lda y+1 bmi !b1+ jmp b1 @@ -177,7 +176,7 @@ atan2_16: { lda #0 sta angle sta angle+1 - sta i + tax b10: lda yi+1 bne b11 @@ -208,38 +207,32 @@ atan2_16: { b8: rts b11: - ldy i + txa + tay lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - ldy i lda yi sta yd lda yi+1 sta yd+1 + b13: + cpy #1+1 + bcs b14 cpy #0 - beq !e+ - !: + beq b17 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: + b17: lda yi+1 - bpl b13 + bpl b18 lda xi sec sbc yd @@ -254,7 +247,7 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - lda i + txa asl tay sec @@ -264,15 +257,14 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - b14: - inc i - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + b19: + inx + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: jmp b10 - b13: + b18: lda xi clc adc yd @@ -287,7 +279,7 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - lda i + txa asl tay clc @@ -297,7 +289,27 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 + jmp b19 + b14: + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + dey + dey + jmp b13 b4: lda x sta xi @@ -312,15 +324,15 @@ atan2_16: { jmp b3 } // Make charset from proto chars -// init_font_hex(byte* zeropage($14) charset) +// init_font_hex(byte* zeropage($18) charset) init_font_hex: { .label _0 = $23 - .label idx = $19 - .label proto_lo = $16 - .label charset = $14 - .label c1 = $18 - .label proto_hi = $11 - .label c = $13 + .label idx = $1d + .label proto_lo = $1a + .label charset = $18 + .label c1 = $1c + .label proto_hi = $15 + .label c = $17 lda #0 sta c lda #=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [49] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [49] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [50] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [50] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [50] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [50] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [50] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [50] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [50] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [50] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -121,74 +121,97 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [60] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [61] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [62] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [63] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [67] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [68] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [68] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [68] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [70] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [67] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [68] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [69] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [69] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [70] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [71] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [72] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [73] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [74] (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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [75] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [75] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [75] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [76] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [77] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [74] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [78] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [79] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [80] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [81] (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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [82] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [83] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [84] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [85] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [77] phi() + [87] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [78] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [78] (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 ) - [78] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [88] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [88] (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 ) + [88] (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 - [79] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [79] (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 ) - [79] (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 ) - [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [89] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [89] (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 ) + [89] (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 ) + [90] *((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 - [81] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [81] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [82] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [83] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [85] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [91] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [91] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [92] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [93] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [94] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [95] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [96] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [97] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [98] 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 - [89] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [92] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [95] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [100] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [102] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [103] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [104] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [105] 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 - [96] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [98] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [106] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [107] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [108] 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 - [99] return + [109] return to:@return diff --git a/src/test/ref/cordic-atan2-clear.log b/src/test/ref/cordic-atan2-clear.log index 5c9f92b26..0c287bade 100644 --- a/src/test/ref/cordic-atan2-clear.log +++ b/src/test/ref/cordic-atan2-clear.log @@ -2,6 +2,7 @@ Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET Culled Empty Block (label) init_font_hex::@6 @@ -9,10 +10,13 @@ Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 Culled Empty Block (label) atan2_16::@11 Culled Empty Block (label) atan2_16::@12 -Culled Empty Block (label) atan2_16::@20 +Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@29 Culled Empty Block (label) atan2_16::@21 +Culled Empty Block (label) atan2_16::@22 Culled Empty Block (label) atan2_16::@23 -Culled Empty Block (label) atan2_16::@24 +Culled Empty Block (label) atan2_16::@31 +Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 Culled Empty Block (label) @2 Culled Empty Block (label) @4 @@ -134,13 +138,13 @@ atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 to:atan2_16::@5 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#12 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#9 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#12 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#2 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$8 ← (signed word) atan2_16::x#2 to:atan2_16::@6 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#13 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#10 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#13 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#3 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$6 ← - (signed word) atan2_16::x#3 (signed word~) atan2_16::$7 ← (signed word~) atan2_16::$6 @@ -148,94 +152,156 @@ atan2_16::@5: scope:[atan2_16] from atan2_16::@3 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 (signed word) atan2_16::y#9 ← phi( atan2_16::@4/(signed word) atan2_16::y#12 atan2_16::@5/(signed word) atan2_16::y#13 ) (signed word) atan2_16::x#10 ← phi( atan2_16::@4/(signed word) atan2_16::x#2 atan2_16::@5/(signed word) atan2_16::x#3 ) - (signed word) atan2_16::yi#8 ← phi( atan2_16::@4/(signed word) atan2_16::yi#9 atan2_16::@5/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yi#9 ← phi( atan2_16::@4/(signed word) atan2_16::yi#12 atan2_16::@5/(signed word) atan2_16::yi#13 ) (signed word~) atan2_16::$9 ← phi( atan2_16::@4/(signed word~) atan2_16::$8 atan2_16::@5/(signed word~) atan2_16::$7 ) (signed word) atan2_16::xi#0 ← (signed word~) atan2_16::$9 (word) atan2_16::angle#0 ← (number) 0 (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 (byte) atan2_16::i#0 ← (byte) 0 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 - (signed word) atan2_16::y#7 ← phi( atan2_16::@19/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) - (signed word) atan2_16::x#7 ← phi( atan2_16::@19/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) - (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) - (byte) atan2_16::i#6 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) - (signed word) atan2_16::xi#6 ← phi( atan2_16::@19/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#8 ) +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + (signed word) atan2_16::y#7 ← phi( atan2_16::@27/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) + (signed word) atan2_16::x#7 ← phi( atan2_16::@27/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) + (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) + (byte) atan2_16::i#6 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) + (signed word) atan2_16::xi#6 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#9 ) (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 (bool~) atan2_16::$18 ← ! (bool~) atan2_16::$17 if((bool~) atan2_16::$18) goto atan2_16::@16 to:atan2_16::@17 atan2_16::@16: scope:[atan2_16] from atan2_16::@15 - (signed word) atan2_16::y#14 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) - (signed word) atan2_16::x#13 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) - (word) atan2_16::angle#14 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) - (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) + (signed word) atan2_16::y#19 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) + (signed word) atan2_16::x#17 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) + (word) atan2_16::angle#19 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) (byte) atan2_16::i#2 ← phi( atan2_16::@15/(byte) atan2_16::i#6 ) + (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) (signed word) atan2_16::xi#3 ← phi( atan2_16::@15/(signed word) atan2_16::xi#6 ) - (signed word~) atan2_16::$19 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - (signed word) atan2_16::xd#0 ← (signed word~) atan2_16::$19 - (signed word~) atan2_16::$20 ← (signed word) atan2_16::yi#4 >> (byte) atan2_16::i#2 - (signed word) atan2_16::yd#0 ← (signed word~) atan2_16::$20 - (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (number) 0 - if((bool~) atan2_16::$21) goto atan2_16::@18 - to:atan2_16::@22 -atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@19 - (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@19/(signed word) atan2_16::y#8 ) - (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@19/(signed word) atan2_16::x#8 ) - (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#4 + (byte) atan2_16::shift#0 ← (byte) atan2_16::i#2 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@27/(signed word) atan2_16::y#8 ) + (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@27/(signed word) atan2_16::x#8 ) + (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 (bool~) atan2_16::$11 ← ! (bool~) atan2_16::$10 if((bool~) atan2_16::$11) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + (signed word) atan2_16::y#18 ← phi( atan2_16::@16/(signed word) atan2_16::y#19 atan2_16::@19/(signed word) atan2_16::y#20 ) + (signed word) atan2_16::x#16 ← phi( atan2_16::@16/(signed word) atan2_16::x#17 atan2_16::@19/(signed word) atan2_16::x#18 ) + (word) atan2_16::angle#18 ← phi( atan2_16::@16/(word) atan2_16::angle#19 atan2_16::@19/(word) atan2_16::angle#20 ) + (byte) atan2_16::i#10 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::i#11 ) + (signed word) atan2_16::xi#11 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xi#12 ) + (signed word) atan2_16::yi#14 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 atan2_16::@19/(signed word) atan2_16::yi#15 ) + (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 + if((bool~) atan2_16::$19) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#20 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#18 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#20 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#11 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#12 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yi#15 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#3 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (signed word) atan2_16::yd#3 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#3 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 + (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 + (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#16 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#14 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#16 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#8 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#9 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yd#8 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#8 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::yi#10 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#4 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 + (bool~) atan2_16::$20 ← ! (bool~) atan2_16::$25 + if((bool~) atan2_16::$20) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + (signed word) atan2_16::y#14 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 atan2_16::@24/(signed word) atan2_16::y#17 ) + (signed word) atan2_16::x#13 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 atan2_16::@24/(signed word) atan2_16::x#15 ) + (word) atan2_16::angle#14 ← phi( atan2_16::@20/(word) atan2_16::angle#16 atan2_16::@24/(word) atan2_16::angle#17 ) + (byte) atan2_16::i#7 ← phi( atan2_16::@20/(byte) atan2_16::i#8 atan2_16::@24/(byte) atan2_16::i#9 ) + (signed word) atan2_16::xd#9 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 atan2_16::@24/(signed word) atan2_16::xd#2 ) + (signed word) atan2_16::yd#9 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 atan2_16::@24/(signed word) atan2_16::yd#2 ) + (signed word) atan2_16::xi#7 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 atan2_16::@24/(signed word) atan2_16::xi#10 ) + (signed word) atan2_16::yi#5 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 atan2_16::@24/(signed word) atan2_16::yi#11 ) + (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 + if((bool~) atan2_16::$21) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + (signed word) atan2_16::y#17 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 ) + (signed word) atan2_16::x#15 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 ) + (word) atan2_16::angle#17 ← phi( atan2_16::@20/(word) atan2_16::angle#16 ) + (byte) atan2_16::i#9 ← phi( atan2_16::@20/(byte) atan2_16::i#8 ) + (signed word) atan2_16::xi#10 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 ) + (signed word) atan2_16::yi#11 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yd#4 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 ) + (signed word) atan2_16::xd#4 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 ) + (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 + (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 to:atan2_16::@25 -atan2_16::@18: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#10 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#11 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#7 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#3 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#1 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#5 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#1 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#4 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#1 - (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#5 - (signed word) atan2_16::xd#1 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#10 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#11 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#7 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#3 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#5 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#6 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#5 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#4 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#5 + (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#6 - (signed word) atan2_16::xd#5 (byte~) atan2_16::$23 ← (byte) atan2_16::i#3 * (const byte) SIZEOF_WORD (word) atan2_16::angle#2 ← (word) atan2_16::angle#7 + *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) - to:atan2_16::@19 -atan2_16::@22: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#11 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#12 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#8 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#4 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#2 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#6 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#2 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#5 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#2 - (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#6 + (signed word) atan2_16::xd#2 + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#11 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#12 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#8 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#4 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#6 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#7 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#6 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#5 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#6 + (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#7 + (signed word) atan2_16::xd#6 (byte~) atan2_16::$24 ← (byte) atan2_16::i#4 * (const byte) SIZEOF_WORD (word) atan2_16::angle#3 ← (word) atan2_16::angle#8 - *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) - to:atan2_16::@19 -atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@22 - (signed word) atan2_16::y#8 ← phi( atan2_16::@18/(signed word) atan2_16::y#10 atan2_16::@22/(signed word) atan2_16::y#11 ) - (signed word) atan2_16::xi#7 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@22/(signed word) atan2_16::xi#2 ) - (signed word) atan2_16::x#8 ← phi( atan2_16::@18/(signed word) atan2_16::x#11 atan2_16::@22/(signed word) atan2_16::x#12 ) - (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@22/(word) atan2_16::angle#3 ) - (signed word) atan2_16::yi#7 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@22/(signed word) atan2_16::yi#2 ) - (byte) atan2_16::i#5 ← phi( atan2_16::@18/(byte) atan2_16::i#3 atan2_16::@22/(byte) atan2_16::i#4 ) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + (signed word) atan2_16::y#8 ← phi( atan2_16::@26/(signed word) atan2_16::y#10 atan2_16::@30/(signed word) atan2_16::y#11 ) + (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + (signed word) atan2_16::x#8 ← phi( atan2_16::@26/(signed word) atan2_16::x#11 atan2_16::@30/(signed word) atan2_16::x#12 ) + (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + (byte) atan2_16::i#5 ← phi( atan2_16::@26/(byte) atan2_16::i#3 atan2_16::@30/(byte) atan2_16::i#4 ) (byte) atan2_16::i#1 ← (byte) atan2_16::i#5 + rangenext(0,atan2_16::$16) (bool~) atan2_16::$22 ← (byte) atan2_16::i#1 != rangelast(0,atan2_16::$16) if((bool~) atan2_16::$22) goto atan2_16::@15 to:atan2_16::@17 -atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@25 - (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@25/(word) atan2_16::angle#4 ) - (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@25/(signed word) atan2_16::y#6 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@33/(signed word) atan2_16::y#6 ) (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 (bool~) atan2_16::$14 ← ! (bool~) atan2_16::$13 if((bool~) atan2_16::$14) goto atan2_16::@8 to:atan2_16::@13 -atan2_16::@25: scope:[atan2_16] from atan2_16::@17 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 (signed word) atan2_16::y#6 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 ) (word) atan2_16::angle#9 ← phi( atan2_16::@17/(word) atan2_16::angle#1 ) (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 @@ -437,13 +503,14 @@ SYMBOL TABLE SSA (number~) atan2_16::$16 (bool~) atan2_16::$17 (bool~) atan2_16::$18 -(signed word~) atan2_16::$19 +(bool~) atan2_16::$19 (signed word~) atan2_16::$2 -(signed word~) atan2_16::$20 +(bool~) atan2_16::$20 (bool~) atan2_16::$21 (bool~) atan2_16::$22 (byte~) atan2_16::$23 (byte~) atan2_16::$24 +(bool~) atan2_16::$25 (signed word~) atan2_16::$3 (signed word~) atan2_16::$4 (bool~) atan2_16::$5 @@ -459,9 +526,14 @@ SYMBOL TABLE SSA (label) atan2_16::@18 (label) atan2_16::@19 (label) atan2_16::@2 -(label) atan2_16::@22 +(label) atan2_16::@20 +(label) atan2_16::@24 (label) atan2_16::@25 +(label) atan2_16::@26 +(label) atan2_16::@27 (label) atan2_16::@3 +(label) atan2_16::@30 +(label) atan2_16::@33 (label) atan2_16::@4 (label) atan2_16::@5 (label) atan2_16::@6 @@ -477,7 +549,12 @@ SYMBOL TABLE SSA (word) atan2_16::angle#13 (word) atan2_16::angle#14 (word) atan2_16::angle#15 +(word) atan2_16::angle#16 +(word) atan2_16::angle#17 +(word) atan2_16::angle#18 +(word) atan2_16::angle#19 (word) atan2_16::angle#2 +(word) atan2_16::angle#20 (word) atan2_16::angle#3 (word) atan2_16::angle#4 (word) atan2_16::angle#5 @@ -488,17 +565,28 @@ SYMBOL TABLE SSA (byte) atan2_16::i (byte) atan2_16::i#0 (byte) atan2_16::i#1 +(byte) atan2_16::i#10 +(byte) atan2_16::i#11 (byte) atan2_16::i#2 (byte) atan2_16::i#3 (byte) atan2_16::i#4 (byte) atan2_16::i#5 (byte) atan2_16::i#6 +(byte) atan2_16::i#7 +(byte) atan2_16::i#8 +(byte) atan2_16::i#9 (word) atan2_16::return (word) atan2_16::return#0 (word) atan2_16::return#1 (word) atan2_16::return#2 (word) atan2_16::return#3 (word) atan2_16::return#4 +(byte) atan2_16::shift +(byte) atan2_16::shift#0 +(byte) atan2_16::shift#1 +(byte) atan2_16::shift#2 +(byte) atan2_16::shift#3 +(byte) atan2_16::shift#4 (signed word) atan2_16::x (signed word) atan2_16::x#0 (signed word) atan2_16::x#1 @@ -506,6 +594,11 @@ SYMBOL TABLE SSA (signed word) atan2_16::x#11 (signed word) atan2_16::x#12 (signed word) atan2_16::x#13 +(signed word) atan2_16::x#14 +(signed word) atan2_16::x#15 +(signed word) atan2_16::x#16 +(signed word) atan2_16::x#17 +(signed word) atan2_16::x#18 (signed word) atan2_16::x#2 (signed word) atan2_16::x#3 (signed word) atan2_16::x#4 @@ -518,15 +611,27 @@ SYMBOL TABLE SSA (signed word) atan2_16::xd#0 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 +(signed word) atan2_16::xd#3 +(signed word) atan2_16::xd#4 +(signed word) atan2_16::xd#5 +(signed word) atan2_16::xd#6 +(signed word) atan2_16::xd#7 +(signed word) atan2_16::xd#8 +(signed word) atan2_16::xd#9 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 (signed word) atan2_16::xi#1 +(signed word) atan2_16::xi#10 +(signed word) atan2_16::xi#11 +(signed word) atan2_16::xi#12 (signed word) atan2_16::xi#2 (signed word) atan2_16::xi#3 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#7 +(signed word) atan2_16::xi#8 +(signed word) atan2_16::xi#9 (signed word) atan2_16::y (signed word) atan2_16::y#0 (signed word) atan2_16::y#1 @@ -536,7 +641,12 @@ SYMBOL TABLE SSA (signed word) atan2_16::y#13 (signed word) atan2_16::y#14 (signed word) atan2_16::y#15 +(signed word) atan2_16::y#16 +(signed word) atan2_16::y#17 +(signed word) atan2_16::y#18 +(signed word) atan2_16::y#19 (signed word) atan2_16::y#2 +(signed word) atan2_16::y#20 (signed word) atan2_16::y#3 (signed word) atan2_16::y#4 (signed word) atan2_16::y#5 @@ -548,10 +658,22 @@ SYMBOL TABLE SSA (signed word) atan2_16::yd#0 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +(signed word) atan2_16::yd#3 +(signed word) atan2_16::yd#4 +(signed word) atan2_16::yd#5 +(signed word) atan2_16::yd#6 +(signed word) atan2_16::yd#7 +(signed word) atan2_16::yd#8 +(signed word) atan2_16::yd#9 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 (signed word) atan2_16::yi#1 (signed word) atan2_16::yi#10 +(signed word) atan2_16::yi#11 +(signed word) atan2_16::yi#12 +(signed word) atan2_16::yi#13 +(signed word) atan2_16::yi#14 +(signed word) atan2_16::yi#15 (signed word) atan2_16::yi#2 (signed word) atan2_16::yi#3 (signed word) atan2_16::yi#4 @@ -759,9 +881,16 @@ Adding number conversion cast (unumber) 0 in (word) atan2_16::angle#0 ← (numbe Adding number conversion cast (unumber) 1 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (unumber)(number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 -Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (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 (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 +Adding number conversion cast (unumber) 0 in (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 Adding number conversion cast (unumber) $8000 in (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 Adding number conversion cast (unumber) atan2_16::$12 in (number~) atan2_16::$12 ← (unumber)(number) $8000 - (word) atan2_16::angle#9 @@ -914,9 +1043,16 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 -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 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast $8000 Simplifying constant pointer cast (byte*) 53266 @@ -959,9 +1095,16 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 -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 signed number type (signed byte) 2 +Finalized signed number type (signed byte) 2 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (word) $8000 Finalized unsigned number type (word) $3fff @@ -999,9 +1142,10 @@ Inferred type updated to byte in (unumber~) init_angle_screen::$11 ← > (word~) 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 Inversing boolean not [63] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [62] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 -Inversing boolean not [75] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [74] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 -Inversing boolean not [93] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [92] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 -Inversing boolean not [141] (bool~) main::$6 ← (byte*) main::clear_char#2 >= (byte*~) main::$4 from [140] (bool~) main::$5 ← (byte*) main::clear_char#2 < (byte*~) main::$4 +Inversing boolean not [72] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [71] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 +Inversing boolean not [83] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [82] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 +Inversing boolean not [107] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [106] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 +Inversing boolean not [155] (bool~) main::$6 ← (byte*) main::clear_char#2 >= (byte*~) main::$4 from [154] (bool~) main::$5 ← (byte*) main::clear_char#2 < (byte*~) main::$4 Successful SSA optimization Pass2UnaryNotSimplification 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 @@ -1013,19 +1157,34 @@ Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#2 (signed word~) atan2_16::$3 (signed word) atan2_16::y#3 Alias (signed word) atan2_16::x#5 = (signed word) atan2_16::x#9 (signed word) atan2_16::x#6 Alias (signed word~) atan2_16::$2 = (signed word~) atan2_16::$1 -Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#9 (signed word) atan2_16::yi#10 +Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#12 (signed word) atan2_16::yi#13 Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#2 (signed word~) atan2_16::$8 (signed word) atan2_16::x#3 Alias (signed word) atan2_16::y#12 = (signed word) atan2_16::y#15 (signed word) atan2_16::y#13 Alias (signed word~) atan2_16::$7 = (signed word~) atan2_16::$6 Alias (signed word) atan2_16::xi#0 = (signed word~) atan2_16::$9 -Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::i#3 (byte) atan2_16::i#4 -Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yi#5 (signed word) atan2_16::yi#6 -Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#14 (word) atan2_16::angle#7 (word) atan2_16::angle#8 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#7 (signed word) atan2_16::x#12 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#7 (signed word) atan2_16::y#11 -Alias (signed word) atan2_16::xd#0 = (signed word~) atan2_16::$19 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 -Alias (signed word) atan2_16::yd#0 = (signed word~) atan2_16::$20 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xd#0 +Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yd#0 +Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::shift#0 +Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#19 +Alias (signed word) atan2_16::x#17 = (signed word) atan2_16::x#7 +Alias (signed word) atan2_16::y#19 = (signed word) atan2_16::y#7 +Alias (signed word) atan2_16::xd#3 = (signed word) atan2_16::xd#7 (signed word) atan2_16::xd#8 (signed word) atan2_16::xd#4 +Alias (signed word) atan2_16::yd#3 = (signed word) atan2_16::yd#7 (signed word) atan2_16::yd#8 (signed word) atan2_16::yd#4 +Alias (byte) atan2_16::shift#2 = (byte) atan2_16::shift#3 (byte) atan2_16::shift#4 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#15 (signed word) atan2_16::yi#14 (signed word) atan2_16::yi#11 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#12 (signed word) atan2_16::xi#11 (signed word) atan2_16::xi#9 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#11 (byte) atan2_16::i#8 (byte) atan2_16::i#9 +Alias (word) atan2_16::angle#16 = (word) atan2_16::angle#20 (word) atan2_16::angle#18 (word) atan2_16::angle#17 +Alias (signed word) atan2_16::x#14 = (signed word) atan2_16::x#18 (signed word) atan2_16::x#16 (signed word) atan2_16::x#15 +Alias (signed word) atan2_16::y#16 = (signed word) atan2_16::y#20 (signed word) atan2_16::y#18 (signed word) atan2_16::y#17 +Alias (signed word) atan2_16::xi#4 = (signed word) atan2_16::xi#7 (signed word) atan2_16::xi#5 +Alias (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#9 (signed word) atan2_16::yd#6 +Alias (signed word) atan2_16::yi#5 = (signed word) atan2_16::yi#6 (signed word) atan2_16::yi#7 +Alias (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#9 (signed word) atan2_16::xd#6 +Alias (byte) atan2_16::i#3 = (byte) atan2_16::i#7 (byte) atan2_16::i#4 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#7 (word) atan2_16::angle#8 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#12 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#11 Alias (word) atan2_16::angle#1 = (word) atan2_16::angle#9 Alias (signed word) atan2_16::y#5 = (signed word) atan2_16::y#6 Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 @@ -1053,20 +1212,24 @@ Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$11 Successful SSA optimization Pass2AliasElimination Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#5 (signed word) atan2_16::x#10 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#12 (signed word) atan2_16::y#9 -Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#8 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#5 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#8 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#8 +Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#9 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#5 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#4 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#3 (byte) atan2_16::i#5 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 Successful SSA optimization Pass2AliasElimination -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#4 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#4 -Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte*) init_font_hex::proto_hi#2 Self Phi Eliminated (byte*) init_font_hex::proto_lo#2 Self Phi Eliminated (byte*) init_font_hex::charset#3 Self Phi Eliminated (byte) init_font_hex::c1#2 Self Phi Eliminated (byte) init_font_hex::c#2 +Self Phi Eliminated (signed word) atan2_16::yi#10 +Self Phi Eliminated (signed word) atan2_16::xi#10 +Self Phi Eliminated (byte) atan2_16::i#10 +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*) main::clear_char#2 @@ -1082,30 +1245,39 @@ 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 (signed word) atan2_16::y#1 (signed word) atan2_16::y#0 Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0 -Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#1 -Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#1 +Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3 +Identical Phi Values (signed word) atan2_16::xi#10 (signed word) atan2_16::xi#3 +Identical Phi Values (byte) atan2_16::i#10 (byte) atan2_16::i#2 +Identical Phi Values (word) atan2_16::angle#14 (word) atan2_16::angle#12 +Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19 Identical Phi Values (byte*) main::clear_char#2 (byte*) main::clear_char#5 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 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 +Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 Simple Condition (bool~) atan2_16::$0 [41] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 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::$21 [71] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -Simple Condition (bool~) atan2_16::$11 [76] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$22 [90] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [94] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$3 [137] if(*((byte*) RASTER#0)!=(byte) $ff) goto main::@4 -Simple Condition (bool~) main::$6 [142] if((byte*) main::clear_char#5>=(byte*~) main::$4) goto main::@1 -Simple Condition (bool~) init_angle_screen::$15 [188] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 -Simple Condition (bool~) init_angle_screen::$16 [194] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +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::$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 +Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$3 [151] if(*((byte*) RASTER#0)!=(byte) $ff) goto main::@4 +Simple Condition (bool~) main::$6 [156] if((byte*) main::clear_char#5>=(byte*~) main::$4) goto main::@1 +Simple Condition (bool~) init_angle_screen::$15 [202] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +Simple Condition (bool~) init_angle_screen::$16 [208] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [90] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 +Negating conditional jump and destination [104] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [36] (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 @@ -1136,10 +1308,10 @@ Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 Constant (const byte*) init_angle_screen::screen#0 = SCREEN#0 Constant (const byte*) main::clear_char#0 = CHARSET#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (word)main::toD0181_screen#0 in [115] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [119] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (word)main::toD0181_screen#0 in [129] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [133] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [134] if(true) goto main::@4 +if() condition always true - replacing block destination [148] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 @@ -1147,9 +1319,10 @@ Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 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 [192] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ -Resolved ranged comparison value [194] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Rewriting conditional comparison [188] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +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 Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 @@ -1159,6 +1332,8 @@ 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 @@ -1166,6 +1341,8 @@ 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 @@ -1176,20 +1353,25 @@ 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 Self Phi Eliminated (byte) init_font_hex::c#5 +Self Phi Eliminated (signed word) atan2_16::x#17 +Self Phi Eliminated (signed word) atan2_16::y#19 Self Phi Eliminated (byte*) main::clear_char#5 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 (signed word) atan2_16::x#17 (signed word) atan2_16::x#0 +Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 Constant right-side identified [29] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 -Constant right-side identified [69] (byte*~) main::$4 ← (const byte*) CHARSET#0 + (word) $800 -Constant right-side identified [73] (byte*) init_angle_screen::screen_topline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -Constant right-side identified [74] (byte*) init_angle_screen::screen_bottomline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c +Constant right-side identified [76] (byte*~) main::$4 ← (const byte*) CHARSET#0 + (word) $800 +Constant right-side identified [80] (byte*) init_angle_screen::screen_topline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c +Constant right-side identified [81] (byte*) init_angle_screen::screen_bottomline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0 Constant (const byte) atan2_16::$16 = CORDIC_ITERATIONS_16#0-1 @@ -1199,8 +1381,8 @@ Constant (const byte*) main::$4 = CHARSET#0+$800 Constant (const byte*) init_angle_screen::screen_topline#0 = init_angle_screen::screen#0+(word)$28*$c Constant (const byte*) init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0+(word)$28*$c Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [47] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [48] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 +Resolved ranged next value [54] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [55] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 Adding number conversion cast (unumber) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 Adding number conversion cast (unumber) 1 in if((byte) atan2_16::i#1==(unumber)(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 Successful SSA optimization PassNAddNumberTypeConversions @@ -1209,36 +1391,36 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [54] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [57] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [61] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [64] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [54] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [56] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [61] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [63] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$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 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [54] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [55] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [61] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [62] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$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 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [54] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [61] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [66] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 keeping init_angle_screen::xw#0 -Inlining Noop Cast [69] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 keeping init_angle_screen::yw#0 +Inlining Noop Cast [73] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 keeping init_angle_screen::xw#0 +Inlining Noop Cast [76] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 keeping init_angle_screen::yw#0 Successful SSA optimization Pass2NopCastInlining -Rewriting division to use shift [34] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 -Rewriting multiplication to use shift [38] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [42] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [63] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 -Rewriting multiplication to use shift [67] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 +Rewriting division to use shift [31] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 +Rewriting multiplication to use shift [45] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [49] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [70] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 +Rewriting multiplication to use shift [74] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) init_font_hex::c#0 Inlining constant with var siblings (const byte) init_font_hex::c1#0 @@ -1293,11 +1475,12 @@ Successful SSA optimization PassNEliminateUnusedVars Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2) Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3) -Added new block during phi lifting atan2_16::@26(between atan2_16::@19 and atan2_16::@15) -Added new block during phi lifting atan2_16::@27(between atan2_16::@15 and atan2_16::@17) -Added new block during phi lifting atan2_16::@28(between atan2_16::@19 and atan2_16::@17) -Added new block during phi lifting atan2_16::@29(between atan2_16::@17 and atan2_16::@7) -Added new block during phi lifting atan2_16::@30(between atan2_16::@7 and atan2_16::@8) +Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) +Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) +Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) +Added new block during phi lifting atan2_16::@37(between atan2_16::@20 and atan2_16::@25) +Added new block during phi lifting atan2_16::@38(between atan2_16::@17 and atan2_16::@7) +Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_16::@8) Added new block during phi lifting init_angle_screen::@6(between init_angle_screen::@3 and init_angle_screen::@1) Added new block during phi lifting init_angle_screen::@7(between init_angle_screen::@5 and init_angle_screen::@2) Adding NOP phi() at start of @begin @@ -1319,45 +1502,55 @@ Calls in [] to main:5 Calls in [main] to init_font_hex:9 init_angle_screen:14 Calls in [init_angle_screen] to atan2_16:32 -Created 26 initial phi equivalence classes +Created 31 initial phi equivalence classes Coalesced [21] main::clear_char#6 ← main::clear_char#1 Coalesced [52] init_angle_screen::y#6 ← init_angle_screen::y#1 Coalesced [53] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#1 Coalesced [54] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#1 Coalesced [55] init_angle_screen::x#4 ← init_angle_screen::x#1 Coalesced [56] init_angle_screen::xb#4 ← init_angle_screen::xb#1 -Coalesced [59] atan2_16::yi#12 ← atan2_16::$2 -Coalesced [63] atan2_16::xi#9 ← atan2_16::$7 -Coalesced [65] atan2_16::yi#14 ← atan2_16::yi#0 -Coalesced [66] atan2_16::xi#11 ← atan2_16::xi#0 -Coalesced [69] atan2_16::angle#17 ← atan2_16::angle#12 -Coalesced [74] atan2_16::angle#22 ← atan2_16::angle#4 +Coalesced [59] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [63] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [65] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [66] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [69] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [74] atan2_16::angle#27 ← atan2_16::angle#4 Coalesced [78] atan2_16::return#5 ← atan2_16::angle#5 Coalesced [81] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [82] atan2_16::angle#21 ← atan2_16::angle#1 -Coalesced [90] atan2_16::yi#16 ← atan2_16::yi#2 -Coalesced [91] atan2_16::angle#20 ← atan2_16::angle#3 -Coalesced [92] atan2_16::xi#13 ← atan2_16::xi#2 -Coalesced [96] atan2_16::yi#13 ← atan2_16::yi#7 -Coalesced [97] atan2_16::xi#10 ← atan2_16::xi#7 -Coalesced [98] atan2_16::i#7 ← atan2_16::i#1 -Coalesced [99] atan2_16::angle#16 ← atan2_16::angle#13 -Coalesced (already) [100] atan2_16::angle#18 ← atan2_16::angle#13 -Coalesced [105] atan2_16::yi#15 ← atan2_16::yi#1 -Coalesced [106] atan2_16::angle#19 ← atan2_16::angle#2 -Coalesced [107] atan2_16::xi#12 ← atan2_16::xi#1 -Not coalescing [108] atan2_16::xi#8 ← atan2_16::x#0 -Not coalescing [109] atan2_16::yi#11 ← atan2_16::y#0 -Coalesced [112] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [134] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [135] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [136] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [137] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [138] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [139] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [140] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [141] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 20 phi equivalence classes +Coalesced [82] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [83] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [84] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [85] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [91] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [92] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [99] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [100] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [101] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [105] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [106] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [107] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [108] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [109] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [114] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [115] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [116] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [117] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [118] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [122] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [123] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [124] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [125] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [126] atan2_16::yi#16 ← atan2_16::y#0 +Coalesced [129] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [151] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [152] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [153] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [154] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [155] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [156] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [157] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [158] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced down to 23 phi equivalence classes Culled Empty Block (label) @1 Culled Empty Block (label) @3 Culled Empty Block (label) @7 @@ -1367,11 +1560,12 @@ Culled Empty Block (label) main::toD0181_@return Culled Empty Block (label) main::@13 Culled Empty Block (label) init_angle_screen::@6 Culled Empty Block (label) init_angle_screen::@7 -Culled Empty Block (label) atan2_16::@27 -Culled Empty Block (label) atan2_16::@30 -Culled Empty Block (label) atan2_16::@29 -Culled Empty Block (label) atan2_16::@26 -Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@35 +Culled Empty Block (label) atan2_16::@39 +Culled Empty Block (label) atan2_16::@38 +Culled Empty Block (label) atan2_16::@34 +Culled Empty Block (label) atan2_16::@36 +Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 @@ -1382,8 +1576,13 @@ Renumbering block atan2_16::@16 to atan2_16::@11 Renumbering block atan2_16::@17 to atan2_16::@12 Renumbering block atan2_16::@18 to atan2_16::@13 Renumbering block atan2_16::@19 to atan2_16::@14 -Renumbering block atan2_16::@22 to atan2_16::@15 -Renumbering block atan2_16::@25 to atan2_16::@16 +Renumbering block atan2_16::@20 to atan2_16::@15 +Renumbering block atan2_16::@24 to atan2_16::@16 +Renumbering block atan2_16::@25 to atan2_16::@17 +Renumbering block atan2_16::@26 to atan2_16::@18 +Renumbering block atan2_16::@27 to atan2_16::@19 +Renumbering block atan2_16::@30 to atan2_16::@20 +Renumbering block atan2_16::@33 to atan2_16::@21 Renumbering block main::@4 to main::@2 Renumbering block main::@5 to main::@3 Renumbering block main::@6 to main::@4 @@ -1483,32 +1682,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16 [45] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 to:atan2_16::@3 atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 - [46] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) + [46] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [49] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [49] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [50] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [50] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [50] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [50] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [50] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [50] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [50] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [50] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -1521,76 +1720,99 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [60] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [61] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [62] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [63] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [67] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [68] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [68] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [68] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [70] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [67] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [68] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [69] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [69] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [70] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [71] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [72] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [73] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [74] (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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [75] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [75] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [75] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [76] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [77] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [74] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [78] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [79] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [80] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [81] (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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [82] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [83] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [84] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [85] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [77] phi() + [87] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [78] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [78] (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 ) - [78] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [88] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [88] (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 ) + [88] (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 - [79] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [79] (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 ) - [79] (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 ) - [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [89] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [89] (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 ) + [89] (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 ) + [90] *((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 - [81] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [81] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [82] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [83] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [85] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [91] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [91] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [92] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [93] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [94] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [95] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [96] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [97] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [98] 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 - [89] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [92] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [95] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [100] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [102] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [103] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [104] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [105] 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 - [96] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [98] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [106] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [107] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [108] 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 - [99] return + [109] return to:@return @@ -1610,7 +1832,7 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle (word) atan2_16::angle#1 3.0 (word) atan2_16::angle#11 4.0 -(word) atan2_16::angle#12 364.0 +(word) atan2_16::angle#12 190.66666666666666 (word) atan2_16::angle#13 1334.6666666666667 (word) atan2_16::angle#2 2002.0 (word) atan2_16::angle#3 2002.0 @@ -1619,32 +1841,44 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle#6 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 1501.5 -(byte) atan2_16::i#2 429.0 +(byte) atan2_16::i#2 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 34.99999999999999 (word) atan2_16::return#2 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 20002.0 +(byte) atan2_16::shift#2 8001.25 +(byte~) atan2_16::shift#5 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 3.8928571428571437 +(signed word) atan2_16::x#0 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 600.5999999999999 +(signed word) atan2_16::xd#1 6667.333333333333 +(signed word~) atan2_16::xd#10 1001.0 +(signed word) atan2_16::xd#2 1001.0 +(signed word) atan2_16::xd#3 7668.333333333332 +(signed word) atan2_16::xd#5 1001.0 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 6.0 (signed word) atan2_16::xi#1 500.5 +(signed word~) atan2_16::xi#13 4.0 (signed word) atan2_16::xi#2 500.5 -(signed word) atan2_16::xi#3 801.2 -(signed word) atan2_16::xi#7 1001.0 -(signed word~) atan2_16::xi#8 4.0 +(signed word) atan2_16::xi#3 267.0666666666667 +(signed word) atan2_16::xi#8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 3.633333333333334 +(signed word) atan2_16::y#0 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 1501.5 +(signed word) atan2_16::yd#1 10001.0 +(signed word~) atan2_16::yd#10 2002.0 +(signed word) atan2_16::yd#2 2002.0 +(signed word) atan2_16::yd#3 4601.0 +(signed word) atan2_16::yd#5 2002.0 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 1.2000000000000002 (signed word) atan2_16::yi#1 667.3333333333334 -(signed word~) atan2_16::yi#11 4.0 +(signed word~) atan2_16::yi#16 4.0 (signed word) atan2_16::yi#2 667.3333333333334 -(signed word) atan2_16::yi#3 858.2857142857142 -(signed word) atan2_16::yi#7 1001.0 +(signed word) atan2_16::yi#3 353.4117647058823 +(signed word) atan2_16::yi#8 1001.0 (void()) init_angle_screen((byte*) init_angle_screen::screen) (word~) init_angle_screen::$10 202.0 (byte~) init_angle_screen::$12 202.0 @@ -1728,11 +1962,14 @@ Initial phi equivalence classes [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#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#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -1754,8 +1991,6 @@ Added variable init_angle_screen::ang_w#0 to zero page equivalence class [ init_ Added variable init_angle_screen::$12 to zero page equivalence class [ init_angle_screen::$12 ] Added variable init_angle_screen::$13 to zero page equivalence class [ init_angle_screen::$13 ] Added variable init_angle_screen::$14 to zero page equivalence class [ init_angle_screen::$14 ] -Added variable atan2_16::xd#0 to zero page equivalence class [ atan2_16::xd#0 ] -Added variable atan2_16::yd#0 to zero page equivalence class [ atan2_16::yd#0 ] Added variable atan2_16::$24 to zero page equivalence class [ atan2_16::$24 ] Added variable atan2_16::$23 to zero page equivalence class [ atan2_16::$23 ] Added variable init_font_hex::$0 to zero page equivalence class [ init_font_hex::$0 ] @@ -1769,11 +2004,14 @@ Complete equivalence classes [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#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#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -1795,8 +2033,6 @@ Complete equivalence classes [ init_angle_screen::$12 ] [ init_angle_screen::$13 ] [ init_angle_screen::$14 ] -[ atan2_16::xd#0 ] -[ atan2_16::yd#0 ] [ atan2_16::$24 ] [ atan2_16::$23 ] [ init_font_hex::$0 ] @@ -1809,40 +2045,41 @@ Allocated zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen:: Allocated zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] Allocated zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Allocated zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Allocated zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +Allocated zp ZP_WORD:11 [ 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 ] +Allocated zp ZP_WORD:13 [ 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 ] Allocated zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] Allocated zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] Allocated zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] -Allocated zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:28 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_BYTE:30 [ init_angle_screen::$2 ] -Allocated zp ZP_BYTE:31 [ init_angle_screen::$3 ] -Allocated zp ZP_WORD:32 [ init_angle_screen::xw#0 ] -Allocated zp ZP_BYTE:34 [ init_angle_screen::$6 ] -Allocated zp ZP_WORD:35 [ init_angle_screen::yw#0 ] -Allocated zp ZP_WORD:37 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:39 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:41 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:43 [ init_angle_screen::angle_w#0 ] -Allocated zp ZP_WORD:45 [ init_angle_screen::$10 ] -Allocated zp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] -Allocated zp ZP_BYTE:48 [ init_angle_screen::$12 ] -Allocated zp ZP_BYTE:49 [ init_angle_screen::$13 ] -Allocated zp ZP_BYTE:50 [ init_angle_screen::$14 ] -Allocated zp ZP_WORD:51 [ atan2_16::xd#0 ] -Allocated zp ZP_WORD:53 [ atan2_16::yd#0 ] -Allocated zp ZP_BYTE:55 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:56 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:57 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:58 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:59 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:60 [ init_font_hex::idx#3 ] +Allocated zp ZP_BYTE:20 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Allocated zp ZP_WORD:21 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated zp ZP_WORD:23 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] +Allocated zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated zp ZP_BYTE:35 [ init_angle_screen::$2 ] +Allocated zp ZP_BYTE:36 [ init_angle_screen::$3 ] +Allocated zp ZP_WORD:37 [ init_angle_screen::xw#0 ] +Allocated zp ZP_BYTE:39 [ init_angle_screen::$6 ] +Allocated zp ZP_WORD:40 [ init_angle_screen::yw#0 ] +Allocated zp ZP_WORD:42 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:44 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:46 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:48 [ init_angle_screen::angle_w#0 ] +Allocated zp ZP_WORD:50 [ init_angle_screen::$10 ] +Allocated zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] +Allocated zp ZP_BYTE:53 [ init_angle_screen::$12 ] +Allocated zp ZP_BYTE:54 [ init_angle_screen::$13 ] +Allocated zp ZP_BYTE:55 [ init_angle_screen::$14 ] +Allocated zp ZP_BYTE:56 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:57 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:58 [ init_font_hex::$0 ] +Allocated zp ZP_BYTE:59 [ init_font_hex::$1 ] +Allocated zp ZP_BYTE:60 [ init_font_hex::$2 ] +Allocated zp ZP_BYTE:61 [ init_font_hex::idx#3 ] INITIAL ASM //SEG0 File Comments @@ -1880,7 +2117,7 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label clear_char = 2 //SEG11 [5] call init_font_hex - //SEG12 [77] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [87] 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] @@ -1951,17 +2188,17 @@ main: { // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center init_angle_screen: { - .label _2 = $1e - .label _3 = $1f - .label _6 = $22 - .label _10 = $2d - .label _12 = $30 - .label _13 = $31 - .label _14 = $32 - .label xw = $20 - .label yw = $23 - .label angle_w = $2b - .label ang_w = $2f + .label _2 = $23 + .label _3 = $24 + .label _6 = $27 + .label _10 = $32 + .label _12 = $35 + .label _13 = $36 + .label _14 = $37 + .label xw = $25 + .label yw = $28 + .label angle_w = $30 + .label ang_w = $34 .label x = 9 .label xb = $a .label screen_topline = 5 @@ -2140,24 +2377,25 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($25) x, signed word zeropage($27) y) +// atan2_16(signed word zeropage($2a) x, signed word zeropage($2c) y) atan2_16: { .label _2 = $b .label _7 = $d - .label _23 = $38 - .label _24 = $37 + .label _23 = $39 + .label _24 = $38 .label yi = $b .label xi = $d - .label xd = $33 - .label yd = $35 .label angle = $12 + .label xd = $17 + .label yd = $15 + .label shift = $14 .label angle_2 = $10 .label angle_3 = $10 .label i = $f .label return = $12 - .label x = $25 - .label y = $27 - .label return_2 = $29 + .label x = $2a + .label y = $2c + .label return_2 = $2e .label angle_6 = $10 .label angle_12 = $10 .label angle_13 = $10 @@ -2178,7 +2416,7 @@ atan2_16: { //SEG83 [46] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG84 [46] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG84 [46] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG85 atan2_16::@3 b3: @@ -2199,7 +2437,7 @@ atan2_16: { //SEG89 [49] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG90 [49] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG90 [49] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG91 atan2_16::@6 b6: @@ -2223,10 +2461,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG99 [52] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG99 [52] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG100 [52] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG100 [52] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG101 atan2_16::@12 b12: @@ -2240,9 +2478,9 @@ atan2_16: { //SEG103 [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG104 atan2_16::@16 - b16: + jmp b21 + //SEG104 atan2_16::@21 + b21: //SEG105 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -2251,10 +2489,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG106 [56] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG106 [56] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG107 [56] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG107 [56] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG108 atan2_16::@7 b7: @@ -2286,45 +2524,67 @@ atan2_16: { rts //SEG117 atan2_16::@11 b11: - //SEG118 [61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG118 [61] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuz1=vbuz2 + lda i + sta shift + //SEG119 [62] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG119 [62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG120 [63] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 - cpy #0 - beq !e+ - !: + //SEG121 [64] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG122 [64] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG123 [64] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + lda shift + cmp #1+1 + bcs b14 + jmp b15 + //SEG127 atan2_16::@15 + b15: + //SEG128 [66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp shift + beq b17_from_b15 + jmp b16 + //SEG129 atan2_16::@16 + b16: + //SEG130 [67] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG131 [68] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG120 [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG132 [69] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG133 [69] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG134 [69] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG135 atan2_16::@17 + b17: + //SEG136 [70] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG121 atan2_16::@15 - b15: - //SEG122 [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG137 atan2_16::@20 + b20: + //SEG138 [71] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -2332,7 +2592,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG123 [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG139 [72] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -2340,11 +2600,11 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG124 [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG140 [73] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _24 - //SEG125 [67] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 + //SEG141 [74] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 ldy _24 sec lda angle_3 @@ -2353,31 +2613,31 @@ atan2_16: { lda angle_3+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle_3+1 - //SEG126 [68] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG127 [68] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG128 [68] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG129 [68] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG130 atan2_16::@14 - b14: - //SEG131 [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG142 [75] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG143 [75] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG144 [75] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG145 [75] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG146 atan2_16::@19 + b19: + //SEG147 [76] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG132 [70] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 + //SEG148 [77] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 lda #CORDIC_ITERATIONS_16-1+1 cmp i - beq b12_from_b14 - //SEG133 [50] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG134 [50] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG135 [50] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG136 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG137 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + beq b12_from_b19 + //SEG149 [50] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG150 [50] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG151 [50] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG152 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG153 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG138 atan2_16::@13 - b13: - //SEG139 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG154 atan2_16::@18 + b18: + //SEG155 [78] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -2385,7 +2645,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG140 [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG156 [79] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -2393,11 +2653,11 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG141 [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG157 [80] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _23 - //SEG142 [74] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 + //SEG158 [81] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 ldy _23 clc lda angle_2 @@ -2406,104 +2666,128 @@ atan2_16: { lda angle_2+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle_2+1 - jmp b14_from_b13 - //SEG143 atan2_16::@4 + jmp b19_from_b18 + //SEG159 atan2_16::@14 + b14: + //SEG160 [82] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG161 [83] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG162 [84] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuz1=vbuz1_minus_2 + dec shift + dec shift + jmp b13_from_b14 + //SEG163 atan2_16::@4 b4: - //SEG144 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG164 [85] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG145 atan2_16::@1 + //SEG165 atan2_16::@1 b1: - //SEG146 [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG166 [86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG147 init_font_hex +//SEG167 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($17) charset) +// init_font_hex(byte* zeropage($1c) charset) init_font_hex: { - .label _0 = $39 - .label _1 = $3a - .label _2 = $3b - .label idx = $1d - .label i = $1c - .label idx_3 = $3c - .label proto_lo = $19 - .label charset = $17 - .label c1 = $1b - .label proto_hi = $14 - .label c = $16 - //SEG148 [78] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $3a + .label _1 = $3b + .label _2 = $3c + .label idx = $22 + .label i = $21 + .label idx_3 = $3d + .label proto_lo = $1e + .label charset = $1c + .label c1 = $20 + .label proto_hi = $19 + .label c = $1b + //SEG168 [88] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG149 [78] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG169 [88] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG150 [78] 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 + //SEG170 [88] 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 - //SEG151 [78] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG171 [88] 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 - //SEG152 [78] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG172 [88] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG153 [78] 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 - //SEG154 [78] 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 - //SEG155 [78] 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 + //SEG173 [88] 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 + //SEG174 [88] 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 + //SEG175 [88] 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 - //SEG156 init_font_hex::@1 + //SEG176 init_font_hex::@1 b1: - //SEG157 [79] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG177 [89] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG158 [79] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG178 [89] 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 - //SEG159 [79] 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 + //SEG179 [89] 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 - //SEG160 [79] 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 + //SEG180 [89] 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 - //SEG161 [79] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG181 [89] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG162 [79] 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 - //SEG163 [79] 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 - //SEG164 [79] 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 + //SEG182 [89] 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 + //SEG183 [89] 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 + //SEG184 [89] 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 - //SEG165 init_font_hex::@2 + //SEG185 init_font_hex::@2 b2: - //SEG166 [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG186 [90] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG167 [81] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG187 [91] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG168 [81] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG188 [91] 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 - //SEG169 [81] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG189 [91] 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 - //SEG170 [81] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG190 [91] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG171 [81] 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 - //SEG172 [81] 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 + //SEG191 [91] 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 + //SEG192 [91] 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 - //SEG173 init_font_hex::@3 + //SEG193 init_font_hex::@3 b3: - //SEG174 [82] (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 + //SEG194 [92] (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 @@ -2511,43 +2795,43 @@ init_font_hex: { asl asl sta _0 - //SEG175 [83] (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 + //SEG195 [93] (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 - //SEG176 [84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG196 [94] (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 - //SEG177 [85] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG197 [95] *((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 - //SEG178 [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG198 [96] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG179 [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG199 [97] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG180 [88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG200 [98] 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 - //SEG181 init_font_hex::@4 + //SEG201 init_font_hex::@4 b4: - //SEG182 [89] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG202 [99] *((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 - //SEG183 [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG203 [100] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG184 [91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG204 [101] *((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 - //SEG185 [92] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG205 [102] (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 @@ -2555,7 +2839,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG186 [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG206 [103] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -2563,16 +2847,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG187 [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG207 [104] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG188 [95] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG208 [105] 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 - //SEG189 init_font_hex::@5 + //SEG209 init_font_hex::@5 b5: - //SEG190 [96] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG210 [106] (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 @@ -2580,19 +2864,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG191 [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG211 [107] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG192 [98] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG212 [108] 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 - //SEG193 init_font_hex::@return + //SEG213 init_font_hex::@return breturn: - //SEG194 [99] return + //SEG214 [109] return rts } -//SEG195 File Data +//SEG215 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -2624,9 +2908,9 @@ Statement [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 Statement [27] (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:8 [ 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 [28] (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:8 [ 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 [30] *((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:8 [ 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 -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] Statement [31] (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:8 [ 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 -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] Statement [32] *((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:8 [ 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 [33] (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:8 [ 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 [34] *((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:8 [ 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 @@ -2644,34 +2928,39 @@ Statement [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ Statement [55] (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:8::atan2_16:24 [ 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 [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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 [58] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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 [61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#0 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 ] ) always clobbers reg byte a -Statement [62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#0 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#0 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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:8::atan2_16:24 [ 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 [66] (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:8::atan2_16:24 [ 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 [67] (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:8::atan2_16:24 [ 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 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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:8::atan2_16:24 [ 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 [73] (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:8::atan2_16:24 [ 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 [74] (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:8::atan2_16:24 [ 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 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#8 ] ) always clobbers reg byte a -Statement [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#11 ] ) always clobbers reg byte a -Statement [80] *((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:22 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [82] (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:28 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [83] (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:57 [ init_font_hex::$0 ] -Statement [89] *((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 [91] *((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 [92] (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 [93] (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 [96] (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 [62] (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:8::atan2_16:24 [ 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 +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Statement [63] (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:8::atan2_16:24 [ 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 [67] (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:8::atan2_16:24 [ 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 [68] (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:8::atan2_16:24 [ 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 [70] 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:8::atan2_16:24 [ 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 [71] (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:8::atan2_16:24 [ 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 [72] (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:8::atan2_16:24 [ 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 [73] (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:8::atan2_16:24 [ 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 [74] (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:8::atan2_16:24 [ 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 [78] (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:8::atan2_16:24 [ 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 [79] (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:8::atan2_16:24 [ 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 [80] (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:8::atan2_16:24 [ 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 [81] (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:8::atan2_16:24 [ 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 [82] (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:8::atan2_16:24 [ 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 [83] (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:8::atan2_16:24 [ 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 [85] (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:8::atan2_16:24 [ 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 [86] (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:8::atan2_16:24 [ 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 [90] *((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:27 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Statement [92] (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:33 [ init_font_hex::i#2 init_font_hex::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Statement [93] (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:58 [ init_font_hex::$0 ] +Statement [99] *((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 [101] *((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 [102] (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 [103] (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 [106] (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 [10] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2 [ main::clear_char#5 ] ( main:2 [ main::clear_char#5 ] ) always clobbers reg byte a Statement [11] if((byte*) main::clear_char#5>=(const byte*) CHARSET#0+(word) $800) goto main::@1 [ main::clear_char#5 ] ( main:2 [ main::clear_char#5 ] ) always clobbers reg byte a @@ -2706,129 +2995,129 @@ Statement [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ Statement [55] (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:8::atan2_16:24 [ 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 [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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 [58] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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 [61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#0 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 ] ) always clobbers reg byte a -Statement [62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#0 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#0 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#2 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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:8::atan2_16:24 [ 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 [66] (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:8::atan2_16:24 [ 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 [67] (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:8::atan2_16:24 [ 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 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::xi#1 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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:8::atan2_16:24 [ 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 [73] (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:8::atan2_16:24 [ 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 [74] (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:8::atan2_16:24 [ 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 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#8 ] ) always clobbers reg byte a -Statement [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ( main:2::init_angle_screen:8::atan2_16:24 [ 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#11 ] ) always clobbers reg byte a -Statement [80] *((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 [82] (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 [83] (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 [89] *((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 [91] *((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 [92] (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 [93] (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 [96] (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 [62] (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:8::atan2_16:24 [ 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 [63] (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:8::atan2_16:24 [ 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 [67] (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:8::atan2_16:24 [ 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 [68] (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:8::atan2_16:24 [ 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 [70] 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:8::atan2_16:24 [ 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 [71] (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:8::atan2_16:24 [ 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 [72] (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:8::atan2_16:24 [ 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 [73] (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:8::atan2_16:24 [ 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 [74] (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:8::atan2_16:24 [ 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 [78] (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:8::atan2_16:24 [ 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 [79] (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:8::atan2_16:24 [ 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 [80] (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:8::atan2_16:24 [ 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 [81] (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:8::atan2_16:24 [ 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 [82] (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:8::atan2_16:24 [ 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 [83] (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:8::atan2_16:24 [ 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 [85] (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:8::atan2_16:24 [ 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 [86] (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:8::atan2_16:24 [ 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 [90] *((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 [92] (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 [93] (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 [99] *((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 [101] *((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 [102] (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 [103] (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 [106] (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 [ main::clear_char#5 main::clear_char#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] : zp ZP_BYTE:4 , reg byte x , Potential registers zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] : zp ZP_WORD:5 , Potential registers zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] : zp ZP_WORD:7 , Potential registers zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] : zp ZP_BYTE:9 , reg byte x , Potential registers zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] : zp ZP_BYTE:10 , reg byte x , -Potential registers zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:11 , -Potential registers zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp ZP_WORD:13 , +Potential registers zp ZP_WORD:11 [ 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:11 , +Potential registers zp ZP_WORD:13 [ 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 ] : zp ZP_WORD:13 , Potential registers zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:15 , reg byte x , reg byte y , Potential registers zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:16 , Potential registers zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:18 , -Potential registers zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:20 , -Potential registers zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:22 , reg byte x , -Potential registers zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:23 , -Potential registers zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:25 , -Potential registers zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:27 , reg byte x , -Potential registers zp ZP_BYTE:28 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:28 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:29 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:30 [ init_angle_screen::$2 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:31 [ init_angle_screen::$3 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:32 [ init_angle_screen::xw#0 ] : zp ZP_WORD:32 , -Potential registers zp ZP_BYTE:34 [ init_angle_screen::$6 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:35 [ init_angle_screen::yw#0 ] : zp ZP_WORD:35 , -Potential registers zp ZP_WORD:37 [ atan2_16::x#0 ] : zp ZP_WORD:37 , -Potential registers zp ZP_WORD:39 [ atan2_16::y#0 ] : zp ZP_WORD:39 , -Potential registers zp ZP_WORD:41 [ atan2_16::return#2 ] : zp ZP_WORD:41 , -Potential registers zp ZP_WORD:43 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:43 , -Potential registers zp ZP_WORD:45 [ init_angle_screen::$10 ] : zp ZP_WORD:45 , -Potential registers zp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:47 , reg byte x , -Potential registers zp ZP_BYTE:48 [ init_angle_screen::$12 ] : zp ZP_BYTE:48 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:49 [ init_angle_screen::$13 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:50 [ init_angle_screen::$14 ] : zp ZP_BYTE:50 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:51 [ atan2_16::xd#0 ] : zp ZP_WORD:51 , -Potential registers zp ZP_WORD:53 [ atan2_16::yd#0 ] : zp ZP_WORD:53 , -Potential registers zp ZP_BYTE:55 [ atan2_16::$24 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:56 [ atan2_16::$23 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:57 [ init_font_hex::$0 ] : zp ZP_BYTE:57 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:58 [ init_font_hex::$1 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:59 [ init_font_hex::$2 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:60 [ init_font_hex::idx#3 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:21 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp ZP_WORD:21 , +Potential registers zp ZP_WORD:23 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp ZP_WORD:23 , +Potential registers zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:25 , +Potential registers zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:27 , reg byte x , +Potential registers zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:28 , +Potential registers zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:30 , +Potential registers zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:32 , reg byte x , +Potential registers zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:33 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:34 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:35 [ init_angle_screen::$2 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:36 [ init_angle_screen::$3 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:37 [ init_angle_screen::xw#0 ] : zp ZP_WORD:37 , +Potential registers zp ZP_BYTE:39 [ init_angle_screen::$6 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:40 [ init_angle_screen::yw#0 ] : zp ZP_WORD:40 , +Potential registers zp ZP_WORD:42 [ atan2_16::x#0 ] : zp ZP_WORD:42 , +Potential registers zp ZP_WORD:44 [ atan2_16::y#0 ] : zp ZP_WORD:44 , +Potential registers zp ZP_WORD:46 [ atan2_16::return#2 ] : zp ZP_WORD:46 , +Potential registers zp ZP_WORD:48 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:48 , +Potential registers zp ZP_WORD:50 [ init_angle_screen::$10 ] : zp ZP_WORD:50 , +Potential registers zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:52 , reg byte x , +Potential registers zp ZP_BYTE:53 [ init_angle_screen::$12 ] : zp ZP_BYTE:53 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:54 [ init_angle_screen::$13 ] : zp ZP_BYTE:54 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:55 [ init_angle_screen::$14 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:56 [ atan2_16::$24 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:57 [ atan2_16::$23 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:58 [ init_font_hex::$0 ] : zp ZP_BYTE:58 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:59 [ init_font_hex::$1 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:60 [ init_font_hex::$2 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:61 [ init_font_hex::idx#3 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 7,706.67: zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 3,203.15: zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,817.2: zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:55 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:56 [ atan2_16::$23 ] 1,930.5: zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] 1,501.5: zp ZP_WORD:53 [ atan2_16::yd#0 ] 600.6: zp ZP_WORD:51 [ atan2_16::xd#0 ] 202: zp ZP_WORD:41 [ atan2_16::return#2 ] 50: zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 3.89: zp ZP_WORD:37 [ atan2_16::x#0 ] 3.63: zp ZP_WORD:39 [ atan2_16::y#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:28 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:58 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:59 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:57 [ init_font_hex::$0 ] 202: zp ZP_BYTE:60 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:30 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:31 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:34 [ init_angle_screen::$6 ] 202: zp ZP_WORD:43 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:45 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:48 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:49 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:50 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 72.14: zp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:35 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:32 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 16.29: zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] 14.83: zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:20 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:21 [ 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:23 [ 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:16 [ 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:11 [ 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:13 [ 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:56 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:57 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:46 [ atan2_16::return#2 ] 50: zp ZP_WORD:18 [ 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:42 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:44 [ atan2_16::y#0 ] +Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:59 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:60 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:58 [ init_font_hex::$0 ] 202: zp ZP_BYTE:61 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:35 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:36 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:39 [ init_angle_screen::$6 ] 202: zp ZP_WORD:48 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:50 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:53 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:54 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:55 [ init_angle_screen::$14 ] 126.25: zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 120.24: zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 72.14: zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:40 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:37 [ init_angle_screen::xw#0 ] 21.23: zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] 16.29: zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] 14.83: zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] Uplift Scope [main] 55.5: zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] Uplift Scope [] -Uplifting [atan2_16] best 420441 combination zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:53 [ atan2_16::yd#0 ] zp ZP_WORD:51 [ atan2_16::xd#0 ] zp ZP_WORD:41 [ atan2_16::return#2 ] zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:37 [ atan2_16::x#0 ] zp ZP_WORD:39 [ atan2_16::y#0 ] -Uplifting [init_font_hex] best 401441 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:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:57 [ init_font_hex::$0 ] zp ZP_BYTE:60 [ init_font_hex::idx#3 ] zp ZP_WORD:23 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:25 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [atan2_16] best 1174941 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:21 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:23 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:11 [ 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:13 [ 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 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:46 [ atan2_16::return#2 ] zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:42 [ atan2_16::x#0 ] zp ZP_WORD:44 [ atan2_16::y#0 ] +Limited combination testing to 100 combinations of 144 possible. +Uplifting [init_font_hex] best 1155941 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:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:58 [ init_font_hex::$0 ] zp ZP_BYTE:61 [ init_font_hex::idx#3 ] zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [init_angle_screen] best 399441 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:43 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:45 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:49 [ init_angle_screen::$13 ] zp ZP_BYTE:50 [ init_angle_screen::$14 ] zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:35 [ init_angle_screen::yw#0 ] zp ZP_WORD:32 [ init_angle_screen::xw#0 ] zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +Uplifting [init_angle_screen] best 1153941 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:48 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:50 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:54 [ init_angle_screen::$13 ] zp ZP_BYTE:55 [ init_angle_screen::$14 ] zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:40 [ init_angle_screen::yw#0 ] zp ZP_WORD:37 [ init_angle_screen::xw#0 ] zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] Limited combination testing to 100 combinations of 65536 possible. -Uplifting [main] best 399441 combination zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] -Uplifting [] best 399441 combination -Attempting to uplift remaining variables inzp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] -Uplifting [atan2_16] best 399441 combination zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 399441 combination zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:57 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 399441 combination zp ZP_BYTE:57 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:49 [ init_angle_screen::$13 ] -Uplifting [init_angle_screen] best 398841 combination reg byte a [ init_angle_screen::$13 ] -Attempting to uplift remaining variables inzp ZP_BYTE:50 [ init_angle_screen::$14 ] -Uplifting [init_angle_screen] best 398241 combination reg byte a [ init_angle_screen::$14 ] -Attempting to uplift remaining variables inzp ZP_BYTE:60 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 397641 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 397641 combination zp ZP_BYTE:27 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [main] best 1153941 combination zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] +Uplifting [] best 1153941 combination +Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [init_font_hex] best 1153941 combination zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:58 [ init_font_hex::$0 ] +Uplifting [init_font_hex] best 1153941 combination zp ZP_BYTE:58 [ init_font_hex::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:54 [ init_angle_screen::$13 ] +Uplifting [init_angle_screen] best 1153341 combination reg byte a [ init_angle_screen::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:55 [ init_angle_screen::$14 ] +Uplifting [init_angle_screen] best 1152741 combination reg byte a [ init_angle_screen::$14 ] +Attempting to uplift remaining variables inzp ZP_BYTE:61 [ init_font_hex::idx#3 ] +Uplifting [init_font_hex] best 1152141 combination reg byte y [ init_font_hex::idx#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 1152141 combination zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Uplifting [init_angle_screen] best 397241 combination reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Uplifting [init_angle_screen] best 397241 combination zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] -Uplifting [init_angle_screen] best 397241 combination zp ZP_BYTE:47 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:52 [ init_angle_screen::ang_w#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Uplifting [init_angle_screen] best 397241 combination zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 397241 combination zp ZP_BYTE:22 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_angle_screen] best 1152141 combination zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_font_hex] best 1152141 combination zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:18 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:37 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:35 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:39 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:43 [ init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ 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 ] ] with [ zp ZP_WORD:41 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ 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:45 [ init_angle_screen::$10 ] ] - score: 1 -Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:9 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Allocated (was zp ZP_WORD:11) zp ZP_WORD:10 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated (was zp ZP_WORD:13) zp ZP_WORD:12 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:14 [ atan2_16::i#2 atan2_16::i#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:42 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:44 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:46 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:48 [ init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ 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 ] ] with [ zp ZP_WORD:46 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ 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:50 [ init_angle_screen::$10 ] ] - score: 1 Allocated (was zp ZP_WORD:16) zp ZP_WORD:15 [ 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 init_angle_screen::$10 ] -Allocated (was zp ZP_WORD:20) zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:23) zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:25) zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:29) zp ZP_BYTE:25 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_WORD:32) zp ZP_WORD:26 [ init_angle_screen::xw#0 atan2_16::x#0 ] -Allocated (was zp ZP_WORD:35) zp ZP_WORD:28 [ init_angle_screen::yw#0 atan2_16::y#0 ] -Allocated (was zp ZP_BYTE:47) zp ZP_BYTE:30 [ init_angle_screen::ang_w#0 ] -Allocated (was zp ZP_WORD:51) zp ZP_WORD:31 [ atan2_16::xd#0 ] -Allocated (was zp ZP_WORD:53) zp ZP_WORD:33 [ atan2_16::yd#0 ] -Allocated (was zp ZP_BYTE:57) zp ZP_BYTE:35 [ init_font_hex::$0 ] +Allocated (was zp ZP_WORD:21) zp ZP_WORD:17 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated (was zp ZP_WORD:23) zp ZP_WORD:19 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_WORD:25) zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated (was zp ZP_WORD:28) zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated (was zp ZP_BYTE:32) zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated (was zp ZP_BYTE:34) zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated (was zp ZP_WORD:37) zp ZP_WORD:30 [ init_angle_screen::xw#0 atan2_16::x#0 ] +Allocated (was zp ZP_WORD:40) zp ZP_WORD:32 [ init_angle_screen::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_BYTE:52) zp ZP_BYTE:34 [ init_angle_screen::ang_w#0 ] +Allocated (was zp ZP_BYTE:58) zp ZP_BYTE:35 [ init_font_hex::$0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -2866,7 +3155,7 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label clear_char = 2 //SEG11 [5] call init_font_hex - //SEG12 [77] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [87] 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] @@ -2938,11 +3227,12 @@ main: { // Utilizes symmetry around the center init_angle_screen: { .label _10 = $f - .label xw = $1a - .label yw = $1c + .label xw = $1e + .label yw = $20 .label angle_w = $f - .label ang_w = $1e - .label xb = 9 + .label ang_w = $22 + .label x = 9 + .label xb = $a .label screen_topline = 5 .label screen_bottomline = 7 .label y = 4 @@ -2975,8 +3265,9 @@ init_angle_screen: { //SEG43 [16] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG44 [16] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuxx=vbuc1 - ldx #0 + //SEG44 [16] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 + lda #0 + sta x jmp b2 //SEG45 [16] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] b2_from_b4: @@ -2985,8 +3276,8 @@ init_angle_screen: { jmp b2 //SEG48 init_angle_screen::@2 b2: - //SEG49 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 - txa + //SEG49 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x asl //SEG50 [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa eor #$ff @@ -3027,17 +3318,15 @@ init_angle_screen: { lda #$80 clc adc ang_w - //SEG63 [30] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuxx=vbuaa - stx $ff - ldy $ff + //SEG63 [30] *((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 //SEG64 [31] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 lda #$80 sec sbc ang_w - //SEG65 [32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuxx=vbuaa - stx $ff - ldy $ff + //SEG65 [32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x sta (screen_bottomline),y //SEG66 [33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 lda ang_w @@ -3051,12 +3340,13 @@ init_angle_screen: { lda ang_w ldy xb sta (screen_bottomline),y - //SEG69 [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuxx=_inc_vbuxx - inx + //SEG69 [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x //SEG70 [37] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG71 [38] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$13+1 + //SEG71 [38] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 bcc b2_from_b4 jmp b3 //SEG72 init_angle_screen::@3 @@ -3093,19 +3383,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($1a) x, signed word zeropage($1c) y) +// atan2_16(signed word zeropage($1e) x, signed word zeropage($20) y) atan2_16: { - .label _2 = $a - .label _7 = $c - .label yi = $a - .label xi = $c - .label xd = $1f - .label yd = $21 + .label _2 = $b + .label _7 = $d + .label yi = $b + .label xi = $d .label angle = $f - .label i = $e + .label xd = $13 + .label yd = $11 .label return = $f - .label x = $1a - .label y = $1c + .label x = $1e + .label y = $20 //SEG80 [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bpl b1 @@ -3123,7 +3412,7 @@ atan2_16: { //SEG83 [46] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG84 [46] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG84 [46] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG85 atan2_16::@3 b3: @@ -3144,7 +3433,7 @@ atan2_16: { //SEG89 [49] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG90 [49] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG90 [49] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG91 atan2_16::@6 b6: @@ -3155,9 +3444,8 @@ atan2_16: { sta angle lda #0 sta angle+1 - //SEG94 [50] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - lda #0 - sta i + //SEG94 [50] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + ldx #0 //SEG95 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG96 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy jmp b10 @@ -3168,10 +3456,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG99 [52] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG99 [52] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG100 [52] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG100 [52] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG101 atan2_16::@12 b12: @@ -3181,9 +3469,9 @@ atan2_16: { //SEG103 [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG104 atan2_16::@16 - b16: + jmp b21 + //SEG104 atan2_16::@21 + b21: //SEG105 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -3192,10 +3480,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG106 [56] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG106 [56] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG107 [56] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG107 [56] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG108 atan2_16::@7 b7: @@ -3227,45 +3515,65 @@ atan2_16: { rts //SEG117 atan2_16::@11 b11: - //SEG118 [61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG118 [61] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG119 [62] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG119 [62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG120 [63] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG121 [64] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG122 [64] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG123 [64] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + bcs b14 + jmp b15 + //SEG127 atan2_16::@15 + b15: + //SEG128 [66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 cpy #0 - beq !e+ - !: + beq b17_from_b15 + jmp b16 + //SEG129 atan2_16::@16 + b16: + //SEG130 [67] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG131 [68] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG120 [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG132 [69] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG133 [69] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG134 [69] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG135 atan2_16::@17 + b17: + //SEG136 [70] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG121 atan2_16::@15 - b15: - //SEG122 [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG137 atan2_16::@20 + b20: + //SEG138 [71] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -3273,7 +3581,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG123 [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG139 [72] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -3281,10 +3589,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG124 [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG140 [73] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG125 [67] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG141 [74] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -3293,31 +3601,30 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG126 [68] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG127 [68] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG128 [68] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG129 [68] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG130 atan2_16::@14 - b14: - //SEG131 [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG132 [70] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i - beq b12_from_b14 - //SEG133 [50] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG134 [50] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG135 [50] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG136 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG137 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG142 [75] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG143 [75] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG144 [75] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG145 [75] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG146 atan2_16::@19 + b19: + //SEG147 [76] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG148 [77] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + beq b12_from_b19 + //SEG149 [50] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG150 [50] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG151 [50] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG152 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG153 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG138 atan2_16::@13 - b13: - //SEG139 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG154 atan2_16::@18 + b18: + //SEG155 [78] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -3325,7 +3632,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG140 [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG156 [79] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -3333,10 +3640,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG141 [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG157 [80] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG142 [74] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG158 [81] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -3345,99 +3652,123 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14_from_b13 - //SEG143 atan2_16::@4 + jmp b19_from_b18 + //SEG159 atan2_16::@14 + b14: + //SEG160 [82] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG161 [83] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG162 [84] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13_from_b14 + //SEG163 atan2_16::@4 b4: - //SEG144 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG164 [85] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG145 atan2_16::@1 + //SEG165 atan2_16::@1 b1: - //SEG146 [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG166 [86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG147 init_font_hex +//SEG167 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($14) charset) +// init_font_hex(byte* zeropage($18) charset) init_font_hex: { .label _0 = $23 - .label idx = $19 - .label proto_lo = $16 - .label charset = $14 - .label c1 = $18 - .label proto_hi = $11 - .label c = $13 - //SEG148 [78] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label idx = $1d + .label proto_lo = $1a + .label charset = $18 + .label c1 = $1c + .label proto_hi = $15 + .label c = $17 + //SEG168 [88] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG149 [78] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG169 [88] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG150 [78] 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 + //SEG170 [88] 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 - //SEG151 [78] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG171 [88] 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 - //SEG152 [78] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG172 [88] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG153 [78] 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 - //SEG154 [78] 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 - //SEG155 [78] 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 + //SEG173 [88] 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 + //SEG174 [88] 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 + //SEG175 [88] 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 - //SEG156 init_font_hex::@1 + //SEG176 init_font_hex::@1 b1: - //SEG157 [79] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG177 [89] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG158 [79] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG178 [89] 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 - //SEG159 [79] 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 + //SEG179 [89] 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 - //SEG160 [79] 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 + //SEG180 [89] 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 - //SEG161 [79] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG181 [89] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG162 [79] 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 - //SEG163 [79] 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 - //SEG164 [79] 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 + //SEG182 [89] 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 + //SEG183 [89] 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 + //SEG184 [89] 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 - //SEG165 init_font_hex::@2 + //SEG185 init_font_hex::@2 b2: - //SEG166 [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG186 [90] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG167 [81] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG187 [91] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG168 [81] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG188 [91] 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 - //SEG169 [81] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG189 [91] 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 - //SEG170 [81] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG190 [91] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG171 [81] 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 - //SEG172 [81] 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 + //SEG191 [91] 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 + //SEG192 [91] 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 - //SEG173 init_font_hex::@3 + //SEG193 init_font_hex::@3 b3: - //SEG174 [82] (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 + //SEG194 [92] (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 @@ -3446,37 +3777,37 @@ init_font_hex: { asl asl sta _0 - //SEG175 [83] (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 + //SEG195 [93] (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 - //SEG176 [84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG196 [94] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG177 [85] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG197 [95] *((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 - //SEG178 [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG198 [96] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG179 [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG199 [97] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG180 [88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG200 [98] 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 - //SEG181 init_font_hex::@4 + //SEG201 init_font_hex::@4 b4: - //SEG182 [89] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG202 [99] *((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 - //SEG183 [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG203 [100] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG184 [91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG204 [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG185 [92] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG205 [102] (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 @@ -3484,7 +3815,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG186 [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG206 [103] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3492,16 +3823,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG187 [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG207 [104] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG188 [95] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG208 [105] 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 - //SEG189 init_font_hex::@5 + //SEG209 init_font_hex::@5 b5: - //SEG190 [96] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG210 [106] (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 @@ -3509,19 +3840,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG191 [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG211 [107] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG192 [98] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG212 [108] 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 - //SEG193 init_font_hex::@return + //SEG213 init_font_hex::@return breturn: - //SEG194 [99] return + //SEG214 [109] return rts } -//SEG195 File Data +//SEG215 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -3550,13 +3881,17 @@ Removing instruction jmp b5 Removing instruction jmp b6 Removing instruction jmp b10 Removing instruction jmp b12 -Removing instruction jmp b16 +Removing instruction jmp b21 Removing instruction jmp b7 Removing instruction jmp b9 Removing instruction jmp b8 Removing instruction jmp breturn +Removing instruction jmp b13 Removing instruction jmp b15 -Removing instruction jmp b14 +Removing instruction jmp b16 +Removing instruction jmp b17 +Removing instruction jmp b20 +Removing instruction jmp b19 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 @@ -3566,9 +3901,10 @@ Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing instruction ldy #0 with TAY Removing instruction ldy #0 +Removing instruction ldy x Removing instruction ldy xb Removing instruction lda #0 -Removing instruction lda #0 +Replacing instruction ldx #0 with TAX Replacing instruction ldy #0 with TAY Removing instruction ldy idx Removing instruction lda #0 @@ -3581,8 +3917,10 @@ Replacing label b2_from_b4 with b2 Replacing label b1_from_b3 with b1 Replacing label b7_from_b12 with b7 Replacing label b8_from_b7 with b8 -Replacing label b12_from_b14 with b12 -Replacing label b14_from_b13 with b14 +Replacing label b17_from_b15 with b17 +Replacing label b12_from_b19 with b12 +Replacing label b19_from_b18 with b19 +Replacing label b13_from_b14 with b13 Replacing label b6_from_b4 with b6 Replacing label b3_from_b1 with b3 Replacing label b3_from_b3 with b3 @@ -3605,14 +3943,18 @@ Removing instruction b6_from_b4: Removing instruction b6_from_b5: Removing instruction b10_from_b6: Removing instruction b12_from_b10: -Removing instruction b12_from_b14: +Removing instruction b12_from_b19: Removing instruction b7_from_b12: -Removing instruction b7_from_b16: +Removing instruction b7_from_b21: Removing instruction b8_from_b7: Removing instruction b8_from_b9: Removing instruction breturn: -Removing instruction b14_from_b13: -Removing instruction b14_from_b15: +Removing instruction b13_from_b11: +Removing instruction b13_from_b14: +Removing instruction b17_from_b15: +Removing instruction b17_from_b16: +Removing instruction b19_from_b18: +Removing instruction b19_from_b20: Removing instruction b1_from_b5: Removing instruction b2_from_b1: Removing instruction b2_from_b4: @@ -3632,10 +3974,12 @@ Removing instruction b3: Removing instruction breturn: Removing instruction b2: Removing instruction b5: -Removing instruction b16: +Removing instruction b21: Removing instruction b9: Removing instruction b15: -Removing instruction b10_from_b14: +Removing instruction b16: +Removing instruction b20: +Removing instruction b10_from_b19: Removing instruction b1_from_init_font_hex: Removing instruction b3_from_b2: Removing instruction b4: @@ -3654,9 +3998,9 @@ Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [266] beq b12 to bne -Fixing long branch [153] bpl b1 to bmi -Fixing long branch [165] bpl b4 to bmi +Fixing long branch [258] beq b12 to bne +Fixing long branch [152] bpl b1 to bmi +Fixing long branch [164] bpl b4 to bmi FINAL SYMBOL TABLE (label) @1 @@ -3679,10 +4023,10 @@ FINAL SYMBOL TABLE (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = (byte*) 10240 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:10 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:11 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:12 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:13 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -3691,7 +4035,12 @@ FINAL SYMBOL TABLE (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -3703,7 +4052,7 @@ FINAL SYMBOL TABLE (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:15 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:15 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:15 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:15 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:15 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:15 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:15 2002.0 @@ -3711,33 +4060,45 @@ FINAL SYMBOL TABLE (word) atan2_16::angle#5 angle zp ZP_WORD:15 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:15 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:14 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:14 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:15 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:15 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:26 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:30 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:31 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:19 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:19 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:19 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:19 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:19 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:12 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:12 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:12 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:12 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:12 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:12 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:13 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:13 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:13 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:13 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:13 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:13 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:28 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:32 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:33 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:17 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:17 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:17 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:17 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:17 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:10 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:10 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:10 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:10 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:10 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:10 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:11 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:11 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:11 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:11 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:11 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:11 1001.0 (void()) init_angle_screen((byte*) init_angle_screen::screen) (word~) init_angle_screen::$10 $10 zp ZP_WORD:15 202.0 (byte~) init_angle_screen::$12 reg byte a 202.0 @@ -3752,7 +4113,7 @@ 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:30 72.14285714285714 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:34 72.14285714285714 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:15 202.0 (byte*) init_angle_screen::screen @@ -3763,18 +4124,18 @@ FINAL SYMBOL TABLE (byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:5 5.5 (byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:5 9.333333333333334 (byte) init_angle_screen::x -(byte) init_angle_screen::x#1 reg byte x 101.0 -(byte) init_angle_screen::x#2 reg byte x 25.25 +(byte) init_angle_screen::x#1 x zp ZP_BYTE:9 101.0 +(byte) init_angle_screen::x#2 x zp ZP_BYTE:9 25.25 (byte) init_angle_screen::xb -(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:9 101.0 -(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:9 19.238095238095237 +(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:10 101.0 +(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:10 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:26 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:30 33.666666666666664 (byte) init_angle_screen::y (byte) init_angle_screen::y#1 y zp ZP_BYTE:4 16.5 (byte) init_angle_screen::y#4 y zp ZP_BYTE:4 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:28 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:32 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 $0 zp ZP_BYTE:35 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 @@ -3786,28 +4147,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:19 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:19 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:23 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:23 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:24 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:24 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:28 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:28 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:20 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:20 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:20 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:24 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:24 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:24 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:25 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:29 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:25 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:29 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:17 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:17 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:21 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:21 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:22 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:22 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:26 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:26 92.53846153846155 (void()) main() (label) main::@1 (label) main::@2 @@ -3836,30 +4197,31 @@ zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] -reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_BYTE:9 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -zp ZP_WORD:10 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:12 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:14 [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +zp ZP_WORD:11 [ 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:13 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:15 [ 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 init_angle_screen::$10 ] -zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:17 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:19 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +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 ] +zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:28 [ 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:25 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] -zp ZP_WORD:26 [ init_angle_screen::xw#0 atan2_16::x#0 ] +zp ZP_WORD:30 [ init_angle_screen::xw#0 atan2_16::x#0 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_WORD:28 [ init_angle_screen::yw#0 atan2_16::y#0 ] -zp ZP_BYTE:30 [ init_angle_screen::ang_w#0 ] +zp ZP_WORD:32 [ init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:34 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] -zp ZP_WORD:31 [ atan2_16::xd#0 ] -zp ZP_WORD:33 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:35 [ init_font_hex::$0 ] @@ -3869,7 +4231,7 @@ reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 366079 +Score: 1056679 //SEG0 File Comments // Find atan2(x, y) using the CORDIC method @@ -3897,7 +4259,7 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label clear_char = 2 //SEG11 [5] call init_font_hex - //SEG12 [77] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [87] 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 @@ -3951,11 +4313,12 @@ main: { // Utilizes symmetry around the center init_angle_screen: { .label _10 = $f - .label xw = $1a - .label yw = $1c + .label xw = $1e + .label yw = $20 .label angle_w = $f - .label ang_w = $1e - .label xb = 9 + .label ang_w = $22 + .label x = 9 + .label xb = $a .label screen_topline = 5 .label screen_bottomline = 7 .label y = 4 @@ -3983,15 +4346,16 @@ init_angle_screen: { //SEG43 [16] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG44 [16] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuxx=vbuc1 - ldx #0 + //SEG44 [16] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 + lda #0 + sta x //SEG45 [16] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] //SEG46 [16] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy //SEG47 [16] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy //SEG48 init_angle_screen::@2 b2: - //SEG49 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 - txa + //SEG49 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x asl //SEG50 [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa eor #$ff @@ -4029,17 +4393,14 @@ init_angle_screen: { lda #$80 clc adc ang_w - //SEG63 [30] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuxx=vbuaa - stx $ff - ldy $ff + //SEG63 [30] *((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 //SEG64 [31] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 lda #$80 sec sbc ang_w - //SEG65 [32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuxx=vbuaa - stx $ff - ldy $ff + //SEG65 [32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_bottomline),y //SEG66 [33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 lda ang_w @@ -4052,12 +4413,13 @@ init_angle_screen: { //SEG68 [35] *((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 sta (screen_bottomline),y - //SEG69 [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuxx=_inc_vbuxx - inx + //SEG69 [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x //SEG70 [37] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG71 [38] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$13+1 + //SEG71 [38] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 bcc b2 //SEG72 init_angle_screen::@3 //SEG73 [39] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 @@ -4090,19 +4452,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($1a) x, signed word zeropage($1c) y) +// atan2_16(signed word zeropage($1e) x, signed word zeropage($20) y) atan2_16: { - .label _2 = $a - .label _7 = $c - .label yi = $a - .label xi = $c - .label xd = $1f - .label yd = $21 + .label _2 = $b + .label _7 = $d + .label yi = $b + .label xi = $d .label angle = $f - .label i = $e + .label xd = $13 + .label yd = $11 .label return = $f - .label x = $1a - .label y = $1c + .label x = $1e + .label y = $20 //SEG80 [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bmi !b1+ @@ -4118,7 +4479,7 @@ atan2_16: { sbc y+1 sta _2+1 //SEG83 [46] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] - //SEG84 [46] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG84 [46] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy //SEG85 atan2_16::@3 b3: //SEG86 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 @@ -4136,7 +4497,7 @@ atan2_16: { sbc x+1 sta _7+1 //SEG89 [49] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] - //SEG90 [49] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG90 [49] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy //SEG91 atan2_16::@6 b6: //SEG92 [50] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] @@ -4144,8 +4505,8 @@ atan2_16: { lda #0 sta angle sta angle+1 - //SEG94 [50] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - sta i + //SEG94 [50] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + tax //SEG95 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG96 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy //SEG97 atan2_16::@10 @@ -4155,8 +4516,8 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG99 [52] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] - //SEG100 [52] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //SEG99 [52] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + //SEG100 [52] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy //SEG101 atan2_16::@12 b12: //SEG102 [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 @@ -4165,7 +4526,7 @@ atan2_16: { //SEG103 [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7 - //SEG104 atan2_16::@16 + //SEG104 atan2_16::@21 //SEG105 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -4174,8 +4535,8 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG106 [56] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] - //SEG107 [56] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //SEG106 [56] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + //SEG107 [56] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy //SEG108 atan2_16::@7 b7: //SEG109 [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 @@ -4199,43 +4560,53 @@ atan2_16: { rts //SEG117 atan2_16::@11 b11: - //SEG118 [61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG118 [61] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG119 [62] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG119 [62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG120 [63] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG121 [64] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + //SEG122 [64] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG123 [64] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 cpy #0 - beq !e+ - !: + beq b17 + //SEG129 atan2_16::@16 + //SEG130 [67] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG131 [68] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG120 [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG132 [69] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + //SEG133 [69] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG134 [69] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + //SEG135 atan2_16::@17 + b17: + //SEG136 [70] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - //SEG121 atan2_16::@15 - //SEG122 [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + //SEG137 atan2_16::@20 + //SEG138 [71] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -4243,7 +4614,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG123 [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG139 [72] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -4251,10 +4622,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG124 [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG140 [73] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG125 [67] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG141 [74] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -4263,29 +4634,28 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG126 [68] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - //SEG127 [68] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG128 [68] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG129 [68] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - //SEG130 atan2_16::@14 - b14: - //SEG131 [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG132 [70] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + //SEG142 [75] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + //SEG143 [75] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG144 [75] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG145 [75] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + //SEG146 atan2_16::@19 + b19: + //SEG147 [76] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG148 [77] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: - //SEG133 [50] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - //SEG134 [50] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG135 [50] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG136 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG137 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG149 [50] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + //SEG150 [50] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG151 [50] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG152 [50] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG153 [50] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG138 atan2_16::@13 - b13: - //SEG139 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG154 atan2_16::@18 + b18: + //SEG155 [78] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -4293,7 +4663,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG140 [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG156 [79] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -4301,10 +4671,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG141 [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG157 [80] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG142 [74] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG158 [81] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -4313,87 +4683,111 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 - //SEG143 atan2_16::@4 + jmp b19 + //SEG159 atan2_16::@14 + b14: + //SEG160 [82] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG161 [83] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG162 [84] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13 + //SEG163 atan2_16::@4 b4: - //SEG144 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG164 [85] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6 - //SEG145 atan2_16::@1 + //SEG165 atan2_16::@1 b1: - //SEG146 [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG166 [86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3 } -//SEG147 init_font_hex +//SEG167 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($14) charset) +// init_font_hex(byte* zeropage($18) charset) init_font_hex: { .label _0 = $23 - .label idx = $19 - .label proto_lo = $16 - .label charset = $14 - .label c1 = $18 - .label proto_hi = $11 - .label c = $13 - //SEG148 [78] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG149 [78] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .label idx = $1d + .label proto_lo = $1a + .label charset = $18 + .label c1 = $1c + .label proto_hi = $15 + .label c = $17 + //SEG168 [88] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + //SEG169 [88] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG150 [78] 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 + //SEG170 [88] 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 - //SEG151 [78] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG171 [88] 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 - //SEG152 [78] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG153 [78] 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 - //SEG154 [78] 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 - //SEG155 [78] 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 - //SEG156 init_font_hex::@1 + //SEG172 [88] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG173 [88] 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 + //SEG174 [88] 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 + //SEG175 [88] 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 + //SEG176 init_font_hex::@1 b1: - //SEG157 [79] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG158 [79] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG177 [89] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG178 [89] 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 - //SEG159 [79] 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 + //SEG179 [89] 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 - //SEG160 [79] 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 - //SEG161 [79] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG162 [79] 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 - //SEG163 [79] 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 - //SEG164 [79] 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 - //SEG165 init_font_hex::@2 + //SEG180 [89] 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 + //SEG181 [89] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG182 [89] 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 + //SEG183 [89] 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 + //SEG184 [89] 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 + //SEG185 init_font_hex::@2 b2: - //SEG166 [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG186 [90] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG167 [81] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG168 [81] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG187 [91] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG188 [91] 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 - //SEG169 [81] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG189 [91] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG170 [81] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG171 [81] 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 - //SEG172 [81] 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 - //SEG173 init_font_hex::@3 + //SEG190 [91] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG191 [91] 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 + //SEG192 [91] 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 + //SEG193 init_font_hex::@3 b3: - //SEG174 [82] (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 + //SEG194 [92] (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 @@ -4402,33 +4796,33 @@ init_font_hex: { asl asl sta _0 - //SEG175 [83] (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 + //SEG195 [93] (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 - //SEG176 [84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG196 [94] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG177 [85] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG197 [95] *((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 - //SEG178 [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG198 [96] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG179 [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG199 [97] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG180 [88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG200 [98] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG181 init_font_hex::@4 - //SEG182 [89] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG201 init_font_hex::@4 + //SEG202 [99] *((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 - //SEG183 [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG203 [100] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG184 [91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG204 [101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG185 [92] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG205 [102] (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 @@ -4436,7 +4830,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG186 [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG206 [103] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4444,14 +4838,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG187 [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG207 [104] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG188 [95] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG208 [105] 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 - //SEG189 init_font_hex::@5 - //SEG190 [96] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG209 init_font_hex::@5 + //SEG210 [106] (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 @@ -4459,17 +4853,17 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG191 [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG211 [107] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG192 [98] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG212 [108] 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 - //SEG193 init_font_hex::@return - //SEG194 [99] return + //SEG213 init_font_hex::@return + //SEG214 [109] return rts } -//SEG195 File Data +//SEG215 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... diff --git a/src/test/ref/cordic-atan2-clear.sym b/src/test/ref/cordic-atan2-clear.sym index ea5f20a2c..c79d95a9b 100644 --- a/src/test/ref/cordic-atan2-clear.sym +++ b/src/test/ref/cordic-atan2-clear.sym @@ -18,10 +18,10 @@ (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = (byte*) 10240 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:10 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:11 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:12 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:13 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -30,7 +30,12 @@ (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -42,7 +47,7 @@ (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:15 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:15 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:15 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:15 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:15 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:15 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:15 2002.0 @@ -50,33 +55,45 @@ (word) atan2_16::angle#5 angle zp ZP_WORD:15 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:15 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:14 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:14 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:15 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:15 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:26 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:30 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:31 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:19 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:19 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:19 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:19 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:19 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:12 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:12 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:12 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:12 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:12 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:12 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:13 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:13 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:13 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:13 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:13 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:13 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:28 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:32 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:33 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:17 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:17 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:17 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:17 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:17 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:10 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:10 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:10 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:10 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:10 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:10 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:11 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:11 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:11 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:11 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:11 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:11 1001.0 (void()) init_angle_screen((byte*) init_angle_screen::screen) (word~) init_angle_screen::$10 $10 zp ZP_WORD:15 202.0 (byte~) init_angle_screen::$12 reg byte a 202.0 @@ -91,7 +108,7 @@ (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:30 72.14285714285714 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:34 72.14285714285714 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:15 202.0 (byte*) init_angle_screen::screen @@ -102,18 +119,18 @@ (byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:5 5.5 (byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:5 9.333333333333334 (byte) init_angle_screen::x -(byte) init_angle_screen::x#1 reg byte x 101.0 -(byte) init_angle_screen::x#2 reg byte x 25.25 +(byte) init_angle_screen::x#1 x zp ZP_BYTE:9 101.0 +(byte) init_angle_screen::x#2 x zp ZP_BYTE:9 25.25 (byte) init_angle_screen::xb -(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:9 101.0 -(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:9 19.238095238095237 +(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:10 101.0 +(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:10 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:26 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:30 33.666666666666664 (byte) init_angle_screen::y (byte) init_angle_screen::y#1 y zp ZP_BYTE:4 16.5 (byte) init_angle_screen::y#4 y zp ZP_BYTE:4 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:28 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:32 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 $0 zp ZP_BYTE:35 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 @@ -125,28 +142,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:19 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:19 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:23 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:23 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:24 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:24 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:28 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:28 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:20 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:20 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:20 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:24 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:24 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:24 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:25 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:29 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:25 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:29 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:17 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:17 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:21 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:21 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:22 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:22 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:26 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:26 92.53846153846155 (void()) main() (label) main::@1 (label) main::@2 @@ -175,30 +192,31 @@ zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] -reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_BYTE:9 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -zp ZP_WORD:10 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:12 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:14 [ atan2_16::i#2 atan2_16::i#1 ] +zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +zp ZP_WORD:11 [ 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:13 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:15 [ 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 init_angle_screen::$10 ] -zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:17 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:19 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +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 ] +zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:28 [ 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:25 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ] reg byte a [ init_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] -zp ZP_WORD:26 [ init_angle_screen::xw#0 atan2_16::x#0 ] +zp ZP_WORD:30 [ init_angle_screen::xw#0 atan2_16::x#0 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_WORD:28 [ init_angle_screen::yw#0 atan2_16::y#0 ] -zp ZP_BYTE:30 [ init_angle_screen::ang_w#0 ] +zp ZP_WORD:32 [ init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:34 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] -zp ZP_WORD:31 [ atan2_16::xd#0 ] -zp ZP_WORD:33 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:35 [ init_font_hex::$0 ] diff --git a/src/test/ref/cordic-atan2.log b/src/test/ref/cordic-atan2.log index b7a3ae74c..1227aa2b3 100644 --- a/src/test/ref/cordic-atan2.log +++ b/src/test/ref/cordic-atan2.log @@ -2,6 +2,7 @@ Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET Culled Empty Block (label) init_font_hex::@6 diff --git a/src/test/ref/screen-center-angle.asm b/src/test/ref/screen-center-angle.asm index 495ba7a45..0b9f0fd18 100644 --- a/src/test/ref/screen-center-angle.asm +++ b/src/test/ref/screen-center-angle.asm @@ -28,8 +28,8 @@ main: { .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 = $1f - .label cyclecount = $1f + .label _4 = $23 + .label cyclecount = $23 jsr init_font_hex lda #toD0181_return sta D018 @@ -55,9 +55,9 @@ main: { rts } // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($1f) dw) +// print_dword_at(dword zeropage($23) dw) print_dword_at: { - .label dw = $1f + .label dw = $23 lda dw+2 sta print_word_at.w lda dw+3 @@ -141,7 +141,7 @@ print_char_at: { // 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 = $1f + .label return = $23 lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -161,11 +161,12 @@ clock: { // Utilizes symmetry around the center init_angle_screen: { .label _10 = $14 - .label xw = $23 - .label yw = $25 + .label xw = $27 + .label yw = $29 .label angle_w = $14 - .label ang_w = $27 - .label xb = $e + .label ang_w = $2b + .label x = $e + .label xb = $f .label screen_topline = $a .label screen_bottomline = $c .label y = 9 @@ -182,9 +183,10 @@ init_angle_screen: { b1: lda #$27 sta xb - ldx #0 + lda #0 + sta x b2: - txa + lda x asl eor #$ff clc @@ -209,14 +211,11 @@ init_angle_screen: { lda #$80 clc adc ang_w - stx $ff - ldy $ff + ldy x sta (screen_topline),y lda #$80 sec sbc ang_w - stx $ff - ldy $ff sta (screen_bottomline),y lda ang_w eor #$ff @@ -226,9 +225,10 @@ init_angle_screen: { sta (screen_topline),y lda ang_w sta (screen_bottomline),y - inx + inc x dec xb - cpx #$13+1 + lda x + cmp #$13+1 bcc b2 lda screen_topline sec @@ -253,19 +253,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($23) x, signed word zeropage($25) y) +// atan2_16(signed word zeropage($27) x, signed word zeropage($29) y) atan2_16: { - .label _2 = $f - .label _7 = $11 - .label yi = $f - .label xi = $11 - .label xd = $28 - .label yd = $2a + .label _2 = $10 + .label _7 = $12 + .label yi = $10 + .label xi = $12 .label angle = $14 - .label i = $13 + .label xd = $18 + .label yd = $16 .label return = $14 - .label x = $23 - .label y = $25 + .label x = $27 + .label y = $29 lda y+1 bmi !b1+ jmp b1 @@ -293,7 +292,7 @@ atan2_16: { lda #0 sta angle sta angle+1 - sta i + tax b10: lda yi+1 bne b11 @@ -324,38 +323,32 @@ atan2_16: { b8: rts b11: - ldy i + txa + tay lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - ldy i lda yi sta yd lda yi+1 sta yd+1 + b13: + cpy #1+1 + bcs b14 cpy #0 - beq !e+ - !: + beq b17 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: + b17: lda yi+1 - bpl b13 + bpl b18 lda xi sec sbc yd @@ -370,7 +363,7 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - lda i + txa asl tay sec @@ -380,15 +373,14 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - b14: - inc i - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + b19: + inx + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: jmp b10 - b13: + b18: lda xi clc adc yd @@ -403,7 +395,7 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - lda i + txa asl tay clc @@ -413,7 +405,27 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 + jmp b19 + b14: + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + dey + dey + jmp b13 b4: lda x sta xi @@ -450,15 +462,15 @@ clock_start: { rts } // Make charset from proto chars -// init_font_hex(byte* zeropage($19) charset) +// init_font_hex(byte* zeropage($1d) charset) init_font_hex: { .label _0 = $2c - .label idx = $1e - .label proto_lo = $1b - .label charset = $19 - .label c1 = $1d - .label proto_hi = $16 - .label c = $18 + .label idx = $22 + .label proto_lo = $1f + .label charset = $1d + .label c1 = $21 + .label proto_hi = $1a + .label c = $1c lda #0 sta c lda #=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [84] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [84] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [85] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [85] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [85] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [85] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [85] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [85] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [85] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [85] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -189,84 +189,107 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [95] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [96] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [102] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [103] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [103] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [103] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [105] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [104] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [104] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [110] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [110] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [110] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [111] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [112] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [109] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [119] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 clock_start: scope:[clock_start] from main::@1 - [112] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [113] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [115] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [116] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [122] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [123] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [125] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [126] *((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 - [117] return + [127] return to:@return init_font_hex: scope:[init_font_hex] from main - [118] phi() + [128] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [119] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [119] (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 ) - [119] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [129] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [129] (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 ) + [129] (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 - [120] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [120] (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 ) - [120] (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 ) - [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [130] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [130] (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 ) + [130] (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 ) + [131] *((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 - [122] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [122] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [123] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [124] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [126] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [132] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [132] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [133] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [134] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [135] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [136] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [137] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [138] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [139] 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 - [130] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [133] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [136] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [140] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [141] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [142] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [143] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [144] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [145] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [146] 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 - [137] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [139] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [147] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [148] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [149] 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 - [140] return + [150] return to:@return diff --git a/src/test/ref/screen-center-angle.log b/src/test/ref/screen-center-angle.log index fdbef2c96..f9e033909 100644 --- a/src/test/ref/screen-center-angle.log +++ b/src/test/ref/screen-center-angle.log @@ -5,6 +5,7 @@ Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1 Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Identified constant variable (byte*) HEAP_START Identified constant variable (byte*) main::BASE_SCREEN Identified constant variable (byte*) main::BASE_CHARSET @@ -22,10 +23,13 @@ Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 Culled Empty Block (label) atan2_16::@11 Culled Empty Block (label) atan2_16::@12 -Culled Empty Block (label) atan2_16::@20 +Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@29 Culled Empty Block (label) atan2_16::@21 +Culled Empty Block (label) atan2_16::@22 Culled Empty Block (label) atan2_16::@23 -Culled Empty Block (label) atan2_16::@24 +Culled Empty Block (label) atan2_16::@31 +Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 Culled Empty Block (label) @9 Culled Empty Block (label) clock::@1 @@ -172,13 +176,13 @@ atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 to:atan2_16::@5 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#12 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#9 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#12 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#2 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$8 ← (signed word) atan2_16::x#2 to:atan2_16::@6 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 (signed word) atan2_16::y#13 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 ) - (signed word) atan2_16::yi#10 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) + (signed word) atan2_16::yi#13 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 ) (signed word) atan2_16::x#3 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 ) (signed word~) atan2_16::$6 ← - (signed word) atan2_16::x#3 (signed word~) atan2_16::$7 ← (signed word~) atan2_16::$6 @@ -186,94 +190,156 @@ atan2_16::@5: scope:[atan2_16] from atan2_16::@3 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 (signed word) atan2_16::y#9 ← phi( atan2_16::@4/(signed word) atan2_16::y#12 atan2_16::@5/(signed word) atan2_16::y#13 ) (signed word) atan2_16::x#10 ← phi( atan2_16::@4/(signed word) atan2_16::x#2 atan2_16::@5/(signed word) atan2_16::x#3 ) - (signed word) atan2_16::yi#8 ← phi( atan2_16::@4/(signed word) atan2_16::yi#9 atan2_16::@5/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yi#9 ← phi( atan2_16::@4/(signed word) atan2_16::yi#12 atan2_16::@5/(signed word) atan2_16::yi#13 ) (signed word~) atan2_16::$9 ← phi( atan2_16::@4/(signed word~) atan2_16::$8 atan2_16::@5/(signed word~) atan2_16::$7 ) (signed word) atan2_16::xi#0 ← (signed word~) atan2_16::$9 (word) atan2_16::angle#0 ← (number) 0 (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 (byte) atan2_16::i#0 ← (byte) 0 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 - (signed word) atan2_16::y#7 ← phi( atan2_16::@19/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) - (signed word) atan2_16::x#7 ← phi( atan2_16::@19/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) - (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) - (byte) atan2_16::i#6 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) - (signed word) atan2_16::xi#6 ← phi( atan2_16::@19/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#8 ) +atan2_16::@15: scope:[atan2_16] from atan2_16::@27 atan2_16::@6 + (signed word) atan2_16::y#7 ← phi( atan2_16::@27/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 ) + (signed word) atan2_16::x#7 ← phi( atan2_16::@27/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 ) + (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 ) + (byte) atan2_16::i#6 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 ) + (signed word) atan2_16::xi#6 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#9 ) (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 (bool~) atan2_16::$18 ← ! (bool~) atan2_16::$17 if((bool~) atan2_16::$18) goto atan2_16::@16 to:atan2_16::@17 atan2_16::@16: scope:[atan2_16] from atan2_16::@15 - (signed word) atan2_16::y#14 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) - (signed word) atan2_16::x#13 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) - (word) atan2_16::angle#14 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) - (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) + (signed word) atan2_16::y#19 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 ) + (signed word) atan2_16::x#17 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 ) + (word) atan2_16::angle#19 ← phi( atan2_16::@15/(word) atan2_16::angle#12 ) (byte) atan2_16::i#2 ← phi( atan2_16::@15/(byte) atan2_16::i#6 ) + (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 ) (signed word) atan2_16::xi#3 ← phi( atan2_16::@15/(signed word) atan2_16::xi#6 ) - (signed word~) atan2_16::$19 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - (signed word) atan2_16::xd#0 ← (signed word~) atan2_16::$19 - (signed word~) atan2_16::$20 ← (signed word) atan2_16::yi#4 >> (byte) atan2_16::i#2 - (signed word) atan2_16::yd#0 ← (signed word~) atan2_16::$20 - (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (number) 0 - if((bool~) atan2_16::$21) goto atan2_16::@18 - to:atan2_16::@22 -atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@19 - (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@19/(signed word) atan2_16::y#8 ) - (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@19/(signed word) atan2_16::x#8 ) - (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) + (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#4 + (byte) atan2_16::shift#0 ← (byte) atan2_16::i#2 + to:atan2_16::@18 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@27 + (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@27/(signed word) atan2_16::y#8 ) + (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@27/(signed word) atan2_16::x#8 ) + (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 ) (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2 (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0 (bool~) atan2_16::$11 ← ! (bool~) atan2_16::$10 if((bool~) atan2_16::$11) goto atan2_16::@7 + to:atan2_16::@33 +atan2_16::@18: scope:[atan2_16] from atan2_16::@16 atan2_16::@19 + (signed word) atan2_16::y#18 ← phi( atan2_16::@16/(signed word) atan2_16::y#19 atan2_16::@19/(signed word) atan2_16::y#20 ) + (signed word) atan2_16::x#16 ← phi( atan2_16::@16/(signed word) atan2_16::x#17 atan2_16::@19/(signed word) atan2_16::x#18 ) + (word) atan2_16::angle#18 ← phi( atan2_16::@16/(word) atan2_16::angle#19 atan2_16::@19/(word) atan2_16::angle#20 ) + (byte) atan2_16::i#10 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::i#11 ) + (signed word) atan2_16::xi#11 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xi#12 ) + (signed word) atan2_16::yi#14 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 atan2_16::@19/(signed word) atan2_16::yi#15 ) + (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 + if((bool~) atan2_16::$19) goto atan2_16::@19 + to:atan2_16::@20 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#20 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#18 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#20 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#11 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#12 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yi#15 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#3 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (signed word) atan2_16::yd#3 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#3 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2 + (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2 + (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2 + to:atan2_16::@18 +atan2_16::@20: scope:[atan2_16] from atan2_16::@18 + (signed word) atan2_16::y#16 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 ) + (signed word) atan2_16::x#14 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 ) + (word) atan2_16::angle#16 ← phi( atan2_16::@18/(word) atan2_16::angle#18 ) + (byte) atan2_16::i#8 ← phi( atan2_16::@18/(byte) atan2_16::i#10 ) + (signed word) atan2_16::xi#9 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 ) + (signed word) atan2_16::yd#8 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 ) + (signed word) atan2_16::xd#8 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 ) + (signed word) atan2_16::yi#10 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 ) + (byte) atan2_16::shift#4 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 ) + (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 + (bool~) atan2_16::$20 ← ! (bool~) atan2_16::$25 + if((bool~) atan2_16::$20) goto atan2_16::@25 + to:atan2_16::@24 +atan2_16::@25: scope:[atan2_16] from atan2_16::@20 atan2_16::@24 + (signed word) atan2_16::y#14 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 atan2_16::@24/(signed word) atan2_16::y#17 ) + (signed word) atan2_16::x#13 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 atan2_16::@24/(signed word) atan2_16::x#15 ) + (word) atan2_16::angle#14 ← phi( atan2_16::@20/(word) atan2_16::angle#16 atan2_16::@24/(word) atan2_16::angle#17 ) + (byte) atan2_16::i#7 ← phi( atan2_16::@20/(byte) atan2_16::i#8 atan2_16::@24/(byte) atan2_16::i#9 ) + (signed word) atan2_16::xd#9 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 atan2_16::@24/(signed word) atan2_16::xd#2 ) + (signed word) atan2_16::yd#9 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 atan2_16::@24/(signed word) atan2_16::yd#2 ) + (signed word) atan2_16::xi#7 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 atan2_16::@24/(signed word) atan2_16::xi#10 ) + (signed word) atan2_16::yi#5 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 atan2_16::@24/(signed word) atan2_16::yi#11 ) + (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 + if((bool~) atan2_16::$21) goto atan2_16::@26 + to:atan2_16::@30 +atan2_16::@24: scope:[atan2_16] from atan2_16::@20 + (signed word) atan2_16::y#17 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 ) + (signed word) atan2_16::x#15 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 ) + (word) atan2_16::angle#17 ← phi( atan2_16::@20/(word) atan2_16::angle#16 ) + (byte) atan2_16::i#9 ← phi( atan2_16::@20/(byte) atan2_16::i#8 ) + (signed word) atan2_16::xi#10 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 ) + (signed word) atan2_16::yi#11 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 ) + (signed word) atan2_16::yd#4 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 ) + (signed word) atan2_16::xd#4 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 ) + (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 + (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 to:atan2_16::@25 -atan2_16::@18: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#10 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#11 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#7 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#3 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#1 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#5 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#1 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#4 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#1 - (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#5 - (signed word) atan2_16::xd#1 +atan2_16::@26: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#10 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#11 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#7 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#3 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#5 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#6 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#5 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#4 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#5 + (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#6 - (signed word) atan2_16::xd#5 (byte~) atan2_16::$23 ← (byte) atan2_16::i#3 * (const byte) SIZEOF_WORD (word) atan2_16::angle#2 ← (word) atan2_16::angle#7 + *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) - to:atan2_16::@19 -atan2_16::@22: scope:[atan2_16] from atan2_16::@16 - (signed word) atan2_16::y#11 ← phi( atan2_16::@16/(signed word) atan2_16::y#14 ) - (signed word) atan2_16::x#12 ← phi( atan2_16::@16/(signed word) atan2_16::x#13 ) - (word) atan2_16::angle#8 ← phi( atan2_16::@16/(word) atan2_16::angle#14 ) - (byte) atan2_16::i#4 ← phi( atan2_16::@16/(byte) atan2_16::i#2 ) - (signed word) atan2_16::xd#2 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 ) - (signed word) atan2_16::yi#6 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 ) - (signed word) atan2_16::yd#2 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 ) - (signed word) atan2_16::xi#5 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 ) - (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#2 - (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#6 + (signed word) atan2_16::xd#2 + to:atan2_16::@27 +atan2_16::@30: scope:[atan2_16] from atan2_16::@25 + (signed word) atan2_16::y#11 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 ) + (signed word) atan2_16::x#12 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 ) + (word) atan2_16::angle#8 ← phi( atan2_16::@25/(word) atan2_16::angle#14 ) + (byte) atan2_16::i#4 ← phi( atan2_16::@25/(byte) atan2_16::i#7 ) + (signed word) atan2_16::xd#6 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 ) + (signed word) atan2_16::yi#7 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 ) + (signed word) atan2_16::yd#6 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 ) + (signed word) atan2_16::xi#5 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 ) + (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#6 + (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#7 + (signed word) atan2_16::xd#6 (byte~) atan2_16::$24 ← (byte) atan2_16::i#4 * (const byte) SIZEOF_WORD (word) atan2_16::angle#3 ← (word) atan2_16::angle#8 - *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) - to:atan2_16::@19 -atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@22 - (signed word) atan2_16::y#8 ← phi( atan2_16::@18/(signed word) atan2_16::y#10 atan2_16::@22/(signed word) atan2_16::y#11 ) - (signed word) atan2_16::xi#7 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@22/(signed word) atan2_16::xi#2 ) - (signed word) atan2_16::x#8 ← phi( atan2_16::@18/(signed word) atan2_16::x#11 atan2_16::@22/(signed word) atan2_16::x#12 ) - (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@22/(word) atan2_16::angle#3 ) - (signed word) atan2_16::yi#7 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@22/(signed word) atan2_16::yi#2 ) - (byte) atan2_16::i#5 ← phi( atan2_16::@18/(byte) atan2_16::i#3 atan2_16::@22/(byte) atan2_16::i#4 ) + to:atan2_16::@27 +atan2_16::@27: scope:[atan2_16] from atan2_16::@26 atan2_16::@30 + (signed word) atan2_16::y#8 ← phi( atan2_16::@26/(signed word) atan2_16::y#10 atan2_16::@30/(signed word) atan2_16::y#11 ) + (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 ) + (signed word) atan2_16::x#8 ← phi( atan2_16::@26/(signed word) atan2_16::x#11 atan2_16::@30/(signed word) atan2_16::x#12 ) + (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 ) + (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 ) + (byte) atan2_16::i#5 ← phi( atan2_16::@26/(byte) atan2_16::i#3 atan2_16::@30/(byte) atan2_16::i#4 ) (byte) atan2_16::i#1 ← (byte) atan2_16::i#5 + rangenext(0,atan2_16::$16) (bool~) atan2_16::$22 ← (byte) atan2_16::i#1 != rangelast(0,atan2_16::$16) if((bool~) atan2_16::$22) goto atan2_16::@15 to:atan2_16::@17 -atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@25 - (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@25/(word) atan2_16::angle#4 ) - (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@25/(signed word) atan2_16::y#6 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@17 atan2_16::@33 + (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 ) + (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@33/(signed word) atan2_16::y#6 ) (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 (bool~) atan2_16::$14 ← ! (bool~) atan2_16::$13 if((bool~) atan2_16::$14) goto atan2_16::@8 to:atan2_16::@13 -atan2_16::@25: scope:[atan2_16] from atan2_16::@17 +atan2_16::@33: scope:[atan2_16] from atan2_16::@17 (signed word) atan2_16::y#6 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 ) (word) atan2_16::angle#9 ← phi( atan2_16::@17/(word) atan2_16::angle#1 ) (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 @@ -618,13 +684,14 @@ SYMBOL TABLE SSA (number~) atan2_16::$16 (bool~) atan2_16::$17 (bool~) atan2_16::$18 -(signed word~) atan2_16::$19 +(bool~) atan2_16::$19 (signed word~) atan2_16::$2 -(signed word~) atan2_16::$20 +(bool~) atan2_16::$20 (bool~) atan2_16::$21 (bool~) atan2_16::$22 (byte~) atan2_16::$23 (byte~) atan2_16::$24 +(bool~) atan2_16::$25 (signed word~) atan2_16::$3 (signed word~) atan2_16::$4 (bool~) atan2_16::$5 @@ -640,9 +707,14 @@ SYMBOL TABLE SSA (label) atan2_16::@18 (label) atan2_16::@19 (label) atan2_16::@2 -(label) atan2_16::@22 +(label) atan2_16::@20 +(label) atan2_16::@24 (label) atan2_16::@25 +(label) atan2_16::@26 +(label) atan2_16::@27 (label) atan2_16::@3 +(label) atan2_16::@30 +(label) atan2_16::@33 (label) atan2_16::@4 (label) atan2_16::@5 (label) atan2_16::@6 @@ -658,7 +730,12 @@ SYMBOL TABLE SSA (word) atan2_16::angle#13 (word) atan2_16::angle#14 (word) atan2_16::angle#15 +(word) atan2_16::angle#16 +(word) atan2_16::angle#17 +(word) atan2_16::angle#18 +(word) atan2_16::angle#19 (word) atan2_16::angle#2 +(word) atan2_16::angle#20 (word) atan2_16::angle#3 (word) atan2_16::angle#4 (word) atan2_16::angle#5 @@ -669,17 +746,28 @@ SYMBOL TABLE SSA (byte) atan2_16::i (byte) atan2_16::i#0 (byte) atan2_16::i#1 +(byte) atan2_16::i#10 +(byte) atan2_16::i#11 (byte) atan2_16::i#2 (byte) atan2_16::i#3 (byte) atan2_16::i#4 (byte) atan2_16::i#5 (byte) atan2_16::i#6 +(byte) atan2_16::i#7 +(byte) atan2_16::i#8 +(byte) atan2_16::i#9 (word) atan2_16::return (word) atan2_16::return#0 (word) atan2_16::return#1 (word) atan2_16::return#2 (word) atan2_16::return#3 (word) atan2_16::return#4 +(byte) atan2_16::shift +(byte) atan2_16::shift#0 +(byte) atan2_16::shift#1 +(byte) atan2_16::shift#2 +(byte) atan2_16::shift#3 +(byte) atan2_16::shift#4 (signed word) atan2_16::x (signed word) atan2_16::x#0 (signed word) atan2_16::x#1 @@ -687,6 +775,11 @@ SYMBOL TABLE SSA (signed word) atan2_16::x#11 (signed word) atan2_16::x#12 (signed word) atan2_16::x#13 +(signed word) atan2_16::x#14 +(signed word) atan2_16::x#15 +(signed word) atan2_16::x#16 +(signed word) atan2_16::x#17 +(signed word) atan2_16::x#18 (signed word) atan2_16::x#2 (signed word) atan2_16::x#3 (signed word) atan2_16::x#4 @@ -699,15 +792,27 @@ SYMBOL TABLE SSA (signed word) atan2_16::xd#0 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 +(signed word) atan2_16::xd#3 +(signed word) atan2_16::xd#4 +(signed word) atan2_16::xd#5 +(signed word) atan2_16::xd#6 +(signed word) atan2_16::xd#7 +(signed word) atan2_16::xd#8 +(signed word) atan2_16::xd#9 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 (signed word) atan2_16::xi#1 +(signed word) atan2_16::xi#10 +(signed word) atan2_16::xi#11 +(signed word) atan2_16::xi#12 (signed word) atan2_16::xi#2 (signed word) atan2_16::xi#3 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#7 +(signed word) atan2_16::xi#8 +(signed word) atan2_16::xi#9 (signed word) atan2_16::y (signed word) atan2_16::y#0 (signed word) atan2_16::y#1 @@ -717,7 +822,12 @@ SYMBOL TABLE SSA (signed word) atan2_16::y#13 (signed word) atan2_16::y#14 (signed word) atan2_16::y#15 +(signed word) atan2_16::y#16 +(signed word) atan2_16::y#17 +(signed word) atan2_16::y#18 +(signed word) atan2_16::y#19 (signed word) atan2_16::y#2 +(signed word) atan2_16::y#20 (signed word) atan2_16::y#3 (signed word) atan2_16::y#4 (signed word) atan2_16::y#5 @@ -729,10 +839,22 @@ SYMBOL TABLE SSA (signed word) atan2_16::yd#0 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +(signed word) atan2_16::yd#3 +(signed word) atan2_16::yd#4 +(signed word) atan2_16::yd#5 +(signed word) atan2_16::yd#6 +(signed word) atan2_16::yd#7 +(signed word) atan2_16::yd#8 +(signed word) atan2_16::yd#9 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 (signed word) atan2_16::yi#1 (signed word) atan2_16::yi#10 +(signed word) atan2_16::yi#11 +(signed word) atan2_16::yi#12 +(signed word) atan2_16::yi#13 +(signed word) atan2_16::yi#14 +(signed word) atan2_16::yi#15 (signed word) atan2_16::yi#2 (signed word) atan2_16::yi#3 (signed word) atan2_16::yi#4 @@ -1054,9 +1176,16 @@ Adding number conversion cast (unumber) 0 in (word) atan2_16::angle#0 ← (numbe Adding number conversion cast (unumber) 1 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1 Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (unumber)(number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0 -Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#4 >= (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 (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 +Adding number conversion cast (unumber) 0 in (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4 +Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1 +Adding number conversion cast (snumber) 1 in (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0 Adding number conversion cast (unumber) $8000 in (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9 Adding number conversion cast (unumber) atan2_16::$12 in (number~) atan2_16::$12 ← (unumber)(number) $8000 - (word) atan2_16::angle#9 @@ -1247,9 +1376,16 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 -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 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast $8000 Simplifying constant integer cast $12 @@ -1306,9 +1442,16 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 -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 signed number type (signed byte) 2 +Finalized signed number type (signed byte) 2 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (word) $8000 Finalized unsigned number type (byte) $12 @@ -1363,8 +1506,9 @@ Inferred type updated to byte in (unumber~) init_angle_screen::$11 ← > (word~) 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 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 [84] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [83] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 -Inversing boolean not [102] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [101] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (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 +Inversing boolean not [116] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [115] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 Successful SSA optimization Pass2UnaryNotSimplification 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 @@ -1376,19 +1520,34 @@ Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#2 (signed word~) atan2_16::$3 (signed word) atan2_16::y#3 Alias (signed word) atan2_16::x#5 = (signed word) atan2_16::x#9 (signed word) atan2_16::x#6 Alias (signed word~) atan2_16::$2 = (signed word~) atan2_16::$1 -Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#9 (signed word) atan2_16::yi#10 +Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#12 (signed word) atan2_16::yi#13 Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#2 (signed word~) atan2_16::$8 (signed word) atan2_16::x#3 Alias (signed word) atan2_16::y#12 = (signed word) atan2_16::y#15 (signed word) atan2_16::y#13 Alias (signed word~) atan2_16::$7 = (signed word~) atan2_16::$6 Alias (signed word) atan2_16::xi#0 = (signed word~) atan2_16::$9 -Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xi#4 (signed word) atan2_16::xi#5 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::i#3 (byte) atan2_16::i#4 -Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yi#5 (signed word) atan2_16::yi#6 -Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#14 (word) atan2_16::angle#7 (word) atan2_16::angle#8 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#7 (signed word) atan2_16::x#12 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#7 (signed word) atan2_16::y#11 -Alias (signed word) atan2_16::xd#0 = (signed word~) atan2_16::$19 (signed word) atan2_16::xd#1 (signed word) atan2_16::xd#2 -Alias (signed word) atan2_16::yd#0 = (signed word~) atan2_16::$20 (signed word) atan2_16::yd#1 (signed word) atan2_16::yd#2 +Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xd#0 +Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yd#0 +Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::shift#0 +Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#19 +Alias (signed word) atan2_16::x#17 = (signed word) atan2_16::x#7 +Alias (signed word) atan2_16::y#19 = (signed word) atan2_16::y#7 +Alias (signed word) atan2_16::xd#3 = (signed word) atan2_16::xd#7 (signed word) atan2_16::xd#8 (signed word) atan2_16::xd#4 +Alias (signed word) atan2_16::yd#3 = (signed word) atan2_16::yd#7 (signed word) atan2_16::yd#8 (signed word) atan2_16::yd#4 +Alias (byte) atan2_16::shift#2 = (byte) atan2_16::shift#3 (byte) atan2_16::shift#4 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#15 (signed word) atan2_16::yi#14 (signed word) atan2_16::yi#11 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#12 (signed word) atan2_16::xi#11 (signed word) atan2_16::xi#9 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#11 (byte) atan2_16::i#8 (byte) atan2_16::i#9 +Alias (word) atan2_16::angle#16 = (word) atan2_16::angle#20 (word) atan2_16::angle#18 (word) atan2_16::angle#17 +Alias (signed word) atan2_16::x#14 = (signed word) atan2_16::x#18 (signed word) atan2_16::x#16 (signed word) atan2_16::x#15 +Alias (signed word) atan2_16::y#16 = (signed word) atan2_16::y#20 (signed word) atan2_16::y#18 (signed word) atan2_16::y#17 +Alias (signed word) atan2_16::xi#4 = (signed word) atan2_16::xi#7 (signed word) atan2_16::xi#5 +Alias (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#9 (signed word) atan2_16::yd#6 +Alias (signed word) atan2_16::yi#5 = (signed word) atan2_16::yi#6 (signed word) atan2_16::yi#7 +Alias (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#9 (signed word) atan2_16::xd#6 +Alias (byte) atan2_16::i#3 = (byte) atan2_16::i#7 (byte) atan2_16::i#4 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#7 (word) atan2_16::angle#8 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#12 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#11 Alias (word) atan2_16::angle#1 = (word) atan2_16::angle#9 Alias (signed word) atan2_16::y#5 = (signed word) atan2_16::y#6 Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 @@ -1434,20 +1593,24 @@ Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$11 Successful SSA optimization Pass2AliasElimination Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#5 (signed word) atan2_16::x#10 Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#12 (signed word) atan2_16::y#9 -Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#8 -Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#5 -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#8 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#8 +Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#9 +Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#5 +Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#4 +Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#3 (byte) atan2_16::i#5 +Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 +Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 +Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 Successful SSA optimization Pass2AliasElimination -Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#4 -Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#4 -Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte*) init_font_hex::proto_hi#2 Self Phi Eliminated (byte*) init_font_hex::proto_lo#2 Self Phi Eliminated (byte*) init_font_hex::charset#3 Self Phi Eliminated (byte) init_font_hex::c1#2 Self Phi Eliminated (byte) init_font_hex::c#2 +Self Phi Eliminated (signed word) atan2_16::yi#10 +Self Phi Eliminated (signed word) atan2_16::xi#10 +Self Phi Eliminated (byte) atan2_16::i#10 +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 @@ -1462,8 +1625,12 @@ 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 (signed word) atan2_16::y#1 (signed word) atan2_16::y#0 Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0 -Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#1 -Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#1 +Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3 +Identical Phi Values (signed word) atan2_16::xi#10 (signed word) atan2_16::xi#3 +Identical Phi Values (byte) atan2_16::i#10 (byte) atan2_16::i#2 +Identical Phi Values (word) atan2_16::angle#14 (word) atan2_16::angle#12 +Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#17 +Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19 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 @@ -1471,8 +1638,11 @@ 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 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [124] (byte~) clock_start::$2 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -Identified duplicate assignment right side [131] (byte~) clock_start::$6 ← (byte) CIA_TIMER_CONTROL_START#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +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 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [138] (byte~) clock_start::$2 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 +Identified duplicate assignment right side [145] (byte~) clock_start::$6 ← (byte) CIA_TIMER_CONTROL_START#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) init_font_hex::$3 [28] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 Simple Condition (bool~) init_font_hex::$4 [38] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 @@ -1480,14 +1650,16 @@ Simple Condition (bool~) init_font_hex::$5 [43] if((byte) init_font_hex::c#1!=ra Simple Condition (bool~) atan2_16::$0 [50] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 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::$21 [80] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -Simple Condition (bool~) atan2_16::$11 [85] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$22 [99] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [103] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) init_angle_screen::$15 [271] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 -Simple Condition (bool~) init_angle_screen::$16 [277] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +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::$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 +Simple Condition (bool~) atan2_16::$14 [117] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) init_angle_screen::$15 [285] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +Simple Condition (bool~) init_angle_screen::$16 [291] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [99] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 +Negating conditional jump and destination [113] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [45] (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 @@ -1531,10 +1703,10 @@ 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 (word)main::toD0181_screen#0 in [182] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [186] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 -Constant value identified (word)main::BASE_SCREEN#0 in [214] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::BASE_SCREEN#0 -Constant value identified (word)main::BASE_CHARSET#0 in [218] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::BASE_CHARSET#0 +Constant value identified (word)main::toD0181_screen#0 in [196] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [200] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (word)main::BASE_SCREEN#0 in [228] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::BASE_SCREEN#0 +Constant value identified (word)main::BASE_CHARSET#0 in [232] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::BASE_CHARSET#0 Successful SSA optimization Pass2ConstantValues Resolved ranged next value [26] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [28] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 @@ -1542,14 +1714,15 @@ Resolved ranged next value [36] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 t Resolved ranged comparison value [38] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 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 [275] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ -Resolved ranged comparison value [277] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Rewriting conditional comparison [271] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +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 [121] (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 [122] (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 [128] (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 [132] (byte~) clock_start::$7 ← (byte~) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#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 +Simplifying expression containing zero clock_start::$0 in [136] (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 [142] (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 [146] (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 [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP#0 @@ -1558,6 +1731,8 @@ 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 @@ -1565,6 +1740,8 @@ 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 @@ -1575,6 +1752,7 @@ 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 @@ -1582,15 +1760,19 @@ 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 (signed word) atan2_16::x#17 +Self Phi Eliminated (signed word) atan2_16::y#19 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 (signed word) atan2_16::x#17 (signed word) atan2_16::x#0 +Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 Constant right-side identified [29] (byte~) atan2_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1 -Constant right-side identified [82] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 -Constant right-side identified [128] (byte*) init_angle_screen::screen_topline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c -Constant right-side identified [129] (byte*) init_angle_screen::screen_bottomline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c +Constant right-side identified [89] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 +Constant right-side identified [135] (byte*) init_angle_screen::screen_topline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c +Constant right-side identified [136] (byte*) init_angle_screen::screen_bottomline#0 ← (const byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0 Constant (const byte) atan2_16::$16 = CORDIC_ITERATIONS_16#0-1 @@ -1604,9 +1786,9 @@ Constant (const word) main::toD0182_$4#0 = (word)main::BASE_CHARSET#0 Constant (const byte*) init_angle_screen::screen_topline#0 = init_angle_screen::screen#0+(word)$28*$c Constant (const byte*) init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0+(word)$28*$c Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [47] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [48] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 in [61] (byte~) clock_start::$3 ← (const byte) clock_start::$1 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Resolved ranged next value [54] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [55] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1 +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 in [68] (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) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 Adding number conversion cast (unumber) 1 in if((byte) atan2_16::i#1==(unumber)(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17 @@ -1616,11 +1798,11 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [59] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -Constant right-side identified [90] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [93] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 -Constant right-side identified [106] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff -Constant right-side identified [109] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 +Constant right-side identified [66] (byte~) clock_start::$5 ← (const byte) clock_start::$6 | (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 +Constant right-side identified [97] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [100] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [113] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff +Constant right-side identified [116] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation 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 @@ -1629,40 +1811,40 @@ 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 right-side identified [88] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [90] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 -Constant right-side identified [102] (word~) main::toD0182_$2#0 ← (const word) main::toD0182_$1#0 * (byte) 4 -Constant right-side identified [104] (byte~) main::toD0182_$6#0 ← (const byte) main::toD0182_$5#0 / (byte) 4 +Constant right-side identified [95] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [97] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [109] (word~) main::toD0182_$2#0 ← (const word) main::toD0182_$1#0 * (byte) 4 +Constant right-side identified [111] (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 [88] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [89] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f -Constant right-side identified [100] (byte~) main::toD0182_$3#0 ← > (const word) main::toD0182_$2#0 -Constant right-side identified [101] (byte~) main::toD0182_$7#0 ← (const byte) main::toD0182_$6#0 & (byte) $f +Constant right-side identified [95] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [96] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [107] (byte~) main::toD0182_$3#0 ← > (const word) main::toD0182_$2#0 +Constant right-side identified [108] (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 [88] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 -Constant right-side identified [98] (byte) main::toD0182_return#0 ← (const byte) main::toD0182_$3#0 | (const byte) main::toD0182_$7#0 +Constant right-side identified [95] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [105] (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 [104] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 keeping init_angle_screen::xw#0 -Inlining Noop Cast [107] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 keeping init_angle_screen::yw#0 +Inlining Noop Cast [111] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 keeping init_angle_screen::xw#0 +Inlining Noop Cast [114] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 keeping init_angle_screen::yw#0 Successful SSA optimization Pass2NopCastInlining -Rewriting division to use shift [34] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 -Rewriting multiplication to use shift [38] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [42] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [101] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 -Rewriting multiplication to use shift [105] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 +Rewriting division to use shift [31] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 +Rewriting multiplication to use shift [45] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [49] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [108] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 +Rewriting multiplication to use shift [112] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 * (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) init_font_hex::c#0 Inlining constant with var siblings (const byte) init_font_hex::c1#0 @@ -1732,11 +1914,12 @@ Successful SSA optimization PassNEliminateUnusedVars Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2) Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3) -Added new block during phi lifting atan2_16::@26(between atan2_16::@19 and atan2_16::@15) -Added new block during phi lifting atan2_16::@27(between atan2_16::@15 and atan2_16::@17) -Added new block during phi lifting atan2_16::@28(between atan2_16::@19 and atan2_16::@17) -Added new block during phi lifting atan2_16::@29(between atan2_16::@17 and atan2_16::@7) -Added new block during phi lifting atan2_16::@30(between atan2_16::@7 and atan2_16::@8) +Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) +Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) +Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) +Added new block during phi lifting atan2_16::@37(between atan2_16::@20 and atan2_16::@25) +Added new block during phi lifting atan2_16::@38(between atan2_16::@17 and atan2_16::@7) +Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_16::@8) Added new block during phi lifting init_angle_screen::@6(between init_angle_screen::@3 and init_angle_screen::@1) Added new block during phi lifting init_angle_screen::@7(between init_angle_screen::@5 and init_angle_screen::@2) Adding NOP phi() at start of @begin @@ -1770,7 +1953,7 @@ 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_angle_screen] to atan2_16:82 -Created 31 initial phi equivalence classes +Created 36 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 @@ -1786,38 +1969,48 @@ Coalesced [103] init_angle_screen::screen_topline#6 ← init_angle_screen::scree Coalesced [104] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#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#12 ← atan2_16::$2 -Coalesced [113] atan2_16::xi#9 ← atan2_16::$7 -Coalesced [115] atan2_16::yi#14 ← atan2_16::yi#0 -Coalesced [116] atan2_16::xi#11 ← atan2_16::xi#0 -Coalesced [119] atan2_16::angle#17 ← atan2_16::angle#12 -Coalesced [124] atan2_16::angle#22 ← atan2_16::angle#4 +Coalesced [109] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [113] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [115] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [116] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [119] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [124] atan2_16::angle#27 ← atan2_16::angle#4 Coalesced [128] atan2_16::return#5 ← atan2_16::angle#5 Coalesced [131] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [132] atan2_16::angle#21 ← atan2_16::angle#1 -Coalesced [140] atan2_16::yi#16 ← atan2_16::yi#2 -Coalesced [141] atan2_16::angle#20 ← atan2_16::angle#3 -Coalesced [142] atan2_16::xi#13 ← atan2_16::xi#2 -Coalesced [146] atan2_16::yi#13 ← atan2_16::yi#7 -Coalesced [147] atan2_16::xi#10 ← atan2_16::xi#7 -Coalesced [148] atan2_16::i#7 ← atan2_16::i#1 -Coalesced [149] atan2_16::angle#16 ← atan2_16::angle#13 -Coalesced (already) [150] atan2_16::angle#18 ← atan2_16::angle#13 -Coalesced [155] atan2_16::yi#15 ← atan2_16::yi#1 -Coalesced [156] atan2_16::angle#19 ← atan2_16::angle#2 -Coalesced [157] atan2_16::xi#12 ← atan2_16::xi#1 -Not coalescing [158] atan2_16::xi#8 ← atan2_16::x#0 -Not coalescing [159] atan2_16::yi#11 ← atan2_16::y#0 -Coalesced [168] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [190] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [191] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [192] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [193] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [194] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [195] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [196] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [197] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 25 phi equivalence classes +Coalesced [132] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [133] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [134] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [135] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [141] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [142] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [149] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [150] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [151] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [155] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [156] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [157] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [158] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [159] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [164] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [165] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [166] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [167] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [168] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [172] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [173] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [174] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [175] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [176] atan2_16::yi#16 ← atan2_16::y#0 +Coalesced [185] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [207] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [208] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [209] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [210] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [211] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [212] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [213] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [214] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced down to 28 phi equivalence classes Culled Empty Block (label) @3 Culled Empty Block (label) @8 Culled Empty Block (label) @10 @@ -1833,11 +2026,12 @@ Culled Empty Block (label) print_word_at::@2 Culled Empty Block (label) print_byte_at::@2 Culled Empty Block (label) init_angle_screen::@6 Culled Empty Block (label) init_angle_screen::@7 -Culled Empty Block (label) atan2_16::@27 -Culled Empty Block (label) atan2_16::@30 -Culled Empty Block (label) atan2_16::@29 -Culled Empty Block (label) atan2_16::@26 -Culled Empty Block (label) atan2_16::@28 +Culled Empty Block (label) atan2_16::@35 +Culled Empty Block (label) atan2_16::@39 +Culled Empty Block (label) atan2_16::@38 +Culled Empty Block (label) atan2_16::@34 +Culled Empty Block (label) atan2_16::@36 +Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 @@ -1848,8 +2042,13 @@ Renumbering block atan2_16::@16 to atan2_16::@11 Renumbering block atan2_16::@17 to atan2_16::@12 Renumbering block atan2_16::@18 to atan2_16::@13 Renumbering block atan2_16::@19 to atan2_16::@14 -Renumbering block atan2_16::@22 to atan2_16::@15 -Renumbering block atan2_16::@25 to atan2_16::@16 +Renumbering block atan2_16::@20 to atan2_16::@15 +Renumbering block atan2_16::@24 to atan2_16::@16 +Renumbering block atan2_16::@25 to atan2_16::@17 +Renumbering block atan2_16::@26 to atan2_16::@18 +Renumbering block atan2_16::@27 to atan2_16::@19 +Renumbering block atan2_16::@30 to atan2_16::@20 +Renumbering block atan2_16::@33 to atan2_16::@21 Renumbering block main::@4 to main::@3 Renumbering block main::@5 to main::@4 Renumbering block main::@6 to main::@5 @@ -2019,32 +2218,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16 [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 to:atan2_16::@3 atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 - [81] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) + [81] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 - [84] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 ) + [84] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) to:atan2_16::@10 -atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6 - [85] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [85] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [85] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 ) - [85] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 ) +atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 + [85] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) + [85] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) + [85] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) + [85] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 to:atan2_16::@12 -atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14 - [87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) +atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 + [87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 - to:atan2_16::@16 -atan2_16::@16: scope:[atan2_16] from atan2_16::@12 + to:atan2_16::@21 +atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 to:atan2_16::@7 -atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16 - [91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) +atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 + [91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 @@ -2057,86 +2256,109 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [95] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [96] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 + [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 + [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 + to:atan2_16::@13 +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 to:atan2_16::@15 -atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [102] (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) - to:atan2_16::@14 -atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15 - [103] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 ) - [103] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [103] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 ) - [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [105] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 +atan2_16::@15: scope:[atan2_16] from atan2_16::@13 + [101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 + to:atan2_16::@16 +atan2_16::@16: scope:[atan2_16] from atan2_16::@15 + [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 + [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 + to:atan2_16::@17 +atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 + [104] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) + [104] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) + [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 + to:atan2_16::@20 +atan2_16::@20: scope:[atan2_16] from atan2_16::@17 + [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 + [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 + [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 + [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) + to:atan2_16::@19 +atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 + [110] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) + [110] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) + [110] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) + [111] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 + [112] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 to:atan2_16::@10 -atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [109] (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) - to:atan2_16::@14 +atan2_16::@18: scope:[atan2_16] from atan2_16::@17 + [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 + [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 + [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 + [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) + to:atan2_16::@19 +atan2_16::@14: scope:[atan2_16] from atan2_16::@13 + [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 + [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 + [119] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 + to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 - [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 clock_start: scope:[clock_start] from main::@1 - [112] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [113] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [115] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [116] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [122] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 + [123] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff + [125] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 + [126] *((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 - [117] return + [127] return to:@return init_font_hex: scope:[init_font_hex] from main - [118] phi() + [128] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [119] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [119] (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 ) - [119] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [129] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) + [129] (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 ) + [129] (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 - [120] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [120] (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 ) - [120] (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 ) - [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [130] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) + [130] (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 ) + [130] (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 ) + [131] *((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 - [122] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [122] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [123] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [124] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [126] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 + [132] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) + [132] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) + [133] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 + [134] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 + [135] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 + [136] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 + [137] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 + [138] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 + [139] 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 - [130] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [133] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [136] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [140] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 + [141] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 + [142] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 + [143] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 + [144] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 + [145] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 + [146] 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 - [137] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [139] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [147] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 + [148] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 + [149] 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 - [140] return + [150] return to:@return @@ -2164,7 +2386,7 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle (word) atan2_16::angle#1 3.0 (word) atan2_16::angle#11 4.0 -(word) atan2_16::angle#12 364.0 +(word) atan2_16::angle#12 190.66666666666666 (word) atan2_16::angle#13 1334.6666666666667 (word) atan2_16::angle#2 2002.0 (word) atan2_16::angle#3 2002.0 @@ -2173,32 +2395,44 @@ VARIABLE REGISTER WEIGHTS (word) atan2_16::angle#6 2004.0 (byte) atan2_16::i (byte) atan2_16::i#1 1501.5 -(byte) atan2_16::i#2 429.0 +(byte) atan2_16::i#2 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 34.99999999999999 (word) atan2_16::return#2 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 20002.0 +(byte) atan2_16::shift#2 8001.25 +(byte~) atan2_16::shift#5 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 3.8928571428571437 +(signed word) atan2_16::x#0 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 600.5999999999999 +(signed word) atan2_16::xd#1 6667.333333333333 +(signed word~) atan2_16::xd#10 1001.0 +(signed word) atan2_16::xd#2 1001.0 +(signed word) atan2_16::xd#3 7668.333333333332 +(signed word) atan2_16::xd#5 1001.0 (signed word) atan2_16::xi (signed word) atan2_16::xi#0 6.0 (signed word) atan2_16::xi#1 500.5 +(signed word~) atan2_16::xi#13 4.0 (signed word) atan2_16::xi#2 500.5 -(signed word) atan2_16::xi#3 801.2 -(signed word) atan2_16::xi#7 1001.0 -(signed word~) atan2_16::xi#8 4.0 +(signed word) atan2_16::xi#3 267.0666666666667 +(signed word) atan2_16::xi#8 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 3.633333333333334 +(signed word) atan2_16::y#0 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 1501.5 +(signed word) atan2_16::yd#1 10001.0 +(signed word~) atan2_16::yd#10 2002.0 +(signed word) atan2_16::yd#2 2002.0 +(signed word) atan2_16::yd#3 4601.0 +(signed word) atan2_16::yd#5 2002.0 (signed word) atan2_16::yi (signed word) atan2_16::yi#0 1.2000000000000002 (signed word) atan2_16::yi#1 667.3333333333334 -(signed word~) atan2_16::yi#11 4.0 +(signed word~) atan2_16::yi#16 4.0 (signed word) atan2_16::yi#2 667.3333333333334 -(signed word) atan2_16::yi#3 858.2857142857142 -(signed word) atan2_16::yi#7 1001.0 +(signed word) atan2_16::yi#3 353.4117647058823 +(signed word) atan2_16::yi#8 1001.0 (dword()) clock() (dword) clock::return (dword) clock::return#0 1.3333333333333333 @@ -2338,11 +2572,14 @@ Initial phi equivalence classes [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#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#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -2371,8 +2608,6 @@ Added variable init_angle_screen::ang_w#0 to zero page equivalence class [ init_ Added variable init_angle_screen::$12 to zero page equivalence class [ init_angle_screen::$12 ] Added variable init_angle_screen::$13 to zero page equivalence class [ init_angle_screen::$13 ] Added variable init_angle_screen::$14 to zero page equivalence class [ init_angle_screen::$14 ] -Added variable atan2_16::xd#0 to zero page equivalence class [ atan2_16::xd#0 ] -Added variable atan2_16::yd#0 to zero page equivalence class [ atan2_16::yd#0 ] Added variable atan2_16::$24 to zero page equivalence class [ atan2_16::$24 ] Added variable atan2_16::$23 to zero page equivalence class [ atan2_16::$23 ] Added variable init_font_hex::$0 to zero page equivalence class [ init_font_hex::$0 ] @@ -2391,11 +2626,14 @@ Complete equivalence classes [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#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#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -[ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +[ 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 ] +[ 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 ] [ atan2_16::i#2 atan2_16::i#1 ] [ 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::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -2424,8 +2662,6 @@ Complete equivalence classes [ init_angle_screen::$12 ] [ init_angle_screen::$13 ] [ init_angle_screen::$14 ] -[ atan2_16::xd#0 ] -[ atan2_16::yd#0 ] [ atan2_16::$24 ] [ atan2_16::$23 ] [ init_font_hex::$0 ] @@ -2443,47 +2679,48 @@ Allocated zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_angle_screen: Allocated zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#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#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated zp ZP_WORD:21 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] +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 ] +Allocated 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 ] Allocated zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] Allocated zp ZP_WORD:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] Allocated zp ZP_WORD:26 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] -Allocated zp ZP_WORD:28 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:30 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:31 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:33 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:36 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:37 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_DWORD:38 [ clock::return#2 ] -Allocated zp ZP_DWORD:42 [ main::$4 ] -Allocated zp ZP_DWORD:46 [ main::cyclecount#0 ] -Allocated zp ZP_DWORD:50 [ print_dword_at::dw#0 ] -Allocated zp ZP_BYTE:54 [ print_byte_at::$0 ] -Allocated zp ZP_BYTE:55 [ print_byte_at::$2 ] -Allocated zp ZP_DWORD:56 [ clock::return#0 ] -Allocated zp ZP_BYTE:60 [ init_angle_screen::$2 ] -Allocated zp ZP_BYTE:61 [ init_angle_screen::$3 ] -Allocated zp ZP_WORD:62 [ init_angle_screen::xw#0 ] -Allocated zp ZP_BYTE:64 [ init_angle_screen::$6 ] -Allocated zp ZP_WORD:65 [ init_angle_screen::yw#0 ] -Allocated zp ZP_WORD:67 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:69 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:71 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:73 [ init_angle_screen::angle_w#0 ] -Allocated zp ZP_WORD:75 [ init_angle_screen::$10 ] -Allocated zp ZP_BYTE:77 [ init_angle_screen::ang_w#0 ] -Allocated zp ZP_BYTE:78 [ init_angle_screen::$12 ] -Allocated zp ZP_BYTE:79 [ init_angle_screen::$13 ] -Allocated zp ZP_BYTE:80 [ init_angle_screen::$14 ] -Allocated zp ZP_WORD:81 [ atan2_16::xd#0 ] -Allocated zp ZP_WORD:83 [ atan2_16::yd#0 ] -Allocated zp ZP_BYTE:85 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:86 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:87 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:88 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:89 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:90 [ init_font_hex::idx#3 ] +Allocated zp ZP_BYTE:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +Allocated zp ZP_WORD:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated zp ZP_WORD:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated zp ZP_WORD:33 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated zp ZP_BYTE:35 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated zp ZP_WORD:36 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated zp ZP_WORD:38 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated zp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated zp ZP_BYTE:41 [ init_font_hex::i#2 init_font_hex::i#1 ] +Allocated zp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated zp ZP_DWORD:43 [ clock::return#2 ] +Allocated zp ZP_DWORD:47 [ main::$4 ] +Allocated zp ZP_DWORD:51 [ main::cyclecount#0 ] +Allocated zp ZP_DWORD:55 [ print_dword_at::dw#0 ] +Allocated zp ZP_BYTE:59 [ print_byte_at::$0 ] +Allocated zp ZP_BYTE:60 [ print_byte_at::$2 ] +Allocated zp ZP_DWORD:61 [ clock::return#0 ] +Allocated zp ZP_BYTE:65 [ init_angle_screen::$2 ] +Allocated zp ZP_BYTE:66 [ init_angle_screen::$3 ] +Allocated zp ZP_WORD:67 [ init_angle_screen::xw#0 ] +Allocated zp ZP_BYTE:69 [ init_angle_screen::$6 ] +Allocated zp ZP_WORD:70 [ init_angle_screen::yw#0 ] +Allocated zp ZP_WORD:72 [ atan2_16::x#0 ] +Allocated zp ZP_WORD:74 [ atan2_16::y#0 ] +Allocated zp ZP_WORD:76 [ atan2_16::return#2 ] +Allocated zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] +Allocated zp ZP_WORD:80 [ init_angle_screen::$10 ] +Allocated zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] +Allocated zp ZP_BYTE:83 [ init_angle_screen::$12 ] +Allocated zp ZP_BYTE:84 [ init_angle_screen::$13 ] +Allocated zp ZP_BYTE:85 [ init_angle_screen::$14 ] +Allocated zp ZP_BYTE:86 [ atan2_16::$24 ] +Allocated zp ZP_BYTE:87 [ atan2_16::$23 ] +Allocated zp ZP_BYTE:88 [ init_font_hex::$0 ] +Allocated zp ZP_BYTE:89 [ init_font_hex::$1 ] +Allocated zp ZP_BYTE:90 [ init_font_hex::$2 ] +Allocated zp ZP_BYTE:91 [ init_font_hex::idx#3 ] INITIAL ASM //SEG0 File Comments @@ -2536,10 +2773,10 @@ main: { .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 = $2a - .label cyclecount = $2e + .label _4 = $2f + .label cyclecount = $33 //SEG11 [5] call init_font_hex - //SEG12 [118] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [128] 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] @@ -2636,9 +2873,9 @@ main: { } //SEG37 print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($32) dw) +// print_dword_at(dword zeropage($37) dw) print_dword_at: { - .label dw = $32 + .label dw = $37 //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 @@ -2728,8 +2965,8 @@ print_word_at: { // Print a byte as HEX at a specific position // print_byte_at(byte zeropage(6) b, byte* zeropage(7) at) print_byte_at: { - .label _0 = $36 - .label _2 = $37 + .label _0 = $3b + .label _2 = $3c .label b = 6 .label at = 7 //SEG68 [35] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 @@ -2805,8 +3042,8 @@ print_char_at: { // 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 = $38 - .label return_2 = $26 + .label return = $3d + .label return_2 = $2b //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -2831,17 +3068,17 @@ clock: { // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center init_angle_screen: { - .label _2 = $3c - .label _3 = $3d - .label _6 = $40 - .label _10 = $4b - .label _12 = $4e - .label _13 = $4f - .label _14 = $50 - .label xw = $3e - .label yw = $41 - .label angle_w = $49 - .label ang_w = $4d + .label _2 = $41 + .label _3 = $42 + .label _6 = $45 + .label _10 = $50 + .label _12 = $53 + .label _13 = $54 + .label _14 = $55 + .label xw = $43 + .label yw = $46 + .label angle_w = $4e + .label ang_w = $52 .label x = $11 .label xb = $12 .label screen_topline = $d @@ -3020,24 +3257,25 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($43) x, signed word zeropage($45) y) +// atan2_16(signed word zeropage($48) x, signed word zeropage($4a) y) atan2_16: { .label _2 = $13 .label _7 = $15 - .label _23 = $56 - .label _24 = $55 + .label _23 = $57 + .label _24 = $56 .label yi = $13 .label xi = $15 - .label xd = $51 - .label yd = $53 .label angle = $1a + .label xd = $1f + .label yd = $1d + .label shift = $1c .label angle_2 = $18 .label angle_3 = $18 .label i = $17 .label return = $1a - .label x = $43 - .label y = $45 - .label return_2 = $47 + .label x = $48 + .label y = $4a + .label return_2 = $4c .label angle_6 = $18 .label angle_12 = $18 .label angle_13 = $18 @@ -3058,7 +3296,7 @@ atan2_16: { //SEG144 [81] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG145 [81] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG145 [81] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG146 atan2_16::@3 b3: @@ -3079,7 +3317,7 @@ atan2_16: { //SEG150 [84] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG151 [84] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG151 [84] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG152 atan2_16::@6 b6: @@ -3103,10 +3341,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG160 [87] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG160 [87] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG161 [87] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG161 [87] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG162 atan2_16::@12 b12: @@ -3120,9 +3358,9 @@ atan2_16: { //SEG164 [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG165 atan2_16::@16 - b16: + jmp b21 + //SEG165 atan2_16::@21 + b21: //SEG166 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -3131,10 +3369,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG167 [91] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG167 [91] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG168 [91] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG168 [91] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG169 atan2_16::@7 b7: @@ -3166,45 +3404,67 @@ atan2_16: { rts //SEG178 atan2_16::@11 b11: - //SEG179 [96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG179 [96] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuz1=vbuz2 + lda i + sta shift + //SEG180 [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG180 [97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG181 [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 - cpy #0 - beq !e+ - !: + //SEG182 [99] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG183 [99] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG184 [99] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + lda shift + cmp #1+1 + bcs b14 + jmp b15 + //SEG188 atan2_16::@15 + b15: + //SEG189 [101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp shift + beq b17_from_b15 + jmp b16 + //SEG190 atan2_16::@16 + b16: + //SEG191 [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG192 [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG181 [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG193 [104] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG194 [104] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG195 [104] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG196 atan2_16::@17 + b17: + //SEG197 [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG182 atan2_16::@15 - b15: - //SEG183 [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG198 atan2_16::@20 + b20: + //SEG199 [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -3212,7 +3472,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG184 [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG200 [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -3220,11 +3480,11 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG185 [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG201 [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _24 - //SEG186 [102] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 + //SEG202 [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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 ldy _24 sec lda angle_3 @@ -3233,31 +3493,31 @@ atan2_16: { lda angle_3+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle_3+1 - //SEG187 [103] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG188 [103] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG189 [103] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG190 [103] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG191 atan2_16::@14 - b14: - //SEG192 [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG203 [110] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG204 [110] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG205 [110] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG206 [110] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG207 atan2_16::@19 + b19: + //SEG208 [111] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG193 [105] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 + //SEG209 [112] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 lda #CORDIC_ITERATIONS_16-1+1 cmp i - beq b12_from_b14 - //SEG194 [85] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG195 [85] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG196 [85] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG197 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG198 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + beq b12_from_b19 + //SEG210 [85] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG211 [85] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG212 [85] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG213 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG214 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG199 atan2_16::@13 - b13: - //SEG200 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG215 atan2_16::@18 + b18: + //SEG216 [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -3265,7 +3525,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG201 [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG217 [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -3273,11 +3533,11 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG202 [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG218 [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _23 - //SEG203 [109] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 + //SEG219 [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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 ldy _23 clc lda angle_2 @@ -3286,36 +3546,60 @@ atan2_16: { lda angle_2+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle_2+1 - jmp b14_from_b13 - //SEG204 atan2_16::@4 + jmp b19_from_b18 + //SEG220 atan2_16::@14 + b14: + //SEG221 [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG222 [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG223 [119] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuz1=vbuz1_minus_2 + dec shift + dec shift + jmp b13_from_b14 + //SEG224 atan2_16::@4 b4: - //SEG205 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG225 [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG206 atan2_16::@1 + //SEG226 atan2_16::@1 b1: - //SEG207 [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG227 [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG208 clock_start +//SEG228 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: { - //SEG209 [112] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + //SEG229 [122] *((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 - //SEG210 [113] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + //SEG230 [123] *((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 - //SEG211 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + //SEG231 [124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -3324,98 +3608,98 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - //SEG212 [115] *((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 + //SEG232 [125] *((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 - //SEG213 [116] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + //SEG233 [126] *((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 - //SEG214 clock_start::@return + //SEG234 clock_start::@return breturn: - //SEG215 [117] return + //SEG235 [127] return rts } -//SEG216 init_font_hex +//SEG236 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($1f) charset) +// init_font_hex(byte* zeropage($24) charset) init_font_hex: { - .label _0 = $57 - .label _1 = $58 - .label _2 = $59 - .label idx = $25 - .label i = $24 - .label idx_3 = $5a - .label proto_lo = $21 - .label charset = $1f - .label c1 = $23 - .label proto_hi = $1c - .label c = $1e - //SEG217 [119] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $58 + .label _1 = $59 + .label _2 = $5a + .label idx = $2a + .label i = $29 + .label idx_3 = $5b + .label proto_lo = $26 + .label charset = $24 + .label c1 = $28 + .label proto_hi = $21 + .label c = $23 + //SEG237 [129] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG218 [119] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG238 [129] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG219 [119] 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 + //SEG239 [129] 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 - //SEG220 [119] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG240 [129] 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 - //SEG221 [119] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG241 [129] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG222 [119] 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 - //SEG223 [119] 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 - //SEG224 [119] 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 + //SEG242 [129] 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 + //SEG243 [129] 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 + //SEG244 [129] 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 - //SEG225 init_font_hex::@1 + //SEG245 init_font_hex::@1 b1: - //SEG226 [120] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG246 [130] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG227 [120] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG247 [130] 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 - //SEG228 [120] 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 + //SEG248 [130] 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 - //SEG229 [120] 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 + //SEG249 [130] 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 - //SEG230 [120] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG250 [130] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG231 [120] 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 - //SEG232 [120] 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 - //SEG233 [120] 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 + //SEG251 [130] 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 + //SEG252 [130] 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 + //SEG253 [130] 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 - //SEG234 init_font_hex::@2 + //SEG254 init_font_hex::@2 b2: - //SEG235 [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG255 [131] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG236 [122] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG256 [132] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG237 [122] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG257 [132] 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 - //SEG238 [122] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG258 [132] 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 - //SEG239 [122] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG259 [132] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG240 [122] 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 - //SEG241 [122] 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 + //SEG260 [132] 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 + //SEG261 [132] 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 - //SEG242 init_font_hex::@3 + //SEG262 init_font_hex::@3 b3: - //SEG243 [123] (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 + //SEG263 [133] (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 @@ -3423,43 +3707,43 @@ init_font_hex: { asl asl sta _0 - //SEG244 [124] (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 + //SEG264 [134] (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 - //SEG245 [125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG265 [135] (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 - //SEG246 [126] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG266 [136] *((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 - //SEG247 [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG267 [137] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG248 [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG268 [138] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG249 [129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG269 [139] 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 - //SEG250 init_font_hex::@4 + //SEG270 init_font_hex::@4 b4: - //SEG251 [130] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG271 [140] *((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 - //SEG252 [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG272 [141] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG253 [132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG273 [142] *((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 - //SEG254 [133] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG274 [143] (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 @@ -3467,7 +3751,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG255 [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG275 [144] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3475,16 +3759,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG256 [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG276 [145] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG257 [136] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG277 [146] 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 - //SEG258 init_font_hex::@5 + //SEG278 init_font_hex::@5 b5: - //SEG259 [137] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG279 [147] (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 @@ -3492,19 +3776,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG260 [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG280 [148] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG261 [139] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG281 [149] 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 - //SEG262 init_font_hex::@return + //SEG282 init_font_hex::@return breturn: - //SEG263 [140] return + //SEG283 [150] return rts } -//SEG264 File Data +//SEG284 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -3533,7 +3817,7 @@ Statement [37] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2 [ pri Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ 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:55 [ print_byte_at::$2 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:60 [ 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 @@ -3555,9 +3839,9 @@ Statement [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 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 -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:77 [ init_angle_screen::ang_w#0 ] +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 -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:77 [ init_angle_screen::ang_w#0 ] +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 @@ -3575,39 +3859,44 @@ Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ 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 [96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#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#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 ] ) always clobbers reg byte a -Statement [97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#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#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#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#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 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#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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 [101] (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 [102] (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 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 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#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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 [108] (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 [109] (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 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( 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#8 ] ) always clobbers reg byte a -Statement [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#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::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [112] *((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 [113] *((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 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [115] *((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 [116] *((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 [121] *((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:30 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:30 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [123] (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:36 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:37 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [124] (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:87 [ init_font_hex::$0 ] -Statement [130] *((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 [132] *((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 [133] (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 [134] (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 [137] (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 [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 +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 [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 +Statement [125] *((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 [126] *((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 [131] *((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:35 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:35 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Statement [133] (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:41 [ init_font_hex::i#2 init_font_hex::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Statement [134] (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:88 [ init_font_hex::$0 ] +Statement [140] *((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 [142] *((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 [143] (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 [144] (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 [147] (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] (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 @@ -3656,32 +3945,36 @@ Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@ 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 [96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#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#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#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 ] ) always clobbers reg byte a -Statement [97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#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#0 atan2_16::yd#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#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 [ 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#0 atan2_16::yd#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#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 atan2_16::yd#0 ] ) always clobbers reg byte a -Statement [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 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#0 atan2_16::xi#2 ] ) always clobbers reg byte a -Statement [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 [ 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 [101] (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 [102] (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 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#0 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#0 atan2_16::xi#1 ] ) always clobbers reg byte a -Statement [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 [ 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 [108] (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 [109] (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 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ( 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#8 ] ) always clobbers reg byte a -Statement [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#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::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [112] *((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 [113] *((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 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [115] *((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 [116] *((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 [121] *((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 [123] (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 [124] (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 [130] *((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 [132] *((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 [133] (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 [134] (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 [137] (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 [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 [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 +Statement [125] *((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 [126] *((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 [131] *((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 [133] (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 [134] (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 [140] *((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 [142] *((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 [143] (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 [144] (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 [147] (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 , @@ -3693,133 +3986,133 @@ Potential registers zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_ang 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_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#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:19 , -Potential registers zp ZP_WORD:21 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp ZP_WORD:21 , +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 , +Potential registers 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 ] : zp ZP_WORD:21 , Potential registers zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:23 , reg byte x , reg byte y , Potential registers zp ZP_WORD:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:24 , Potential registers zp ZP_WORD:26 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:26 , -Potential registers zp ZP_WORD:28 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:28 , -Potential registers zp ZP_BYTE:30 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:30 , reg byte x , -Potential registers zp ZP_WORD:31 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:31 , -Potential registers zp ZP_WORD:33 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:33 , -Potential registers zp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:35 , reg byte x , -Potential registers zp ZP_BYTE:36 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:36 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:37 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:37 , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:38 [ clock::return#2 ] : zp ZP_DWORD:38 , -Potential registers zp ZP_DWORD:42 [ main::$4 ] : zp ZP_DWORD:42 , -Potential registers zp ZP_DWORD:46 [ main::cyclecount#0 ] : zp ZP_DWORD:46 , -Potential registers zp ZP_DWORD:50 [ print_dword_at::dw#0 ] : zp ZP_DWORD:50 , -Potential registers zp ZP_BYTE:54 [ print_byte_at::$0 ] : zp ZP_BYTE:54 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:55 [ print_byte_at::$2 ] : zp ZP_BYTE:55 , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:56 [ clock::return#0 ] : zp ZP_DWORD:56 , -Potential registers zp ZP_BYTE:60 [ init_angle_screen::$2 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:61 [ init_angle_screen::$3 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:62 [ init_angle_screen::xw#0 ] : zp ZP_WORD:62 , -Potential registers zp ZP_BYTE:64 [ init_angle_screen::$6 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:65 [ init_angle_screen::yw#0 ] : zp ZP_WORD:65 , -Potential registers zp ZP_WORD:67 [ atan2_16::x#0 ] : zp ZP_WORD:67 , -Potential registers zp ZP_WORD:69 [ atan2_16::y#0 ] : zp ZP_WORD:69 , -Potential registers zp ZP_WORD:71 [ atan2_16::return#2 ] : zp ZP_WORD:71 , -Potential registers zp ZP_WORD:73 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:73 , -Potential registers zp ZP_WORD:75 [ init_angle_screen::$10 ] : zp ZP_WORD:75 , -Potential registers zp ZP_BYTE:77 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:77 , reg byte x , -Potential registers zp ZP_BYTE:78 [ init_angle_screen::$12 ] : zp ZP_BYTE:78 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:79 [ init_angle_screen::$13 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:80 [ init_angle_screen::$14 ] : zp ZP_BYTE:80 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:81 [ atan2_16::xd#0 ] : zp ZP_WORD:81 , -Potential registers zp ZP_WORD:83 [ atan2_16::yd#0 ] : zp ZP_WORD:83 , -Potential registers zp ZP_BYTE:85 [ atan2_16::$24 ] : zp ZP_BYTE:85 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:86 [ atan2_16::$23 ] : zp ZP_BYTE:86 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:87 [ init_font_hex::$0 ] : zp ZP_BYTE:87 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:88 [ init_font_hex::$1 ] : zp ZP_BYTE:88 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:89 [ init_font_hex::$2 ] : zp ZP_BYTE:89 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:90 [ init_font_hex::idx#3 ] : zp ZP_BYTE:90 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp ZP_BYTE:28 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp ZP_WORD:29 , +Potential registers zp ZP_WORD:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp ZP_WORD:31 , +Potential registers zp ZP_WORD:33 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:33 , +Potential registers zp ZP_BYTE:35 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:35 , reg byte x , +Potential registers zp ZP_WORD:36 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:36 , +Potential registers zp ZP_WORD:38 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:38 , +Potential registers zp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:40 , reg byte x , +Potential registers zp ZP_BYTE:41 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:41 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:42 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:42 , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:43 [ clock::return#2 ] : zp ZP_DWORD:43 , +Potential registers zp ZP_DWORD:47 [ main::$4 ] : zp ZP_DWORD:47 , +Potential registers zp ZP_DWORD:51 [ main::cyclecount#0 ] : zp ZP_DWORD:51 , +Potential registers zp ZP_DWORD:55 [ print_dword_at::dw#0 ] : zp ZP_DWORD:55 , +Potential registers zp ZP_BYTE:59 [ print_byte_at::$0 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:60 [ print_byte_at::$2 ] : zp ZP_BYTE:60 , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:61 [ clock::return#0 ] : zp ZP_DWORD:61 , +Potential registers zp ZP_BYTE:65 [ init_angle_screen::$2 ] : zp ZP_BYTE:65 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:66 [ init_angle_screen::$3 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:67 [ init_angle_screen::xw#0 ] : zp ZP_WORD:67 , +Potential registers zp ZP_BYTE:69 [ init_angle_screen::$6 ] : zp ZP_BYTE:69 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:70 [ init_angle_screen::yw#0 ] : zp ZP_WORD:70 , +Potential registers zp ZP_WORD:72 [ atan2_16::x#0 ] : zp ZP_WORD:72 , +Potential registers zp ZP_WORD:74 [ atan2_16::y#0 ] : zp ZP_WORD:74 , +Potential registers zp ZP_WORD:76 [ atan2_16::return#2 ] : zp ZP_WORD:76 , +Potential registers zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:78 , +Potential registers zp ZP_WORD:80 [ init_angle_screen::$10 ] : zp ZP_WORD:80 , +Potential registers zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:82 , reg byte x , +Potential registers zp ZP_BYTE:83 [ init_angle_screen::$12 ] : zp ZP_BYTE:83 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:84 [ init_angle_screen::$13 ] : zp ZP_BYTE:84 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:85 [ init_angle_screen::$14 ] : zp ZP_BYTE:85 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:86 [ atan2_16::$24 ] : zp ZP_BYTE:86 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:87 [ atan2_16::$23 ] : zp ZP_BYTE:87 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:88 [ init_font_hex::$0 ] : zp ZP_BYTE:88 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:89 [ init_font_hex::$1 ] : zp ZP_BYTE:89 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:90 [ init_font_hex::$2 ] : zp ZP_BYTE:90 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:91 [ init_font_hex::idx#3 ] : zp ZP_BYTE:91 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 7,706.67: zp ZP_WORD:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 3,203.15: zp ZP_WORD:19 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,817.2: zp ZP_WORD:21 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:85 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:86 [ atan2_16::$23 ] 1,930.5: zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] 1,501.5: zp ZP_WORD:83 [ atan2_16::yd#0 ] 600.6: zp ZP_WORD:81 [ atan2_16::xd#0 ] 202: zp ZP_WORD:71 [ 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 ] 3.89: zp ZP_WORD:67 [ atan2_16::x#0 ] 3.63: zp ZP_WORD:69 [ atan2_16::y#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:36 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:88 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:89 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:37 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:87 [ init_font_hex::$0 ] 202: zp ZP_BYTE:90 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:31 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:33 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:28 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:30 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [init_angle_screen] 202: zp ZP_BYTE:60 [ init_angle_screen::$2 ] 202: zp ZP_BYTE:61 [ init_angle_screen::$3 ] 202: zp ZP_BYTE:64 [ init_angle_screen::$6 ] 202: zp ZP_WORD:73 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:75 [ init_angle_screen::$10 ] 202: zp ZP_BYTE:78 [ init_angle_screen::$12 ] 202: zp ZP_BYTE:79 [ init_angle_screen::$13 ] 202: zp ZP_BYTE:80 [ 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:77 [ init_angle_screen::ang_w#0 ] 50.5: zp ZP_WORD:65 [ init_angle_screen::yw#0 ] 33.67: zp ZP_WORD:62 [ 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 [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 [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:54 [ print_byte_at::$0 ] 2: zp ZP_BYTE:55 [ print_byte_at::$2 ] +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 ] -Uplift Scope [main] 4: zp ZP_DWORD:42 [ main::$4 ] 4: zp ZP_DWORD:46 [ main::cyclecount#0 ] -Uplift Scope [clock] 4: zp ZP_DWORD:38 [ clock::return#2 ] 1.33: zp ZP_DWORD:56 [ clock::return#0 ] -Uplift Scope [print_dword_at] 2: zp ZP_DWORD:50 [ print_dword_at::dw#0 ] +Uplift Scope [main] 4: zp ZP_DWORD:47 [ main::$4 ] 4: zp ZP_DWORD:51 [ main::cyclecount#0 ] +Uplift Scope [clock] 4: zp ZP_DWORD:43 [ clock::return#2 ] 1.33: zp ZP_DWORD:61 [ clock::return#0 ] +Uplift Scope [print_dword_at] 2: zp ZP_DWORD:55 [ print_dword_at::dw#0 ] Uplift Scope [clock_start] Uplift Scope [] -Uplifting [atan2_16] best 405271 combination zp ZP_WORD:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:19 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:21 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:83 [ atan2_16::yd#0 ] zp ZP_WORD:81 [ atan2_16::xd#0 ] zp ZP_WORD:71 [ atan2_16::return#2 ] zp ZP_WORD:26 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:67 [ atan2_16::x#0 ] zp ZP_WORD:69 [ atan2_16::y#0 ] -Uplifting [init_font_hex] best 386271 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:37 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:87 [ init_font_hex::$0 ] zp ZP_BYTE:90 [ init_font_hex::idx#3 ] zp ZP_WORD:31 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:33 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:28 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:30 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [atan2_16] best 1159771 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 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: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 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:76 [ atan2_16::return#2 ] zp ZP_WORD:26 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:72 [ atan2_16::x#0 ] zp ZP_WORD:74 [ atan2_16::y#0 ] +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 384271 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:73 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:75 [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$12 ] zp ZP_BYTE:79 [ init_angle_screen::$13 ] zp ZP_BYTE:80 [ 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:77 [ init_angle_screen::ang_w#0 ] zp ZP_WORD:65 [ init_angle_screen::yw#0 ] zp ZP_WORD:62 [ 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 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 ] Limited combination testing to 100 combinations of 65536 possible. -Uplifting [print_char_at] best 384264 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 384256 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 384256 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 384256 combination zp ZP_DWORD:42 [ main::$4 ] zp ZP_DWORD:46 [ main::cyclecount#0 ] -Uplifting [clock] best 384256 combination zp ZP_DWORD:38 [ clock::return#2 ] zp ZP_DWORD:56 [ clock::return#0 ] -Uplifting [print_dword_at] best 384256 combination zp ZP_DWORD:50 [ print_dword_at::dw#0 ] -Uplifting [clock_start] best 384256 combination -Uplifting [] best 384256 combination -Attempting to uplift remaining variables inzp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] -Uplifting [atan2_16] best 384256 combination zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:37 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 384256 combination zp ZP_BYTE:37 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:87 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 384256 combination zp ZP_BYTE:87 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:79 [ init_angle_screen::$13 ] -Uplifting [init_angle_screen] best 383656 combination reg byte a [ init_angle_screen::$13 ] -Attempting to uplift remaining variables inzp ZP_BYTE:80 [ init_angle_screen::$14 ] -Uplifting [init_angle_screen] best 383056 combination reg byte a [ init_angle_screen::$14 ] -Attempting to uplift remaining variables inzp ZP_BYTE:90 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 382456 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 382456 combination zp ZP_BYTE:35 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +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 +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 ] +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 ] +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 ] +Uplifting [init_angle_screen] best 1137556 combination reg byte a [ init_angle_screen::$14 ] +Attempting to uplift remaining variables inzp ZP_BYTE:91 [ init_font_hex::idx#3 ] +Uplifting [init_font_hex] best 1136956 combination reg byte y [ init_font_hex::idx#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 1136956 combination zp ZP_BYTE:40 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Uplifting [init_angle_screen] best 382056 combination reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Uplifting [init_angle_screen] best 1136956 combination zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Uplifting [init_angle_screen] best 382056 combination zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:77 [ init_angle_screen::ang_w#0 ] -Uplifting [init_angle_screen] best 382056 combination zp ZP_BYTE:77 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1136956 combination zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] +Uplifting [init_angle_screen] best 1136956 combination zp ZP_BYTE:82 [ init_angle_screen::ang_w#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Uplifting [init_angle_screen] best 382056 combination zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 382056 combination zp ZP_BYTE:30 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_angle_screen] best 1136956 combination zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:35 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_font_hex] best 1136956 combination zp ZP_BYTE:35 [ init_font_hex::c#6 init_font_hex::c#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 382056 combination zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] +Uplifting [print_byte_at] best 1136956 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:7 [ 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:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:26 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:38 [ clock::return#2 ] ] with [ zp ZP_DWORD:42 [ main::$4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:38 [ clock::return#2 main::$4 ] ] with [ zp ZP_DWORD:56 [ clock::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:46 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:50 [ print_dword_at::dw#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:62 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:67 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:69 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:71 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:73 [ init_angle_screen::angle_w#0 ] ] - score: 1 -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 ] ] with [ zp ZP_WORD:71 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:38 [ clock::return#2 main::$4 clock::return#0 ] ] with [ zp ZP_DWORD:46 [ main::cyclecount#0 print_dword_at::dw#0 ] ] - score: 1 -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:75 [ init_angle_screen::$10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:43 [ clock::return#2 ] ] with [ zp ZP_DWORD:47 [ main::$4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:43 [ clock::return#2 main::$4 ] ] with [ zp ZP_DWORD:61 [ clock::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:51 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:55 [ print_dword_at::dw#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:67 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:72 [ atan2_16::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:70 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:74 [ atan2_16::y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:76 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:78 [ init_angle_screen::angle_w#0 ] ] - score: 1 +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 ] ] with [ zp ZP_WORD:76 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:43 [ clock::return#2 main::$4 clock::return#0 ] ] with [ zp ZP_DWORD:51 [ main::cyclecount#0 print_dword_at::dw#0 ] ] - score: 1 +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_BYTE:18) zp ZP_BYTE:14 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Allocated (was zp ZP_WORD:19) zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -Allocated (was zp ZP_WORD:21) zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -Allocated (was zp ZP_BYTE:23) zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#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 ] +Allocated (was zp ZP_WORD:21) zp ZP_WORD:18 [ 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 ] Allocated (was zp ZP_WORD:24) zp ZP_WORD:20 [ 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 init_angle_screen::$10 ] -Allocated (was zp ZP_WORD:28) zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:30) zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:31) zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:33) zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:35) zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:37) zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_DWORD:38) zp ZP_DWORD:31 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] -Allocated (was zp ZP_WORD:62) zp ZP_WORD:35 [ init_angle_screen::xw#0 atan2_16::x#0 ] -Allocated (was zp ZP_WORD:65) zp ZP_WORD:37 [ init_angle_screen::yw#0 atan2_16::y#0 ] -Allocated (was zp ZP_BYTE:77) zp ZP_BYTE:39 [ init_angle_screen::ang_w#0 ] -Allocated (was zp ZP_WORD:81) zp ZP_WORD:40 [ atan2_16::xd#0 ] -Allocated (was zp ZP_WORD:83) zp ZP_WORD:42 [ atan2_16::yd#0 ] -Allocated (was zp ZP_BYTE:87) zp ZP_BYTE:44 [ init_font_hex::$0 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:22 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +Allocated (was zp ZP_WORD:31) zp ZP_WORD:24 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +Allocated (was zp ZP_WORD:33) zp ZP_WORD:26 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated (was zp ZP_BYTE:35) zp ZP_BYTE:28 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated (was zp ZP_WORD:36) zp ZP_WORD:29 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated (was zp ZP_WORD:38) zp ZP_WORD:31 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated (was zp ZP_BYTE:40) zp ZP_BYTE:33 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated (was zp ZP_BYTE:42) zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated (was zp ZP_DWORD:43) zp ZP_DWORD:35 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +Allocated (was zp ZP_WORD:67) zp ZP_WORD:39 [ init_angle_screen::xw#0 atan2_16::x#0 ] +Allocated (was zp ZP_WORD:70) zp ZP_WORD:41 [ init_angle_screen::yw#0 atan2_16::y#0 ] +Allocated (was zp ZP_BYTE:82) zp ZP_BYTE:43 [ init_angle_screen::ang_w#0 ] +Allocated (was zp ZP_BYTE:88) zp ZP_BYTE:44 [ init_font_hex::$0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -3872,10 +4165,10 @@ main: { .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 = $1f - .label cyclecount = $1f + .label _4 = $23 + .label cyclecount = $23 //SEG11 [5] call init_font_hex - //SEG12 [118] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [128] 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] @@ -3948,9 +4241,9 @@ main: { } //SEG37 print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($1f) dw) +// print_dword_at(dword zeropage($23) dw) print_dword_at: { - .label dw = $1f + .label dw = $23 //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 @@ -4106,7 +4399,7 @@ print_char_at: { // 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 = $1f + .label return = $23 //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -4132,11 +4425,12 @@ clock: { // Utilizes symmetry around the center init_angle_screen: { .label _10 = $14 - .label xw = $23 - .label yw = $25 + .label xw = $27 + .label yw = $29 .label angle_w = $14 - .label ang_w = $27 - .label xb = $e + .label ang_w = $2b + .label x = $e + .label xb = $f .label screen_topline = $a .label screen_bottomline = $c .label y = 9 @@ -4169,8 +4463,9 @@ init_angle_screen: { //SEG104 [51] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG105 [51] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuxx=vbuc1 - ldx #0 + //SEG105 [51] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 + lda #0 + sta x jmp b2 //SEG106 [51] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] b2_from_b4: @@ -4179,8 +4474,8 @@ init_angle_screen: { jmp b2 //SEG109 init_angle_screen::@2 b2: - //SEG110 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 - txa + //SEG110 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x asl //SEG111 [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa eor #$ff @@ -4221,17 +4516,15 @@ init_angle_screen: { 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_vbuxx=vbuaa - stx $ff - ldy $ff + //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_vbuxx=vbuaa - stx $ff - ldy $ff + //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 sta (screen_bottomline),y //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 lda ang_w @@ -4245,12 +4538,13 @@ init_angle_screen: { lda ang_w ldy xb sta (screen_bottomline),y - //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuxx=_inc_vbuxx - inx + //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x //SEG131 [72] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG132 [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$13+1 + //SEG132 [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 bcc b2_from_b4 jmp b3 //SEG133 init_angle_screen::@3 @@ -4287,19 +4581,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($23) x, signed word zeropage($25) y) +// atan2_16(signed word zeropage($27) x, signed word zeropage($29) y) atan2_16: { - .label _2 = $f - .label _7 = $11 - .label yi = $f - .label xi = $11 - .label xd = $28 - .label yd = $2a + .label _2 = $10 + .label _7 = $12 + .label yi = $10 + .label xi = $12 .label angle = $14 - .label i = $13 + .label xd = $18 + .label yd = $16 .label return = $14 - .label x = $23 - .label y = $25 + .label x = $27 + .label y = $29 //SEG141 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bpl b1 @@ -4317,7 +4610,7 @@ atan2_16: { //SEG144 [81] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] b3_from_b1: b3_from_b2: - //SEG145 [81] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG145 [81] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 //SEG146 atan2_16::@3 b3: @@ -4338,7 +4631,7 @@ atan2_16: { //SEG150 [84] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] b6_from_b4: b6_from_b5: - //SEG151 [84] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG151 [84] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 //SEG152 atan2_16::@6 b6: @@ -4349,9 +4642,8 @@ atan2_16: { sta angle lda #0 sta angle+1 - //SEG155 [85] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - lda #0 - sta i + //SEG155 [85] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + ldx #0 //SEG156 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG157 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy jmp b10 @@ -4362,10 +4654,10 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG160 [87] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] + //SEG160 [87] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] b12_from_b10: - b12_from_b14: - //SEG161 [87] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + b12_from_b19: + //SEG161 [87] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp b12 //SEG162 atan2_16::@12 b12: @@ -4375,9 +4667,9 @@ atan2_16: { //SEG164 [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7_from_b12 - jmp b16 - //SEG165 atan2_16::@16 - b16: + jmp b21 + //SEG165 atan2_16::@21 + b21: //SEG166 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -4386,10 +4678,10 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG167 [91] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] + //SEG167 [91] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] b7_from_b12: - b7_from_b16: - //SEG168 [91] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + b7_from_b21: + //SEG168 [91] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp b7 //SEG169 atan2_16::@7 b7: @@ -4421,45 +4713,65 @@ atan2_16: { rts //SEG178 atan2_16::@11 b11: - //SEG179 [96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG179 [96] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG180 [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG180 [97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG181 [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG182 [99] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + b13_from_b11: + b13_from_b14: + //SEG183 [99] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG184 [99] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 + bcs b14 + jmp b15 + //SEG188 atan2_16::@15 + b15: + //SEG189 [101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 cpy #0 - beq !e+ - !: + beq b17_from_b15 + jmp b16 + //SEG190 atan2_16::@16 + b16: + //SEG191 [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG192 [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG181 [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG193 [104] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + b17_from_b15: + b17_from_b16: + //SEG194 [104] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG195 [104] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + jmp b17 + //SEG196 atan2_16::@17 + b17: + //SEG197 [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - jmp b15 - //SEG182 atan2_16::@15 - b15: - //SEG183 [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + jmp b20 + //SEG198 atan2_16::@20 + b20: + //SEG199 [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -4467,7 +4779,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG184 [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG200 [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -4475,10 +4787,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG185 [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG201 [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG186 [102] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG202 [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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -4487,31 +4799,30 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG187 [103] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - b14_from_b13: - b14_from_b15: - //SEG188 [103] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG189 [103] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG190 [103] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - jmp b14 - //SEG191 atan2_16::@14 - b14: - //SEG192 [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG193 [105] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i - beq b12_from_b14 - //SEG194 [85] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - b10_from_b14: - //SEG195 [85] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG196 [85] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG197 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG198 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG203 [110] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + b19_from_b18: + b19_from_b20: + //SEG204 [110] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG205 [110] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG206 [110] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + jmp b19 + //SEG207 atan2_16::@19 + b19: + //SEG208 [111] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG209 [112] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 + beq b12_from_b19 + //SEG210 [85] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + b10_from_b19: + //SEG211 [85] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG212 [85] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG213 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG214 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG199 atan2_16::@13 - b13: - //SEG200 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG215 atan2_16::@18 + b18: + //SEG216 [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -4519,7 +4830,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG201 [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG217 [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -4527,10 +4838,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG202 [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG218 [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG203 [109] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG219 [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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -4539,36 +4850,60 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14_from_b13 - //SEG204 atan2_16::@4 + jmp b19_from_b18 + //SEG220 atan2_16::@14 + b14: + //SEG221 [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG222 [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG223 [119] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13_from_b14 + //SEG224 atan2_16::@4 b4: - //SEG205 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG225 [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG206 atan2_16::@1 + //SEG226 atan2_16::@1 b1: - //SEG207 [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG227 [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG208 clock_start +//SEG228 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: { - //SEG209 [112] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + //SEG229 [122] *((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 - //SEG210 [113] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + //SEG230 [123] *((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 - //SEG211 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + //SEG231 [124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -4577,93 +4912,93 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - //SEG212 [115] *((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 + //SEG232 [125] *((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 - //SEG213 [116] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + //SEG233 [126] *((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 - //SEG214 clock_start::@return + //SEG234 clock_start::@return breturn: - //SEG215 [117] return + //SEG235 [127] return rts } -//SEG216 init_font_hex +//SEG236 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($19) charset) +// init_font_hex(byte* zeropage($1d) charset) init_font_hex: { .label _0 = $2c - .label idx = $1e - .label proto_lo = $1b - .label charset = $19 - .label c1 = $1d - .label proto_hi = $16 - .label c = $18 - //SEG217 [119] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label idx = $22 + .label proto_lo = $1f + .label charset = $1d + .label c1 = $21 + .label proto_hi = $1a + .label c = $1c + //SEG237 [129] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG218 [119] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG238 [129] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG219 [119] 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 + //SEG239 [129] 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 - //SEG220 [119] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG240 [129] 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 - //SEG221 [119] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG241 [129] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG222 [119] 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 - //SEG223 [119] 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 - //SEG224 [119] 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 + //SEG242 [129] 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 + //SEG243 [129] 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 + //SEG244 [129] 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 - //SEG225 init_font_hex::@1 + //SEG245 init_font_hex::@1 b1: - //SEG226 [120] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG246 [130] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG227 [120] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG247 [130] 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 - //SEG228 [120] 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 + //SEG248 [130] 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 - //SEG229 [120] 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 + //SEG249 [130] 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 - //SEG230 [120] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG250 [130] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG231 [120] 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 - //SEG232 [120] 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 - //SEG233 [120] 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 + //SEG251 [130] 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 + //SEG252 [130] 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 + //SEG253 [130] 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 - //SEG234 init_font_hex::@2 + //SEG254 init_font_hex::@2 b2: - //SEG235 [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG255 [131] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG236 [122] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG256 [132] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG237 [122] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG257 [132] 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 - //SEG238 [122] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG258 [132] 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 - //SEG239 [122] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG259 [132] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG240 [122] 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 - //SEG241 [122] 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 + //SEG260 [132] 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 + //SEG261 [132] 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 - //SEG242 init_font_hex::@3 + //SEG262 init_font_hex::@3 b3: - //SEG243 [123] (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 + //SEG263 [133] (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 @@ -4672,37 +5007,37 @@ init_font_hex: { asl asl sta _0 - //SEG244 [124] (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 + //SEG264 [134] (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 - //SEG245 [125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG265 [135] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG246 [126] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG266 [136] *((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 - //SEG247 [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG267 [137] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG248 [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG268 [138] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG249 [129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG269 [139] 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 - //SEG250 init_font_hex::@4 + //SEG270 init_font_hex::@4 b4: - //SEG251 [130] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG271 [140] *((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 - //SEG252 [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG272 [141] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG253 [132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG273 [142] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG254 [133] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG274 [143] (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 @@ -4710,7 +5045,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG255 [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG275 [144] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4718,16 +5053,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG256 [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG276 [145] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG257 [136] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG277 [146] 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 - //SEG258 init_font_hex::@5 + //SEG278 init_font_hex::@5 b5: - //SEG259 [137] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG279 [147] (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 @@ -4735,19 +5070,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG260 [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG280 [148] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG261 [139] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG281 [149] 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 - //SEG262 init_font_hex::@return + //SEG282 init_font_hex::@return breturn: - //SEG263 [140] return + //SEG283 [150] return rts } -//SEG264 File Data +//SEG284 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -4787,13 +5122,17 @@ Removing instruction jmp b5 Removing instruction jmp b6 Removing instruction jmp b10 Removing instruction jmp b12 -Removing instruction jmp b16 +Removing instruction jmp b21 Removing instruction jmp b7 Removing instruction jmp b9 Removing instruction jmp b8 Removing instruction jmp breturn +Removing instruction jmp b13 Removing instruction jmp b15 -Removing instruction jmp b14 +Removing instruction jmp b16 +Removing instruction jmp b17 +Removing instruction jmp b20 +Removing instruction jmp b19 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b2 @@ -4803,9 +5142,10 @@ Removing instruction jmp b5 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 +Removing instruction ldy x Removing instruction ldy xb Removing instruction lda #0 -Removing instruction lda #0 +Replacing instruction ldx #0 with TAX Replacing instruction ldy #0 with TAY Removing instruction ldy idx Removing instruction lda #0 @@ -4814,8 +5154,10 @@ Replacing label b2_from_b4 with b2 Replacing label b1_from_b3 with b1 Replacing label b7_from_b12 with b7 Replacing label b8_from_b7 with b8 -Replacing label b12_from_b14 with b12 -Replacing label b14_from_b13 with b14 +Replacing label b17_from_b15 with b17 +Replacing label b12_from_b19 with b12 +Replacing label b19_from_b18 with b19 +Replacing label b13_from_b14 with b13 Replacing label b6_from_b4 with b6 Replacing label b3_from_b1 with b3 Replacing label b3_from_b3 with b3 @@ -4841,14 +5183,18 @@ Removing instruction b6_from_b4: Removing instruction b6_from_b5: Removing instruction b10_from_b6: Removing instruction b12_from_b10: -Removing instruction b12_from_b14: +Removing instruction b12_from_b19: Removing instruction b7_from_b12: -Removing instruction b7_from_b16: +Removing instruction b7_from_b21: Removing instruction b8_from_b7: Removing instruction b8_from_b9: Removing instruction breturn: -Removing instruction b14_from_b13: -Removing instruction b14_from_b15: +Removing instruction b13_from_b11: +Removing instruction b13_from_b14: +Removing instruction b17_from_b15: +Removing instruction b17_from_b16: +Removing instruction b19_from_b18: +Removing instruction b19_from_b20: Removing instruction b1_from_b5: Removing instruction b2_from_b1: Removing instruction b2_from_b4: @@ -4882,10 +5228,12 @@ Removing instruction b3: Removing instruction breturn: Removing instruction b2: Removing instruction b5: -Removing instruction b16: +Removing instruction b21: Removing instruction b9: Removing instruction b15: -Removing instruction b10_from_b14: +Removing instruction b16: +Removing instruction b20: +Removing instruction b10_from_b19: Removing instruction breturn: Removing instruction b1_from_init_font_hex: Removing instruction b3_from_b2: @@ -4904,9 +5252,9 @@ Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [382] beq b12 to bne -Fixing long branch [269] bpl b1 to bmi -Fixing long branch [281] bpl b4 to bmi +Fixing long branch [374] beq b12 to bne +Fixing long branch [268] bpl b1 to bmi +Fixing long branch [280] bpl b4 to bmi FINAL SYMBOL TABLE (label) @1 @@ -4943,10 +5291,10 @@ FINAL SYMBOL TABLE (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = (byte*) 10240 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:15 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:16 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:17 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:18 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -4955,7 +5303,12 @@ FINAL SYMBOL TABLE (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -4967,7 +5320,7 @@ FINAL SYMBOL TABLE (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:20 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:20 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:20 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:20 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:20 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:20 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:20 2002.0 @@ -4975,38 +5328,50 @@ FINAL SYMBOL TABLE (word) atan2_16::angle#5 angle zp ZP_WORD:20 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:20 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:19 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:19 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:20 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:20 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:35 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:39 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:40 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:24 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:24 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:24 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:24 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:24 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:17 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:17 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:17 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:17 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:17 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:17 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:18 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:18 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:18 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:18 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:18 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:18 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:37 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:41 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:42 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:22 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:22 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:22 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:22 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:22 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:15 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:15 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:15 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:15 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:15 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:15 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:16 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:16 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:16 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:16 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:16 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:16 1001.0 (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:31 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:31 4.0 +(dword) clock::return#0 return zp ZP_DWORD:35 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:35 4.0 (void()) clock_start() (label) clock_start::@return (void()) init_angle_screen((byte*) init_angle_screen::screen) @@ -5023,7 +5388,7 @@ 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:39 72.14285714285714 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:43 72.14285714285714 (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 @@ -5034,18 +5399,18 @@ FINAL SYMBOL TABLE (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::x -(byte) init_angle_screen::x#1 reg byte x 101.0 -(byte) init_angle_screen::x#2 reg byte x 25.25 +(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 (byte) init_angle_screen::xb -(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:14 101.0 -(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:14 19.238095238095237 +(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:15 101.0 +(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:15 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:35 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:39 33.666666666666664 (byte) init_angle_screen::y (byte) init_angle_screen::y#1 y zp ZP_BYTE:9 16.5 (byte) init_angle_screen::y#4 y zp ZP_BYTE:9 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:37 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:41 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 $0 zp ZP_BYTE:44 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 @@ -5057,30 +5422,30 @@ 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:24 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:28 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:28 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:33 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:33 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:29 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:29 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:29 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:30 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:34 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:30 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:34 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:22 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:22 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:26 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:26 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:27 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:31 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:31 92.53846153846155 (void()) main() -(dword~) main::$4 $4 zp ZP_DWORD:31 4.0 +(dword~) main::$4 $4 zp ZP_DWORD:35 4.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -5092,7 +5457,7 @@ FINAL SYMBOL TABLE (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:31 4.0 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:35 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -5149,7 +5514,7 @@ FINAL SYMBOL TABLE (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:31 2.0 +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:35 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) @@ -5170,33 +5535,34 @@ 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 ] -reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_BYTE:14 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#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 ] +zp ZP_WORD:18 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:20 [ 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 init_angle_screen::$10 ] -zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:22 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:24 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:26 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:28 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:29 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:31 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:33 [ 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:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_DWORD:31 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_DWORD:35 [ 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_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] -zp ZP_WORD:35 [ init_angle_screen::xw#0 atan2_16::x#0 ] +zp ZP_WORD:39 [ init_angle_screen::xw#0 atan2_16::x#0 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_WORD:37 [ init_angle_screen::yw#0 atan2_16::y#0 ] -zp ZP_BYTE:39 [ init_angle_screen::ang_w#0 ] +zp ZP_WORD:41 [ init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:43 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] -zp ZP_WORD:40 [ atan2_16::xd#0 ] -zp ZP_WORD:42 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:44 [ init_font_hex::$0 ] @@ -5206,7 +5572,7 @@ reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 354667 +Score: 1045267 //SEG0 File Comments // Calculate the angle to the center of the screen - and show it using font-hex @@ -5249,10 +5615,10 @@ main: { .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 = $1f - .label cyclecount = $1f + .label _4 = $23 + .label cyclecount = $23 //SEG11 [5] call init_font_hex - //SEG12 [118] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [128] 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 @@ -5303,9 +5669,9 @@ main: { } //SEG37 print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($1f) dw) +// print_dword_at(dword zeropage($23) dw) print_dword_at: { - .label dw = $1f + .label dw = $23 //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 @@ -5441,7 +5807,7 @@ print_char_at: { // 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 = $1f + .label return = $23 //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -5465,11 +5831,12 @@ clock: { // Utilizes symmetry around the center init_angle_screen: { .label _10 = $14 - .label xw = $23 - .label yw = $25 + .label xw = $27 + .label yw = $29 .label angle_w = $14 - .label ang_w = $27 - .label xb = $e + .label ang_w = $2b + .label x = $e + .label xb = $f .label screen_topline = $a .label screen_bottomline = $c .label y = 9 @@ -5497,15 +5864,16 @@ init_angle_screen: { //SEG104 [51] phi (byte) init_angle_screen::xb#2 = (byte) $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta xb - //SEG105 [51] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuxx=vbuc1 - ldx #0 + //SEG105 [51] phi (byte) init_angle_screen::x#2 = (byte) 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 + lda #0 + sta x //SEG106 [51] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] //SEG107 [51] phi (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy //SEG108 [51] phi (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy //SEG109 init_angle_screen::@2 b2: - //SEG110 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 - txa + //SEG110 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + lda x asl //SEG111 [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa eor #$ff @@ -5543,17 +5911,14 @@ init_angle_screen: { 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_vbuxx=vbuaa - stx $ff - ldy $ff + //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_vbuxx=vbuaa - stx $ff - ldy $ff + //SEG126 [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_bottomline),y //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 lda ang_w @@ -5566,12 +5931,13 @@ init_angle_screen: { //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 sta (screen_bottomline),y - //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuxx=_inc_vbuxx - inx + //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 + inc x //SEG131 [72] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec xb - //SEG132 [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuxx_lt_vbuc1_then_la1 - cpx #$13+1 + //SEG132 [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 bcc b2 //SEG133 init_angle_screen::@3 //SEG134 [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 @@ -5604,19 +5970,18 @@ init_angle_screen: { // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) -// atan2_16(signed word zeropage($23) x, signed word zeropage($25) y) +// atan2_16(signed word zeropage($27) x, signed word zeropage($29) y) atan2_16: { - .label _2 = $f - .label _7 = $11 - .label yi = $f - .label xi = $11 - .label xd = $28 - .label yd = $2a + .label _2 = $10 + .label _7 = $12 + .label yi = $10 + .label xi = $12 .label angle = $14 - .label i = $13 + .label xd = $18 + .label yd = $16 .label return = $14 - .label x = $23 - .label y = $25 + .label x = $27 + .label y = $29 //SEG141 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda y+1 bmi !b1+ @@ -5632,7 +5997,7 @@ atan2_16: { sbc y+1 sta _2+1 //SEG144 [81] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] - //SEG145 [81] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy + //SEG145 [81] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy //SEG146 atan2_16::@3 b3: //SEG147 [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 @@ -5650,7 +6015,7 @@ atan2_16: { sbc x+1 sta _7+1 //SEG150 [84] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] - //SEG151 [84] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy + //SEG151 [84] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy //SEG152 atan2_16::@6 b6: //SEG153 [85] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] @@ -5658,8 +6023,8 @@ atan2_16: { lda #0 sta angle sta angle+1 - //SEG155 [85] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 - sta i + //SEG155 [85] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 + tax //SEG156 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy //SEG157 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy //SEG158 atan2_16::@10 @@ -5669,8 +6034,8 @@ atan2_16: { bne b11 lda yi bne b11 - //SEG160 [87] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] - //SEG161 [87] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //SEG160 [87] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] + //SEG161 [87] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy //SEG162 atan2_16::@12 b12: //SEG163 [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 @@ -5679,7 +6044,7 @@ atan2_16: { //SEG164 [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda x+1 bpl b7 - //SEG165 atan2_16::@16 + //SEG165 atan2_16::@21 //SEG166 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 @@ -5688,8 +6053,8 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG167 [91] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] - //SEG168 [91] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //SEG167 [91] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] + //SEG168 [91] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy //SEG169 atan2_16::@7 b7: //SEG170 [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 @@ -5713,43 +6078,53 @@ atan2_16: { rts //SEG178 atan2_16::@11 b11: - //SEG179 [96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG179 [96] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx + txa + tay + //SEG180 [97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 lda xi sta xd lda xi+1 sta xd+1 - cpy #0 - beq !e+ - !: - lda xd+1 - cmp #$80 - ror xd+1 - ror xd - dey - bne !- - !e: - //SEG180 [97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 - ldy i + //SEG181 [98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 lda yi sta yd lda yi+1 sta yd+1 + //SEG182 [99] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] + //SEG183 [99] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy + //SEG184 [99] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy + //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 + 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 cpy #0 - beq !e+ - !: + beq b17 + //SEG190 atan2_16::@16 + //SEG191 [102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG192 [103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 lda yd+1 cmp #$80 ror yd+1 ror yd - dey - bne !- - !e: - //SEG181 [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG193 [104] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] + //SEG194 [104] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy + //SEG195 [104] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy + //SEG196 atan2_16::@17 + b17: + //SEG197 [105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda yi+1 - bpl b13 - //SEG182 atan2_16::@15 - //SEG183 [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + bpl b18 + //SEG198 atan2_16::@20 + //SEG199 [106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -5757,7 +6132,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG184 [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG200 [107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -5765,10 +6140,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG185 [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG201 [108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG186 [102] (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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa + //SEG202 [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) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda angle @@ -5777,29 +6152,28 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG187 [103] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - //SEG188 [103] phi (signed word) atan2_16::xi#7 = (signed word) atan2_16::xi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#0] -- register_copy - //SEG189 [103] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG190 [103] phi (signed word) atan2_16::yi#7 = (signed word) atan2_16::yi#1 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#2] -- register_copy - //SEG191 atan2_16::@14 - b14: - //SEG192 [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG193 [105] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 - lda #CORDIC_ITERATIONS_16-1+1 - cmp i + //SEG203 [110] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] + //SEG204 [110] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy + //SEG205 [110] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy + //SEG206 [110] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy + //SEG207 atan2_16::@19 + b19: + //SEG208 [111] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG209 [112] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 + cpx #CORDIC_ITERATIONS_16-1+1 bne !b12+ jmp b12 !b12: - //SEG194 [85] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - //SEG195 [85] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG196 [85] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG197 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG198 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //SEG210 [85] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] + //SEG211 [85] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy + //SEG212 [85] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy + //SEG213 [85] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy + //SEG214 [85] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp b10 - //SEG199 atan2_16::@13 - b13: - //SEG200 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG215 atan2_16::@18 + b18: + //SEG216 [113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -5807,7 +6181,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG201 [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG217 [114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -5815,10 +6189,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG202 [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 - lda i + //SEG218 [115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + txa asl - //SEG203 [109] (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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa + //SEG219 [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) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda angle @@ -5827,36 +6201,60 @@ atan2_16: { lda angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - jmp b14 - //SEG204 atan2_16::@4 + jmp b19 + //SEG220 atan2_16::@14 + b14: + //SEG221 [117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + lda xd+1 + cmp #$80 + ror xd+1 + ror xd + //SEG222 [118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + lda yd+1 + cmp #$80 + ror yd+1 + ror yd + //SEG223 [119] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 + dey + dey + jmp b13 + //SEG224 atan2_16::@4 b4: - //SEG205 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG225 [120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6 - //SEG206 atan2_16::@1 + //SEG226 atan2_16::@1 b1: - //SEG207 [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG227 [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3 } -//SEG208 clock_start +//SEG228 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: { - //SEG209 [112] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + //SEG229 [122] *((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 - //SEG210 [113] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + //SEG230 [123] *((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 - //SEG211 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + //SEG231 [124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -5865,79 +6263,79 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - //SEG212 [115] *((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 + //SEG232 [125] *((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 - //SEG213 [116] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + //SEG233 [126] *((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 - //SEG214 clock_start::@return - //SEG215 [117] return + //SEG234 clock_start::@return + //SEG235 [127] return rts } -//SEG216 init_font_hex +//SEG236 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($19) charset) +// init_font_hex(byte* zeropage($1d) charset) init_font_hex: { .label _0 = $2c - .label idx = $1e - .label proto_lo = $1b - .label charset = $19 - .label c1 = $1d - .label proto_hi = $16 - .label c = $18 - //SEG217 [119] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG218 [119] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .label idx = $22 + .label proto_lo = $1f + .label charset = $1d + .label c1 = $21 + .label proto_hi = $1a + .label c = $1c + //SEG237 [129] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + //SEG238 [129] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG219 [119] 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 + //SEG239 [129] 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 - //SEG220 [119] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG240 [129] 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 - //SEG221 [119] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG222 [119] 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 - //SEG223 [119] 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 - //SEG224 [119] 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 - //SEG225 init_font_hex::@1 + //SEG241 [129] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG242 [129] 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 + //SEG243 [129] 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 + //SEG244 [129] 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 + //SEG245 init_font_hex::@1 b1: - //SEG226 [120] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG227 [120] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG246 [130] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG247 [130] 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 - //SEG228 [120] 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 + //SEG248 [130] 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 - //SEG229 [120] 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 - //SEG230 [120] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG231 [120] 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 - //SEG232 [120] 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 - //SEG233 [120] 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 - //SEG234 init_font_hex::@2 + //SEG249 [130] 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 + //SEG250 [130] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG251 [130] 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 + //SEG252 [130] 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 + //SEG253 [130] 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 + //SEG254 init_font_hex::@2 b2: - //SEG235 [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG255 [131] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG236 [122] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG237 [122] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG256 [132] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG257 [132] 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 - //SEG238 [122] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG258 [132] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG239 [122] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG240 [122] 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 - //SEG241 [122] 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 - //SEG242 init_font_hex::@3 + //SEG259 [132] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG260 [132] 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 + //SEG261 [132] 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 + //SEG262 init_font_hex::@3 b3: - //SEG243 [123] (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 + //SEG263 [133] (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 @@ -5946,33 +6344,33 @@ init_font_hex: { asl asl sta _0 - //SEG244 [124] (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 + //SEG264 [134] (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 - //SEG245 [125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG265 [135] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG246 [126] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG266 [136] *((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 - //SEG247 [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG267 [137] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG248 [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG268 [138] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG249 [129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG269 [139] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG250 init_font_hex::@4 - //SEG251 [130] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG270 init_font_hex::@4 + //SEG271 [140] *((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 - //SEG252 [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG272 [141] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG253 [132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG273 [142] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG254 [133] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG274 [143] (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 @@ -5980,7 +6378,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG255 [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG275 [144] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -5988,14 +6386,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG256 [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG276 [145] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG257 [136] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG277 [146] 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 - //SEG258 init_font_hex::@5 - //SEG259 [137] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG278 init_font_hex::@5 + //SEG279 [147] (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 @@ -6003,17 +6401,17 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG260 [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG280 [148] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG261 [139] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG281 [149] 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 - //SEG262 init_font_hex::@return - //SEG263 [140] return + //SEG282 init_font_hex::@return + //SEG283 [150] return rts } -//SEG264 File Data +//SEG284 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 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... diff --git a/src/test/ref/screen-center-angle.sym b/src/test/ref/screen-center-angle.sym index 4801c0375..ce4a66085 100644 --- a/src/test/ref/screen-center-angle.sym +++ b/src/test/ref/screen-center-angle.sym @@ -32,10 +32,10 @@ (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = (byte*) 10240 (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) -(signed word~) atan2_16::$2 $2 zp ZP_WORD:15 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:16 4.0 (byte~) atan2_16::$23 reg byte a 2002.0 (byte~) atan2_16::$24 reg byte a 2002.0 -(signed word~) atan2_16::$7 $7 zp ZP_WORD:17 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:18 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -44,7 +44,12 @@ (label) atan2_16::@14 (label) atan2_16::@15 (label) atan2_16::@16 +(label) atan2_16::@17 +(label) atan2_16::@18 +(label) atan2_16::@19 (label) atan2_16::@2 +(label) atan2_16::@20 +(label) atan2_16::@21 (label) atan2_16::@3 (label) atan2_16::@4 (label) atan2_16::@5 @@ -56,7 +61,7 @@ (word) atan2_16::angle (word) atan2_16::angle#1 angle zp ZP_WORD:20 3.0 (word) atan2_16::angle#11 angle zp ZP_WORD:20 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:20 364.0 +(word) atan2_16::angle#12 angle zp ZP_WORD:20 190.66666666666666 (word) atan2_16::angle#13 angle zp ZP_WORD:20 1334.6666666666667 (word) atan2_16::angle#2 angle zp ZP_WORD:20 2002.0 (word) atan2_16::angle#3 angle zp ZP_WORD:20 2002.0 @@ -64,38 +69,50 @@ (word) atan2_16::angle#5 angle zp ZP_WORD:20 4.0 (word) atan2_16::angle#6 angle zp ZP_WORD:20 2004.0 (byte) atan2_16::i -(byte) atan2_16::i#1 i zp ZP_BYTE:19 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:19 429.0 +(byte) atan2_16::i#1 reg byte x 1501.5 +(byte) atan2_16::i#2 reg byte x 208.54166666666669 (word) atan2_16::return (word) atan2_16::return#0 return zp ZP_WORD:20 34.99999999999999 (word) atan2_16::return#2 return zp ZP_WORD:20 202.0 +(byte) atan2_16::shift +(byte) atan2_16::shift#1 reg byte y 20002.0 +(byte) atan2_16::shift#2 reg byte y 8001.25 +(byte~) atan2_16::shift#5 reg byte y 667.3333333333334 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:35 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:39 2.8684210526315796 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:40 600.5999999999999 +(signed word) atan2_16::xd#1 xd zp ZP_WORD:24 6667.333333333333 +(signed word~) atan2_16::xd#10 xd zp ZP_WORD:24 1001.0 +(signed word) atan2_16::xd#2 xd zp ZP_WORD:24 1001.0 +(signed word) atan2_16::xd#3 xd zp ZP_WORD:24 7668.333333333332 +(signed word) atan2_16::xd#5 xd zp ZP_WORD:24 1001.0 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:17 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:17 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:17 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:17 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:17 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:17 4.0 +(signed word) atan2_16::xi#0 xi zp ZP_WORD:18 6.0 +(signed word) atan2_16::xi#1 xi zp ZP_WORD:18 500.5 +(signed word~) atan2_16::xi#13 xi zp ZP_WORD:18 4.0 +(signed word) atan2_16::xi#2 xi zp ZP_WORD:18 500.5 +(signed word) atan2_16::xi#3 xi zp ZP_WORD:18 267.0666666666667 +(signed word) atan2_16::xi#8 xi zp ZP_WORD:18 1001.0 (signed word) atan2_16::y -(signed word) atan2_16::y#0 y zp ZP_WORD:37 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:41 2.724999999999999 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:42 1501.5 +(signed word) atan2_16::yd#1 yd zp ZP_WORD:22 10001.0 +(signed word~) atan2_16::yd#10 yd zp ZP_WORD:22 2002.0 +(signed word) atan2_16::yd#2 yd zp ZP_WORD:22 2002.0 +(signed word) atan2_16::yd#3 yd zp ZP_WORD:22 4601.0 +(signed word) atan2_16::yd#5 yd zp ZP_WORD:22 2002.0 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:15 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:15 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:15 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:15 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:15 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:15 1001.0 +(signed word) atan2_16::yi#0 yi zp ZP_WORD:16 1.2000000000000002 +(signed word) atan2_16::yi#1 yi zp ZP_WORD:16 667.3333333333334 +(signed word~) atan2_16::yi#16 yi zp ZP_WORD:16 4.0 +(signed word) atan2_16::yi#2 yi zp ZP_WORD:16 667.3333333333334 +(signed word) atan2_16::yi#3 yi zp ZP_WORD:16 353.4117647058823 +(signed word) atan2_16::yi#8 yi zp ZP_WORD:16 1001.0 (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:31 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:31 4.0 +(dword) clock::return#0 return zp ZP_DWORD:35 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:35 4.0 (void()) clock_start() (label) clock_start::@return (void()) init_angle_screen((byte*) init_angle_screen::screen) @@ -112,7 +129,7 @@ (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:39 72.14285714285714 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:43 72.14285714285714 (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 @@ -123,18 +140,18 @@ (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::x -(byte) init_angle_screen::x#1 reg byte x 101.0 -(byte) init_angle_screen::x#2 reg byte x 25.25 +(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 (byte) init_angle_screen::xb -(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:14 101.0 -(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:14 19.238095238095237 +(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:15 101.0 +(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:15 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:35 33.666666666666664 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:39 33.666666666666664 (byte) init_angle_screen::y (byte) init_angle_screen::y#1 y zp ZP_BYTE:9 16.5 (byte) init_angle_screen::y#4 y zp ZP_BYTE:9 4.730769230769231 (signed word) init_angle_screen::yw -(word) init_angle_screen::yw#0 yw zp ZP_WORD:37 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:41 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 $0 zp ZP_BYTE:44 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 @@ -146,30 +163,30 @@ (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:24 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:28 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:28 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:33 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:33 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:29 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:29 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:29 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:30 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:34 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:30 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:34 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:22 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:22 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:26 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:26 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:27 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:31 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:31 92.53846153846155 (void()) main() -(dword~) main::$4 $4 zp ZP_DWORD:31 4.0 +(dword~) main::$4 $4 zp ZP_DWORD:35 4.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -181,7 +198,7 @@ (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:31 4.0 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:35 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -238,7 +255,7 @@ (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:31 2.0 +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:35 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) @@ -259,33 +276,34 @@ 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 ] -reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_BYTE:14 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] -zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] -zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] -zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#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 ] +zp ZP_WORD:18 [ 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 ] +reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:20 [ 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 init_angle_screen::$10 ] -zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] +zp ZP_WORD:22 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] +zp ZP_WORD:24 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] +zp ZP_WORD:26 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:28 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:29 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +zp ZP_WORD:31 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +zp ZP_BYTE:33 [ 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:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_DWORD:31 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_DWORD:35 [ 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_angle_screen::$2 ] reg byte a [ init_angle_screen::$3 ] -zp ZP_WORD:35 [ init_angle_screen::xw#0 atan2_16::x#0 ] +zp ZP_WORD:39 [ init_angle_screen::xw#0 atan2_16::x#0 ] reg byte a [ init_angle_screen::$6 ] -zp ZP_WORD:37 [ init_angle_screen::yw#0 atan2_16::y#0 ] -zp ZP_BYTE:39 [ init_angle_screen::ang_w#0 ] +zp ZP_WORD:41 [ init_angle_screen::yw#0 atan2_16::y#0 ] +zp ZP_BYTE:43 [ init_angle_screen::ang_w#0 ] reg byte a [ init_angle_screen::$12 ] reg byte a [ init_angle_screen::$13 ] reg byte a [ init_angle_screen::$14 ] -zp ZP_WORD:40 [ atan2_16::xd#0 ] -zp ZP_WORD:42 [ atan2_16::yd#0 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] zp ZP_BYTE:44 [ init_font_hex::$0 ]