mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-02-17 10:30:43 +00:00
Optimized angle-screen calculation using symmetry.
This commit is contained in:
parent
647775223c
commit
1064518cf9
@ -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)
|
// 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)
|
// Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI)
|
||||||
byte atan2_8(signed byte x, signed byte y) {
|
byte atan2_8(signed byte x, signed byte y) {
|
||||||
signed byte yi = (y>0)?y:-y;
|
signed byte yi = (y>0)?y:-y;
|
||||||
|
@ -52,7 +52,7 @@ public class TestPrograms {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testScreenCenterAngle() throws IOException, URISyntaxException {
|
public void testScreenCenterAngle() throws IOException, URISyntaxException {
|
||||||
compileAndCompare("screen-center-angle", log());
|
compileAndCompare("screen-center-angle");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -10,7 +10,7 @@ const byte* SCREEN = 0x2800;
|
|||||||
void main() {
|
void main() {
|
||||||
init_font_hex(CHARSET);
|
init_font_hex(CHARSET);
|
||||||
*D018 = toD018(SCREEN, CHARSET);
|
*D018 = toD018(SCREEN, CHARSET);
|
||||||
init_screen();
|
init_angle_screen(SCREEN);
|
||||||
|
|
||||||
// Clear the screen by modifying the charset
|
// Clear the screen by modifying the charset
|
||||||
byte* clear_char = CHARSET;
|
byte* clear_char = CHARSET;
|
||||||
@ -22,16 +22,23 @@ void main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Populates 1000 bytes (a screen) with values representing the angle to the center.
|
||||||
void init_screen() {
|
// Utilizes symmetry around the center
|
||||||
byte* screen = SCREEN;
|
void init_angle_screen(byte* screen) {
|
||||||
for(signed byte y: -12..12) {
|
byte* screen_topline = screen+40*12;
|
||||||
for(signed byte x: -19..20) {
|
byte *screen_bottomline = screen+40*12;
|
||||||
signed word xw = (signed word)(word){ (byte)x, 0 };
|
for(byte y: 0..12) {
|
||||||
signed word yw = (signed word)(word){ (byte)y, 0 };
|
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);
|
word angle_w = atan2_16(xw, yw);
|
||||||
byte ang_w = >(angle_w+0x0080);
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,15 +24,22 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Populates 1000 bytes (a screen) with values representing the angle to the center.
|
// 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) {
|
void init_angle_screen(byte* screen) {
|
||||||
for(signed byte y: -12..12) {
|
byte* screen_topline = screen+40*12;
|
||||||
for(signed byte x: -19..20) {
|
byte *screen_bottomline = screen+40*12;
|
||||||
signed word xw = (signed word)(word){ (byte)x, 0 };
|
for(byte y: 0..12) {
|
||||||
signed word yw = (signed word)(word){ (byte)y, 0 };
|
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);
|
word angle_w = atan2_16(xw, yw);
|
||||||
byte ang_w = >(angle_w+0x0080);
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ main: {
|
|||||||
jsr init_font_hex
|
jsr init_font_hex
|
||||||
lda #toD0181_return
|
lda #toD0181_return
|
||||||
sta D018
|
sta D018
|
||||||
jsr init_screen
|
jsr init_angle_screen
|
||||||
lda #<CHARSET
|
lda #<CHARSET
|
||||||
sta clear_char
|
sta clear_char
|
||||||
lda #>CHARSET
|
lda #>CHARSET
|
||||||
@ -41,47 +41,93 @@ main: {
|
|||||||
!:
|
!:
|
||||||
jmp b2
|
jmp b2
|
||||||
}
|
}
|
||||||
init_screen: {
|
// Populates 1000 bytes (a screen) with values representing the angle to the center.
|
||||||
.label _7 = $c
|
// Utilizes symmetry around the center
|
||||||
.label xw = $17
|
init_angle_screen: {
|
||||||
.label yw = $19
|
.label _10 = $f
|
||||||
.label angle_w = $c
|
.label xw = $1a
|
||||||
.label screen = 5
|
.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
|
.label y = 4
|
||||||
lda #<SCREEN
|
lda #<SCREEN+$28*$c
|
||||||
sta screen
|
sta screen_bottomline
|
||||||
lda #>SCREEN
|
lda #>SCREEN+$28*$c
|
||||||
sta screen+1
|
sta screen_bottomline+1
|
||||||
lda #-$c
|
lda #<SCREEN+$28*$c
|
||||||
|
sta screen_topline
|
||||||
|
lda #>SCREEN+$28*$c
|
||||||
|
sta screen_topline+1
|
||||||
|
lda #0
|
||||||
sta y
|
sta y
|
||||||
b1:
|
b1:
|
||||||
ldx #-$13
|
lda #$27
|
||||||
|
sta xb
|
||||||
|
ldx #0
|
||||||
b2:
|
b2:
|
||||||
ldy #0
|
|
||||||
txa
|
txa
|
||||||
|
asl
|
||||||
|
eor #$ff
|
||||||
|
clc
|
||||||
|
adc #$27+1
|
||||||
|
ldy #0
|
||||||
sta xw+1
|
sta xw+1
|
||||||
sty xw
|
sty xw
|
||||||
lda y
|
lda y
|
||||||
|
asl
|
||||||
sta yw+1
|
sta yw+1
|
||||||
sty yw
|
sty yw
|
||||||
jsr atan2_16
|
jsr atan2_16
|
||||||
lda #$80
|
lda #$80
|
||||||
clc
|
clc
|
||||||
adc _7
|
adc _10
|
||||||
sta _7
|
sta _10
|
||||||
bcc !+
|
bcc !+
|
||||||
inc _7+1
|
inc _10+1
|
||||||
!:
|
|
||||||
lda _7+1
|
|
||||||
ldy #0
|
|
||||||
sta (screen),y
|
|
||||||
inc screen
|
|
||||||
bne !+
|
|
||||||
inc screen+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
|
inx
|
||||||
cpx #$15
|
dec xb
|
||||||
bne b2
|
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
|
inc y
|
||||||
lda #$d
|
lda #$d
|
||||||
cmp y
|
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)
|
// 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
|
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
|
||||||
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
|
// 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: {
|
atan2_16: {
|
||||||
.label _2 = 7
|
.label _2 = $a
|
||||||
.label _7 = 9
|
.label _7 = $c
|
||||||
.label yi = 7
|
.label yi = $a
|
||||||
.label xi = 9
|
.label xi = $c
|
||||||
.label xd = $1b
|
.label xd = $1f
|
||||||
.label yd = $1d
|
.label yd = $21
|
||||||
.label angle = $c
|
.label angle = $f
|
||||||
.label i = $b
|
.label i = $e
|
||||||
.label return = $c
|
.label return = $f
|
||||||
.label x = $17
|
.label x = $1a
|
||||||
.label y = $19
|
.label y = $1c
|
||||||
lda y+1
|
lda y+1
|
||||||
bmi !b1+
|
bmi !b1+
|
||||||
jmp b1
|
jmp b1
|
||||||
@ -266,15 +312,15 @@ atan2_16: {
|
|||||||
jmp b3
|
jmp b3
|
||||||
}
|
}
|
||||||
// Make charset from proto chars
|
// Make charset from proto chars
|
||||||
// init_font_hex(byte* zeropage($11) charset)
|
// init_font_hex(byte* zeropage($14) charset)
|
||||||
init_font_hex: {
|
init_font_hex: {
|
||||||
.label _0 = $1f
|
.label _0 = $23
|
||||||
.label idx = $16
|
.label idx = $19
|
||||||
.label proto_lo = $13
|
.label proto_lo = $16
|
||||||
.label charset = $11
|
.label charset = $14
|
||||||
.label c1 = $15
|
.label c1 = $18
|
||||||
.label proto_hi = $e
|
.label proto_hi = $11
|
||||||
.label c = $10
|
.label c = $13
|
||||||
lda #0
|
lda #0
|
||||||
sta c
|
sta c
|
||||||
lda #<FONT_HEX_PROTO
|
lda #<FONT_HEX_PROTO
|
||||||
|
@ -16,7 +16,7 @@ main::toD0181: scope:[main] from main
|
|||||||
to:main::@5
|
to:main::@5
|
||||||
main::@5: scope:[main] from main::toD0181
|
main::@5: scope:[main] from main::toD0181
|
||||||
[7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
[7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
||||||
[8] call init_screen
|
[8] call init_angle_screen
|
||||||
to:main::@1
|
to:main::@1
|
||||||
main::@1: scope:[main] from main::@3 main::@4 main::@5
|
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 )
|
[9] (byte*) main::clear_char#5 ← phi( main::@5/(const byte*) CHARSET#0 main::@4/(byte*) main::clear_char#1 )
|
||||||
@ -31,152 +31,164 @@ main::@4: scope:[main] from main::@3
|
|||||||
[12] *((byte*) main::clear_char#5) ← (byte) 0
|
[12] *((byte*) main::clear_char#5) ← (byte) 0
|
||||||
[13] (byte*) main::clear_char#1 ← ++ (byte*) main::clear_char#5
|
[13] (byte*) main::clear_char#1 ← ++ (byte*) main::clear_char#5
|
||||||
to:main::@1
|
to:main::@1
|
||||||
init_screen: scope:[init_screen] from main::@5
|
init_angle_screen: scope:[init_angle_screen] from main::@5
|
||||||
[14] phi()
|
[14] phi()
|
||||||
to:init_screen::@1
|
to:init_angle_screen::@1
|
||||||
init_screen::@1: scope:[init_screen] from init_screen init_screen::@3
|
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3
|
||||||
[15] (byte*) init_screen::screen#4 ← phi( init_screen/(const byte*) SCREEN#0 init_screen::@3/(byte*) init_screen::screen#1 )
|
[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] (signed byte) init_screen::y#4 ← phi( init_screen/(signed byte) -$c init_screen::@3/(signed byte) init_screen::y#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 )
|
||||||
to:init_screen::@2
|
[15] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 )
|
||||||
init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@4
|
to:init_angle_screen::@2
|
||||||
[16] (byte*) init_screen::screen#2 ← phi( init_screen::@1/(byte*) init_screen::screen#4 init_screen::@4/(byte*) init_screen::screen#1 )
|
init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4
|
||||||
[16] (signed byte) init_screen::x#2 ← phi( init_screen::@1/(signed byte) -$13 init_screen::@4/(signed byte) init_screen::x#1 )
|
[16] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 )
|
||||||
[17] (word) init_screen::xw#0 ← (byte)(signed byte) init_screen::x#2 w= (byte) 0
|
[16] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 )
|
||||||
[18] (word) init_screen::yw#0 ← (byte)(signed byte) init_screen::y#4 w= (byte) 0
|
[17] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1
|
||||||
[19] (signed word) atan2_16::x#0 ← (signed word)(word) init_screen::xw#0
|
[18] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2
|
||||||
[20] (signed word) atan2_16::y#0 ← (signed word)(word) init_screen::yw#0
|
[19] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0
|
||||||
[21] call atan2_16
|
[20] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1
|
||||||
[22] (word) atan2_16::return#2 ← (word) atan2_16::return#0
|
[21] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0
|
||||||
to:init_screen::@4
|
[22] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
|
||||||
init_screen::@4: scope:[init_screen] from init_screen::@2
|
[23] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
|
||||||
[23] (word) init_screen::angle_w#0 ← (word) atan2_16::return#2
|
[24] call atan2_16
|
||||||
[24] (word~) init_screen::$7 ← (word) init_screen::angle_w#0 + (byte) $80
|
[25] (word) atan2_16::return#2 ← (word) atan2_16::return#0
|
||||||
[25] (byte) init_screen::ang_w#0 ← > (word~) init_screen::$7
|
to:init_angle_screen::@4
|
||||||
[26] *((byte*) init_screen::screen#2) ← (byte) init_screen::ang_w#0
|
init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2
|
||||||
[27] (byte*) init_screen::screen#1 ← ++ (byte*) init_screen::screen#2
|
[26] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
|
||||||
[28] (signed byte) init_screen::x#1 ← ++ (signed byte) init_screen::x#2
|
[27] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80
|
||||||
[29] if((signed byte) init_screen::x#1!=(signed byte) $15) goto init_screen::@2
|
[28] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10
|
||||||
to:init_screen::@3
|
[29] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
|
||||||
init_screen::@3: scope:[init_screen] from init_screen::@4
|
[30] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12
|
||||||
[30] (signed byte) init_screen::y#1 ← ++ (signed byte) init_screen::y#4
|
[31] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
|
||||||
[31] if((signed byte) init_screen::y#1!=(signed byte) $d) goto init_screen::@1
|
[32] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13
|
||||||
to:init_screen::@return
|
[33] (byte~) init_angle_screen::$14 ← - (byte) init_angle_screen::ang_w#0
|
||||||
init_screen::@return: scope:[init_screen] from init_screen::@3
|
[34] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$14
|
||||||
[32] return
|
[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
|
to:@return
|
||||||
atan2_16: scope:[atan2_16] from init_screen::@2
|
atan2_16: scope:[atan2_16] from init_angle_screen::@2
|
||||||
[33] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
|
[44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
|
||||||
to:atan2_16::@2
|
to:atan2_16::@2
|
||||||
atan2_16::@2: scope:[atan2_16] from atan2_16
|
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
|
to:atan2_16::@3
|
||||||
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
|
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 )
|
[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 )
|
||||||
[36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
[47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
||||||
to:atan2_16::@5
|
to:atan2_16::@5
|
||||||
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
|
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
|
to:atan2_16::@6
|
||||||
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
|
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
|
to:atan2_16::@10
|
||||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6
|
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 )
|
[50] (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 )
|
[50] (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 )
|
[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 )
|
||||||
[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 )
|
[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 )
|
||||||
[40] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
[51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
||||||
to:atan2_16::@12
|
to:atan2_16::@12
|
||||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14
|
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 )
|
[52] (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
|
[53] (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
|
[54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
|
||||||
to:atan2_16::@16
|
to:atan2_16::@16
|
||||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@12
|
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
|
to:atan2_16::@7
|
||||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16
|
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 )
|
[56] (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
|
[57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
|
||||||
to:atan2_16::@9
|
to:atan2_16::@9
|
||||||
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
|
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
|
to:atan2_16::@8
|
||||||
atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9
|
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
|
to:atan2_16::@return
|
||||||
atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
||||||
[49] return
|
[60] return
|
||||||
to:@return
|
to:@return
|
||||||
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
|
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
|
[61] (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
|
[62] (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
|
[63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13
|
||||||
to:atan2_16::@15
|
to:atan2_16::@15
|
||||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@11
|
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
|
[64] (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
|
[65] (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
|
[66] (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)
|
[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
|
to:atan2_16::@14
|
||||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15
|
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 )
|
[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 )
|
||||||
[57] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 )
|
[68] (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 )
|
[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 )
|
||||||
[58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
[69] (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
|
[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
|
to:atan2_16::@10
|
||||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11
|
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
|
[71] (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
|
[72] (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
|
[73] (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)
|
[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
|
to:atan2_16::@14
|
||||||
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
|
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
|
to:atan2_16::@6
|
||||||
atan2_16::@1: scope:[atan2_16] from atan2_16
|
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
|
to:atan2_16::@3
|
||||||
init_font_hex: scope:[init_font_hex] from main
|
init_font_hex: scope:[init_font_hex] from main
|
||||||
[66] phi()
|
[77] phi()
|
||||||
to:init_font_hex::@1
|
to:init_font_hex::@1
|
||||||
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
|
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 )
|
[78] (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 )
|
[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 )
|
||||||
[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::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
|
to:init_font_hex::@2
|
||||||
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
|
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 )
|
[79] (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 )
|
[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 )
|
||||||
[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 )
|
[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 )
|
||||||
[69] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
[80] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||||
to:init_font_hex::@3
|
to:init_font_hex::@3
|
||||||
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 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 )
|
[81] (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 )
|
[81] (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
|
[82] (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
|
[83] (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
|
[84] (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
|
[85] *((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
|
[86] (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
|
[87] (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
|
[88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||||
to:init_font_hex::@4
|
to:init_font_hex::@4
|
||||||
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
|
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
|
[89] *((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
|
[90] (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
|
[91] *((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
|
[92] (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
|
[93] (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
|
[94] (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
|
[95] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||||
to:init_font_hex::@5
|
to:init_font_hex::@5
|
||||||
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
|
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
|
[96] (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
|
[97] (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
|
[98] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||||
to:init_font_hex::@return
|
to:init_font_hex::@return
|
||||||
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
||||||
[88] return
|
[99] return
|
||||||
to:@return
|
to:@return
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -18,10 +18,10 @@
|
|||||||
(byte*) SCREEN
|
(byte*) SCREEN
|
||||||
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
|
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
|
||||||
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
|
(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::$23 reg byte a 2002.0
|
||||||
(byte~) atan2_16::$24 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::@1
|
||||||
(label) atan2_16::@10
|
(label) atan2_16::@10
|
||||||
(label) atan2_16::@11
|
(label) atan2_16::@11
|
||||||
@ -40,45 +40,82 @@
|
|||||||
(label) atan2_16::@9
|
(label) atan2_16::@9
|
||||||
(label) atan2_16::@return
|
(label) atan2_16::@return
|
||||||
(word) atan2_16::angle
|
(word) atan2_16::angle
|
||||||
(word) atan2_16::angle#1 angle zp ZP_WORD:12 3.0
|
(word) atan2_16::angle#1 angle zp ZP_WORD:15 3.0
|
||||||
(word) atan2_16::angle#11 angle zp ZP_WORD:12 4.0
|
(word) atan2_16::angle#11 angle zp ZP_WORD:15 4.0
|
||||||
(word) atan2_16::angle#12 angle zp ZP_WORD:12 364.0
|
(word) atan2_16::angle#12 angle zp ZP_WORD:15 364.0
|
||||||
(word) atan2_16::angle#13 angle zp ZP_WORD:12 1334.6666666666667
|
(word) atan2_16::angle#13 angle zp ZP_WORD:15 1334.6666666666667
|
||||||
(word) atan2_16::angle#2 angle zp ZP_WORD:12 2002.0
|
(word) atan2_16::angle#2 angle zp ZP_WORD:15 2002.0
|
||||||
(word) atan2_16::angle#3 angle zp ZP_WORD:12 2002.0
|
(word) atan2_16::angle#3 angle zp ZP_WORD:15 2002.0
|
||||||
(word) atan2_16::angle#4 angle zp ZP_WORD:12 4.0
|
(word) atan2_16::angle#4 angle zp ZP_WORD:15 4.0
|
||||||
(word) atan2_16::angle#5 angle zp ZP_WORD:12 4.0
|
(word) atan2_16::angle#5 angle zp ZP_WORD:15 4.0
|
||||||
(word) atan2_16::angle#6 angle zp ZP_WORD:12 2004.0
|
(word) atan2_16::angle#6 angle zp ZP_WORD:15 2004.0
|
||||||
(byte) atan2_16::i
|
(byte) atan2_16::i
|
||||||
(byte) atan2_16::i#1 i zp ZP_BYTE:11 1501.5
|
(byte) atan2_16::i#1 i zp ZP_BYTE:14 1501.5
|
||||||
(byte) atan2_16::i#2 i zp ZP_BYTE:11 429.0
|
(byte) atan2_16::i#2 i zp ZP_BYTE:14 429.0
|
||||||
(word) atan2_16::return
|
(word) atan2_16::return
|
||||||
(word) atan2_16::return#0 return zp ZP_WORD:12 34.99999999999999
|
(word) atan2_16::return#0 return zp ZP_WORD:15 34.99999999999999
|
||||||
(word) atan2_16::return#2 return zp ZP_WORD:12 202.0
|
(word) atan2_16::return#2 return zp ZP_WORD:15 202.0
|
||||||
(signed word) atan2_16::x
|
(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
|
||||||
(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
|
||||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:9 6.0
|
(signed word) atan2_16::xi#0 xi zp ZP_WORD:12 6.0
|
||||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:9 500.5
|
(signed word) atan2_16::xi#1 xi zp ZP_WORD:12 500.5
|
||||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:9 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:9 801.2
|
(signed word) atan2_16::xi#3 xi zp ZP_WORD:12 801.2
|
||||||
(signed word) atan2_16::xi#7 xi zp ZP_WORD:9 1001.0
|
(signed word) atan2_16::xi#7 xi zp ZP_WORD:12 1001.0
|
||||||
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:9 4.0
|
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:12 4.0
|
||||||
(signed word) atan2_16::y
|
(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
|
||||||
(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
|
||||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:7 1.2000000000000002
|
(signed word) atan2_16::yi#0 yi zp ZP_WORD:10 1.2000000000000002
|
||||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:7 667.3333333333334
|
(signed word) atan2_16::yi#1 yi zp ZP_WORD:10 667.3333333333334
|
||||||
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:7 4.0
|
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:10 4.0
|
||||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:7 667.3333333333334
|
(signed word) atan2_16::yi#2 yi zp ZP_WORD:10 667.3333333333334
|
||||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:7 858.2857142857142
|
(signed word) atan2_16::yi#3 yi zp ZP_WORD:10 858.2857142857142
|
||||||
(signed word) atan2_16::yi#7 yi zp ZP_WORD:7 1001.0
|
(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)
|
(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::$1 reg byte a 2002.0
|
||||||
(byte~) init_font_hex::$2 reg byte a 2002.0
|
(byte~) init_font_hex::$2 reg byte a 2002.0
|
||||||
(label) init_font_hex::@1
|
(label) init_font_hex::@1
|
||||||
@ -88,53 +125,28 @@
|
|||||||
(label) init_font_hex::@5
|
(label) init_font_hex::@5
|
||||||
(label) init_font_hex::@return
|
(label) init_font_hex::@return
|
||||||
(byte) init_font_hex::c
|
(byte) init_font_hex::c
|
||||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:16 16.5
|
(byte) init_font_hex::c#1 c zp ZP_BYTE:19 16.5
|
||||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:16 1.1578947368421053
|
(byte) init_font_hex::c#6 c zp ZP_BYTE:19 1.1578947368421053
|
||||||
(byte) init_font_hex::c1
|
(byte) init_font_hex::c1
|
||||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:21 151.5
|
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:24 151.5
|
||||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:21 13.466666666666667
|
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:24 13.466666666666667
|
||||||
(byte*) init_font_hex::charset
|
(byte*) init_font_hex::charset
|
||||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:17 35.5
|
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:20 35.5
|
||||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:17 108.35714285714285
|
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:20 108.35714285714285
|
||||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:17 22.0
|
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:20 22.0
|
||||||
(byte) init_font_hex::i
|
(byte) init_font_hex::i
|
||||||
(byte) init_font_hex::i#1 reg byte x 1501.5
|
(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::i#2 reg byte x 667.3333333333334
|
||||||
(byte) init_font_hex::idx
|
(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#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
|
||||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:14 7.333333333333333
|
(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:14 56.83333333333334
|
(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
|
||||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:19 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:19 92.53846153846155
|
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:22 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
|
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(label) main::@1
|
(label) main::@1
|
||||||
(label) main::@2
|
(label) main::@2
|
||||||
@ -160,28 +172,36 @@
|
|||||||
(byte*) main::toD0181_screen
|
(byte*) main::toD0181_screen
|
||||||
|
|
||||||
zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ]
|
zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ]
|
||||||
zp ZP_BYTE:4 [ init_screen::y#4 init_screen::y#1 ]
|
zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
|
||||||
reg byte x [ init_screen::x#2 init_screen::x#1 ]
|
zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
|
||||||
zp ZP_WORD:5 [ init_screen::screen#2 init_screen::screen#4 init_screen::screen#1 ]
|
zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#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 ]
|
reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ]
|
||||||
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:9 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
|
||||||
zp ZP_BYTE:11 [ atan2_16::i#2 atan2_16::i#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::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: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_WORD:14 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
zp ZP_BYTE:14 [ atan2_16::i#2 atan2_16::i#1 ]
|
||||||
zp ZP_BYTE:16 [ init_font_hex::c#6 init_font_hex::c#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::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||||
zp ZP_WORD:19 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||||
zp ZP_BYTE:21 [ init_font_hex::c1#4 init_font_hex::c1#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 ]
|
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_BYTE:25 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||||
zp ZP_WORD:23 [ init_screen::xw#0 atan2_16::x#0 ]
|
reg byte a [ init_angle_screen::$2 ]
|
||||||
zp ZP_WORD:25 [ init_screen::yw#0 atan2_16::y#0 ]
|
reg byte a [ init_angle_screen::$3 ]
|
||||||
reg byte a [ init_screen::ang_w#0 ]
|
zp ZP_WORD:26 [ init_angle_screen::xw#0 atan2_16::x#0 ]
|
||||||
zp ZP_WORD:27 [ atan2_16::xd#0 ]
|
reg byte a [ init_angle_screen::$6 ]
|
||||||
zp ZP_WORD:29 [ atan2_16::yd#0 ]
|
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::$24 ]
|
||||||
reg byte a [ atan2_16::$23 ]
|
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::$1 ]
|
||||||
reg byte a [ init_font_hex::$2 ]
|
reg byte a [ init_font_hex::$2 ]
|
||||||
reg byte y [ init_font_hex::idx#3 ]
|
reg byte y [ init_font_hex::idx#3 ]
|
||||||
|
@ -52,7 +52,7 @@ main: {
|
|||||||
jmp b4
|
jmp b4
|
||||||
}
|
}
|
||||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
// 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)
|
// 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(signed byte zeropage(3) x, signed byte zeropage(2) y)
|
||||||
atan2_8: {
|
atan2_8: {
|
||||||
|
@ -1677,7 +1677,7 @@ main: {
|
|||||||
}
|
}
|
||||||
//SEG46 atan2_8
|
//SEG46 atan2_8
|
||||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
// 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)
|
// 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(signed byte zeropage($15) x, signed byte zeropage($16) y)
|
||||||
atan2_8: {
|
atan2_8: {
|
||||||
@ -2394,7 +2394,7 @@ main: {
|
|||||||
}
|
}
|
||||||
//SEG46 atan2_8
|
//SEG46 atan2_8
|
||||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
// 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)
|
// 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(signed byte zeropage(3) x, signed byte zeropage(2) y)
|
||||||
atan2_8: {
|
atan2_8: {
|
||||||
@ -3172,7 +3172,7 @@ main: {
|
|||||||
}
|
}
|
||||||
//SEG46 atan2_8
|
//SEG46 atan2_8
|
||||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
// 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)
|
// 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(signed byte zeropage(3) x, signed byte zeropage(2) y)
|
||||||
atan2_8: {
|
atan2_8: {
|
||||||
|
@ -28,8 +28,8 @@ main: {
|
|||||||
.label BASE_CHARSET = $1000
|
.label BASE_CHARSET = $1000
|
||||||
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
|
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
|
||||||
.const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f
|
.const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f
|
||||||
.label _4 = $1c
|
.label _4 = $1f
|
||||||
.label cyclecount = $1c
|
.label cyclecount = $1f
|
||||||
jsr init_font_hex
|
jsr init_font_hex
|
||||||
lda #toD0181_return
|
lda #toD0181_return
|
||||||
sta D018
|
sta D018
|
||||||
@ -55,9 +55,9 @@ main: {
|
|||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
// Print a dword as HEX at a specific position
|
// 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: {
|
print_dword_at: {
|
||||||
.label dw = $1c
|
.label dw = $1f
|
||||||
lda dw+2
|
lda dw+2
|
||||||
sta print_word_at.w
|
sta print_word_at.w
|
||||||
lda dw+3
|
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).
|
// 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()
|
// This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start()
|
||||||
clock: {
|
clock: {
|
||||||
.label return = $1c
|
.label return = $1f
|
||||||
lda #<$ffffffff
|
lda #<$ffffffff
|
||||||
sec
|
sec
|
||||||
sbc CIA2_TIMER_AB
|
sbc CIA2_TIMER_AB
|
||||||
@ -158,49 +158,92 @@ clock: {
|
|||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
// Populates 1000 bytes (a screen) with values representing the angle to the center.
|
// 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
|
||||||
// init_angle_screen(byte* zeropage($a) screen)
|
|
||||||
init_angle_screen: {
|
init_angle_screen: {
|
||||||
.label _7 = $11
|
.label _10 = $14
|
||||||
.label xw = $20
|
.label xw = $23
|
||||||
.label yw = $22
|
.label yw = $25
|
||||||
.label angle_w = $11
|
.label angle_w = $14
|
||||||
.label screen = $a
|
.label ang_w = $27
|
||||||
|
.label xb = $e
|
||||||
|
.label screen_topline = $a
|
||||||
|
.label screen_bottomline = $c
|
||||||
.label y = 9
|
.label y = 9
|
||||||
lda #<SCREEN
|
lda #<SCREEN+$28*$c
|
||||||
sta screen
|
sta screen_bottomline
|
||||||
lda #>SCREEN
|
lda #>SCREEN+$28*$c
|
||||||
sta screen+1
|
sta screen_bottomline+1
|
||||||
lda #-$c
|
lda #<SCREEN+$28*$c
|
||||||
|
sta screen_topline
|
||||||
|
lda #>SCREEN+$28*$c
|
||||||
|
sta screen_topline+1
|
||||||
|
lda #0
|
||||||
sta y
|
sta y
|
||||||
b1:
|
b1:
|
||||||
ldx #-$13
|
lda #$27
|
||||||
|
sta xb
|
||||||
|
ldx #0
|
||||||
b2:
|
b2:
|
||||||
ldy #0
|
|
||||||
txa
|
txa
|
||||||
|
asl
|
||||||
|
eor #$ff
|
||||||
|
clc
|
||||||
|
adc #$27+1
|
||||||
|
ldy #0
|
||||||
sta xw+1
|
sta xw+1
|
||||||
sty xw
|
sty xw
|
||||||
lda y
|
lda y
|
||||||
|
asl
|
||||||
sta yw+1
|
sta yw+1
|
||||||
sty yw
|
sty yw
|
||||||
jsr atan2_16
|
jsr atan2_16
|
||||||
lda #$80
|
lda #$80
|
||||||
clc
|
clc
|
||||||
adc _7
|
adc _10
|
||||||
sta _7
|
sta _10
|
||||||
bcc !+
|
bcc !+
|
||||||
inc _7+1
|
inc _10+1
|
||||||
!:
|
|
||||||
lda _7+1
|
|
||||||
ldy #0
|
|
||||||
sta (screen),y
|
|
||||||
inc screen
|
|
||||||
bne !+
|
|
||||||
inc screen+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
|
inx
|
||||||
cpx #$15
|
dec xb
|
||||||
bne b2
|
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
|
inc y
|
||||||
lda #$d
|
lda #$d
|
||||||
cmp y
|
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)
|
// 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
|
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
|
||||||
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
|
// 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: {
|
atan2_16: {
|
||||||
.label _2 = $c
|
.label _2 = $f
|
||||||
.label _7 = $e
|
.label _7 = $11
|
||||||
.label yi = $c
|
.label yi = $f
|
||||||
.label xi = $e
|
.label xi = $11
|
||||||
.label xd = $24
|
.label xd = $28
|
||||||
.label yd = $26
|
.label yd = $2a
|
||||||
.label angle = $11
|
.label angle = $14
|
||||||
.label i = $10
|
.label i = $13
|
||||||
.label return = $11
|
.label return = $14
|
||||||
.label x = $20
|
.label x = $23
|
||||||
.label y = $22
|
.label y = $25
|
||||||
lda y+1
|
lda y+1
|
||||||
bmi !b1+
|
bmi !b1+
|
||||||
jmp b1
|
jmp b1
|
||||||
@ -407,15 +450,15 @@ clock_start: {
|
|||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
// Make charset from proto chars
|
// Make charset from proto chars
|
||||||
// init_font_hex(byte* zeropage($16) charset)
|
// init_font_hex(byte* zeropage($19) charset)
|
||||||
init_font_hex: {
|
init_font_hex: {
|
||||||
.label _0 = $28
|
.label _0 = $2c
|
||||||
.label idx = $1b
|
.label idx = $1e
|
||||||
.label proto_lo = $18
|
.label proto_lo = $1b
|
||||||
.label charset = $16
|
.label charset = $19
|
||||||
.label c1 = $1a
|
.label c1 = $1d
|
||||||
.label proto_hi = $13
|
.label proto_hi = $16
|
||||||
.label c = $15
|
.label c = $18
|
||||||
lda #0
|
lda #0
|
||||||
sta c
|
sta c
|
||||||
lda #<FONT_HEX_PROTO
|
lda #<FONT_HEX_PROTO
|
||||||
|
@ -103,158 +103,170 @@ init_angle_screen: scope:[init_angle_screen] from main::@3
|
|||||||
[49] phi()
|
[49] phi()
|
||||||
to:init_angle_screen::@1
|
to:init_angle_screen::@1
|
||||||
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3
|
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] (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] (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_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
|
to:init_angle_screen::@2
|
||||||
init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4
|
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] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#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 )
|
[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] (word) init_angle_screen::xw#0 ← (byte)(signed byte) init_angle_screen::x#2 w= (byte) 0
|
[52] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1
|
||||||
[53] (word) init_angle_screen::yw#0 ← (byte)(signed byte) init_angle_screen::y#4 w= (byte) 0
|
[53] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2
|
||||||
[54] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
|
[54] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0
|
||||||
[55] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
|
[55] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1
|
||||||
[56] call atan2_16
|
[56] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0
|
||||||
[57] (word) atan2_16::return#2 ← (word) atan2_16::return#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
|
to:init_angle_screen::@4
|
||||||
init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2
|
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
|
[61] (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
|
[62] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80
|
||||||
[60] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7
|
[63] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10
|
||||||
[61] *((byte*) init_angle_screen::screen#2) ← (byte) init_angle_screen::ang_w#0
|
[64] (byte~) init_angle_screen::$12 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
|
||||||
[62] (byte*) init_angle_screen::screen#1 ← ++ (byte*) init_angle_screen::screen#2
|
[65] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$12
|
||||||
[63] (signed byte) init_angle_screen::x#1 ← ++ (signed byte) init_angle_screen::x#2
|
[66] (byte~) init_angle_screen::$13 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
|
||||||
[64] if((signed byte) init_angle_screen::x#1!=(signed byte) $15) goto init_angle_screen::@2
|
[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
|
to:init_angle_screen::@3
|
||||||
init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4
|
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
|
[74] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28
|
||||||
[66] if((signed byte) init_angle_screen::y#1!=(signed byte) $d) goto init_angle_screen::@1
|
[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
|
to:init_angle_screen::@return
|
||||||
init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3
|
init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3
|
||||||
[67] return
|
[78] return
|
||||||
to:@return
|
to:@return
|
||||||
atan2_16: scope:[atan2_16] from init_angle_screen::@2
|
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
|
to:atan2_16::@2
|
||||||
atan2_16::@2: scope:[atan2_16] from atan2_16
|
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
|
to:atan2_16::@3
|
||||||
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
|
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 )
|
[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 )
|
||||||
[71] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
[82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
||||||
to:atan2_16::@5
|
to:atan2_16::@5
|
||||||
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
|
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
|
to:atan2_16::@6
|
||||||
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
|
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
|
to:atan2_16::@10
|
||||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6
|
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 )
|
[85] (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 )
|
[85] (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 )
|
[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 )
|
||||||
[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 )
|
[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 )
|
||||||
[75] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
[86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
||||||
to:atan2_16::@12
|
to:atan2_16::@12
|
||||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14
|
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 )
|
[87] (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
|
[88] (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
|
[89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
|
||||||
to:atan2_16::@16
|
to:atan2_16::@16
|
||||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@12
|
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
|
to:atan2_16::@7
|
||||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16
|
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 )
|
[91] (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
|
[92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
|
||||||
to:atan2_16::@9
|
to:atan2_16::@9
|
||||||
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
|
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
|
to:atan2_16::@8
|
||||||
atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9
|
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
|
to:atan2_16::@return
|
||||||
atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
||||||
[84] return
|
[95] return
|
||||||
to:@return
|
to:@return
|
||||||
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
|
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
|
[96] (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
|
[97] (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
|
[98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13
|
||||||
to:atan2_16::@15
|
to:atan2_16::@15
|
||||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@11
|
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
|
[99] (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
|
[100] (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
|
[101] (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)
|
[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
|
to:atan2_16::@14
|
||||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15
|
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 )
|
[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 )
|
||||||
[92] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 )
|
[103] (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 )
|
[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 )
|
||||||
[93] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
[104] (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
|
[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
|
to:atan2_16::@10
|
||||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11
|
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
|
[106] (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
|
[107] (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
|
[108] (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)
|
[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
|
to:atan2_16::@14
|
||||||
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
|
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
|
to:atan2_16::@6
|
||||||
atan2_16::@1: scope:[atan2_16] from atan2_16
|
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
|
to:atan2_16::@3
|
||||||
clock_start: scope:[clock_start] from main::@1
|
clock_start: scope:[clock_start] from main::@1
|
||||||
[101] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0
|
[112] *((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
|
[113] *((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
|
[114] *((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
|
[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
|
||||||
[105] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0
|
[116] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0
|
||||||
to:clock_start::@return
|
to:clock_start::@return
|
||||||
clock_start::@return: scope:[clock_start] from clock_start
|
clock_start::@return: scope:[clock_start] from clock_start
|
||||||
[106] return
|
[117] return
|
||||||
to:@return
|
to:@return
|
||||||
init_font_hex: scope:[init_font_hex] from main
|
init_font_hex: scope:[init_font_hex] from main
|
||||||
[107] phi()
|
[118] phi()
|
||||||
to:init_font_hex::@1
|
to:init_font_hex::@1
|
||||||
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
|
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 )
|
[119] (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 )
|
[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 )
|
||||||
[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::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
|
to:init_font_hex::@2
|
||||||
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
|
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 )
|
[120] (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 )
|
[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 )
|
||||||
[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 )
|
[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 )
|
||||||
[110] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
[121] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||||
to:init_font_hex::@3
|
to:init_font_hex::@3
|
||||||
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 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 )
|
[122] (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 )
|
[122] (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
|
[123] (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
|
[124] (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
|
[125] (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
|
[126] *((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
|
[127] (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
|
[128] (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
|
[129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||||
to:init_font_hex::@4
|
to:init_font_hex::@4
|
||||||
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
|
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
|
[130] *((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
|
[131] (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
|
[132] *((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
|
[133] (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
|
[134] (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
|
[135] (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
|
[136] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||||
to:init_font_hex::@5
|
to:init_font_hex::@5
|
||||||
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
|
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
|
[137] (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
|
[138] (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
|
[139] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||||
to:init_font_hex::@return
|
to:init_font_hex::@return
|
||||||
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
||||||
[129] return
|
[140] return
|
||||||
to:@return
|
to:@return
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -32,10 +32,10 @@
|
|||||||
(byte*) SCREEN
|
(byte*) SCREEN
|
||||||
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
|
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
|
||||||
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
|
(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::$23 reg byte a 2002.0
|
||||||
(byte~) atan2_16::$24 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::@1
|
||||||
(label) atan2_16::@10
|
(label) atan2_16::@10
|
||||||
(label) atan2_16::@11
|
(label) atan2_16::@11
|
||||||
@ -54,77 +54,89 @@
|
|||||||
(label) atan2_16::@9
|
(label) atan2_16::@9
|
||||||
(label) atan2_16::@return
|
(label) atan2_16::@return
|
||||||
(word) atan2_16::angle
|
(word) atan2_16::angle
|
||||||
(word) atan2_16::angle#1 angle zp ZP_WORD:17 3.0
|
(word) atan2_16::angle#1 angle zp ZP_WORD:20 3.0
|
||||||
(word) atan2_16::angle#11 angle zp ZP_WORD:17 4.0
|
(word) atan2_16::angle#11 angle zp ZP_WORD:20 4.0
|
||||||
(word) atan2_16::angle#12 angle zp ZP_WORD:17 364.0
|
(word) atan2_16::angle#12 angle zp ZP_WORD:20 364.0
|
||||||
(word) atan2_16::angle#13 angle zp ZP_WORD:17 1334.6666666666667
|
(word) atan2_16::angle#13 angle zp ZP_WORD:20 1334.6666666666667
|
||||||
(word) atan2_16::angle#2 angle zp ZP_WORD:17 2002.0
|
(word) atan2_16::angle#2 angle zp ZP_WORD:20 2002.0
|
||||||
(word) atan2_16::angle#3 angle zp ZP_WORD:17 2002.0
|
(word) atan2_16::angle#3 angle zp ZP_WORD:20 2002.0
|
||||||
(word) atan2_16::angle#4 angle zp ZP_WORD:17 4.0
|
(word) atan2_16::angle#4 angle zp ZP_WORD:20 4.0
|
||||||
(word) atan2_16::angle#5 angle zp ZP_WORD:17 4.0
|
(word) atan2_16::angle#5 angle zp ZP_WORD:20 4.0
|
||||||
(word) atan2_16::angle#6 angle zp ZP_WORD:17 2004.0
|
(word) atan2_16::angle#6 angle zp ZP_WORD:20 2004.0
|
||||||
(byte) atan2_16::i
|
(byte) atan2_16::i
|
||||||
(byte) atan2_16::i#1 i zp ZP_BYTE:16 1501.5
|
(byte) atan2_16::i#1 i zp ZP_BYTE:19 1501.5
|
||||||
(byte) atan2_16::i#2 i zp ZP_BYTE:16 429.0
|
(byte) atan2_16::i#2 i zp ZP_BYTE:19 429.0
|
||||||
(word) atan2_16::return
|
(word) atan2_16::return
|
||||||
(word) atan2_16::return#0 return zp ZP_WORD:17 34.99999999999999
|
(word) atan2_16::return#0 return zp ZP_WORD:20 34.99999999999999
|
||||||
(word) atan2_16::return#2 return zp ZP_WORD:17 202.0
|
(word) atan2_16::return#2 return zp ZP_WORD:20 202.0
|
||||||
(signed word) atan2_16::x
|
(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
|
||||||
(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
|
||||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:14 6.0
|
(signed word) atan2_16::xi#0 xi zp ZP_WORD:17 6.0
|
||||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:14 500.5
|
(signed word) atan2_16::xi#1 xi zp ZP_WORD:17 500.5
|
||||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:14 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:14 801.2
|
(signed word) atan2_16::xi#3 xi zp ZP_WORD:17 801.2
|
||||||
(signed word) atan2_16::xi#7 xi zp ZP_WORD:14 1001.0
|
(signed word) atan2_16::xi#7 xi zp ZP_WORD:17 1001.0
|
||||||
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:14 4.0
|
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:17 4.0
|
||||||
(signed word) atan2_16::y
|
(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
|
||||||
(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
|
||||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:12 1.2000000000000002
|
(signed word) atan2_16::yi#0 yi zp ZP_WORD:15 1.2000000000000002
|
||||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:12 667.3333333333334
|
(signed word) atan2_16::yi#1 yi zp ZP_WORD:15 667.3333333333334
|
||||||
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:12 4.0
|
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:15 4.0
|
||||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:12 667.3333333333334
|
(signed word) atan2_16::yi#2 yi zp ZP_WORD:15 667.3333333333334
|
||||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:12 858.2857142857142
|
(signed word) atan2_16::yi#3 yi zp ZP_WORD:15 858.2857142857142
|
||||||
(signed word) atan2_16::yi#7 yi zp ZP_WORD:12 1001.0
|
(signed word) atan2_16::yi#7 yi zp ZP_WORD:15 1001.0
|
||||||
(dword()) clock()
|
(dword()) clock()
|
||||||
(label) clock::@return
|
(label) clock::@return
|
||||||
(dword) clock::return
|
(dword) clock::return
|
||||||
(dword) clock::return#0 return zp ZP_DWORD:28 1.3333333333333333
|
(dword) clock::return#0 return zp ZP_DWORD:31 1.3333333333333333
|
||||||
(dword) clock::return#2 return zp ZP_DWORD:28 4.0
|
(dword) clock::return#2 return zp ZP_DWORD:31 4.0
|
||||||
(void()) clock_start()
|
(void()) clock_start()
|
||||||
(label) clock_start::@return
|
(label) clock_start::@return
|
||||||
(void()) init_angle_screen((byte*) init_angle_screen::screen)
|
(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::@1
|
||||||
(label) init_angle_screen::@2
|
(label) init_angle_screen::@2
|
||||||
(label) init_angle_screen::@3
|
(label) init_angle_screen::@3
|
||||||
(label) init_angle_screen::@4
|
(label) init_angle_screen::@4
|
||||||
(label) init_angle_screen::@return
|
(label) init_angle_screen::@return
|
||||||
(byte) init_angle_screen::ang_w
|
(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
|
||||||
(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
|
||||||
(byte*) init_angle_screen::screen#1 screen zp ZP_WORD:10 42.599999999999994
|
(byte*) init_angle_screen::screen_bottomline
|
||||||
(byte*) init_angle_screen::screen#2 screen zp ZP_WORD:10 28.545454545454547
|
(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:12 7.333333333333333
|
||||||
(byte*) init_angle_screen::screen#4 screen zp ZP_WORD:10 22.0
|
(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:12 8.959999999999999
|
||||||
(signed byte) init_angle_screen::x
|
(byte*) init_angle_screen::screen_topline
|
||||||
(signed byte) init_angle_screen::x#1 reg byte x 151.5
|
(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:10 5.5
|
||||||
(signed byte) init_angle_screen::x#2 reg byte x 16.833333333333332
|
(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
|
(signed word) init_angle_screen::xw
|
||||||
(word) init_angle_screen::xw#0 xw zp ZP_WORD:32 50.5
|
(word) init_angle_screen::xw#0 xw zp ZP_WORD:35 33.666666666666664
|
||||||
(signed byte) init_angle_screen::y
|
(byte) init_angle_screen::y
|
||||||
(signed byte) init_angle_screen::y#1 y zp ZP_BYTE:9 16.5
|
(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
|
(byte) init_angle_screen::y#4 y zp ZP_BYTE:9 4.730769230769231
|
||||||
(signed word) init_angle_screen::yw
|
(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)
|
(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::$1 reg byte a 2002.0
|
||||||
(byte~) init_font_hex::$2 reg byte a 2002.0
|
(byte~) init_font_hex::$2 reg byte a 2002.0
|
||||||
(label) init_font_hex::@1
|
(label) init_font_hex::@1
|
||||||
@ -134,30 +146,30 @@
|
|||||||
(label) init_font_hex::@5
|
(label) init_font_hex::@5
|
||||||
(label) init_font_hex::@return
|
(label) init_font_hex::@return
|
||||||
(byte) init_font_hex::c
|
(byte) init_font_hex::c
|
||||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:21 16.5
|
(byte) init_font_hex::c#1 c zp ZP_BYTE:24 16.5
|
||||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:21 1.1578947368421053
|
(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053
|
||||||
(byte) init_font_hex::c1
|
(byte) init_font_hex::c1
|
||||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:26 151.5
|
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5
|
||||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:26 13.466666666666667
|
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667
|
||||||
(byte*) init_font_hex::charset
|
(byte*) init_font_hex::charset
|
||||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:22 35.5
|
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5
|
||||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:22 108.35714285714285
|
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285
|
||||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:22 22.0
|
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 22.0
|
||||||
(byte) init_font_hex::i
|
(byte) init_font_hex::i
|
||||||
(byte) init_font_hex::i#1 reg byte x 1501.5
|
(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::i#2 reg byte x 667.3333333333334
|
||||||
(byte) init_font_hex::idx
|
(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#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
|
||||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:19 7.333333333333333
|
(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:19 56.83333333333334
|
(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
|
||||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:24 50.5
|
(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:24 92.53846153846155
|
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155
|
||||||
(void()) main()
|
(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::@1
|
||||||
(label) main::@2
|
(label) main::@2
|
||||||
(label) main::@3
|
(label) main::@3
|
||||||
@ -169,7 +181,7 @@
|
|||||||
(byte*) main::BASE_SCREEN
|
(byte*) main::BASE_SCREEN
|
||||||
(const byte*) main::BASE_SCREEN#0 BASE_SCREEN = (byte*) 1024
|
(const byte*) main::BASE_SCREEN#0 BASE_SCREEN = (byte*) 1024
|
||||||
(dword) main::cyclecount
|
(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
|
(label) main::toD0181
|
||||||
(word~) main::toD0181_$0
|
(word~) main::toD0181_$0
|
||||||
(number~) main::toD0181_$1
|
(number~) main::toD0181_$1
|
||||||
@ -226,7 +238,7 @@
|
|||||||
(label) print_dword_at::@return
|
(label) print_dword_at::@return
|
||||||
(byte*) print_dword_at::at
|
(byte*) print_dword_at::at
|
||||||
(dword) print_dword_at::dw
|
(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
|
(byte[]) print_hextab
|
||||||
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
|
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
|
||||||
(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at)
|
(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 ]
|
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_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_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 ]
|
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_BYTE:14 [ init_angle_screen::xb#2 init_angle_screen::xb#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: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: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_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:16 [ atan2_16::i#2 atan2_16::i#1 ]
|
zp ZP_BYTE:19 [ 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: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:19 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
zp ZP_WORD:22 [ 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_BYTE:24 [ 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:25 [ 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_WORD:27 [ 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:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||||
reg byte x [ init_font_hex::i#2 init_font_hex::i#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_BYTE:30 [ 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_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 a [ print_byte_at::$0 ]
|
||||||
reg byte y [ print_byte_at::$2 ]
|
reg byte y [ print_byte_at::$2 ]
|
||||||
zp ZP_WORD:32 [ init_angle_screen::xw#0 atan2_16::x#0 ]
|
reg byte a [ init_angle_screen::$2 ]
|
||||||
zp ZP_WORD:34 [ init_angle_screen::yw#0 atan2_16::y#0 ]
|
reg byte a [ init_angle_screen::$3 ]
|
||||||
reg byte a [ init_angle_screen::ang_w#0 ]
|
zp ZP_WORD:35 [ init_angle_screen::xw#0 atan2_16::x#0 ]
|
||||||
zp ZP_WORD:36 [ atan2_16::xd#0 ]
|
reg byte a [ init_angle_screen::$6 ]
|
||||||
zp ZP_WORD:38 [ atan2_16::yd#0 ]
|
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::$24 ]
|
||||||
reg byte a [ atan2_16::$23 ]
|
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::$1 ]
|
||||||
reg byte a [ init_font_hex::$2 ]
|
reg byte a [ init_font_hex::$2 ]
|
||||||
reg byte y [ init_font_hex::idx#3 ]
|
reg byte y [ init_font_hex::idx#3 ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user