diff --git a/src/main/kc/stdlib/atan2.kc b/src/main/kc/stdlib/atan2.kc index be4c9bed8..a22c8ea0b 100644 --- a/src/main/kc/stdlib/atan2.kc +++ b/src/main/kc/stdlib/atan2.kc @@ -50,7 +50,7 @@ byte[CORDIC_ITERATIONS_8] CORDIC_ATAN2_ANGLES_8 = kickasm {{ }}; // 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 +// Finding the angle requires a binary search using CORDIC_ITERATIONS_8 // Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI) byte atan2_8(signed byte x, signed byte y) { signed byte yi = (y>0)?y:-y; diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 8010ab0fb..2c166c23d 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -52,7 +52,7 @@ public class TestPrograms { @Test public void testScreenCenterAngle() throws IOException, URISyntaxException { - compileAndCompare("screen-center-angle", log()); + compileAndCompare("screen-center-angle"); } @Test diff --git a/src/test/kc/cordic-atan2-clear.kc b/src/test/kc/cordic-atan2-clear.kc index c3657f16d..a2b7db3a0 100644 --- a/src/test/kc/cordic-atan2-clear.kc +++ b/src/test/kc/cordic-atan2-clear.kc @@ -10,7 +10,7 @@ const byte* SCREEN = 0x2800; void main() { init_font_hex(CHARSET); *D018 = toD018(SCREEN, CHARSET); - init_screen(); + init_angle_screen(SCREEN); // Clear the screen by modifying the charset byte* clear_char = CHARSET; @@ -22,16 +22,23 @@ void main() { } } - -void init_screen() { - byte* screen = SCREEN; - for(signed byte y: -12..12) { - for(signed byte x: -19..20) { - signed word xw = (signed word)(word){ (byte)x, 0 }; - signed word yw = (signed word)(word){ (byte)y, 0 }; +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +void init_angle_screen(byte* screen) { + byte* screen_topline = screen+40*12; + byte *screen_bottomline = screen+40*12; + for(byte y: 0..12) { + for( byte x=0,xb=39; x<=19; x++, xb--) { + signed word xw = (signed word)(word){ 39-x*2, 0 }; + signed word yw = (signed word)(word){ y*2, 0 }; word angle_w = atan2_16(xw, yw); byte ang_w = >(angle_w+0x0080); - *screen++ = ang_w; + screen_topline[x] = 0x80+ang_w; + screen_bottomline[x] = 0x80-ang_w; + screen_topline[xb] = -ang_w; + screen_bottomline[xb] = ang_w; } + screen_topline -= 40; + screen_bottomline += 40; } -} +} \ No newline at end of file diff --git a/src/test/kc/screen-center-angle.kc b/src/test/kc/screen-center-angle.kc index f0c7632a5..bb4d7783a 100644 --- a/src/test/kc/screen-center-angle.kc +++ b/src/test/kc/screen-center-angle.kc @@ -24,15 +24,22 @@ void main() { } // Populates 1000 bytes (a screen) with values representing the angle to the center. -// The actual value stored is distance*2 to increase precision +// Utilizes symmetry around the center void init_angle_screen(byte* screen) { - for(signed byte y: -12..12) { - for(signed byte x: -19..20) { - signed word xw = (signed word)(word){ (byte)x, 0 }; - signed word yw = (signed word)(word){ (byte)y, 0 }; + byte* screen_topline = screen+40*12; + byte *screen_bottomline = screen+40*12; + for(byte y: 0..12) { + for( byte x=0,xb=39; x<=19; x++, xb--) { + signed word xw = (signed word)(word){ 39-x*2, 0 }; + signed word yw = (signed word)(word){ y*2, 0 }; word angle_w = atan2_16(xw, yw); byte ang_w = >(angle_w+0x0080); - *screen++ = ang_w; + screen_topline[x] = 0x80+ang_w; + screen_bottomline[x] = 0x80-ang_w; + screen_topline[xb] = -ang_w; + screen_bottomline[xb] = ang_w; } + screen_topline -= 40; + screen_bottomline += 40; } } \ No newline at end of file diff --git a/src/test/ref/cordic-atan2-clear.asm b/src/test/ref/cordic-atan2-clear.asm index 179add02f..64d84b697 100644 --- a/src/test/ref/cordic-atan2-clear.asm +++ b/src/test/ref/cordic-atan2-clear.asm @@ -15,7 +15,7 @@ main: { jsr init_font_hex lda #toD0181_return sta D018 - jsr init_screen + jsr init_angle_screen lda #CHARSET @@ -41,47 +41,93 @@ main: { !: jmp b2 } -init_screen: { - .label _7 = $c - .label xw = $17 - .label yw = $19 - .label angle_w = $c - .label screen = 5 +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +init_angle_screen: { + .label _10 = $f + .label xw = $1a + .label yw = $1c + .label angle_w = $f + .label ang_w = $1e + .label xb = 9 + .label screen_topline = 5 + .label screen_bottomline = 7 .label y = 4 - lda #SCREEN - sta screen+1 - lda #-$c + lda #SCREEN+$28*$c + sta screen_bottomline+1 + lda #SCREEN+$28*$c + sta screen_topline+1 + lda #0 sta y b1: - ldx #-$13 + lda #$27 + sta xb + ldx #0 b2: - ldy #0 txa + asl + eor #$ff + clc + adc #$27+1 + ldy #0 sta xw+1 sty xw lda y + asl sta yw+1 sty yw jsr atan2_16 lda #$80 clc - adc _7 - sta _7 + adc _10 + sta _10 bcc !+ - inc _7+1 - !: - lda _7+1 - ldy #0 - sta (screen),y - inc screen - bne !+ - inc screen+1 + inc _10+1 !: + lda _10+1 + sta ang_w + lda #$80 + clc + adc ang_w + stx $ff + ldy $ff + sta (screen_topline),y + lda #$80 + sec + sbc ang_w + stx $ff + ldy $ff + sta (screen_bottomline),y + lda ang_w + eor #$ff + clc + adc #1 + ldy xb + sta (screen_topline),y + lda ang_w + sta (screen_bottomline),y inx - cpx #$15 - bne b2 + dec xb + cpx #$13+1 + bcc b2 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: inc y lda #$d cmp y @@ -91,19 +137,19 @@ init_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($17) x, signed word zeropage($19) y) +// atan2_16(signed word zeropage($1a) x, signed word zeropage($1c) y) atan2_16: { - .label _2 = 7 - .label _7 = 9 - .label yi = 7 - .label xi = 9 - .label xd = $1b - .label yd = $1d - .label angle = $c - .label i = $b - .label return = $c - .label x = $17 - .label y = $19 + .label _2 = $a + .label _7 = $c + .label yi = $a + .label xi = $c + .label xd = $1f + .label yd = $21 + .label angle = $f + .label i = $e + .label return = $f + .label x = $1a + .label y = $1c lda y+1 bmi !b1+ jmp b1 @@ -266,15 +312,15 @@ atan2_16: { jmp b3 } // Make charset from proto chars -// init_font_hex(byte* zeropage($11) charset) +// init_font_hex(byte* zeropage($14) charset) init_font_hex: { - .label _0 = $1f - .label idx = $16 - .label proto_lo = $13 - .label charset = $11 - .label c1 = $15 - .label proto_hi = $e - .label c = $10 + .label _0 = $23 + .label idx = $19 + .label proto_lo = $16 + .label charset = $14 + .label c1 = $18 + .label proto_hi = $11 + .label c = $13 lda #0 sta c lda # (word~) init_screen::$7 - [26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 - [27] (byte*) init_screen::screen#1 ← ++ (byte*) init_screen::screen#2 - [28] (signed byte) init_screen::x#1 ← ++ (signed byte) init_screen::x#2 - [29] if((signed byte) init_screen::x#1!=(signed byte) $15) goto init_screen::@2 - to:init_screen::@3 -init_screen::@3: scope:[init_screen] from init_screen::@4 - [30] (signed byte) init_screen::y#1 ← ++ (signed byte) init_screen::y#4 - [31] if((signed byte) init_screen::y#1!=(signed byte) $d) goto init_screen::@1 - to:init_screen::@return -init_screen::@return: scope:[init_screen] from init_screen::@3 - [32] return + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [15] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [15] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [15] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 + [16] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 ) + [16] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 ) + [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 + [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 + [20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 + [21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 + [22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + [23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + [24] call atan2_16 + [25] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@4 +init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 + [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [27] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [28] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [29] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [30] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 + [31] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 + [34] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 + [35] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [37] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [38] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 + [39] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [40] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [41] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [42] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [43] return to:@return -atan2_16: scope:[atan2_16] from init_screen::@2 - [33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 atan2_16::@2: scope:[atan2_16] from atan2_16 - [34] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + [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 - [35] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) - [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + [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 ) + [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 - [37] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + [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 - [38] (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#8 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 - [39] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [39] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [39] (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 ) - [39] (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 ) - [40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + [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 ) + [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 - [41] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) - [42] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 - [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + [52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(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 - [44] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + [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 - [45] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) - [46] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + [56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(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 - [47] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + [58] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 to:atan2_16::@8 atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 - [48] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + [59] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) to:atan2_16::@return atan2_16::@return: scope:[atan2_16] from atan2_16::@8 - [49] return + [60] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [50] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [51] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [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 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [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) + [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 - [57] (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 ) - [57] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [57] (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 ) - [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 + [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 to:atan2_16::@10 atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [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) + [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::@4: scope:[atan2_16] from atan2_16::@3 - [64] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [65] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [66] phi() + [77] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [67] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [67] (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 ) - [67] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [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 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [68] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [68] (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 ) - [68] (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 ) - [69] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [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 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [70] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [70] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [71] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [72] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [73] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [74] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [75] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [76] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [77] if((byte) init_font_hex::i#1!=(byte) 5) goto 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 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [78] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [79] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [80] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [81] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [82] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [83] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [84] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [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 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [85] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [86] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [87] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [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 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [88] return + [99] return to:@return diff --git a/src/test/ref/cordic-atan2-clear.log b/src/test/ref/cordic-atan2-clear.log index e7feac599..5c9f92b26 100644 --- a/src/test/ref/cordic-atan2-clear.log +++ b/src/test/ref/cordic-atan2-clear.log @@ -26,7 +26,7 @@ Culled Empty Block (label) main::@9 Culled Empty Block (label) main::@7 Culled Empty Block (label) main::@10 Culled Empty Block (label) @8 -Culled Empty Block (label) init_screen::@4 +Culled Empty Block (label) init_angle_screen::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from @@ -107,9 +107,9 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@3 -atan2_16: scope:[atan2_16] from init_screen::@2 - (signed word) atan2_16::x#9 ← phi( init_screen::@2/(signed word) atan2_16::x#0 ) - (signed word) atan2_16::y#1 ← phi( init_screen::@2/(signed word) atan2_16::y#0 ) +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + (signed word) atan2_16::x#9 ← phi( init_angle_screen::@2/(signed word) atan2_16::x#0 ) + (signed word) atan2_16::y#1 ← phi( init_angle_screen::@2/(signed word) atan2_16::y#0 ) (bool~) atan2_16::$0 ← (signed word) atan2_16::y#1 >= (number) 0 if((bool~) atan2_16::$0) goto atan2_16::@1 to:atan2_16::@2 @@ -293,7 +293,8 @@ main::@11: scope:[main] from main::toD0181_@return (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) (byte~) main::$1 ← (byte) main::toD0181_return#3 *((byte*) D018#0) ← (byte~) main::$1 - call init_screen + (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN#0 + call init_angle_screen to:main::@13 main::@13: scope:[main] from main::@11 (byte*) main::clear_char#0 ← (byte*) CHARSET#0 @@ -322,56 +323,76 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@1 return to:@return -init_screen: scope:[init_screen] from main::@11 - (byte*) init_screen::screen#0 ← (byte*) SCREEN#0 - (signed byte) init_screen::y#0 ← (signed byte) -$c - to:init_screen::@1 -init_screen::@1: scope:[init_screen] from init_screen init_screen::@3 - (byte*) init_screen::screen#4 ← phi( init_screen/(byte*) init_screen::screen#0 init_screen::@3/(byte*) init_screen::screen#5 ) - (signed byte) init_screen::y#4 ← phi( init_screen/(signed byte) init_screen::y#0 init_screen::@3/(signed byte) init_screen::y#1 ) - (signed byte) init_screen::x#0 ← (signed byte) -$13 - to:init_screen::@2 -init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@5 - (byte*) init_screen::screen#3 ← phi( init_screen::@1/(byte*) init_screen::screen#4 init_screen::@5/(byte*) init_screen::screen#1 ) - (signed byte) init_screen::y#2 ← phi( init_screen::@1/(signed byte) init_screen::y#4 init_screen::@5/(signed byte) init_screen::y#5 ) - (signed byte) init_screen::x#2 ← phi( init_screen::@1/(signed byte) init_screen::x#0 init_screen::@5/(signed byte) init_screen::x#1 ) - (byte~) init_screen::$0 ← ((byte)) (signed byte) init_screen::x#2 - (word~) init_screen::$1 ← ((word)) { (byte~) init_screen::$0, (number) 0 } - (signed word~) init_screen::$2 ← ((signed word)) (word~) init_screen::$1 - (signed word) init_screen::xw#0 ← (signed word~) init_screen::$2 - (byte~) init_screen::$3 ← ((byte)) (signed byte) init_screen::y#2 - (word~) init_screen::$4 ← ((word)) { (byte~) init_screen::$3, (number) 0 } - (signed word~) init_screen::$5 ← ((signed word)) (word~) init_screen::$4 - (signed word) init_screen::yw#0 ← (signed word~) init_screen::$5 - (signed word) atan2_16::x#0 ← (signed word) init_screen::xw#0 - (signed word) atan2_16::y#0 ← (signed word) init_screen::yw#0 +init_angle_screen: scope:[init_angle_screen] from main::@11 + (byte*) init_angle_screen::screen#1 ← phi( main::@11/(byte*) init_angle_screen::screen#0 ) + (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_topline#0 ← (byte*~) init_angle_screen::$0 + (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_bottomline#0 ← (byte*~) init_angle_screen::$1 + (byte) init_angle_screen::y#0 ← (byte) 0 + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + (byte) init_angle_screen::x#0 ← (number) 0 + (byte) init_angle_screen::xb#0 ← (number) $27 + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 + (byte) init_angle_screen::xb#3 ← phi( init_angle_screen::@1/(byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + (byte*) init_angle_screen::screen_bottomline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_bottomline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte*) init_angle_screen::screen_topline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_topline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte) init_angle_screen::y#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::y#4 init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 + (number~) init_angle_screen::$3 ← (number) $27 - (number~) init_angle_screen::$2 + (word~) init_angle_screen::$4 ← ((word)) { (number~) init_angle_screen::$3, (number) 0 } + (signed word~) init_angle_screen::$5 ← ((signed word)) (word~) init_angle_screen::$4 + (signed word) init_angle_screen::xw#0 ← (signed word~) init_angle_screen::$5 + (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 + (word~) init_angle_screen::$7 ← ((word)) { (number~) init_angle_screen::$6, (number) 0 } + (signed word~) init_angle_screen::$8 ← ((signed word)) (word~) init_angle_screen::$7 + (signed word) init_angle_screen::yw#0 ← (signed word~) init_angle_screen::$8 + (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 + (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 call atan2_16 (word) atan2_16::return#2 ← (word) atan2_16::return#1 - to:init_screen::@5 -init_screen::@5: scope:[init_screen] from init_screen::@2 - (signed byte) init_screen::y#5 ← phi( init_screen::@2/(signed byte) init_screen::y#2 ) - (signed byte) init_screen::x#3 ← phi( init_screen::@2/(signed byte) init_screen::x#2 ) - (byte*) init_screen::screen#2 ← phi( init_screen::@2/(byte*) init_screen::screen#3 ) - (word) atan2_16::return#4 ← phi( init_screen::@2/(word) atan2_16::return#2 ) - (word~) init_screen::$6 ← (word) atan2_16::return#4 - (word) init_screen::angle_w#0 ← (word~) init_screen::$6 - (number~) init_screen::$7 ← (word) init_screen::angle_w#0 + (number) $80 - (number~) init_screen::$8 ← > (number~) init_screen::$7 - (byte) init_screen::ang_w#0 ← (number~) init_screen::$8 - *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 - (byte*) init_screen::screen#1 ← ++ (byte*) init_screen::screen#2 - (signed byte) init_screen::x#1 ← (signed byte) init_screen::x#3 + rangenext(-$13,$14) - (bool~) init_screen::$9 ← (signed byte) init_screen::x#1 != rangelast(-$13,$14) - if((bool~) init_screen::$9) goto init_screen::@2 - to:init_screen::@3 -init_screen::@3: scope:[init_screen] from init_screen::@5 - (byte*) init_screen::screen#5 ← phi( init_screen::@5/(byte*) init_screen::screen#1 ) - (signed byte) init_screen::y#3 ← phi( init_screen::@5/(signed byte) init_screen::y#5 ) - (signed byte) init_screen::y#1 ← (signed byte) init_screen::y#3 + rangenext(-$c,$c) - (bool~) init_screen::$10 ← (signed byte) init_screen::y#1 != rangelast(-$c,$c) - if((bool~) init_screen::$10) goto init_screen::@1 - to:init_screen::@return -init_screen::@return: scope:[init_screen] from init_screen::@3 + to:init_angle_screen::@5 +init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 + (byte) init_angle_screen::y#5 ← phi( init_angle_screen::@2/(byte) init_angle_screen::y#2 ) + (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@2/(byte) init_angle_screen::xb#3 ) + (byte*) init_angle_screen::screen_bottomline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_bottomline#4 ) + (byte) init_angle_screen::x#3 ← phi( init_angle_screen::@2/(byte) init_angle_screen::x#2 ) + (byte*) init_angle_screen::screen_topline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_topline#4 ) + (word) atan2_16::return#4 ← phi( init_angle_screen::@2/(word) atan2_16::return#2 ) + (word~) init_angle_screen::$9 ← (word) atan2_16::return#4 + (word) init_angle_screen::angle_w#0 ← (word~) init_angle_screen::$9 + (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 + (number~) init_angle_screen::$11 ← > (number~) init_angle_screen::$10 + (byte) init_angle_screen::ang_w#0 ← (number~) init_angle_screen::$11 + (number~) init_angle_screen::$12 ← (number) $80 + (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$12 + (number~) init_angle_screen::$13 ← (number) $80 - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$13 + (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#3 + (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 + if((bool~) init_angle_screen::$15) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 + (byte) init_angle_screen::y#3 ← phi( init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte*) init_angle_screen::screen_bottomline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte*) init_angle_screen::screen_topline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 + (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 + (byte) init_angle_screen::y#1 ← (byte) init_angle_screen::y#3 + rangenext(0,$c) + (bool~) init_angle_screen::$16 ← (byte) init_angle_screen::y#1 != rangelast(0,$c) + if((bool~) init_angle_screen::$16) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 return to:@return @9: scope:[] from @7 @@ -539,6 +560,71 @@ SYMBOL TABLE SSA (signed word) atan2_16::yi#7 (signed word) atan2_16::yi#8 (signed word) atan2_16::yi#9 +(void()) init_angle_screen((byte*) init_angle_screen::screen) +(byte*~) init_angle_screen::$0 +(byte*~) init_angle_screen::$1 +(number~) init_angle_screen::$10 +(number~) init_angle_screen::$11 +(number~) init_angle_screen::$12 +(number~) init_angle_screen::$13 +(byte~) init_angle_screen::$14 +(bool~) init_angle_screen::$15 +(bool~) init_angle_screen::$16 +(number~) init_angle_screen::$2 +(number~) init_angle_screen::$3 +(word~) init_angle_screen::$4 +(signed word~) init_angle_screen::$5 +(number~) init_angle_screen::$6 +(word~) init_angle_screen::$7 +(signed word~) init_angle_screen::$8 +(word~) init_angle_screen::$9 +(label) init_angle_screen::@1 +(label) init_angle_screen::@2 +(label) init_angle_screen::@3 +(label) init_angle_screen::@5 +(label) init_angle_screen::@return +(byte) init_angle_screen::ang_w +(byte) init_angle_screen::ang_w#0 +(word) init_angle_screen::angle_w +(word) init_angle_screen::angle_w#0 +(byte*) init_angle_screen::screen +(byte*) init_angle_screen::screen#0 +(byte*) init_angle_screen::screen#1 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#0 +(byte*) init_angle_screen::screen_bottomline#1 +(byte*) init_angle_screen::screen_bottomline#2 +(byte*) init_angle_screen::screen_bottomline#3 +(byte*) init_angle_screen::screen_bottomline#4 +(byte*) init_angle_screen::screen_bottomline#5 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#0 +(byte*) init_angle_screen::screen_topline#1 +(byte*) init_angle_screen::screen_topline#2 +(byte*) init_angle_screen::screen_topline#3 +(byte*) init_angle_screen::screen_topline#4 +(byte*) init_angle_screen::screen_topline#5 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#0 +(byte) init_angle_screen::x#1 +(byte) init_angle_screen::x#2 +(byte) init_angle_screen::x#3 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#0 +(byte) init_angle_screen::xb#1 +(byte) init_angle_screen::xb#2 +(byte) init_angle_screen::xb#3 +(signed word) init_angle_screen::xw +(signed word) init_angle_screen::xw#0 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#0 +(byte) init_angle_screen::y#1 +(byte) init_angle_screen::y#2 +(byte) init_angle_screen::y#3 +(byte) init_angle_screen::y#4 +(byte) init_angle_screen::y#5 +(signed word) init_angle_screen::yw +(signed word) init_angle_screen::yw#0 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 (byte~) init_font_hex::$1 @@ -601,50 +687,6 @@ SYMBOL TABLE SSA (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#3 (byte*) init_font_hex::proto_lo#4 -(void()) init_screen() -(byte~) init_screen::$0 -(word~) init_screen::$1 -(bool~) init_screen::$10 -(signed word~) init_screen::$2 -(byte~) init_screen::$3 -(word~) init_screen::$4 -(signed word~) init_screen::$5 -(word~) init_screen::$6 -(number~) init_screen::$7 -(number~) init_screen::$8 -(bool~) init_screen::$9 -(label) init_screen::@1 -(label) init_screen::@2 -(label) init_screen::@3 -(label) init_screen::@5 -(label) init_screen::@return -(byte) init_screen::ang_w -(byte) init_screen::ang_w#0 -(word) init_screen::angle_w -(word) init_screen::angle_w#0 -(byte*) init_screen::screen -(byte*) init_screen::screen#0 -(byte*) init_screen::screen#1 -(byte*) init_screen::screen#2 -(byte*) init_screen::screen#3 -(byte*) init_screen::screen#4 -(byte*) init_screen::screen#5 -(signed byte) init_screen::x -(signed byte) init_screen::x#0 -(signed byte) init_screen::x#1 -(signed byte) init_screen::x#2 -(signed byte) init_screen::x#3 -(signed word) init_screen::xw -(signed word) init_screen::xw#0 -(signed byte) init_screen::y -(signed byte) init_screen::y#0 -(signed byte) init_screen::y#1 -(signed byte) init_screen::y#2 -(signed byte) init_screen::y#3 -(signed byte) init_screen::y#4 -(signed byte) init_screen::y#5 -(signed word) init_screen::yw -(signed word) init_screen::yw#0 (void()) main() (byte~) main::$1 (bool~) main::$3 @@ -698,8 +740,8 @@ SYMBOL TABLE SSA (byte*) main::toD0181_screen#0 (byte*) main::toD0181_screen#1 -Fixing inline constructor with init_screen::$11 ← (byte)init_screen::$0 w= (byte)0 -Fixing inline constructor with init_screen::$12 ← (byte)init_screen::$3 w= (byte)0 +Fixing inline constructor with init_angle_screen::$17 ← (byte)init_angle_screen::$3 w= (byte)0 +Fixing inline constructor with init_angle_screen::$18 ← (byte)init_angle_screen::$6 w= (byte)0 Successful SSA optimization Pass2FixInlineConstructorsNew Adding number conversion cast (unumber) 0 in (byte) init_font_hex::idx#0 ← (number) 0 Adding number conversion cast (unumber) 0 in *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (number) 0 @@ -736,9 +778,26 @@ Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::to Adding number conversion cast (unumber) $ff in (bool~) main::$3 ← *((byte*) RASTER#0) != (number) $ff Adding number conversion cast (unumber) $800 in (byte*~) main::$4 ← (byte*) CHARSET#0 + (number) $800 Adding number conversion cast (unumber) 0 in *((byte*) main::clear_char#3) ← (number) 0 -Adding number conversion cast (unumber) $80 in (number~) init_screen::$7 ← (word) init_screen::angle_w#0 + (number) $80 -Adding number conversion cast (unumber) init_screen::$7 in (number~) init_screen::$7 ← (word) init_screen::angle_w#0 + (unumber)(number) $80 -Adding number conversion cast (unumber) init_screen::$8 in (number~) init_screen::$8 ← > (unumber~) init_screen::$7 +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) 0 in (byte) init_angle_screen::x#0 ← (number) 0 +Adding number conversion cast (unumber) $27 in (byte) init_angle_screen::xb#0 ← (number) $27 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $27 in (number~) init_angle_screen::$3 ← (number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) init_angle_screen::$3 in (number~) init_angle_screen::$3 ← (unumber)(number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$6 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 +Adding number conversion cast (unumber) init_angle_screen::$10 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (unumber)(number) $80 +Adding number conversion cast (unumber) init_angle_screen::$11 in (number~) init_angle_screen::$11 ← > (unumber~) init_angle_screen::$10 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$12 ← (number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$12 in (number~) init_angle_screen::$12 ← (unumber)(number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$13 ← (number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$13 in (number~) init_angle_screen::$13 ← (unumber)(number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $13 in (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 Successful SSA optimization PassNAddNumberTypeConversions Adding number conversion cast (byte) to elements in (byte[]) FONT_HEX_PROTO#0 ← { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 } Successful SSA optimization PassNAddArrayNumberTypeConversions @@ -755,10 +814,10 @@ Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $2800 Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 Inlining cast *((byte*) main::clear_char#3) ← (unumber)(number) 0 -Inlining cast (byte~) init_screen::$0 ← (byte)(signed byte) init_screen::x#2 -Inlining cast (signed word~) init_screen::$2 ← (signed word)(word~) init_screen::$1 -Inlining cast (byte~) init_screen::$3 ← (byte)(signed byte) init_screen::y#2 -Inlining cast (signed word~) init_screen::$5 ← (signed word)(word~) init_screen::$4 +Inlining cast (byte) init_angle_screen::x#0 ← (unumber)(number) 0 +Inlining cast (byte) init_angle_screen::xb#0 ← (unumber)(number) $27 +Inlining cast (signed word~) init_angle_screen::$5 ← (signed word)(word~) init_angle_screen::$4 +Inlining cast (signed word~) init_angle_screen::$8 ← (signed word)(word~) init_angle_screen::$7 Successful SSA optimization Pass2InlineCast Simplifying constant integer cast 0 Simplifying constant integer cast 0 @@ -871,11 +930,19 @@ Simplifying constant integer cast $f Simplifying constant integer cast $ff Simplifying constant integer cast $800 Simplifying constant integer cast 0 -Simplifying constant integer cast (byte~) init_screen::$0 Simplifying constant integer cast 0 -Simplifying constant integer cast (byte~) init_screen::$3 +Simplifying constant integer cast $27 +Simplifying constant integer cast 2 +Simplifying constant integer cast $27 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 Simplifying constant integer cast 0 Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast $13 +Simplifying constant integer cast $28 +Simplifying constant integer cast $28 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 @@ -904,7 +971,17 @@ Finalized unsigned number type (byte) $f Finalized unsigned number type (byte) $ff Finalized unsigned number type (word) $800 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $13 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) $28 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (byte) 1 Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9 @@ -914,12 +991,17 @@ Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) mai Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 -Inferred type updated to word in (unumber~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80 -Inferred type updated to byte in (unumber~) init_screen::$8 ← > (word~) init_screen::$7 +Inferred type updated to byte in (unumber~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 +Inferred type updated to byte in (unumber~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (byte) 2 +Inferred type updated to word in (unumber~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 +Inferred type updated to byte in (unumber~) init_angle_screen::$11 ← > (word~) init_angle_screen::$10 +Inferred type updated to byte in (unumber~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 +Inferred type updated to byte in (unumber~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 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 [140] (bool~) main::$6 ← (byte*) main::clear_char#2 >= (byte*~) main::$4 from [139] (bool~) main::$5 ← (byte*) main::clear_char#2 < (byte*~) main::$4 +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 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 @@ -954,17 +1036,20 @@ Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 Alias (byte*) main::clear_char#2 = (byte*) main::clear_char#4 (byte*) main::clear_char#3 -Alias (word~) init_screen::$1 = (word~) init_screen::$11 -Alias (signed word) init_screen::xw#0 = (signed word~) init_screen::$2 -Alias (word~) init_screen::$4 = (word~) init_screen::$12 -Alias (signed word) init_screen::yw#0 = (signed word~) init_screen::$5 +Alias (byte*) init_angle_screen::screen_topline#0 = (byte*~) init_angle_screen::$0 +Alias (byte*) init_angle_screen::screen_bottomline#0 = (byte*~) init_angle_screen::$1 +Alias (word~) init_angle_screen::$4 = (word~) init_angle_screen::$17 +Alias (signed word) init_angle_screen::xw#0 = (signed word~) init_angle_screen::$5 +Alias (word~) init_angle_screen::$7 = (word~) init_angle_screen::$18 +Alias (signed word) init_angle_screen::yw#0 = (signed word~) init_angle_screen::$8 Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 -Alias (byte*) init_screen::screen#2 = (byte*) init_screen::screen#3 -Alias (signed byte) init_screen::x#2 = (signed byte) init_screen::x#3 -Alias (signed byte) init_screen::y#2 = (signed byte) init_screen::y#5 (signed byte) init_screen::y#3 -Alias (word) init_screen::angle_w#0 = (word~) init_screen::$6 -Alias (byte) init_screen::ang_w#0 = (byte~) init_screen::$8 -Alias (byte*) init_screen::screen#1 = (byte*) init_screen::screen#5 +Alias (byte*) init_angle_screen::screen_topline#2 = (byte*) init_angle_screen::screen_topline#4 (byte*) init_angle_screen::screen_topline#3 +Alias (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#3 +Alias (byte*) init_angle_screen::screen_bottomline#2 = (byte*) init_angle_screen::screen_bottomline#4 (byte*) init_angle_screen::screen_bottomline#3 +Alias (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#3 +Alias (byte) init_angle_screen::y#2 = (byte) init_angle_screen::y#5 (byte) init_angle_screen::y#3 +Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$9 +Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$11 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 @@ -985,7 +1070,9 @@ Self Phi Eliminated (byte) init_font_hex::c#2 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 -Self Phi Eliminated (signed byte) init_screen::y#2 +Self Phi Eliminated (byte) init_angle_screen::y#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_bottomline#2 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1 Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4 @@ -998,7 +1085,10 @@ 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 (byte*) main::clear_char#2 (byte*) main::clear_char#5 -Identical Phi Values (signed byte) init_screen::y#2 (signed byte) init_screen::y#4 +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 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 @@ -1010,10 +1100,10 @@ Simple Condition (bool~) atan2_16::$21 [71] if((signed word) atan2_16::yi#3>=(si 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 [136] if(*((byte*) RASTER#0)!=(byte) $ff) goto main::@4 -Simple Condition (bool~) main::$6 [141] if((byte*) main::clear_char#5>=(byte*~) main::$4) goto main::@1 -Simple Condition (bool~) init_screen::$9 [175] if((signed byte) init_screen::x#1!=rangelast(-$13,$14)) goto init_screen::@2 -Simple Condition (bool~) init_screen::$10 [179] if((signed byte) init_screen::y#1!=rangelast(-$c,$c)) goto init_screen::@1 +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 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 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement @@ -1034,21 +1124,22 @@ Constant (const byte*) RASTER#0 = (byte*) 53266 Constant (const byte*) D018#0 = (byte*) 53272 Constant (const byte*) CHARSET#0 = (byte*) 8192 Constant (const byte*) SCREEN#0 = (byte*) 10240 -Constant (const signed byte) init_screen::y#0 = -$c -Constant (const signed byte) init_screen::x#0 = -$13 +Constant (const byte) init_angle_screen::y#0 = 0 +Constant (const byte) init_angle_screen::x#0 = 0 +Constant (const byte) init_angle_screen::xb#0 = $27 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO#0 Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO#0 Constant (const byte*) init_font_hex::charset#1 = CHARSET#0 Constant (const byte*) main::toD0181_screen#0 = SCREEN#0 Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 +Constant (const byte*) init_angle_screen::screen#0 = SCREEN#0 Constant (const byte*) main::clear_char#0 = CHARSET#0 -Constant (const byte*) init_screen::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 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [133] if(true) goto main::@4 +if() condition always true - replacing block destination [134] 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 @@ -1056,10 +1147,9 @@ 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 [173] init_screen::x#1 ← ++ init_screen::x#2 to ++ -Resolved ranged comparison value [175] if(init_screen::x#1!=rangelast(-$13,$14)) goto init_screen::@2 to (number) $15 -Resolved ranged next value [177] init_screen::y#1 ← ++ init_screen::y#4 to ++ -Resolved ranged comparison value [179] if(init_screen::y#1!=rangelast(-$c,$c)) goto init_screen::@1 to (number) $d +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 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 @@ -1069,20 +1159,24 @@ 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 (snumber) $15 in if((signed byte) init_screen::x#1!=(number) $15) goto init_screen::@2 -Adding number conversion cast (snumber) $d in if((signed byte) init_screen::y#1!=(number) $d) goto init_screen::@1 +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 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 -Simplifying constant integer cast $15 +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 +Simplifying constant integer cast 1 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 signed number type (signed byte) $15 -Finalized signed number type (signed byte) $d +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 @@ -1094,12 +1188,16 @@ 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 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 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::$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 @@ -1133,15 +1231,14 @@ Constant right-side identified [54] (byte) main::toD0181_return#0 ← (const byt 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 [63] (byte~) init_screen::$0 ← (byte)(signed byte) init_screen::x#2 keeping init_screen::x#2 -Inlining Noop Cast [66] (byte~) init_screen::$3 ← (byte)(signed byte) init_screen::y#4 keeping init_screen::y#4 -Successful SSA optimization Pass2NopCastInlining -Inlining Noop Cast [65] (signed word) init_screen::xw#0 ← (signed word)(word~) init_screen::$1 keeping init_screen::xw#0 -Inlining Noop Cast [68] (signed word) init_screen::yw#0 ← (signed word)(word~) init_screen::$4 keeping init_screen::yw#0 +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 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 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 @@ -1154,20 +1251,24 @@ Inlining constant with var siblings (const byte) init_font_hex::idx#1 Inlining constant with var siblings (const word) atan2_16::angle#0 Inlining constant with var siblings (const byte) atan2_16::i#0 Inlining constant with var siblings (const byte*) main::clear_char#0 -Inlining constant with var siblings (const signed byte) init_screen::y#0 -Inlining constant with var siblings (const signed byte) init_screen::x#0 -Inlining constant with var siblings (const byte*) init_screen::screen#0 +Inlining constant with var siblings (const byte) init_angle_screen::y#0 +Inlining constant with var siblings (const byte) init_angle_screen::x#0 +Inlining constant with var siblings (const byte) init_angle_screen::xb#0 +Inlining constant with var siblings (const byte*) init_angle_screen::screen_topline#0 +Inlining constant with var siblings (const byte*) init_angle_screen::screen_bottomline#0 Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0 Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 Constant inlined main::clear_char#0 = (const byte*) CHARSET#0 Constant inlined init_font_hex::proto_hi#0 = (const byte[]) FONT_HEX_PROTO#0 +Constant inlined init_angle_screen::y#0 = (byte) 0 +Constant inlined init_angle_screen::x#0 = (byte) 0 Constant inlined atan2_16::angle#0 = (byte) 0 -Constant inlined init_screen::screen#0 = (const byte*) SCREEN#0 +Constant inlined init_angle_screen::screen_bottomline#0 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET#0 +Constant inlined init_angle_screen::screen#0 = (const byte*) SCREEN#0 Constant inlined init_font_hex::c1#0 = (byte) 0 Constant inlined atan2_16::$16 = (const byte) CORDIC_ITERATIONS_16#0-(byte) 1 -Constant inlined init_screen::y#0 = (signed byte) -$c -Constant inlined init_screen::x#0 = (signed byte) -$13 +Constant inlined init_angle_screen::xb#0 = (byte) $27 Constant inlined atan2_16::i#0 = (byte) 0 Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0 Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN#0&(word) $3fff @@ -1175,6 +1276,7 @@ Constant inlined init_font_hex::i#0 = (byte) 0 Constant inlined main::toD0181_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4 Constant inlined main::toD0181_$7#0 = >(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f Constant inlined init_font_hex::idx#1 = ++(byte) 0 +Constant inlined init_angle_screen::screen_topline#0 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c Constant inlined init_font_hex::idx#0 = (byte) 0 Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 @@ -1196,8 +1298,8 @@ Added new block during phi lifting atan2_16::@27(between atan2_16::@15 and atan2 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 init_screen::@6(between init_screen::@3 and init_screen::@1) -Added new block during phi lifting init_screen::@7(between init_screen::@5 and init_screen::@2) +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 Adding NOP phi() at start of @1 Adding NOP phi() at start of @3 @@ -1210,52 +1312,52 @@ Adding NOP phi() at start of main::@12 Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::toD0181_@return Adding NOP phi() at start of main::@13 -Adding NOP phi() at start of init_screen +Adding NOP phi() at start of init_angle_screen Adding NOP phi() at start of init_font_hex CALL GRAPH Calls in [] to main:5 -Calls in [main] to init_font_hex:9 init_screen:14 -Calls in [init_screen] to atan2_16:30 +Calls in [main] to init_font_hex:9 init_angle_screen:14 +Calls in [init_angle_screen] to atan2_16:32 -Created 25 initial phi equivalence classes +Created 26 initial phi equivalence classes Coalesced [21] main::clear_char#6 ← main::clear_char#1 -Coalesced [24] init_screen::screen#7 ← init_screen::screen#4 -Coalesced [42] init_screen::y#6 ← init_screen::y#1 -Coalesced [43] init_screen::screen#6 ← init_screen::screen#1 -Coalesced [44] init_screen::x#4 ← init_screen::x#1 -Coalesced (already) [45] init_screen::screen#8 ← init_screen::screen#1 -Coalesced [48] atan2_16::yi#12 ← atan2_16::$2 -Coalesced [52] atan2_16::xi#9 ← atan2_16::$7 -Coalesced [54] atan2_16::yi#14 ← atan2_16::yi#0 -Coalesced [55] atan2_16::xi#11 ← atan2_16::xi#0 -Coalesced [58] atan2_16::angle#17 ← atan2_16::angle#12 -Coalesced [63] atan2_16::angle#22 ← atan2_16::angle#4 -Coalesced [67] atan2_16::return#5 ← atan2_16::angle#5 -Coalesced [70] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [71] atan2_16::angle#21 ← atan2_16::angle#1 -Coalesced [79] atan2_16::yi#16 ← atan2_16::yi#2 -Coalesced [80] atan2_16::angle#20 ← atan2_16::angle#3 -Coalesced [81] atan2_16::xi#13 ← atan2_16::xi#2 -Coalesced [85] atan2_16::yi#13 ← atan2_16::yi#7 -Coalesced [86] atan2_16::xi#10 ← atan2_16::xi#7 -Coalesced [87] atan2_16::i#7 ← atan2_16::i#1 -Coalesced [88] atan2_16::angle#16 ← atan2_16::angle#13 -Coalesced (already) [89] atan2_16::angle#18 ← atan2_16::angle#13 -Coalesced [94] atan2_16::yi#15 ← atan2_16::yi#1 -Coalesced [95] atan2_16::angle#19 ← atan2_16::angle#2 -Coalesced [96] atan2_16::xi#12 ← atan2_16::xi#1 -Not coalescing [97] atan2_16::xi#8 ← atan2_16::x#0 -Not coalescing [98] atan2_16::yi#11 ← atan2_16::y#0 -Coalesced [101] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [123] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [124] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [125] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [126] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [127] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [128] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [129] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [130] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 18 phi equivalence classes +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 [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 Culled Empty Block (label) @1 Culled Empty Block (label) @3 Culled Empty Block (label) @7 @@ -1263,8 +1365,8 @@ Culled Empty Block (label) @10 Culled Empty Block (label) main::@12 Culled Empty Block (label) main::toD0181_@return Culled Empty Block (label) main::@13 -Culled Empty Block (label) init_screen::@6 -Culled Empty Block (label) init_screen::@7 +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 @@ -1286,13 +1388,13 @@ Renumbering block main::@4 to main::@2 Renumbering block main::@5 to main::@3 Renumbering block main::@6 to main::@4 Renumbering block main::@11 to main::@5 -Renumbering block init_screen::@5 to init_screen::@4 +Renumbering block init_angle_screen::@5 to init_angle_screen::@4 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of main::toD0181 -Adding NOP phi() at start of init_screen +Adding NOP phi() at start of init_angle_screen Adding NOP phi() at start of init_font_hex FINAL CONTROL FLOW GRAPH @@ -1314,7 +1416,7 @@ main::toD0181: scope:[main] from main to:main::@5 main::@5: scope:[main] from main::toD0181 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 - [8] call init_screen + [8] call init_angle_screen to:main::@1 main::@1: scope:[main] from main::@3 main::@4 main::@5 [9] (byte*) main::clear_char#5 ← phi( main::@5/(const byte*) CHARSET#0 main::@4/(byte*) main::clear_char#1 ) @@ -1329,154 +1431,166 @@ main::@4: scope:[main] from main::@3 [12] *((byte*) main::clear_char#5) ← (byte) 0 [13] (byte*) main::clear_char#1 ← ++ (byte*) main::clear_char#5 to:main::@1 -init_screen: scope:[init_screen] from main::@5 +init_angle_screen: scope:[init_angle_screen] from main::@5 [14] phi() - to:init_screen::@1 -init_screen::@1: scope:[init_screen] from init_screen init_screen::@3 - [15] (byte*) init_screen::screen#4 ← phi( init_screen/(const byte*) SCREEN#0 init_screen::@3/(byte*) init_screen::screen#1 ) - [15] (signed byte) init_screen::y#4 ← phi( init_screen/(signed byte) -$c init_screen::@3/(signed byte) init_screen::y#1 ) - to:init_screen::@2 -init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@4 - [16] (byte*) init_screen::screen#2 ← phi( init_screen::@1/(byte*) init_screen::screen#4 init_screen::@4/(byte*) init_screen::screen#1 ) - [16] (signed byte) init_screen::x#2 ← phi( init_screen::@1/(signed byte) -$13 init_screen::@4/(signed byte) init_screen::x#1 ) - [17] (word) init_screen::xw#0 ← (byte)(signed byte) init_screen::x#2 w= (byte) 0 - [18] (word) init_screen::yw#0 ← (byte)(signed byte) init_screen::y#4 w= (byte) 0 - [19] (signed word) atan2_16::x#0 ← (signed word)(word) init_screen::xw#0 - [20] (signed word) atan2_16::y#0 ← (signed word)(word) init_screen::yw#0 - [21] call atan2_16 - [22] (word) atan2_16::return#2 ← (word) atan2_16::return#0 - to:init_screen::@4 -init_screen::@4: scope:[init_screen] from init_screen::@2 - [23] (word) init_screen::angle_w#0 ← (word) atan2_16::return#2 - [24] (word~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80 - [25] (byte) init_screen::ang_w#0 ← > (word~) init_screen::$7 - [26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 - [27] (byte*) init_screen::screen#1 ← ++ (byte*) init_screen::screen#2 - [28] (signed byte) init_screen::x#1 ← ++ (signed byte) init_screen::x#2 - [29] if((signed byte) init_screen::x#1!=(signed byte) $15) goto init_screen::@2 - to:init_screen::@3 -init_screen::@3: scope:[init_screen] from init_screen::@4 - [30] (signed byte) init_screen::y#1 ← ++ (signed byte) init_screen::y#4 - [31] if((signed byte) init_screen::y#1!=(signed byte) $d) goto init_screen::@1 - to:init_screen::@return -init_screen::@return: scope:[init_screen] from init_screen::@3 - [32] return + to:init_angle_screen::@1 +init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 + [15] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [15] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [15] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + to:init_angle_screen::@2 +init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 + [16] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 ) + [16] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 ) + [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 + [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 + [20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 + [21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 + [22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + [23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + [24] call atan2_16 + [25] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + to:init_angle_screen::@4 +init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 + [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [27] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [28] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [29] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [30] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 + [31] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 + [34] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 + [35] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [37] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [38] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 + to:init_angle_screen::@3 +init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 + [39] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [40] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [41] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [42] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 + to:init_angle_screen::@return +init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 + [43] return to:@return -atan2_16: scope:[atan2_16] from init_screen::@2 - [33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +atan2_16: scope:[atan2_16] from init_angle_screen::@2 + [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 atan2_16::@2: scope:[atan2_16] from atan2_16 - [34] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + [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 - [35] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) - [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + [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 ) + [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 - [37] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + [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 - [38] (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#8 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 - [39] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [39] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [39] (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 ) - [39] (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 ) - [40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + [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 ) + [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 - [41] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) - [42] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 - [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + [52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(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 - [44] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + [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 - [45] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) - [46] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + [56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(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 - [47] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + [58] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 to:atan2_16::@8 atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 - [48] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + [59] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) to:atan2_16::@return atan2_16::@return: scope:[atan2_16] from atan2_16::@8 - [49] return + [60] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [50] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [51] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [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 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [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) + [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 - [57] (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 ) - [57] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [57] (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 ) - [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 + [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 to:atan2_16::@10 atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [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) + [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::@4: scope:[atan2_16] from atan2_16::@3 - [64] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [65] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 to:atan2_16::@3 init_font_hex: scope:[init_font_hex] from main - [66] phi() + [77] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [67] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [67] (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 ) - [67] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [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 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [68] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [68] (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 ) - [68] (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 ) - [69] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [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 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [70] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [70] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [71] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [72] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [73] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [74] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [75] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [76] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [77] if((byte) init_font_hex::i#1!=(byte) 5) goto 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 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [78] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [79] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [80] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [81] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [82] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [83] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [84] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [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 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [85] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [86] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [87] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [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 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [88] return + [99] return to:@return @@ -1531,6 +1645,38 @@ VARIABLE REGISTER WEIGHTS (signed word) atan2_16::yi#2 667.3333333333334 (signed word) atan2_16::yi#3 858.2857142857142 (signed word) atan2_16::yi#7 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 +(byte~) init_angle_screen::$13 202.0 +(byte~) init_angle_screen::$14 202.0 +(byte~) init_angle_screen::$2 202.0 +(byte~) init_angle_screen::$3 202.0 +(byte~) init_angle_screen::$6 202.0 +(byte) init_angle_screen::ang_w +(byte) init_angle_screen::ang_w#0 72.14285714285714 +(word) init_angle_screen::angle_w +(word) init_angle_screen::angle_w#0 202.0 +(byte*) init_angle_screen::screen +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#1 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 8.959999999999999 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#1 5.5 +(byte*) init_angle_screen::screen_topline#5 9.333333333333334 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#1 101.0 +(byte) init_angle_screen::x#2 25.25 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#1 101.0 +(byte) init_angle_screen::xb#2 19.238095238095237 +(signed word) init_angle_screen::xw +(word) init_angle_screen::xw#0 33.666666666666664 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#1 16.5 +(byte) init_angle_screen::y#4 4.730769230769231 +(signed word) init_angle_screen::yw +(word) init_angle_screen::yw#0 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) (byte~) init_font_hex::$0 1001.0 (byte~) init_font_hex::$1 2002.0 @@ -1558,26 +1704,6 @@ VARIABLE REGISTER WEIGHTS (byte*) init_font_hex::proto_lo (byte*) init_font_hex::proto_lo#1 50.5 (byte*) init_font_hex::proto_lo#4 92.53846153846155 -(void()) init_screen() -(word~) init_screen::$7 202.0 -(byte) init_screen::ang_w -(byte) init_screen::ang_w#0 202.0 -(word) init_screen::angle_w -(word) init_screen::angle_w#0 202.0 -(byte*) init_screen::screen -(byte*) init_screen::screen#1 42.599999999999994 -(byte*) init_screen::screen#2 28.545454545454547 -(byte*) init_screen::screen#4 22.0 -(signed byte) init_screen::x -(signed byte) init_screen::x#1 151.5 -(signed byte) init_screen::x#2 16.833333333333332 -(signed word) init_screen::xw -(word) init_screen::xw#0 50.5 -(signed byte) init_screen::y -(signed byte) init_screen::y#1 16.5 -(signed byte) init_screen::y#4 1.4666666666666666 -(signed word) init_screen::yw -(word) init_screen::yw#0 50.5 (void()) main() (byte*) main::clear_char (byte*) main::clear_char#1 22.0 @@ -1597,9 +1723,11 @@ VARIABLE REGISTER WEIGHTS Initial phi equivalence classes [ main::clear_char#5 main::clear_char#1 ] -[ init_screen::y#4 init_screen::y#1 ] -[ init_screen::x#2 init_screen::x#1 ] -[ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] +[ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::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::i#2 atan2_16::i#1 ] @@ -1612,14 +1740,20 @@ Initial phi equivalence classes [ init_font_hex::c1#4 init_font_hex::c1#1 ] [ init_font_hex::i#2 init_font_hex::i#1 ] [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Added variable init_screen::xw#0 to zero page equivalence class [ init_screen::xw#0 ] -Added variable init_screen::yw#0 to zero page equivalence class [ init_screen::yw#0 ] +Added variable init_angle_screen::$2 to zero page equivalence class [ init_angle_screen::$2 ] +Added variable init_angle_screen::$3 to zero page equivalence class [ init_angle_screen::$3 ] +Added variable init_angle_screen::xw#0 to zero page equivalence class [ init_angle_screen::xw#0 ] +Added variable init_angle_screen::$6 to zero page equivalence class [ init_angle_screen::$6 ] +Added variable init_angle_screen::yw#0 to zero page equivalence class [ init_angle_screen::yw#0 ] Added variable atan2_16::x#0 to zero page equivalence class [ atan2_16::x#0 ] Added variable atan2_16::y#0 to zero page equivalence class [ atan2_16::y#0 ] Added variable atan2_16::return#2 to zero page equivalence class [ atan2_16::return#2 ] -Added variable init_screen::angle_w#0 to zero page equivalence class [ init_screen::angle_w#0 ] -Added variable init_screen::$7 to zero page equivalence class [ init_screen::$7 ] -Added variable init_screen::ang_w#0 to zero page equivalence class [ init_screen::ang_w#0 ] +Added variable init_angle_screen::angle_w#0 to zero page equivalence class [ init_angle_screen::angle_w#0 ] +Added variable init_angle_screen::$10 to zero page equivalence class [ init_angle_screen::$10 ] +Added variable init_angle_screen::ang_w#0 to zero page equivalence class [ init_angle_screen::ang_w#0 ] +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 ] @@ -1630,9 +1764,11 @@ Added variable init_font_hex::$2 to zero page equivalence class [ init_font_hex: Added variable init_font_hex::idx#3 to zero page equivalence class [ init_font_hex::idx#3 ] Complete equivalence classes [ main::clear_char#5 main::clear_char#1 ] -[ init_screen::y#4 init_screen::y#1 ] -[ init_screen::x#2 init_screen::x#1 ] -[ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] +[ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +[ init_angle_screen::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::i#2 atan2_16::i#1 ] @@ -1645,14 +1781,20 @@ Complete equivalence classes [ init_font_hex::c1#4 init_font_hex::c1#1 ] [ init_font_hex::i#2 init_font_hex::i#1 ] [ init_font_hex::idx#5 init_font_hex::idx#2 ] -[ init_screen::xw#0 ] -[ init_screen::yw#0 ] +[ init_angle_screen::$2 ] +[ init_angle_screen::$3 ] +[ init_angle_screen::xw#0 ] +[ init_angle_screen::$6 ] +[ init_angle_screen::yw#0 ] [ atan2_16::x#0 ] [ atan2_16::y#0 ] [ atan2_16::return#2 ] -[ init_screen::angle_w#0 ] -[ init_screen::$7 ] -[ init_screen::ang_w#0 ] +[ init_angle_screen::angle_w#0 ] +[ init_angle_screen::$10 ] +[ init_angle_screen::ang_w#0 ] +[ init_angle_screen::$12 ] +[ init_angle_screen::$13 ] +[ init_angle_screen::$14 ] [ atan2_16::xd#0 ] [ atan2_16::yd#0 ] [ atan2_16::$24 ] @@ -1662,37 +1804,45 @@ Complete equivalence classes [ init_font_hex::$2 ] [ init_font_hex::idx#3 ] Allocated zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] -Allocated zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -Allocated zp ZP_BYTE:5 [ init_screen::x#2 init_screen::x#1 ] -Allocated zp ZP_WORD:6 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] -Allocated zp ZP_WORD:8 [ 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:10 [ 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_BYTE:12 [ atan2_16::i#2 atan2_16::i#1 ] -Allocated zp ZP_WORD:13 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] -Allocated zp ZP_WORD:15 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] -Allocated zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:25 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_WORD:27 [ init_screen::xw#0 ] -Allocated zp ZP_WORD:29 [ init_screen::yw#0 ] -Allocated zp ZP_WORD:31 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:33 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:35 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:37 [ init_screen::angle_w#0 ] -Allocated zp ZP_WORD:39 [ init_screen::$7 ] -Allocated zp ZP_BYTE:41 [ init_screen::ang_w#0 ] -Allocated zp ZP_WORD:42 [ atan2_16::xd#0 ] -Allocated zp ZP_WORD:44 [ atan2_16::yd#0 ] -Allocated zp ZP_BYTE:46 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:47 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:48 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:49 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:50 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:51 [ init_font_hex::idx#3 ] +Allocated zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Allocated zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +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_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 ] INITIAL ASM //SEG0 File Comments @@ -1730,7 +1880,7 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label clear_char = 2 //SEG11 [5] call init_font_hex - //SEG12 [66] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [77] 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] @@ -1744,10 +1894,10 @@ main: { //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG17 [8] call init_screen - //SEG18 [14] phi from main::@5 to init_screen [phi:main::@5->init_screen] - init_screen_from_b5: - jsr init_screen + //SEG17 [8] call init_angle_screen + //SEG18 [14] phi from main::@5 to init_angle_screen [phi:main::@5->init_angle_screen] + init_angle_screen_from_b5: + jsr init_angle_screen //SEG19 [9] phi from main::@5 to main::@1 [phi:main::@5->main::@1] b1_from_b5: //SEG20 [9] phi (byte*) main::clear_char#5 = (const byte*) CHARSET#0 [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 @@ -1797,156 +1947,227 @@ main: { //SEG31 [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#1 [phi:main::@4->main::@1#0] -- register_copy jmp b1 } -//SEG32 init_screen -init_screen: { - .label _7 = $27 - .label xw = $1b - .label yw = $1d - .label angle_w = $25 - .label ang_w = $29 - .label screen = 6 - .label x = 5 +//SEG32 init_angle_screen +// 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 x = 9 + .label xb = $a + .label screen_topline = 5 + .label screen_bottomline = 7 .label y = 4 - //SEG33 [15] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1] - b1_from_init_screen: - //SEG34 [15] phi (byte*) init_screen::screen#4 = (const byte*) SCREEN#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN - sta screen+1 - //SEG35 [15] phi (signed byte) init_screen::y#4 = (signed byte) -$c [phi:init_screen->init_screen::@1#1] -- vbsz1=vbsc1 - lda #-$c + //SEG33 [15] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + b1_from_init_angle_screen: + //SEG34 [15] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 + //SEG35 [15] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_topline+1 + //SEG36 [15] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 sta y jmp b1 - //SEG36 [15] phi from init_screen::@3 to init_screen::@1 [phi:init_screen::@3->init_screen::@1] + //SEG37 [15] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] b1_from_b3: - //SEG37 [15] phi (byte*) init_screen::screen#4 = (byte*) init_screen::screen#1 [phi:init_screen::@3->init_screen::@1#0] -- register_copy - //SEG38 [15] phi (signed byte) init_screen::y#4 = (signed byte) init_screen::y#1 [phi:init_screen::@3->init_screen::@1#1] -- register_copy + //SEG38 [15] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG39 [15] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG40 [15] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 - //SEG39 init_screen::@1 + //SEG41 init_angle_screen::@1 b1: - //SEG40 [16] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2] + //SEG42 [16] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] b2_from_b1: - //SEG41 [16] phi (byte*) init_screen::screen#2 = (byte*) init_screen::screen#4 [phi:init_screen::@1->init_screen::@2#0] -- register_copy - //SEG42 [16] phi (signed byte) init_screen::x#2 = (signed byte) -$13 [phi:init_screen::@1->init_screen::@2#1] -- vbsz1=vbsc1 - lda #-$13 + //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] -- vbuz1=vbuc1 + lda #0 sta x jmp b2 - //SEG43 [16] phi from init_screen::@4 to init_screen::@2 [phi:init_screen::@4->init_screen::@2] + //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: - //SEG44 [16] phi (byte*) init_screen::screen#2 = (byte*) init_screen::screen#1 [phi:init_screen::@4->init_screen::@2#0] -- register_copy - //SEG45 [16] phi (signed byte) init_screen::x#2 = (signed byte) init_screen::x#1 [phi:init_screen::@4->init_screen::@2#1] -- register_copy + //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 jmp b2 - //SEG46 init_screen::@2 + //SEG48 init_angle_screen::@2 b2: - //SEG47 [17] (word) init_screen::xw#0 ← (byte)(signed byte) init_screen::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG49 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda x + asl + sta _2 + //SEG50 [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuz1=vbuc1_minus_vbuz2 + lda #$27 + sec + sbc _2 + sta _3 + //SEG51 [19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _3 ldy #0 sta xw+1 sty xw - //SEG48 [18] (word) init_screen::yw#0 ← (byte)(signed byte) init_screen::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG52 [20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda y + asl + sta _6 + //SEG53 [21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _6 ldy #0 sta yw+1 sty yw - //SEG49 [19] (signed word) atan2_16::x#0 ← (signed word)(word) init_screen::xw#0 -- vwsz1=vwsz2 + //SEG54 [22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 -- vwsz1=vwsz2 lda xw sta atan2_16.x lda xw+1 sta atan2_16.x+1 - //SEG50 [20] (signed word) atan2_16::y#0 ← (signed word)(word) init_screen::yw#0 -- vwsz1=vwsz2 + //SEG55 [23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 -- vwsz1=vwsz2 lda yw sta atan2_16.y lda yw+1 sta atan2_16.y+1 - //SEG51 [21] call atan2_16 + //SEG56 [24] call atan2_16 jsr atan2_16 - //SEG52 [22] (word) atan2_16::return#2 ← (word) atan2_16::return#0 -- vwuz1=vwuz2 + //SEG57 [25] (word) atan2_16::return#2 ← (word) atan2_16::return#0 -- vwuz1=vwuz2 lda atan2_16.return sta atan2_16.return_2 lda atan2_16.return+1 sta atan2_16.return_2+1 jmp b4 - //SEG53 init_screen::@4 + //SEG58 init_angle_screen::@4 b4: - //SEG54 [23] (word) init_screen::angle_w#0 ← (word) atan2_16::return#2 -- vwuz1=vwuz2 + //SEG59 [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 -- vwuz1=vwuz2 lda atan2_16.return_2 sta angle_w lda atan2_16.return_2+1 sta angle_w+1 - //SEG55 [24] (word~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz2_plus_vbuc1 + //SEG60 [27] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz2_plus_vbuc1 lda #$80 clc adc angle_w - sta _7 + sta _10 lda #0 adc angle_w+1 - sta _7+1 - //SEG56 [25] (byte) init_screen::ang_w#0 ← > (word~) init_screen::$7 -- vbuz1=_hi_vwuz2 - lda _7+1 + sta _10+1 + //SEG61 [28] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 sta ang_w - //SEG57 [26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 -- _deref_pbuz1=vbuz2 + //SEG62 [29] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_plus_vbuz2 + lax ang_w + axs #-[$80] + stx _12 + //SEG63 [30] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _12 + ldy x + sta (screen_topline),y + //SEG64 [31] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_minus_vbuz2 + lda #$80 + sec + sbc ang_w + sta _13 + //SEG65 [32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _13 + ldy x + sta (screen_bottomline),y + //SEG66 [33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuz1=_neg_vbuz2 lda ang_w - ldy #0 - sta (screen),y - //SEG58 [27] (byte*) init_screen::screen#1 ← ++ (byte*) init_screen::screen#2 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG59 [28] (signed byte) init_screen::x#1 ← ++ (signed byte) init_screen::x#2 -- vbsz1=_inc_vbsz1 + eor #$ff + clc + adc #1 + sta _14 + //SEG67 [34] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _14 + ldy xb + sta (screen_topline),y + //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 + ldy xb + sta (screen_bottomline),y + //SEG69 [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG60 [29] if((signed byte) init_screen::x#1!=(signed byte) $15) goto init_screen::@2 -- vbsz1_neq_vbsc1_then_la1 - lda #$15 - cmp x - bne b2_from_b4 + //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 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b2_from_b4 jmp b3 - //SEG61 init_screen::@3 + //SEG72 init_angle_screen::@3 b3: - //SEG62 [30] (signed byte) init_screen::y#1 ← ++ (signed byte) init_screen::y#4 -- vbsz1=_inc_vbsz1 + //SEG73 [39] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG74 [40] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG75 [41] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG63 [31] if((signed byte) init_screen::y#1!=(signed byte) $d) goto init_screen::@1 -- vbsz1_neq_vbsc1_then_la1 + //SEG76 [42] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1_from_b3 jmp breturn - //SEG64 init_screen::@return + //SEG77 init_angle_screen::@return breturn: - //SEG65 [32] return + //SEG78 [43] return rts } -//SEG66 atan2_16 +//SEG79 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($1f) x, signed word zeropage($21) y) +// atan2_16(signed word zeropage($25) x, signed word zeropage($27) y) atan2_16: { - .label _2 = 8 - .label _7 = $a - .label _23 = $2f - .label _24 = $2e - .label yi = 8 - .label xi = $a - .label xd = $2a - .label yd = $2c - .label angle = $f - .label angle_2 = $d - .label angle_3 = $d - .label i = $c - .label return = $f - .label x = $1f - .label y = $21 - .label return_2 = $23 - .label angle_6 = $d - .label angle_12 = $d - .label angle_13 = $d - //SEG67 [33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + .label _2 = $b + .label _7 = $d + .label _23 = $38 + .label _24 = $37 + .label yi = $b + .label xi = $d + .label xd = $33 + .label yd = $35 + .label angle = $12 + .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 angle_6 = $10 + .label angle_12 = $10 + .label angle_13 = $10 + //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 jmp b2 - //SEG68 atan2_16::@2 + //SEG81 atan2_16::@2 b2: - //SEG69 [34] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + //SEG82 [45] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc y @@ -1954,20 +2175,20 @@ atan2_16: { lda #0 sbc y+1 sta _2+1 - //SEG70 [35] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + //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: - //SEG71 [35] 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#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 - //SEG72 atan2_16::@3 + //SEG85 atan2_16::@3 b3: - //SEG73 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + //SEG86 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda x+1 bpl b4 jmp b5 - //SEG74 atan2_16::@5 + //SEG87 atan2_16::@5 b5: - //SEG75 [37] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + //SEG88 [48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc x @@ -1975,54 +2196,54 @@ atan2_16: { lda #0 sbc x+1 sta _7+1 - //SEG76 [38] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + //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: - //SEG77 [38] 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#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 - //SEG78 atan2_16::@6 + //SEG91 atan2_16::@6 b6: - //SEG79 [39] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG92 [50] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] b10_from_b6: - //SEG80 [39] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + //SEG93 [50] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 lda #0 sta angle_12 lda #0 sta angle_12+1 - //SEG81 [39] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 + //SEG94 [50] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 lda #0 sta i - //SEG82 [39] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy - //SEG83 [39] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + //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 - //SEG84 atan2_16::@10 + //SEG97 atan2_16::@10 b10: - //SEG85 [40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + //SEG98 [51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda yi+1 bne b11 lda yi bne b11 - //SEG86 [41] 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::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] b12_from_b10: b12_from_b14: - //SEG87 [41] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //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 jmp b12 - //SEG88 atan2_16::@12 + //SEG101 atan2_16::@12 b12: - //SEG89 [42] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + //SEG102 [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz2_ror_1 lda angle_6+1 lsr sta angle+1 lda angle_6 ror sta angle - //SEG90 [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + //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 - //SEG91 atan2_16::@16 + //SEG104 atan2_16::@16 b16: - //SEG92 [44] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + //SEG105 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc angle @@ -2030,20 +2251,20 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG93 [45] 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::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] b7_from_b12: b7_from_b16: - //SEG94 [45] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //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 jmp b7 - //SEG95 atan2_16::@7 + //SEG108 atan2_16::@7 b7: - //SEG96 [46] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + //SEG109 [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda y+1 bpl b8_from_b7 jmp b9 - //SEG97 atan2_16::@9 + //SEG110 atan2_16::@9 b9: - //SEG98 [47] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + //SEG111 [58] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc angle @@ -2051,21 +2272,21 @@ atan2_16: { lda #0 sbc angle+1 sta angle+1 - //SEG99 [48] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG112 [59] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] b8_from_b7: b8_from_b9: - //SEG100 [48] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG113 [59] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy jmp b8 - //SEG101 atan2_16::@8 + //SEG114 atan2_16::@8 b8: jmp breturn - //SEG102 atan2_16::@return + //SEG115 atan2_16::@return breturn: - //SEG103 [49] return + //SEG116 [60] return rts - //SEG104 atan2_16::@11 + //SEG117 atan2_16::@11 b11: - //SEG105 [50] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda xi sta xd @@ -2081,7 +2302,7 @@ atan2_16: { dey bne !- !e: - //SEG106 [51] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda yi sta yd @@ -2097,13 +2318,13 @@ atan2_16: { dey bne !- !e: - //SEG107 [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG120 [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 lda yi+1 bpl b13 jmp b15 - //SEG108 atan2_16::@15 + //SEG121 atan2_16::@15 b15: - //SEG109 [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG122 [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -2111,7 +2332,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG110 [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG123 [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -2119,11 +2340,11 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG111 [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG124 [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _24 - //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 + //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 ldy _24 sec lda angle_3 @@ -2132,31 +2353,31 @@ atan2_16: { lda angle_3+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle_3+1 - //SEG113 [57] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] + //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: - //SEG114 [57] 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 - //SEG115 [57] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG116 [57] 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 + //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 - //SEG117 atan2_16::@14 + //SEG130 atan2_16::@14 b14: - //SEG118 [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG131 [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //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 + //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 - //SEG120 [39] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] + //SEG133 [50] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] b10_from_b14: - //SEG121 [39] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG122 [39] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG123 [39] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG124 [39] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //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 jmp b10 - //SEG125 atan2_16::@13 + //SEG138 atan2_16::@13 b13: - //SEG126 [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG139 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -2164,7 +2385,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG127 [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG140 [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -2172,11 +2393,11 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG128 [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG141 [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _23 - //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 + //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 ldy _23 clc lda angle_2 @@ -2186,103 +2407,103 @@ atan2_16: { adc CORDIC_ATAN2_ANGLES_16+1,y sta angle_2+1 jmp b14_from_b13 - //SEG130 atan2_16::@4 + //SEG143 atan2_16::@4 b4: - //SEG131 [64] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG144 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG132 atan2_16::@1 + //SEG145 atan2_16::@1 b1: - //SEG133 [65] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG146 [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG134 init_font_hex +//SEG147 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($14) charset) +// init_font_hex(byte* zeropage($17) charset) init_font_hex: { - .label _0 = $30 - .label _1 = $31 - .label _2 = $32 - .label idx = $1a - .label i = $19 - .label idx_3 = $33 - .label proto_lo = $16 - .label charset = $14 - .label c1 = $18 - .label proto_hi = $11 - .label c = $13 - //SEG135 [67] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .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] b1_from_init_font_hex: - //SEG136 [67] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG149 [78] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG137 [67] 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 + //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 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG138 [67] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG151 [78] 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 - //SEG139 [67] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG152 [78] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG140 [67] 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 - //SEG141 [67] 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 - //SEG142 [67] 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 + //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 jmp b1 - //SEG143 init_font_hex::@1 + //SEG156 init_font_hex::@1 b1: - //SEG144 [68] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG157 [79] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG145 [68] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG158 [79] 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 - //SEG146 [68] 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 + //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 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG147 [68] 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 + //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 jmp b2 - //SEG148 [68] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG161 [79] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG149 [68] 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 - //SEG150 [68] 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 - //SEG151 [68] 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 + //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 jmp b2 - //SEG152 init_font_hex::@2 + //SEG165 init_font_hex::@2 b2: - //SEG153 [69] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG166 [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG154 [70] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG167 [81] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG155 [70] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG168 [81] 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 - //SEG156 [70] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG169 [81] 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 - //SEG157 [70] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG170 [81] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG158 [70] 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 - //SEG159 [70] 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 + //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 jmp b3 - //SEG160 init_font_hex::@3 + //SEG173 init_font_hex::@3 b3: - //SEG161 [71] (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 + //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 ldy i lda (proto_hi),y asl @@ -2290,43 +2511,43 @@ init_font_hex: { asl asl sta _0 - //SEG162 [72] (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 + //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 ldy i lda (proto_lo),y asl sta _1 - //SEG163 [73] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG176 [84] (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 - //SEG164 [74] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG177 [85] *((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 - //SEG165 [75] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG178 [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG166 [76] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG179 [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG167 [77] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG180 [88] 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 - //SEG168 init_font_hex::@4 + //SEG181 init_font_hex::@4 b4: - //SEG169 [78] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG182 [89] *((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 - //SEG170 [79] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG183 [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG171 [80] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG184 [91] *((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 - //SEG172 [81] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG185 [92] (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 @@ -2334,7 +2555,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG173 [82] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG186 [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -2342,16 +2563,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG174 [83] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG187 [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG175 [84] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG188 [95] 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 - //SEG176 init_font_hex::@5 + //SEG189 init_font_hex::@5 b5: - //SEG177 [85] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG190 [96] (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 @@ -2359,19 +2580,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG178 [86] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG191 [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG179 [87] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG192 [98] 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 - //SEG180 init_font_hex::@return + //SEG193 init_font_hex::@return breturn: - //SEG181 [88] return + //SEG194 [99] return rts } -//SEG182 File Data +//SEG195 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), ... @@ -2385,184 +2606,229 @@ Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ 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 Statement [12] *((byte*) main::clear_char#5) ← (byte) 0 [ main::clear_char#5 ] ( main:2 [ main::clear_char#5 ] ) always clobbers reg byte a reg byte y -Statement [17] (word) init_screen::xw#0 ← (byte)(signed byte) init_screen::x#2 w= (byte) 0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ init_screen::x#2 init_screen::x#1 ] -Statement [18] (word) init_screen::yw#0 ← (byte)(signed byte) init_screen::y#4 w= (byte) 0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 init_screen::yw#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 init_screen::yw#0 ] ) always clobbers reg byte y -Statement [19] (signed word) atan2_16::x#0 ← (signed word)(word) init_screen::xw#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::yw#0 atan2_16::x#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ init_screen::x#2 init_screen::x#1 ] -Statement [20] (signed word) atan2_16::y#0 ← (signed word)(word) init_screen::yw#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [22] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::return#2 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::return#2 ] ) always clobbers reg byte a -Statement [23] (word) init_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::angle_w#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::angle_w#0 ] ) always clobbers reg byte a -Statement [24] (word~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::$7 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::$7 ] ) always clobbers reg byte a -Statement [25] (byte) init_screen::ang_w#0 ← > (word~) init_screen::$7 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::ang_w#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::ang_w#0 ] ) always clobbers reg byte a -Statement [26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 ] ) always clobbers reg byte y -Statement [33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [34] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a -Statement [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a -Statement [37] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a -Statement [40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ atan2_16::i#2 atan2_16::i#1 ] -Statement [42] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [44] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a -Statement [46] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a -Statement [47] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [50] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [51] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [52] 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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [53] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [54] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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#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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [61] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [65] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [69] *((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:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [71] (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:25 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [72] (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:48 [ init_font_hex::$0 ] -Statement [78] *((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 [80] *((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 [81] (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 [82] (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 [85] (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 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen: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::$2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Statement [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen: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::$3 ] ) always clobbers reg byte a +Statement [19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen: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::xw#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Statement [20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen: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::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen: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::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen: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::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen: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 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [25] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen: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 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen: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::angle_w#0 ] ) always clobbers reg byte a +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 ] +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 ] +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 +Statement [35] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a reg byte y +Statement [39] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:8 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [40] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( main:2::init_angle_screen:8 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a +Statement [45] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen: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::$2 ] ) always clobbers reg byte a +Statement [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a +Statement [48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen: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::$7 ] ) always clobbers reg byte a +Statement [51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ] +Statement [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen: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::angle#1 ] ) always clobbers reg byte a +Statement [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen: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#1 ] ) always clobbers reg byte a +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 [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 Statement [12] *((byte*) main::clear_char#5) ← (byte) 0 [ main::clear_char#5 ] ( main:2 [ main::clear_char#5 ] ) always clobbers reg byte a reg byte y -Statement [17] (word) init_screen::xw#0 ← (byte)(signed byte) init_screen::x#2 w= (byte) 0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 ] ) always clobbers reg byte a reg byte y -Statement [18] (word) init_screen::yw#0 ← (byte)(signed byte) init_screen::y#4 w= (byte) 0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 init_screen::yw#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::xw#0 init_screen::yw#0 ] ) always clobbers reg byte a reg byte y -Statement [19] (signed word) atan2_16::x#0 ← (signed word)(word) init_screen::xw#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::yw#0 atan2_16::x#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a -Statement [20] (signed word) atan2_16::y#0 ← (signed word)(word) init_screen::yw#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [22] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::return#2 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::return#2 ] ) always clobbers reg byte a -Statement [23] (word) init_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::angle_w#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::angle_w#0 ] ) always clobbers reg byte a -Statement [24] (word~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::$7 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::$7 ] ) always clobbers reg byte a -Statement [25] (byte) init_screen::ang_w#0 ← > (word~) init_screen::$7 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::ang_w#0 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 init_screen::ang_w#0 ] ) always clobbers reg byte a -Statement [26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 ] ( main:2::init_screen:8 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 ] ) always clobbers reg byte y -Statement [33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [34] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a -Statement [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a -Statement [37] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a -Statement [40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 ] ) always clobbers reg byte a -Statement [42] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [44] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a -Statement [46] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a -Statement [47] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [50] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [51] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [52] 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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [53] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [54] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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#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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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 [61] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::init_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::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::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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [65] (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_screen:8::atan2_16:21 [ init_screen::y#4 init_screen::x#2 init_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [69] *((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 [71] (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 [72] (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 [78] *((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 [80] *((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 [81] (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 [82] (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 [85] (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 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen: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::$2 ] ) always clobbers reg byte a +Statement [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen: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::$3 ] ) always clobbers reg byte a +Statement [19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen: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::xw#0 ] ) always clobbers reg byte y +Statement [20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen: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::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen: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::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen: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::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen: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 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [25] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen: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 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen: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::angle_w#0 ] ) always clobbers reg byte a +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 [29] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:2::init_angle_screen: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::$12 ] ) 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 +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 +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 +Statement [35] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a reg byte y +Statement [39] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:8 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [40] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( main:2::init_angle_screen:8 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a +Statement [45] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen: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::$2 ] ) always clobbers reg byte a +Statement [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a +Statement [48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen: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::$7 ] ) always clobbers reg byte a +Statement [51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen: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 ] ) always clobbers reg byte a +Statement [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen: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::angle#1 ] ) always clobbers reg byte a +Statement [54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen: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#1 ] ) always clobbers reg byte a +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 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_screen::y#4 init_screen::y#1 ] : zp ZP_BYTE:4 , reg byte x , -Potential registers zp ZP_BYTE:5 [ init_screen::x#2 init_screen::x#1 ] : zp ZP_BYTE:5 , reg byte x , -Potential registers zp ZP_WORD:6 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ 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 , -Potential registers zp ZP_WORD:10 [ 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:10 , -Potential registers zp ZP_BYTE:12 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:12 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:13 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:13 , -Potential registers zp ZP_WORD:15 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:15 , -Potential registers zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:17 , -Potential registers zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:19 , reg byte x , -Potential registers zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:20 , -Potential registers zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:22 , -Potential registers zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:24 , reg byte x , -Potential registers zp ZP_BYTE:25 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:25 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:26 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:27 [ init_screen::xw#0 ] : zp ZP_WORD:27 , -Potential registers zp ZP_WORD:29 [ init_screen::yw#0 ] : zp ZP_WORD:29 , -Potential registers zp ZP_WORD:31 [ atan2_16::x#0 ] : zp ZP_WORD:31 , -Potential registers zp ZP_WORD:33 [ atan2_16::y#0 ] : zp ZP_WORD:33 , -Potential registers zp ZP_WORD:35 [ atan2_16::return#2 ] : zp ZP_WORD:35 , -Potential registers zp ZP_WORD:37 [ init_screen::angle_w#0 ] : zp ZP_WORD:37 , -Potential registers zp ZP_WORD:39 [ init_screen::$7 ] : zp ZP_WORD:39 , -Potential registers zp ZP_BYTE:41 [ init_screen::ang_w#0 ] : zp ZP_BYTE:41 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:42 [ atan2_16::xd#0 ] : zp ZP_WORD:42 , -Potential registers zp ZP_WORD:44 [ atan2_16::yd#0 ] : zp ZP_WORD:44 , -Potential registers zp ZP_BYTE:46 [ atan2_16::$24 ] : zp ZP_BYTE:46 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:47 [ atan2_16::$23 ] : zp ZP_BYTE:47 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:48 [ init_font_hex::$0 ] : zp ZP_BYTE:48 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:49 [ init_font_hex::$1 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:50 [ init_font_hex::$2 ] : zp ZP_BYTE:50 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:51 [ init_font_hex::idx#3 ] : zp ZP_BYTE:51 , reg byte a , reg byte x , reg byte y , +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_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 , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 7,706.67: zp ZP_WORD:13 [ 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:8 [ 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:10 [ 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:46 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:47 [ atan2_16::$23 ] 1,930.5: zp ZP_BYTE:12 [ atan2_16::i#2 atan2_16::i#1 ] 1,501.5: zp ZP_WORD:44 [ atan2_16::yd#0 ] 600.6: zp ZP_WORD:42 [ atan2_16::xd#0 ] 202: zp ZP_WORD:35 [ atan2_16::return#2 ] 50: zp ZP_WORD:15 [ 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:31 [ atan2_16::x#0 ] 3.63: zp ZP_WORD:33 [ atan2_16::y#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:25 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:49 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:50 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:48 [ init_font_hex::$0 ] 202: zp ZP_BYTE:51 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [init_screen] 202: zp ZP_WORD:37 [ init_screen::angle_w#0 ] 202: zp ZP_WORD:39 [ init_screen::$7 ] 202: zp ZP_BYTE:41 [ init_screen::ang_w#0 ] 168.33: zp ZP_BYTE:5 [ init_screen::x#2 init_screen::x#1 ] 93.15: zp ZP_WORD:6 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] 50.5: zp ZP_WORD:27 [ init_screen::xw#0 ] 50.5: zp ZP_WORD:29 [ init_screen::yw#0 ] 17.97: zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] +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 [main] 55.5: zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] Uplift Scope [] -Uplifting [atan2_16] best 410936 combination zp ZP_WORD:13 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:8 [ 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:10 [ 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:12 [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:44 [ atan2_16::yd#0 ] zp ZP_WORD:42 [ atan2_16::xd#0 ] zp ZP_WORD:35 [ atan2_16::return#2 ] zp ZP_WORD:15 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:31 [ atan2_16::x#0 ] zp ZP_WORD:33 [ atan2_16::y#0 ] -Uplifting [init_font_hex] best 391936 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:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:48 [ init_font_hex::$0 ] zp ZP_BYTE:51 [ init_font_hex::idx#3 ] zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 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 ] +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 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [init_screen] best 390336 combination zp ZP_WORD:37 [ init_screen::angle_w#0 ] zp ZP_WORD:39 [ init_screen::$7 ] reg byte a [ init_screen::ang_w#0 ] reg byte x [ init_screen::x#2 init_screen::x#1 ] zp ZP_WORD:6 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] zp ZP_WORD:27 [ init_screen::xw#0 ] zp ZP_WORD:29 [ init_screen::yw#0 ] zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -Uplifting [main] best 390336 combination zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] -Uplifting [] best 390336 combination -Attempting to uplift remaining variables inzp ZP_BYTE:12 [ atan2_16::i#2 atan2_16::i#1 ] -Uplifting [atan2_16] best 390336 combination zp ZP_BYTE:12 [ atan2_16::i#2 atan2_16::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 390336 combination zp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:48 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 390336 combination zp ZP_BYTE:48 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:51 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 389736 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 389736 combination zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -Uplifting [init_screen] best 389736 combination zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 389736 combination zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:13 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:15 [ 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:27 [ init_screen::xw#0 ] ] with [ zp ZP_WORD:31 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ init_screen::yw#0 ] ] with [ zp ZP_WORD:33 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:35 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:37 [ init_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:13 [ 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:35 [ atan2_16::return#2 init_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:13 [ 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_screen::angle_w#0 ] ] with [ zp ZP_WORD:39 [ init_screen::$7 ] ] - score: 1 -Allocated (was zp ZP_WORD:6) zp ZP_WORD:5 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] -Allocated (was zp ZP_WORD:8) zp ZP_WORD:7 [ 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:10) zp ZP_WORD:9 [ 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:12) zp ZP_BYTE:11 [ atan2_16::i#2 atan2_16::i#1 ] -Allocated (was zp ZP_WORD:13) zp ZP_WORD:12 [ 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_screen::angle_w#0 init_screen::$7 ] -Allocated (was zp ZP_WORD:17) zp ZP_WORD:14 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:19) zp ZP_BYTE:16 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:20) zp ZP_WORD:17 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:22) zp ZP_WORD:19 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:21 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:26) zp ZP_BYTE:22 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_WORD:27) zp ZP_WORD:23 [ init_screen::xw#0 atan2_16::x#0 ] -Allocated (was zp ZP_WORD:29) zp ZP_WORD:25 [ init_screen::yw#0 atan2_16::y#0 ] -Allocated (was zp ZP_WORD:42) zp ZP_WORD:27 [ atan2_16::xd#0 ] -Allocated (was zp ZP_WORD:44) zp ZP_WORD:29 [ atan2_16::yd#0 ] -Allocated (was zp ZP_BYTE:48) zp ZP_BYTE:31 [ init_font_hex::$0 ] +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 ] +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 ] +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 ] +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 ] +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 ] +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 ] +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 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -2600,7 +2866,7 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label clear_char = 2 //SEG11 [5] call init_font_hex - //SEG12 [66] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [77] 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] @@ -2614,10 +2880,10 @@ main: { //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG17 [8] call init_screen - //SEG18 [14] phi from main::@5 to init_screen [phi:main::@5->init_screen] - init_screen_from_b5: - jsr init_screen + //SEG17 [8] call init_angle_screen + //SEG18 [14] phi from main::@5 to init_angle_screen [phi:main::@5->init_angle_screen] + init_angle_screen_from_b5: + jsr init_angle_screen //SEG19 [9] phi from main::@5 to main::@1 [phi:main::@5->main::@1] b1_from_b5: //SEG20 [9] phi (byte*) main::clear_char#5 = (const byte*) CHARSET#0 [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 @@ -2667,126 +2933,186 @@ main: { //SEG31 [9] phi (byte*) main::clear_char#5 = (byte*) main::clear_char#1 [phi:main::@4->main::@1#0] -- register_copy jmp b1 } -//SEG32 init_screen -init_screen: { - .label _7 = $c - .label xw = $17 - .label yw = $19 - .label angle_w = $c - .label screen = 5 +//SEG32 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +init_angle_screen: { + .label _10 = $f + .label xw = $1a + .label yw = $1c + .label angle_w = $f + .label ang_w = $1e + .label xb = 9 + .label screen_topline = 5 + .label screen_bottomline = 7 .label y = 4 - //SEG33 [15] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1] - b1_from_init_screen: - //SEG34 [15] phi (byte*) init_screen::screen#4 = (const byte*) SCREEN#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN - sta screen+1 - //SEG35 [15] phi (signed byte) init_screen::y#4 = (signed byte) -$c [phi:init_screen->init_screen::@1#1] -- vbsz1=vbsc1 - lda #-$c + //SEG33 [15] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + b1_from_init_angle_screen: + //SEG34 [15] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 + //SEG35 [15] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_topline+1 + //SEG36 [15] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 sta y jmp b1 - //SEG36 [15] phi from init_screen::@3 to init_screen::@1 [phi:init_screen::@3->init_screen::@1] + //SEG37 [15] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] b1_from_b3: - //SEG37 [15] phi (byte*) init_screen::screen#4 = (byte*) init_screen::screen#1 [phi:init_screen::@3->init_screen::@1#0] -- register_copy - //SEG38 [15] phi (signed byte) init_screen::y#4 = (signed byte) init_screen::y#1 [phi:init_screen::@3->init_screen::@1#1] -- register_copy + //SEG38 [15] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG39 [15] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG40 [15] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 - //SEG39 init_screen::@1 + //SEG41 init_angle_screen::@1 b1: - //SEG40 [16] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2] + //SEG42 [16] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] b2_from_b1: - //SEG41 [16] phi (byte*) init_screen::screen#2 = (byte*) init_screen::screen#4 [phi:init_screen::@1->init_screen::@2#0] -- register_copy - //SEG42 [16] phi (signed byte) init_screen::x#2 = (signed byte) -$13 [phi:init_screen::@1->init_screen::@2#1] -- vbsxx=vbsc1 - ldx #-$13 + //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 jmp b2 - //SEG43 [16] phi from init_screen::@4 to init_screen::@2 [phi:init_screen::@4->init_screen::@2] + //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: - //SEG44 [16] phi (byte*) init_screen::screen#2 = (byte*) init_screen::screen#1 [phi:init_screen::@4->init_screen::@2#0] -- register_copy - //SEG45 [16] phi (signed byte) init_screen::x#2 = (signed byte) init_screen::x#1 [phi:init_screen::@4->init_screen::@2#1] -- register_copy + //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 jmp b2 - //SEG46 init_screen::@2 + //SEG48 init_angle_screen::@2 b2: - //SEG47 [17] (word) init_screen::xw#0 ← (byte)(signed byte) init_screen::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 - ldy #0 + //SEG49 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa + asl + //SEG50 [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG51 [19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 sta xw+1 sty xw - //SEG48 [18] (word) init_screen::yw#0 ← (byte)(signed byte) init_screen::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG52 [20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y + asl + //SEG53 [21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 ldy #0 sta yw+1 sty yw - //SEG49 [19] (signed word) atan2_16::x#0 ← (signed word)(word) init_screen::xw#0 - //SEG50 [20] (signed word) atan2_16::y#0 ← (signed word)(word) init_screen::yw#0 - //SEG51 [21] call atan2_16 + //SEG54 [22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG55 [23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG56 [24] call atan2_16 jsr atan2_16 - //SEG52 [22] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + //SEG57 [25] (word) atan2_16::return#2 ← (word) atan2_16::return#0 jmp b4 - //SEG53 init_screen::@4 + //SEG58 init_angle_screen::@4 b4: - //SEG54 [23] (word) init_screen::angle_w#0 ← (word) atan2_16::return#2 - //SEG55 [24] (word~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + //SEG59 [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG60 [27] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 lda #$80 clc - adc _7 - sta _7 + adc _10 + sta _10 bcc !+ - inc _7+1 + inc _10+1 !: - //SEG56 [25] (byte) init_screen::ang_w#0 ← > (word~) init_screen::$7 -- vbuaa=_hi_vwuz1 - lda _7+1 - //SEG57 [26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 -- _deref_pbuz1=vbuaa - ldy #0 - sta (screen),y - //SEG58 [27] (byte*) init_screen::screen#1 ← ++ (byte*) init_screen::screen#2 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG59 [28] (signed byte) init_screen::x#1 ← ++ (signed byte) init_screen::x#2 -- vbsxx=_inc_vbsxx + //SEG61 [28] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG62 [29] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + 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 + 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 + sta (screen_bottomline),y + //SEG66 [33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + lda ang_w + eor #$ff + clc + adc #1 + //SEG67 [34] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //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 + ldy xb + sta (screen_bottomline),y + //SEG69 [36] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuxx=_inc_vbuxx inx - //SEG60 [29] if((signed byte) init_screen::x#1!=(signed byte) $15) goto init_screen::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 - bne b2_from_b4 + //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 + bcc b2_from_b4 jmp b3 - //SEG61 init_screen::@3 + //SEG72 init_angle_screen::@3 b3: - //SEG62 [30] (signed byte) init_screen::y#1 ← ++ (signed byte) init_screen::y#4 -- vbsz1=_inc_vbsz1 + //SEG73 [39] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG74 [40] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG75 [41] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG63 [31] if((signed byte) init_screen::y#1!=(signed byte) $d) goto init_screen::@1 -- vbsz1_neq_vbsc1_then_la1 + //SEG76 [42] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1_from_b3 jmp breturn - //SEG64 init_screen::@return + //SEG77 init_angle_screen::@return breturn: - //SEG65 [32] return + //SEG78 [43] return rts } -//SEG66 atan2_16 +//SEG79 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($17) x, signed word zeropage($19) y) +// atan2_16(signed word zeropage($1a) x, signed word zeropage($1c) y) atan2_16: { - .label _2 = 7 - .label _7 = 9 - .label yi = 7 - .label xi = 9 - .label xd = $1b - .label yd = $1d - .label angle = $c - .label i = $b - .label return = $c - .label x = $17 - .label y = $19 - //SEG67 [33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + .label _2 = $a + .label _7 = $c + .label yi = $a + .label xi = $c + .label xd = $1f + .label yd = $21 + .label angle = $f + .label i = $e + .label return = $f + .label x = $1a + .label y = $1c + //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 jmp b2 - //SEG68 atan2_16::@2 + //SEG81 atan2_16::@2 b2: - //SEG69 [34] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + //SEG82 [45] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc y @@ -2794,20 +3120,20 @@ atan2_16: { lda #0 sbc y+1 sta _2+1 - //SEG70 [35] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + //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: - //SEG71 [35] 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#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 - //SEG72 atan2_16::@3 + //SEG85 atan2_16::@3 b3: - //SEG73 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + //SEG86 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda x+1 bpl b4 jmp b5 - //SEG74 atan2_16::@5 + //SEG87 atan2_16::@5 b5: - //SEG75 [37] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + //SEG88 [48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc x @@ -2815,50 +3141,50 @@ atan2_16: { lda #0 sbc x+1 sta _7+1 - //SEG76 [38] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + //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: - //SEG77 [38] 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#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 - //SEG78 atan2_16::@6 + //SEG91 atan2_16::@6 b6: - //SEG79 [39] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG92 [50] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] b10_from_b6: - //SEG80 [39] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + //SEG93 [50] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 lda #0 sta angle lda #0 sta angle+1 - //SEG81 [39] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 + //SEG94 [50] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 lda #0 sta i - //SEG82 [39] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy - //SEG83 [39] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + //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 - //SEG84 atan2_16::@10 + //SEG97 atan2_16::@10 b10: - //SEG85 [40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + //SEG98 [51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda yi+1 bne b11 lda yi bne b11 - //SEG86 [41] 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::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] b12_from_b10: b12_from_b14: - //SEG87 [41] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //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 jmp b12 - //SEG88 atan2_16::@12 + //SEG101 atan2_16::@12 b12: - //SEG89 [42] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG102 [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr angle+1 ror angle - //SEG90 [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + //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 - //SEG91 atan2_16::@16 + //SEG104 atan2_16::@16 b16: - //SEG92 [44] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + //SEG105 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc angle @@ -2866,20 +3192,20 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG93 [45] 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::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] b7_from_b12: b7_from_b16: - //SEG94 [45] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //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 jmp b7 - //SEG95 atan2_16::@7 + //SEG108 atan2_16::@7 b7: - //SEG96 [46] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + //SEG109 [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda y+1 bpl b8_from_b7 jmp b9 - //SEG97 atan2_16::@9 + //SEG110 atan2_16::@9 b9: - //SEG98 [47] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + //SEG111 [58] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc angle @@ -2887,21 +3213,21 @@ atan2_16: { lda #0 sbc angle+1 sta angle+1 - //SEG99 [48] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG112 [59] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] b8_from_b7: b8_from_b9: - //SEG100 [48] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG113 [59] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy jmp b8 - //SEG101 atan2_16::@8 + //SEG114 atan2_16::@8 b8: jmp breturn - //SEG102 atan2_16::@return + //SEG115 atan2_16::@return breturn: - //SEG103 [49] return + //SEG116 [60] return rts - //SEG104 atan2_16::@11 + //SEG117 atan2_16::@11 b11: - //SEG105 [50] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda xi sta xd @@ -2917,7 +3243,7 @@ atan2_16: { dey bne !- !e: - //SEG106 [51] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda yi sta yd @@ -2933,13 +3259,13 @@ atan2_16: { dey bne !- !e: - //SEG107 [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG120 [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 lda yi+1 bpl b13 jmp b15 - //SEG108 atan2_16::@15 + //SEG121 atan2_16::@15 b15: - //SEG109 [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG122 [64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -2947,7 +3273,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG110 [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG123 [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -2955,10 +3281,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG111 [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG124 [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //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 + //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 tay sec lda angle @@ -2967,31 +3293,31 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG113 [57] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] + //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: - //SEG114 [57] 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 - //SEG115 [57] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG116 [57] 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 + //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 - //SEG117 atan2_16::@14 + //SEG130 atan2_16::@14 b14: - //SEG118 [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG131 [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //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 + //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 - //SEG120 [39] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] + //SEG133 [50] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] b10_from_b14: - //SEG121 [39] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG122 [39] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG123 [39] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG124 [39] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //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 jmp b10 - //SEG125 atan2_16::@13 + //SEG138 atan2_16::@13 b13: - //SEG126 [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG139 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -2999,7 +3325,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG127 [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG140 [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -3007,10 +3333,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG128 [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG141 [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //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 + //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 tay clc lda angle @@ -3020,98 +3346,98 @@ atan2_16: { adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 jmp b14_from_b13 - //SEG130 atan2_16::@4 + //SEG143 atan2_16::@4 b4: - //SEG131 [64] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG144 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG132 atan2_16::@1 + //SEG145 atan2_16::@1 b1: - //SEG133 [65] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG146 [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG134 init_font_hex +//SEG147 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($11) charset) +// init_font_hex(byte* zeropage($14) charset) init_font_hex: { - .label _0 = $1f - .label idx = $16 - .label proto_lo = $13 - .label charset = $11 - .label c1 = $15 - .label proto_hi = $e - .label c = $10 - //SEG135 [67] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .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] b1_from_init_font_hex: - //SEG136 [67] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG149 [78] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG137 [67] 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 + //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 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG138 [67] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG151 [78] 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 - //SEG139 [67] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG152 [78] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG140 [67] 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 - //SEG141 [67] 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 - //SEG142 [67] 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 + //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 jmp b1 - //SEG143 init_font_hex::@1 + //SEG156 init_font_hex::@1 b1: - //SEG144 [68] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG157 [79] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG145 [68] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG158 [79] 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 - //SEG146 [68] 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 + //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 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG147 [68] 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 + //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 jmp b2 - //SEG148 [68] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG161 [79] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG149 [68] 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 - //SEG150 [68] 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 - //SEG151 [68] 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 + //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 jmp b2 - //SEG152 init_font_hex::@2 + //SEG165 init_font_hex::@2 b2: - //SEG153 [69] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG166 [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG154 [70] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG167 [81] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG155 [70] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG168 [81] 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 - //SEG156 [70] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG169 [81] 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 - //SEG157 [70] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG170 [81] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG158 [70] 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 - //SEG159 [70] 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 + //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 jmp b3 - //SEG160 init_font_hex::@3 + //SEG173 init_font_hex::@3 b3: - //SEG161 [71] (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 + //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 txa tay lda (proto_hi),y @@ -3120,37 +3446,37 @@ init_font_hex: { asl asl sta _0 - //SEG162 [72] (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 + //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 txa tay lda (proto_lo),y asl - //SEG163 [73] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG176 [84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG164 [74] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG177 [85] *((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 - //SEG165 [75] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG178 [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG166 [76] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG179 [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG167 [77] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG180 [88] 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 - //SEG168 init_font_hex::@4 + //SEG181 init_font_hex::@4 b4: - //SEG169 [78] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG182 [89] *((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 - //SEG170 [79] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG183 [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG171 [80] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG184 [91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG172 [81] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG185 [92] (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 @@ -3158,7 +3484,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG173 [82] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG186 [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3166,16 +3492,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG174 [83] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG187 [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG175 [84] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG188 [95] 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 - //SEG176 init_font_hex::@5 + //SEG189 init_font_hex::@5 b5: - //SEG177 [85] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG190 [96] (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 @@ -3183,19 +3509,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG178 [86] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG191 [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG179 [87] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG192 [98] 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 - //SEG180 init_font_hex::@return + //SEG193 init_font_hex::@return breturn: - //SEG181 [88] return + //SEG194 [99] return rts } -//SEG182 File Data +//SEG195 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), ... @@ -3240,6 +3566,7 @@ Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing instruction ldy #0 with TAY Removing instruction ldy #0 +Removing instruction ldy xb Removing instruction lda #0 Removing instruction lda #0 Replacing instruction ldy #0 with TAY @@ -3294,12 +3621,12 @@ Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction init_font_hex_from_main: Removing instruction b5: -Removing instruction init_screen_from_b5: +Removing instruction init_angle_screen_from_b5: Removing instruction b1_from_b5: Removing instruction b3: Removing instruction b4: Removing instruction b1_from_b4: -Removing instruction b1_from_init_screen: +Removing instruction b1_from_init_angle_screen: Removing instruction b4: Removing instruction b3: Removing instruction breturn: @@ -3327,9 +3654,9 @@ Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [220] beq b12 to bne -Fixing long branch [107] bpl b1 to bmi -Fixing long branch [119] bpl b4 to bmi +Fixing long branch [266] beq b12 to bne +Fixing long branch [153] bpl b1 to bmi +Fixing long branch [165] bpl b4 to bmi FINAL SYMBOL TABLE (label) @1 @@ -3352,10 +3679,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:7 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:10 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:9 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:12 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -3374,45 +3701,82 @@ FINAL SYMBOL TABLE (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:12 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:12 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:12 364.0 -(word) atan2_16::angle#13 angle zp ZP_WORD:12 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:12 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:12 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:12 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:12 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:12 2004.0 +(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#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 +(word) atan2_16::angle#4 angle zp ZP_WORD:15 4.0 +(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:11 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:11 429.0 +(byte) atan2_16::i#1 i zp ZP_BYTE:14 1501.5 +(byte) atan2_16::i#2 i zp ZP_BYTE:14 429.0 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:12 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:12 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:15 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:15 202.0 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:23 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:26 3.8928571428571437 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:27 600.5999999999999 +(signed word) atan2_16::xd#0 xd zp ZP_WORD:31 600.5999999999999 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:9 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:9 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:9 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:9 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:9 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:9 4.0 +(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::y -(signed word) atan2_16::y#0 y zp ZP_WORD:25 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:28 3.633333333333334 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:29 1501.5 +(signed word) atan2_16::yd#0 yd zp ZP_WORD:33 1501.5 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:7 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:7 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:7 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:7 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:7 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:7 1001.0 +(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 +(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 +(byte~) init_angle_screen::$13 reg byte a 202.0 +(byte~) init_angle_screen::$14 reg byte a 202.0 +(byte~) init_angle_screen::$2 reg byte a 202.0 +(byte~) init_angle_screen::$3 reg byte a 202.0 +(byte~) init_angle_screen::$6 reg byte a 202.0 +(label) init_angle_screen::@1 +(label) init_angle_screen::@2 +(label) init_angle_screen::@3 +(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 +(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 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:7 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:7 8.959999999999999 +(byte*) init_angle_screen::screen_topline +(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::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 +(signed word) init_angle_screen::xw +(word) init_angle_screen::xw#0 xw zp ZP_WORD:26 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 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:31 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 @@ -3422,53 +3786,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:16 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:16 1.1578947368421053 +(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::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:21 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:21 13.466666666666667 +(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::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:17 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:17 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:17 22.0 +(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::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:22 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:25 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:22 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:25 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:14 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:14 56.83333333333334 +(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_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:19 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:19 92.53846153846155 -(void()) init_screen() -(word~) init_screen::$7 $7 zp ZP_WORD:12 202.0 -(label) init_screen::@1 -(label) init_screen::@2 -(label) init_screen::@3 -(label) init_screen::@4 -(label) init_screen::@return -(byte) init_screen::ang_w -(byte) init_screen::ang_w#0 reg byte a 202.0 -(word) init_screen::angle_w -(word) init_screen::angle_w#0 angle_w zp ZP_WORD:12 202.0 -(byte*) init_screen::screen -(byte*) init_screen::screen#1 screen zp ZP_WORD:5 42.599999999999994 -(byte*) init_screen::screen#2 screen zp ZP_WORD:5 28.545454545454547 -(byte*) init_screen::screen#4 screen zp ZP_WORD:5 22.0 -(signed byte) init_screen::x -(signed byte) init_screen::x#1 reg byte x 151.5 -(signed byte) init_screen::x#2 reg byte x 16.833333333333332 -(signed word) init_screen::xw -(word) init_screen::xw#0 xw zp ZP_WORD:23 50.5 -(signed byte) init_screen::y -(signed byte) init_screen::y#1 y zp ZP_BYTE:4 16.5 -(signed byte) init_screen::y#4 y zp ZP_BYTE:4 1.4666666666666666 -(signed word) init_screen::yw -(word) init_screen::yw#0 yw zp ZP_WORD:25 50.5 +(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 (void()) main() (label) main::@1 (label) main::@2 @@ -3494,35 +3833,43 @@ FINAL SYMBOL TABLE (byte*) main::toD0181_screen zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] -zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -reg byte x [ init_screen::x#2 init_screen::x#1 ] -zp ZP_WORD:5 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] -zp ZP_WORD:7 [ 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:9 [ 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:11 [ atan2_16::i#2 atan2_16::i#1 ] -zp ZP_WORD:12 [ 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_screen::angle_w#0 init_screen::$7 ] -zp ZP_WORD:14 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:16 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:17 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:19 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:21 [ init_font_hex::c1#4 init_font_hex::c1#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_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 x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:22 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_WORD:23 [ init_screen::xw#0 atan2_16::x#0 ] -zp ZP_WORD:25 [ init_screen::yw#0 atan2_16::y#0 ] -reg byte a [ init_screen::ang_w#0 ] -zp ZP_WORD:27 [ atan2_16::xd#0 ] -zp ZP_WORD:29 [ atan2_16::yd#0 ] +zp ZP_BYTE:25 [ 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 ] +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 ] +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:31 [ 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: 358874 +Score: 366079 //SEG0 File Comments // Find atan2(x, y) using the CORDIC method @@ -3550,7 +3897,7 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .label clear_char = 2 //SEG11 [5] call init_font_hex - //SEG12 [66] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [77] 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 @@ -3558,9 +3905,9 @@ main: { //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG17 [8] call init_screen - //SEG18 [14] phi from main::@5 to init_screen [phi:main::@5->init_screen] - jsr init_screen + //SEG17 [8] call init_angle_screen + //SEG18 [14] phi from main::@5 to init_angle_screen [phi:main::@5->init_angle_screen] + jsr init_angle_screen //SEG19 [9] phi from main::@5 to main::@1 [phi:main::@5->main::@1] //SEG20 [9] phi (byte*) main::clear_char#5 = (const byte*) CHARSET#0 [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 lda #main::@1#0] -- register_copy jmp b2 } -//SEG32 init_screen -init_screen: { - .label _7 = $c - .label xw = $17 - .label yw = $19 - .label angle_w = $c - .label screen = 5 +//SEG32 init_angle_screen +// Populates 1000 bytes (a screen) with values representing the angle to the center. +// Utilizes symmetry around the center +init_angle_screen: { + .label _10 = $f + .label xw = $1a + .label yw = $1c + .label angle_w = $f + .label ang_w = $1e + .label xb = 9 + .label screen_topline = 5 + .label screen_bottomline = 7 .label y = 4 - //SEG33 [15] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1] - //SEG34 [15] phi (byte*) init_screen::screen#4 = (const byte*) SCREEN#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN - sta screen+1 - //SEG35 [15] phi (signed byte) init_screen::y#4 = (signed byte) -$c [phi:init_screen->init_screen::@1#1] -- vbsz1=vbsc1 - lda #-$c + //SEG33 [15] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] + //SEG34 [15] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 + //SEG35 [15] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_topline+1 + //SEG36 [15] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 sta y - //SEG36 [15] phi from init_screen::@3 to init_screen::@1 [phi:init_screen::@3->init_screen::@1] - //SEG37 [15] phi (byte*) init_screen::screen#4 = (byte*) init_screen::screen#1 [phi:init_screen::@3->init_screen::@1#0] -- register_copy - //SEG38 [15] phi (signed byte) init_screen::y#4 = (signed byte) init_screen::y#1 [phi:init_screen::@3->init_screen::@1#1] -- register_copy - //SEG39 init_screen::@1 + //SEG37 [15] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + //SEG38 [15] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG39 [15] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG40 [15] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy + //SEG41 init_angle_screen::@1 b1: - //SEG40 [16] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2] - //SEG41 [16] phi (byte*) init_screen::screen#2 = (byte*) init_screen::screen#4 [phi:init_screen::@1->init_screen::@2#0] -- register_copy - //SEG42 [16] phi (signed byte) init_screen::x#2 = (signed byte) -$13 [phi:init_screen::@1->init_screen::@2#1] -- vbsxx=vbsc1 - ldx #-$13 - //SEG43 [16] phi from init_screen::@4 to init_screen::@2 [phi:init_screen::@4->init_screen::@2] - //SEG44 [16] phi (byte*) init_screen::screen#2 = (byte*) init_screen::screen#1 [phi:init_screen::@4->init_screen::@2#0] -- register_copy - //SEG45 [16] phi (signed byte) init_screen::x#2 = (signed byte) init_screen::x#1 [phi:init_screen::@4->init_screen::@2#1] -- register_copy - //SEG46 init_screen::@2 + //SEG42 [16] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + //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 + //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: - //SEG47 [17] (word) init_screen::xw#0 ← (byte)(signed byte) init_screen::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 - ldy #0 + //SEG49 [17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa + asl + //SEG50 [18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG51 [19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 sta xw+1 sty xw - //SEG48 [18] (word) init_screen::yw#0 ← (byte)(signed byte) init_screen::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG52 [20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y + asl + //SEG53 [21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 sta yw+1 sty yw - //SEG49 [19] (signed word) atan2_16::x#0 ← (signed word)(word) init_screen::xw#0 - //SEG50 [20] (signed word) atan2_16::y#0 ← (signed word)(word) init_screen::yw#0 - //SEG51 [21] call atan2_16 + //SEG54 [22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG55 [23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG56 [24] call atan2_16 jsr atan2_16 - //SEG52 [22] (word) atan2_16::return#2 ← (word) atan2_16::return#0 - //SEG53 init_screen::@4 - //SEG54 [23] (word) init_screen::angle_w#0 ← (word) atan2_16::return#2 - //SEG55 [24] (word~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + //SEG57 [25] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + //SEG58 init_angle_screen::@4 + //SEG59 [26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG60 [27] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 lda #$80 clc - adc _7 - sta _7 + adc _10 + sta _10 bcc !+ - inc _7+1 + inc _10+1 !: - //SEG56 [25] (byte) init_screen::ang_w#0 ← > (word~) init_screen::$7 -- vbuaa=_hi_vwuz1 - lda _7+1 - //SEG57 [26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0 -- _deref_pbuz1=vbuaa - ldy #0 - sta (screen),y - //SEG58 [27] (byte*) init_screen::screen#1 ← ++ (byte*) init_screen::screen#2 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG59 [28] (signed byte) init_screen::x#1 ← ++ (signed byte) init_screen::x#2 -- vbsxx=_inc_vbsxx + //SEG61 [28] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG62 [29] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + 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 + 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 + sta (screen_bottomline),y + //SEG66 [33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + lda ang_w + eor #$ff + clc + adc #1 + //SEG67 [34] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //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 - //SEG60 [29] if((signed byte) init_screen::x#1!=(signed byte) $15) goto init_screen::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 - bne b2 - //SEG61 init_screen::@3 - //SEG62 [30] (signed byte) init_screen::y#1 ← ++ (signed byte) init_screen::y#4 -- vbsz1=_inc_vbsz1 + //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 + 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 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG74 [40] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG75 [41] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG63 [31] if((signed byte) init_screen::y#1!=(signed byte) $d) goto init_screen::@1 -- vbsz1_neq_vbsc1_then_la1 + //SEG76 [42] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1 - //SEG64 init_screen::@return - //SEG65 [32] return + //SEG77 init_angle_screen::@return + //SEG78 [43] return rts } -//SEG66 atan2_16 +//SEG79 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($17) x, signed word zeropage($19) y) +// atan2_16(signed word zeropage($1a) x, signed word zeropage($1c) y) atan2_16: { - .label _2 = 7 - .label _7 = 9 - .label yi = 7 - .label xi = 9 - .label xd = $1b - .label yd = $1d - .label angle = $c - .label i = $b - .label return = $c - .label x = $17 - .label y = $19 - //SEG67 [33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + .label _2 = $a + .label _7 = $c + .label yi = $a + .label xi = $c + .label xd = $1f + .label yd = $21 + .label angle = $f + .label i = $e + .label return = $f + .label x = $1a + .label y = $1c + //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+ jmp b1 !b1: - //SEG68 atan2_16::@2 - //SEG69 [34] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + //SEG81 atan2_16::@2 + //SEG82 [45] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc y @@ -3711,17 +4117,17 @@ atan2_16: { lda #0 sbc y+1 sta _2+1 - //SEG70 [35] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] - //SEG71 [35] 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 - //SEG72 atan2_16::@3 + //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 + //SEG85 atan2_16::@3 b3: - //SEG73 [36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + //SEG86 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda x+1 bmi !b4+ jmp b4 !b4: - //SEG74 atan2_16::@5 - //SEG75 [37] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + //SEG87 atan2_16::@5 + //SEG88 [48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc x @@ -3729,38 +4135,38 @@ atan2_16: { lda #0 sbc x+1 sta _7+1 - //SEG76 [38] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] - //SEG77 [38] 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 - //SEG78 atan2_16::@6 + //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 + //SEG91 atan2_16::@6 b6: - //SEG79 [39] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] - //SEG80 [39] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + //SEG92 [50] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG93 [50] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 lda #0 sta angle sta angle+1 - //SEG81 [39] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 + //SEG94 [50] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 sta i - //SEG82 [39] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy - //SEG83 [39] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy - //SEG84 atan2_16::@10 + //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 b10: - //SEG85 [40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + //SEG98 [51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda yi+1 bne b11 lda yi bne b11 - //SEG86 [41] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] - //SEG87 [41] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy - //SEG88 atan2_16::@12 + //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 + //SEG101 atan2_16::@12 b12: - //SEG89 [42] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG102 [53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr angle+1 ror angle - //SEG90 [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + //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 - //SEG91 atan2_16::@16 - //SEG92 [44] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + //SEG104 atan2_16::@16 + //SEG105 [55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc angle @@ -3768,15 +4174,15 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG93 [45] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] - //SEG94 [45] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy - //SEG95 atan2_16::@7 + //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 + //SEG108 atan2_16::@7 b7: - //SEG96 [46] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + //SEG109 [57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda y+1 bpl b8 - //SEG97 atan2_16::@9 - //SEG98 [47] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + //SEG110 atan2_16::@9 + //SEG111 [58] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc angle @@ -3784,16 +4190,16 @@ atan2_16: { lda #0 sbc angle+1 sta angle+1 - //SEG99 [48] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] - //SEG100 [48] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy - //SEG101 atan2_16::@8 + //SEG112 [59] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG113 [59] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG114 atan2_16::@8 b8: - //SEG102 atan2_16::@return - //SEG103 [49] return + //SEG115 atan2_16::@return + //SEG116 [60] return rts - //SEG104 atan2_16::@11 + //SEG117 atan2_16::@11 b11: - //SEG105 [50] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda xi sta xd @@ -3809,7 +4215,7 @@ atan2_16: { dey bne !- !e: - //SEG106 [51] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda yi sta yd @@ -3825,11 +4231,11 @@ atan2_16: { dey bne !- !e: - //SEG107 [52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG120 [63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 lda yi+1 bpl b13 - //SEG108 atan2_16::@15 - //SEG109 [53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + //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 lda xi sec sbc yd @@ -3837,7 +4243,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG110 [54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG123 [65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -3845,10 +4251,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG111 [55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG124 [66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //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 + //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 tay sec lda angle @@ -3857,29 +4263,29 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG113 [57] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - //SEG114 [57] 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 - //SEG115 [57] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG116 [57] 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 - //SEG117 atan2_16::@14 + //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: - //SEG118 [58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG131 [69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //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 + //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 bne !b12+ jmp b12 !b12: - //SEG120 [39] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - //SEG121 [39] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG122 [39] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG123 [39] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG124 [39] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //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 jmp b10 - //SEG125 atan2_16::@13 + //SEG138 atan2_16::@13 b13: - //SEG126 [60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG139 [71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -3887,7 +4293,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG127 [61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG140 [72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -3895,10 +4301,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG128 [62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG141 [73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //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 + //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 tay clc lda angle @@ -3908,86 +4314,86 @@ atan2_16: { adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 jmp b14 - //SEG130 atan2_16::@4 + //SEG143 atan2_16::@4 b4: - //SEG131 [64] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG144 [75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6 - //SEG132 atan2_16::@1 + //SEG145 atan2_16::@1 b1: - //SEG133 [65] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG146 [76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3 } -//SEG134 init_font_hex +//SEG147 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($11) charset) +// init_font_hex(byte* zeropage($14) charset) init_font_hex: { - .label _0 = $1f - .label idx = $16 - .label proto_lo = $13 - .label charset = $11 - .label c1 = $15 - .label proto_hi = $e - .label c = $10 - //SEG135 [67] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG136 [67] 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 = $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 lda #0 sta c - //SEG137 [67] 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 + //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 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG138 [67] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG151 [78] 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 - //SEG139 [67] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG140 [67] 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 - //SEG141 [67] 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 - //SEG142 [67] 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 - //SEG143 init_font_hex::@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 b1: - //SEG144 [68] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG145 [68] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //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 lda #0 sta c1 - //SEG146 [68] 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 + //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 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG147 [68] 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 - //SEG148 [68] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG149 [68] 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 - //SEG150 [68] 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 - //SEG151 [68] 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 - //SEG152 init_font_hex::@2 + //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 b2: - //SEG153 [69] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG166 [80] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG154 [70] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG155 [70] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //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 lda #1 sta idx - //SEG156 [70] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG169 [81] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG157 [70] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG158 [70] 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 - //SEG159 [70] 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 - //SEG160 init_font_hex::@3 + //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 b3: - //SEG161 [71] (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 + //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 txa tay lda (proto_hi),y @@ -3996,33 +4402,33 @@ init_font_hex: { asl asl sta _0 - //SEG162 [72] (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 + //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 txa tay lda (proto_lo),y asl - //SEG163 [73] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG176 [84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG164 [74] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG177 [85] *((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 - //SEG165 [75] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG178 [86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG166 [76] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG179 [87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG167 [77] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG180 [88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG168 init_font_hex::@4 - //SEG169 [78] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //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 lda #0 ldy idx sta (charset),y - //SEG170 [79] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG183 [90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG171 [80] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG184 [91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG172 [81] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG185 [92] (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 @@ -4030,7 +4436,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG173 [82] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG186 [93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4038,14 +4444,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG174 [83] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG187 [94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG175 [84] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG188 [95] 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 - //SEG176 init_font_hex::@5 - //SEG177 [85] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //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 lda #5 clc adc proto_hi @@ -4053,17 +4459,17 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG178 [86] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG191 [97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG179 [87] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG192 [98] 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 - //SEG180 init_font_hex::@return - //SEG181 [88] return + //SEG193 init_font_hex::@return + //SEG194 [99] return rts } -//SEG182 File Data +//SEG195 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 6f6a968e6..ea5f20a2c 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:7 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:10 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:9 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:12 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -40,45 +40,82 @@ (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:12 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:12 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:12 364.0 -(word) atan2_16::angle#13 angle zp ZP_WORD:12 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:12 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:12 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:12 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:12 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:12 2004.0 +(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#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 +(word) atan2_16::angle#4 angle zp ZP_WORD:15 4.0 +(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:11 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:11 429.0 +(byte) atan2_16::i#1 i zp ZP_BYTE:14 1501.5 +(byte) atan2_16::i#2 i zp ZP_BYTE:14 429.0 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:12 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:12 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:15 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:15 202.0 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:23 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:26 3.8928571428571437 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:27 600.5999999999999 +(signed word) atan2_16::xd#0 xd zp ZP_WORD:31 600.5999999999999 (signed word) atan2_16::xi -(signed word) atan2_16::xi#0 xi zp ZP_WORD:9 6.0 -(signed word) atan2_16::xi#1 xi zp ZP_WORD:9 500.5 -(signed word) atan2_16::xi#2 xi zp ZP_WORD:9 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:9 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:9 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:9 4.0 +(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::y -(signed word) atan2_16::y#0 y zp ZP_WORD:25 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:28 3.633333333333334 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:29 1501.5 +(signed word) atan2_16::yd#0 yd zp ZP_WORD:33 1501.5 (signed word) atan2_16::yi -(signed word) atan2_16::yi#0 yi zp ZP_WORD:7 1.2000000000000002 -(signed word) atan2_16::yi#1 yi zp ZP_WORD:7 667.3333333333334 -(signed word~) atan2_16::yi#11 yi zp ZP_WORD:7 4.0 -(signed word) atan2_16::yi#2 yi zp ZP_WORD:7 667.3333333333334 -(signed word) atan2_16::yi#3 yi zp ZP_WORD:7 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:7 1001.0 +(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 +(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 +(byte~) init_angle_screen::$13 reg byte a 202.0 +(byte~) init_angle_screen::$14 reg byte a 202.0 +(byte~) init_angle_screen::$2 reg byte a 202.0 +(byte~) init_angle_screen::$3 reg byte a 202.0 +(byte~) init_angle_screen::$6 reg byte a 202.0 +(label) init_angle_screen::@1 +(label) init_angle_screen::@2 +(label) init_angle_screen::@3 +(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 +(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 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:7 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:7 8.959999999999999 +(byte*) init_angle_screen::screen_topline +(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::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 +(signed word) init_angle_screen::xw +(word) init_angle_screen::xw#0 xw zp ZP_WORD:26 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 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:31 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 @@ -88,53 +125,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:16 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:16 1.1578947368421053 +(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::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:21 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:21 13.466666666666667 +(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::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:17 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:17 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:17 22.0 +(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::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:22 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:25 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:22 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:25 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:14 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:14 56.83333333333334 +(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_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:19 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:19 92.53846153846155 -(void()) init_screen() -(word~) init_screen::$7 $7 zp ZP_WORD:12 202.0 -(label) init_screen::@1 -(label) init_screen::@2 -(label) init_screen::@3 -(label) init_screen::@4 -(label) init_screen::@return -(byte) init_screen::ang_w -(byte) init_screen::ang_w#0 reg byte a 202.0 -(word) init_screen::angle_w -(word) init_screen::angle_w#0 angle_w zp ZP_WORD:12 202.0 -(byte*) init_screen::screen -(byte*) init_screen::screen#1 screen zp ZP_WORD:5 42.599999999999994 -(byte*) init_screen::screen#2 screen zp ZP_WORD:5 28.545454545454547 -(byte*) init_screen::screen#4 screen zp ZP_WORD:5 22.0 -(signed byte) init_screen::x -(signed byte) init_screen::x#1 reg byte x 151.5 -(signed byte) init_screen::x#2 reg byte x 16.833333333333332 -(signed word) init_screen::xw -(word) init_screen::xw#0 xw zp ZP_WORD:23 50.5 -(signed byte) init_screen::y -(signed byte) init_screen::y#1 y zp ZP_BYTE:4 16.5 -(signed byte) init_screen::y#4 y zp ZP_BYTE:4 1.4666666666666666 -(signed word) init_screen::yw -(word) init_screen::yw#0 yw zp ZP_WORD:25 50.5 +(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 (void()) main() (label) main::@1 (label) main::@2 @@ -160,28 +172,36 @@ (byte*) main::toD0181_screen zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ] -zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ] -reg byte x [ init_screen::x#2 init_screen::x#1 ] -zp ZP_WORD:5 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ] -zp ZP_WORD:7 [ 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:9 [ 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:11 [ atan2_16::i#2 atan2_16::i#1 ] -zp ZP_WORD:12 [ 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_screen::angle_w#0 init_screen::$7 ] -zp ZP_WORD:14 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:16 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:17 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:19 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:21 [ init_font_hex::c1#4 init_font_hex::c1#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_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 x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:22 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_WORD:23 [ init_screen::xw#0 atan2_16::x#0 ] -zp ZP_WORD:25 [ init_screen::yw#0 atan2_16::y#0 ] -reg byte a [ init_screen::ang_w#0 ] -zp ZP_WORD:27 [ atan2_16::xd#0 ] -zp ZP_WORD:29 [ atan2_16::yd#0 ] +zp ZP_BYTE:25 [ 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 ] +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 ] +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:31 [ 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.asm b/src/test/ref/cordic-atan2.asm index 5472412b4..fcdece88a 100644 --- a/src/test/ref/cordic-atan2.asm +++ b/src/test/ref/cordic-atan2.asm @@ -52,7 +52,7 @@ main: { jmp b4 } // 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 +// Finding the angle requires a binary search using CORDIC_ITERATIONS_8 // Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI) // atan2_8(signed byte zeropage(3) x, signed byte zeropage(2) y) atan2_8: { diff --git a/src/test/ref/cordic-atan2.log b/src/test/ref/cordic-atan2.log index 381ed76b4..b7a3ae74c 100644 --- a/src/test/ref/cordic-atan2.log +++ b/src/test/ref/cordic-atan2.log @@ -1677,7 +1677,7 @@ main: { } //SEG46 atan2_8 // 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 +// Finding the angle requires a binary search using CORDIC_ITERATIONS_8 // Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI) // atan2_8(signed byte zeropage($15) x, signed byte zeropage($16) y) atan2_8: { @@ -2394,7 +2394,7 @@ main: { } //SEG46 atan2_8 // 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 +// Finding the angle requires a binary search using CORDIC_ITERATIONS_8 // Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI) // atan2_8(signed byte zeropage(3) x, signed byte zeropage(2) y) atan2_8: { @@ -3172,7 +3172,7 @@ main: { } //SEG46 atan2_8 // 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 +// Finding the angle requires a binary search using CORDIC_ITERATIONS_8 // Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI) // atan2_8(signed byte zeropage(3) x, signed byte zeropage(2) y) atan2_8: { diff --git a/src/test/ref/screen-center-angle.asm b/src/test/ref/screen-center-angle.asm index d9ae94739..495ba7a45 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 = $1c - .label cyclecount = $1c + .label _4 = $1f + .label cyclecount = $1f 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($1c) dw) +// print_dword_at(dword zeropage($1f) dw) print_dword_at: { - .label dw = $1c + .label dw = $1f 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 = $1c + .label return = $1f lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -158,49 +158,92 @@ clock: { rts } // Populates 1000 bytes (a screen) with values representing the angle to the center. -// The actual value stored is distance*2 to increase precision -// init_angle_screen(byte* zeropage($a) screen) +// Utilizes symmetry around the center init_angle_screen: { - .label _7 = $11 - .label xw = $20 - .label yw = $22 - .label angle_w = $11 - .label screen = $a + .label _10 = $14 + .label xw = $23 + .label yw = $25 + .label angle_w = $14 + .label ang_w = $27 + .label xb = $e + .label screen_topline = $a + .label screen_bottomline = $c .label y = 9 - lda #SCREEN - sta screen+1 - lda #-$c + lda #SCREEN+$28*$c + sta screen_bottomline+1 + lda #SCREEN+$28*$c + sta screen_topline+1 + lda #0 sta y b1: - ldx #-$13 + lda #$27 + sta xb + ldx #0 b2: - ldy #0 txa + asl + eor #$ff + clc + adc #$27+1 + ldy #0 sta xw+1 sty xw lda y + asl sta yw+1 sty yw jsr atan2_16 lda #$80 clc - adc _7 - sta _7 + adc _10 + sta _10 bcc !+ - inc _7+1 - !: - lda _7+1 - ldy #0 - sta (screen),y - inc screen - bne !+ - inc screen+1 + inc _10+1 !: + lda _10+1 + sta ang_w + lda #$80 + clc + adc ang_w + stx $ff + ldy $ff + sta (screen_topline),y + lda #$80 + sec + sbc ang_w + stx $ff + ldy $ff + sta (screen_bottomline),y + lda ang_w + eor #$ff + clc + adc #1 + ldy xb + sta (screen_topline),y + lda ang_w + sta (screen_bottomline),y inx - cpx #$15 - bne b2 + dec xb + cpx #$13+1 + bcc b2 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: inc y lda #$d cmp y @@ -210,19 +253,19 @@ 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($20) x, signed word zeropage($22) y) +// atan2_16(signed word zeropage($23) x, signed word zeropage($25) y) atan2_16: { - .label _2 = $c - .label _7 = $e - .label yi = $c - .label xi = $e - .label xd = $24 - .label yd = $26 - .label angle = $11 - .label i = $10 - .label return = $11 - .label x = $20 - .label y = $22 + .label _2 = $f + .label _7 = $11 + .label yi = $f + .label xi = $11 + .label xd = $28 + .label yd = $2a + .label angle = $14 + .label i = $13 + .label return = $14 + .label x = $23 + .label y = $25 lda y+1 bmi !b1+ jmp b1 @@ -407,15 +450,15 @@ clock_start: { rts } // Make charset from proto chars -// init_font_hex(byte* zeropage($16) charset) +// init_font_hex(byte* zeropage($19) charset) init_font_hex: { - .label _0 = $28 - .label idx = $1b - .label proto_lo = $18 - .label charset = $16 - .label c1 = $1a - .label proto_hi = $13 - .label c = $15 + .label _0 = $2c + .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 # (word~) init_angle_screen::$7 - [61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 - [62] (byte*) init_angle_screen::screen#1 ← ++ (byte*) init_angle_screen::screen#2 - [63] (signed byte) init_angle_screen::x#1 ← ++ (signed byte) init_angle_screen::x#2 - [64] if((signed byte) init_angle_screen::x#1!=(signed byte) $15) goto init_angle_screen::@2 + [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 + [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 + [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 + [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [72] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 to:init_angle_screen::@3 init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 - [65] (signed byte) init_angle_screen::y#1 ← ++ (signed byte) init_angle_screen::y#4 - [66] if((signed byte) init_angle_screen::y#1!=(signed byte) $d) goto init_angle_screen::@1 + [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [76] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [77] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 to:init_angle_screen::@return init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 - [67] return + [78] return to:@return atan2_16: scope:[atan2_16] from init_angle_screen::@2 - [68] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 atan2_16::@2: scope:[atan2_16] from atan2_16 - [69] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + [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 - [70] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) - [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + [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 ) + [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 - [72] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + [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 - [73] (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#8 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 - [74] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [74] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [74] (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 ) - [74] (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 ) - [75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + [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 ) + [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 - [76] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) - [77] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 - [78] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + [87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(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 - [79] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + [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 - [80] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) - [81] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + [91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(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 - [82] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 to:atan2_16::@8 atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 - [83] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + [94] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) to:atan2_16::@return atan2_16::@return: scope:[atan2_16] from atan2_16::@8 - [84] return + [95] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [85] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [86] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [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 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [88] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [89] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [90] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [91] (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) + [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 - [92] (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 ) - [92] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [92] (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 ) - [93] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [94] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 + [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 to:atan2_16::@10 atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [95] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [96] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [97] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [98] (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) + [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::@4: scope:[atan2_16] from atan2_16::@3 - [99] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [100] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 to:atan2_16::@3 clock_start: scope:[clock_start] from main::@1 - [101] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [102] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [103] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [104] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [105] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [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 to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start - [106] return + [117] return to:@return init_font_hex: scope:[init_font_hex] from main - [107] phi() + [118] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [108] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [108] (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 ) - [108] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [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 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [109] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [109] (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 ) - [109] (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 ) - [110] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [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 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [111] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [111] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [112] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [113] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [114] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [116] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [117] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [118] if((byte) init_font_hex::i#1!=(byte) 5) goto 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 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [119] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [120] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [121] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [122] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [123] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [124] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [125] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [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 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [126] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [127] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [128] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [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 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [129] return + [140] return to:@return diff --git a/src/test/ref/screen-center-angle.log b/src/test/ref/screen-center-angle.log index df37dd106..fdbef2c96 100644 --- a/src/test/ref/screen-center-angle.log +++ b/src/test/ref/screen-center-angle.log @@ -486,53 +486,73 @@ main::@return: scope:[main] from main::@2 return to:@return init_angle_screen: scope:[init_angle_screen] from main::@4 - (byte*) init_angle_screen::screen#5 ← phi( main::@4/(byte*) init_angle_screen::screen#0 ) - (signed byte) init_angle_screen::y#0 ← (signed byte) -$c + (byte*) init_angle_screen::screen#1 ← phi( main::@4/(byte*) init_angle_screen::screen#0 ) + (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_topline#0 ← (byte*~) init_angle_screen::$0 + (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c + (byte*) init_angle_screen::screen_bottomline#0 ← (byte*~) init_angle_screen::$1 + (byte) init_angle_screen::y#0 ← (byte) 0 to:init_angle_screen::@1 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 - (byte*) init_angle_screen::screen#4 ← phi( init_angle_screen/(byte*) init_angle_screen::screen#5 init_angle_screen::@3/(byte*) init_angle_screen::screen#6 ) - (signed byte) init_angle_screen::y#4 ← phi( init_angle_screen/(signed byte) init_angle_screen::y#0 init_angle_screen::@3/(signed byte) init_angle_screen::y#1 ) - (signed byte) init_angle_screen::x#0 ← (signed byte) -$13 + (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) init_angle_screen::y#0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) + (byte) init_angle_screen::x#0 ← (number) 0 + (byte) init_angle_screen::xb#0 ← (number) $27 to:init_angle_screen::@2 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 - (byte*) init_angle_screen::screen#3 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen#4 init_angle_screen::@5/(byte*) init_angle_screen::screen#1 ) - (signed byte) init_angle_screen::y#2 ← phi( init_angle_screen::@1/(signed byte) init_angle_screen::y#4 init_angle_screen::@5/(signed byte) init_angle_screen::y#5 ) - (signed byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(signed byte) init_angle_screen::x#0 init_angle_screen::@5/(signed byte) init_angle_screen::x#1 ) - (byte~) init_angle_screen::$0 ← ((byte)) (signed byte) init_angle_screen::x#2 - (word~) init_angle_screen::$1 ← ((word)) { (byte~) init_angle_screen::$0, (number) 0 } - (signed word~) init_angle_screen::$2 ← ((signed word)) (word~) init_angle_screen::$1 - (signed word) init_angle_screen::xw#0 ← (signed word~) init_angle_screen::$2 - (byte~) init_angle_screen::$3 ← ((byte)) (signed byte) init_angle_screen::y#2 - (word~) init_angle_screen::$4 ← ((word)) { (byte~) init_angle_screen::$3, (number) 0 } + (byte) init_angle_screen::xb#3 ← phi( init_angle_screen::@1/(byte) init_angle_screen::xb#0 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) + (byte*) init_angle_screen::screen_bottomline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_bottomline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte*) init_angle_screen::screen_topline#4 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen_topline#5 init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte) init_angle_screen::y#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::y#4 init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) init_angle_screen::x#0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) + (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 + (number~) init_angle_screen::$3 ← (number) $27 - (number~) init_angle_screen::$2 + (word~) init_angle_screen::$4 ← ((word)) { (number~) init_angle_screen::$3, (number) 0 } (signed word~) init_angle_screen::$5 ← ((signed word)) (word~) init_angle_screen::$4 - (signed word) init_angle_screen::yw#0 ← (signed word~) init_angle_screen::$5 + (signed word) init_angle_screen::xw#0 ← (signed word~) init_angle_screen::$5 + (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 + (word~) init_angle_screen::$7 ← ((word)) { (number~) init_angle_screen::$6, (number) 0 } + (signed word~) init_angle_screen::$8 ← ((signed word)) (word~) init_angle_screen::$7 + (signed word) init_angle_screen::yw#0 ← (signed word~) init_angle_screen::$8 (signed word) atan2_16::x#0 ← (signed word) init_angle_screen::xw#0 (signed word) atan2_16::y#0 ← (signed word) init_angle_screen::yw#0 call atan2_16 (word) atan2_16::return#2 ← (word) atan2_16::return#1 to:init_angle_screen::@5 init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@2 - (signed byte) init_angle_screen::y#5 ← phi( init_angle_screen::@2/(signed byte) init_angle_screen::y#2 ) - (signed byte) init_angle_screen::x#3 ← phi( init_angle_screen::@2/(signed byte) init_angle_screen::x#2 ) - (byte*) init_angle_screen::screen#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen#3 ) + (byte) init_angle_screen::y#5 ← phi( init_angle_screen::@2/(byte) init_angle_screen::y#2 ) + (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@2/(byte) init_angle_screen::xb#3 ) + (byte*) init_angle_screen::screen_bottomline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_bottomline#4 ) + (byte) init_angle_screen::x#3 ← phi( init_angle_screen::@2/(byte) init_angle_screen::x#2 ) + (byte*) init_angle_screen::screen_topline#2 ← phi( init_angle_screen::@2/(byte*) init_angle_screen::screen_topline#4 ) (word) atan2_16::return#4 ← phi( init_angle_screen::@2/(word) atan2_16::return#2 ) - (word~) init_angle_screen::$6 ← (word) atan2_16::return#4 - (word) init_angle_screen::angle_w#0 ← (word~) init_angle_screen::$6 - (number~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (number) $80 - (number~) init_angle_screen::$8 ← > (number~) init_angle_screen::$7 - (byte) init_angle_screen::ang_w#0 ← (number~) init_angle_screen::$8 - *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 - (byte*) init_angle_screen::screen#1 ← ++ (byte*) init_angle_screen::screen#2 - (signed byte) init_angle_screen::x#1 ← (signed byte) init_angle_screen::x#3 + rangenext(-$13,$14) - (bool~) init_angle_screen::$9 ← (signed byte) init_angle_screen::x#1 != rangelast(-$13,$14) - if((bool~) init_angle_screen::$9) goto init_angle_screen::@2 + (word~) init_angle_screen::$9 ← (word) atan2_16::return#4 + (word) init_angle_screen::angle_w#0 ← (word~) init_angle_screen::$9 + (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 + (number~) init_angle_screen::$11 ← > (number~) init_angle_screen::$10 + (byte) init_angle_screen::ang_w#0 ← (number~) init_angle_screen::$11 + (number~) init_angle_screen::$12 ← (number) $80 + (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$12 + (number~) init_angle_screen::$13 ← (number) $80 - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::x#3) ← (number~) init_angle_screen::$13 + (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 + *((byte*) init_angle_screen::screen_topline#2 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 + *((byte*) init_angle_screen::screen_bottomline#2 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#3 + (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 + if((bool~) init_angle_screen::$15) goto init_angle_screen::@2 to:init_angle_screen::@3 init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 - (byte*) init_angle_screen::screen#6 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen#1 ) - (signed byte) init_angle_screen::y#3 ← phi( init_angle_screen::@5/(signed byte) init_angle_screen::y#5 ) - (signed byte) init_angle_screen::y#1 ← (signed byte) init_angle_screen::y#3 + rangenext(-$c,$c) - (bool~) init_angle_screen::$10 ← (signed byte) init_angle_screen::y#1 != rangelast(-$c,$c) - if((bool~) init_angle_screen::$10) goto init_angle_screen::@1 + (byte) init_angle_screen::y#3 ← phi( init_angle_screen::@5/(byte) init_angle_screen::y#5 ) + (byte*) init_angle_screen::screen_bottomline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_bottomline#2 ) + (byte*) init_angle_screen::screen_topline#3 ← phi( init_angle_screen::@5/(byte*) init_angle_screen::screen_topline#2 ) + (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 + (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 + (byte) init_angle_screen::y#1 ← (byte) init_angle_screen::y#3 + rangenext(0,$c) + (bool~) init_angle_screen::$16 ← (byte) init_angle_screen::y#1 != rangelast(0,$c) + if((bool~) init_angle_screen::$16) goto init_angle_screen::@1 to:init_angle_screen::@return init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 return @@ -741,17 +761,23 @@ SYMBOL TABLE SSA (byte~) clock_start::$7 (label) clock_start::@return (void()) init_angle_screen((byte*) init_angle_screen::screen) -(byte~) init_angle_screen::$0 -(word~) init_angle_screen::$1 -(bool~) init_angle_screen::$10 -(signed word~) init_angle_screen::$2 -(byte~) init_angle_screen::$3 +(byte*~) init_angle_screen::$0 +(byte*~) init_angle_screen::$1 +(number~) init_angle_screen::$10 +(number~) init_angle_screen::$11 +(number~) init_angle_screen::$12 +(number~) init_angle_screen::$13 +(byte~) init_angle_screen::$14 +(bool~) init_angle_screen::$15 +(bool~) init_angle_screen::$16 +(number~) init_angle_screen::$2 +(number~) init_angle_screen::$3 (word~) init_angle_screen::$4 (signed word~) init_angle_screen::$5 -(word~) init_angle_screen::$6 -(number~) init_angle_screen::$7 -(number~) init_angle_screen::$8 -(bool~) init_angle_screen::$9 +(number~) init_angle_screen::$6 +(word~) init_angle_screen::$7 +(signed word~) init_angle_screen::$8 +(word~) init_angle_screen::$9 (label) init_angle_screen::@1 (label) init_angle_screen::@2 (label) init_angle_screen::@3 @@ -764,25 +790,39 @@ SYMBOL TABLE SSA (byte*) init_angle_screen::screen (byte*) init_angle_screen::screen#0 (byte*) init_angle_screen::screen#1 -(byte*) init_angle_screen::screen#2 -(byte*) init_angle_screen::screen#3 -(byte*) init_angle_screen::screen#4 -(byte*) init_angle_screen::screen#5 -(byte*) init_angle_screen::screen#6 -(signed byte) init_angle_screen::x -(signed byte) init_angle_screen::x#0 -(signed byte) init_angle_screen::x#1 -(signed byte) init_angle_screen::x#2 -(signed byte) init_angle_screen::x#3 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#0 +(byte*) init_angle_screen::screen_bottomline#1 +(byte*) init_angle_screen::screen_bottomline#2 +(byte*) init_angle_screen::screen_bottomline#3 +(byte*) init_angle_screen::screen_bottomline#4 +(byte*) init_angle_screen::screen_bottomline#5 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#0 +(byte*) init_angle_screen::screen_topline#1 +(byte*) init_angle_screen::screen_topline#2 +(byte*) init_angle_screen::screen_topline#3 +(byte*) init_angle_screen::screen_topline#4 +(byte*) init_angle_screen::screen_topline#5 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#0 +(byte) init_angle_screen::x#1 +(byte) init_angle_screen::x#2 +(byte) init_angle_screen::x#3 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#0 +(byte) init_angle_screen::xb#1 +(byte) init_angle_screen::xb#2 +(byte) init_angle_screen::xb#3 (signed word) init_angle_screen::xw (signed word) init_angle_screen::xw#0 -(signed byte) init_angle_screen::y -(signed byte) init_angle_screen::y#0 -(signed byte) init_angle_screen::y#1 -(signed byte) init_angle_screen::y#2 -(signed byte) init_angle_screen::y#3 -(signed byte) init_angle_screen::y#4 -(signed byte) init_angle_screen::y#5 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#0 +(byte) init_angle_screen::y#1 +(byte) init_angle_screen::y#2 +(byte) init_angle_screen::y#3 +(byte) init_angle_screen::y#4 +(byte) init_angle_screen::y#5 (signed word) init_angle_screen::yw (signed word) init_angle_screen::yw#0 (void()) init_font_hex((byte*) init_font_hex::charset) @@ -990,8 +1030,8 @@ SYMBOL TABLE SSA (word) print_word_at::w#2 (word) print_word_at::w#3 -Fixing inline constructor with init_angle_screen::$11 ← (byte)init_angle_screen::$0 w= (byte)0 -Fixing inline constructor with init_angle_screen::$12 ← (byte)init_angle_screen::$3 w= (byte)0 +Fixing inline constructor with init_angle_screen::$17 ← (byte)init_angle_screen::$3 w= (byte)0 +Fixing inline constructor with init_angle_screen::$18 ← (byte)init_angle_screen::$6 w= (byte)0 Successful SSA optimization Pass2FixInlineConstructorsNew Adding number conversion cast (unumber) 0 in (byte) CIA_TIMER_CONTROL_STOP#0 ← (number) 0 Adding number conversion cast (unumber) 1 in (byte) CIA_TIMER_CONTROL_START#0 ← (number) 1 @@ -1050,9 +1090,26 @@ Adding number conversion cast (unumber) main::toD0182_$6#0 in (number~) main::to Adding number conversion cast (unumber) $f in (number~) main::toD0182_$7#0 ← (unumber~) main::toD0182_$6#0 & (number) $f Adding number conversion cast (unumber) main::toD0182_$7#0 in (number~) main::toD0182_$7#0 ← (unumber~) main::toD0182_$6#0 & (unumber)(number) $f Adding number conversion cast (unumber) main::toD0182_$8#0 in (number~) main::toD0182_$8#0 ← (unumber~) main::toD0182_$3#0 | (unumber~) main::toD0182_$7#0 -Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (number) $80 -Adding number conversion cast (unumber) init_angle_screen::$7 in (number~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (unumber)(number) $80 -Adding number conversion cast (unumber) init_angle_screen::$8 in (number~) init_angle_screen::$8 ← > (unumber~) init_angle_screen::$7 +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) $28*$c in (byte*~) init_angle_screen::$1 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c +Adding number conversion cast (unumber) 0 in (byte) init_angle_screen::x#0 ← (number) 0 +Adding number conversion cast (unumber) $27 in (byte) init_angle_screen::xb#0 ← (number) $27 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$2 in (number~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $27 in (number~) init_angle_screen::$3 ← (number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) init_angle_screen::$3 in (number~) init_angle_screen::$3 ← (unumber)(number) $27 - (unumber~) init_angle_screen::$2 +Adding number conversion cast (unumber) 2 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (number) 2 +Adding number conversion cast (unumber) init_angle_screen::$6 in (number~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (number) $80 +Adding number conversion cast (unumber) init_angle_screen::$10 in (number~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (unumber)(number) $80 +Adding number conversion cast (unumber) init_angle_screen::$11 in (number~) init_angle_screen::$11 ← > (unumber~) init_angle_screen::$10 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$12 ← (number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$12 in (number~) init_angle_screen::$12 ← (unumber)(number) $80 + (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $80 in (number~) init_angle_screen::$13 ← (number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) init_angle_screen::$13 in (number~) init_angle_screen::$13 ← (unumber)(number) $80 - (byte) init_angle_screen::ang_w#0 +Adding number conversion cast (unumber) $13 in (bool~) init_angle_screen::$15 ← (byte) init_angle_screen::x#1 <= (number) $13 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#3 - (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#3 + (number) $28 Successful SSA optimization PassNAddNumberTypeConversions Adding number conversion cast (byte) to elements in (byte[]) FONT_HEX_PROTO#0 ← { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 } Successful SSA optimization PassNAddArrayNumberTypeConversions @@ -1081,10 +1138,10 @@ Inlining cast (byte*) main::BASE_SCREEN#0 ← (byte*)(number) $400 Inlining cast (byte*) main::BASE_CHARSET#0 ← (byte*)(number) $1000 Inlining cast (word~) main::toD0182_$0#0 ← (word)(byte*) main::toD0182_screen#1 Inlining cast (word~) main::toD0182_$4#0 ← (word)(byte*) main::toD0182_gfx#1 -Inlining cast (byte~) init_angle_screen::$0 ← (byte)(signed byte) init_angle_screen::x#2 -Inlining cast (signed word~) init_angle_screen::$2 ← (signed word)(word~) init_angle_screen::$1 -Inlining cast (byte~) init_angle_screen::$3 ← (byte)(signed byte) init_angle_screen::y#2 +Inlining cast (byte) init_angle_screen::x#0 ← (unumber)(number) 0 +Inlining cast (byte) init_angle_screen::xb#0 ← (unumber)(number) $27 Inlining cast (signed word~) init_angle_screen::$5 ← (signed word)(word~) init_angle_screen::$4 +Inlining cast (signed word~) init_angle_screen::$8 ← (signed word)(word~) init_angle_screen::$7 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53272 Simplifying constant pointer cast (dword*) 56580 @@ -1215,11 +1272,19 @@ Simplifying constant integer cast $3fff Simplifying constant integer cast 4 Simplifying constant integer cast 4 Simplifying constant integer cast $f -Simplifying constant integer cast (byte~) init_angle_screen::$0 Simplifying constant integer cast 0 -Simplifying constant integer cast (byte~) init_angle_screen::$3 +Simplifying constant integer cast $27 +Simplifying constant integer cast 2 +Simplifying constant integer cast $27 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 Simplifying constant integer cast 0 Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast $13 +Simplifying constant integer cast $28 +Simplifying constant integer cast $28 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 @@ -1262,7 +1327,17 @@ Finalized unsigned number type (word) $3fff Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) $f +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $13 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) $28 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (byte) 1 Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9 @@ -1280,8 +1355,13 @@ Inferred type updated to byte in (unumber~) main::toD0182_$3#0 ← > (word~) mai Inferred type updated to byte in (unumber~) main::toD0182_$6#0 ← (byte~) main::toD0182_$5#0 / (byte) 4 Inferred type updated to byte in (unumber~) main::toD0182_$7#0 ← (byte~) main::toD0182_$6#0 & (byte) $f Inferred type updated to byte in (unumber~) main::toD0182_$8#0 ← (byte~) main::toD0182_$3#0 | (byte~) main::toD0182_$7#0 -Inferred type updated to word in (unumber~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -Inferred type updated to byte in (unumber~) init_angle_screen::$8 ← > (word~) init_angle_screen::$7 +Inferred type updated to byte in (unumber~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 +Inferred type updated to byte in (unumber~) init_angle_screen::$6 ← (byte) init_angle_screen::y#2 * (byte) 2 +Inferred type updated to word in (unumber~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 +Inferred type updated to byte in (unumber~) init_angle_screen::$11 ← > (word~) init_angle_screen::$10 +Inferred type updated to byte in (unumber~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 +Inferred type updated to byte in (unumber~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 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 @@ -1337,17 +1417,20 @@ Alias (dword) main::cyclecount#0 = (dword~) main::$5 Alias (byte*) main::BASE_SCREEN#0 = (byte*) main::toD0182_screen#0 (byte*) main::toD0182_screen#1 Alias (byte*) main::BASE_CHARSET#0 = (byte*) main::toD0182_gfx#0 (byte*) main::toD0182_gfx#1 Alias (byte) main::toD0182_return#0 = (byte~) main::toD0182_$8#0 (byte) main::toD0182_return#2 (byte) main::toD0182_return#1 (byte) main::toD0182_return#3 (byte~) main::$7 -Alias (word~) init_angle_screen::$1 = (word~) init_angle_screen::$11 -Alias (signed word) init_angle_screen::xw#0 = (signed word~) init_angle_screen::$2 -Alias (word~) init_angle_screen::$4 = (word~) init_angle_screen::$12 -Alias (signed word) init_angle_screen::yw#0 = (signed word~) init_angle_screen::$5 +Alias (byte*) init_angle_screen::screen_topline#0 = (byte*~) init_angle_screen::$0 +Alias (byte*) init_angle_screen::screen_bottomline#0 = (byte*~) init_angle_screen::$1 +Alias (word~) init_angle_screen::$4 = (word~) init_angle_screen::$17 +Alias (signed word) init_angle_screen::xw#0 = (signed word~) init_angle_screen::$5 +Alias (word~) init_angle_screen::$7 = (word~) init_angle_screen::$18 +Alias (signed word) init_angle_screen::yw#0 = (signed word~) init_angle_screen::$8 Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 -Alias (byte*) init_angle_screen::screen#2 = (byte*) init_angle_screen::screen#3 -Alias (signed byte) init_angle_screen::x#2 = (signed byte) init_angle_screen::x#3 -Alias (signed byte) init_angle_screen::y#2 = (signed byte) init_angle_screen::y#5 (signed byte) init_angle_screen::y#3 -Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$6 -Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$8 -Alias (byte*) init_angle_screen::screen#1 = (byte*) init_angle_screen::screen#6 +Alias (byte*) init_angle_screen::screen_topline#2 = (byte*) init_angle_screen::screen_topline#4 (byte*) init_angle_screen::screen_topline#3 +Alias (byte) init_angle_screen::x#2 = (byte) init_angle_screen::x#3 +Alias (byte*) init_angle_screen::screen_bottomline#2 = (byte*) init_angle_screen::screen_bottomline#4 (byte*) init_angle_screen::screen_bottomline#3 +Alias (byte) init_angle_screen::xb#2 = (byte) init_angle_screen::xb#3 +Alias (byte) init_angle_screen::y#2 = (byte) init_angle_screen::y#5 (byte) init_angle_screen::y#3 +Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$9 +Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$11 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 @@ -1367,7 +1450,9 @@ 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::x#11 Self Phi Eliminated (signed word) atan2_16::y#10 -Self Phi Eliminated (signed byte) init_angle_screen::y#2 +Self Phi Eliminated (byte) init_angle_screen::y#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_topline#2 +Self Phi Eliminated (byte*) init_angle_screen::screen_bottomline#2 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1 Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4 @@ -1381,8 +1466,10 @@ 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 (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#5 (byte*) init_angle_screen::screen#0 -Identical Phi Values (signed byte) init_angle_screen::y#2 (signed byte) init_angle_screen::y#4 +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 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 @@ -1397,8 +1484,8 @@ Simple Condition (bool~) atan2_16::$21 [80] if((signed word) atan2_16::yi#3>=(si 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::$9 [259] if((signed byte) init_angle_screen::x#1!=rangelast(-$13,$14)) goto init_angle_screen::@2 -Simple Condition (bool~) init_angle_screen::$10 [263] if((signed byte) init_angle_screen::y#1!=rangelast(-$c,$c)) goto init_angle_screen::@1 +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 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 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement @@ -1430,8 +1517,9 @@ Constant (const byte*) CHARSET#0 = (byte*) 8192 Constant (const byte*) SCREEN#0 = (byte*) 10240 Constant (const byte*) main::BASE_SCREEN#0 = (byte*) 1024 Constant (const byte*) main::BASE_CHARSET#0 = (byte*) 4096 -Constant (const signed byte) init_angle_screen::y#0 = -$c -Constant (const signed byte) init_angle_screen::x#0 = -$13 +Constant (const byte) init_angle_screen::y#0 = 0 +Constant (const byte) init_angle_screen::x#0 = 0 +Constant (const byte) init_angle_screen::xb#0 = $27 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO#0 Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO#0 @@ -1454,10 +1542,9 @@ 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 [257] init_angle_screen::x#1 ← ++ init_angle_screen::x#2 to ++ -Resolved ranged comparison value [259] if(init_angle_screen::x#1!=rangelast(-$13,$14)) goto init_angle_screen::@2 to (number) $15 -Resolved ranged next value [261] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ -Resolved ranged comparison value [263] if(init_angle_screen::y#1!=rangelast(-$c,$c)) goto init_angle_screen::@1 to (number) $d +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 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 @@ -1471,20 +1558,24 @@ 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 (snumber) $15 in if((signed byte) init_angle_screen::x#1!=(number) $15) goto init_angle_screen::@2 -Adding number conversion cast (snumber) $d in if((signed byte) init_angle_screen::y#1!=(number) $d) goto init_angle_screen::@1 +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 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 -Simplifying constant integer cast $15 +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 +Simplifying constant integer cast 1 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 signed number type (signed byte) $15 -Finalized signed number type (signed byte) $d +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) clock_start::$1 = (byte~) clock_start::$0 (byte~) clock_start::$2 Alias (byte~) clock_start::$6 = (byte~) clock_start::$4 (byte~) clock_start::$7 @@ -1498,6 +1589,8 @@ 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 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 @@ -1508,6 +1601,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 word) main::toD0182_$0#0 = (word)main::BASE_SCREEN#0 Constant (const word) main::toD0182_$4#0 = (word)main::BASE_CHARSET#0 +Constant (const byte*) init_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 @@ -1560,15 +1655,14 @@ 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 [101] (byte~) init_angle_screen::$0 ← (byte)(signed byte) init_angle_screen::x#2 keeping init_angle_screen::x#2 -Inlining Noop Cast [104] (byte~) init_angle_screen::$3 ← (byte)(signed byte) init_angle_screen::y#4 keeping init_angle_screen::y#4 -Successful SSA optimization Pass2NopCastInlining -Inlining Noop Cast [103] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$1 keeping init_angle_screen::xw#0 -Inlining Noop Cast [106] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$4 keeping init_angle_screen::yw#0 +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 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 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 @@ -1582,24 +1676,28 @@ Inlining constant with var siblings (const word) atan2_16::angle#0 Inlining constant with var siblings (const byte) atan2_16::i#0 Inlining constant with var siblings (const byte*) print_word_at::at#0 Inlining constant with var siblings (const byte*) print_word_at::at#1 -Inlining constant with var siblings (const signed byte) init_angle_screen::y#0 -Inlining constant with var siblings (const signed byte) init_angle_screen::x#0 -Inlining constant with var siblings (const byte*) init_angle_screen::screen#0 +Inlining constant with var siblings (const byte) init_angle_screen::y#0 +Inlining constant with var siblings (const byte) init_angle_screen::x#0 +Inlining constant with var siblings (const byte) init_angle_screen::xb#0 +Inlining constant with var siblings (const byte*) init_angle_screen::screen_topline#0 +Inlining constant with var siblings (const byte*) init_angle_screen::screen_bottomline#0 Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0 Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 Constant inlined init_font_hex::proto_hi#0 = (const byte[]) FONT_HEX_PROTO#0 -Constant inlined init_angle_screen::y#0 = (signed byte) -$c -Constant inlined init_angle_screen::x#0 = (signed byte) -$13 +Constant inlined init_angle_screen::y#0 = (byte) 0 +Constant inlined init_angle_screen::x#0 = (byte) 0 Constant inlined $0 = (const byte[]) print_hextab#0 Constant inlined clock_start::$5 = (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Constant inlined atan2_16::angle#0 = (byte) 0 Constant inlined clock_start::$6 = (const byte) CIA_TIMER_CONTROL_START#0 +Constant inlined init_angle_screen::screen_bottomline#0 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c Constant inlined clock_start::$3 = (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET#0 Constant inlined print_dword_at::at#0 = (const byte*) main::BASE_SCREEN#0 Constant inlined init_angle_screen::screen#0 = (const byte*) SCREEN#0 Constant inlined init_font_hex::c1#0 = (byte) 0 Constant inlined atan2_16::$16 = (const byte) CORDIC_ITERATIONS_16#0-(byte) 1 +Constant inlined init_angle_screen::xb#0 = (byte) $27 Constant inlined main::toD0182_$4#0 = (word)(const byte*) main::BASE_CHARSET#0 Constant inlined atan2_16::i#0 = (byte) 0 Constant inlined main::toD0182_$3#0 = >(word)(const byte*) main::BASE_SCREEN#0&(word) $3fff*(byte) 4 @@ -1613,6 +1711,7 @@ Constant inlined clock_start::$1 = (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 Constant inlined main::toD0181_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4 Constant inlined main::toD0181_$7#0 = >(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f Constant inlined init_font_hex::idx#1 = ++(byte) 0 +Constant inlined init_angle_screen::screen_topline#0 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c Constant inlined init_font_hex::idx#0 = (byte) 0 Constant inlined main::toD0182_$0#0 = (word)(const byte*) main::BASE_SCREEN#0 Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 @@ -1669,9 +1768,9 @@ Calls in [main] to init_font_hex:11 clock_start:16 init_angle_screen:18 clock:20 Calls in [print_dword_at] to print_word_at:33 print_word_at:36 Calls in [print_word_at] to print_byte_at:44 print_byte_at:49 Calls in [print_byte_at] to print_char_at:58 print_char_at:64 -Calls in [init_angle_screen] to atan2_16:80 +Calls in [init_angle_screen] to atan2_16:82 -Created 30 initial phi equivalence classes +Created 31 initial phi equivalence classes Coalesced [32] print_word_at::w#4 ← print_word_at::w#0 Coalesced [35] print_word_at::w#5 ← print_word_at::w#1 Coalesced [42] print_byte_at::b#4 ← print_byte_at::b#0 @@ -1682,43 +1781,43 @@ Coalesced [56] print_char_at::ch#3 ← print_char_at::ch#0 Coalesced [57] print_char_at::at#3 ← print_char_at::at#0 Coalesced [62] print_char_at::ch#4 ← print_char_at::ch#1 Coalesced [63] print_char_at::at#4 ← print_char_at::at#1 -Coalesced [74] init_angle_screen::screen#8 ← init_angle_screen::screen#4 -Coalesced [92] init_angle_screen::y#6 ← init_angle_screen::y#1 -Coalesced [93] init_angle_screen::screen#7 ← init_angle_screen::screen#1 -Coalesced [94] init_angle_screen::x#4 ← init_angle_screen::x#1 -Coalesced (already) [95] init_angle_screen::screen#9 ← init_angle_screen::screen#1 -Coalesced [98] atan2_16::yi#12 ← atan2_16::$2 -Coalesced [102] atan2_16::xi#9 ← atan2_16::$7 -Coalesced [104] atan2_16::yi#14 ← atan2_16::yi#0 -Coalesced [105] atan2_16::xi#11 ← atan2_16::xi#0 -Coalesced [108] atan2_16::angle#17 ← atan2_16::angle#12 -Coalesced [113] atan2_16::angle#22 ← atan2_16::angle#4 -Coalesced [117] atan2_16::return#5 ← atan2_16::angle#5 -Coalesced [120] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [121] atan2_16::angle#21 ← atan2_16::angle#1 -Coalesced [129] atan2_16::yi#16 ← atan2_16::yi#2 -Coalesced [130] atan2_16::angle#20 ← atan2_16::angle#3 -Coalesced [131] atan2_16::xi#13 ← atan2_16::xi#2 -Coalesced [135] atan2_16::yi#13 ← atan2_16::yi#7 -Coalesced [136] atan2_16::xi#10 ← atan2_16::xi#7 -Coalesced [137] atan2_16::i#7 ← atan2_16::i#1 -Coalesced [138] atan2_16::angle#16 ← atan2_16::angle#13 -Coalesced (already) [139] atan2_16::angle#18 ← atan2_16::angle#13 -Coalesced [144] atan2_16::yi#15 ← atan2_16::yi#1 -Coalesced [145] atan2_16::angle#19 ← atan2_16::angle#2 -Coalesced [146] atan2_16::xi#12 ← atan2_16::xi#1 -Not coalescing [147] atan2_16::xi#8 ← atan2_16::x#0 -Not coalescing [148] atan2_16::yi#11 ← atan2_16::y#0 -Coalesced [157] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [179] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [180] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [181] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [182] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [183] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [184] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [185] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [186] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 23 phi equivalence classes +Coalesced [102] init_angle_screen::y#6 ← init_angle_screen::y#1 +Coalesced [103] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#1 +Coalesced [104] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#1 +Coalesced [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 [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 Culled Empty Block (label) @3 Culled Empty Block (label) @8 Culled Empty Block (label) @10 @@ -1872,160 +1971,172 @@ init_angle_screen: scope:[init_angle_screen] from main::@3 [49] phi() to:init_angle_screen::@1 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3 - [50] (byte*) init_angle_screen::screen#4 ← phi( init_angle_screen/(const byte*) SCREEN#0 init_angle_screen::@3/(byte*) init_angle_screen::screen#1 ) - [50] (signed byte) init_angle_screen::y#4 ← phi( init_angle_screen/(signed byte) -$c init_angle_screen::@3/(signed byte) init_angle_screen::y#1 ) + [50] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 ) + [50] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 ) + [50] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 ) to:init_angle_screen::@2 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4 - [51] (byte*) init_angle_screen::screen#2 ← phi( init_angle_screen::@1/(byte*) init_angle_screen::screen#4 init_angle_screen::@4/(byte*) init_angle_screen::screen#1 ) - [51] (signed byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(signed byte) -$13 init_angle_screen::@4/(signed byte) init_angle_screen::x#1 ) - [52] (word) init_angle_screen::xw#0 ← (byte)(signed byte) init_angle_screen::x#2 w= (byte) 0 - [53] (word) init_angle_screen::yw#0 ← (byte)(signed byte) init_angle_screen::y#4 w= (byte) 0 - [54] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 - [55] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 - [56] call atan2_16 - [57] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + [51] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 ) + [51] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 ) + [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 + [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 + [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 + [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 + [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 + [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + [59] call atan2_16 + [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 to:init_angle_screen::@4 init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 - [58] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 - [59] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 - [60] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7 - [61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 - [62] (byte*) init_angle_screen::screen#1 ← ++ (byte*) init_angle_screen::screen#2 - [63] (signed byte) init_angle_screen::x#1 ← ++ (signed byte) init_angle_screen::x#2 - [64] if((signed byte) init_angle_screen::x#1!=(signed byte) $15) goto init_angle_screen::@2 + [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 + [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 + [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 + [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 + [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 + [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 + [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 + [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 + [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 + [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 + [72] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 + [73] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2 to:init_angle_screen::@3 init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4 - [65] (signed byte) init_angle_screen::y#1 ← ++ (signed byte) init_angle_screen::y#4 - [66] if((signed byte) init_angle_screen::y#1!=(signed byte) $d) goto init_angle_screen::@1 + [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 + [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 + [76] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 + [77] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 to:init_angle_screen::@return init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 - [67] return + [78] return to:@return atan2_16: scope:[atan2_16] from init_angle_screen::@2 - [68] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 + [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 atan2_16::@2: scope:[atan2_16] from atan2_16 - [69] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 + [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 - [70] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 ) - [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 + [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 ) + [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 - [72] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 + [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 - [73] (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#8 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 - [74] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 ) - [74] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) - [74] (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 ) - [74] (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 ) - [75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 + [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 ) + [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 - [76] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 ) - [77] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 - [78] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 + [87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(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 - [79] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 + [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 - [80] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 ) - [81] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 + [91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(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 - [82] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 + [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 to:atan2_16::@8 atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 - [83] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) + [94] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 ) to:atan2_16::@return atan2_16::@return: scope:[atan2_16] from atan2_16::@8 - [84] return + [95] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 - [85] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 - [86] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 - [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 + [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 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@11 - [88] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 - [89] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 - [90] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 - [91] (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) + [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 - [92] (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 ) - [92] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 ) - [92] (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 ) - [93] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 - [94] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 + [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 to:atan2_16::@10 atan2_16::@13: scope:[atan2_16] from atan2_16::@11 - [95] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 - [96] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 - [97] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 - [98] (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) + [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::@4: scope:[atan2_16] from atan2_16::@3 - [99] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 + [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 - [100] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 + [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 to:atan2_16::@3 clock_start: scope:[clock_start] from main::@1 - [101] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 - [102] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [103] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff - [104] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 - [105] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 + [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 to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start - [106] return + [117] return to:@return init_font_hex: scope:[init_font_hex] from main - [107] phi() + [118] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [108] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [108] (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 ) - [108] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [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 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [109] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [109] (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 ) - [109] (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 ) - [110] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [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 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [111] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [111] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [112] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [113] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [114] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [116] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [117] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [118] if((byte) init_font_hex::i#1!=(byte) 5) goto 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 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [119] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [120] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [121] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [122] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [123] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [124] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [125] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [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 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [126] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [127] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [128] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [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 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [129] return + [140] return to:@return @@ -2094,23 +2205,35 @@ VARIABLE REGISTER WEIGHTS (dword) clock::return#2 4.0 (void()) clock_start() (void()) init_angle_screen((byte*) init_angle_screen::screen) -(word~) init_angle_screen::$7 202.0 +(word~) init_angle_screen::$10 202.0 +(byte~) init_angle_screen::$12 202.0 +(byte~) init_angle_screen::$13 202.0 +(byte~) init_angle_screen::$14 202.0 +(byte~) init_angle_screen::$2 202.0 +(byte~) init_angle_screen::$3 202.0 +(byte~) init_angle_screen::$6 202.0 (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 202.0 +(byte) init_angle_screen::ang_w#0 72.14285714285714 (word) init_angle_screen::angle_w (word) init_angle_screen::angle_w#0 202.0 (byte*) init_angle_screen::screen -(byte*) init_angle_screen::screen#1 42.599999999999994 -(byte*) init_angle_screen::screen#2 28.545454545454547 -(byte*) init_angle_screen::screen#4 22.0 -(signed byte) init_angle_screen::x -(signed byte) init_angle_screen::x#1 151.5 -(signed byte) init_angle_screen::x#2 16.833333333333332 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#1 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 8.959999999999999 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#1 5.5 +(byte*) init_angle_screen::screen_topline#5 9.333333333333334 +(byte) init_angle_screen::x +(byte) init_angle_screen::x#1 101.0 +(byte) init_angle_screen::x#2 25.25 +(byte) init_angle_screen::xb +(byte) init_angle_screen::xb#1 101.0 +(byte) init_angle_screen::xb#2 19.238095238095237 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 50.5 -(signed byte) init_angle_screen::y -(signed byte) init_angle_screen::y#1 16.5 -(signed byte) init_angle_screen::y#4 1.4666666666666666 +(word) init_angle_screen::xw#0 33.666666666666664 +(byte) init_angle_screen::y +(byte) init_angle_screen::y#1 16.5 +(byte) init_angle_screen::y#4 4.730769230769231 (signed word) init_angle_screen::yw (word) init_angle_screen::yw#0 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) @@ -2211,8 +2334,10 @@ Initial phi equivalence classes [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] [ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] [ init_angle_screen::x#2 init_angle_screen::x#1 ] -[ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#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::i#2 atan2_16::i#1 ] @@ -2232,14 +2357,20 @@ Added variable print_dword_at::dw#0 to zero page equivalence class [ print_dword Added variable print_byte_at::$0 to zero page equivalence class [ print_byte_at::$0 ] Added variable print_byte_at::$2 to zero page equivalence class [ print_byte_at::$2 ] Added variable clock::return#0 to zero page equivalence class [ clock::return#0 ] +Added variable init_angle_screen::$2 to zero page equivalence class [ init_angle_screen::$2 ] +Added variable init_angle_screen::$3 to zero page equivalence class [ init_angle_screen::$3 ] Added variable init_angle_screen::xw#0 to zero page equivalence class [ init_angle_screen::xw#0 ] +Added variable init_angle_screen::$6 to zero page equivalence class [ init_angle_screen::$6 ] Added variable init_angle_screen::yw#0 to zero page equivalence class [ init_angle_screen::yw#0 ] Added variable atan2_16::x#0 to zero page equivalence class [ atan2_16::x#0 ] Added variable atan2_16::y#0 to zero page equivalence class [ atan2_16::y#0 ] Added variable atan2_16::return#2 to zero page equivalence class [ atan2_16::return#2 ] Added variable init_angle_screen::angle_w#0 to zero page equivalence class [ init_angle_screen::angle_w#0 ] -Added variable init_angle_screen::$7 to zero page equivalence class [ init_angle_screen::$7 ] +Added variable init_angle_screen::$10 to zero page equivalence class [ init_angle_screen::$10 ] Added variable init_angle_screen::ang_w#0 to zero page equivalence class [ init_angle_screen::ang_w#0 ] +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 ] @@ -2256,8 +2387,10 @@ Complete equivalence classes [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] [ init_angle_screen::y#4 init_angle_screen::y#1 ] +[ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +[ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] [ init_angle_screen::x#2 init_angle_screen::x#1 ] -[ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#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::i#2 atan2_16::i#1 ] @@ -2277,14 +2410,20 @@ Complete equivalence classes [ print_byte_at::$0 ] [ print_byte_at::$2 ] [ clock::return#0 ] +[ init_angle_screen::$2 ] +[ init_angle_screen::$3 ] [ init_angle_screen::xw#0 ] +[ init_angle_screen::$6 ] [ init_angle_screen::yw#0 ] [ atan2_16::x#0 ] [ atan2_16::y#0 ] [ atan2_16::return#2 ] [ init_angle_screen::angle_w#0 ] -[ init_angle_screen::$7 ] +[ init_angle_screen::$10 ] [ init_angle_screen::ang_w#0 ] +[ init_angle_screen::$12 ] +[ init_angle_screen::$13 ] +[ init_angle_screen::$14 ] [ atan2_16::xd#0 ] [ atan2_16::yd#0 ] [ atan2_16::$24 ] @@ -2300,43 +2439,51 @@ Allocated zp ZP_WORD:7 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at:: Allocated zp ZP_BYTE:9 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] Allocated zp ZP_WORD:10 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Allocated zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Allocated zp ZP_BYTE:13 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Allocated zp ZP_WORD:14 [ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#1 ] -Allocated zp ZP_WORD:16 [ 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:18 [ 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_BYTE:20 [ atan2_16::i#2 atan2_16::i#1 ] -Allocated zp ZP_WORD:21 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] -Allocated zp ZP_WORD:23 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] -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_DWORD:35 [ clock::return#2 ] -Allocated zp ZP_DWORD:39 [ main::$4 ] -Allocated zp ZP_DWORD:43 [ main::cyclecount#0 ] -Allocated zp ZP_DWORD:47 [ print_dword_at::dw#0 ] -Allocated zp ZP_BYTE:51 [ print_byte_at::$0 ] -Allocated zp ZP_BYTE:52 [ print_byte_at::$2 ] -Allocated zp ZP_DWORD:53 [ clock::return#0 ] -Allocated zp ZP_WORD:57 [ init_angle_screen::xw#0 ] -Allocated zp ZP_WORD:59 [ init_angle_screen::yw#0 ] -Allocated zp ZP_WORD:61 [ atan2_16::x#0 ] -Allocated zp ZP_WORD:63 [ atan2_16::y#0 ] -Allocated zp ZP_WORD:65 [ atan2_16::return#2 ] -Allocated zp ZP_WORD:67 [ init_angle_screen::angle_w#0 ] -Allocated zp ZP_WORD:69 [ init_angle_screen::$7 ] -Allocated zp ZP_BYTE:71 [ init_angle_screen::ang_w#0 ] -Allocated zp ZP_WORD:72 [ atan2_16::xd#0 ] -Allocated zp ZP_WORD:74 [ atan2_16::yd#0 ] -Allocated zp ZP_BYTE:76 [ atan2_16::$24 ] -Allocated zp ZP_BYTE:77 [ atan2_16::$23 ] -Allocated zp ZP_BYTE:78 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:79 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:80 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:81 [ init_font_hex::idx#3 ] +Allocated zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +Allocated zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] +Allocated zp ZP_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_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 ] INITIAL ASM //SEG0 File Comments @@ -2389,10 +2536,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 = $27 - .label cyclecount = $2b + .label _4 = $2a + .label cyclecount = $2e //SEG11 [5] call init_font_hex - //SEG12 [107] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [118] 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] @@ -2489,9 +2636,9 @@ main: { } //SEG37 print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($2f) dw) +// print_dword_at(dword zeropage($32) dw) print_dword_at: { - .label dw = $2f + .label dw = $32 //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 @@ -2581,8 +2728,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 = $33 - .label _2 = $34 + .label _0 = $36 + .label _2 = $37 .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 @@ -2658,8 +2805,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 = $35 - .label return_2 = $23 + .label return = $38 + .label return_2 = $26 //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -2682,157 +2829,225 @@ clock: { } //SEG93 init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. -// The actual value stored is distance*2 to increase precision -// init_angle_screen(byte* zeropage($e) screen) +// Utilizes symmetry around the center init_angle_screen: { - .label _7 = $45 - .label xw = $39 - .label yw = $3b - .label angle_w = $43 - .label ang_w = $47 - .label screen = $e - .label x = $d + .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 x = $11 + .label xb = $12 + .label screen_topline = $d + .label screen_bottomline = $f .label y = $c //SEG94 [50] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] b1_from_init_angle_screen: - //SEG95 [50] phi (byte*) init_angle_screen::screen#4 = (const byte*) SCREEN#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN - sta screen+1 - //SEG96 [50] phi (signed byte) init_angle_screen::y#4 = (signed byte) -$c [phi:init_angle_screen->init_angle_screen::@1#1] -- vbsz1=vbsc1 - lda #-$c + //SEG95 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 + //SEG96 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_topline+1 + //SEG97 [50] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 sta y jmp b1 - //SEG97 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + //SEG98 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] b1_from_b3: - //SEG98 [50] phi (byte*) init_angle_screen::screen#4 = (byte*) init_angle_screen::screen#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy - //SEG99 [50] phi (signed byte) init_angle_screen::y#4 = (signed byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG99 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG100 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG101 [50] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 - //SEG100 init_angle_screen::@1 + //SEG102 init_angle_screen::@1 b1: - //SEG101 [51] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + //SEG103 [51] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] b2_from_b1: - //SEG102 [51] phi (byte*) init_angle_screen::screen#2 = (byte*) init_angle_screen::screen#4 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- register_copy - //SEG103 [51] phi (signed byte) init_angle_screen::x#2 = (signed byte) -$13 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbsz1=vbsc1 - lda #-$13 + //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] -- vbuz1=vbuc1 + lda #0 sta x jmp b2 - //SEG104 [51] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + //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: - //SEG105 [51] phi (byte*) init_angle_screen::screen#2 = (byte*) init_angle_screen::screen#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy - //SEG106 [51] phi (signed byte) init_angle_screen::x#2 = (signed byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + //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 jmp b2 - //SEG107 init_angle_screen::@2 + //SEG109 init_angle_screen::@2 b2: - //SEG108 [52] (word) init_angle_screen::xw#0 ← (byte)(signed byte) init_angle_screen::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG110 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda x + asl + sta _2 + //SEG111 [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuz1=vbuc1_minus_vbuz2 + lda #$27 + sec + sbc _2 + sta _3 + //SEG112 [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _3 ldy #0 sta xw+1 sty xw - //SEG109 [53] (word) init_angle_screen::yw#0 ← (byte)(signed byte) init_angle_screen::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG113 [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda y + asl + sta _6 + //SEG114 [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + lda _6 ldy #0 sta yw+1 sty yw - //SEG110 [54] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 -- vwsz1=vwsz2 + //SEG115 [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 -- vwsz1=vwsz2 lda xw sta atan2_16.x lda xw+1 sta atan2_16.x+1 - //SEG111 [55] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 -- vwsz1=vwsz2 + //SEG116 [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 -- vwsz1=vwsz2 lda yw sta atan2_16.y lda yw+1 sta atan2_16.y+1 - //SEG112 [56] call atan2_16 + //SEG117 [59] call atan2_16 jsr atan2_16 - //SEG113 [57] (word) atan2_16::return#2 ← (word) atan2_16::return#0 -- vwuz1=vwuz2 + //SEG118 [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 -- vwuz1=vwuz2 lda atan2_16.return sta atan2_16.return_2 lda atan2_16.return+1 sta atan2_16.return_2+1 jmp b4 - //SEG114 init_angle_screen::@4 + //SEG119 init_angle_screen::@4 b4: - //SEG115 [58] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 -- vwuz1=vwuz2 + //SEG120 [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 -- vwuz1=vwuz2 lda atan2_16.return_2 sta angle_w lda atan2_16.return_2+1 sta angle_w+1 - //SEG116 [59] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz2_plus_vbuc1 + //SEG121 [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz2_plus_vbuc1 lda #$80 clc adc angle_w - sta _7 + sta _10 lda #0 adc angle_w+1 - sta _7+1 - //SEG117 [60] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7 -- vbuz1=_hi_vwuz2 - lda _7+1 + sta _10+1 + //SEG122 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 sta ang_w - //SEG118 [61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 -- _deref_pbuz1=vbuz2 + //SEG123 [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_plus_vbuz2 + lax ang_w + axs #-[$80] + stx _12 + //SEG124 [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _12 + ldy x + sta (screen_topline),y + //SEG125 [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 -- vbuz1=vbuc1_minus_vbuz2 + lda #$80 + sec + sbc ang_w + sta _13 + //SEG126 [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _13 + ldy x + sta (screen_bottomline),y + //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuz1=_neg_vbuz2 lda ang_w - ldy #0 - sta (screen),y - //SEG119 [62] (byte*) init_angle_screen::screen#1 ← ++ (byte*) init_angle_screen::screen#2 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG120 [63] (signed byte) init_angle_screen::x#1 ← ++ (signed byte) init_angle_screen::x#2 -- vbsz1=_inc_vbsz1 + eor #$ff + clc + adc #1 + sta _14 + //SEG128 [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuz3 + lda _14 + ldy xb + sta (screen_topline),y + //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + ldy xb + sta (screen_bottomline),y + //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG121 [64] if((signed byte) init_angle_screen::x#1!=(signed byte) $15) goto init_angle_screen::@2 -- vbsz1_neq_vbsc1_then_la1 - lda #$15 - cmp x - bne b2_from_b4 + //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 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b2_from_b4 jmp b3 - //SEG122 init_angle_screen::@3 + //SEG133 init_angle_screen::@3 b3: - //SEG123 [65] (signed byte) init_angle_screen::y#1 ← ++ (signed byte) init_angle_screen::y#4 -- vbsz1=_inc_vbsz1 + //SEG134 [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG135 [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG136 [76] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG124 [66] if((signed byte) init_angle_screen::y#1!=(signed byte) $d) goto init_angle_screen::@1 -- vbsz1_neq_vbsc1_then_la1 + //SEG137 [77] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1_from_b3 jmp breturn - //SEG125 init_angle_screen::@return + //SEG138 init_angle_screen::@return breturn: - //SEG126 [67] return + //SEG139 [78] return rts } -//SEG127 atan2_16 +//SEG140 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($3d) x, signed word zeropage($3f) y) +// atan2_16(signed word zeropage($43) x, signed word zeropage($45) y) atan2_16: { - .label _2 = $10 - .label _7 = $12 - .label _23 = $4d - .label _24 = $4c - .label yi = $10 - .label xi = $12 - .label xd = $48 - .label yd = $4a - .label angle = $17 - .label angle_2 = $15 - .label angle_3 = $15 - .label i = $14 - .label return = $17 - .label x = $3d - .label y = $3f - .label return_2 = $41 - .label angle_6 = $15 - .label angle_12 = $15 - .label angle_13 = $15 - //SEG128 [68] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + .label _2 = $13 + .label _7 = $15 + .label _23 = $56 + .label _24 = $55 + .label yi = $13 + .label xi = $15 + .label xd = $51 + .label yd = $53 + .label angle = $1a + .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 angle_6 = $18 + .label angle_12 = $18 + .label angle_13 = $18 + //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 jmp b2 - //SEG129 atan2_16::@2 + //SEG142 atan2_16::@2 b2: - //SEG130 [69] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + //SEG143 [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc y @@ -2840,20 +3055,20 @@ atan2_16: { lda #0 sbc y+1 sta _2+1 - //SEG131 [70] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + //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: - //SEG132 [70] 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#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 - //SEG133 atan2_16::@3 + //SEG146 atan2_16::@3 b3: - //SEG134 [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + //SEG147 [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda x+1 bpl b4 jmp b5 - //SEG135 atan2_16::@5 + //SEG148 atan2_16::@5 b5: - //SEG136 [72] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + //SEG149 [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc x @@ -2861,54 +3076,54 @@ atan2_16: { lda #0 sbc x+1 sta _7+1 - //SEG137 [73] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + //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: - //SEG138 [73] 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#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 - //SEG139 atan2_16::@6 + //SEG152 atan2_16::@6 b6: - //SEG140 [74] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG153 [85] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] b10_from_b6: - //SEG141 [74] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + //SEG154 [85] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 lda #0 sta angle_12 lda #0 sta angle_12+1 - //SEG142 [74] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 + //SEG155 [85] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 lda #0 sta i - //SEG143 [74] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy - //SEG144 [74] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + //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 - //SEG145 atan2_16::@10 + //SEG158 atan2_16::@10 b10: - //SEG146 [75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + //SEG159 [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda yi+1 bne b11 lda yi bne b11 - //SEG147 [76] 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::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] b12_from_b10: b12_from_b14: - //SEG148 [76] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //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 jmp b12 - //SEG149 atan2_16::@12 + //SEG162 atan2_16::@12 b12: - //SEG150 [77] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + //SEG163 [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz2_ror_1 lda angle_6+1 lsr sta angle+1 lda angle_6 ror sta angle - //SEG151 [78] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + //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 - //SEG152 atan2_16::@16 + //SEG165 atan2_16::@16 b16: - //SEG153 [79] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + //SEG166 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc angle @@ -2916,20 +3131,20 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG154 [80] 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::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] b7_from_b12: b7_from_b16: - //SEG155 [80] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //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 jmp b7 - //SEG156 atan2_16::@7 + //SEG169 atan2_16::@7 b7: - //SEG157 [81] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + //SEG170 [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda y+1 bpl b8_from_b7 jmp b9 - //SEG158 atan2_16::@9 + //SEG171 atan2_16::@9 b9: - //SEG159 [82] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + //SEG172 [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc angle @@ -2937,21 +3152,21 @@ atan2_16: { lda #0 sbc angle+1 sta angle+1 - //SEG160 [83] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG173 [94] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] b8_from_b7: b8_from_b9: - //SEG161 [83] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG174 [94] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy jmp b8 - //SEG162 atan2_16::@8 + //SEG175 atan2_16::@8 b8: jmp breturn - //SEG163 atan2_16::@return + //SEG176 atan2_16::@return breturn: - //SEG164 [84] return + //SEG177 [95] return rts - //SEG165 atan2_16::@11 + //SEG178 atan2_16::@11 b11: - //SEG166 [85] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda xi sta xd @@ -2967,7 +3182,7 @@ atan2_16: { dey bne !- !e: - //SEG167 [86] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda yi sta yd @@ -2983,13 +3198,13 @@ atan2_16: { dey bne !- !e: - //SEG168 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG181 [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 lda yi+1 bpl b13 jmp b15 - //SEG169 atan2_16::@15 + //SEG182 atan2_16::@15 b15: - //SEG170 [88] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG183 [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -2997,7 +3212,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG171 [89] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG184 [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -3005,11 +3220,11 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG172 [90] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG185 [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _24 - //SEG173 [91] (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 + //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 ldy _24 sec lda angle_3 @@ -3018,31 +3233,31 @@ atan2_16: { lda angle_3+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle_3+1 - //SEG174 [92] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] + //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: - //SEG175 [92] 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 - //SEG176 [92] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG177 [92] 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 + //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 - //SEG178 atan2_16::@14 + //SEG191 atan2_16::@14 b14: - //SEG179 [93] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG192 [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG180 [94] 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 + //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 - //SEG181 [74] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] + //SEG194 [85] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] b10_from_b14: - //SEG182 [74] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG183 [74] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG184 [74] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG185 [74] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //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 jmp b10 - //SEG186 atan2_16::@13 + //SEG199 atan2_16::@13 b13: - //SEG187 [95] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG200 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -3050,7 +3265,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG188 [96] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG201 [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -3058,11 +3273,11 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG189 [97] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG202 [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _23 - //SEG190 [98] (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 + //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 ldy _23 clc lda angle_2 @@ -3072,35 +3287,35 @@ atan2_16: { adc CORDIC_ATAN2_ANGLES_16+1,y sta angle_2+1 jmp b14_from_b13 - //SEG191 atan2_16::@4 + //SEG204 atan2_16::@4 b4: - //SEG192 [99] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG205 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG193 atan2_16::@1 + //SEG206 atan2_16::@1 b1: - //SEG194 [100] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG207 [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG195 clock_start +//SEG208 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: { - //SEG196 [101] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + //SEG209 [112] *((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 - //SEG197 [102] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + //SEG210 [113] *((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 - //SEG198 [103] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + //SEG211 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -3109,98 +3324,98 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - //SEG199 [104] *((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 + //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 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - //SEG200 [105] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + //SEG213 [116] *((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 - //SEG201 clock_start::@return + //SEG214 clock_start::@return breturn: - //SEG202 [106] return + //SEG215 [117] return rts } -//SEG203 init_font_hex +//SEG216 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($1c) charset) +// init_font_hex(byte* zeropage($1f) charset) init_font_hex: { - .label _0 = $4e - .label _1 = $4f - .label _2 = $50 - .label idx = $22 - .label i = $21 - .label idx_3 = $51 - .label proto_lo = $1e - .label charset = $1c - .label c1 = $20 - .label proto_hi = $19 - .label c = $1b - //SEG204 [108] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .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] b1_from_init_font_hex: - //SEG205 [108] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG218 [119] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG206 [108] 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 + //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 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG207 [108] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG220 [119] 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 - //SEG208 [108] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG221 [119] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG209 [108] 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 - //SEG210 [108] 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 - //SEG211 [108] 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 + //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 jmp b1 - //SEG212 init_font_hex::@1 + //SEG225 init_font_hex::@1 b1: - //SEG213 [109] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG226 [120] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG214 [109] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG227 [120] 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 - //SEG215 [109] 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 + //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 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG216 [109] 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 + //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 jmp b2 - //SEG217 [109] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG230 [120] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG218 [109] 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 - //SEG219 [109] 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 - //SEG220 [109] 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 + //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 jmp b2 - //SEG221 init_font_hex::@2 + //SEG234 init_font_hex::@2 b2: - //SEG222 [110] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG235 [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG223 [111] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG236 [122] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG224 [111] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG237 [122] 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 - //SEG225 [111] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG238 [122] 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 - //SEG226 [111] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG239 [122] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG227 [111] 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 - //SEG228 [111] 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 + //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 jmp b3 - //SEG229 init_font_hex::@3 + //SEG242 init_font_hex::@3 b3: - //SEG230 [112] (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 + //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 ldy i lda (proto_hi),y asl @@ -3208,43 +3423,43 @@ init_font_hex: { asl asl sta _0 - //SEG231 [113] (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 + //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 ldy i lda (proto_lo),y asl sta _1 - //SEG232 [114] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG245 [125] (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 - //SEG233 [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG246 [126] *((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 - //SEG234 [116] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG247 [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG235 [117] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG248 [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG236 [118] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG249 [129] 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 - //SEG237 init_font_hex::@4 + //SEG250 init_font_hex::@4 b4: - //SEG238 [119] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG251 [130] *((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 - //SEG239 [120] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG252 [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG240 [121] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG253 [132] *((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 - //SEG241 [122] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG254 [133] (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 @@ -3252,7 +3467,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG242 [123] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG255 [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3260,16 +3475,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG243 [124] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG256 [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG244 [125] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG257 [136] 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 - //SEG245 init_font_hex::@5 + //SEG258 init_font_hex::@5 b5: - //SEG246 [126] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG259 [137] (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 @@ -3277,19 +3492,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG247 [127] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG260 [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG248 [128] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG261 [139] 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 - //SEG249 init_font_hex::@return + //SEG262 init_font_hex::@return breturn: - //SEG250 [129] return + //SEG263 [140] return rts } -//SEG251 File Data +//SEG264 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), ... @@ -3318,67 +3533,81 @@ 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:52 [ print_byte_at::$2 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:55 [ print_byte_at::$2 ] Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a -Statement [52] (word) init_angle_screen::xw#0 ← (byte)(signed byte) init_angle_screen::x#2 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Statement [53] (word) init_angle_screen::yw#0 ← (byte)(signed byte) init_angle_screen::y#4 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y -Statement [54] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ init_angle_screen::x#2 init_angle_screen::x#1 ] -Statement [55] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [57] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::return#2 ] ) always clobbers reg byte a -Statement [58] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a -Statement [59] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::$7 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::$7 ] ) always clobbers reg byte a -Statement [60] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a -Statement [61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 ] ) always clobbers reg byte y -Statement [68] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [69] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a -Statement [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a -Statement [72] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a -Statement [75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ atan2_16::i#2 atan2_16::i#1 ] -Statement [77] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [78] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [79] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a -Statement [81] 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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a -Statement [82] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [85] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [86] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [87] 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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [88] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [89] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [90] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [91] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [95] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [96] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [97] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [98] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [99] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [100] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [101] *((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 [102] *((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 [103] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [104] *((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 [105] *((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 [110] *((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 [112] (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 [113] (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:78 [ init_font_hex::$0 ] -Statement [119] *((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 [121] *((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 [122] (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 [123] (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 [126] (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 +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Statement [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] +Statement [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:77 [ 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 ] +Statement [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte a reg byte y +Statement [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ atan2_16::i#2 atan2_16::i#1 ] +Statement [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [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 [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 @@ -3397,51 +3626,62 @@ Statement [39] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) Statement [40] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1 [ print_byte_at::$2 print_char_at::at#1 ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32 [ print_dword_at::dw#0 print_byte_at::$2 print_char_at::at#1 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32 [ print_byte_at::$2 print_char_at::at#1 ] ) always clobbers reg byte a Statement [45] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2 [ ] ( main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:38 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:38 [ print_word_at::w#2 print_word_at::at#2 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:38 [ print_dword_at::dw#0 print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:38 [ print_byte_at::b#2 print_byte_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:29::print_char_at:42 [ print_dword_at::dw#0 print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:29::print_char_at:42 [ print_word_at::w#2 print_word_at::at#2 ] main:2::print_dword_at:17::print_word_at:22::print_byte_at:32::print_char_at:42 [ print_dword_at::dw#0 ] main:2::print_dword_at:17::print_word_at:24::print_byte_at:32::print_char_at:42 [ ] ) always clobbers reg byte a reg byte y Statement [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) [ clock::return#0 ] ( main:2::clock:12 [ clock::return#0 ] ) always clobbers reg byte a -Statement [52] (word) init_angle_screen::xw#0 ← (byte)(signed byte) init_angle_screen::x#2 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 ] ) always clobbers reg byte a reg byte y -Statement [53] (word) init_angle_screen::yw#0 ← (byte)(signed byte) init_angle_screen::y#4 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte a reg byte y -Statement [54] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a -Statement [55] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [57] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::return#2 ] ) always clobbers reg byte a -Statement [58] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a -Statement [59] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::$7 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::$7 ] ) always clobbers reg byte a -Statement [60] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a -Statement [61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 ] ) always clobbers reg byte y -Statement [68] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a -Statement [69] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a -Statement [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a -Statement [72] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a -Statement [75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 ] ) always clobbers reg byte a -Statement [77] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [78] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a -Statement [79] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a -Statement [81] 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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a -Statement [82] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a -Statement [85] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [86] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [87] 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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [88] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [89] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [90] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [91] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [95] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [96] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [97] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [98] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::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 [99] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#8 ] ) always clobbers reg byte a -Statement [100] (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:56 [ init_angle_screen::y#4 init_angle_screen::x#2 init_angle_screen::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#11 ] ) always clobbers reg byte a -Statement [101] *((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 [102] *((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 [103] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a -Statement [104] *((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 [105] *((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 [110] *((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 [112] (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 [113] (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 [119] *((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 [121] *((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 [122] (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 [123] (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 [126] (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 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$2 ] ) always clobbers reg byte a +Statement [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ) always clobbers reg byte a +Statement [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 ] ) always clobbers reg byte y +Statement [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$6 ] ) always clobbers reg byte a +Statement [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::yw#0 ] ) always clobbers reg byte y +Statement [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a +Statement [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ) always clobbers reg byte a +Statement [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ) always clobbers reg byte a +Statement [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$10 ] ) always clobbers reg byte a +Statement [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte a +Statement [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$12 ] ) always clobbers reg byte a +Statement [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$13 ] ) always clobbers reg byte a +Statement [67] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$14 ] ) always clobbers reg byte a +Statement [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ) always clobbers reg byte y +Statement [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 ] ) always clobbers reg byte a reg byte y +Statement [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_topline#1 ] ) always clobbers reg byte a +Statement [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( main:2::init_angle_screen:10 [ init_angle_screen::y#4 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a +Statement [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a +Statement [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a +Statement [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a +Statement [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a +Statement [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a +Statement [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a +Statement [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] ) always clobbers reg byte a +Statement [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::init_angle_screen:10::atan2_16:59 [ init_angle_screen::y#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_bottomline#5 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] ) always clobbers reg byte a +Statement [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 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 , @@ -3449,115 +3689,137 @@ Potential registers zp ZP_WORD:7 [ print_byte_at::at#2 print_byte_at::at#0 print Potential registers zp ZP_BYTE:9 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , Potential registers zp ZP_WORD:10 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] : zp ZP_WORD:10 , Potential registers zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] : zp ZP_BYTE:12 , reg byte x , -Potential registers zp ZP_BYTE:13 [ init_angle_screen::x#2 init_angle_screen::x#1 ] : zp ZP_BYTE:13 , reg byte x , -Potential registers zp ZP_WORD:14 [ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#1 ] : zp ZP_WORD:14 , -Potential registers zp ZP_WORD:16 [ 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:16 , -Potential registers zp ZP_WORD:18 [ 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:18 , -Potential registers zp ZP_BYTE:20 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:21 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:21 , -Potential registers zp ZP_WORD:23 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : 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_DWORD:35 [ clock::return#2 ] : zp ZP_DWORD:35 , -Potential registers zp ZP_DWORD:39 [ main::$4 ] : zp ZP_DWORD:39 , -Potential registers zp ZP_DWORD:43 [ main::cyclecount#0 ] : zp ZP_DWORD:43 , -Potential registers zp ZP_DWORD:47 [ print_dword_at::dw#0 ] : zp ZP_DWORD:47 , -Potential registers zp ZP_BYTE:51 [ print_byte_at::$0 ] : zp ZP_BYTE:51 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:52 [ print_byte_at::$2 ] : zp ZP_BYTE:52 , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:53 [ clock::return#0 ] : zp ZP_DWORD:53 , -Potential registers zp ZP_WORD:57 [ init_angle_screen::xw#0 ] : zp ZP_WORD:57 , -Potential registers zp ZP_WORD:59 [ init_angle_screen::yw#0 ] : zp ZP_WORD:59 , -Potential registers zp ZP_WORD:61 [ atan2_16::x#0 ] : zp ZP_WORD:61 , -Potential registers zp ZP_WORD:63 [ atan2_16::y#0 ] : zp ZP_WORD:63 , -Potential registers zp ZP_WORD:65 [ atan2_16::return#2 ] : zp ZP_WORD:65 , -Potential registers zp ZP_WORD:67 [ init_angle_screen::angle_w#0 ] : zp ZP_WORD:67 , -Potential registers zp ZP_WORD:69 [ init_angle_screen::$7 ] : zp ZP_WORD:69 , -Potential registers zp ZP_BYTE:71 [ init_angle_screen::ang_w#0 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:72 [ atan2_16::xd#0 ] : zp ZP_WORD:72 , -Potential registers zp ZP_WORD:74 [ atan2_16::yd#0 ] : zp ZP_WORD:74 , -Potential registers zp ZP_BYTE:76 [ atan2_16::$24 ] : zp ZP_BYTE:76 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:77 [ atan2_16::$23 ] : zp ZP_BYTE:77 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:78 [ init_font_hex::$0 ] : zp ZP_BYTE:78 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:79 [ init_font_hex::$1 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:80 [ init_font_hex::$2 ] : zp ZP_BYTE:80 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:81 [ init_font_hex::idx#3 ] : zp ZP_BYTE:81 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:13 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] : zp ZP_WORD:13 , +Potential registers zp ZP_WORD:15 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] : zp ZP_WORD:15 , +Potential registers zp ZP_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_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 , REGISTER UPLIFT SCOPES -Uplift Scope [atan2_16] 7,706.67: zp ZP_WORD:21 [ 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:16 [ 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:18 [ 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:76 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:77 [ atan2_16::$23 ] 1,930.5: zp ZP_BYTE:20 [ atan2_16::i#2 atan2_16::i#1 ] 1,501.5: zp ZP_WORD:74 [ atan2_16::yd#0 ] 600.6: zp ZP_WORD:72 [ atan2_16::xd#0 ] 202: zp ZP_WORD:65 [ atan2_16::return#2 ] 50: zp ZP_WORD:23 [ 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:61 [ atan2_16::x#0 ] 3.63: zp ZP_WORD:63 [ 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:79 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:80 [ 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:78 [ init_font_hex::$0 ] 202: zp ZP_BYTE:81 [ 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_WORD:67 [ init_angle_screen::angle_w#0 ] 202: zp ZP_WORD:69 [ init_angle_screen::$7 ] 202: zp ZP_BYTE:71 [ init_angle_screen::ang_w#0 ] 168.33: zp ZP_BYTE:13 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 93.15: zp ZP_WORD:14 [ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#1 ] 50.5: zp ZP_WORD:57 [ init_angle_screen::xw#0 ] 50.5: zp ZP_WORD:59 [ init_angle_screen::yw#0 ] 17.97: zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +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 [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:51 [ print_byte_at::$0 ] 2: zp ZP_BYTE:52 [ 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:54 [ print_byte_at::$0 ] 2: zp ZP_BYTE:55 [ 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:39 [ main::$4 ] 4: zp ZP_DWORD:43 [ main::cyclecount#0 ] -Uplift Scope [clock] 4: zp ZP_DWORD:35 [ clock::return#2 ] 1.33: zp ZP_DWORD:53 [ clock::return#0 ] -Uplift Scope [print_dword_at] 2: zp ZP_DWORD:47 [ print_dword_at::dw#0 ] +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 [clock_start] Uplift Scope [] -Uplifting [atan2_16] best 395766 combination zp ZP_WORD:21 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:16 [ 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:18 [ 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:20 [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:74 [ atan2_16::yd#0 ] zp ZP_WORD:72 [ atan2_16::xd#0 ] zp ZP_WORD:65 [ atan2_16::return#2 ] zp ZP_WORD:23 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:61 [ atan2_16::x#0 ] zp ZP_WORD:63 [ atan2_16::y#0 ] -Uplifting [init_font_hex] best 376766 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:78 [ init_font_hex::$0 ] zp ZP_BYTE:81 [ 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 ] +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 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [init_angle_screen] best 375166 combination zp ZP_WORD:67 [ init_angle_screen::angle_w#0 ] zp ZP_WORD:69 [ init_angle_screen::$7 ] reg byte a [ init_angle_screen::ang_w#0 ] reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp ZP_WORD:14 [ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#1 ] zp ZP_WORD:57 [ init_angle_screen::xw#0 ] zp ZP_WORD:59 [ init_angle_screen::yw#0 ] zp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Uplifting [print_char_at] best 375159 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 375151 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 375151 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 375151 combination zp ZP_DWORD:39 [ main::$4 ] zp ZP_DWORD:43 [ main::cyclecount#0 ] -Uplifting [clock] best 375151 combination zp ZP_DWORD:35 [ clock::return#2 ] zp ZP_DWORD:53 [ clock::return#0 ] -Uplifting [print_dword_at] best 375151 combination zp ZP_DWORD:47 [ print_dword_at::dw#0 ] -Uplifting [clock_start] best 375151 combination -Uplifting [] best 375151 combination -Attempting to uplift remaining variables inzp ZP_BYTE:20 [ atan2_16::i#2 atan2_16::i#1 ] -Uplifting [atan2_16] best 375151 combination zp ZP_BYTE:20 [ atan2_16::i#2 atan2_16::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 375151 combination zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:78 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 375151 combination zp ZP_BYTE:78 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:81 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 374551 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 374551 combination zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +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 ] +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 ] +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 ] +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 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ init_angle_screen::y#4 init_angle_screen::y#1 ] -Uplifting [init_angle_screen] best 374551 combination zp ZP_BYTE:12 [ 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 374551 combination zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#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 ] 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 374551 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 382056 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:21 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:23 [ 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:35 [ clock::return#2 ] ] with [ zp ZP_DWORD:39 [ main::$4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:35 [ clock::return#2 main::$4 ] ] with [ zp ZP_DWORD:53 [ clock::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:43 [ main::cyclecount#0 ] ] with [ zp ZP_DWORD:47 [ print_dword_at::dw#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:57 [ init_angle_screen::xw#0 ] ] with [ zp ZP_WORD:61 [ atan2_16::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:59 [ init_angle_screen::yw#0 ] ] with [ zp ZP_WORD:63 [ atan2_16::y#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:67 [ init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ 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:65 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:35 [ clock::return#2 main::$4 clock::return#0 ] ] with [ zp ZP_DWORD:43 [ main::cyclecount#0 print_dword_at::dw#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ 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:69 [ init_angle_screen::$7 ] ] - 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 ] ] 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 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:14) zp ZP_WORD:10 [ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#1 ] -Allocated (was zp ZP_WORD:16) zp ZP_WORD:12 [ 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:18) zp ZP_WORD:14 [ 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:20) zp ZP_BYTE:16 [ atan2_16::i#2 atan2_16::i#1 ] -Allocated (was zp ZP_WORD:21) zp ZP_WORD:17 [ 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::$7 ] -Allocated (was zp ZP_WORD:25) zp ZP_WORD:19 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:21 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:28) zp ZP_WORD:22 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:30) zp ZP_WORD:24 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:32) zp ZP_BYTE:26 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:34) zp ZP_BYTE:27 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_DWORD:35) zp ZP_DWORD:28 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] -Allocated (was zp ZP_WORD:57) zp ZP_WORD:32 [ init_angle_screen::xw#0 atan2_16::x#0 ] -Allocated (was zp ZP_WORD:59) zp ZP_WORD:34 [ init_angle_screen::yw#0 atan2_16::y#0 ] -Allocated (was zp ZP_WORD:72) zp ZP_WORD:36 [ atan2_16::xd#0 ] -Allocated (was zp ZP_WORD:74) zp ZP_WORD:38 [ atan2_16::yd#0 ] -Allocated (was zp ZP_BYTE:78) zp ZP_BYTE:40 [ init_font_hex::$0 ] +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_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 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -3610,10 +3872,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 = $1c - .label cyclecount = $1c + .label _4 = $1f + .label cyclecount = $1f //SEG11 [5] call init_font_hex - //SEG12 [107] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [118] 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] @@ -3686,9 +3948,9 @@ main: { } //SEG37 print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($1c) dw) +// print_dword_at(dword zeropage($1f) dw) print_dword_at: { - .label dw = $1c + .label dw = $1f //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 @@ -3844,7 +4106,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 = $1c + .label return = $1f //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -3867,127 +4129,184 @@ clock: { } //SEG93 init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. -// The actual value stored is distance*2 to increase precision -// init_angle_screen(byte* zeropage($a) screen) +// Utilizes symmetry around the center init_angle_screen: { - .label _7 = $11 - .label xw = $20 - .label yw = $22 - .label angle_w = $11 - .label screen = $a + .label _10 = $14 + .label xw = $23 + .label yw = $25 + .label angle_w = $14 + .label ang_w = $27 + .label xb = $e + .label screen_topline = $a + .label screen_bottomline = $c .label y = 9 //SEG94 [50] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] b1_from_init_angle_screen: - //SEG95 [50] phi (byte*) init_angle_screen::screen#4 = (const byte*) SCREEN#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN - sta screen+1 - //SEG96 [50] phi (signed byte) init_angle_screen::y#4 = (signed byte) -$c [phi:init_angle_screen->init_angle_screen::@1#1] -- vbsz1=vbsc1 - lda #-$c + //SEG95 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 + //SEG96 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_topline+1 + //SEG97 [50] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 sta y jmp b1 - //SEG97 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + //SEG98 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] b1_from_b3: - //SEG98 [50] phi (byte*) init_angle_screen::screen#4 = (byte*) init_angle_screen::screen#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy - //SEG99 [50] phi (signed byte) init_angle_screen::y#4 = (signed byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG99 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG100 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG101 [50] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy jmp b1 - //SEG100 init_angle_screen::@1 + //SEG102 init_angle_screen::@1 b1: - //SEG101 [51] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + //SEG103 [51] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] b2_from_b1: - //SEG102 [51] phi (byte*) init_angle_screen::screen#2 = (byte*) init_angle_screen::screen#4 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- register_copy - //SEG103 [51] phi (signed byte) init_angle_screen::x#2 = (signed byte) -$13 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbsxx=vbsc1 - ldx #-$13 + //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 jmp b2 - //SEG104 [51] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] + //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: - //SEG105 [51] phi (byte*) init_angle_screen::screen#2 = (byte*) init_angle_screen::screen#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy - //SEG106 [51] phi (signed byte) init_angle_screen::x#2 = (signed byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy + //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 jmp b2 - //SEG107 init_angle_screen::@2 + //SEG109 init_angle_screen::@2 b2: - //SEG108 [52] (word) init_angle_screen::xw#0 ← (byte)(signed byte) init_angle_screen::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 - ldy #0 + //SEG110 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa + asl + //SEG111 [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG112 [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 sta xw+1 sty xw - //SEG109 [53] (word) init_angle_screen::yw#0 ← (byte)(signed byte) init_angle_screen::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG113 [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y + asl + //SEG114 [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 ldy #0 sta yw+1 sty yw - //SEG110 [54] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 - //SEG111 [55] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 - //SEG112 [56] call atan2_16 + //SEG115 [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG116 [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG117 [59] call atan2_16 jsr atan2_16 - //SEG113 [57] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + //SEG118 [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 jmp b4 - //SEG114 init_angle_screen::@4 + //SEG119 init_angle_screen::@4 b4: - //SEG115 [58] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 - //SEG116 [59] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + //SEG120 [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG121 [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 lda #$80 clc - adc _7 - sta _7 + adc _10 + sta _10 bcc !+ - inc _7+1 + inc _10+1 !: - //SEG117 [60] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7 -- vbuaa=_hi_vwuz1 - lda _7+1 - //SEG118 [61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 -- _deref_pbuz1=vbuaa - ldy #0 - sta (screen),y - //SEG119 [62] (byte*) init_angle_screen::screen#1 ← ++ (byte*) init_angle_screen::screen#2 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG120 [63] (signed byte) init_angle_screen::x#1 ← ++ (signed byte) init_angle_screen::x#2 -- vbsxx=_inc_vbsxx + //SEG122 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG123 [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 + clc + adc ang_w + //SEG124 [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuxx=vbuaa + stx $ff + ldy $ff + 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 + sta (screen_bottomline),y + //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + lda ang_w + eor #$ff + clc + adc #1 + //SEG128 [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + ldy xb + sta (screen_bottomline),y + //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuxx=_inc_vbuxx inx - //SEG121 [64] if((signed byte) init_angle_screen::x#1!=(signed byte) $15) goto init_angle_screen::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 - bne b2_from_b4 + //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 + bcc b2_from_b4 jmp b3 - //SEG122 init_angle_screen::@3 + //SEG133 init_angle_screen::@3 b3: - //SEG123 [65] (signed byte) init_angle_screen::y#1 ← ++ (signed byte) init_angle_screen::y#4 -- vbsz1=_inc_vbsz1 + //SEG134 [74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG135 [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG136 [76] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG124 [66] if((signed byte) init_angle_screen::y#1!=(signed byte) $d) goto init_angle_screen::@1 -- vbsz1_neq_vbsc1_then_la1 + //SEG137 [77] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1_from_b3 jmp breturn - //SEG125 init_angle_screen::@return + //SEG138 init_angle_screen::@return breturn: - //SEG126 [67] return + //SEG139 [78] return rts } -//SEG127 atan2_16 +//SEG140 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($20) x, signed word zeropage($22) y) +// atan2_16(signed word zeropage($23) x, signed word zeropage($25) y) atan2_16: { - .label _2 = $c - .label _7 = $e - .label yi = $c - .label xi = $e - .label xd = $24 - .label yd = $26 - .label angle = $11 - .label i = $10 - .label return = $11 - .label x = $20 - .label y = $22 - //SEG128 [68] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + .label _2 = $f + .label _7 = $11 + .label yi = $f + .label xi = $11 + .label xd = $28 + .label yd = $2a + .label angle = $14 + .label i = $13 + .label return = $14 + .label x = $23 + .label y = $25 + //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 jmp b2 - //SEG129 atan2_16::@2 + //SEG142 atan2_16::@2 b2: - //SEG130 [69] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + //SEG143 [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc y @@ -3995,20 +4314,20 @@ atan2_16: { lda #0 sbc y+1 sta _2+1 - //SEG131 [70] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] + //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: - //SEG132 [70] 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#11 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp b3 - //SEG133 atan2_16::@3 + //SEG146 atan2_16::@3 b3: - //SEG134 [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + //SEG147 [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda x+1 bpl b4 jmp b5 - //SEG135 atan2_16::@5 + //SEG148 atan2_16::@5 b5: - //SEG136 [72] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + //SEG149 [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc x @@ -4016,50 +4335,50 @@ atan2_16: { lda #0 sbc x+1 sta _7+1 - //SEG137 [73] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] + //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: - //SEG138 [73] 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#8 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp b6 - //SEG139 atan2_16::@6 + //SEG152 atan2_16::@6 b6: - //SEG140 [74] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG153 [85] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] b10_from_b6: - //SEG141 [74] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + //SEG154 [85] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 lda #0 sta angle lda #0 sta angle+1 - //SEG142 [74] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 + //SEG155 [85] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 lda #0 sta i - //SEG143 [74] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy - //SEG144 [74] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy + //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 - //SEG145 atan2_16::@10 + //SEG158 atan2_16::@10 b10: - //SEG146 [75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + //SEG159 [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda yi+1 bne b11 lda yi bne b11 - //SEG147 [76] 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::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] b12_from_b10: b12_from_b14: - //SEG148 [76] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy + //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 jmp b12 - //SEG149 atan2_16::@12 + //SEG162 atan2_16::@12 b12: - //SEG150 [77] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG163 [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr angle+1 ror angle - //SEG151 [78] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + //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 - //SEG152 atan2_16::@16 + //SEG165 atan2_16::@16 b16: - //SEG153 [79] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + //SEG166 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc angle @@ -4067,20 +4386,20 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG154 [80] 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::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] b7_from_b12: b7_from_b16: - //SEG155 [80] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy + //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 jmp b7 - //SEG156 atan2_16::@7 + //SEG169 atan2_16::@7 b7: - //SEG157 [81] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + //SEG170 [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda y+1 bpl b8_from_b7 jmp b9 - //SEG158 atan2_16::@9 + //SEG171 atan2_16::@9 b9: - //SEG159 [82] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + //SEG172 [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc angle @@ -4088,21 +4407,21 @@ atan2_16: { lda #0 sbc angle+1 sta angle+1 - //SEG160 [83] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG173 [94] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] b8_from_b7: b8_from_b9: - //SEG161 [83] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG174 [94] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy jmp b8 - //SEG162 atan2_16::@8 + //SEG175 atan2_16::@8 b8: jmp breturn - //SEG163 atan2_16::@return + //SEG176 atan2_16::@return breturn: - //SEG164 [84] return + //SEG177 [95] return rts - //SEG165 atan2_16::@11 + //SEG178 atan2_16::@11 b11: - //SEG166 [85] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda xi sta xd @@ -4118,7 +4437,7 @@ atan2_16: { dey bne !- !e: - //SEG167 [86] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda yi sta yd @@ -4134,13 +4453,13 @@ atan2_16: { dey bne !- !e: - //SEG168 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG181 [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 lda yi+1 bpl b13 jmp b15 - //SEG169 atan2_16::@15 + //SEG182 atan2_16::@15 b15: - //SEG170 [88] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG183 [99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 lda xi sec sbc yd @@ -4148,7 +4467,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG171 [89] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG184 [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -4156,10 +4475,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG172 [90] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG185 [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG173 [91] (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 + //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 tay sec lda angle @@ -4168,31 +4487,31 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG174 [92] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] + //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: - //SEG175 [92] 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 - //SEG176 [92] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG177 [92] 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 + //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 - //SEG178 atan2_16::@14 + //SEG191 atan2_16::@14 b14: - //SEG179 [93] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG192 [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG180 [94] 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 + //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 - //SEG181 [74] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] + //SEG194 [85] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] b10_from_b14: - //SEG182 [74] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG183 [74] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG184 [74] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG185 [74] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //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 jmp b10 - //SEG186 atan2_16::@13 + //SEG199 atan2_16::@13 b13: - //SEG187 [95] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG200 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -4200,7 +4519,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG188 [96] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG201 [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -4208,10 +4527,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG189 [97] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG202 [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG190 [98] (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 + //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 tay clc lda angle @@ -4221,35 +4540,35 @@ atan2_16: { adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 jmp b14_from_b13 - //SEG191 atan2_16::@4 + //SEG204 atan2_16::@4 b4: - //SEG192 [99] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG205 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6_from_b4 - //SEG193 atan2_16::@1 + //SEG206 atan2_16::@1 b1: - //SEG194 [100] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG207 [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3_from_b1 } -//SEG195 clock_start +//SEG208 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: { - //SEG196 [101] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + //SEG209 [112] *((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 - //SEG197 [102] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + //SEG210 [113] *((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 - //SEG198 [103] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + //SEG211 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -4258,93 +4577,93 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - //SEG199 [104] *((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 + //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 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - //SEG200 [105] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + //SEG213 [116] *((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 - //SEG201 clock_start::@return + //SEG214 clock_start::@return breturn: - //SEG202 [106] return + //SEG215 [117] return rts } -//SEG203 init_font_hex +//SEG216 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($16) charset) +// init_font_hex(byte* zeropage($19) charset) init_font_hex: { - .label _0 = $28 - .label idx = $1b - .label proto_lo = $18 - .label charset = $16 - .label c1 = $1a - .label proto_hi = $13 - .label c = $15 - //SEG204 [108] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .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] b1_from_init_font_hex: - //SEG205 [108] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG218 [119] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG206 [108] 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 + //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 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG207 [108] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG220 [119] 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 - //SEG208 [108] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG221 [119] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG209 [108] 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 - //SEG210 [108] 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 - //SEG211 [108] 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 + //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 jmp b1 - //SEG212 init_font_hex::@1 + //SEG225 init_font_hex::@1 b1: - //SEG213 [109] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG226 [120] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG214 [109] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG227 [120] 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 - //SEG215 [109] 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 + //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 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG216 [109] 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 + //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 jmp b2 - //SEG217 [109] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG230 [120] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG218 [109] 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 - //SEG219 [109] 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 - //SEG220 [109] 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 + //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 jmp b2 - //SEG221 init_font_hex::@2 + //SEG234 init_font_hex::@2 b2: - //SEG222 [110] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG235 [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG223 [111] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG236 [122] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG224 [111] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG237 [122] 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 - //SEG225 [111] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG238 [122] 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 - //SEG226 [111] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG239 [122] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG227 [111] 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 - //SEG228 [111] 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 + //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 jmp b3 - //SEG229 init_font_hex::@3 + //SEG242 init_font_hex::@3 b3: - //SEG230 [112] (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 + //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 txa tay lda (proto_hi),y @@ -4353,37 +4672,37 @@ init_font_hex: { asl asl sta _0 - //SEG231 [113] (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 + //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 txa tay lda (proto_lo),y asl - //SEG232 [114] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG245 [125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG233 [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG246 [126] *((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 - //SEG234 [116] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG247 [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG235 [117] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG248 [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG236 [118] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG249 [129] 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 - //SEG237 init_font_hex::@4 + //SEG250 init_font_hex::@4 b4: - //SEG238 [119] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG251 [130] *((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 - //SEG239 [120] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG252 [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG240 [121] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG253 [132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG241 [122] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG254 [133] (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 @@ -4391,7 +4710,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG242 [123] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG255 [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4399,16 +4718,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG243 [124] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG256 [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG244 [125] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG257 [136] 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 - //SEG245 init_font_hex::@5 + //SEG258 init_font_hex::@5 b5: - //SEG246 [126] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG259 [137] (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 @@ -4416,19 +4735,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG247 [127] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG260 [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG248 [128] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG261 [139] 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 - //SEG249 init_font_hex::@return + //SEG262 init_font_hex::@return breturn: - //SEG250 [129] return + //SEG263 [140] return rts } -//SEG251 File Data +//SEG264 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), ... @@ -4484,6 +4803,7 @@ Removing instruction jmp b5 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 +Removing instruction ldy xb Removing instruction lda #0 Removing instruction lda #0 Replacing instruction ldy #0 with TAY @@ -4584,9 +4904,9 @@ Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [339] beq b12 to bne -Fixing long branch [226] bpl b1 to bmi -Fixing long branch [238] bpl b4 to bmi +Fixing long branch [382] beq b12 to bne +Fixing long branch [269] bpl b1 to bmi +Fixing long branch [281] bpl b4 to bmi FINAL SYMBOL TABLE (label) @1 @@ -4623,10 +4943,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:12 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:15 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:14 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:17 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -4645,77 +4965,89 @@ FINAL SYMBOL TABLE (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:17 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:17 364.0 -(word) atan2_16::angle#13 angle zp ZP_WORD:17 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:17 2004.0 +(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#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 +(word) atan2_16::angle#4 angle zp ZP_WORD:20 4.0 +(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:16 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:16 429.0 +(byte) atan2_16::i#1 i zp ZP_BYTE:19 1501.5 +(byte) atan2_16::i#2 i zp ZP_BYTE:19 429.0 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:17 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:17 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:20 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:20 202.0 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:32 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:35 3.8928571428571437 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:36 600.5999999999999 +(signed word) atan2_16::xd#0 xd zp ZP_WORD:40 600.5999999999999 (signed word) atan2_16::xi -(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#2 xi zp ZP_WORD:14 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:14 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:14 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:14 4.0 +(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::y -(signed word) atan2_16::y#0 y zp ZP_WORD:34 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:37 3.633333333333334 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:38 1501.5 +(signed word) atan2_16::yd#0 yd zp ZP_WORD:42 1501.5 (signed word) atan2_16::yi -(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#11 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 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:12 1001.0 +(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 (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:28 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:28 4.0 +(dword) clock::return#0 return zp ZP_DWORD:31 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:31 4.0 (void()) clock_start() (label) clock_start::@return (void()) init_angle_screen((byte*) init_angle_screen::screen) -(word~) init_angle_screen::$7 $7 zp ZP_WORD:17 202.0 +(word~) init_angle_screen::$10 $10 zp ZP_WORD:20 202.0 +(byte~) init_angle_screen::$12 reg byte a 202.0 +(byte~) init_angle_screen::$13 reg byte a 202.0 +(byte~) init_angle_screen::$14 reg byte a 202.0 +(byte~) init_angle_screen::$2 reg byte a 202.0 +(byte~) init_angle_screen::$3 reg byte a 202.0 +(byte~) init_angle_screen::$6 reg byte a 202.0 (label) init_angle_screen::@1 (label) init_angle_screen::@2 (label) init_angle_screen::@3 (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 reg byte a 202.0 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:39 72.14285714285714 (word) init_angle_screen::angle_w -(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:17 202.0 +(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:20 202.0 (byte*) init_angle_screen::screen -(byte*) init_angle_screen::screen#1 screen zp ZP_WORD:10 42.599999999999994 -(byte*) init_angle_screen::screen#2 screen zp ZP_WORD:10 28.545454545454547 -(byte*) init_angle_screen::screen#4 screen zp ZP_WORD:10 22.0 -(signed byte) init_angle_screen::x -(signed byte) init_angle_screen::x#1 reg byte x 151.5 -(signed byte) init_angle_screen::x#2 reg byte x 16.833333333333332 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:12 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:12 8.959999999999999 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:10 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:10 9.333333333333334 +(byte) init_angle_screen::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::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 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:32 50.5 -(signed byte) init_angle_screen::y -(signed byte) init_angle_screen::y#1 y zp ZP_BYTE:9 16.5 -(signed byte) init_angle_screen::y#4 y zp ZP_BYTE:9 1.4666666666666666 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:35 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:34 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:37 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:40 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:44 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 @@ -4725,30 +5057,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:21 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:21 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:26 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:26 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:22 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:22 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:22 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:27 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:27 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:19 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:19 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:24 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:24 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() -(dword~) main::$4 $4 zp ZP_DWORD:28 4.0 +(dword~) main::$4 $4 zp ZP_DWORD:31 4.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -4760,7 +5092,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:28 4.0 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:31 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -4817,7 +5149,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:28 2.0 +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:31 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) @@ -4836,37 +5168,45 @@ zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:7 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] zp ZP_BYTE:9 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +zp ZP_WORD:10 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +zp ZP_WORD:12 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_WORD:10 [ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#1 ] -zp ZP_WORD:12 [ 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:14 [ 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:16 [ atan2_16::i#2 atan2_16::i#1 ] -zp ZP_WORD:17 [ 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::$7 ] -zp ZP_WORD:19 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:21 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:22 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:24 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:26 [ init_font_hex::c1#4 init_font_hex::c1#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_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 x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:27 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_DWORD:28 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +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 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] -zp ZP_WORD:32 [ init_angle_screen::xw#0 atan2_16::x#0 ] -zp ZP_WORD:34 [ init_angle_screen::yw#0 atan2_16::y#0 ] -reg byte a [ init_angle_screen::ang_w#0 ] -zp ZP_WORD:36 [ atan2_16::xd#0 ] -zp ZP_WORD:38 [ atan2_16::yd#0 ] +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 ] +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 ] +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:40 [ init_font_hex::$0 ] +zp ZP_BYTE:44 [ 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: 347462 +Score: 354667 //SEG0 File Comments // Calculate the angle to the center of the screen - and show it using font-hex @@ -4909,10 +5249,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 = $1c - .label cyclecount = $1c + .label _4 = $1f + .label cyclecount = $1f //SEG11 [5] call init_font_hex - //SEG12 [107] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [118] 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 @@ -4963,9 +5303,9 @@ main: { } //SEG37 print_dword_at // Print a dword as HEX at a specific position -// print_dword_at(dword zeropage($1c) dw) +// print_dword_at(dword zeropage($1f) dw) print_dword_at: { - .label dw = $1c + .label dw = $1f //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 @@ -5101,7 +5441,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 = $1c + .label return = $1f //SEG90 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec @@ -5122,112 +5462,168 @@ clock: { } //SEG93 init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. -// The actual value stored is distance*2 to increase precision -// init_angle_screen(byte* zeropage($a) screen) +// Utilizes symmetry around the center init_angle_screen: { - .label _7 = $11 - .label xw = $20 - .label yw = $22 - .label angle_w = $11 - .label screen = $a + .label _10 = $14 + .label xw = $23 + .label yw = $25 + .label angle_w = $14 + .label ang_w = $27 + .label xb = $e + .label screen_topline = $a + .label screen_bottomline = $c .label y = 9 //SEG94 [50] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] - //SEG95 [50] phi (byte*) init_angle_screen::screen#4 = (const byte*) SCREEN#0 [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 - lda #SCREEN - sta screen+1 - //SEG96 [50] phi (signed byte) init_angle_screen::y#4 = (signed byte) -$c [phi:init_angle_screen->init_angle_screen::@1#1] -- vbsz1=vbsc1 - lda #-$c + //SEG95 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_bottomline+1 + //SEG96 [50] phi (byte*) init_angle_screen::screen_topline#5 = (const byte*) SCREEN#0+(word)(number) $28*(number) $c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 + lda #SCREEN+$28*$c + sta screen_topline+1 + //SEG97 [50] phi (byte) init_angle_screen::y#4 = (byte) 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 + lda #0 sta y - //SEG97 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] - //SEG98 [50] phi (byte*) init_angle_screen::screen#4 = (byte*) init_angle_screen::screen#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy - //SEG99 [50] phi (signed byte) init_angle_screen::y#4 = (signed byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy - //SEG100 init_angle_screen::@1 + //SEG98 [50] phi from init_angle_screen::@3 to init_angle_screen::@1 [phi:init_angle_screen::@3->init_angle_screen::@1] + //SEG99 [50] phi (byte*) init_angle_screen::screen_bottomline#5 = (byte*) init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#0] -- register_copy + //SEG100 [50] phi (byte*) init_angle_screen::screen_topline#5 = (byte*) init_angle_screen::screen_topline#1 [phi:init_angle_screen::@3->init_angle_screen::@1#1] -- register_copy + //SEG101 [50] phi (byte) init_angle_screen::y#4 = (byte) init_angle_screen::y#1 [phi:init_angle_screen::@3->init_angle_screen::@1#2] -- register_copy + //SEG102 init_angle_screen::@1 b1: - //SEG101 [51] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] - //SEG102 [51] phi (byte*) init_angle_screen::screen#2 = (byte*) init_angle_screen::screen#4 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- register_copy - //SEG103 [51] phi (signed byte) init_angle_screen::x#2 = (signed byte) -$13 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbsxx=vbsc1 - ldx #-$13 - //SEG104 [51] phi from init_angle_screen::@4 to init_angle_screen::@2 [phi:init_angle_screen::@4->init_angle_screen::@2] - //SEG105 [51] phi (byte*) init_angle_screen::screen#2 = (byte*) init_angle_screen::screen#1 [phi:init_angle_screen::@4->init_angle_screen::@2#0] -- register_copy - //SEG106 [51] phi (signed byte) init_angle_screen::x#2 = (signed byte) init_angle_screen::x#1 [phi:init_angle_screen::@4->init_angle_screen::@2#1] -- register_copy - //SEG107 init_angle_screen::@2 + //SEG103 [51] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] + //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 + //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: - //SEG108 [52] (word) init_angle_screen::xw#0 ← (byte)(signed byte) init_angle_screen::x#2 w= (byte) 0 -- vwuz1=vbuxx_word_vbuc1 - ldy #0 + //SEG110 [52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa + asl + //SEG111 [53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2 -- vbuaa=vbuc1_minus_vbuaa + eor #$ff + clc + adc #$27+1 + //SEG112 [54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 + ldy #0 sta xw+1 sty xw - //SEG109 [53] (word) init_angle_screen::yw#0 ← (byte)(signed byte) init_angle_screen::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 + //SEG113 [55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y + asl + //SEG114 [56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0 -- vwuz1=vbuaa_word_vbuc1 sta yw+1 sty yw - //SEG110 [54] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 - //SEG111 [55] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 - //SEG112 [56] call atan2_16 + //SEG115 [57] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 + //SEG116 [58] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 + //SEG117 [59] call atan2_16 jsr atan2_16 - //SEG113 [57] (word) atan2_16::return#2 ← (word) atan2_16::return#0 - //SEG114 init_angle_screen::@4 - //SEG115 [58] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 - //SEG116 [59] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 + //SEG118 [60] (word) atan2_16::return#2 ← (word) atan2_16::return#0 + //SEG119 init_angle_screen::@4 + //SEG120 [61] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 + //SEG121 [62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 lda #$80 clc - adc _7 - sta _7 + adc _10 + sta _10 bcc !+ - inc _7+1 + inc _10+1 !: - //SEG117 [60] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7 -- vbuaa=_hi_vwuz1 - lda _7+1 - //SEG118 [61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0 -- _deref_pbuz1=vbuaa - ldy #0 - sta (screen),y - //SEG119 [62] (byte*) init_angle_screen::screen#1 ← ++ (byte*) init_angle_screen::screen#2 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG120 [63] (signed byte) init_angle_screen::x#1 ← ++ (signed byte) init_angle_screen::x#2 -- vbsxx=_inc_vbsxx + //SEG122 [63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10 -- vbuz1=_hi_vwuz2 + lda _10+1 + sta ang_w + //SEG123 [64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 + lda #$80 + clc + adc ang_w + //SEG124 [65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12 -- pbuz1_derefidx_vbuxx=vbuaa + stx $ff + ldy $ff + 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 + sta (screen_bottomline),y + //SEG127 [68] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 + lda ang_w + eor #$ff + clc + adc #1 + //SEG128 [69] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG129 [70] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda ang_w + sta (screen_bottomline),y + //SEG130 [71] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 -- vbuxx=_inc_vbuxx inx - //SEG121 [64] if((signed byte) init_angle_screen::x#1!=(signed byte) $15) goto init_angle_screen::@2 -- vbsxx_neq_vbsc1_then_la1 - cpx #$15 - bne b2 - //SEG122 init_angle_screen::@3 - //SEG123 [65] (signed byte) init_angle_screen::y#1 ← ++ (signed byte) init_angle_screen::y#4 -- vbsz1=_inc_vbsz1 + //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 + 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 + lda screen_topline + sec + sbc #<$28 + sta screen_topline + lda screen_topline+1 + sbc #>$28 + sta screen_topline+1 + //SEG135 [75] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_bottomline + sta screen_bottomline + bcc !+ + inc screen_bottomline+1 + !: + //SEG136 [76] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4 -- vbuz1=_inc_vbuz1 inc y - //SEG124 [66] if((signed byte) init_angle_screen::y#1!=(signed byte) $d) goto init_angle_screen::@1 -- vbsz1_neq_vbsc1_then_la1 + //SEG137 [77] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp y bne b1 - //SEG125 init_angle_screen::@return - //SEG126 [67] return + //SEG138 init_angle_screen::@return + //SEG139 [78] return rts } -//SEG127 atan2_16 +//SEG140 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($20) x, signed word zeropage($22) y) +// atan2_16(signed word zeropage($23) x, signed word zeropage($25) y) atan2_16: { - .label _2 = $c - .label _7 = $e - .label yi = $c - .label xi = $e - .label xd = $24 - .label yd = $26 - .label angle = $11 - .label i = $10 - .label return = $11 - .label x = $20 - .label y = $22 - //SEG128 [68] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 + .label _2 = $f + .label _7 = $11 + .label yi = $f + .label xi = $11 + .label xd = $28 + .label yd = $2a + .label angle = $14 + .label i = $13 + .label return = $14 + .label x = $23 + .label y = $25 + //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+ jmp b1 !b1: - //SEG129 atan2_16::@2 - //SEG130 [69] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 + //SEG142 atan2_16::@2 + //SEG143 [80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc y @@ -5235,17 +5631,17 @@ atan2_16: { lda #0 sbc y+1 sta _2+1 - //SEG131 [70] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] - //SEG132 [70] 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 - //SEG133 atan2_16::@3 + //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 + //SEG146 atan2_16::@3 b3: - //SEG134 [71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 + //SEG147 [82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda x+1 bmi !b4+ jmp b4 !b4: - //SEG135 atan2_16::@5 - //SEG136 [72] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 + //SEG148 atan2_16::@5 + //SEG149 [83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc x @@ -5253,38 +5649,38 @@ atan2_16: { lda #0 sbc x+1 sta _7+1 - //SEG137 [73] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] - //SEG138 [73] 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 - //SEG139 atan2_16::@6 + //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 + //SEG152 atan2_16::@6 b6: - //SEG140 [74] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] - //SEG141 [74] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 + //SEG153 [85] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] + //SEG154 [85] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 lda #0 sta angle sta angle+1 - //SEG142 [74] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 + //SEG155 [85] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 sta i - //SEG143 [74] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy - //SEG144 [74] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy - //SEG145 atan2_16::@10 + //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 b10: - //SEG146 [75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 + //SEG159 [86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda yi+1 bne b11 lda yi bne b11 - //SEG147 [76] phi from atan2_16::@10 atan2_16::@14 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12] - //SEG148 [76] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@14->atan2_16::@12#0] -- register_copy - //SEG149 atan2_16::@12 + //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 + //SEG162 atan2_16::@12 b12: - //SEG150 [77] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG163 [88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr angle+1 ror angle - //SEG151 [78] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 + //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 - //SEG152 atan2_16::@16 - //SEG153 [79] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 + //SEG165 atan2_16::@16 + //SEG166 [90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc angle @@ -5292,15 +5688,15 @@ atan2_16: { lda #>$8000 sbc angle+1 sta angle+1 - //SEG154 [80] phi from atan2_16::@12 atan2_16::@16 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7] - //SEG155 [80] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@16->atan2_16::@7#0] -- register_copy - //SEG156 atan2_16::@7 + //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 + //SEG169 atan2_16::@7 b7: - //SEG157 [81] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 + //SEG170 [92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda y+1 bpl b8 - //SEG158 atan2_16::@9 - //SEG159 [82] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 + //SEG171 atan2_16::@9 + //SEG172 [93] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc angle @@ -5308,16 +5704,16 @@ atan2_16: { lda #0 sbc angle+1 sta angle+1 - //SEG160 [83] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] - //SEG161 [83] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy - //SEG162 atan2_16::@8 + //SEG173 [94] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] + //SEG174 [94] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy + //SEG175 atan2_16::@8 b8: - //SEG163 atan2_16::@return - //SEG164 [84] return + //SEG176 atan2_16::@return + //SEG177 [95] return rts - //SEG165 atan2_16::@11 + //SEG178 atan2_16::@11 b11: - //SEG166 [85] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda xi sta xd @@ -5333,7 +5729,7 @@ atan2_16: { dey bne !- !e: - //SEG167 [86] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2 -- vwsz1=vwsz2_ror_vbuz3 + //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 lda yi sta yd @@ -5349,11 +5745,11 @@ atan2_16: { dey bne !- !e: - //SEG168 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 + //SEG181 [98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13 -- vwsz1_ge_0_then_la1 lda yi+1 bpl b13 - //SEG169 atan2_16::@15 - //SEG170 [88] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_minus_vwsz2 + //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 lda xi sec sbc yd @@ -5361,7 +5757,7 @@ atan2_16: { lda xi+1 sbc yd+1 sta xi+1 - //SEG171 [89] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG184 [100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_plus_vwsz2 lda yi clc adc xd @@ -5369,10 +5765,10 @@ atan2_16: { lda yi+1 adc xd+1 sta yi+1 - //SEG172 [90] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG185 [101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG173 [91] (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 + //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 tay sec lda angle @@ -5381,29 +5777,29 @@ atan2_16: { lda angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 - //SEG174 [92] phi from atan2_16::@13 atan2_16::@15 to atan2_16::@14 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14] - //SEG175 [92] 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 - //SEG176 [92] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@13/atan2_16::@15->atan2_16::@14#1] -- register_copy - //SEG177 [92] 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 - //SEG178 atan2_16::@14 + //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: - //SEG179 [93] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 + //SEG192 [104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG180 [94] 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 + //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 bne !b12+ jmp b12 !b12: - //SEG181 [74] phi from atan2_16::@14 to atan2_16::@10 [phi:atan2_16::@14->atan2_16::@10] - //SEG182 [74] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@14->atan2_16::@10#0] -- register_copy - //SEG183 [74] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@14->atan2_16::@10#1] -- register_copy - //SEG184 [74] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#7 [phi:atan2_16::@14->atan2_16::@10#2] -- register_copy - //SEG185 [74] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#7 [phi:atan2_16::@14->atan2_16::@10#3] -- register_copy + //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 jmp b10 - //SEG186 atan2_16::@13 + //SEG199 atan2_16::@13 b13: - //SEG187 [95] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 + //SEG200 [106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0 -- vwsz1=vwsz1_plus_vwsz2 lda xi clc adc yd @@ -5411,7 +5807,7 @@ atan2_16: { lda xi+1 adc yd+1 sta xi+1 - //SEG188 [96] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 + //SEG201 [107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0 -- vwsz1=vwsz1_minus_vwsz2 lda yi sec sbc xd @@ -5419,10 +5815,10 @@ atan2_16: { lda yi+1 sbc xd+1 sta yi+1 - //SEG189 [97] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG202 [108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda i asl - //SEG190 [98] (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 + //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 tay clc lda angle @@ -5432,35 +5828,35 @@ atan2_16: { adc CORDIC_ATAN2_ANGLES_16+1,y sta angle+1 jmp b14 - //SEG191 atan2_16::@4 + //SEG204 atan2_16::@4 b4: - //SEG192 [99] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 + //SEG205 [110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 lda x sta xi lda x+1 sta xi+1 jmp b6 - //SEG193 atan2_16::@1 + //SEG206 atan2_16::@1 b1: - //SEG194 [100] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 + //SEG207 [111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 lda y sta yi lda y+1 sta yi+1 jmp b3 } -//SEG195 clock_start +//SEG208 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: { - //SEG196 [101] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 -- _deref_pbuc1=vbuc2 + //SEG209 [112] *((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 - //SEG197 [102] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 -- _deref_pbuc1=vbuc2 + //SEG210 [113] *((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 - //SEG198 [103] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 + //SEG211 [114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -5469,79 +5865,79 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 - //SEG199 [104] *((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 + //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 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL - //SEG200 [105] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0 -- _deref_pbuc1=vbuc2 + //SEG213 [116] *((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 - //SEG201 clock_start::@return - //SEG202 [106] return + //SEG214 clock_start::@return + //SEG215 [117] return rts } -//SEG203 init_font_hex +//SEG216 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($16) charset) +// init_font_hex(byte* zeropage($19) charset) init_font_hex: { - .label _0 = $28 - .label idx = $1b - .label proto_lo = $18 - .label charset = $16 - .label c1 = $1a - .label proto_hi = $13 - .label c = $15 - //SEG204 [108] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG205 [108] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .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 lda #0 sta c - //SEG206 [108] 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 + //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 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG207 [108] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG220 [119] 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 - //SEG208 [108] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG209 [108] 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 - //SEG210 [108] 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 - //SEG211 [108] 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 - //SEG212 init_font_hex::@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 b1: - //SEG213 [109] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG214 [109] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //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 lda #0 sta c1 - //SEG215 [109] 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 + //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 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG216 [109] 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 [109] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG218 [109] 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 - //SEG219 [109] 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 - //SEG220 [109] 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 - //SEG221 init_font_hex::@2 + //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 b2: - //SEG222 [110] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG235 [121] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG223 [111] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG224 [111] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //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 lda #1 sta idx - //SEG225 [111] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG238 [122] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG226 [111] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG227 [111] 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 - //SEG228 [111] 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 - //SEG229 init_font_hex::@3 + //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 b3: - //SEG230 [112] (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 + //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 txa tay lda (proto_hi),y @@ -5550,33 +5946,33 @@ init_font_hex: { asl asl sta _0 - //SEG231 [113] (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 + //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 txa tay lda (proto_lo),y asl - //SEG232 [114] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG245 [125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG233 [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG246 [126] *((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 - //SEG234 [116] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG247 [127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG235 [117] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG248 [128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG236 [118] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG249 [129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG237 init_font_hex::@4 - //SEG238 [119] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //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 lda #0 ldy idx sta (charset),y - //SEG239 [120] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG252 [131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG240 [121] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG253 [132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG241 [122] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG254 [133] (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 @@ -5584,7 +5980,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG242 [123] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG255 [134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -5592,14 +5988,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG243 [124] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG256 [135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG244 [125] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG257 [136] 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 - //SEG245 init_font_hex::@5 - //SEG246 [126] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //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 lda #5 clc adc proto_hi @@ -5607,17 +6003,17 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG247 [127] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG260 [138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG248 [128] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG261 [139] 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 - //SEG249 init_font_hex::@return - //SEG250 [129] return + //SEG262 init_font_hex::@return + //SEG263 [140] return rts } -//SEG251 File Data +//SEG264 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 ef4ae9a9d..4801c0375 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:12 4.0 +(signed word~) atan2_16::$2 $2 zp ZP_WORD:15 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:14 4.0 +(signed word~) atan2_16::$7 $7 zp ZP_WORD:17 4.0 (label) atan2_16::@1 (label) atan2_16::@10 (label) atan2_16::@11 @@ -54,77 +54,89 @@ (label) atan2_16::@9 (label) atan2_16::@return (word) atan2_16::angle -(word) atan2_16::angle#1 angle zp ZP_WORD:17 3.0 -(word) atan2_16::angle#11 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#12 angle zp ZP_WORD:17 364.0 -(word) atan2_16::angle#13 angle zp ZP_WORD:17 1334.6666666666667 -(word) atan2_16::angle#2 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#3 angle zp ZP_WORD:17 2002.0 -(word) atan2_16::angle#4 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#5 angle zp ZP_WORD:17 4.0 -(word) atan2_16::angle#6 angle zp ZP_WORD:17 2004.0 +(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#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 +(word) atan2_16::angle#4 angle zp ZP_WORD:20 4.0 +(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:16 1501.5 -(byte) atan2_16::i#2 i zp ZP_BYTE:16 429.0 +(byte) atan2_16::i#1 i zp ZP_BYTE:19 1501.5 +(byte) atan2_16::i#2 i zp ZP_BYTE:19 429.0 (word) atan2_16::return -(word) atan2_16::return#0 return zp ZP_WORD:17 34.99999999999999 -(word) atan2_16::return#2 return zp ZP_WORD:17 202.0 +(word) atan2_16::return#0 return zp ZP_WORD:20 34.99999999999999 +(word) atan2_16::return#2 return zp ZP_WORD:20 202.0 (signed word) atan2_16::x -(signed word) atan2_16::x#0 x zp ZP_WORD:32 3.8928571428571437 +(signed word) atan2_16::x#0 x zp ZP_WORD:35 3.8928571428571437 (signed word) atan2_16::xd -(signed word) atan2_16::xd#0 xd zp ZP_WORD:36 600.5999999999999 +(signed word) atan2_16::xd#0 xd zp ZP_WORD:40 600.5999999999999 (signed word) atan2_16::xi -(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#2 xi zp ZP_WORD:14 500.5 -(signed word) atan2_16::xi#3 xi zp ZP_WORD:14 801.2 -(signed word) atan2_16::xi#7 xi zp ZP_WORD:14 1001.0 -(signed word~) atan2_16::xi#8 xi zp ZP_WORD:14 4.0 +(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::y -(signed word) atan2_16::y#0 y zp ZP_WORD:34 3.633333333333334 +(signed word) atan2_16::y#0 y zp ZP_WORD:37 3.633333333333334 (signed word) atan2_16::yd -(signed word) atan2_16::yd#0 yd zp ZP_WORD:38 1501.5 +(signed word) atan2_16::yd#0 yd zp ZP_WORD:42 1501.5 (signed word) atan2_16::yi -(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#11 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 858.2857142857142 -(signed word) atan2_16::yi#7 yi zp ZP_WORD:12 1001.0 +(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 (dword()) clock() (label) clock::@return (dword) clock::return -(dword) clock::return#0 return zp ZP_DWORD:28 1.3333333333333333 -(dword) clock::return#2 return zp ZP_DWORD:28 4.0 +(dword) clock::return#0 return zp ZP_DWORD:31 1.3333333333333333 +(dword) clock::return#2 return zp ZP_DWORD:31 4.0 (void()) clock_start() (label) clock_start::@return (void()) init_angle_screen((byte*) init_angle_screen::screen) -(word~) init_angle_screen::$7 $7 zp ZP_WORD:17 202.0 +(word~) init_angle_screen::$10 $10 zp ZP_WORD:20 202.0 +(byte~) init_angle_screen::$12 reg byte a 202.0 +(byte~) init_angle_screen::$13 reg byte a 202.0 +(byte~) init_angle_screen::$14 reg byte a 202.0 +(byte~) init_angle_screen::$2 reg byte a 202.0 +(byte~) init_angle_screen::$3 reg byte a 202.0 +(byte~) init_angle_screen::$6 reg byte a 202.0 (label) init_angle_screen::@1 (label) init_angle_screen::@2 (label) init_angle_screen::@3 (label) init_angle_screen::@4 (label) init_angle_screen::@return (byte) init_angle_screen::ang_w -(byte) init_angle_screen::ang_w#0 reg byte a 202.0 +(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:39 72.14285714285714 (word) init_angle_screen::angle_w -(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:17 202.0 +(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:20 202.0 (byte*) init_angle_screen::screen -(byte*) init_angle_screen::screen#1 screen zp ZP_WORD:10 42.599999999999994 -(byte*) init_angle_screen::screen#2 screen zp ZP_WORD:10 28.545454545454547 -(byte*) init_angle_screen::screen#4 screen zp ZP_WORD:10 22.0 -(signed byte) init_angle_screen::x -(signed byte) init_angle_screen::x#1 reg byte x 151.5 -(signed byte) init_angle_screen::x#2 reg byte x 16.833333333333332 +(byte*) init_angle_screen::screen_bottomline +(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:12 7.333333333333333 +(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:12 8.959999999999999 +(byte*) init_angle_screen::screen_topline +(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:10 5.5 +(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:10 9.333333333333334 +(byte) init_angle_screen::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::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 (signed word) init_angle_screen::xw -(word) init_angle_screen::xw#0 xw zp ZP_WORD:32 50.5 -(signed byte) init_angle_screen::y -(signed byte) init_angle_screen::y#1 y zp ZP_BYTE:9 16.5 -(signed byte) init_angle_screen::y#4 y zp ZP_BYTE:9 1.4666666666666666 +(word) init_angle_screen::xw#0 xw zp ZP_WORD:35 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:34 50.5 +(word) init_angle_screen::yw#0 yw zp ZP_WORD:37 50.5 (void()) init_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:40 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:44 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 @@ -134,30 +146,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:21 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:21 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:26 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:26 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:22 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:22 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:22 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:27 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:27 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:19 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:19 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:24 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:24 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() -(dword~) main::$4 $4 zp ZP_DWORD:28 4.0 +(dword~) main::$4 $4 zp ZP_DWORD:31 4.0 (label) main::@1 (label) main::@2 (label) main::@3 @@ -169,7 +181,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:28 4.0 +(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:31 4.0 (label) main::toD0181 (word~) main::toD0181_$0 (number~) main::toD0181_$1 @@ -226,7 +238,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:28 2.0 +(dword) print_dword_at::dw#0 dw zp ZP_DWORD:31 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) @@ -245,30 +257,38 @@ zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp ZP_WORD:7 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] zp ZP_BYTE:9 [ init_angle_screen::y#4 init_angle_screen::y#1 ] +zp ZP_WORD:10 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ] +zp ZP_WORD:12 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ] reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ] -zp ZP_WORD:10 [ init_angle_screen::screen#2 init_angle_screen::screen#4 init_angle_screen::screen#1 ] -zp ZP_WORD:12 [ 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:14 [ 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:16 [ atan2_16::i#2 atan2_16::i#1 ] -zp ZP_WORD:17 [ 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::$7 ] -zp ZP_WORD:19 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:21 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:22 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:24 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:26 [ init_font_hex::c1#4 init_font_hex::c1#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_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 x [ init_font_hex::i#2 init_font_hex::i#1 ] -zp ZP_BYTE:27 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -zp ZP_DWORD:28 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ] +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 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] -zp ZP_WORD:32 [ init_angle_screen::xw#0 atan2_16::x#0 ] -zp ZP_WORD:34 [ init_angle_screen::yw#0 atan2_16::y#0 ] -reg byte a [ init_angle_screen::ang_w#0 ] -zp ZP_WORD:36 [ atan2_16::xd#0 ] -zp ZP_WORD:38 [ atan2_16::yd#0 ] +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 ] +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 ] +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:40 [ init_font_hex::$0 ] +zp ZP_BYTE:44 [ 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 ]