1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-06-29 09:29:31 +00:00
kickc/src/test/ref/cordic-atan2.sym
2021-06-13 14:24:57 +02:00

115 lines
5.3 KiB
Plaintext

constant byte* const CHARSET = (byte*) 8192
constant byte* const COLS = (byte*) 55296
constant byte* CORDIC_ATAN2_ANGLES_8[CORDIC_ITERATIONS_8] = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
}}
constant const byte CORDIC_ITERATIONS_8 = 8
constant byte* const D018 = (byte*) 53272
constant byte* FONT_HEX_PROTO[] = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
constant byte* const SCREEN = (byte*) 10240
byte atan2_8(signed byte atan2_8::x , signed byte atan2_8::y)
signed byte~ atan2_8::$2 reg byte x 2002.0
signed byte~ atan2_8::$7 zp[1]:12 2002.0
byte atan2_8::angle
byte atan2_8::angle#1 reg byte x 1501.5
byte atan2_8::angle#11 reg byte x 2002.0
byte atan2_8::angle#12 angle zp[1]:14 444444.8888888889
byte atan2_8::angle#13 angle zp[1]:14 1333334.6666666667
byte atan2_8::angle#2 angle zp[1]:14 2000002.0
byte atan2_8::angle#3 angle zp[1]:14 2000002.0
byte atan2_8::angle#4 reg byte x 2002.0
byte atan2_8::angle#5 reg byte x 2002.0
byte atan2_8::angle#6 angle zp[1]:14 2001003.0
byte atan2_8::i
byte atan2_8::i#1 i zp[1]:13 1500001.5
byte atan2_8::i#2 i zp[1]:13 500000.50000000006
byte atan2_8::return
byte atan2_8::return#0 reg byte x 701.0
byte atan2_8::return#2 reg byte a 202.0
signed byte atan2_8::x
signed byte atan2_8::x#0 x zp[1]:3 157.8846153846154
signed byte atan2_8::xd
signed byte atan2_8::xd#0 xd zp[1]:15 600000.6000000001
signed byte atan2_8::xi
signed byte atan2_8::xi#0 xi zp[1]:12 3003.0
signed byte atan2_8::xi#1 xi zp[1]:12 666667.3333333334
signed byte atan2_8::xi#2 xi zp[1]:12 666667.3333333334
signed byte atan2_8::xi#3 xi zp[1]:12 800201.0
signed byte atan2_8::xi#7 xi zp[1]:12 1000001.0
signed byte atan2_8::xi#8 xi zp[1]:12 2002.0
signed byte atan2_8::y
signed byte atan2_8::y#0 y zp[1]:2 146.60714285714286
signed byte atan2_8::yd
signed byte atan2_8::yd#0 reg byte y 1500001.5
signed byte atan2_8::yi
signed byte atan2_8::yi#0 reg byte x 600.5999999999999
signed byte atan2_8::yi#1 reg byte x 1000001.0
signed byte atan2_8::yi#11 reg byte x 2002.0
signed byte atan2_8::yi#2 reg byte x 1000001.0
signed byte atan2_8::yi#3 reg byte x 857286.7142857142
signed byte atan2_8::yi#7 reg byte x 1000001.0
void init_font_hex(byte* init_font_hex::charset)
byte~ init_font_hex::$0 zp[1]:15 10001.0
byte~ init_font_hex::$1 reg byte a 20002.0
byte~ init_font_hex::$2 reg byte a 20002.0
byte init_font_hex::c
byte init_font_hex::c#1 c zp[1]:12 151.5
byte init_font_hex::c#6 c zp[1]:12 10.631578947368421
byte init_font_hex::c1
byte init_font_hex::c1#1 c1 zp[1]:13 1501.5
byte init_font_hex::c1#4 c1 zp[1]:13 133.46666666666667
byte* init_font_hex::charset
byte* init_font_hex::charset#0 charset zp[2]:8 350.5
byte* init_font_hex::charset#2 charset zp[2]:8 1079.0714285714287
byte* init_font_hex::charset#5 charset zp[2]:8 202.0
byte init_font_hex::i
byte init_font_hex::i#1 reg byte x 15001.5
byte init_font_hex::i#2 reg byte x 6667.333333333333
byte init_font_hex::idx
byte init_font_hex::idx#2 idx zp[1]:14 5501.0
byte init_font_hex::idx#3 reg byte y 2002.0
byte init_font_hex::idx#5 idx zp[1]:14 6000.6
byte* init_font_hex::proto_hi
byte* init_font_hex::proto_hi#1 proto_hi zp[2]:6 67.33333333333333
byte* init_font_hex::proto_hi#6 proto_hi zp[2]:6 566.8333333333333
byte* init_font_hex::proto_lo
byte* init_font_hex::proto_lo#1 proto_lo zp[2]:10 500.5
byte* init_font_hex::proto_lo#4 proto_lo zp[2]:10 923.3076923076923
void main()
byte main::angle
byte main::angle#0 reg byte a 202.0
constant byte* main::col00 = COLS+(word)$c*$28+$13
byte* main::screen
byte* main::screen#1 screen zp[2]:4 42.599999999999994
byte* main::screen#2 screen zp[2]:4 44.85714285714286
byte* main::screen#4 screen zp[2]:4 22.0
byte* main::toD0181_gfx
byte main::toD0181_return
constant byte main::toD0181_return#0 toD0181_return = byte1 (word)SCREEN&$3fff*4|byte1 (word)CHARSET/4&$f
byte* main::toD0181_screen
signed byte main::x
signed byte main::x#1 x zp[1]:3 151.5
signed byte main::x#2 x zp[1]:3 37.875
signed byte main::y
signed byte main::y#1 y zp[1]:2 16.5
signed byte main::y#4 y zp[1]:2 11.181818181818182
zp[1]:2 [ main::y#4 main::y#1 atan2_8::y#0 ]
zp[1]:3 [ main::x#2 main::x#1 atan2_8::x#0 ]
zp[2]:4 [ main::screen#2 main::screen#4 main::screen#1 ]
zp[2]:6 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
zp[2]:8 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
zp[2]:10 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
reg byte x [ atan2_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ]
zp[1]:12 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 init_font_hex::c#6 init_font_hex::c#1 ]
zp[1]:13 [ atan2_8::i#2 atan2_8::i#1 init_font_hex::c1#4 init_font_hex::c1#1 ]
zp[1]:14 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 init_font_hex::idx#5 init_font_hex::idx#2 ]
reg byte x [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ]
reg byte a [ atan2_8::return#2 ]
reg byte a [ main::angle#0 ]
reg byte a [ init_font_hex::$1 ]
reg byte a [ init_font_hex::$2 ]
reg byte y [ init_font_hex::idx#3 ]
zp[1]:15 [ atan2_8::xd#0 init_font_hex::$0 ]
reg byte y [ atan2_8::yd#0 ]